|
@@ -62,6 +62,14 @@
|
|
|
<span>线条名称</span>
|
|
|
<el-input v-model="infolist.lineName" placeholder="线条名称" :disabled="disableStatus"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-if="type == '1'" prop="groupname">
|
|
|
+ <span>分组名称</span>
|
|
|
+ <el-select :disabled="disableStatus" v-model="groupname"
|
|
|
+ placeholder="分组名称">
|
|
|
+ <el-option value="default" label="默认"> </el-option>
|
|
|
+ <el-option value="IT" label="信息中心"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item v-if="type != '1'" prop="lineId">
|
|
|
<span>线条名称</span>
|
|
|
<el-select :popper-append-to-body="false" :disabled="disableStatus" v-model="lineId"
|
|
@@ -165,6 +173,15 @@
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ const groupname = (rule, value, callback) => {
|
|
|
+ if (!this.groupname && this.type > 1) {
|
|
|
+ callback(new Error('不能为空'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
const lineId = (rule, value, callback) => {
|
|
|
if (!this.lineId && this.type > 1) {
|
|
|
callback(new Error('不能为空'))
|
|
@@ -252,6 +269,11 @@
|
|
|
trigger: 'blur',
|
|
|
validator: lineName
|
|
|
}],
|
|
|
+ groupname: [{
|
|
|
+ required: true,
|
|
|
+ trigger: 'blur',
|
|
|
+ validator: groupname
|
|
|
+ }],
|
|
|
lineId: [{
|
|
|
required: true,
|
|
|
trigger: 'change',
|
|
@@ -342,6 +364,7 @@
|
|
|
|
|
|
},
|
|
|
lineId: '',
|
|
|
+ groupname: 'default',
|
|
|
unitId: '',
|
|
|
moduleId: '',
|
|
|
typeOptions: [{
|
|
@@ -440,6 +463,7 @@
|
|
|
this.lineId = this.infolist.lineId;
|
|
|
this.unitId = this.infolist.unitId;
|
|
|
this.moduleId = this.infolist.moduleId;
|
|
|
+ this.groupname = this.infolist.groupname;
|
|
|
return
|
|
|
} else if (v === 2) {
|
|
|
this.titname = '修改';
|
|
@@ -448,6 +472,7 @@
|
|
|
this.lineId = this.infolist.lineId;
|
|
|
this.unitId = this.infolist.unitId;
|
|
|
this.moduleId = this.infolist.moduleId;
|
|
|
+ this.groupname = this.infolist.groupname;
|
|
|
} else if (v === 3) {
|
|
|
this.titname = '添加';
|
|
|
this.disableStatus = false;
|
|
@@ -471,6 +496,7 @@
|
|
|
this.infolist.lineId = this.lineId;
|
|
|
this.infolist.unitId = this.unitId;
|
|
|
this.infolist.moduleId = this.moduleId;
|
|
|
+ this.infolist.groupname = this.groupname;
|
|
|
if (this.titname === '添加') {
|
|
|
let url = '';
|
|
|
if (this.type == '1') {
|