|
@@ -75,9 +75,10 @@
|
|
<view class="ellipsis-description" style="font-size: 20px">
|
|
<view class="ellipsis-description" style="font-size: 20px">
|
|
<span style="margin-right: 10px;">
|
|
<span style="margin-right: 10px;">
|
|
<span class="cuIcon-title" style="color: #f67e1f;margin-right: 5px;"></span>
|
|
<span class="cuIcon-title" style="color: #f67e1f;margin-right: 5px;"></span>
|
|
- <span v-if="userInfo.roleNames == '过磅专员' " style="font-weight: bold">过磅记录</span>
|
|
|
|
- <span v-if="userInfo.roleNames == '村负责人' " style="font-weight: bold">清运记录</span>
|
|
|
|
- <span v-if="userInfo.roleNames == '巡视员' || userInfo.roleNames == '乡镇巡查员' " style="font-weight: bold">垃圾巡视</span>
|
|
|
|
|
|
+ <span v-if="userInfo.roleNames === '过磅专员' " style="font-weight: bold">过磅记录</span>
|
|
|
|
+ <span v-if="userInfo.roleNames === '村负责人' " style="font-weight: bold">清运记录</span>
|
|
|
|
+ <span v-if="userInfo.roleNames === '巡视员' || userInfo.roleNames === '乡镇巡查员' " style="font-weight: bold">垃圾巡视</span>
|
|
|
|
+ <span v-if="userInfo.roleNames === '乡镇负责人' " style="font-weight: bold">清运记录</span>
|
|
</span>
|
|
</span>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -331,6 +332,7 @@
|
|
backgroundImage: 'linear-gradient(to right, #3cb54b 0%, #88c546 100%)'
|
|
backgroundImage: 'linear-gradient(to right, #3cb54b 0%, #88c546 100%)'
|
|
};
|
|
};
|
|
case '村负责人':
|
|
case '村负责人':
|
|
|
|
+ case '乡镇负责人':
|
|
return {
|
|
return {
|
|
height: '130px',
|
|
height: '130px',
|
|
borderRadius: '15px',
|
|
borderRadius: '15px',
|
|
@@ -427,6 +429,7 @@
|
|
},
|
|
},
|
|
// 跳转到详细页面
|
|
// 跳转到详细页面
|
|
toDetail (row) {
|
|
toDetail (row) {
|
|
|
|
+ console.log('row',row)
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
taskDefKey: row.taskDefinitionKey,
|
|
taskDefKey: row.taskDefinitionKey,
|
|
procInsId: row.processInstanceId,
|
|
procInsId: row.processInstanceId,
|
|
@@ -510,8 +513,7 @@
|
|
},
|
|
},
|
|
//已办数据
|
|
//已办数据
|
|
async haveDone() {
|
|
async haveDone() {
|
|
-
|
|
|
|
- if(this.showType === 'task'){
|
|
|
|
|
|
+ if (this.showType === 'task') {
|
|
this.dataList = [];
|
|
this.dataList = [];
|
|
this.showType = 'history';
|
|
this.showType = 'history';
|
|
this.tablePage.currentPage = 0;
|
|
this.tablePage.currentPage = 0;
|
|
@@ -528,18 +530,18 @@
|
|
...this.searchForm
|
|
...this.searchForm
|
|
});
|
|
});
|
|
|
|
|
|
- // 使用 for...of 和 await 来处理异步操作
|
|
|
|
- var procInsIdList = []
|
|
|
|
|
|
+ var procInsIdList = [];
|
|
for (const value of data.records) {
|
|
for (const value of data.records) {
|
|
- if('垃圾处理流程' === value.processDefinitionName && '1' === value.vars.disposeType ){
|
|
|
|
- procInsIdList.push(value.processInstanceId)
|
|
|
|
|
|
+ if ('垃圾处理流程' === value.processDefinitionName && '1' === value.vars.disposeType) {
|
|
|
|
+ procInsIdList.push(value.processInstanceId);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(procInsIdList){
|
|
|
|
|
|
+
|
|
|
|
+ if (procInsIdList.length > 0) {
|
|
const rubbishStationList = await disposeRubbishService.getByProcInsId(procInsIdList);
|
|
const rubbishStationList = await disposeRubbishService.getByProcInsId(procInsIdList);
|
|
for (const rubbishStation of rubbishStationList) {
|
|
for (const rubbishStation of rubbishStationList) {
|
|
for (const value of data.records) {
|
|
for (const value of data.records) {
|
|
- if(value.processInstanceId === rubbishStation.procInsId){
|
|
|
|
|
|
+ if (value.processInstanceId === rubbishStation.procInsId) {
|
|
value.weight = rubbishStation.weight;
|
|
value.weight = rubbishStation.weight;
|
|
value.transportMileage = rubbishStation.transportMileage;
|
|
value.transportMileage = rubbishStation.transportMileage;
|
|
value.subsidy = rubbishStation.subsidy;
|
|
value.subsidy = rubbishStation.subsidy;
|
|
@@ -549,14 +551,18 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- this.dataList = this.dataList.concat(data.records);
|
|
|
|
|
|
+ // 过滤重复数据
|
|
|
|
+ this.dataList = [
|
|
|
|
+ ...this.dataList,
|
|
|
|
+ ...data.records.filter(record => !this.dataList.some(existingRecord => existingRecord.processInstanceId === record.processInstanceId))
|
|
|
|
+ ];
|
|
this.tablePage.pages = data.pages;
|
|
this.tablePage.pages = data.pages;
|
|
this.status = this.tablePage.pages <= this.tablePage.currentPage ? 'nomore' : 'loadmore';
|
|
this.status = this.tablePage.pages <= this.tablePage.currentPage ? 'nomore' : 'loadmore';
|
|
|
|
|
|
- if(this.showType === 'task'){
|
|
|
|
- this.dataList = []
|
|
|
|
|
|
+ if (this.showType === 'task') {
|
|
|
|
+ this.dataList = [];
|
|
this.tablePage.currentPage = 0;
|
|
this.tablePage.currentPage = 0;
|
|
- this.loadmore()
|
|
|
|
|
|
+ this.loadmore();
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.error('Error loading data:', error);
|
|
console.error('Error loading data:', error);
|
|
@@ -576,7 +582,7 @@
|
|
//抄送数据
|
|
//抄送数据
|
|
async flowCopyShow() {
|
|
async flowCopyShow() {
|
|
|
|
|
|
- if(this.showType === 'task'){
|
|
|
|
|
|
+ if (this.showType === 'task') {
|
|
this.dataList = [];
|
|
this.dataList = [];
|
|
this.showType = 'history';
|
|
this.showType = 'history';
|
|
this.tablePage.currentPage = 0;
|
|
this.tablePage.currentPage = 0;
|
|
@@ -593,16 +599,16 @@
|
|
...this.searchForm
|
|
...this.searchForm
|
|
});
|
|
});
|
|
|
|
|
|
- // 使用 for...of 和 await 来处理异步操作
|
|
|
|
- var procInsIdList = []
|
|
|
|
|
|
+ var procInsIdList = [];
|
|
for (const value of data.records) {
|
|
for (const value of data.records) {
|
|
- procInsIdList.push(value.processInstanceId)
|
|
|
|
|
|
+ procInsIdList.push(value.processInstanceId);
|
|
}
|
|
}
|
|
- if(procInsIdList){
|
|
|
|
|
|
+
|
|
|
|
+ if (procInsIdList.length > 0) {
|
|
const rubbishStationList = await disposeRubbishService.getByProcInsId(procInsIdList);
|
|
const rubbishStationList = await disposeRubbishService.getByProcInsId(procInsIdList);
|
|
for (const rubbishStation of rubbishStationList) {
|
|
for (const rubbishStation of rubbishStationList) {
|
|
for (const value of data.records) {
|
|
for (const value of data.records) {
|
|
- if(value.processInstanceId === rubbishStation.procInsId){
|
|
|
|
|
|
+ if (value.processInstanceId === rubbishStation.procInsId) {
|
|
value.weight = rubbishStation.weight;
|
|
value.weight = rubbishStation.weight;
|
|
value.transportMileage = rubbishStation.transportMileage;
|
|
value.transportMileage = rubbishStation.transportMileage;
|
|
value.subsidy = rubbishStation.subsidy;
|
|
value.subsidy = rubbishStation.subsidy;
|
|
@@ -612,14 +618,18 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- this.dataList = this.dataList.concat(data.records);
|
|
|
|
|
|
+ // 过滤重复数据
|
|
|
|
+ const existingIds = new Set(this.dataList.map(record => record.processInstanceId));
|
|
|
|
+ const newRecords = data.records.filter(record => !existingIds.has(record.processInstanceId));
|
|
|
|
+ this.dataList = [...this.dataList, ...newRecords];
|
|
|
|
+
|
|
this.tablePage.pages = data.pages;
|
|
this.tablePage.pages = data.pages;
|
|
this.status = this.tablePage.pages <= this.tablePage.currentPage ? 'nomore' : 'loadmore';
|
|
this.status = this.tablePage.pages <= this.tablePage.currentPage ? 'nomore' : 'loadmore';
|
|
|
|
|
|
- if(this.showType === 'task'){
|
|
|
|
- this.dataList = []
|
|
|
|
|
|
+ if (this.showType === 'task') {
|
|
|
|
+ this.dataList = [];
|
|
this.tablePage.currentPage = 0;
|
|
this.tablePage.currentPage = 0;
|
|
- this.loadmore()
|
|
|
|
|
|
+ this.loadmore();
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.error('Error loading data:', error);
|
|
console.error('Error loading data:', error);
|