|
@@ -2,7 +2,7 @@
|
|
|
<div class="app-container">
|
|
|
<el-form :model="form" :rules="rules" ref="form" label-width="100px">
|
|
|
<el-form-item label="关联设备:">
|
|
|
- <el-select v-model="form.deviceIds" filterable multiple placeholder="请选择关联设备">
|
|
|
+ <el-select v-model="deviceIds" filterable multiple placeholder="请选择关联设备">
|
|
|
<el-option v-for="item in devOptions" :key="item.value" :label="item.label" :value="item.value.toString()" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -84,14 +84,14 @@ export default {
|
|
|
return {
|
|
|
// 表单
|
|
|
form: {},
|
|
|
+ // 关联设备
|
|
|
+ deviceIds: [],
|
|
|
// 区分
|
|
|
typeList: this.$route.query.typeList.split(','),
|
|
|
// 流量套餐
|
|
|
goodsOptions: [],
|
|
|
// 爱听专区
|
|
|
sceneOptions: [],
|
|
|
- // 关联设备
|
|
|
- deviceIds: [],
|
|
|
// 资源平台
|
|
|
platformOptions: [{
|
|
|
value: 6,
|
|
@@ -126,7 +126,9 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
'form.businessType'(val) {
|
|
|
- delete this.form.sort
|
|
|
+ if (val !== 5) {
|
|
|
+ delete this.form.sort
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
@@ -145,7 +147,7 @@ export default {
|
|
|
detail(this.form.id).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
this.form = res.data
|
|
|
- this.form.deviceIds = res.data.deviceIds.split(',')
|
|
|
+ this.deviceIds = res.data.deviceIds.split(',')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -178,7 +180,7 @@ export default {
|
|
|
getSubmit() {
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.form.deviceIds = this.form.deviceIds.join(',')
|
|
|
+ this.form.deviceIds = this.deviceIds.join(',')
|
|
|
if (this.form.id) {
|
|
|
edit(this.form).then(res => {
|
|
|
if (res.code === 0) {
|
|
@@ -207,7 +209,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 禁止修改
|
|
|
- disabled(){
|
|
|
+ disabled() {
|
|
|
return this.form.id ? true : false
|
|
|
}
|
|
|
}
|