소스 검색

修改图例弹窗问题

shaun-sheep 4 년 전
부모
커밋
dfc40d5d30
6개의 변경된 파일68개의 추가작업 그리고 28개의 파일을 삭제
  1. 5 5
      public/systemConf.js
  2. 7 5
      src/router/index.js
  3. 12 4
      src/store/index.js
  4. 13 9
      src/views/legendLibrary/addForm.vue
  5. 30 0
      src/views/legendLibrary/addLegend.vue
  6. 1 5
      src/views/legendLibrary/index.vue

+ 5 - 5
public/systemConf.js

@@ -24,11 +24,11 @@ var __systemConf = {
     systemCode: 'wandaBmGuide',
     conf: {
         // 阿里云
-        editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
-        wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
+        // editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
+        // wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
         // http://glsms.wanda-dev.cn/ 测试服
-        // editerUrl: 'http://glsms.wanda-dev.cn/wandaEditer/', // 编辑器地址
-        // wandaBmGuideUrl: 'http://glsms.wanda-dev.cn/wandaBmGuide/', //管理书地址
+        editerUrl: 'http://glsms.wanda-dev.cn/wandaEditer/', // 编辑器地址
+        wandaBmGuideUrl: 'http://glsms.wanda-dev.cn/wandaBmGuide/', //管理书地址
     },
 }
-window.__systemConf = __systemConf
+window.__systemConf = __systemConf

+ 7 - 5
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'
 
 let level = 0
 Vue.use(VueRouter)
@@ -9,7 +11,7 @@ const routes = [
     // 登陆页面
     {
         path: '/',
-        redirect: '/home/overview',        // 只有区域,及区域以上用户才能进入总部首页这一套
+        redirect: '/home/overview', // 只有区域,及区域以上用户才能进入总部首页这一套
     },
     {
         path: '/404',
@@ -87,7 +89,7 @@ router.beforeEach(async (to, from, next) => {
             await store.dispatch('getUserInfo', router)
             await store.dispatch('getFloors')
             await store.dispatch('getBrand')
-            let level =store.state.accessLevel
+            let level = store.state.accessLevel
             console.log(level)
             // if (level ===0) {
             //     next('/group')
@@ -111,11 +113,11 @@ router.beforeEach(async (to, from, next) => {
                 signal = new Date().getTime(),
                 version = '1.0.0'
             window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
-            
+
         }
     } else {
         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'
 
@@ -121,7 +127,9 @@ export default new Vuex.Store({
     },
     actions: {
         // 获取项目列表、userId
-        async getUserInfo({ commit }, palyload) {
+        async getUserInfo({
+            commit
+        }, palyload) {
             await login({}).then((res) => {
                 if (res.result == 'success') {
                     commit('STOREACCESSLEVEL', res)
@@ -173,4 +181,4 @@ export default new Vuex.Store({
         },
     },
     modules: {},
-})
+})

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

@@ -333,7 +333,7 @@ export default {
                 })
 
                 var hex = '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1) + opacity
-                console.log(hex)
+
                 return hex
             } else {
                 return
@@ -353,14 +353,18 @@ export default {
         },
         //线条类型改变
         changeLineType(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(
-                    'style',
-                    'background:#ffffff url(' + this.borderLineOptionObject.src + ')  10px center no-repeat;color:transparent;'
-                )
-            }
-            this.$set(this.ruleForm, 'LineDash', val)
+            if (val) {
+                this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
+                this.$nextTick(() => {
+                    if (this.$refs.select1 && this.$refs.select1.$el) {
+                        this.$refs.select1.$el.children[0].children[0].setAttribute(
+                            'style',
+                            '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
             }

+ 30 - 0
src/views/legendLibrary/addLegend.vue

@@ -16,6 +16,36 @@
             </span>
         </el-dialog>
 
+        <!-- <Modal :show='dialogVisible' :title='title' mode='middle' @close='dialogVisible = false,cancal()'>
+            <template #content>
+                <add-form
+                    ref='add'
+                    :InfosList='InfosList'
+                    :InfoTypeIdList='InfoTypeIdList'
+                    :ruleForm='info'
+                    @addSuccess='addSuccess'
+                    @updateSuccess='updateSuccess'
+                    :title='title'
+                ></add-form>
+            </template>
+            <template #handle>
+                <Button @click='dialogVisible = false,cancal()' type='default'>取 消</Button>
+                <Button @click='save' type='primary'>确 定</Button>
+            </template>
+        </Modal>-->
+        <!-- 
+        <a-modal v-model='dialogVisible' :title='title' @ok='save' @cancel='dialogVisible = false,cancal()' okText='确定' cancelText='取消' width='900px'>
+            <add-form
+                ref='add'
+                :InfosList='InfosList'
+                :InfoTypeIdList='InfoTypeIdList'
+                :ruleForm='info'
+                @addSuccess='addSuccess'
+                @updateSuccess='updateSuccess'
+                :title='title'
+            ></add-form>
+        </a-modal>-->
+
         <TransferSelectModal
             defaultExpandAll
             default-expand-all

+ 1 - 5
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'></add-legend>
         <Modal :show='modalStatusTip' title='确定要作废图例吗?' mode='tip' type='error' @close='modalStatusTip=false'>
             <template #content>作废后则不可更改</template>
             <template #handle>
@@ -189,7 +189,6 @@ import {
     getVisualization,
     queryRelation
 } from '@/api/legendLibrary.js'
-import { Container } from 'element-ui'
 
 function hexToRgba(hex) {
     let opacity = '',
@@ -388,12 +387,9 @@ export default {
             }
         },
         add() {
-            console.log(this.$refs.addLegend, 'tianjia')
-
             this.$refs.addLegend.open('', '添加图例库')
         },
         modifyClick(row) {
-            console.log(this.$refs.addLegend, 'xiugai')
             this.$refs.addLegend.open(row, '修改图例库')
         },
         modalConfirm() {