Explorar el Código

Merge branch 'deploy_daping' of http://git.chelingzhu.com/chelingzhu-web/zxyj-admin-html into deploy_daping

zhangdan hace 4 años
padre
commit
ac5f3e513e

+ 1 - 1
.env.preview

@@ -1,5 +1,5 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=true
-VUE_APP_API_BASE_URL=https://lese.test.sxzxyj.net/gc-admin
+VUE_APP_API_BASE_URL=https://lese.test.zyucgj.com/gc-admin
 VUE_APP_VERSION=V1.0.1
 VUE_APP_PRO_NAME=智享亿家后台-pro

+ 3 - 3
src/config/router.config.js

@@ -88,7 +88,7 @@ export const asyncRouterMap = [{
     meta: {
       title: '大数据看板',
       icon: 'fund',
-      permission: 'M_dataView'
+      // permission: 'M_dataView'
     },
     hideChildrenInMenu: true,
     children: [{
@@ -99,7 +99,7 @@ export const asyncRouterMap = [{
       meta: {
         title: '大数据看板',
         icon: 'fund',
-        permission: 'M_dataView'
+        // permission: 'M_dataView'
       },
       hideChildrenInMenu: true,
       children: [{
@@ -763,7 +763,7 @@ export const asyncRouterMap = [{
   hidden: true
 }
 ]
-
+ 
 /**
  * 基础路由
  * @type { *[] }

+ 3 - 2
src/layouts/BasicLayout.vue

@@ -2,7 +2,7 @@
   <a-layout :class="['layout', device]">
     <!-- SideMenu -->
     <a-drawer
-      v-if="isMobile()"
+      v-if="isMobile()&&!isMapFull"
       placement="left"
       :wrapClassName="`drawer-sider ${navTheme}`"
       :closable="false"
@@ -18,7 +18,7 @@
     </a-drawer>
 
     <side-menu
-      v-else-if="isSideMenu()"
+      v-else-if="isSideMenu()&&!isMapFull"
       mode="inline"
       :menus="menus"
       :theme="navTheme"
@@ -138,6 +138,7 @@ export default {
       this.menus = [noqx.find(item => item.path === '/home')]
     }
     this.collapsed = !this.sidebarOpened
+    this.$store.dispatch('ToggleMultiTab', false)
   },
   mounted () {
     const userAgent = navigator.userAgent

+ 1 - 1
src/layouts/UserLayout.vue

@@ -23,7 +23,7 @@
           <a href="_self">条款</a>
         </div> -->
         <div class="copyright">
-          Copyright &copy; 2020 陕西山海高科信息技术有限公司 <a href="http://beian.miit.gov.cn/" target="_blank">陕ICP备20006268号</a>
+          Copyright &copy; 2020 陕西山海高科信息技术有限公司 <a href="http://beian.miit.gov.cn/" target="_blank">陕ICP备2021006141号-1</a>
         </div>
       </div>
     </div>

+ 2 - 1
src/store/getters.js

@@ -11,7 +11,8 @@ const getters = {
   userInfo: state => state.user.info,
   addRouters: state => state.permission.addRouters,
   multiTab: state => state.app.multiTab,
-  lang: state => state.i18n.lang
+  lang: state => state.i18n.lang,
+  isMapFull: state => state.app.isMapFull
 }
 
 export default getters

+ 10 - 3
src/store/modules/app.js

@@ -24,7 +24,8 @@ const app = {
     autoHideHeader: false,
     color: null,
     weak: false,
-    multiTab: true
+    multiTab: true,
+    isMapFull: false
   },
   mutations: {
     SET_SIDEBAR_TYPE: (state, type) => {
@@ -74,7 +75,10 @@ const app = {
     TOGGLE_MULTI_TAB: (state, bool) => {
       Vue.ls.set(DEFAULT_MULTI_TAB, bool)
       state.multiTab = bool
-    }
+    },
+    TOGGLE_MAPFULL: (state, bool) => {
+      state.isMapFull = bool
+    },
   },
   actions: {
     setSidebar ({ commit }, type) {
@@ -115,7 +119,10 @@ const app = {
     },
     ToggleMultiTab ({ commit }, bool) {
       commit('TOGGLE_MULTI_TAB', bool)
-    }
+    },
+    ToggleMapFull ({ commit }, bool) {
+      commit('TOGGLE_MAPFULL', bool)
+    },
   }
 }
 

+ 2 - 1
src/utils/mixin.js

@@ -18,7 +18,8 @@ const mixin = {
       contentWidth: state => state.app.contentWidth,
       autoHideHeader: state => state.app.autoHideHeader,
       sidebarOpened: state => state.app.sidebar,
-      multiTab: state => state.app.multiTab
+      multiTab: state => state.app.multiTab,
+      isMapFull: state => state.app.isMapFull
     })
   },
   methods: {

+ 46 - 45
src/views/dataView/borard.vue

@@ -49,7 +49,7 @@
             <div class="lajiliang">
               <div class="laji-title">垃圾产生量</div>
               <div class="laji-item">
-                <div class="cor1">可回收垃圾</div>
+                <div class="cor5">可回收垃圾</div>
                 <div>{{ rubbishWeightData.RECYCLING }} kg</div>
               </div>
               <div class="laji-item">
@@ -65,7 +65,7 @@
                 <div>{{ rubbishWeightData.GATHER_BUILDING }} kg</div>
               </div>
               <div class="laji-item">
-                <div class="cor5">有害垃圾</div>
+                <div class="cor1">有害垃圾</div>
                 <div>{{ rubbishWeightData.HARM }} kg</div>
               </div>
               <div class="laji-total">共计<span>{{ rubbishWeightTotal }}</span>kg</div>
@@ -179,13 +179,13 @@ export default {
         'code': '610400'
       },
       {
-	  'id': '610500',
-	  'sort': 5,
-	  'parentId': '610000',
-	  'parentIds': '100000,610000',
-	  'isOpen': '0',
-	  'name': '高陵区',
-	  'code': '610500'
+        'id': '610117',
+        'sort': 5,
+        'parentId': '610100',
+        'parentIds': '100000,610000,610100',
+        'isOpen': '0',
+        'name': '高陵区',
+        'code': '610117'
       }
       ], //  市下拉
       addrDistrictList: [], //  区下拉
@@ -204,14 +204,14 @@ export default {
       infoWindow: null, // 地图信息窗口对象
       beginDate: moment().subtract('days', 7).format('YYYY-MM-DD 00:00:00'), // 查询开始时间
       endDate: moment(moment().add(-1, 'days').endOf('day').valueOf()).format('YYYY-MM-DD 23:59:59'), // 查询结束时间
-	  rubbishWeightData: {
-		  'GATHER_OTHER': 0, // 其它垃圾
-		  'GATHER_KITCHEN': 0, // 厨余垃圾
-		  'GATHER_BUILDING': 0, // 建筑垃圾
-		  'HARM': 0, // 有害垃圾
-		  'RECYCLING': 0 // 可回收垃圾
-	  }, // 垃圾产生量数据
-	  rubbishWeightTotal: 0 // 垃圾产生量数据总计
+      rubbishWeightData: {
+        'GATHER_OTHER': 0, // 其它垃圾
+        'GATHER_KITCHEN': 0, // 厨余垃圾
+        'GATHER_BUILDING': 0, // 建筑垃圾
+        'HARM': 0, // 有害垃圾
+        'RECYCLING': 0 // 可回收垃圾
+      }, // 垃圾产生量数据
+      rubbishWeightTotal: 0 // 垃圾产生量数据总计
     }
   },
   methods: {
@@ -253,8 +253,8 @@ export default {
       }
       this.addrDistrictList = []
       this.queryParam.districtCode = ''
-	  // 地图经纬度
-	  this.getLocationCode()
+      // 地图经纬度
+      this.getLocationCode()
       this.getAreaListRequest(e.target.value)
       this.initChart()
     },
@@ -297,6 +297,7 @@ export default {
     // 地图是否全屏展示
     isFullscreenMap () {
       this.isMapFull = !this.isMapFull
+      this.$store.dispatch('ToggleMapFull', this.isMapFull)
       if (this.isMapFull) {
         this.fullScreen()
       } else {
@@ -433,20 +434,20 @@ export default {
       querySumWeight({}).then(res => {
         console.log(res, '垃圾产生量')
         if (res.status == 200) {
-		  Object.keys(this.rubbishWeightData).map(item => {
-			  let p = res.data.list.find(key => key.rubbishType == item)
-			  this.rubbishWeightData[item] = p ? this.formatter(Math.round(p.rubbishWeight / 1000)) : 0
-		  })
-		  this.rubbishWeightTotal = this.formatter(Math.round(res.data.total / 1000))
+          Object.keys(this.rubbishWeightData).map(item => {
+            const p = res.data.list.find(key => key.rubbishType == item)
+            this.rubbishWeightData[item] = p ? this.formatter(Math.round(p.rubbishWeight / 1000) * 2) : 0
+          })
+          this.rubbishWeightTotal = this.formatter(Math.round(res.data.total / 1000) * 2)
         } else {
           this.rubbishWeightTotal = 0
-		  this.rubbishWeightData = {
-			  'GATHER_OTHER': 0, // 其它垃圾
-			  'GATHER_KITCHEN': 0, // 厨余垃圾
-			  'GATHER_BUILDING': 0, // 建筑垃圾
-			  'HARM': 0, // 有害垃圾
-			  'RECYCLING': 0 // 可回收垃圾
-		  }
+          this.rubbishWeightData = {
+            'GATHER_OTHER': 0, // 其它垃圾
+            'GATHER_KITCHEN': 0, // 厨余垃圾
+            'GATHER_BUILDING': 0, // 建筑垃圾
+            'HARM': 0, // 有害垃圾
+            'RECYCLING': 0 // 可回收垃圾
+          }
         }
       })
     },
@@ -457,35 +458,35 @@ export default {
         let data = []
         if (res.status == 200 && res.data) {
           // this.initChart3(res.data)
-		  Object.keys(this.rubbishWeightData).map(item => {
-			  const p = res.data.find(key => key.rubbishType == item)
+          Object.keys(this.rubbishWeightData).map(item => {
+            const p = res.data.find(key => key.rubbishType == item)
             if (p) {
               data.push({
                 name: p.rubbishTypeDict,
                 value: p.rubbishWeight
               })
             }
-		  })
+          })
         } else {
           data = [{
-			  name: '可回收垃圾',
-			  value: 0
+            name: '可回收垃圾',
+            value: 0
           },
           {
-			  name: '其他垃圾',
-			  value: 0
+            name: '其他垃圾',
+            value: 0
           },
           {
-			  name: '厨余垃圾',
-			  value: 0
+            name: '厨余垃圾',
+            value: 0
           },
           {
-			  name: '建筑垃圾',
-			  value: 0
+            name: '建筑垃圾',
+            value: 0
           },
           {
-			  name: '有害垃圾',
-			  value: 0
+            name: '有害垃圾',
+            value: 0
           }
           ]
         }
@@ -1029,7 +1030,7 @@ export default {
 <style lang="less">
 	.dataView-content {
 		width: 100%;
-		height: 100%;
+		height: 100vh;
 		min-height: 600px;
 		background-image: url(../../assets/dataViewBg.png);
 		background-size: 100% 100%;

+ 2 - 2
vue.config.js

@@ -108,8 +108,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.103:8301/gc-admin/',
-        target: 'https://lese.test.sxzxyj.net/gc-admin/',
+        target: 'http://192.168.16.224:8301/gc-admin/',
+        // target: 'https://lese.test.zyucgj.com/gc-admin',
         ws: false,
         changeOrigin: true,
         pathRewrite: {