镇公司身份改变
This commit is contained in:
parent
670ab6ff0b
commit
73aa7f8c19
@ -4,39 +4,25 @@
|
|||||||
<!-- <u-navbar @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
|
<!-- <u-navbar @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
|
||||||
leftIconColor=" #fff" :autoBack="false">
|
leftIconColor=" #fff" :autoBack="false">
|
||||||
</u-navbar> -->
|
</u-navbar> -->
|
||||||
<view
|
<view class="home_header" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''">
|
||||||
class="home_header"
|
<view style="
|
||||||
:class="!ApproveList.length > 0 ? 'home_header_no_data' : ''"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
style="
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 0 0 30rpx 30rpx;
|
border-radius: 0 0 30rpx 30rpx;
|
||||||
"
|
">
|
||||||
>
|
<hx-lottie :options="options" ref="lottie" style="
|
||||||
<hx-lottie
|
|
||||||
:options="options"
|
|
||||||
ref="lottie"
|
|
||||||
style="
|
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 440rpx;
|
height: 440rpx;
|
||||||
transform: scale(1.2);
|
transform: scale(1.2);
|
||||||
background-color: #0122c7;
|
background-color: #0122c7;
|
||||||
"
|
" />
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef APP-PLUS||H5 -->
|
<!-- #ifdef APP-PLUS||H5 -->
|
||||||
<view style="height: var(--status-bar-height)"></view>
|
<view style="height: var(--status-bar-height)"></view>
|
||||||
<view v-if="uniMP" style="height: 44px">
|
<view v-if="uniMP" style="height: 44px">
|
||||||
<u-icon
|
<u-icon name="arrow-left" color="#fff" size="20" @click="leftClick"></u-icon>
|
||||||
name="arrow-left"
|
|
||||||
color="#fff"
|
|
||||||
size="20"
|
|
||||||
@click="leftClick"
|
|
||||||
></u-icon>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-else style="height: 30rpx"></view>
|
<view v-else style="height: 30rpx"></view>
|
||||||
<!-- <view v-if="uniMP" style="height: 44px;"></view> -->
|
<!-- <view v-if="uniMP" style="height: 44px;"></view> -->
|
||||||
@ -50,46 +36,30 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="head_img">
|
<view class="head_img">
|
||||||
<view class="img_box">
|
<view class="img_box">
|
||||||
<u--image
|
<u--image :showLoading="true" width="131.43rpx" height="131.43rpx" class="img_box_img"
|
||||||
:showLoading="true"
|
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'" shape="circle"></u--image>
|
||||||
width="131.43rpx"
|
|
||||||
height="131.43rpx"
|
|
||||||
class="img_box_img"
|
|
||||||
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'"
|
|
||||||
shape="circle"
|
|
||||||
></u--image>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<text class="head_text">工作证: {{ myOaInfo.nickname }}</text>
|
<text class="head_text">工作证: {{ myOaInfo.nickname }}</text>
|
||||||
<text class="head_text" style="flex-shrink: 0"
|
<text class="head_text" style="flex-shrink: 0">身份: {{ myOaInfo.admin_id ? "管理员" : "普通用户" }}</text>
|
||||||
>身份: {{ myOaInfo.admin_id ? "管理员" : "普通用户" }}</text
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 占位 -->
|
<!-- 占位 -->
|
||||||
<view style="height: 150rpx"></view>
|
<view style="height: 150rpx"></view>
|
||||||
|
|
||||||
<view
|
<view class="backlog" :class="!ApproveList.length > 0 ? 'backlog_no_data' : ''">
|
||||||
class="backlog"
|
|
||||||
:class="!ApproveList.length > 0 ? 'backlog_no_data' : ''"
|
|
||||||
>
|
|
||||||
<view class="head_title flex_a_c_j_sb">
|
<view class="head_title flex_a_c_j_sb">
|
||||||
<view class="title">公告列表</view>
|
<view class="title">公告列表</view>
|
||||||
<view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')"
|
<view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')">更多
|
||||||
>更多
|
|
||||||
<view class="iconfont icon-you">
|
<view class="iconfont icon-you">
|
||||||
<uni-icons type="forward"></uni-icons>
|
<uni-icons type="forward"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block v-if="ApproveList.length > 0">
|
<block v-if="ApproveList.length > 0">
|
||||||
<view
|
<view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)"
|
||||||
class="backlog_item flex_a_c_j_sb"
|
:key="index" @click="clickNotice(item.id)">
|
||||||
v-for="(item, index) in ApproveList.slice(0, 2)"
|
|
||||||
:key="index"
|
|
||||||
@click="clickNotice(item.id)"
|
|
||||||
>
|
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<text class="text_time">{{
|
<text class="text_time">{{
|
||||||
item.create_time.substring(0, 10).replace(/-/g, ".")
|
item.create_time.substring(0, 10).replace(/-/g, ".")
|
||||||
@ -97,23 +67,20 @@
|
|||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<i class="iconfont icon-you"
|
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
|
||||||
><uni-icons type="forward"></uni-icons
|
|
||||||
></i>
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view v-else class="backlog_no flex_a_c_j_sb">
|
<view v-else class="backlog_no flex_a_c_j_sb">
|
||||||
<view class="text">暂无更多消息</view>
|
<view class="text">暂无更多消息</view>
|
||||||
<i class="iconfont icon-you"
|
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
|
||||||
><uni-icons type="forward"></uni-icons
|
|
||||||
></i>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 片区经理聊天 -->
|
<!-- 片区经理聊天 -->
|
||||||
<view class="chat" @click="navTo('/subpkg/chatMang/index')" style="margin-top: 130rpx;">
|
<view class="chat" @click="navTo('/subpkg/chatMang/index')" style="margin-top: 130rpx;">
|
||||||
<view class="chat-l">
|
<view class="chat-l">
|
||||||
<u--image shape="circle" :showLoading="true" :src="managerInfo.manager_avatar" width="91rpx" height="91rpx"></u--image>
|
<u--image shape="circle" :showLoading="true" :src="managerInfo.manager_avatar" width="91rpx"
|
||||||
|
height="91rpx"></u--image>
|
||||||
<view class="" style="margin-left: 40rpx;">
|
<view class="" style="margin-left: 40rpx;">
|
||||||
{{managerInfo.manager_name}}
|
{{managerInfo.manager_name}}
|
||||||
</view>
|
</view>
|
||||||
@ -144,11 +111,7 @@
|
|||||||
<view class="fast_track">
|
<view class="fast_track">
|
||||||
<block v-for="(item, index) in oaHomeData" :key="item.id">
|
<block v-for="(item, index) in oaHomeData" :key="item.id">
|
||||||
<view class="track_item" @click="navTwo(item.paths, index)">
|
<view class="track_item" @click="navTwo(item.paths, index)">
|
||||||
<image
|
<image :src="item.icon" mode="aspectFit" style="width: 77rpx;height: 77rpx;">
|
||||||
:src="item.icon"
|
|
||||||
mode="aspectFit"
|
|
||||||
style="width: 77rpx;height: 77rpx;"
|
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
<view class="title">{{ item.name }}</view>
|
<view class="title">{{ item.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -158,8 +121,7 @@
|
|||||||
<view class="my_task">
|
<view class="my_task">
|
||||||
<view class="task_title flex_a_c_j_sb">
|
<view class="task_title flex_a_c_j_sb">
|
||||||
<view class="title">配送信息</view>
|
<view class="title">配送信息</view>
|
||||||
<view class="flex_a_c" @click="goOrderList"
|
<view class="flex_a_c" @click="goOrderList">更多
|
||||||
>更多
|
|
||||||
<view class="iconfont icon-you">
|
<view class="iconfont icon-you">
|
||||||
<uni-icons type="forward"></uni-icons>
|
<uni-icons type="forward"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
@ -168,20 +130,14 @@
|
|||||||
|
|
||||||
<view v-if="orderList.length > 0">
|
<view v-if="orderList.length > 0">
|
||||||
<globalPopup ref="globalPopup"></globalPopup>
|
<globalPopup ref="globalPopup"></globalPopup>
|
||||||
<logistiBriefCard
|
<logistiBriefCard v-for="(item, index) in orderList" :key="index" :goodsInfo="item">
|
||||||
v-for="(item, index) in orderList"
|
|
||||||
:key="index"
|
|
||||||
:goodsInfo="item"
|
|
||||||
>
|
|
||||||
</logistiBriefCard>
|
</logistiBriefCard>
|
||||||
<u-loadmore :status="status" />
|
<u-loadmore :status="status" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else class="no_task">
|
<view v-else class="no_task">
|
||||||
<view class="title">暂无配送信息</view>
|
<view class="title">暂无配送信息</view>
|
||||||
<view class="tips" v-if="!$store.state.app.token"
|
<view class="tips" v-if="!$store.state.app.token">登录后查看配送信息详情</view>
|
||||||
>登录后查看配送信息详情</view
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="head_title flex_a_c_j_sb">
|
<!-- <view class="head_title flex_a_c_j_sb">
|
||||||
<view class="">我的任务</view>
|
<view class="">我的任务</view>
|
||||||
@ -220,51 +176,51 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue";
|
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue";
|
||||||
import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue";
|
import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue";
|
||||||
import {
|
import {
|
||||||
getList
|
getList
|
||||||
} from "@/api/logistics.js";
|
} from "@/api/logistics.js";
|
||||||
import {
|
import {
|
||||||
Toast
|
Toast
|
||||||
} from "@/libs/uniApi.js";
|
} from "@/libs/uniApi.js";
|
||||||
import {
|
import {
|
||||||
oaHomeData
|
oaHomeData
|
||||||
} from "@/static/server/server.js";
|
} from "@/static/server/server.js";
|
||||||
import {
|
import {
|
||||||
noticeList
|
noticeList
|
||||||
} from "@/api/notice.js";
|
} from "@/api/notice.js";
|
||||||
import {
|
import {
|
||||||
getAreaManagerApi
|
getAreaManagerApi
|
||||||
} from "@/api/bussness.js"
|
} from "@/api/bussness.js"
|
||||||
// import tabbar from '../components/tabbar'
|
// import tabbar from '../components/tabbar'
|
||||||
import {
|
import {
|
||||||
getIndexListAPI,
|
getIndexListAPI,
|
||||||
getTaskListAPI,
|
getTaskListAPI,
|
||||||
getMyTaskListAPI,
|
getMyTaskListAPI,
|
||||||
getApproveListAPI,
|
getApproveListAPI,
|
||||||
getUserIndexAPI,
|
getUserIndexAPI,
|
||||||
} from "@/api/oaApi.js";
|
} from "@/api/oaApi.js";
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from 'vuex';
|
} from 'vuex';
|
||||||
import bj from "@/static/animation/home.json"
|
import bj from "@/static/animation/home.json"
|
||||||
import {
|
import {
|
||||||
userInfo
|
userInfo
|
||||||
} from "@/api/oaUser.js"
|
} from "@/api/oaUser.js"
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||||
// #endif
|
// #endif
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// tabbar
|
// tabbar
|
||||||
logistiBriefCard,
|
logistiBriefCard,
|
||||||
globalPopup,
|
globalPopup,
|
||||||
},
|
},
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
brange:0,
|
brange: 0,
|
||||||
options: {
|
options: {
|
||||||
data: '',
|
data: '',
|
||||||
},
|
},
|
||||||
@ -272,7 +228,7 @@ export default {
|
|||||||
page_num: 1,
|
page_num: 1,
|
||||||
flag: false,
|
flag: false,
|
||||||
uniMP: false,
|
uniMP: false,
|
||||||
managerInfo:{},
|
managerInfo: {},
|
||||||
id: "",
|
id: "",
|
||||||
is_captain: 0,
|
is_captain: 0,
|
||||||
notArr: [],
|
notArr: [],
|
||||||
@ -313,15 +269,15 @@ export default {
|
|||||||
showOaHomeData: false, //更新首页计算的值
|
showOaHomeData: false, //更新首页计算的值
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async onLoad () {
|
async onLoad() {
|
||||||
|
|
||||||
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) {
|
||||||
if (!that.notArr.includes(result.messageID)) {
|
if (!that.notArr.includes(result.messageID)) {
|
||||||
// that.$refs.globalPopup.showPopu();
|
// that.$refs.globalPopup.showPopu();
|
||||||
that.getOrderList();
|
that.getOrderList();
|
||||||
@ -331,7 +287,7 @@ export default {
|
|||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
onReachBottom () {
|
onReachBottom() {
|
||||||
if (this.flag) return
|
if (this.flag) return
|
||||||
let that = this
|
let that = this
|
||||||
this.status = "loading"
|
this.status = "loading"
|
||||||
@ -352,16 +308,18 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async onShow () {
|
async onShow() {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url:'/subpkg/chatMang/index'
|
// url:'/subpkg/chatMang/index'
|
||||||
// }
|
// }
|
||||||
// this.getUserIndex()
|
// this.getUserIndex()
|
||||||
// this.getIndexList()
|
// this.getIndexList()
|
||||||
let user_id= JSON.parse( uni.getStorageSync("USER_INFO")).id
|
let user_id = JSON.parse(uni.getStorageSync("USER_INFO")).id
|
||||||
getAreaManagerApi({user_id}).then(res=>{
|
getAreaManagerApi({
|
||||||
console.log(res.data)
|
user_id
|
||||||
this.managerInfo=res.data
|
}).then(res => {
|
||||||
|
// console.log(res.data)
|
||||||
|
this.managerInfo = res.data
|
||||||
})
|
})
|
||||||
await this.$onLaunched;
|
await this.$onLaunched;
|
||||||
if (uni.getStorageSync('uniMP')) this.uniMP = true;
|
if (uni.getStorageSync('uniMP')) this.uniMP = true;
|
||||||
@ -408,7 +366,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.app.token': {
|
'$store.state.app.token': {
|
||||||
handler: function (n, o) {
|
handler: function(n, o) {
|
||||||
userInfo().then(({
|
userInfo().then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
@ -422,7 +380,7 @@ export default {
|
|||||||
'$store.state.config.config.menu': {
|
'$store.state.config.config.menu': {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true,
|
deep: true,
|
||||||
handler: function (n, o) {
|
handler: function(n, o) {
|
||||||
const route = '/pages/oaHome/oaHome';
|
const route = '/pages/oaHome/oaHome';
|
||||||
let arr = [];
|
let arr = [];
|
||||||
n.forEach((item) => {
|
n.forEach((item) => {
|
||||||
@ -442,10 +400,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 通知
|
// 通知
|
||||||
noticeFn () {
|
noticeFn() {
|
||||||
jpushModule.addNotificationListener(res => {
|
jpushModule.addNotificationListener(res => {
|
||||||
const audioContext = uni.createInnerAudioContext()
|
const audioContext = uni.createInnerAudioContext()
|
||||||
if(res.content.includes(':')){
|
if (res.content.includes(':')) {
|
||||||
audioContext.src = '/static/mp3/im.wav'
|
audioContext.src = '/static/mp3/im.wav'
|
||||||
audioContext.play()
|
audioContext.play()
|
||||||
uni.vibrateLong();
|
uni.vibrateLong();
|
||||||
@ -461,14 +419,14 @@ export default {
|
|||||||
console.log("index的监听")
|
console.log("index的监听")
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
leftClick (e) {
|
leftClick(e) {
|
||||||
console.log("发送给宿主")
|
console.log("发送给宿主")
|
||||||
uni.sendHostEvent('closeApp', e, (ret) => {
|
uni.sendHostEvent('closeApp', e, (ret) => {
|
||||||
//发送消息成功回调
|
//发送消息成功回调
|
||||||
console.log('关闭应用' + JSON.stringify(ret));
|
console.log('关闭应用' + JSON.stringify(ret));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async getOrderList () {
|
async getOrderList() {
|
||||||
this.id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
|
this.id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
|
||||||
let res = await getList({
|
let res = await getList({
|
||||||
user_id: this.id,
|
user_id: this.id,
|
||||||
@ -477,18 +435,18 @@ export default {
|
|||||||
});
|
});
|
||||||
this.orderList = res.data.data;
|
this.orderList = res.data.data;
|
||||||
},
|
},
|
||||||
goOrderList () {
|
goOrderList() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/logistics/index",
|
url: "/pages/logistics/index",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initUserInfo (data = null) {
|
initUserInfo(data = null) {
|
||||||
if (data) return this.myOaInfo = data;
|
if (data) return this.myOaInfo = data;
|
||||||
this.$store.state.app.userInfo ?
|
this.$store.state.app.userInfo ?
|
||||||
(this.myOaInfo = this.$store.state.app.userInfo) :
|
(this.myOaInfo = this.$store.state.app.userInfo) :
|
||||||
(this.myOaInfo.avatar = "");
|
(this.myOaInfo.avatar = "");
|
||||||
},
|
},
|
||||||
initOaHomeDada () {
|
initOaHomeDada() {
|
||||||
if (this.$store.state.app.userInfo.admin_id == 0) {
|
if (this.$store.state.app.userInfo.admin_id == 0) {
|
||||||
// 如果用户不是管理员
|
// 如果用户不是管理员
|
||||||
let arr = oaHomeData.filter((item) => !item.admin); //过滤掉管理员专属页面
|
let arr = oaHomeData.filter((item) => !item.admin); //过滤掉管理员专属页面
|
||||||
@ -512,7 +470,7 @@ export default {
|
|||||||
this.oaHomeData.splice(this.oaHomeData.length - 1, 1);
|
this.oaHomeData.splice(this.oaHomeData.length - 1, 1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getApproveList () {
|
async getApproveList() {
|
||||||
const res = await noticeList({
|
const res = await noticeList({
|
||||||
keyword: "",
|
keyword: "",
|
||||||
page_no: 1,
|
page_no: 1,
|
||||||
@ -520,7 +478,7 @@ export default {
|
|||||||
});
|
});
|
||||||
this.ApproveList = res.data.lists;
|
this.ApproveList = res.data.lists;
|
||||||
},
|
},
|
||||||
async getIndexList () {
|
async getIndexList() {
|
||||||
const {
|
const {
|
||||||
project,
|
project,
|
||||||
task
|
task
|
||||||
@ -536,19 +494,19 @@ export default {
|
|||||||
this.assessData[7].num = task.count_lv + "%";
|
this.assessData[7].num = task.count_lv + "%";
|
||||||
this.myTaskList = task.list;
|
this.myTaskList = task.list;
|
||||||
},
|
},
|
||||||
async getMyTask () {
|
async getMyTask() {
|
||||||
let data = {
|
let data = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
};
|
};
|
||||||
const res = getMyTaskListAPI(data);
|
const res = getMyTaskListAPI(data);
|
||||||
},
|
},
|
||||||
naviTaskDetails (id) {
|
naviTaskDetails(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/views/task_details?id=${id}`,
|
url: `/pages/views/task_details?id=${id}`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
navTo (url) {
|
navTo(url) {
|
||||||
if (url) {
|
if (url) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
@ -556,16 +514,16 @@ export default {
|
|||||||
});
|
});
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url,
|
url: url,
|
||||||
success () {
|
success() {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
},
|
},
|
||||||
fail () {
|
fail() {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: url,
|
url: url,
|
||||||
success () {
|
success() {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
},
|
},
|
||||||
fail () {
|
fail() {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -573,7 +531,7 @@ export default {
|
|||||||
})
|
})
|
||||||
} else Toast('暂未开放')
|
} else Toast('暂未开放')
|
||||||
},
|
},
|
||||||
navTwo (url, key) {
|
navTwo(url, key) {
|
||||||
// let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null;
|
// let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null;
|
||||||
// var arr = [3, 6];
|
// var arr = [3, 6];
|
||||||
|
|
||||||
@ -586,13 +544,13 @@ export default {
|
|||||||
this.navTo(url);
|
this.navTo(url);
|
||||||
},
|
},
|
||||||
// 点击公告
|
// 点击公告
|
||||||
clickNotice (e) {
|
clickNotice(e) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/oaNews/oaNews?id=${e}`,
|
url: `/pages/oaNews/oaNews?id=${e}`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 判断当前是否登录,显示任务及完成率
|
// 判断当前是否登录,显示任务及完成率
|
||||||
showToask () {
|
showToask() {
|
||||||
if (!this.$store.state.app.token) {
|
if (!this.$store.state.app.token) {
|
||||||
this.assessData = this.assessData.map((item) => {
|
this.assessData = this.assessData.map((item) => {
|
||||||
item.num = "*";
|
item.num = "*";
|
||||||
@ -606,17 +564,17 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
login () {
|
login() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/oaLogin/oaLogin",
|
url: "/pages/oaLogin/oaLogin",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async getUserIndex () {
|
async getUserIndex() {
|
||||||
const res = await getUserIndexAPI();
|
const res = await getUserIndexAPI();
|
||||||
this.myOaInfo = res;
|
this.myOaInfo = res;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async onPullDownRefresh () {
|
async onPullDownRefresh() {
|
||||||
uni.sendHostEvent('test', '测试', (ret) => {
|
uni.sendHostEvent('test', '测试', (ret) => {
|
||||||
// uni.showModal({
|
// uni.showModal({
|
||||||
// title:'内容',
|
// title:'内容',
|
||||||
@ -629,21 +587,21 @@ export default {
|
|||||||
// this.getIndexList()
|
// this.getIndexList()
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.oa_home {
|
.oa_home {
|
||||||
padding-bottom: 100rpx;
|
padding-bottom: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header_bg {
|
.header_bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// z-index: -1;
|
// z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.home_header {
|
.home_header {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
// height: 607.02rpx;
|
// height: 607.02rpx;
|
||||||
@ -815,13 +773,13 @@ export default {
|
|||||||
.backlog_no_data {
|
.backlog_no_data {
|
||||||
bottom: -70rpx;
|
bottom: -70rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.home_header_no_data {
|
.home_header_no_data {
|
||||||
margin-bottom: 93.33rpx;
|
margin-bottom: 93.33rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fast_track {
|
.fast_track {
|
||||||
width: 694rpx;
|
width: 694rpx;
|
||||||
// height: 331rpx;
|
// height: 331rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -845,9 +803,9 @@ export default {
|
|||||||
margin-top: 14.04rpx;
|
margin-top: 14.04rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.my_task {
|
.my_task {
|
||||||
width: 694.74rpx;
|
width: 694.74rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
// margin-top: 31.58rpx;
|
// margin-top: 31.58rpx;
|
||||||
@ -960,9 +918,9 @@ export default {
|
|||||||
font-size: 24.56rpx;
|
font-size: 24.56rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.no_login {
|
.no_login {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -1000,26 +958,29 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.chat{
|
|
||||||
|
.chat {
|
||||||
margin-top: 1000px;
|
margin-top: 1000px;
|
||||||
// margin-top: 2000rpx;
|
// margin-top: 2000rpx;
|
||||||
width: 694.74rpx;
|
width: 694.74rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding:20rpx;
|
padding: 20rpx;
|
||||||
// padding-top: 10rpx;
|
// padding-top: 10rpx;
|
||||||
padding-right: 24rpx;
|
padding-right: 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.chat-l{
|
|
||||||
|
.chat-l {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.brange{
|
|
||||||
|
.brange {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: red;
|
background-color: red;
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
@ -1028,5 +989,5 @@ export default {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
lighting-color: 40rpx;
|
lighting-color: 40rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="all_box">
|
<view class="all_box">
|
||||||
<block v-if="skeleton">
|
<block v-if="skeleton">
|
||||||
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%"
|
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="40"
|
||||||
rowsHeight="40" v-for="i in 3" :key="i" style="padding: 28rpx;">
|
v-for="i in 3" :key="i" style="padding: 28rpx;">
|
||||||
</u-skeleton>
|
</u-skeleton>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
@ -10,6 +10,7 @@
|
|||||||
<view v-else class="task_list">
|
<view v-else class="task_list">
|
||||||
<!-- <taskCard class="task_card" v-for="item in 10" :key="item"></taskCard> -->
|
<!-- <taskCard class="task_card" v-for="item in 10" :key="item"></taskCard> -->
|
||||||
<task-item :datas="item" v-for="item in list" :key="item.id"></task-item>
|
<task-item :datas="item" v-for="item in list" :key="item.id"></task-item>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<!-- <u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
<!-- <u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||||
@ -18,18 +19,24 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTaskListApi } from '@/api/oa'
|
import {
|
||||||
import { Toast } from '@/libs/uniApi.js'
|
getTaskListApi
|
||||||
|
} from '@/api/oa'
|
||||||
|
import {
|
||||||
|
Toast
|
||||||
|
} from '@/libs/uniApi.js'
|
||||||
import taskItem from "@/components/task/taskItem.vue"
|
import taskItem from "@/components/task/taskItem.vue"
|
||||||
import { taskLists } from "@/api/task.js"
|
import {
|
||||||
|
taskLists
|
||||||
|
} from "@/api/task.js"
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components: {
|
||||||
taskItem
|
taskItem
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
skeleton: false,
|
skeleton: false,
|
||||||
loadConfig:{
|
loadConfig: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 15,
|
limit: 15,
|
||||||
lastpage: '',
|
lastpage: '',
|
||||||
@ -51,26 +58,31 @@
|
|||||||
uni.$on('initOaTask', this.loadList);
|
uni.$on('initOaTask', this.loadList);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadList(){
|
async loadList() {
|
||||||
let res = await taskLists({limit: 15, page: 1});
|
let res = await taskLists({
|
||||||
|
limit: 15,
|
||||||
|
page: 1
|
||||||
|
});
|
||||||
this.list = res.data;
|
this.list = res.data;
|
||||||
this.skeleton = false;
|
this.skeleton = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.loadList();
|
this.loadList();
|
||||||
this.$u.sleep(500).then(()=>{uni.stopPullDownRefresh()});
|
this.$u.sleep(500).then(() => {
|
||||||
},
|
uni.stopPullDownRefresh()
|
||||||
onReachBottom() {
|
});
|
||||||
},
|
},
|
||||||
|
onReachBottom() {},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.task_list{
|
.task_list {
|
||||||
padding-top: 28rpx;
|
padding-top: 28rpx;
|
||||||
}
|
}
|
||||||
.loading{
|
|
||||||
|
.loading {
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
margin-top: 28rpx;
|
margin-top: 28rpx;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 镇街公司 -->
|
<!-- 镇街公司 -->
|
||||||
<view v-if='company_type==16'>
|
<view v-if='company_type==41'>
|
||||||
|
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text>可监管车辆数量 {{datas.monitor_num}}</text>
|
<text>可监管车辆数量 {{datas.monitor_num}}</text>
|
||||||
@ -397,6 +397,8 @@
|
|||||||
res.data.apply.length >= 2 ? this.applicationList = res.data.apply : this.applicationList =
|
res.data.apply.length >= 2 ? this.applicationList = res.data.apply : this.applicationList =
|
||||||
res.data.apply.slice(0, 2)
|
res.data.apply.slice(0, 2)
|
||||||
this.dataList = res.data.car_list
|
this.dataList = res.data.car_list
|
||||||
|
|
||||||
|
|
||||||
this.showLoading = false
|
this.showLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
<view class="file">
|
<view class="file">
|
||||||
<view class="file_item" v-for="(item, index) in study_photo" :key="'file'+index">
|
<view class="file_item" v-for="(item, index) in study_photo" :key="'file'+index">
|
||||||
<image class="image" :src="item" @click="priview(index)"></image>
|
<image class="image" :src="item" @click="priview(index)"></image>
|
||||||
<image v-if="taskInfo.status==2" class="del" src="/static/icons/delete.png" @click.stop="deleteFile(index)">
|
<image v-if="taskInfo.status==2" class="del" src="/static/icons/delete.png"
|
||||||
|
@click.stop="deleteFile(index)">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="taskInfo.status==2" class="file_btn" @click="chooseFile">
|
<view v-if="taskInfo.status==2" class="file_btn" @click="chooseFile">
|
||||||
@ -27,11 +28,12 @@
|
|||||||
<view class="file">
|
<view class="file">
|
||||||
<view v-if="sign_in_table" class="file_item">
|
<view v-if="sign_in_table" class="file_item">
|
||||||
<image class="image" :src="sign_in_table" @click="priviewOne(index)"></image>
|
<image class="image" :src="sign_in_table" @click="priviewOne(index)"></image>
|
||||||
<image v-if="taskInfo.status==2 && other.is_commit==0" class="del" src="/static/icons/delete.png"
|
<image v-if="taskInfo.status==2 && other.is_commit==0" class="del"
|
||||||
@click.stop="deleteFile(index, 'sign_in_table')">
|
src="/static/icons/delete.png" @click.stop="deleteFile(index, 'sign_in_table')">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="taskInfo.status==2 && other.is_commit==0 && !sign_in_table" class="file_btn" @click="chooseOneFile">
|
<view v-if="taskInfo.status==2 && other.is_commit==0 && !sign_in_table" class="file_btn"
|
||||||
|
@click="chooseOneFile">
|
||||||
<image src="/static/icons/plus.png"></image>
|
<image src="/static/icons/plus.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="file_empty"></view>
|
<view class="file_empty"></view>
|
||||||
@ -45,8 +47,10 @@
|
|||||||
style="font-size: 28rpx;background-color: #eee;min-height: 100px;padding-bottom: 50rpx;"></u--textarea>
|
style="font-size: 28rpx;background-color: #eee;min-height: 100px;padding-bottom: 50rpx;"></u--textarea>
|
||||||
</view>
|
</view>
|
||||||
<mybtn v-if="taskInfo.status==2" text="确认提交" @click="$u.throttle(submit, 1500)"></mybtn>
|
<mybtn v-if="taskInfo.status==2" text="确认提交" @click="$u.throttle(submit, 1500)"></mybtn>
|
||||||
<mybtn v-else-if="taskInfo.status==3" text="已完成" :my_btn_disabled="true" @click="showToast('任务已完成')"></mybtn>
|
<mybtn v-else-if="taskInfo.status==3" text="已完成" :my_btn_disabled="true" @click="showToast('任务已完成')">
|
||||||
<mybtn v-else-if="taskInfo.status==5" text="已关闭" :my_btn_disabled="true" @click="showToast('任务已关闭!')"></mybtn>
|
</mybtn>
|
||||||
|
<mybtn v-else-if="taskInfo.status==5" text="已关闭" :my_btn_disabled="true" @click="showToast('任务已关闭!')">
|
||||||
|
</mybtn>
|
||||||
<!-- <mybtn v-else-if="approve_status==3" text="已驳回,请重新提交" @click="toUpdate"></mybtn> -->
|
<!-- <mybtn v-else-if="approve_status==3" text="已驳回,请重新提交" @click="toUpdate"></mybtn> -->
|
||||||
<mybtn v-else text="已提交,请等待审核" :my_btn_disabled="true" @click="showToast('请耐心等待审核结果')"></mybtn>
|
<mybtn v-else text="已提交,请等待审核" :my_btn_disabled="true" @click="showToast('请耐心等待审核结果')"></mybtn>
|
||||||
</block>
|
</block>
|
||||||
@ -57,8 +61,13 @@
|
|||||||
import {
|
import {
|
||||||
upLoadImage,
|
upLoadImage,
|
||||||
} from "@/api/file.js";
|
} from "@/api/file.js";
|
||||||
import { Toast } from "../../libs/uniApi";
|
import {
|
||||||
import { townTaskDetails, serviceTask4Commit } from "@/api/task.js"
|
Toast
|
||||||
|
} from "../../libs/uniApi";
|
||||||
|
import {
|
||||||
|
townTaskDetails,
|
||||||
|
serviceTask4Commit
|
||||||
|
} from "@/api/task.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -89,7 +98,8 @@
|
|||||||
computed: {
|
computed: {
|
||||||
// 占位长度
|
// 占位长度
|
||||||
placeholderLength() {
|
placeholderLength() {
|
||||||
if (this.taskInfo.status!=2) return this.study_photo.length % 3 == 0 ? 0 : 3 - this.study_photo.length % 3;
|
if (this.taskInfo.status != 2) return this.study_photo.length % 3 == 0 ? 0 : 3 - this.study_photo.length %
|
||||||
|
3;
|
||||||
return (this.study_photo.length + 1) % 3 == 0 ? 0 : 3 - (this.study_photo.length + 1) % 3;
|
return (this.study_photo.length + 1) % 3 == 0 ? 0 : 3 - (this.study_photo.length + 1) % 3;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -102,7 +112,8 @@
|
|||||||
this.taskInfo = res.data;
|
this.taskInfo = res.data;
|
||||||
this.sign_in_table = this.taskInfo?.extend?.town_task_type_4?.sign_in_table;
|
this.sign_in_table = this.taskInfo?.extend?.town_task_type_4?.sign_in_table;
|
||||||
this.study_content = this.taskInfo?.extend?.town_task_type_4?.study_content;
|
this.study_content = this.taskInfo?.extend?.town_task_type_4?.study_content;
|
||||||
this.study_photo = JSON.parse(JSON.stringify(this.taskInfo?.extend?.town_task_type_4?.study_photo || []));
|
this.study_photo = JSON.parse(JSON.stringify(this.taskInfo?.extend?.town_task_type_4?.study_photo ||
|
||||||
|
[]));
|
||||||
this.skeleton = false;
|
this.skeleton = false;
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
@ -119,7 +130,7 @@
|
|||||||
this.other.is_commit = 1;
|
this.other.is_commit = 1;
|
||||||
// this.taskInfo.approve_status = 1;
|
// this.taskInfo.approve_status = 1;
|
||||||
Toast('提交成功');
|
Toast('提交成功');
|
||||||
this.$u.sleep(500).then(()=>{
|
this.$u.sleep(500).then(() => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -268,7 +279,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading{
|
.loading {
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user