소스 검색

页面更新

sr 4 년 전
부모
커밋
f074815c1b
2개의 변경된 파일12개의 추가작업 그리고 18개의 파일을 삭제
  1. 12 5
      ruoyi-ui/src/components/DynamicForm/index.vue
  2. 0 13
      ruoyi-ui/src/views/system/table/index.vue

+ 12 - 5
ruoyi-ui/src/components/DynamicForm/index.vue

@@ -12,9 +12,10 @@
         </el-option>
       </el-select>
       <!-- 复选框 -->
-      <el-checkbox-group v-model="formConfig.sysDictDatatwo" v-if="formConfig.htmlType == 'checkbox'">
-        <el-checkbox @change="handleCheckedCitiesChange" v-for="itemChild in formConfig.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictLabel"
-        :value="itemChild.dictValue" ></el-checkbox>
+      <el-checkbox-group v-model="config" v-if="formConfig.htmlType == 'checkbox'">
+        <el-checkbox @change="handleCheckedCitiesChange" v-for="itemChild in formConfig.sysDictData" :label="itemChild.dictValue" :key="itemChild.dictLabel" >
+          {{itemChild.dictLabel}}
+        </el-checkbox>
       </el-checkbox-group>
       <!-- 单选框 -->
       <el-radio-group v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'radio'">
@@ -76,11 +77,17 @@
       },
     },
     created() {
-    console.log(this.formConfig)
+      this.init()
     },
     mounted() {
     },
     methods: {
+      init() {
+        if(this.formConfig.htmlType == 'checkbox'){
+          this.config = []
+        }
+        console.log(this.config,99888)
+      },
       handleChange(file, fileList) {
         this.fileList = fileList.slice(-3);
       },
@@ -101,7 +108,7 @@
         this.$emit('btns')
       },
       handleCheckedCitiesChange(value){
-        console.log(value)
+        console.log(this.config)
       }
     }
   }

+ 0 - 13
ruoyi-ui/src/views/system/table/index.vue

@@ -105,19 +105,6 @@
         }).then(res => {
           let data = res.data
           this.queryData = data
-          console.log( this.queryData.queryList)
-          this.queryData.queryList.filter(route => {
-            if(route.htmlType == 'checkbox'){
-              route.sysDictDatatwo = []
-              route.sysDictDatatwo.push(route.columnName)
-              // route.sysDictData.filter(router=>{
-              //  route.sysDictDatatwo.push(router.dictLabel)
-              //  console.log( route.sysDictDatatwo)
-              // })
-              console.log(route.sysDictDatatwo,846)
-            }
-          })
-          console.log(this.queryData.queryList)
         })
       },
       handleChange(val) {