首页任务通知
This commit is contained in:
parent
c992731a78
commit
8df64e5616
@ -4,4 +4,7 @@ import oahttp from "@/utils/oahttp.js";
|
|||||||
* 公告列表
|
* 公告列表
|
||||||
*/
|
*/
|
||||||
export const noticeList = (data) => oahttp.get('/article/lists', data)
|
export const noticeList = (data) => oahttp.get('/article/lists', data)
|
||||||
export const noticeDetail = (data) => oahttp.get('/article/detail', data)
|
export const noticeDetail = (data) => oahttp.get('/article/detail', data)
|
||||||
|
|
||||||
|
// 任务通知
|
||||||
|
export const taskStartNoticeApi = (data) => oahttp.get('/task/taskStartNotice', data)
|
@ -100,6 +100,11 @@
|
|||||||
<text v-if="datas.director_uid != 0"> {{ datas.directorInfo.nickname}} </text>
|
<text v-if="datas.director_uid != 0"> {{ datas.directorInfo.nickname}} </text>
|
||||||
<text v-if="datas.director_uid == 0"> 指定人员 </text>
|
<text v-if="datas.director_uid == 0"> 指定人员 </text>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view class="">
|
||||||
|
<text>任务进度 :</text>
|
||||||
|
<u-line-progress :percentage="30" :activeColor="taskProgressColor(30)"></u-line-progress>
|
||||||
|
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -173,6 +178,14 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
taskProgressColor(value) {
|
||||||
|
if (value < 100) return "#FF7C32"
|
||||||
|
else {
|
||||||
|
return '#1BA035'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
if (url) {
|
if (url) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
@ -2,7 +2,7 @@ let httpApiThree;
|
|||||||
let httpApi; // 总域名
|
let httpApi; // 总域名
|
||||||
let httpApiTwo; // 物流系统域名
|
let httpApiTwo; // 物流系统域名
|
||||||
|
|
||||||
const env = 'local'; // 开发
|
const env = 'dev'; // 开发
|
||||||
// const env = 'prod'; // 生产
|
// const env = 'prod'; // 生产
|
||||||
// const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
// const env = 'local'; // 本地
|
// const env = 'local'; // 本地
|
||||||
|
@ -76,8 +76,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 任务通知 -->
|
||||||
|
<view class="" style="width: 694.74rpx;margin: 0 auto;" v-if="taskNotice">
|
||||||
|
<u-notice-bar :text="taskNotice" mode="closable" scrollable url="/pages/bar/bar"></u-notice-bar>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 片区经理聊天 -->
|
<!-- 片区经理聊天 -->
|
||||||
<view class="chat" @click="navTo('/subpkg/chatMang/index')" style="margin-top: 130rpx;">
|
<view class="chat" @click="navTo('/subpkg/chatMang/index')" style="margin-top: 10rpx;">
|
||||||
<view class="chat-l">
|
<view class="chat-l">
|
||||||
<u--image shape="circle" :showLoading="true" :src="managerInfo.manager_avatar" width="91rpx"
|
<u--image shape="circle" :showLoading="true" :src="managerInfo.manager_avatar" width="91rpx"
|
||||||
height="91rpx"></u--image>
|
height="91rpx"></u--image>
|
||||||
@ -188,7 +194,8 @@
|
|||||||
oaHomeData
|
oaHomeData
|
||||||
} from "@/static/server/server.js";
|
} from "@/static/server/server.js";
|
||||||
import {
|
import {
|
||||||
noticeList
|
noticeList,
|
||||||
|
taskStartNoticeApi
|
||||||
} from "@/api/notice.js";
|
} from "@/api/notice.js";
|
||||||
import {
|
import {
|
||||||
getAreaManagerApi
|
getAreaManagerApi
|
||||||
@ -219,7 +226,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
taskNotice: '',
|
||||||
brange: 0,
|
brange: 0,
|
||||||
options: {
|
options: {
|
||||||
data: '',
|
data: '',
|
||||||
@ -270,6 +277,7 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
async onLoad() {
|
async onLoad() {
|
||||||
|
this.getTaskNotice()
|
||||||
// console.log('asdashg')
|
// console.log('asdashg')
|
||||||
if (uni.getStorageSync('USER_INFO')) {
|
if (uni.getStorageSync('USER_INFO')) {
|
||||||
let userData = JSON.parse(uni.getStorageSync('USER_INFO'))
|
let userData = JSON.parse(uni.getStorageSync('USER_INFO'))
|
||||||
@ -277,11 +285,12 @@
|
|||||||
this.initUserInfo(userData);
|
this.initUserInfo(userData);
|
||||||
// console.log(545)
|
// console.log(545)
|
||||||
}
|
}
|
||||||
console.log(7787878)
|
|
||||||
await this.$onLaunched;
|
await this.$onLaunched;
|
||||||
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO") || '{}')?.is_captain
|
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO") || '{}')?.is_captain
|
||||||
this.options.data = bj;
|
this.options.data = bj;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
let that = this;
|
let that = this;
|
||||||
jpushModule.addNotificationListener(function(result) {
|
jpushModule.addNotificationListener(function(result) {
|
||||||
@ -330,7 +339,6 @@
|
|||||||
|
|
||||||
let user_id = JSON.parse(uni.getStorageSync("USER_INFO")).id
|
let user_id = JSON.parse(uni.getStorageSync("USER_INFO")).id
|
||||||
this.getOrderList();
|
this.getOrderList();
|
||||||
console.log("show")
|
|
||||||
getAreaManagerApi({
|
getAreaManagerApi({
|
||||||
user_id
|
user_id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@ -414,6 +422,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
// 任务通知
|
||||||
|
async getTaskNotice() {
|
||||||
|
let res = await taskStartNoticeApi()
|
||||||
|
this.taskNotice = res.data?.template?.title ?
|
||||||
|
`您的${res.data.template.title}任务即将于${res.data.template.cron_time}日开始` : ""
|
||||||
|
},
|
||||||
|
|
||||||
// 通知
|
// 通知
|
||||||
noticeFn() {
|
noticeFn() {
|
||||||
jpushModule.addNotificationListener(res => {
|
jpushModule.addNotificationListener(res => {
|
||||||
@ -600,6 +616,9 @@
|
|||||||
await this.getOrderList();
|
await this.getOrderList();
|
||||||
await this.$store.dispatch('initConfig');
|
await this.$store.dispatch('initConfig');
|
||||||
await this.getApproveList();
|
await this.getApproveList();
|
||||||
|
await this.getTaskNotice();
|
||||||
|
|
||||||
|
|
||||||
// this.getIndexList()
|
// this.getIndexList()
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user