|
@@ -544,10 +544,10 @@
|
|
|
append-to-body
|
|
|
>
|
|
|
<div class="select-container" style="margin-top: -20px">
|
|
|
- <p>根据选择的选项隐藏,显示其他控件。当前控件不能被关联显示。<span style="color: red;">选中的选项自动保存</span></p>
|
|
|
+ <p>根据选择的选项显示,隐藏其他控件。当前控件不能被关联显示。<span style="color: red;">选中的选项自动保存</span></p>
|
|
|
<el-row class="select-title">
|
|
|
<el-col :span="6">当选项为</el-col>
|
|
|
- <el-col :span="18">隐藏以下控件</el-col>
|
|
|
+ <el-col :span="18">显示以下控件</el-col>
|
|
|
</el-row>
|
|
|
<el-row v-for="(options, index) in data.options.options" :key="index" class="select-value">
|
|
|
<el-col :span="6">
|
|
@@ -560,7 +560,7 @@
|
|
|
multiple
|
|
|
clearable
|
|
|
placeholder=""
|
|
|
- @change="$forceUpdate()"
|
|
|
+ @change="relationChange"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="field in fieldList"
|
|
@@ -665,6 +665,18 @@ export default {
|
|
|
this.handleInitHeaders()
|
|
|
},
|
|
|
methods: {
|
|
|
+ relationChange() {
|
|
|
+ this.$forceUpdate()
|
|
|
+ console.log(this.data)
|
|
|
+ let relationStatus = false
|
|
|
+ let options = this.data.options.options || []
|
|
|
+ options.forEach(item => {
|
|
|
+ if(item.relationOptions && item.relationOptions.length > 0) {
|
|
|
+ relationStatus = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.data.options.relationStatus = relationStatus
|
|
|
+ },
|
|
|
addDisplayVerifiy() {
|
|
|
this.data.options.displayVerifiy.list.push({
|
|
|
model: (new Date()).valueOf(),
|