|
@@ -308,7 +308,7 @@
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="作业类型" prop="workType">
|
|
|
- <el-select v-model="ruleForm.workType" placeholder="请选择作业类型" clearable size="small">
|
|
|
+ <el-select v-model="ruleForm.workType" placeholder="请选择作业类型" multiple clearable size="small">
|
|
|
<el-option
|
|
|
v-for="dict in workTypeOptions"
|
|
|
:key="dict.dictValue"
|
|
@@ -794,10 +794,6 @@ export default {
|
|
|
return this.selectDictLabel(this.workAreaOptions, row.bookingworkticket.workArea);
|
|
|
},
|
|
|
// 字典翻译
|
|
|
- unitNumberFormat(row, column) {
|
|
|
- return this.selectDictLabel(this.unitNumberOptions, row.unitNumber);
|
|
|
- },
|
|
|
- // 字典翻译
|
|
|
floorLocationFormat(row, column) {
|
|
|
|
|
|
return this.selectDictLabels(this.floorLocationOptions, row.bookingworkticket.floorLocation);
|
|
@@ -812,7 +808,7 @@ export default {
|
|
|
},
|
|
|
// 字典翻译
|
|
|
workTypeFormat(row, column) {
|
|
|
- return this.selectDictLabel(this.workTypeOptions, row.workType);
|
|
|
+ return this.selectDictLabels(this.workTypeOptions, row.workType);
|
|
|
},
|
|
|
// 字典翻译
|
|
|
riskLevelFormat(row, column) {
|
|
@@ -920,6 +916,17 @@ export default {
|
|
|
st.push(parseInt(arr[arrInt]))
|
|
|
}
|
|
|
this.form.floorLocation=st
|
|
|
+ //作业类型也要多选 同楼层
|
|
|
+ for(let j=0;j<this.ruleForm.length;j++){
|
|
|
+ let arr1=this.ruleForm[j].workType.split(",")
|
|
|
+ let st1=[]
|
|
|
+ // 将字符串数组的每一项转换成Number,生成一个新的数组
|
|
|
+ for (var arrInt in arr1) {
|
|
|
+ st1.push(parseInt(arr1[arrInt]))
|
|
|
+ }
|
|
|
+ this.ruleForm[j].workType=st1
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
this.ruleForm.length=response.data.tInvoiceWorkcontentList.length
|
|
|
});
|
|
@@ -962,6 +969,10 @@ export default {
|
|
|
if (this.form.id != null) {
|
|
|
this.form.tInvoiceWorkcontentList=this.ruleForm
|
|
|
this.form.floorLocation=this.form.floorLocation.join(',')
|
|
|
+ for(let b=0;b<this.ruleForm.length;b++){
|
|
|
+ this.ruleForm[b].workType=this.ruleForm[b].workType.join(',')
|
|
|
+ }
|
|
|
+
|
|
|
updateBookingworkticket(this.form).then(response => {
|
|
|
|
|
|
this.msgSuccess("修改成功");
|
|
@@ -971,6 +982,9 @@ export default {
|
|
|
} else {
|
|
|
this.form.tInvoiceWorkcontentList=this.ruleForm
|
|
|
this.form.floorLocation=this.form.floorLocation.join(',')
|
|
|
+ for(let b=0;b<this.ruleForm.length;b++){
|
|
|
+ this.ruleForm[b].workType=this.ruleForm[b].workType.join(',')
|
|
|
+ }
|
|
|
addBookingworkticket(this.form).then(response => {
|
|
|
// console.log(this.form)
|
|
|
// console.log(this.ruleForm)
|