未符合项新增编辑弹框修改

This commit is contained in:
zyx.net
2023-09-05 16:09:01 +08:00
parent b12a210df4
commit 1942021808
2 changed files with 102 additions and 51 deletions
@@ -136,12 +136,20 @@
<!-- </a>-->
<!-- </span>-->
<div slot="CertificationProgress" slot-scope="text,result">
<span class="box-content-Progress box-content-cou"
<span v-if="result.problemState == $t('red')" class="box-content-Progress box-content-cou nonConformityColor"
:style="{'width':long=='zh-cn'?'116px' : '148px'}"
:class="CertificationColor[result.certificationProgress]"
@click="CertificationProgressClick(result)"
>
{{result.certificationProgress_dictText ? result.certificationProgress_dictText : $t('toBeStarted')}}
{{result.problemState ? result.problemState : ''}}
</span>
<span v-if="result.problemState == $t('green')" class="box-content-Progress box-content-cou accordColor"
:style="{'width':long=='zh-cn'?'116px' : '148px'}"
>
{{result.problemState ? result.problemState : ''}}
</span>
<span v-if="result.problemState == $t('yellow')" class="box-content-Progress box-content-cou TrackedColor"
:style="{'width':long=='zh-cn'?'116px' : '148px'}"
>
{{result.problemState ? result.problemState : ''}}
</span>
</div>
<span slot="operation" slot-scope="text,record">
@@ -149,11 +157,11 @@
@click="detil(record)">
{{ $t('See') }}
</a>
<a class="text-operation"
<a class="text-operation" v-if="record.flag == 'NEW'"
@click="edit(record)">
{{ $t('edit') }}
</a>
<a class="text-operation"
<a class="text-operation" v-if="record.flag == 'NEW'"
@click="deleteLib(record)">
{{ $t('deleteLib') }}
</a>
@@ -204,11 +212,11 @@
selectedRowKeys: [],
projectNameList: [],
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
CertificationColor: {
'red': 'nonConformityColor',
'green': 'accordColor',
'yellow': 'TrackedColor',
},
// CertificationColor: {
// $t('red'): 'nonConformityColor',
// $t('green'): 'accordColor',
// $t('yellow'): 'TrackedColor',
// },
toggleSearchStatus: false,
columns: [
{
@@ -238,11 +246,10 @@
{
title: this.$t('problemType'),
align: 'left',
dataIndex: 'problemType',
dataIndex: 'problemType_dictText',
width: 170,
sorter:true,
ellipsis: true,
scopedSlots: { customRender: 'CertificationProgress' }
ellipsis: true
},
{
title: this.$t('statisticalNodes'),
@@ -266,7 +273,8 @@
dataIndex: 'problemState',
width: 120,
sorter:true,
ellipsis: true
ellipsis: true,
scopedSlots: { customRender: 'CertificationProgress' }
},
{
title: this.$t('createTime'),
@@ -424,7 +432,7 @@
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteBatch, { id: record.id }).then((res) => {
deleteAction('/project/problemManagementEO/deleteBatch', { ids: record.uuid }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
@@ -601,7 +609,40 @@
text-align: right;
margin-top: 20px;
}
.box-content-Progress {
width: 88px;
height: 32px;
display: inline-block;
text-align: center;
line-height: 32px;
border-radius: 4px;
background: #f1f3f5;
color: #919399;
}
.accordColor {
background: #dbf6e2;
color: #26BD4B;
}
.nonConformityColor {
background: #f3dddd;
color: #E83030;
}
.TrackedColor {
background: #f6ebdb;
color: #FDA71C;
}
.notInvolvedColor {
background: #eef1f4;
color: #707486;
}
.submittedColor {
color: #00B3BE;
background: #ddf3f4;
}
.textName {
width: 100%;
overflow: hidden;
@@ -386,7 +386,10 @@ export default {
formInline: {
fileLinkList:[{}],
progressTrackingList:[{}],
approvalEvidenceLinkList:[{}]
approvalEvidenceLinkList:[{}],
dutyTerritory:undefined,
projectId:undefined,
problemState:undefined,
},
formInlinetracking:{},
confirmLoading: false,
@@ -502,20 +505,27 @@ export default {
})
},
edit(row) {
console.log(row)
this.getNameList()
this.getFirstLevelDutyTerritory()
this.title = this.$t('edit')
if(row.dutyTerritory != null){
this.formInline.dutyTerritory = row.dutyTerritory.split(',')
}else{
this.formInline.dutyTerritory = undefined
console.log(this.formInline.dutyTerritory)
}
if(row.projectId != null){
this.formInline.projectId = row.projectId.split(',')
}else{
this.formInline.dutyTerritory = undefined
}
this.formInline = row
console.log(this.formInline)
this.visible = true
this.disabled = false
this.templateDisabled = true
this.$nextTick(() => {
if(row.dutyTerritory){
this.formInline.dutyTerritory = this.formInline.dutyTerritory.split(',')
}
if(row.projectId){
this.formInline.projectId = this.formInline.projectId.split(',')
}
this.formInline = row
this.$refs.ruleForm.clearValidate()
})
},
@@ -606,33 +616,33 @@ export default {
if(this.formInline.projectId && this.formInline.projectId instanceof Array){
this.formInline.projectId = this.formInline.projectId.join(',')
}
let fileLinkList = []
let approvalEvidenceLinkList = []
let progressTrackingList = []
if(this.formInline.fileLinkList){
this.formInline.fileLinkList.forEach(item => {
if(item.fileLink){
fileLinkList.push(item.fileLink)
}
})
this.formInline.fileLinkList = fileLinkList
}
if(this.formInline.approvalEvidenceLinkList){
this.formInline.approvalEvidenceLinkList.forEach(item => {
if(item.approvalEvidenceLink){
approvalEvidenceLinkList.push(item.approvalEvidenceLink)
}
})
this.formInline.approvalEvidenceLinkList = approvalEvidenceLinkList
}
if(this.formInline.progressTrackingList){
this.formInline.progressTrackingList.forEach(item => {
if(item.progressTracking){
progressTrackingList.push(item.progressTracking)
}
})
this.formInline.progressTrackingList = progressTrackingList
}
// let fileLinkList = []
// let approvalEvidenceLinkList = []
// let progressTrackingList = []
// if(this.formInline.fileLinkList){
// this.formInline.fileLinkList.forEach(item => {
// if(item.fileLink){
// fileLinkList.push(item.fileLink)
// }
// })
// this.formInline.fileLinkList = fileLinkList
// }
// if(this.formInline.approvalEvidenceLinkList){
// this.formInline.approvalEvidenceLinkList.forEach(item => {
// if(item.approvalEvidenceLink){
// approvalEvidenceLinkList.push(item.approvalEvidenceLink)
// }
// })
// this.formInline.approvalEvidenceLinkList = approvalEvidenceLinkList
// }
// if(this.formInline.progressTrackingList){
// this.formInline.progressTrackingList.forEach(item => {
// if(item.progressTracking){
// progressTrackingList.push(item.progressTracking)
// }
// })
// this.formInline.progressTrackingList = progressTrackingList
// }
delete this.formInline.lawsName
let query = {
// problemManagementEO:formInline