zhulizhen1111 4 years ago
parent
commit
a2aced1532

+ 3 - 0
src/components/Rotation/src/rotation.vue

@@ -21,6 +21,9 @@ export default {
     props: ['rotationImg'],
     data() {
         return {}
+    },
+    mounted() {
+        console.log(this.rotationImg)
     }
 }
 </script>

+ 24 - 6
src/components/menuList.vue

@@ -33,9 +33,9 @@
 <script>
 import { formatTime } from '@/utils/format.js'
 export default {
-    props: ['modelNum'],
     data() {
         return {
+            state: '',
             list: [
                 { name: '首页', state: false, route: 'first' },
                 { name: '项目概况', state: false, route: 'overview' },
@@ -52,9 +52,26 @@ export default {
     },
     computed: {},
     created() {},
-    mounted() {},
-    watch: {
+    mounted() {
+        let val = ''
+        if (location.pathname.split('/')[3] == 'first') {
+            this.modelNum(1)
+        } else if (location.pathname.split('/')[3] == 'overview') {
+            this.modelNum(2)
+        } else if (location.pathname.split('/')[3] == 'floorFunc') {
+            this.modelNum(3)
+        } else if (location.pathname.split('/')[3] == 'equipment') {
+            this.modelNum(4)
+        } else if (location.pathname.split('/')[3] == 'other') {
+            this.modelNum(5)
+        } else if (location.pathname.split('/')[3] == 'analysis') {
+            this.modelNum(6)
+        }
+    },
+    watch: {},
+    methods: {
         modelNum(val) {
+            console.log(val)
             this.list = this.list.map((item, index) => {
                 if (val == index + 1) {
                     item.state = true
@@ -63,16 +80,17 @@ export default {
                 }
                 return item
             })
-        }
-    },
-    methods: {
+        },
         clickEventAcitve(item) {
+            console.log(item)
             this.list.forEach(ele => {
                 ele.state = false
             })
             item.state = true
+            this.state = item.state
             this.$router.push({ path: `/home/${item.route}` })
         },
+
         dumpLegend() {
             this.$router.push({ path: `/home/legendLibrary` })
         }

+ 35 - 25
src/utils/plugins/components.js

@@ -10,7 +10,7 @@ var system = [
                     label: "系统原理图",
                     children: [],
                     id: "GDYL",
-                    param: { tab_code: "1592" },
+                    param: { tab_code: "1592", type_code: "2010" },
                 },
                 {
                     label: "变配电室内部设备清单",
@@ -94,23 +94,23 @@ var system = [
                         {
                             label: "空调系统原理图",
                             id: "NTYL1",
-                            param: { tab_code: "1572" },
+                            param: { tab_code: "1572", type_code: "2012" },
                         },
                         {
-                            label: "超市空调系统原理图",
+                            label: "采暖系统原理图",
                             id: "NTYL2",
-                            param: { tab_code: "1512" },
+                            param: { tab_code: "1512", type_code: "2011" },
                         },
                         {
                             label: "分水器支路分布明细",
                             id: "NTYL3",
-                            param: { tab_code: "1502" },
-                        },
-                        {
-                            label: "分水器支路分布图",
-                            id: "NTYL4",
-                            param: { tab_code: "1542" },
+                            param: { tab_code: "1502", type_code: "2013" },
                         },
+                        // {
+                        //     label: "分水器支路分布图",
+                        //     id: "NTYL4",
+                        //     param: { tab_code: "1542" },
+                        // },
                     ],
                 },
                 {
@@ -198,26 +198,27 @@ var system = [
                         {
                             label: "消防电系统原理示意图",
                             id: "XFYL1",
-                            param: { tab_code: "1572" },
+                            param: { tab_code: "1572", type_code: "2014" },
                         },
                         {
                             label: "消防喷淋系统示意图",
                             id: "XFYL2",
-                            param: { tab_code: "1552" },
+                            param: { tab_code: "1552", type_code: "2015" },
                         },
                         {
                             label: "消防窗喷系统示意图",
                             id: "XFYL3",
-                            param: { tab_code: "1542" },
+                            param: { tab_code: "1542", type_code: "2016" },
                         },
                         {
                             label: "消防栓系统示意图",
                             id: "XFYL4",
+                            param: { tab_code: "1545", type_code: "2017" },
                         },
-                        {
-                            label: "消防泵房引出管路分布图",
-                            id: "XFYL5",
-                        },
+                        // {
+                        //     label: "消防泵房引出管路分布图",
+                        //     id: "XFYL5",
+                        // },
                     ],
                     id: "XFYL",
                 },
@@ -296,17 +297,17 @@ var system = [
                         {
                             label: "视频监控系统原理图",
                             id: "RDYL1",
-                            param: { tab_code: "1572" },
+                            param: { tab_code: "1572", type_code: "2018" },
                         },
                         {
                             label: "门禁管理系统原理图",
                             id: "RDYL2",
-                            param: { tab_code: "rd01" },
+                            param: { tab_code: "rd01", type_code: "2019" },
                         },
                         {
                             label: "BA楼宇智能化系统原理图",
                             id: "RDYL3",
-                            param: { tab_code: "1574" },
+                            param: { tab_code: "1574", type_code: "2010" },
                         },
                     ],
                     id: "RDYL",
@@ -402,12 +403,12 @@ var system = [
                         {
                             label: "给水系统原理示意图",
                             id: "GSYL1",
-                            param: { tab_code: "1572" },
+                            param: { tab_code: "1572", type_code: "2021" },
                         },
                         {
                             label: "排水系统原理示意图",
                             id: "GSYL2",
-                            param: { tab_code: "1542" },
+                            param: { tab_code: "1542", type_code: "2022" },
                         },
                     ],
                 },
@@ -491,12 +492,12 @@ var system = [
                         {
                             label: "扶梯原理图",
                             id: "DTYL1",
-                            param: { tab_code: "1572" },
+                            param: { tab_code: "1572", type_code: "2023" },
                         },
                         {
                             label: "直梯原理图",
                             id: "DTYL2",
-                            param: { tab_code: "1072" },
+                            param: { tab_code: "1072", type_code: "2024" },
                         },
                     ],
                     id: "DTYL",
@@ -558,6 +559,7 @@ var system = [
                     label: "系统原理图",
                     children: [],
                     id: "RQYL",
+                    param: { tab_code: "234", type_code: "2025" },
                 },
                 {
                     label: "主要设备清单",
@@ -614,19 +616,27 @@ var system = [
             children: [
                 {
                     label: "建筑立面图",
-                    id: "TJLM",
+                    id: "TJYL",
                     children: [
                         {
                             label: "西面外立面",
+                            id: "RQYL",
+                            param: { tab_code: "2340", type_code: "2027" },
                         },
                         {
                             label: "南面外立面",
+                            id: "RQYL",
+                            param: { tab_code: "2341", type_code: "2028" },
                         },
                         {
                             label: "东面外立面",
+                            id: "RQYL",
+                            param: { tab_code: "2342", type_code: "2026" },
                         },
                         {
                             label: "北面外立面",
+                            id: "RQYL",
+                            param: { tab_code: "2343", type_code: "2029" },
                         },
                     ],
                 },

+ 127 - 61
src/views/equipment/eqDialog.vue

@@ -1,57 +1,63 @@
 <template>
     <!-- 设备设施的三级路由的tabs -->
     <div class='dialog-container'>
-        <el-dialog :title='`${systemName}-${dialogInfo.label}`' :visible.sync='visible' :fullscreen='true'>
-            <!-- 除了清单和原理页面,别的都有记录事项detailDialog页面 -->
-            <div slot='title' class='header-title' v-if='Object.keys(dialogInfo).length>0'>
-                <span class='title-name'>{{systemName}}-{{dialogInfo.label}}</span>
-                <img v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL"' src='../../assets/imgs/zy1.png' @click='visibalBox' alt />
-            </div>
-            <!-- 没有tab的页面 -->
-            <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0'>
-                <!-- 原理图 -->
-                <div v-if='dialogInfo.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
-                    <rotation :rotationImg='rotationImg'></rotation>
+        <Modal :show='visible' :title='`${systemName}-${dialogInfo.label}`' mode='full' @close='modalClose' @confirm='modalConfirm'>
+            <template #content>
+                <!-- 除了清单和原理页面,别的都有记录事项detailDialog页面 -->
+                <div slot='title' class='header-title' v-if='Object.keys(dialogInfo).length>0'>
+                    <!-- <span class='title-name'>{{systemName}}-{{dialogInfo.label}}</span> -->
+                    <img
+                        v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL" && dialogInfo.id.slice(0,4)!="GJSP"'
+                        src='../../assets/imgs/zy1.png'
+                        @click='visibalBox'
+                        alt
+                    />
                 </div>
-                <!-- 土建系统主要材料清单 -->
-                <tj-table v-else-if='dialogInfo.id.slice(0,4)=="TJQD"' :param='param'></tj-table>
-                <!-- 主要设备清单 标准设备表格 -->
-                <standTable v-else-if='dialogInfo.id.slice(2,4)=="QD"' :param='param' :major='dialogInfo.id'></standTable>
-                <!-- 电井商铺范围清单 -->
-                <djsp-table v-else-if='dialogInfo.id.slice(0,4)=="GJSP"'></djsp-table>
-                <!-- 查看图纸 -->
-                <look-page v-else-if='dialogInfo.id.slice(2,4)=="TZ"' param major></look-page>
-            </div>
-            <!-- 有tab的页面 -->
-            <div v-else>
-                <el-tabs v-model='activeName' @tab-click='handleClick' v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length>0'>
-                    <el-tab-pane
-                        v-for='(value,index) in dialogInfo.children'
-                        :key='"u"+index'
-                        :label='`${value.label}`'
-                        :name='`${value.param.tab_code}`'
-                    >
-                        <!-- 有tab的原理图 -->
-                        <div v-if='value.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
-                            <rotation :rotationImg='rotationImg'></rotation>
-                        </div>
-                        <!-- 主要设备清单 标准设备表格加tab -->
-                        <tableList v-else-if='value.id.slice(0,4)=="RDQD"' :param='param' ref='list1' major='弱电'></tableList>
-                        <tableList v-else-if='value.id.slice(0,4)=="NTQD"' :param='param' ref='list2' major='暖通'></tableList>
-                        <!-- 维保表格 -->
-                        <wb-table v-else-if='value.id.slice(2,4)=="WB"' :smsxt='smsxt' :major='dialogInfo.id'></wb-table>
-                        <!-- 维修的表格 -->
-                        <wx-table v-else-if='value.id.slice(2,4)=="WX"' :smsxt='smsxt' :major='dialogInfo.id'></wx-table>
-                        <!-- 专维 -->
-                        <zw-table v-else-if='value.id.slice(2,4)=="ZW"' :smsxt='smsxt' :major='dialogInfo.id'></zw-table>
-                        <!-- 其他 -->
-                        <other-table v-else-if='value.id.slice(2,4)=="QT"' :smsxt='smsxt' :major='dialogInfo.id'></other-table>
-                        <!-- 建筑立面图 -->
-                        <tj-build-table v-else-if='value.id.slice(0,4)=="TJLM"'></tj-build-table>
-                    </el-tab-pane>
-                </el-tabs>
-            </div>
-        </el-dialog>
+                <!-- 没有tab的页面 -->
+                <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0' style='margin:16px 24px 0 24px'>
+                    <!-- 原理图 -->
+                    <div v-if='dialogInfo.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
+                        <rotation :rotationImg='rotationImg'></rotation>
+                    </div>
+                    <!-- 土建系统主要材料清单 -->
+                    <tj-table v-else-if='dialogInfo.id.slice(0,4)=="TJQD"' :param='param'></tj-table>
+                    <!-- 主要设备清单 标准设备表格 -->
+                    <standTable v-else-if='dialogInfo.id.slice(2,4)=="QD"' :param='param' :major='dialogInfo.id'></standTable>
+                    <!-- 电井商铺范围清单 -->
+                    <djsp-table v-else-if='dialogInfo.id.slice(0,4)=="GJSP"'></djsp-table>
+                    <!-- 查看图纸 -->
+                    <look-page v-else-if='dialogInfo.id.slice(2,4)=="TZ"' param major></look-page>
+                </div>
+                <!-- 有tab的页面 -->
+                <div v-else style='margin:16px 24px 0 24px;'>
+                    <el-tabs v-model='activeName' @tab-click='handleClick' v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length>0'>
+                        <el-tab-pane
+                            v-for='(value,index) in dialogInfo.children'
+                            :key='"u"+index'
+                            :label='`${value.label}`'
+                            :name='`${value.param.tab_code}`'
+                            @click='tabClick(value)'
+                        >
+                            <!-- 有tab的原理图 -->
+                            <div v-if='value.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
+                                <rotation :rotationImg='rotationImg'></rotation>
+                            </div>
+                            <!-- 主要设备清单 标准设备表格加tab -->
+                            <tableList v-else-if='value.id.slice(0,4)=="RDQD"' :param='param' ref='list1' major='弱电'></tableList>
+                            <tableList v-else-if='value.id.slice(0,4)=="NTQD"' :param='param' ref='list2' major='暖通'></tableList>
+                            <!-- 维保表格 -->
+                            <wb-table v-else-if='value.id.slice(2,4)=="WB"' :smsxt='smsxt' :major='dialogInfo.id'></wb-table>
+                            <!-- 维修的表格 -->
+                            <wx-table v-else-if='value.id.slice(2,4)=="WX"' :smsxt='smsxt' :major='dialogInfo.id'></wx-table>
+                            <!-- 专维 -->
+                            <zw-table v-else-if='value.id.slice(2,4)=="ZW"' :smsxt='smsxt' :major='dialogInfo.id'></zw-table>
+                            <!-- 其他 -->
+                            <other-table v-else-if='value.id.slice(2,4)=="QT"' :smsxt='smsxt' :major='dialogInfo.id'></other-table>
+                        </el-tab-pane>
+                    </el-tabs>
+                </div>
+            </template>
+        </Modal>
         <!--记录表格 -->
         <record-dialog ref='Dialog'></record-dialog>
     </div>
@@ -67,7 +73,7 @@ import otherTable from './table/otherTable'
 import wxTable from './table/wxTable'
 import recordDialog from './table/recordDialog'
 import djspTable from './table/djspTable'
-import { queryPic } from '@/api/public.js'
+import { queryPic, queryTab } from '@/api/public.js'
 export default {
     props: ['systemName', 'smsxt'],
     data() {
@@ -75,46 +81,98 @@ export default {
             activeName: '',
             visible: false,
             dialogInfo: {},
-            param: '',
-            rotationImg: [require('@/assets/imgs/eq.jpg'), require('@/assets/imgs/survey_pop2.png'), require('@/assets/imgs/survey_pop1.png')]
+            param: '', //区分清单tab
+            typecode: '', //区分原理图的tab
+            rotationImg: []
         }
     },
     mounted() {},
     components: { tableList, tjTable, wbTable, zwTable, lookPage, standTable, otherTable, wxTable, recordDialog, djspTable },
     methods: {
+        modalClose() {
+            this.visible = false
+        },
+        modalConfirm() {
+            console.log('alertConfirm')
+        },
+        //打开弹窗
         showModal(item) {
             this.visible = true
             this.dialogInfo = item
             if (Object.keys(this.dialogInfo).length > 0 && this.dialogInfo.children.length > 0) {
                 this.activeName = this.dialogInfo.children[0].param.tab_code
+                this.typecode = this.dialogInfo.children[0].param.type_code
+                if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL') {
+                    this.isShowTab()
+                    this.initImage(this.typecode)
+                }
             } else {
                 this.activeName = this.dialogInfo.param.tab_code
+                this.typecode = this.dialogInfo.param.type_code
+                if (this.dialogInfo.id.slice(2, 4) == 'YL') {
+                    this.isShowTab()
+                    this.initImage(this.typecode)
+                }
             }
+            console.log(this.dialogInfo)
             this.param = this.activeName
         },
-        handleClick(tab) {
-            console.log(tab)
+        //点击tab函数
+        handleClick(tab, event) {
+            console.log(tab.index)
             if (this.param) {
                 this.param = tab.name
             } else if (this.smsxt) {
                 this.smsxt = tab.name
             }
             this.activeName = tab.name
-            this.initImage()
+            //原理图的tab怎么传typecode
+            if (this.dialogInfo.children.length > 0) {
+                this.typecode = this.dialogInfo.children[`${tab.index}`].param.type_code
+            }
+            this.initImage(this.typecode)
+        },
+        tabClick(value) {
+            console.log(value, '-----.')
         },
-
         visibalBox() {
             this.$refs.Dialog.open(this.dialogInfo.id)
         },
-        initImage() {
+        //系统原理图接口
+        initImage(typecode) {
             let getParams = {
-                data: { tyepcode: 8, plazaId: '1001145', system: this.systemName.slice(0, 2) },
-                params: {}
+                data: {
+                    plazaId: this.$store.state.plazaId,
+                    system: this.systemName.slice(0, 2),
+                    tyepcode: typecode
+                }
             }
             queryPic(getParams).then(res => {
-                console.log('resres', res)
                 this.rotationImg = res.data
             })
+        },
+        //原理图没图片不显示tab
+        isShowTab() {
+            let data = {
+                plazaId: this.$store.state.plazaId,
+                major: this.systemName.slice(0, 2)
+            }
+            let postParams = []
+            if (this.dialogInfo.children.length == 0) {
+                postParams[0].params.tyepcode = this.dialogInfo.param.type_code
+                postParams[0].tableName = 'v_glsms_confrguring'
+            } else {
+                this.dialogInfo.children.forEach(el => {
+                    postParams.push({
+                        'params.tyepcode': el.param.type_code,
+                        tableName: 'v_glsms_confrguring'
+                    })
+                })
+            }
+
+            queryTab({ data, postParams }).then(res => {
+                console.log(res)
+            })
         }
     }
 }
@@ -127,6 +185,11 @@ export default {
         color: #000;
         font-weight: bold;
     }
+    .header-title {
+        position: absolute;
+        top: 15px;
+        left: 220px;
+    }
 }
 .top {
     width: 1366px;
@@ -186,5 +249,8 @@ export default {
         color: #025baa;
         border-color: #025baa;
     }
+    .p-modal-content {
+        overflow-y: hidden;
+    }
 }
 </style>

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

@@ -98,7 +98,7 @@
 import Select from '@/components/Select/Select.vue'
 import { mapGetters } from 'vuex'
 import { queryAsset } from '@/api/equipmentList.js'
-import { querySelect, queryTab } from '@/api/public.js'
+import { querySelect } from '@/api/public.js'
 import inputDialog from './inputDIalog'
 export default {
     data() {

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

@@ -129,8 +129,7 @@ export default {
             }
             let data = {
                 major: major,
-                plazaId: '1000287'
-                // plazaId: this.$store.state.plazaId
+                plazaId: this.$store.state.plazaId
             }
             querySelect({ data, postParams }).then(res => {
                 console.log(res)

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

@@ -61,8 +61,7 @@ export default {
             let getParams = {
                 page: this.currentPage,
                 size: this.size,
-                // plazaId: this.$store.state.plazaId,
-                plazaId: '1000303'
+                plazaId: this.$store.state.plazaId
                 // major: this.major,
             }
             getParams.keyword = ''

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

@@ -170,8 +170,7 @@ export default {
             let getParams = {
                 data: {
                     smsxt: this.smsxt,
-                    // plazaId: this.$store.state.plazaId,
-                    plazaId: '1000287',
+                    plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
                     size: this.size,
                     orderBy: `wb_gzglid,0;sbjbm,1;reportdate,0;`

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

@@ -179,8 +179,7 @@ export default {
                 data: {
                     smsxt: this.smsxt,
                     // tab: this.major,
-                    // plazaId: this.$store.state.plazaId,
-                    plazaId: '1000388',
+                    plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
                     size: this.size,
                     orderBy: `sbjbm,0;sjjssj,1`

+ 2 - 4
src/views/equipment/table/zwTable.vue

@@ -187,8 +187,7 @@ export default {
             }
             let data = {
                 major: major,
-                plazaId: '1000287'
-                // plazaId: this.$store.state.plazaId
+                plazaId: this.$store.state.plazaId
             }
             querySelect({ data, postParams }).then(res => {
                 console.log(res)
@@ -230,8 +229,7 @@ export default {
             let getParams = {
                 data: {
                     smsxt: this.smsxt,
-                    // plazaId: this.$store.state.plazaId,
-                    plazaId: '1000287',
+                    plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
                     size: this.size
                 }

+ 3 - 3
src/views/index.vue

@@ -29,11 +29,11 @@ export default {
     },
     methods: {
         handlerouterName(val) {
-            // console.log(val);
+            console.log(val)
             this.routerName = val
-            if (val == 'device') {
+            if (val == 'de') {
                 this.modelNum = 3
-            } else if (val == 'floor') {
+            } else if (val == 'floorFunc') {
                 this.modelNum = 2
             }
         }

+ 6 - 5
vue.config.js

@@ -9,11 +9,11 @@ module.exports = {
                     "^/data": "",
                 },
             },
-            '/wdfn': {
-                target: 'http://map.wanda.cn',
+            "/wdfn": {
+                target: "http://map.wanda.cn",
                 changeOrigin: true,
                 pathRewrite: {
-                    '^/wdfn': '/editor/fmap',
+                    "^/wdfn": "/editor/fmap",
                 },
             },
             "/serve": {
@@ -24,6 +24,7 @@ module.exports = {
                 },
             },
         },
+        hot: true,
         // 关闭esline
         overlay: {
             warnings: false,
@@ -43,7 +44,7 @@ module.exports = {
     lintOnSave: false,
     publicPath: "/wandaBmGuide",
     // 打包名称
-    outputDir: 'wandaBmGuide',
+    outputDir: "wandaBmGuide",
     // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
-    assetsDir: 'static',
+    assetsDir: "static",
 }