소스 검색

关联数据

CHINAMI-P698360\Administrator 4 달 전
부모
커밋
36892366e2
2개의 변경된 파일19개의 추가작업 그리고 9개의 파일을 삭제
  1. 4 1
      src/business/platform/data/data-template/template.vue
  2. 15 8
      src/business/platform/data/templaterender/linkdata/index.vue

+ 4 - 1
src/business/platform/data/data-template/template.vue

@@ -241,7 +241,9 @@ export default {
           return ''
         }
         const checked = this.checkbox[0]
-
+        if (this.fieldType === 'linkdata') {
+          return checked
+        }
         this.labelKeys = buildLabelTitle(this.tem)
         const a = this.dataList.length > 0 && this.childrenIndex != -1 ? this.handleLabel(this.dataList[this.childrenIndex]) : ''
 
@@ -442,6 +444,7 @@ export default {
                   })
                   this.dataList.push(fb)
                 } else {
+                  //
                 }
               } else {
                 let b = {}

+ 15 - 8
src/business/platform/data/templaterender/linkdata/index.vue

@@ -70,7 +70,7 @@
         :visible="showPopup"
         :template-key="templateKey"
         :params="params"
-        :value="selectedValue"
+        :values="selectedValue"
         :multiple="multiple"
 
         :left-text="leftText"
@@ -203,7 +203,7 @@ export default {
       const params = {}
       loadDataTemplateByKey(key, params).then((data) => {
         const template = getDataTemplateListTemplate(data)
-        this.tem ={...template}
+        this.tem = { ...template }
         this.templateFields = buildDataTemplateFields(data.fields)
         this.buildKey(data, template)
       }).catch((e) => {
@@ -214,7 +214,7 @@ export default {
       this.idKey = dataTemplate['unique']
       this.queryKey = this.getQueryKey(template['query_columns'])
       const resultColumns = template['result_columns']
-      console.log(resultColumns,'resultColumnsresultColumns')
+      // console.log(resultColumns, 'resultColumnsresultColumns')
       if (this.$utils.isEmpty(resultColumns)) { return }
       this.labelKey = resultColumns[0]['name']
       if (dataTemplate.showType === 'tree') { // 树形
@@ -226,11 +226,11 @@ export default {
           this.parentIdKey = displayColumns['pid_key']
         }
       } else if (dataTemplate.showType === 'list') {
-      this.isTree = false
-      const displayColumns = template['display_columns']
-      if (this.$utils.isNotEmpty(displayColumns)) {
-        this.labelKey = (displayColumns[0] ? displayColumns[0]['name'] : '') || ''
-      }
+        this.isTree = false
+        const displayColumns = template['display_columns']
+        if (this.$utils.isNotEmpty(displayColumns)) {
+          this.labelKey = (displayColumns[0] ? displayColumns[0]['name'] : '') || ''
+        }
       }
     },
     initSelectedData() {
@@ -355,3 +355,10 @@ export default {
   }
 }
 </script>
+<style lang="scss" scoped>
+  .ibps-tag-span {
+    ::v-deep .ibps-data-template-data {
+      color: #4399fb !important;
+    }
+  }
+  </style>