修改 法规清单 带入数据有N/A时不能编辑

This commit is contained in:
baoyu
2024-04-16 15:05:31 +08:00
parent a1f30d6943
commit c6635b3497
2 changed files with 21 additions and 27 deletions
@@ -94,6 +94,10 @@ export default {
required:{
type:Boolean,
default:false
},
naButton:{
type:Boolean,
default:false
}
},
components: {},
@@ -144,7 +148,16 @@ export default {
return {
disabledDate (time) {
return _this.tagList.includes(_this.$dateFormat(time, 'yyyy-MM-dd'))
}
},
shortcuts:_this.naButton ? [{
text: 'N/A',
onClick() {
_this.tagList.push('N/A')
_this.datePickerVisible = false
_this.datePickerVal = ''
_this.$emit('input', _this.tagList.join(','))
}
}] : null
}
}
},
@@ -478,13 +478,8 @@
</el-select>
</el-form-item>
<el-form-item label="标准实施日期" prop="putTime">
<el-date-picker
clearable
v-model.trim="editRowData.ssrq"
type="dates"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
<custom-date-pick-group class="customDataPicker" style="margin-left: 0px" v-model="editRowData.ssrq" :config="{attrName: '',attrField: 'ssrq'}" :naButton=true>
</custom-date-pick-group>
</el-form-item>
<el-form-item label="在产车实施日期" prop="zccssrqgj">
<!-- <el-date-picker
@@ -494,7 +489,7 @@
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>-->
<custom-date-pick-group class="customDataPicker" style="margin-left: 0px" v-model="editRowData.zccssrqgj" :config="{attrName: '',attrField: 'zccssrqgj'}">
<custom-date-pick-group class="customDataPicker" style="margin-left: 0px" v-model="editRowData.zccssrqgj" :config="{attrName: '',attrField: 'zccssrqgj'}" :naButton=true>
</custom-date-pick-group>
</el-form-item>
<el-form-item label="新车型实施日期" prop="xcxssrqgj">
@@ -505,7 +500,7 @@
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择日期">-->
<!-- </el-date-picker>-->
<custom-date-pick-group class="customDataPicker" style="margin-left: 0px" v-model="editRowData.xcxssrqgj" :config="{attrName: '',attrField: 'xcxssrqgj'}">
<custom-date-pick-group class="customDataPicker" style="margin-left: 0px" v-model="editRowData.xcxssrqgj" :config="{attrName: '',attrField: 'xcxssrqgj'}" :naButton=true>
</custom-date-pick-group>
</el-form-item>
<el-form-item label="责任部门" prop="zrbm">
@@ -1574,24 +1569,12 @@ export default {
}
if (this.editRowData.ssrq === "-") {
this.editRowData.ssrq = "";
} else if (this.editRowData.ssrq&& this.editRowData.ssrq !== "-" ) {
this.editRowData.ssrq = this.editRowData.ssrq.split(",");
}
if (this.editRowData.zccssrqgj === "-") {
this.editRowData.zccssrqgj = "";
} else if (this.editRowData.zccssrqgj && this.editRowData.zccssrqgj !== "-") {
this.editRowData.zccssrqgj = this.editRowData.zccssrqgj.split(",");
}
if (this.editRowData.zccssrqgj instanceof Array && this.editRowData.zccssrqgj[0] === 'N/A'){
this.editRowData.zccssrqgj = this.editRowData.zccssrqgj.join(',')
}
if (this.editRowData.xcxssrqgj === "-") {
this.editRowData.xcxssrqgj = "";
} else if (this.editRowData.xcxssrqgj && this.editRowData.xcxssrqgj !== "-") {
this.editRowData.xcxssrqgj = this.editRowData.xcxssrqgj.split(",");
}
if (this.editRowData.xcxssrqgj instanceof Array && this.editRowData.xcxssrqgj[0] === 'N/A'){
this.editRowData.xcxssrqgj = this.editRowData.xcxssrqgj.join(',')
}
this.drawerEdit = true;
},
@@ -1609,9 +1592,6 @@ export default {
if(this.editRowData.syrz){
this.editRowData.syrz = this.editRowData.syrz.join(',')
}
if (this.editRowData.ssrq !== '' && this.editRowData.ssrq !== null) {
this.editRowData.ssrq = this.editRowData.ssrq.join(',')
}
this.drawerEdit = false
},
// 点击清单条目导入按钮事件
@@ -1711,8 +1691,9 @@ export default {
sarAccessEO.reNewPeople = this.$store.getters.userInfo.userId
sarAccessEO.inforlist = rowlist
sarAccessEO.inforlist1 = rowlist1
sarAccessEO.inforlist2 = rowlist2
sarAccessEO.inforlist3 = rowlist3
// 在产车 和 新车型 实施日期与后台对接的不对
sarAccessEO.inforlist2 = rowlist3
sarAccessEO.inforlist3 = rowlist2
sarAccessEO.inforlist4 = rowlist4
sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
// sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')