lex-xin 3 år sedan
förälder
incheckning
c0d74b55eb

+ 15 - 3
src/components/VueFormMaking/components/WidgetConfig.vue

@@ -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(),

+ 1 - 0
src/components/VueFormMaking/components/componentsConfig.js

@@ -236,6 +236,7 @@ export const basicComponents = [
       required: false,
       showLabel: false,
       width: '',
+      relationStatus: false, // 是否有关联
       options: [
         {
           value: 'Option 1'

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/index.html


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/css/chunk-d6360a66.c419c819.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/js/app.62fdfcf1.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/js/chunk-159284f0.034c0fa8.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/js/chunk-d6360a66.3865c12f.js


Vissa filer visades inte eftersom för många filer har ändrats