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