Xiao_123 hai 3 días
pai
achega
deba7cdcf2

+ 10 - 9
src/views/dataBook/components/mGraph.vue

@@ -5,7 +5,7 @@
     class="d-flex align-center justify-center"
   >
     <div class="legend d-flex pa-3 justify-space-between">
-      <div class="select pointerEvents">
+      <!-- <div class="select pointerEvents">
         <v-select
           v-model="type"
           :items="items"
@@ -15,18 +15,19 @@
           style="background-color: #fff; width: 150px;"
           @change="changeType"
         ></v-select>
-      </div>
+      </div> -->
       <!-- 图例 -->
       <div class="d-flex align-center">
         <div
           v-for="item in legend"
           :key="item.title"
-          class="d-flex ml-5"
+          class="d-flex mr-5"
         >
           <div class="pa-3 mr-3 rounded-circle" :style="`background-color: ${item.color};`"></div>
           {{ item.title }}
         </div>
         <v-switch
+          v-if="!meta"
           class="pointerEvents mt-0 ml-3"
           hide-details
           v-model="showMeta"
@@ -238,12 +239,12 @@ export default {
         //   className: 'metricNode',
         //   ...NODES_SIZE
         // },
-        // standard: { // 标准
-        //   color: '#009688',
-        //   title: '数据标准',
-        //   className: 'standardNode',
-        //   ...NODES_SIZE
-        // },
+        data_standard: { // 标准
+          color: '#009688',
+          title: '数据标准',
+          className: 'standardNode',
+          ...NODES_SIZE
+        },
         DataLabel: { // 标签
           color: '#9C27B0',
           title: '数据标签',

+ 1 - 1
src/views/dataBook/dataLabel/dynamic/graph.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="pa-3" style="height: 100%;">
     <m-card title="关系图谱" bodyStyle="flex: 1" style="height: 100%;" class="d-flex flex-column">
-      <graph :to-api="api.dataLabelGraph"></graph>
+      <graph :to-api="api.getGraphAll"></graph>
     </m-card>
   </div>
 </template>

+ 3 - 2
src/views/dataBook/dataLabel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="pa-3 white">
-    <m-filter :filter="['name_zh', 'name_en', 'category']" @search="handleSearch" />
+    <m-filter :filter="['name_zh', 'name_en', 'category']" categoryValue="DataOps" @search="handleSearch" />
     <m-table
       class="mt-3"
       :loading="loading"
@@ -46,7 +46,8 @@ export default {
       loading: false,
       show: false,
       queryData: {
-        name_zh: null
+        name_zh: null,
+        category: 'DataOps'
       },
       headers: [
         { text: '名称', value: 'name_zh' },

+ 1 - 1
src/views/dataBook/dataStandard/dynamic/graph.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="pa-3" style="height: 100%;">
     <m-card title="关系图谱" bodyStyle="flex: 1" style="height: 100%;" class="d-flex flex-column">
-      <graph :to-api="api.dataStandardGraph"></graph>
+      <graph :to-api="api.getGraphAll"></graph>
     </m-card>
   </div>
 </template>

+ 5 - 0
src/views/dataGovernance/components/Filter.vue

@@ -73,6 +73,10 @@ export default {
     value: {
       type: Boolean,
       default: false
+    },
+    categoryValue: {
+      type: String,
+      default: null
     }
   },
   data () {
@@ -95,6 +99,7 @@ export default {
     if (this.filter.includes('tag')) {
       this.init()
     }
+    this.option.list.find(e => e.key === 'category').value = this.categoryValue
   },
   methods: {
     // 获取标签列表

+ 33 - 32
src/views/dataGovernance/dataLabel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="pa-3 white">
-    <m-filter :filter="['name_zh', 'name_en', 'category']" @search="handleSearch" />
+    <m-filter :filter="['name_zh', 'name_en', 'category']" categoryValue="DataOps" @search="handleSearch" />
     <m-table
       class="mt-3"
       :loading="loading"
@@ -79,7 +79,8 @@ export default {
       loading: false,
       show: false,
       queryData: {
-        name_zh: null
+        name_zh: null,
+        category: 'DataOps'
       },
       headers: [
         { text: '名称', value: 'name_zh' },
@@ -161,38 +162,38 @@ export default {
           }
         })
     },
-    async handleConfirm () {
-      const obj = this.$refs.edit.getValue()
-      if (!obj) {
-        return
-      }
-      if (!obj.group) {
-        this.handleSubmit()
-        return
-      }
-      this.loadingSubmit = true
-      try {
-        const { data } = await api.dataLabelIdentifyGroup({ content: obj.group })
-        this.loadingSubmit = false
-        const _data = data.filter(e => e.name !== obj.group)
-        if (!_data.length) {
-          this.groupActive = -1
-          await this.handleSubmit()
-          return
-        }
+    // async handleConfirm () {
+    //   const obj = this.$refs.edit.getValue()
+    //   if (!obj) {
+    //     return
+    //   }
+    //   if (!obj.group) {
+    //     this.handleSubmit()
+    //     return
+    //   }
+    //   this.loadingSubmit = true
+    //   try {
+    //     const { data } = await api.dataLabelIdentifyGroup({ content: obj.group })
+    //     this.loadingSubmit = false
+    //     const _data = data.filter(e => e.name !== obj.group)
+    //     if (!_data.length) {
+    //       this.groupActive = -1
+    //       await this.handleSubmit()
+    //       return
+    //     }
 
-        this.groups = [
-          { name: obj.group, id: -1 },
-          ..._data
-        ]
+    //     this.groups = [
+    //       { name: obj.group, id: -1 },
+    //       ..._data
+    //     ]
 
-        this.groupActive = 0
-        this.showGroup = true
-      } catch (error) {
-        this.$snackbar.error(error)
-        this.loadingSubmit = false
-      }
-    },
+    //     this.groupActive = 0
+    //     this.showGroup = true
+    //   } catch (error) {
+    //     this.$snackbar.error(error)
+    //     this.loadingSubmit = false
+    //   }
+    // },
     async handleSubmit () {
       const obj = this.$refs.edit.getValue()
       if (!obj) {