Commit 60227cad authored by dragondean@qq.com's avatar dragondean@qq.com
parents f1deb7b8 77ded800
......@@ -280,12 +280,12 @@
<el-dialog title="设置服务" :visible.sync="serviceOpen" width="1000px" append-to-body>
<el-form ref="form" :model="lineform" :rules="rules" label-width="120px">
<el-form-item label="始发港服务">
<el-checkbox-group v-model="lineform.startDestination">
<el-checkbox-group v-model="lineform.otherService">
<el-checkbox v-for="item in serviceGroup" :label="item.id" :key="item.id" :value="item.id"> {{item.text}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="目的港服务">
<el-checkbox-group v-model="lineform.endDestination">
<el-checkbox-group v-model="lineform.otherService">
<el-checkbox v-for="item in endServiceGroup" :label="item.id" :key="item.id" :value="item.id"> {{item.text}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
......@@ -499,7 +499,7 @@ export default {
// 表单参数
form: {checkList:[],},
ladingform: {prefixCounter:null,titleZh:null,contentZh:null,account:null,acctArr:[]},
lineform: {startDestination:[],endDestination:[]},
lineform: {otherService:[]},
// 表单校验
rules: {
......@@ -569,7 +569,7 @@ export default {
serviceNames() {
return otherService => {
if(!otherService) return '';
let serviceList = otherService.split(",");
let serviceList = Array.isArray(otherService) ? otherService : otherService.split(",");
let names = [];
for(let index in serviceList) {
let item = serviceList[index];
......@@ -777,20 +777,20 @@ export default {
serviceClick(row) {
if(row.otherService) {
this.lineform.startDestination = row.otherService?.split(",") ?? [];
this.lineform.endDestination = row.otherService?.split(",") ?? [];
this.lineform.otherService = Array.isArray(row.otherService) ? row.otherService : row.otherService?.split(",") ?? [];
} else {
this.lineform.startDestination = [];
this.lineform.endDestination = [];
this.lineform.otherService = [];
}
this.serviceOpen = true;
this.lineform.lineId = row.lineId;
},
submitLineForm() {
let otherService = this.lineform.startDestination.concat(this.lineform.endDestination);
this.lineform.otherService = otherService.join(',');
serviceConfig(this.lineform).then(res => {
let otherService = this.lineform.otherService;
serviceConfig({
lineId: this.lineform.lineId,
otherService: otherService.join(',')
}).then(res => {
this.$modal.msgSuccess("操作成功");
for(let index in this.routeList) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment