Browse Source

改接口字段

shaun-sheep 4 years ago
parent
commit
32351b2a50
2 changed files with 10 additions and 17 deletions
  1. 6 13
      src/views/legendLibrary/addForm.vue
  2. 4 4
      src/views/legendLibrary/index.vue

+ 6 - 13
src/views/legendLibrary/addForm.vue

@@ -201,6 +201,11 @@ export default {
         }
     },
     props: ['ruleForm', 'title'],
+    computed: {
+        form() {
+            console.log(this.ruleForm)
+        }
+    },
     methods: {
         //业下设备分类和位置分类树形结构
         initQueryDeviceAndPOsition() {
@@ -261,6 +266,7 @@ export default {
             let postParams = {
                 Content: [this.ruleForm]
             }
+            this.ruleForm.InfoSystem = this.ruleForm.InfoSystems ? this.ruleForm.InfoSystems : this.ruleForm.InfoSystem
             updateLegend({ postParams }).then(res => {
                 if (res.Result == 'success') {
                     this.$message.success('图例修改成功!')
@@ -296,17 +302,6 @@ export default {
         },
         //rgba转成16进制
         hexify(color) {
-            console.log(color, 'color')
-            // var values = color
-            //     .replace(/rgba?\(/, '')
-            //     .replace(/\)/, '')
-            //     .replace(/[\s+]/g, '')
-            //     .split(',')
-            // var a = parseFloat(values[3] || 1),
-            //     r = Math.floor(a * parseInt(values[0]) + (1 - a) * 255),
-            //     g = Math.floor(a * parseInt(values[1]) + (1 - a) * 255),
-            //     b = Math.floor(a * parseInt(values[2]) + (1 - a) * 255),
-            //     opacity = ''
             var opacity = ''
             var rgb = color.split(',')
             var r = parseInt(rgb[0].split('(')[1])
@@ -380,8 +375,6 @@ export default {
             var hex = '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1) + opacity
             console.log(hex, 'hrc')
             return hex
-
-            // return '#' + ('0' + r.toString(16)).slice(-2) + ('0' + g.toString(16)).slice(-2) + ('0' + b.toString(16)).slice(-2) + opacity
         },
         // 背景颜色改变
         changBgColor(val) {

+ 4 - 4
src/views/legendLibrary/index.vue

@@ -112,24 +112,24 @@
                 <el-table-column prop='Unit' label='单位'>
                     <template slot-scope='{row}'>{{row.Unit}}</template>
                 </el-table-column>
-                <el-table-column prop='position' label='对应广场说明书的位置'>
+                <el-table-column prop='position' label='对应广场说明书的位置' show-overflow-tooltip>
                     <template slot-scope='{row}'>
                         <span v-for='item in row.GraphCategorys ' :key='item.Name'>{{item.Name}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label='对应工程信息化' align='center'>
-                    <el-table-column prop='type' label='位置/设备分类' width='240' :show-overflow-tooltip='true'>
+                    <el-table-column prop='type' label='位置/设备分类' width='240' show-overflow-tooltip>
                         <template slot-scope='{row}'>
                             <span v-for='item in row.InfoLocal ' :key='item.name'>{{item.name}}</span>
                         </template>
                     </el-table-column>
-                    <el-table-column prop='system' label='专业' :show-overflow-tooltip='true'>
+                    <el-table-column prop='system' label='专业' show-overflow-tooltip>
                         <template slot-scope='{row}'>
                             <span v-for='(item,index) in row.InfoSystems ' :key='index'>{{item.Name}}</span>
                         </template>
                     </el-table-column>
                 </el-table-column>
-                <el-table-column prop='typeId' resizable label='铺位可视化typeid' width='140' :show-overflow-tooltip='true'>
+                <el-table-column prop='typeId' resizable label='铺位可视化typeid' width='140' show-overflow-tooltip>
                     <template slot-scope='{row}'>
                         <span v-for='(item,index) in row.InfoTypes ' :key='index'>{{item.Name}}</span>
                     </template>