对接法规清单表头设置

This commit is contained in:
范强强
2023-03-24 10:04:05 +08:00
parent ee8540b5b6
commit 90a73a6ddc
@@ -331,7 +331,8 @@
</span>
<span slot="designFlowStatusName" slot-scope="text,result">
<span v-if="result.designFlowStatus == 'List to be released' ||
result.designFlowStatus == 'List to be checked'">
result.designFlowStatus == 'List to be checked'"
:title="text">
{{text}}
</span>
<a v-else @click="designFlowStatusClick(result,$t('designComplianceReview'))"
@@ -339,7 +340,8 @@
</span>
<span slot="verifyFlowStatusName" slot-scope="text,result">
<span v-if="result.verifyFlowStatus == 'List to be released' ||
result.verifyFlowStatus == 'List to be checked'">
result.verifyFlowStatus == 'List to be checked'"
:title="text">
{{text}}
</span>
<a v-else @click="designFlowStatusClick(result,$t('verificationComplianceReview'))"
@@ -731,7 +733,7 @@
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 200,
width: 260,
scopedSlots: { customRender: 'operation' }
}
],
@@ -906,7 +908,7 @@
name: this.$t('confirmationOfDesignConformity') + '/' + this.$t('personLiable'),
headFieldCn: '责任人',
headFieldEn: 'Assignee',
field: 'designDutyName',
field: 'designDutyIdName',
affirmFlag: '1',
key: 22,
moduleFlag: '法规清单'
@@ -937,7 +939,7 @@
headFieldCn: '交付物模板',
headFieldEn: 'Deliverable Template',
field: 'designDeliverableTemplate',
affirmFlag: '3',
affirmFlag: '1',
key: 25,
moduleFlag: '法规清单'
},
@@ -946,7 +948,7 @@
name: this.$t('verificationAndConformityconfirmation') + '/' + this.$t('personLiable'),
headFieldCn: '责任人',
headFieldEn: 'Assignee',
field: 'verifyDutyName',
field: 'verifyDutyIdName',
affirmFlag: '3',
key: 32,
moduleFlag: '法规清单'
@@ -1876,88 +1878,6 @@
this.getList()
},
getHeader() {
getAction('head/headCustomEO/list', {
moduleFlag: '法规清单'
}).then((res) => {
if (res.success) {
this.columnsAll = this.column
this.columnsAll.forEach((item) => {
if (item.children) {
item.children.forEach((val) => {
this.checkedList.push(item.dataIndex, val.dataIndex)
})
} else {
this.checkedList.push(item.dataIndex)
}
})
return
if (res.result.length != 0) {
this.columnsAll = res.result
} else {
this.columnsAll = this.column
}
this.columnsAll.forEach((item, index) => {
if (item.title != '设计符合性确认' && item.title != 'Pre-Homo确认' && item.title != '验证符合性确认' && item.title != '操作') {
item.width = 180
item.align = 'left'
if (item.title == '编号') {
item.sorter = true
item.scopedSlots = {
customRender: 'standard'
}
} else if (item.title == '标题') {
item.scopedSlots = {
customRender: 'titleName'
}
} else if (item.title == '清单确认状态' || item.title == '任务确认状态' || item.title == '认证级别' || item.title == 'WVTA ID' ||
item.title == '责任领域' || item.title == '法规工程师' || item.title == '认证工程师' || item.title == '工程接口人') {
item.sorter = true
}
} else {
delete item.dataIndex
delete item.fixed
item.children.forEach((val, index) => {
val.width = 180
val.align = 'left'
val.ellipsis = true
})
}
})
if (res.result.length != 0) {
this.columnsAll.push({
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 200,
scopedSlots: { customRender: 'operation' }
},
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 140,
scopedSlots: { customRender: 'operationOne' }
})
}
this.columnsAll.forEach((item) => {
if (item.children) {
item.children.forEach((val) => {
this.checkedList.push(item.dataIndex, val.dataIndex)
})
} else {
this.checkedList.push(item.dataIndex)
}
})
this.loading = false
this.JLoading = false
} else {
this.JLoading = false
this.loading = false
}
})
},
getList() {
let roleCode = this.roleSwitchingCode
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
@@ -2015,7 +1935,8 @@
},
onCheckAllChange(e) {
this.checkedList = e.target.checked ? this.customizeList.map(item => item.field) : []
let selectedValue = ['serialNumber', 'title', 'operation']
this.checkedList = e.target.checked ? this.customizeList.map(item => item.field) : selectedValue
this.selectedValue = this.checkedList
this.indeterminate = false
},
@@ -2028,6 +1949,71 @@
cancel() {
this.customizevisible = false
},
getHeader() {
getAction('head/headCustomEO/list', {
moduleFlag: '法规清单'
}).then((res) => {
if (res.success) {
this.columnsAll = res.result
for (let j = 0; j < this.columnsAll.length; j++) {
for (let i = 0; i < this.column.length; i++) {
if (this.columnsAll[j].title == this.$t('confirmationOfDesignConformity')) {
if (this.column[i].title == this.$t('confirmationOfDesignConformity')) {
if (this.columnsAll[j].children && this.columnsAll[j].children.length > 0) {
for (let k = 0; k < this.columnsAll[j].children.length; k++) {
for (let l = 0; l < this.column[i].children.length; l++) {
if (this.columnsAll[j].children[k].title == this.column[i].children[l].title) {
this.columnsAll[j].children[k] = this.column[i].children[l]
}
}
}
}
}
} else if (this.columnsAll[j].title == this.$t('verificationAndConformityconfirmation')) {
if (this.column[i].title == this.$t('verificationAndConformityconfirmation')) {
if (this.columnsAll[j].children && this.columnsAll[j].children.length > 0) {
for (let k = 0; k < this.columnsAll[j].children.length; k++) {
for (let l = 0; l < this.column[i].children.length; l++) {
if (this.columnsAll[j].children[k].title == this.column[i].children[l].title) {
this.columnsAll[j].children[k] = this.column[i].children[l]
}
}
}
}
}
} else {
if (this.column[i].dataIndex == this.columnsAll[j].dataIndex) {
this.columnsAll[j] = this.column[i]
}
}
}
}
this.columnsAll.push({
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 260,
scopedSlots: { customRender: 'operation' }
})
this.columnsAll.forEach((item) => {
if (item.children) {
item.children.forEach((val) => {
this.checkedList.push(item.dataIndex, val.dataIndex)
})
} else {
this.checkedList.push(item.dataIndex)
}
})
this.loading = false
this.JLoading = false
} else {
this.JLoading = false
this.loading = false
}
})
},
handleSubmit() {
let list = []
let uniqueArray = this.selectedValue.filter((item, index, array) => {