guoxiaohuan 4 years ago
parent
commit
9e5f677132

+ 5 - 4
src/router/index.js

@@ -1,7 +1,9 @@
 import Vue from 'vue'
 import store from '@/store'
 import VueRouter from 'vue-router'
-import { query } from '@/utils/query'
+import {
+    query
+} from '@/utils/query'
 Vue.use(VueRouter)
 const routes = [
     // 登陆页面
@@ -23,8 +25,7 @@ const routes = [
         name: 'home',
         component: () => import('../views/index'),
         redirect: '/home/homepage',
-        children: [
-            {
+        children: [{
                 path: 'homepage',
                 component: () => import('../views/homepage'),
             },
@@ -105,4 +106,4 @@ router.beforeEach(async (to, from, next) => {
     //     return
     // }
 })
-export default router
+export default router

+ 12 - 4
src/store/index.js

@@ -1,7 +1,13 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import { login, queryFloor, queryfmapID } from '@/api/login.js'
-import { queryBrand } from '@/api/public.js'
+import {
+    login,
+    queryFloor,
+    queryfmapID
+} from '@/api/login.js'
+import {
+    queryBrand
+} from '@/api/public.js'
 import axios from 'axios'
 import router from '../router'
 
@@ -117,7 +123,9 @@ export default new Vuex.Store({
     },
     actions: {
         // 获取项目列表、userId
-        async getUserInfo({ commit }, palyload) {
+        async getUserInfo({
+            commit
+        }, palyload) {
             await login({}).then((res) => {
                 // if (res.result == 'success') {
                 //     // token校验成功 拿到权限
@@ -167,4 +175,4 @@ export default new Vuex.Store({
         },
     },
     modules: {},
-})
+})

+ 1 - 2
src/views/equipment/table/wbTable.vue

@@ -206,8 +206,7 @@ export default {
                     diff: this.diff,
                     plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
-                    size: this.size,
-                    orderBy: `wb_gzglid,0;sbjbm,1;reportdate,0;`
+                    size: this.size
                 }
             }
             //下拉

+ 1 - 1
src/views/equipment/table/wxTable.vue

@@ -190,7 +190,7 @@ export default {
                     plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
                     size: this.size,
-                    orderBy: `sbjbm,0;sjjssj,1`
+                    
                 }
             }
             //下拉

+ 1 - 4
src/views/legendLibrary/addForm.vue

@@ -175,17 +175,14 @@ export default {
                 {
                     id: 'solid',
                     src: require('@/assets/imgs/1pxlines.png')
-                    // src: require('@/assets/imgs/1pxline.jpg')
                 },
                 {
                     id: 'dashed',
                     src: require('@/assets/imgs/dashedLines.png')
-                    // src: require('@/assets/imgs/dashedLine.jpg')
                 },
                 {
                     id: 'dotted',
                     src: require('@/assets/imgs/dotLines.png')
-                    // src: require('@/assets/imgs/dotLine.jpg')
                 }
             ],
             linepxOption: [
@@ -356,7 +353,6 @@ export default {
         },
         //线条类型改变
         changeLineType(val) {
-            this.$set(this.ruleForm, 'LineDash', val)
             this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
             if (this.$refs.select1 && this.$refs.select1.$el) {
                 this.$refs.select1.$el.children[0].children[0].setAttribute(
@@ -364,6 +360,7 @@ export default {
                     'background:#ffffff url(' + this.borderLineOptionObject.src + ')  10px center no-repeat;color:transparent;'
                 )
             }
+            this.$set(this.ruleForm, 'LineDash', val)
             if (this.view) {
                 this.view.lineType = val
             }

+ 31 - 32
src/views/legendLibrary/index.vue

@@ -165,7 +165,7 @@
                 ></el-pagination>
             </div>
         </div>
-        <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal'></add-legend>
+        <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal' :key='Date.now()'></add-legend>
         <Modal :show='modalStatusTip' title='确定要作废图例吗?' mode='tip' type='error' @close='modalStatusTip=false'>
             <template #content>作废后则不可更改</template>
             <template #handle>
@@ -189,6 +189,7 @@ import {
     getVisualization,
     queryRelation
 } from '@/api/legendLibrary.js'
+import { Container } from 'element-ui'
 
 function hexToRgba(hex) {
     let opacity = '',
@@ -304,9 +305,38 @@ export default {
         initQueryDeviceAndPOsition() {
             let postParams = {}
             queryDeviceAndPOsition({ postParams }).then(res => {
+                // let data = res.data
+                // data.forEach(data => {
+                //     const map = {
+                //         1: [],
+                //         2: []
+                //     }
+                //     data.children.forEach(child => map[child.type].push(child))
+                //     data.children = [
+                //         {
+                //             id: `1--${data.id}`,
+                //             name: '位置类型',
+                //             children: map[1]
+                //         },
+                //         {
+                //             id: `2--${data.id}`,
+                //             name: '设备类型',
+                //             children: map[2]
+                //         }
+                //     ]
+                // })
+                // data.map(i => {
+                //     i.children.map(i => {
+                //         console.log(i)
+                //         if (!i.children.length) {
+                //             i.disabled = true
+                //         }
+                //     })
+                // })
                 this.deviceList = res.data
             })
         },
+
         //说明书位置
         instruction() {
             let getParams = {}
@@ -390,34 +420,6 @@ export default {
         deleteClick(row) {
             this.deleteObject = row
             this.modalStatusTip = true
-            // this.$confirm('作废后则不可更改', '确定要作废图例吗?', {
-            //     confirmButtonText: '作废',
-            //     cancelButtonText: '取消',
-            //     type: 'warning',
-            //     center: true
-            // })
-            //     .then(() => {
-            //         let postParams = [
-            //             {
-            //                 Id: row.Id
-            //             }
-            //         ]
-            //         deleteLegend({ postParams }).then(res => {
-            //             if (res.Result == 'success') {
-            //                 this.$message({
-            //                     type: 'success',
-            //                     message: '作废成功!'
-            //                 })
-            //                 this.getTableList()
-            //             }
-            //         })
-            //     })
-            //     .catch(() => {
-            //         this.$message({
-            //             type: 'info',
-            //             message: '已取消删除'
-            //         })
-            //     })
         },
         pageChanged(page, size) {
             this.currentPage = page
@@ -452,9 +454,6 @@ export default {
             return arr
         },
         getTableList() {
-            // if (this.GraphCategoryIds || this.InfoLocals || this.InfoSystems || this.keyword) {
-            //     this.currentPage = 1
-            // }
             let postParams = {
                 Deleted: this.state == 1 ? false : true,
                 GraphCategoryIds: this.GraphCategoryIds.length ? this.GraphCategoryIds : undefined, //说明书位置

+ 1 - 1
src/views/legendRules/index.vue

@@ -15,7 +15,7 @@
             <div style='float: left;  padding-left: 20px;  padding-right:7px; display: inline-block;'>
                 <img src='@/assets/imgs/go-back.png' @click='goBack' alt style='cursor: pointer;' />
             </div>
-            <span style='float: left;display: inline-block;font-size:14px;padding-top: 2px;color:#1F2429'>返回</span>
+            <span style='float: left;display: inline-block;font-size:14px;padding-top: 2px;color:#1F2429;cursor: pointer;' @click='goBack'>返回</span>
             图例绘制规则
             <el-button type='primary' class='rules-button' size='small' @click='add'>添加图例</el-button>
         </div>