Prechádzať zdrojové kódy

合并develop到smsweb_dev

yunxing 4 rokov pred
rodič
commit
331b8d8132

BIN
src/assets/images/icons/arrow.png


BIN
src/assets/images/icons/grey.png


+ 1 - 17
src/components/menuList.vue

@@ -13,7 +13,7 @@
             <div
                 v-for='(item, index) in list'
                 :key='index'
-                :class='{ "is-active": item.state,"hide-home-page":item.hideHomePage }'
+                :class='{ "is-active": item.state }'
                 @click='clickEventAcitve(item, index)'
             >{{ item.name }}</div>
         </div>
@@ -48,8 +48,6 @@ export default {
         return {
             state: '',
             list: [
-                // { name: '', state: false, route: 'homepage' }, 
-                //TODO: 显示首页 liujiandong用户路由跳转处理
                 { name: '首页', state: false, route: 'homepage' },  
                 { name: '项目概况', state: false, route: 'overview' },
                 { name: '楼层功能', state: false, route: 'floorFunc' }, //楼层功能
@@ -81,11 +79,6 @@ export default {
         $route: 'handleRoute'
     },
     created() {
-        console.log('menulist created,',this.$store.state.userInfo)
-        // 非liujiandong用户,隐藏首页入口
-        if(this.$store.state.userInfo.username !== 'liujiandong'){
-            this.$set(this.list,0,{ name: '', state: false, route: 'homepage', hideHomePage: true })
-        }
         this.currentTime()
     },
     mounted() {
@@ -263,16 +256,7 @@ export default {
             margin: 0 8px;
             cursor: pointer;
             transition: all 0.2s;
-            // TODO: 取消隐藏 首页菜单,
-            /* &:first-child {
-                display: none;
-            } */
-        }
-        // 改为动态根据 : 用户不是liujiandong时,隐藏首页
-        .hide-home-page{
-            display: none;
         }
-
         .is-active {
             color: #025baa;
             font-weight: bolder;

+ 2 - 11
src/router/index.js

@@ -34,20 +34,12 @@ const routes = [
         path: "/home",
         name: "home",
         component: () => import("../views/index"),
-        redirect: "/home/homepage",
+        // TODO: 1.默认跳转到项目概览
+        redirect: "/home/overview",
         children: [{
                 path: "homepage",
                 name: "项目首页",
                 component: () => import("../views/homepage"),
-                // TODO: 注释重定向到预览页面,liujiandong用户 路由跳转处理
-                // redirect: "/home/overview",
-                beforeEnter (to,from,next){
-                    if (store.state.userInfo.username !== 'liujiandong') {
-                        next('/home/overview')
-                    } else {
-                        next()
-                    }
-                }
             },
             //概览
             {
@@ -102,7 +94,6 @@ const router = new VueRouter({
 const ignore = ["/404"]
 
 router.beforeEach(async (to, from, next) => {
-
     // 如果路径上有plazaId就保存
     let plazaId = to.query.plazaId ?to.query.plazaId:''
     if (plazaId) {

+ 19 - 11
src/store/index.js

@@ -11,7 +11,7 @@ export default new Vuex.Store({
         ssoToken: 'admin:liujiandong',
         // ssoToken: '',
         // ssoToken: null,
-        plazaName: "",
+        plazaName: '',
         isPreview: false,
         lastRoute: '',
         isrequestAuth: null, // 是否请求登录校验接口
@@ -98,7 +98,7 @@ export default new Vuex.Store({
             // state.userInfo.orgCode = palyload.orgCode
             // state.userInfo.username = palyload.username
             // TODO: 设置用户名
-            if (palyload.username){
+            if (palyload.username) {
                 state.userInfo.username = palyload.username
             }
         },
@@ -209,9 +209,12 @@ export default new Vuex.Store({
                             commit('SETPLAZENAME', data.plazaName)
                             localStorage.setItem('PLAZAID', data.plazaId)
                             commit('STOREPLAZAID', data.plazaId)
-                            router.push({
-                                path: './home/homepage',
-                            })
+                            // TODO: 1.默认跳转到项目概览,如果是从项目首页刷新而来,进入项目首页
+                            if (window.location.href.indexOf('home/homepage') !== -1) {
+                                router.push({ path: './home/homepage' })
+                            } else {
+                                router.push({ path: './home/overview' })
+                            }
                         } else {
                             if (level == 0) {
                                 if (res.treeData[0].ccode) {
@@ -219,12 +222,17 @@ export default new Vuex.Store({
                                     commit('STOREPLAZAID', res.treeData[0].ccode)
                                     commit('SETPLAZENAME', res.treeData[0].cname)
                                 }
-                                router.push({
-                                    path: './home/overview',
-                                    query: {
-                                        plazaId: res.treeData[0].ccode,
-                                    },
-                                })
+                                // TODO: 1.默认跳转到项目概览,如果是从项目首页刷新而来,进入项目首页
+                                if (window.location.href.indexOf('home/homepage') !== -1) {
+                                    router.push({ path: './home/homepage' })
+                                } else {
+                                    router.push({
+                                        path: './home/overview',
+                                        query: {
+                                            plazaId: res.treeData[0].ccode,
+                                        },
+                                    })
+                                }
                             } else {
                                 router.push({
                                     path: './group',

+ 15 - 6
src/views/analysis/CoreDeviceReport.vue

@@ -29,7 +29,7 @@
           <div class="sec-row">
             <div>
               {{item.num}}
-              <span>台</span>
+              <span>{{systemId !== '1008'?'' : item.unitText}}</span>
             </div>
             <span :class="{'abnormal': item.abnormal}">{{item.statusNum !== 0?item.statusNum : ''}}</span>
           </div>
@@ -52,7 +52,7 @@
         style="width: 100%;margin-bottom: 63px;"
         @row-click="showEquipmentStatus"
       >
-        <el-table-column label="序号" type="index" width="60" :index="indexMethod"></el-table-column>
+        <el-table-column label="序号" prop="index" width="60"></el-table-column>
         <el-table-column prop="sbjc" label="设备名称" width="600"></el-table-column>
         <el-table-column prop="assetnum" label="设备内码"></el-table-column>
         <el-table-column prop="is_exception" label="状态">
@@ -311,7 +311,7 @@ export default {
             let itemData = {
               name: item.category_name,
               isMaintenance: item.is_detecting,
-              statusNum: item.is_exception_num,
+              statusNum: (item.category_code !== 'rdd' && item.category_code !== 'rqa')?item.is_exception_num : item.is_exception_workorder_num,
               num: item.asset_num,
               abnormal: item.is_exception_num !== 0,
               category_code: item.category_code
@@ -330,6 +330,15 @@ export default {
             return (o.isActive = i === 0);
           });
           const { query } = this.$route;
+          _.forEach(newData, (item) => {
+            if (item.category_code === 'tja') {
+              item.unitText = '个';
+            } else if (item.category_code === 'tjb'){
+              item.unitText = '段';
+            } else {
+              item.unitText = '台';
+            }
+          })
           this.systemContentData = newData;
           if (!_.isEmpty(query) && query.equipId) {
             _.map(this.systemContentData, o => {
@@ -368,6 +377,9 @@ export default {
         if (result === "success") {
           this.tatol = count;
           this.tableData = data;
+          _.forEach(this.tableData, (item, index) => {
+            item.index = ((this.curPage - 1) * this.pageSize )+ index + 1;
+          })
         }
       });
     },
@@ -485,7 +497,6 @@ export default {
      * 显示图片详情
      */
     showPicturesDetail(val, type) {
-      console.log("val", val);
       if (type === "equip") {
         if (!val.photos_num) {
           this.isClickPicture = true;
@@ -508,7 +519,6 @@ export default {
      * 显示附件详情
      */
     showReportDetail(val, type, e) {
-      console.log("val111", val);
       if (type === "equip") {
         if (!val.attachments_num) {
           this.isClickPicture = true;
@@ -547,7 +557,6 @@ export default {
         type: this.detailTitle === "图片预览" ? 0 : 1
       };
       queryDetailData("/data/base/queryFileDetails", param).then(res => {
-        console.log("res", res);
         const { result, data } = res;
         if (result === "success") {
           let newData = [];

+ 5 - 1
src/views/analysis/SpecificationUpdateRecord.vue

@@ -27,7 +27,11 @@
       <el-table-column property="time" label="日期"></el-table-column>
       <el-table-column property="evenType" label="事项类型"></el-table-column>
       <el-table-column property="objid" label="编号"></el-table-column>
-      <el-table-column property="content" label="更新内容"></el-table-column>
+      <el-table-column property="content" label="更新内容">
+        <template slot-scope="scope">
+          <div :title="scope.row.content" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{scope.row.content}}</div>
+        </template>
+      </el-table-column>
     </el-table>
     <div class="page">
       <el-pagination

+ 0 - 1
src/views/equipment/index.vue

@@ -272,7 +272,6 @@ export default {
         },
     },
     mounted() {
-        window._vm = this
         // if (Object.keys(this.floorObj).length > 0) {
         //     this.floorInfo = this.floorObj
         // }

+ 261 - 186
src/views/homepage/index.vue

@@ -1,78 +1,91 @@
 <template>
     <main class='homepage'>
         <section class='homepage-cards-content'>
-            <div class='cards-item' v-for='(item , index) in cardsList' :key='index' :style='itemStyle(item)'>
-                <h4>{{item.smsxtname}}</h4>
-                <div class='equipment-list' v-if='item.assetTypeList'>
-                    <div @click='navToInnerPage(item, equip)' class='equipment-item' v-for='(equip , index) in item.assetTypeList' :key="index">
-                        <div class='equip-name' >
-                            <h5>{{equip.category_name}}</h5>
-                            <div class='exception-number' v-if="equip.is_exception_num">{{equip.is_exception_num}}</div>
+ 
+            <div  v-for='(arr , index) in cardsList' :key='index' class="items-container">
+                <section v-for="(item ,index) in arr" :key="index" class='cards-item' :style='itemStyle(item)' >
+                    <section class="card-item-title">
+                        <img :src="imgSrc(item.smsxt)" />
+                        <h4>{{item.smsxtname}}</h4>
+                    </section>
+                    <section class='equipment-list-container'>
+                         <div class="more" @click.stop.capture="expandRestItems(item, index)" v-if="item.hasArrow" :style="{transform: item.expand ? 'rotate(0)' : 'rotate(180deg)'}">
+                            <img v-if="item.showColor" src="../../assets/images/icons/arrow.png">
+                            <img v-else src="../../assets/images/icons/grey.png">
                         </div>
-                        <section  >
-                            <div class='equip-statis'>
-                                <span class='equip-number'>{{equip.asset_num}}</span>
-                                <span class='equip-unit'>台</span>
+                        <div class='equipment-list' v-if='item.assetTypeList'>
+                            <div @click='navToInnerPage(item, equip)' class='equipment-item' v-for='(equip , index) in item.assetTypeList' :key="index">
+                                <div class='equip-name' >
+                                    <h5>{{equip.category_name}}</h5>
+                                    <div class='exception-number' v-if="equip.is_exception_num">{{equip.is_exception_num}}</div>
+                                </div>
+                                <section  >
+                                    <div class='equip-statis'>
+                                        <span class='equip-number'>{{equip.asset_num}}</span>
+                                        <span class='equip-unit'>{{equip.category_name === '屋面logo' ? '个' : equip.category_name === '玻璃护栏' ? '段' : '台'}}</span>
+                                    </div>
+                                    <div>
+                                        <em v-if='false'>维保中</em>
+                                    </div>
+                                </section>
                             </div>
-                            <div>
-                                <em v-if='false'>维保中</em>
+                        </div>
+                        <div class='equipment-list' v-if='item.restAssetTypeList.length && item.expand'>
+                            <div @click='navToInnerPage(item, equip)' class='equipment-item' v-for='(equip , index) in item.restAssetTypeList' :key="index">
+                                <div class='equip-name' >
+                                    <h5>{{equip.category_name}}</h5>
+                                    <div class='exception-number' v-if="equip.is_exception_num">{{equip.is_exception_num}}</div>
+                                </div>
+                                <section>
+                                    <div class='equip-statis'>
+                                        <span class='equip-number'>{{equip.asset_num}}</span>
+                                        <span class='equip-unit'>{{equip.category_name === '屋面logo' ? '个' : equip.category_name === '玻璃护栏' ? '段' : '台'}}</span>
+                                    </div>
+                                    <div>
+                                        <em v-if='false'>维保中</em>
+                                    </div>
+                                </section>
+                            </div>
+                        </div>
+                    </section>
+                    <!-- <div v-else class="empty-content"   style="border-top:none; height:8rem;line-height:8rem;">暂无数据</div> -->
+                    <div v-if="item.rptGlsmsStatisticsList && item.rptGlsmsStatisticsList.length" class="alert-list" @click="navToGanttPage(item)">
+                        <div class="alert-item"  v-for="(option , index) in  item.rptGlsmsStatisticsList" :key="index" >
+                            <img v-if="option.total"  :src="srcList[option.type][option.level]" > 
+                            <div  class="content" v-if="option.total">
+                                <p class="line">
+                                    <span >{{option.type === 1 ? '维保': option.type === 0 ? '专维' :  '第三方检测' }}</span>
+                                    <span>
+                                        <em :style="{color:item.level == 1? '#646C73':'#C13830'}">{{option.month_unfinished}}</em>/<em>{{option.unfinished}}</em>/<em >{{option.total}}</em></span>
+                                </p>
+                                <p class='desc'>
+                                    即将逾期/未完成/总数
+                                    <!-- {{option.type ===1 ? '即将逾期/当月未完成/总任务' :  '即将逾期/今年未完成/总任务' }} -->
+                                </p>
                             </div>
-                        </section>
-                    </div>
-                </div>
-                <div v-else class="empty-content"   style="border-top:none; height:8rem;line-height:8rem;">暂无数据</div>
-                <div v-if="item.rptGlsmsStatisticsList && item.rptGlsmsStatisticsList.length" class="alert-list" @click="navToGanttPage(item)">
-                    <div class="alert-item"  v-for="(option , index) in  item.rptGlsmsStatisticsList" :key="index" >
-                        <img v-if="option.total"  :src="srcList[option.type][option.level]" > 
-                        <div  class="content" v-if="option.total">
-                            <p class="line">
-                                <span >{{option.type === 1 ? '维保': option.type === 0 ? '专维' :  '第三方检测' }}</span>
-                                <span><em :style="{color:item.level == 1? '#646C73': item.level == 2 ? '#E07A04 ' :'#C13830'}">{{option.unfinished}}</em>/<em>{{option.total}}</em></span>
-                            </p>
-                            <p class='desc'>当月未完成/总任务</p>
                         </div>
                     </div>
-                </div>
-                <div v-else class='empty-content'>暂无数据</div>
+                    <div v-else class='empty-content'>暂无数据</div>
+                </section>
             </div>
         </section>
         <section class='homepage-nav-list'>
             <nav>
                 <div class='main-title'>
-                    <span>重点关注事项</span>
-                    <a @click='navToFocusItem'>更多</a>
-                </div>
-                <div class='table'>
-                    <div class='row table-header'>
-                        <article>日期</article>
-                        <article>政府部门</article>
-                        <article>记录事项</article>
-                    </div>
-                    <div class='table-body'>
-                        <div class='row' v-for='(item , index) in itemsList' :key='index'>
-                            <article>{{item.createdate}}</article>
-                            <article>{{item.department}}</article>
-                            <article>{{item.recordsx}}</article>
-                        </div>
-                    </div>
-                </div>
-            </nav>
-            <nav>
-                <div class='main-title'>
                     <span>说明书更新记录</span>
                     <a @click='navToIntroduce'>更多</a>
                 </div>
                 <div class='table'>
                     <div class='row table-header'>
-                        <article>日期</article>
-                        <article>事项类型</article>
-                        <article>更新内容</article>
+                        <article>日期 </article>
+                        <article>事项类型 </article>
+                        <article>更新内容 </article>
                     </div>
                     <div class='table-body'>
                         <div class='row' v-for='(item , index) in changeList' :key='index'>
                             <article>{{item.changedate}}</article>
                             <article>{{item.type}}</article>
-                            <article>{{item.content || '--'}}</article>
+                            <article :title="item.content">{{item.content || '--'}}</article>
                         </div>
                     </div>
                 </div>
@@ -87,7 +100,10 @@ import moment from 'moment'
 export default {
     data() {
         return {
-            cardsList: [],
+            cardsList: [
+                [],
+                []
+            ],
             itemsList: [],
             changeList: [],
             plazaId:'',
@@ -121,7 +137,22 @@ export default {
         this.getItemsQuery()
         this.getInstructionList()
     },
+
     methods: {
+        imgSrc(code) {
+            return require('../../assets/images/icons/' + code + '.png')
+        },
+        expandRestItems (item, index) {
+            this.cardsList.forEach(each => {
+                each.forEach(eq=>{
+                    if (eq.smsxt !== item.smsxt) {
+                        eq.expand = false
+                    }
+                    eq.selected = false
+                })
+            })
+            item.expand = !item.expand
+        },
           /**
          *  点击跳转进入综合事项管理页面
          */
@@ -177,19 +208,28 @@ export default {
                 if (res.result == 'success') {
                     let result = res.data
                     if (result && Array.isArray(result)) {
-                        result.forEach(item => {
+                        result.forEach((item, index) => {
+                            item.expand = false
                             if (item.assetTypeList) {
                                 let list = item.assetTypeList
                                 let len = list.length
-                                for (let i=0; i< len; i++) {
-                                    if (list[i] && !list[i].asset_num) {
-                                        list.splice(i, 1)
-                                        i--
-                                    }
+                                if (len > 3) {
+                                    item.hasArrow = true
+                                    item.assetTypeList = list.splice(0, 3)
+                                    item.restAssetTypeList = list
+                                    item.showColor = list.some(item => {return item.is_exception_num > 0})
+                                }else {
+                                    item.hasArrow = false
+                                    item.restAssetTypeList = []
                                 }
                             }
+                            if (index % 2 === 0) {
+                                this.cardsList[0].push(item)
+                            } else {
+                                this.cardsList[1].push(item)
+                            }
                         })
-                        this.cardsList = result
+                        console.log(this.cardsList)
                     }
                 }
             })
@@ -202,7 +242,7 @@ export default {
                 getParams: {
                     plazaId: this.plazaId,
                     page: 1,
-                    size: 10
+                    size: 13
                 }
             }
 
@@ -217,6 +257,10 @@ export default {
                             item.type = '维保'
                         } else if (item.objtype === 2) {
                             item.type = '第三方检测'
+                        } else if (item.objtype === 3) {
+                            item.type = '综合事项'
+                        } else if (item.objtype === 4) {
+                            item.type = '重要维修'
                         } else {
                             item.type = '重点关注'
                         }
@@ -266,141 +310,176 @@ export default {
     overflow: auto;
     .homepage-cards-content {
         display: flex;
-        flex-wrap: wrap;
-        justify-content: space-between;
-        align-content: flex-start;
-        width: 75%;
-        .cards-item {
-            width: calc(50% - 5px);
-            height: 24%;
-            padding: 0.4rem;
-            padding-bottom: 0;
-            margin-bottom: 1rem;
-            background: #fff;
-            box-shadow: 0 2px 10px 0 rgba(31, 36, 41, 0.06);
-            h4 {
-                color: rgba(31, 36, 41, 1);
-                padding: 1rem;
-                font-size: 1.6rem;
-                font-weight: bold;
-            }
-            .equipment-list {
-                display: flex;
-                padding:0 1rem 1.2rem;
-                .equipment-item {
-                    width: 33.33%;
-                    padding: 0.6rem;
-                    box-sizing: border-box;
-                    border-radius: 4px;
-                    cursor: pointer;
-                    .equip-name {
-                        position: relative;
-                        display: inline-block;
-                        h5 {
-                            position: relative;
-                            color: #1f2429;
-                            font-size: 1.4rem;
-                            em {
-                                margin-left: 1rem;
-                                color: #e19e51;
-                                font-size: 1.2rem;
+        width: 100%;
+        overflow: auto;
+        .items-container{
+            width: 50%;
+            .cards-item {
+                width: calc(100% - 5px);
+                height: auto;
+                padding: 0.4rem;
+                padding-bottom: 0;
+                margin-bottom: 1rem;
+                transition: 0.5s;
+                background: #fff;
+                border-radius: 4px;
+                box-shadow: 0 2px 10px 0 rgba(31, 36, 41, 0.06);
+                .card-item-title{
+                    display: flex;
+                    align-items: center;
+                    padding-left: 12px;
+                    h4 {
+                        color: rgba(31, 36, 41, 1);
+                        padding: 1rem;
+                        font-size: 1.6rem;
+                        font-weight: bold;
+                    }
+                    img{
+                        width: 24px;
+                        height: 24px;
+                        filter: saturate(0);
+                    }
+                }
+                .equipment-list-container{
+                    position: relative;
+                    .equipment-list {
+                        display: flex;
+                        flex-wrap: wrap;
+                        padding:0 1rem 1.2rem;
+                        .equipment-item {
+                            width: 33.33%;
+                            padding: 0.6rem;
+                            box-sizing: border-box;
+                            border-radius: 4px;
+                            cursor: pointer;
+                            .equip-name {
+                                position: relative;
+                                display: inline-block;
+                                h5 {
+                                    position: relative;
+                                    color: #1f2429;
+                                    font-size: 1.4rem;
+                                    em {
+                                        margin-left: 1rem;
+                                        color: #e19e51;
+                                        font-size: 1.2rem;
+                                    }
+                                }
+                                .exception-number {
+                                    position: absolute;
+                                    right: -20%;
+                                    top: -5px;
+                                    height: 1.6rem;
+                                    border-radius: 8rem;
+                                    padding: 0.2rem 0.4rem;
+                                    line-height: 1.2rem;
+                                    text-align: center;
+                                    font-size: 1.2rem;
+                                    color: #f54e45;
+                                    background: #ffe0df;
+                                }
+                            }
+                            section {
+                                display: flex;
+                                justify-content: flex-start;
+                                align-items: center;
+                                .equip-statis {
+                                    .equip-number {
+                                        font-size: 1.8rem;
+                                        font-weight: bold;
+                                        color: rgba(31, 36, 41, 1);
+                                    }
+                                    .equip-unit {
+                                        color: #ccc;
+                                        font-size: 1.2rem;
+                                    }
+                                }
                             }
                         }
-                        .exception-number {
-                            position: absolute;
-                            right: -20%;
-                            top: -5px;
-                            height: 1.6rem;
-                            border-radius: 8rem;
-                            padding: 0.2rem 0.4rem;
-                            line-height: 1.2rem;
-                            text-align: center;
-                            font-size: 1.2rem;
-                            color: #f54e45;
-                            background: #ffe0df;
+                        .equipment-item:hover {
+                            background: #f5f6f7;
                         }
                     }
-                    section {
+                    .more{
+                        position: absolute;
                         display: flex;
-                        justify-content: flex-start;
+                        justify-content: center;
                         align-items: center;
-                        .equip-statis {
-                            .equip-number {
-                                font-size: 1.8rem;
-                                font-weight: bold;
-                                color: rgba(31, 36, 41, 1);
-                            }
-                            .equip-unit {
-                                color: #ccc;
-                                font-size: 1.2rem;
-                            }
+                        width: 14px;
+                        height: 14px;
+                        right: 8px; 
+                        top: 40%;
+                        border-radius: 7px;
+                        cursor: pointer;
+                        transform: rotate(0);
+                        transform-origin: center;
+                        z-index: 10000;
+                        img{
+                            width:14px;
+                            height: 14px;
                         }
                     }
                 }
-                .equipment-item:hover {
-                    background: #f5f6f7;
-                }
-            }
-            .alert-list {
-                display: flex;
-                align-items: center;
-                justify-content: flex-start;
-                border-top: 1px solid #f5f6f7;
-                height: 44%;
-                border-radius: 4px;
-                cursor: pointer;
-                &:hover {
-                    background: #f5f6f7;
-                }
-                .alert-item {
+                .alert-list {
                     display: flex;
-                    width: 33.33%;
                     align-items: center;
-                    img {
-                        width: 4rem;
-                        height: 4rem;
-                        margin:0 1rem;
+                    justify-content: flex-start;
+                    border-top: 1px solid #f5f6f7;
+                    padding: 2rem 0;
+                    height: auto;
+                    border-radius: 4px;
+                    cursor: pointer;
+                    &:hover {
+                        background: #f5f6f7;
                     }
-                    .content {
-                        border-right: 1px solid #f5f6f7;
-                        padding-right: 2rem;
-                        .line {
-                            display: flex;
-                            justify-content: space-between;
-                            align-items: center;
-                            line-height: 1;
-                            span:first-child {
-                                margin-right: 1rem;
+                    .alert-item {
+                        display: flex;
+                        width: 33.33%;
+                        align-items: center;
+                        img {
+                            width: 4rem;
+                            height: 4rem;
+                            margin:0 1rem;
+                        }
+                        .content {
+                            padding-right: 2rem;
+                            .line {
+                                display: flex;
+                                justify-content: space-between;
+                                align-items: center;
+                                line-height: 1;
+                                span:first-child {
+                                    margin-right: 1rem;
+                                    font-size: 1.2rem;
+                                    color: #1f2429;
+                                    font-weight: bold;
+                                    white-space: nowrap;
+                                }
+                                em {
+                                    font-weight: normal;
+                                }
+                                em:first-child {
+                                    font-size: 1.6rem;
+                                    font-weight: bold;
+                                }
+                            }
+                            .desc {
+                                padding-top: 0.6rem;
+                                color: #8d9399;
                                 font-size: 1.2rem;
-                                color: #1f2429;
-                                font-weight: bold;
+                                text-align: right;
                                 white-space: nowrap;
                             }
-                            em {
-                                font-weight: normal;
-                            }
-                            em:first-child {
-                                font-size: 1.6rem;
-                                font-weight: bold;
-                            }
-                        }
-                        .desc {
-                            padding-top: 0.6rem;
-                            color: #8d9399;
-                            font-size: 1.2rem;
-                            text-align: right;
-                            white-space: nowrap;
                         }
                     }
                 }
-            }
-            .empty-content {
-                height: 9rem;
-                line-height: 9rem;
-                border-top: 1px solid #f5f6f7;
-
-                text-align: center;
-                color: #8d9399;
+                .empty-content {
+                    height: 8rem;
+                    line-height: 8rem;
+                    border-top: 1px solid #f5f6f7;
+                    text-align: center;
+                    color: #8d9399;
+                }
             }
         }
     }
@@ -472,17 +551,13 @@ export default {
             }
         }
         nav:first-child {
-            height: 40%;
-            .table-body {
-                height: 27vh;
-            }
-        }
-        nav:last-child {
-            height: calc(60% - 12px);
+            height: 96%;
             .table-body {
-                height: 45vh;
+                height: 75vh;
+                overflow-y: auto;
             }
         }
+       
     }
 }
 </style>

+ 164 - 98
src/views/statistics/index.vue

@@ -55,26 +55,34 @@
                             :key='index'
                         >
                             <div class='system-name'>
-                                <div :class='["img", item.selected ? "selected":""]'>
-                                    <img :src='imgSrc(item.smsxt)' />
-                                </div>
+                                <div :class='["img", item.selected ? "selected":""]'><img :src='imgSrc(item.smsxt)' /></div>
                                 <span>{{item.smsxtname}}</span>
                             </div>
-                            <div class='system-equipments' v-if='item.assetTypeList'>
-                                <div class='number' v-for='(equip , index) in item.assetTypeList' :key='index'>
-                                    <div class="title">
-                                        <div class="exception" :title="equip.category_name">
-                                            {{equip.category_name}}
-                                            <span style="right:-1rem;" v-if='equip.is_exception_num'>{{equip.is_exception_num}}</span>
+                            <section v-if='item.assetTypeList.length' class="system-equipments-container">
+                                <div class="more" @click.stop.capture="expandRestItems(item, index)" v-if="item.hasArrow" :style="{transform: item.expand ? 'rotate(0)' : 'rotate(180deg)'}">
+                                    <img v-if="item.showColor" src="../../assets/images/icons/arrow.png">
+                                    <img v-else src="../../assets/images/icons/grey.png">
+                                </div>
+                                <div class='system-equipments'  style="padding-top:2rem; margin-bottom:2rem;">
+                                    <div class='number' v-for='(equip , index) in item.assetTypeList' :key='index'>
+                                        <div class="title">
+                                            <P :style="{width: equip.category_name.length>6 ? '10rem' : 'auto'}"  :title="equip.category_name">{{equip.category_name}}</p>
+                                            <span :style="{right: equip.is_exception_num > 99 ? '-2rem' :  equip.is_exception_num > 9 ? '-1.5rem' :'-1rem'}" v-if='equip.is_exception_num'>{{equip.is_exception_num}}</span>
                                         </div>
+                                        <p> <span>{{equip.asset_num}}</span><span>{{equip.category_name === '屋面logo' ? '个' : equip.category_name === '玻璃护栏' ? '段' : '台'}}</span></p>
                                     </div>
-                                    <p>
-                                        <span>{{equip.asset_num}}</span>
-                                        <span>台</span>
-                                    </p>
                                 </div>
-                            </div>
-                            <div v-else style='width:65%;text-align:center;'>暂无数据</div>
+                                <section class="system-equipments" v-show="item.expand && item.restAssetTypeList.length" style="padding-bottom:2rem;">
+                                    <div class='number' v-for='(equip , index) in item.restAssetTypeList' :key='index'>
+                                        <div class="title">
+                                            <P :title="equip.category_name">{{equip.category_name}}</p>
+                                            <span :style="{right: equip.is_exception_num > 99 ? '-2rem' :  equip.is_exception_num > 9 ? '-1.5rem' :'-1rem'}" v-if='equip.is_exception_num'>{{equip.is_exception_num}}</span>
+                                        </div>
+                                        <p> <span>{{equip.asset_num}}</span><span>{{equip.category_name === '屋面logo' ? '个' : equip.category_name === '玻璃护栏' ? '段' : '台'}}</span></p>
+                                    </div>
+                                </section>
+                            </section>
+                            <div v-else style='width:65%;text-align:center;'> 暂无数据</div>
                         </li>
                     </ul>
                 </div>
@@ -85,22 +93,18 @@
                         <div class='img'>
                             <img src='../../assets/images/icons/ratio.png' />
                         </div>
-                        <p>上线管理说明书数量</p>
+                        <p>上线管理说明书广场数量</p>
                         <strong>{{plazaInfoCount.upwcCount}}</strong>
                     </div>
                     <div class='card' @click='navToIntroduceUpdate'>
                         <div class='img'>
                             <img src='../../assets/images/icons/audit.png' />
                         </div>
-                        <p>当月说明书更新项目数量</p>
-                        <strong>{{plazaInfoCount.rptChangeCount}}</strong>
-                    </div>
-                    <div class='card' @click='navToFocusItems'>
-                        <div class='img'>
-                            <img src='../../assets/images/icons/contract.png' />
+                        <p>当月说明书更新数量</p>
+                        <div class="describe">
+                            <span style="margin-right:20px;">更新广场数量 <strong>{{plazaInfoCount.rptChangeCount}}</strong></span>
+                            <span>更新事项数量<strong>{{plazaInfoCount.zhsxChangeCount}}</strong></span>
                         </div>
-                        <p>当月重点关注事项项目数量</p>
-                        <strong>{{plazaInfoCount.zhsxChangeCount}}</strong>
                     </div>
                 </section>
                 <section class='map-container' id="map-container">
@@ -119,7 +123,7 @@
                     <transition name="selectDownUpExtendTop">
                         <div class="tool-tip" v-if="item.showToolTip">
                             <h5 style="font-weight:bold;">{{item.title + '比值'}}</h5>
-                            <p>{{item.title === '专维' ? '逾期未完成/今年即将到期任务数/总任务' : '当月即将到期/总任务'}}</p>
+                            <p>{{item.title === '专维' ? '逾期未完成/今年即将逾期任务数/总任务' : '当月即将逾期/总任务'}}</p>
                             <div class="tip-triangle" :style="{left: item.title === '第三方检测' ? '12.5rem': '7.8rem'}"> </div>
                         </div>
                     </transition>
@@ -129,8 +133,8 @@
                                 <div class='ratio'>
                                     <span>{{option.cname}}</span>
                                     <span v-if='item.title === "专维"'>
-                                        <span>{{option.rptGlsmsStatistics.unfinished}} /</span>
-                                        <span>{{option.rptGlsmsStatistics.due_num}} /</span>
+                                        <span>{{option.rptGlsmsStatistics.overdue_unfinished}} /</span>
+                                        <span>{{option.rptGlsmsStatistics.due_num || 0}} /</span>
                                         <span>{{option.rptGlsmsStatistics.total}}</span>
                                     </span>
                                     <span v-else>
@@ -265,13 +269,21 @@ export default {
         this.currentTime()
     },
     mounted() {
-
-
         window.vm = this
         this.getFrameworkTreeData()
         window.addEventListener('resize', this.reinitalMap, false)
     },
-    methods: {
+    methods: {  
+        expandRestItems (item, index) {
+            this.systemList.forEach(eq => {
+                if (eq.smsxt !== item.smsxt) {
+                    eq.expand = false
+                }
+                eq.selected = false
+            })
+            item.selected = true
+            item.expand = !item.expand
+        },
         showToolTip (index) {
             this.maintainList.forEach(item => {item.showToolTip = false})
             this.maintainList[index].showToolTip = true
@@ -320,8 +332,13 @@ export default {
                     newArr.push(item.split('&'))
                 })
                 this.crumbsHtml = newArr
+                this.currentZoneData = data
             }
-            this.currentZoneData = data
+            if (data.level === 0) {
+                this.crumbsHtml.pop()
+                this.currentZoneData = this.getDataByCityCcode(data.cparentcode)
+            }
+            
         },
         /**
          * @Description 通过导航进行导航
@@ -334,9 +351,9 @@ export default {
             let level = data.level    //1集团 2中心 3区域 0广场
             if (level === this.regulateDistrictData[0].level) {
                 this.selectedZone = ''
-            }
-            this.currentZoneData = data
+            } 
             this.currentLevel = level
+            this.currentZoneData = data
             this.getEventStatusData(level, data.ccode)
             this.queryPlazaInfoCount(data.ccode, data.level, data.cid)
             this.getSystemList(data.ccode, data.level)
@@ -347,7 +364,11 @@ export default {
             } else {
                 this.pantProjectsMap(data, this.currentSysId)
             }
-            this.crumbsHtml = this.crumbsHtml.splice(0, index + 1)
+            if (level === 1) {
+                this.crumbsHtml = ''
+            } else {
+                this.crumbsHtml = this.crumbsHtml.splice(0, index + 1)
+            }
         },
         /**
          * @Description 分区树 点击选择分区
@@ -362,13 +383,13 @@ export default {
             let data = this.getDataByCityCcode(ids)
             this.currentLevel = data.level
             if (data.level === 0) {  //  level=0时 plazaId必填
-                this.queryPlazaInfoCount(data.ccode, data.level, data.ccode)
+                // this.queryPlazaInfoCount(data.ccode, data.level, data.ccode)
             } else {
                 this.queryPlazaInfoCount(data.ccode, data.level)
+                this.getSystemList(data.ccode, data.level) 
+                this.getEventStatusData(this.currentLevel, data.ccode)
+                this.createNavpathByData(data)
             }
-            this.getSystemList(data.ccode, data.level)
-            this.getEventStatusData(this.currentLevel, data.ccode)
-            this.createNavpathByData(data)
             this.currentZoneData = data
 
             let level = data.level // //1集团 2中心 3区域 0广场
@@ -519,17 +540,22 @@ export default {
         */
         barStyle(item, title) {
             let bg = ''
-            let type = this.selectColorByNum(item.due_num, item.total)
+            // let type = this.selectColorByNum(item.due_num, item.total)
             let ratio = 0
             if (title === '专维') {
-                if (item.unfinished>0) {
-                    bg = 'linear-gradient(to right, #F54E45 , #F54E45)'
-                } else {
-                    bg = this.barColors[type]
+                item.overdue_unfinished = item.overdue_unfinished || 0
+                if (item.overdue_unfinished >0 || item.due_num > 0) {
+                    bg = 'linear-gradient(to right, #F54E45 , #F54E45)'  
                 }
-                ratio = ((item.unfinished + item.due_num) / item.total) * 100
+                // else {
+                //     bg = this.barColors[type]
+                // }
+                ratio = ((item.overdue_unfinished  + item.due_num) / item.total) * 100
             } else {
-                bg = this.barColors[type]
+                if (item.due_num > 0) {
+                    bg = 'linear-gradient(to right, #F54E45 , #F54E45)'  
+                }
+                // bg = this.barColors[type]
                 ratio = (item.due_num / item.total) * 100
             }
             return {
@@ -610,17 +636,29 @@ export default {
                     if (res.result == 'success') {
                         let result = res.data
                         if (result && Array.isArray(result)) {
+                            
                             result.forEach(item => {
-                                if (item.assetTypeList) {
-                                    item.assetTypeList = item.assetTypeList.splice(0, 3)
+                                let list = item.assetTypeList
+                                if (list) {
+                                    if (list.length > 3) {
+                                        item.hasArrow = true
+                                        item.assetTypeList = list.splice(0, 3)
+                                        item.restAssetTypeList = list
+                                        item.showColor = list.some(item => {return item.is_exception_num > 0})
+                                    }else {
+                                        item.hasArrow = false
+                                        item.restAssetTypeList = []
+                                    }
                                 }
                             })
                             res.data.forEach(item => {
                                 item.selected = false
+                                item.expand = false
                             })
                             res.data[0].selected = true
                             this.currentSelectedSys = res.data[0]
                             this.currentSysId = res.data[0].smsxt
+                         
                             this.systemList = res.data
                             resolve(res)
                         }
@@ -643,7 +681,12 @@ export default {
             queryEventStatus(params).then(res => {
                 if (res.result === 'success') {
                     let data = res.data
-                    let orginalObj = {
+                    data[0].forEach(item => {
+                        if (typeof item.rptGlsmsStatistics.overdue_unfinished  === 'undefined') {
+                            item.rptGlsmsStatistics.overdue_unfinished = 0
+                        }
+                    })
+                    let orginalObj = { 
                         1:{title:'维保',data:[], expand: 0, showToolTip:false},
                         2:{title:'第三方检测',data:[], expand: 0, showToolTip:false},
                         0:{title:'专维',data:[], expand: 0, showToolTip:false},
@@ -653,11 +696,11 @@ export default {
                         let obj = {}
                         let sortData = data[key]
                         if (data.hasOwnProperty(key)) {
-                            // 维保,第三方检测排名按照即将到期任务数量从多到少排序,多的靠前。专维按照 逾期未完成 + 即将到期任务数据排序,多的靠前
-                            // due_num 即将期    unfinished 逾期未完成
+                            // 维保,第三方检测排名按照即将逾期任务数量从多到少排序,多的靠前。专维按照 逾期未完成 + 即将逾期任务数据排序,多的靠前
+                            // due_num 即将期    unfinished 逾期未完成
                             if (key == '0') {
                                 sortData.forEach(item => {
-                                    item.sort = item.rptGlsmsStatistics.due_num + item.rptGlsmsStatistics.unfinished
+                                    item.sort = item.rptGlsmsStatistics.overdue_unfinished + item.rptGlsmsStatistics.unfinished
                                 })
                             } else {
                                 sortData.forEach(item => {
@@ -683,6 +726,7 @@ export default {
                 center: new L.LatLng(38, 103),
                 zoom: 4,
                 crs: L.CRS.EPSG3857,
+                // minZoom:
                 zoomControl: false,
                 boxZoom: false,
                 attributionControl: false,
@@ -929,6 +973,7 @@ export default {
                                             num += item.is_exception_num
                                         }
                                     })
+                                   
                                 }
                                 layerArr.push({
                                     name,
@@ -949,6 +994,7 @@ export default {
                 this.loadingInstance.close()
                 if (this.currentLevel === 3) {
                     layerArr.forEach(item => {
+             
                         let center = [item.data.latitude, item.data.longitude]
                         let contentHtml = that.createPopupHtmlContent(item.list.assetTypeList, item.fullName)
                         if (contentHtml) {
@@ -997,13 +1043,15 @@ export default {
                 feaureGroup.on('click', ev => {
                     this.currentZoneData = data
                     this.currentLevel = data.level
-                    this.getEventStatusData(data.level, data.ccode)
-                    this.queryPlazaInfoCount(data.ccode, data.level)
+                    if (data.level !== 0) {
+                        this.getEventStatusData(data.level, data.ccode)
+                        this.queryPlazaInfoCount(data.ccode, data.level) 
+                        this.getSystemList(data.ccode, data.level)   
+                    }
                     if (type !== 'project') {
                         groupLayer.clearLayers()
                     }
                     this.createNavpathByData(data)
-                    this.getSystemList(data.ccode, data.level)
                     if (type === 'group') {
                         this.pantZonesMap(data, this.currentSysId)
                     }
@@ -1038,16 +1086,16 @@ export default {
                     let item = data[i]
                     if (item.is_exception_num) {
                         html += `<div class="line">
-                            <span>${item.category_name}</span>
-                            <span>${item.asset_num || '--'}台</span>
+                            <span>${item.category_name}</span> 
+                            <span>${item.asset_num || '--'}${item.category_name === '屋面logo' ? '个' : item.category_name === '玻璃护栏' ? '段' : ''}</span>
                             <span><span style="display: inline-block;width: 16px;height: 16px;line-height: 16px;border-radius: 8px; color: white; background : #F54E45;text-align: center;cursor: default;">!</span><em>${
                                 item.is_exception_num
                             }</em></span>
                         </div>`
                     } else {
                         html += `<div class="line">
-                            <span>${item.category_name}</span>
-                            <span>${item.asset_num || '--'}台</span>
+                            <span>${item.category_name}</span> 
+                            <span>${item.asset_num || '--'}${item.category_name === '屋面logo' ? '个' : item.category_name === '玻璃护栏' ? '段' : ''}</span>
                         </div>`
                     }
                 }
@@ -1181,7 +1229,6 @@ export default {
                     display: inline-block;
                     width: 18px;
                     height: 18px;
-                    background: red;
                     border-radius: 90px;
                     font-size: 1.2rem;
                     text-align: center;
@@ -1242,7 +1289,7 @@ export default {
             font-size: 1.6rem;
             font-weight: bolder;
             line-height: 2rem;
-            cursor: pointer;
+            cursor: pointer; 
             img{
                 width: 2rem;
                 margin-left: 1.2rem;
@@ -1257,16 +1304,15 @@ export default {
                 padding: 2rem 0 2.4rem 1.6rem;
             }
             .system-list {
+                height: 80vh;
+                overflow-y:auto;
                 ul {
-                    height: 80vh;
                     li.system-item {
                         display: flex;
                         justify-content: flex-start;
                         align-items: center;
                         width: calc(100% - 3.2rem);
-                        height: calc(100% / 8);
                         margin-left: 1.6rem;
-                        // padding: 1rem 0;
                         box-sizing: border-box;
                         border: 1px solid white;
                         border-radius: 4px;
@@ -1304,33 +1350,52 @@ export default {
                                 font-weight: bolder;
                             }
                         }
-                        .system-equipments {
-                            width: 75%;
-                            display: flex;
-                            align-items: center;
-                            padding-left: 1.4rem;
-                            .number {
-                                width: 33.3%;
-                                .title{
-                                    display: inline-block;
-                                    width: 100%;
-                                    white-space: nowrap;
-                                    text-overflow: ellipsis;
-                                    overflow: hidden;
-                                    div.exception{
+                        .system-equipments-container{
+                            position: relative;
+                            width:75%;
+                            .more{
+                                position: absolute;
+                                display: flex;
+                                justify-content: center;
+                                align-items: center;
+                                width: 14px;
+                                height: 14px;
+                                right: 8px; 
+                                top: 50%;
+                                border-radius: 7px;
+                                cursor: pointer;
+                                transform: rotate(0);
+                                transform-origin: center;
+                                z-index: 10000;
+                                transform: translateY(-7px);
+                                img{
+                                    width:14px;
+                                    height: 14px;
+                                }
+                            }
+                            .system-equipments {
+                                display: flex;
+                                align-items: center;
+                                padding-left: 1.4rem;
+                                .number {
+                                    width: 33.3%;
+                                    .title{
+                                        display: inline-block;
                                         position: relative;
-                                        display: inline;
-                                        color: #1f2429;
-                                        font-size: 1.4rem;
-                                        line-height: 4rem;
-                                        white-space: nowrap;
-                                        text-overflow: ellipsis;
-                                        overflow: hidden;
+                                        p{
+                                            display: inline-block;
+                                            position: relative;
+                                            color: #1f2429;
+                                            font-size: 1.4rem;
+                                            line-height: 2rem;
+                                            white-space: nowrap;
+                                            text-overflow: ellipsis;
+                                            overflow: hidden;
+                                        }
                                         span {
                                             position: absolute;
-                                            top: -1rem;
-                                            right: -1rem;
-                                            line-height: 1.6rem;
+                                            top: -1.6rem;
+                                            right: -2rem;
                                             padding: 2px 4px;
                                             border-radius: 0.9rem;
                                             font-size: 1.2rem;
@@ -1338,16 +1403,16 @@ export default {
                                             background: #fde3e2;
                                         }
                                     }
-                                }
-                                p:nth-of-type(2) {
-                                    span:first-child {
-                                        color: #1f2429;
-                                        font-size: 1.8rem;
-                                        font-weight: bold;
+                                    p:nth-of-type(2) {
+                                        span:first-child {
+                                            color: #1f2429;
+                                            font-size: 1.8rem;
+                                            font-weight: bold;
+                                        }
                                     }
                                 }
+                                
                             }
-
                         }
                     }
                     li.selected {
@@ -1371,7 +1436,7 @@ export default {
                 display: flex;
                 justify-content: space-between;
                 .card {
-                    width: calc((100% - 24px) / 3);
+                    width: 50%;
                     box-sizing: border-box;
                     padding: 12px 16px;
                     border-radius: 4px;
@@ -1389,15 +1454,16 @@ export default {
                         }
                     }
                 }
+                div:first-child.card{
+                    margin-right: 12px;
+                }
+               
                 div:nth-of-type(1) .img {
                     background: rgba(130, 199, 252, 0.14);
                 }
                 div:nth-of-type(2) .img {
                     background: rgba(0, 214, 185, 0.14);
                 }
-                div:nth-of-type(3) .img {
-                    background: rgba(255, 186, 107, 0.14);
-                }
                 p {
                     color: #646c73;
                     margin: 12px 0 8px 0;