|
|
@@ -219,7 +219,7 @@
|
|
|
|
|
|
</template>
|
|
|
<template v-slot:status="text, record">
|
|
|
- <a-badge :color="text | statusEscalationColor" :text="text | escalationFilter"/>
|
|
|
+ <a-badge :color="record | statusEscalationColor" :text="record | escalationFilter"/>
|
|
|
</template>
|
|
|
<template v-slot:createBy="text, record">
|
|
|
<a @click="showByCreateBy(record)">{{text}}</a>
|
|
|
@@ -487,14 +487,24 @@ export default {
|
|
|
}
|
|
|
return statusTypeMap[type]
|
|
|
},
|
|
|
- statusEscalationColor(type) {
|
|
|
- const statusTypeMap = {
|
|
|
- '2': 'green',
|
|
|
- '1': 'yellow',
|
|
|
- '0': 'gray',
|
|
|
+ statusEscalationColor(record) {
|
|
|
+ let statusTypeMap ={}
|
|
|
+ if(record.numberResults.indexOf('1')!==-1){
|
|
|
+ statusTypeMap = {
|
|
|
+ '2': 'green',
|
|
|
+ '1': 'yellow',
|
|
|
+ '0': 'green',
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ statusTypeMap = {
|
|
|
+ '2': 'green',
|
|
|
+ '1': 'yellow',
|
|
|
+ '0': 'gray',
|
|
|
+ }
|
|
|
}
|
|
|
- console.log(statusTypeMap[type])
|
|
|
- return statusTypeMap[type]
|
|
|
+
|
|
|
+
|
|
|
+ return statusTypeMap[record.status]
|
|
|
},
|
|
|
|
|
|
currentFilter(status) {
|
|
|
@@ -515,13 +525,27 @@ export default {
|
|
|
return statusTypeMap[type]
|
|
|
},
|
|
|
|
|
|
- escalationFilter(status) {
|
|
|
- const statusMap = {
|
|
|
- '0': '新建未报',
|
|
|
- '1':'已报分公司',
|
|
|
- '2': '上报成功'
|
|
|
+ escalationFilter(record) {
|
|
|
+ let statusMap ={}
|
|
|
+ if(record.numberResults.indexOf('1')!==-1){
|
|
|
+ statusMap = {
|
|
|
+ '0': '新建未报(无需上报)',
|
|
|
+ '1':'已报分公司',
|
|
|
+ '2': '上报成功'
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ statusMap = {
|
|
|
+ '0': '新建未报',
|
|
|
+ '1':'已报分公司',
|
|
|
+ '2': '上报成功'
|
|
|
+ }
|
|
|
}
|
|
|
- return statusMap[status]
|
|
|
+ // statusMap = {
|
|
|
+ // '0': '新建未报',
|
|
|
+ // '1':'已报分公司',
|
|
|
+ // '2': '上报成功'
|
|
|
+ // }
|
|
|
+ return statusMap[record.status]
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
@@ -543,6 +567,11 @@ export default {
|
|
|
if (this.selectionRows.length===0){
|
|
|
return this.$message.warning('请重新选择数据...', 3);
|
|
|
}
|
|
|
+ for (let s = 0; s < this.selectionRows.length; s++) {
|
|
|
+ if(this.selectionRows[s].numberResults.indexOf('1')!==-1){
|
|
|
+ return this.$message.warning('选中数据存在非高危数据(请重新选择)...', 3);
|
|
|
+ }
|
|
|
+ }
|
|
|
for (let i = 0; i < this.selectionRows.length; i++) {
|
|
|
if(this.selectionRows[i].status==='2'){
|
|
|
return this.$message.warning('选中数据中存在上报成功的数据...', 3);
|
|
|
@@ -830,6 +859,10 @@ export default {
|
|
|
|
|
|
},
|
|
|
showImproveAndUploadAdminCom(record,status) {
|
|
|
+
|
|
|
+ if(record.numberResults.indexOf('1')!==-1) {
|
|
|
+ return this.$message.warning('选中数据存在非高危数据(请重新选择)...', 3);
|
|
|
+ }
|
|
|
//上报分公司
|
|
|
if (record.status==='1'){
|
|
|
return this.$message.warning('上报状态为已上报分公司 请勿重复操作', 3);
|
|
|
@@ -851,6 +884,9 @@ export default {
|
|
|
},
|
|
|
showImproveAndUploadAdmin(record,status) {
|
|
|
//上报
|
|
|
+ if(record.numberResults.indexOf('1')!==-1) {
|
|
|
+ return this.$message.warning('选中数据存在非高危数据(请重新选择)...', 3);
|
|
|
+ }
|
|
|
if (record.status==='0'){
|
|
|
return this.$message.warning('上报状态为新建未报 请先进行上报分公司', 3);
|
|
|
}
|
|
|
@@ -882,6 +918,11 @@ export default {
|
|
|
this.loadData(null,queryParam);
|
|
|
},
|
|
|
showImproveAndUploadList() {
|
|
|
+ for (let s = 0; s < this.selectionRows.length; s++) {
|
|
|
+ if(this.selectionRows[s].numberResults.indexOf('1')!==-1){
|
|
|
+ return this.$message.warning('选中数据存在非高危数据(请重新选择)...', 3);
|
|
|
+ }
|
|
|
+ }
|
|
|
for (let i = 0; i < this.selectionRows.length; i++) {
|
|
|
if(this.selectionRows[i].status==='2'){
|
|
|
return this.$message.warning('选中数据中存在上报成功的数据...', 3);
|
|
|
@@ -892,11 +933,7 @@ export default {
|
|
|
return this.$message.warning('选中数据中存在新建未报的数据...', 3);
|
|
|
}
|
|
|
}
|
|
|
- for (let s = 0; s < this.selectionRows.length; s++) {
|
|
|
- if(this.selectionRows[s].numberResults.indexOf('1')!==-1){
|
|
|
- return this.$message.warning('选中数据存在非高危数据(请重新选择)...', 3);
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
let data = {
|
|
|
ids: this.selectedRowKeys,
|