| | |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">任务管理</block> |
| | | <block slot="content">已办</block> |
| | | </cu-custom> |
| | | |
| | | <view style="width: 100%;"> |
| | |
| | | |
| | | <view class="container"> |
| | | |
| | | <uni-badge absolute="rightTop" :offset="[-30, 15]" :text="msg1Count" type="error" /> |
| | | |
| | | <uni-badge absolute="rightTop" :offset="[-270, 15]" :text="msg2Count" type="error" /> |
| | | |
| | | <view class="solid-bottom"> |
| | | <scroll-view scroll-x class="nav text-center "> |
| | | <view class="flex text-center justify-around"> |
| | | <view class="cu-item" :class="item.value==TabCur?'text-blue cur':''" |
| | | v-for="(item,index) in tabs" :key="index" @tap="tabSelect" :data-id="item.value"> |
| | | {{item.title}} |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <mescroll-uni ref="mescrollRef" @init="mescrollInit" :top="top" @down="downCallback" @up="upCallback"> |
| | | <!-- 列表信息开始 --> |
| | | <view class="content"> |
| | | <uni-card margin="10px" spacing="1px" v-for="(item,index) in msgList" :key="index" |
| | | @click="onClickProductionTask(item)"> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">任务名称:</view> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">流程名称:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.partName}} |
| | | {{item.procDefName}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">任务类型:</view> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">流程描述:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.taskType}} |
| | | {{item.description}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">优先级:</view> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">流程发起人:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | {{item.priority}} |
| | | {{item.startUserName}} |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">责任人:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | {{item.ssignee}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">任务描述:</view> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">任务名称:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.taskDesc}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">完成时间:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.dueaDate}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">状态:</view> |
| | | <view |
| | | class="flex-sub bg-white padding-xs margin-xs text-bold text-green radius text-right" |
| | | v-if="item.status == '1'"> |
| | | 待处理 |
| | | </view> |
| | | <view |
| | | class="flex-sub bg-white padding-xs margin-xs text-bold text-green radius text-right" |
| | | v-if="item.status == '3'"> |
| | | 已完成 |
| | | {{item.taskName}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | |
| | | </mescroll-uni> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | const tabs = [{ |
| | | title: '待办', |
| | | value: 0 |
| | | }, { |
| | | title: '已办', |
| | | value: 1 |
| | | }]; |
| | | import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; |
| | | export default { |
| | | mixins: [MescrollMixin], // 使用mixin |
| | | data() { |
| | | return { |
| | | TabCur: 0, |
| | | type: 'top', |
| | | scrollLeft:0, |
| | | scrollLeft: 0, |
| | | formData: { |
| | | num: '', |
| | | partNumNameModel: '' |
| | | }, |
| | | NavBarColor: this.NavBarColor, |
| | | tabs, |
| | | current: 0, |
| | | colorIndex: 0, |
| | | activeColor: '#5277A6', |
| | | url: { |
| | | |
| | | stallList: "/mom/partTakeRollingDetail/list" |
| | | stallList: "assign/flow/finishedList" |
| | | }, |
| | | |
| | | upOption: { |
| | |
| | | color: '#2979FF', |
| | | borderColor: '#2979FF' |
| | | }, |
| | | msgList: [{ |
| | | partName: "设备A", |
| | | taskType: "维护", |
| | | taskDesc: "定期检查", |
| | | priority: "高", |
| | | dueaDate: "2023-10-10", |
| | | ssignee: "张三", |
| | | status: 1 |
| | | }], //列表数据 |
| | | msgList: [], //列表数据 |
| | | announcement1: [], |
| | | msg1Count: 0, |
| | | msg2Count: 0, |
| | |
| | | |
| | | created() {}, |
| | | methods: { |
| | | |
| | | |
| | | /** |
| | | * @param {Object} item |
| | | * 详情页面 |
| | | */ |
| | | // onClickProductionTask(item) { |
| | | // let keyword = this.TabCur |
| | | // uni.navigateTo({ |
| | | // url: '/pages/mes/om/workSheetOpToolingBorrowDeils/workSheetOpToolingBorrowDeils?keyword=' + keyword |
| | | // }) |
| | | onClickProductionTask(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/TaskManager/TaskManagerDeils/TaskManagerDeils?item=' + |
| | | encodeURIComponent(JSON.stringify(item)) |
| | | |
| | | // }, |
| | | tabSelect(e) { |
| | | this.TabCur = e.currentTarget.dataset.id; |
| | | this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60; |
| | | this.msgList = [] // 先置空列表,显示加载进度 |
| | | this.mescroll.resetUpScroll() // 再刷新列表数据 |
| | | }) |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | ListTouchStart(e) { |
| | | this.listTouchStart = e.touches[0].pageX |
| | | }, |
| | | |
| | | // ListTouch计算方向 |
| | | ListTouchMove(e) { |
| | | this.listTouchDirection = e.touches[0].pageX - this.listTouchStart > 0 ? 'right' : 'left' |
| | | }, |
| | | |
| | | // ListTouch计算滚动 |
| | | ListTouchEnd(e) { |
| | | if (this.listTouchDirection == 'left') { |
| | | this.modalName = e.currentTarget.dataset.target |
| | | } else { |
| | | this.modalName = null |
| | | } |
| | | this.listTouchDirection = null |
| | | }, |
| | | |
| | | |
| | | search() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | |
| | | |
| | | // upCallback(page) { |
| | | // let keyword = this.TabCur |
| | | // if (keyword == 0) { |
| | | |
| | | // this.$http.get(this.url.stallList, { |
| | | // params: { |
| | | // pageNo: page.num, |
| | | // pageSize: page.size, |
| | | // order: 'asc', |
| | | // column: 'createTime', |
| | | // status: 1 |
| | | // }, |
| | | upCallback(page) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: page.num, |
| | | pageSize: page.size |
| | | }, |
| | | |
| | | // }).then(res => { |
| | | // this.announcement1 = res.data.result.records |
| | | // this.mescroll.endSuccess(this.announcement1.length); |
| | | // console.log("url", res) |
| | | // //设置列表数据 |
| | | // if (res.data.success) { |
| | | // console.log("res", res.data) |
| | | // this.msg1Count = res.data.result.total |
| | | // this.msg1Title = "通知(" + res.data.result.total + ")"; |
| | | // for (let annItem of this.announcement1) { |
| | | // this.msgList.push(annItem) |
| | | // } |
| | | // } |
| | | // if (page.num == 1) { |
| | | // this.msgList = []; //如果是第一页需手动制空列表 |
| | | // this.msgList = this.msgList.concat(this.announcement1); //追加新数据 |
| | | // } |
| | | }).then(res => { |
| | | this.announcement1 = res.data.result.records |
| | | this.mescroll.endSuccess(this.announcement1.length); |
| | | console.log("url", res) |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | console.log("res", res.data) |
| | | this.msg1Count = res.data.result.total |
| | | this.msg1Title = "通知(" + res.data.result.total + ")"; |
| | | for (let annItem of this.announcement1) { |
| | | this.msgList.push(annItem) |
| | | } |
| | | } |
| | | if (page.num == 1) { |
| | | this.msgList = []; //如果是第一页需手动制空列表 |
| | | this.msgList = this.msgList.concat(this.announcement1); //追加新数据 |
| | | } |
| | | |
| | | // }).catch(() => { |
| | | // //联网失败, 结束加载 |
| | | // this.mescroll.endErr(); |
| | | // }) |
| | | // } else if (keyword == 1) { |
| | | |
| | | // this.$http.get(this.url.stallList, { |
| | | // params: { |
| | | // pageNo: page.num, |
| | | // pageSize: page.size, |
| | | // order: 'desc', |
| | | // status: 3, |
| | | // column: 'createTime' |
| | | // }, |
| | | |
| | | // }).then(res => { |
| | | // this.announcement1 = res.data.result.records |
| | | // this.mescroll.endSuccess(this.announcement1.length); |
| | | // console.log("url", res) |
| | | // //设置列表数据 |
| | | // if (res.data.success) { |
| | | // console.log("res", res.data) |
| | | // this.msg2Count = res.data.result.total |
| | | // this.msg1Title = "通知(" + res.data.result.total + ")"; |
| | | // for (let annItem of this.announcement1) { |
| | | // this.msgList.push(annItem) |
| | | // } |
| | | // } |
| | | // if (page.num == 1) { |
| | | // this.msgList = []; //如果是第一页需手动制空列表 |
| | | // this.msgList = this.msgList.concat(this.announcement1); //追加新数据 |
| | | // } |
| | | |
| | | // }).catch(() => { |
| | | // //联网失败, 结束加载 |
| | | // this.mescroll.endErr(); |
| | | // }) |
| | | |
| | | // } |
| | | |
| | | |
| | | // }, |
| | | }).catch(() => { |
| | | //联网失败, 结束加载 |
| | | this.mescroll.endErr(); |
| | | }) |
| | | }, |
| | | |
| | | |
| | | resetTask() { |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | .is-hover { |
| | | color: rgba(255, 255, 255, 0.6); |
| | | background-color: #55aaff; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | .content { |
| | | margin-top: 5px; |
| | | } |