|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="page-css"> |
|
|
|
|
<view class="page-search-top"> |
|
|
|
|
<betone-new-input v-model="searchInfo.requirementCode" placeholder='搜索巡检单单号' icon="search" |
|
|
|
|
<betone-new-input v-model="searchInfo.requirementCode" placeholder='搜索巡检单位名称' icon="search" |
|
|
|
|
style="margin-bottom: 32rpx" @changevalue="searchData()" /> |
|
|
|
|
<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="changeTab" |
|
|
|
|
bg-color="rgba(248, 248, 248, 1)"></u-tabs> |
|
|
|
|
@ -12,8 +12,8 @@ |
|
|
|
|
<view class="item-top"> |
|
|
|
|
|
|
|
|
|
<view class="item-left"> |
|
|
|
|
<text class="item-orderNo">{{ item.unitName }}</text> |
|
|
|
|
<text class="item-time"> 单号:{{ item.inspectionNo }}</text> |
|
|
|
|
<text class="item-orderNo">单位</text> |
|
|
|
|
<text class="item-time"> {{ item.deptName }}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="item-right"> |
|
|
|
|
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle" |
|
|
|
|
@ -22,24 +22,25 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="item-con"> |
|
|
|
|
<view class="con-right"> |
|
|
|
|
<text class="con-title">提报类型:{{ item.faultType }}</text> |
|
|
|
|
<text class="con-title">巡检项目名称:{{ item.inspectionName }}</text> |
|
|
|
|
<text class="con-title">项目地址:{{ item.projectAddr }}</text> |
|
|
|
|
<text class="con-title">巡检周期:{{ item.cycle }}</text> |
|
|
|
|
<text class="con-title">巡检时间:{{ item.startTime }}-{{ item.nextDate }} </text> |
|
|
|
|
|
|
|
|
|
<!-- <view class="con-btn"> |
|
|
|
|
|
|
|
|
|
</view> --> |
|
|
|
|
<text class="con-title">巡检标题:{{ item.planContent }}</text> |
|
|
|
|
<text class="con-title">创建时间:{{ item.createTime }}</text> |
|
|
|
|
|
|
|
|
|
<view class="con-btn"> |
|
|
|
|
<block v-if="item.status == 0 && dataTypes == 3"> |
|
|
|
|
<u-button size="mini" plain style="margin-right: 32rpx" |
|
|
|
|
@click="assign(item)">指派</u-button> |
|
|
|
|
</block> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<betone-loading ref="BetLoading" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 分派人员--> |
|
|
|
|
<u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm" :isShowsearch="true" |
|
|
|
|
value-name="id" title="选择维修人员"></u-select> |
|
|
|
|
|
|
|
|
|
<betone-loading ref="BetLoading" /> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
@ -74,14 +75,27 @@ export default { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
current: 0, |
|
|
|
|
|
|
|
|
|
loadingState: "loadmore", |
|
|
|
|
isNomore: false, |
|
|
|
|
noDataFlag: false, |
|
|
|
|
page: { |
|
|
|
|
currentPage: 1, |
|
|
|
|
pageSize: 10, |
|
|
|
|
}, |
|
|
|
|
orderData: [], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sendOrder: { |
|
|
|
|
repairPerson: '',//维修人员 id |
|
|
|
|
name: '',//维修人员名字 |
|
|
|
|
}, |
|
|
|
|
sendOrdersShow: false,//派单弹框 |
|
|
|
|
sendOrdersList: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
|
|
|
|
|
noData() { |
|
|
|
|
return this.orderData && this.orderData.length == 0; |
|
|
|
|
}, |
|
|
|
|
dataTypes() { |
|
|
|
|
return this.$store.state.dataType |
|
|
|
|
}, |
|
|
|
|
@ -90,82 +104,51 @@ export default { |
|
|
|
|
mounted() { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.getRecordsList() |
|
|
|
|
|
|
|
|
|
this.getRepairPersons() |
|
|
|
|
// 触底触发 |
|
|
|
|
uni.$on('onReachBottom', () => { |
|
|
|
|
if (this.isNomore) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.page.currentPage++; |
|
|
|
|
this.getRecordsList(); |
|
|
|
|
}) |
|
|
|
|
// 下拉刷新 |
|
|
|
|
uni.$on('onPullDownRefresh', () => { |
|
|
|
|
this.isNomore = false |
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.getRecordsList(); |
|
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取列表 |
|
|
|
|
getRecordsList() { |
|
|
|
|
|
|
|
|
|
//this.BetLoading.show(); |
|
|
|
|
|
|
|
|
|
// this.$u.api.getDictionaryList().then(res => { |
|
|
|
|
// if (res.code == 200) { |
|
|
|
|
this.BetLoading.show(); |
|
|
|
|
|
|
|
|
|
this.$u.api.getDictionaryList().then(res => { |
|
|
|
|
var totalPage = res.data.total; |
|
|
|
|
var newOrders = res.data.records; |
|
|
|
|
if (this.page.currentPage == 1) { |
|
|
|
|
this.orderData = []; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// this.orderData = res.data; |
|
|
|
|
this.orderData = [...this.orderData, ...(res.data.records || [])]; |
|
|
|
|
if (newOrders.length == 0) { |
|
|
|
|
this.loadingState = "nomore"; |
|
|
|
|
this.isNomore = true; |
|
|
|
|
} |
|
|
|
|
if (totalPage == this.orderData.length) { |
|
|
|
|
this.loadingState = "nomore"; |
|
|
|
|
this.isNomore = true; |
|
|
|
|
} |
|
|
|
|
this.BetLoading.hide(); |
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
|
|
// this.BetLoading.hide(); |
|
|
|
|
// } |
|
|
|
|
// }).catch(err => { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// }) |
|
|
|
|
this.orderData = [ |
|
|
|
|
{ |
|
|
|
|
inspectionNo: 'WX-20240820-01', |
|
|
|
|
unitName: '济南安池实验室', |
|
|
|
|
inspectionName: '实验室设备巡检', |
|
|
|
|
projectAddr: '济南市钢城区', |
|
|
|
|
team: '巡检班组一,巡检班组二', |
|
|
|
|
startTime: '2024-05-21', |
|
|
|
|
cycle: '季度', |
|
|
|
|
nextDate: '2024-07-21', |
|
|
|
|
status: 0, |
|
|
|
|
tableData: [ |
|
|
|
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求1' }, |
|
|
|
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
|
|
|
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
|
|
|
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
|
|
|
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
inspectionNo: 'WX-20240820-01', |
|
|
|
|
unitName: '济南安池实验室', |
|
|
|
|
inspectionName: '实验室设备巡检', |
|
|
|
|
projectAddr: '济南市钢城区', |
|
|
|
|
team: '巡检班组一,巡检班组二', |
|
|
|
|
startTime: '2024-09-21', |
|
|
|
|
cycle: '季度', |
|
|
|
|
nextDate: '2024-12-21', |
|
|
|
|
status: 1, |
|
|
|
|
tableData: [ |
|
|
|
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求1' }, |
|
|
|
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
|
|
|
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
|
|
|
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
|
|
|
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
inspectionNo: 'WX-20240820-01', |
|
|
|
|
unitName: '济南安池实验室', |
|
|
|
|
inspectionName: '实验室设备巡检', |
|
|
|
|
projectAddr: '济南市钢城区', |
|
|
|
|
team: '巡检班组一,巡检班组二', |
|
|
|
|
startTime: '2024-09-21', |
|
|
|
|
cycle: '季度', |
|
|
|
|
nextDate: '2024-12-21', |
|
|
|
|
status: 1, |
|
|
|
|
tableData: [ |
|
|
|
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求1' }, |
|
|
|
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
|
|
|
|
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' }, |
|
|
|
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
|
|
|
|
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
// 搜索 单号 |
|
|
|
|
searchData() { |
|
|
|
|
@ -189,52 +172,45 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 获取状态信息 |
|
|
|
|
statusName(item) { |
|
|
|
|
if (item == 0) { |
|
|
|
|
if (item == 1) { |
|
|
|
|
return '停用' |
|
|
|
|
} |
|
|
|
|
if (item == 1) { |
|
|
|
|
if (item == 0) { |
|
|
|
|
return '启用' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 跳转详情 |
|
|
|
|
goPage(item, type) { |
|
|
|
|
if (type == 'details') { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: "/pages/submission/recordsdetails?id=" + item.id, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (type == 'breakdownView') { |
|
|
|
|
let param = { |
|
|
|
|
id: item.id, |
|
|
|
|
type: type |
|
|
|
|
} |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (type == 'breakdownUpdate') { |
|
|
|
|
let param = { |
|
|
|
|
id: item.id, |
|
|
|
|
type: type |
|
|
|
|
// 指派 |
|
|
|
|
assign(item) { |
|
|
|
|
this.rowInfo = item |
|
|
|
|
this.sendOrdersShow = true |
|
|
|
|
}, |
|
|
|
|
// 维修人员 |
|
|
|
|
getRepairPersons() { |
|
|
|
|
this.$u.api.getRepairPersons().then(res => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
let data_ = res.data |
|
|
|
|
data_.forEach(i => { |
|
|
|
|
this.sendOrdersList.push({ ...i, label: i.name }) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`, |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 确认指派人员 |
|
|
|
|
sendOrdersConfirm(e) { |
|
|
|
|
let query = { |
|
|
|
|
servicemanId: e[0].value, |
|
|
|
|
id: this.rowInfo.id |
|
|
|
|
} |
|
|
|
|
if (type == 'evaluate') { |
|
|
|
|
let param = { |
|
|
|
|
id: item.id, |
|
|
|
|
this.$u.api.taskSupervisorconfirm(query).then(res => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
uni.showToast({ title: "指派成功", icon: "none" }); |
|
|
|
|
this.sendOrdersShow = false |
|
|
|
|
// 指派成功 刷新列表 |
|
|
|
|
this.getRecordsList() |
|
|
|
|
} |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: `/pages/submission/evaluate${this.$u.queryParams(param)}`, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|