Shannon_mu 3 anni fa
parent
commit
3e5c329524

+ 2 - 2
operationSupport/src/views/facilityInspections/popups/details.vue

@@ -100,7 +100,7 @@ export default {
             cols: [
                 {
                     label: '设备编号',
-                    prop: 'deviceId'
+                    prop: 'no'
                 },
                 {
                     label: '设备名称',
@@ -108,7 +108,7 @@ export default {
                 },
                 {
                     label: '地址',
-                    prop: 'peopleName'
+                    prop: 'address'
                 },
                 {
                     label: '巡检时间',

+ 5 - 1
operationSupport/src/views/patrolManagement/popups/mapValue.vue

@@ -2,7 +2,7 @@
     <div>
         <div id="mapValue" :style="`height:${height||300}px`"></div>
         <!--控制条-->
-        <div class="map-control" v-if="isStart">
+        <div class="map-control" v-if="isStart && !!point.length">
             <div class="clickIco">
                 <i
                     class="zoniot_font zoniot-icon-kaishi"
@@ -93,6 +93,10 @@ export default {
     created() {
         this.$nextTick(() => {
             this.init();
+            const s = document.createElement('script');
+            s.style = 'text/javascript';
+            s.src = 'https://webapi.amap.com/ui/1.1/main.js';
+            document.body.appendChild(s);
         });
     }
 };

+ 7 - 0
operationSupport/src/views/patrolManagement/popups/pathSimplifierIns.js

@@ -226,5 +226,12 @@ export default {
         //         }, 0)
         //     }
         // },
+    },
+    created() {
+        // const s = document.createElement('script');
+        // s.style = 'text/javascript';
+        // s.src = 'https://webapi.amap.com/ui/1.1/main.js';
+        // document.body.appendChild(s);
+
     }
 };

+ 65 - 33
operationSupport/src/views/patrolManagement/popups/patrolDetails.vue

@@ -35,25 +35,33 @@
                 </div>
             </div>
             <div class="rightList">
-                <el-steps direction="vertical" :active="thisActive">
-                    <el-step
-                        :title="item.createDate"
-                        icon="el-icon-full-screen"
-                        v-for="(item,index) in thisItem"
-                        :key="item.id"
-                    >
-                        <div slot="description">
-                            <div>
-                                <div class v-if="index===0">开始任务</div>
-                                <div class="flex" v-else>
-                                    <span>巡更点{{index}}</span>
-                                    <span>{{item.pointStatus | statusType}}</span>
-                                </div>
-                                <div>{{item.checkTime}}</div>
+                <template v-for="(item,index) in thisItem">
+                    <div class="steps" :key="index">
+                        <div class="steps-left">
+                            <img src="@assets/img/point_yiwancheng@2x.png" alt />
+                            <div class="steps-left-line" v-if="index !== thisItem.length-1"></div>
+                        </div>
+                        <div class="steps-right">
+                            <div class="steps-right-title">
+                                <span v-if="index===0">{{item.pointStatus==1?'待执行':'开始任务'}}</span>
+                                <span v-else>巡更点{{index}}</span>
+                                <span
+                                    class="status"
+                                    v-if="index!==0"
+                                >{{item.pointStatus==1?'未完成 ':'已完成'}}</span>
+                            </div>
+                            <div class="steps-right-content">{{item.checkTime}}</div>
+                            <div class="steps-right-content">
+                                <span>巡更结果:</span>
+                                <span>{{item.result||'-'}}</span>
+                            </div>
+                            <div class="steps-right-content">
+                                <span>图片/视频:</span>
+                                <span>{{item.picturePath||'-'}}</span>
                             </div>
                         </div>
-                    </el-step>
-                </el-steps>
+                    </div>
+                </template>
             </div>
         </div>
     </div>
@@ -65,8 +73,7 @@ export default {
     components: { mapValue },
     data() {
         return {
-            thisItem: {},
-            thisActive: 0,
+            thisItem: [],
             targetData: []
         };
     },
@@ -104,24 +111,15 @@ export default {
         },
         getTrack(id) {
             this.$http.get('/sc-community/patrolRecord/getUserPatrolTrack', { recordId: id }).then(({ data, status, msg }) => {
-                this.thisItem = data;
-                this.targetData = [
-                    { longitude: '114.073587', latitude: '22.59709' },
-                    { longitude: '114.086634', latitude: '22.57763' },
-                    { longitude: '114.096634', latitude: '22.55763' }
-                ];
-                console.log(data);
+                if (!!data) {
+                    this.targetData = data;
+                }
             });
         }
     },
     created() {
         this.getDetail(this.thisObj.id);
         this.getTrack(this.thisObj.id);
-
-        const s = document.createElement('script');
-        s.style = 'text/javascript';
-        s.src = 'https://webapi.amap.com/ui/1.1/main.js';
-        document.body.appendChild(s);
     }
 };
 </script>>
@@ -168,9 +166,43 @@ export default {
             width: 400px;
             background: white;
             @extend .border20;
-            .flex {
+            .steps {
                 display: flex;
-                justify-content: space-between;
+                img {
+                    width: 20px;
+                    vertical-align: -webkit-baseline-middle;
+                }
+                .steps-left {
+                    margin-right: 10px;
+                    .steps-left-line {
+                        width: 2px;
+                        height: calc(100% - 40px);
+                        margin: 10px auto;
+                        background-color: $mainBgColor;
+                    }
+                }
+                .steps-right {
+                    width: 100%;
+                    line-height: 30px;
+                    margin-bottom: 10px;
+                    .steps-right-title {
+                        font-weight: 600;
+                        display: flex;
+                        justify-content: space-between;
+                        .status {
+                            color: $mainBgColor;
+                            font-weight: 400;
+                        }
+                    }
+                    .steps-right-content {
+                        font-size: 12px;
+                        color: #303133;
+                        display: flex;
+                        span:first-child {
+                            margin-right: 10px;
+                        }
+                    }
+                }
             }
         }
     }

+ 125 - 35
operationSupport/src/views/workOrders/popups/details.vue

@@ -13,16 +13,29 @@
                                         <span v-else-if="thisItem['orderType'] == 2">内部报修</span>
                                         <span v-else>--</span>
                                     </template>
-                                    <template v-if="item.slot === 'repairFile' && !!thisItem['repairFile']">
-                                        <div class="imgVdio" v-for="item in thisItem['repairFile'].split(',')" :key="item">
-                                            <video v-if="typeVideo(item)" :src="item" @click="lookVideos(item)"></video>
-                                            <el-image class="imgs" v-else :src="item" :preview-src-list="[item]"></el-image>
+                                    <template
+                                        v-if="item.slot === 'repairFile' && !!thisItem['repairFile']"
+                                    >
+                                        <div
+                                            class="imgVdio"
+                                            v-for="item in thisItem['repairFile'].split(',')"
+                                            :key="item"
+                                        >
+                                            <video
+                                                v-if="typeVideo(item)"
+                                                :src="item"
+                                                @click="lookVideos(item)"
+                                            ></video>
+                                            <el-image
+                                                class="imgs"
+                                                v-else
+                                                :src="item"
+                                                :preview-src-list="[item]"
+                                            ></el-image>
                                         </div>
                                     </template>
                                 </template>
-                                <template v-else>
-                                    {{ thisItem[item.prop] || '--' }}
-                                </template>
+                                <template v-else>{{ thisItem[item.prop] || '--' }}</template>
                             </el-form-item>
                         </el-col>
                     </template>
@@ -36,25 +49,47 @@
                             <el-form-item :label="item.label">
                                 <template v-if="item.slot">
                                     <template v-if="item.slot === 'urgencyDegree'">
-                                        <span v-if="thisItem['urgencyDegree'] == 2" class="redText">紧急</span>
+                                        <span
+                                            v-if="thisItem['urgencyDegree'] == 2"
+                                            class="redText"
+                                        >紧急</span>
                                         <span v-else-if="thisItem['urgencyDegree'] == 1">普通</span>
                                         <span v-else>--</span>
                                     </template>
                                     <template v-if="item.slot === 'handleResult'">
-                                        <span v-if="thisItem['handleResult'] == 2" class="redText">无法处理</span>
-                                        <span v-else-if="thisItem['handleResult'] == 1" class="greenText">成功处理</span>
+                                        <span
+                                            v-if="thisItem['handleResult'] == 2"
+                                            class="redText"
+                                        >无法处理</span>
+                                        <span
+                                            v-else-if="thisItem['handleResult'] == 1"
+                                            class="greenText"
+                                        >成功处理</span>
                                         <span v-else>--</span>
                                     </template>
-                                    <template v-if="item.slot === 'handleFile' && !!thisItem['handleFile']">
-                                        <div class="imgVdio" v-for="item in thisItem['handleFile'].split(',')" :key="item">
-                                            <video v-if="typeVideo(item)" :src="item" @click="lookVideos(item)"></video>
-                                            <el-image class="imgs" v-else :src="item" :preview-src-list="[item]"></el-image>
+                                    <template
+                                        v-if="item.slot === 'handleFile' && !!thisItem['handleFile']"
+                                    >
+                                        <div
+                                            class="imgVdio"
+                                            v-for="item in thisItem['handleFile'].split(',')"
+                                            :key="item"
+                                        >
+                                            <video
+                                                v-if="typeVideo(item)"
+                                                :src="item"
+                                                @click="lookVideos(item)"
+                                            ></video>
+                                            <el-image
+                                                class="imgs"
+                                                v-else
+                                                :src="item"
+                                                :preview-src-list="[item]"
+                                            ></el-image>
                                         </div>
                                     </template>
                                 </template>
-                                <template v-else>
-                                    {{ thisItem[item.prop] || '--' }}
-                                </template>
+                                <template v-else>{{ thisItem[item.prop] || '--' }}</template>
                             </el-form-item>
                         </el-col>
                     </template>
@@ -64,24 +99,40 @@
         <div class="right">
             <div class="list-item">
                 <div class="formContent-item_title">工单进度追踪</div>
-                <div style="height: 300px">
-                    <el-steps direction="vertical" :active="thisActive">
-                        <el-step
-                            :title="item.createDate"
-                            icon="el-icon-full-screen"
-                            v-for="item in thisItem['progressList']"
-                            :key="item.id"
-                        >
-                            <div slot="description">
-                                <div v-if="item.type == 1">报修人:{{ thisItem['repairName'] }}</div>
-                                <template v-else>
-                                    <div>处理人:{{ item.name }}</div>
-                                    <div v-if="!!item.operation">操作:{{ item.operation }}</div>
-                                </template>
+                <template v-for="(item,index) in thisItem['progressList']">
+                    <div class="steps" :key="index">
+                        <div class="steps-left">
+                            <img src="@assets/img/point_yiwancheng@2x.png" alt />
+                            <div
+                                class="steps-left-line"
+                                v-if="index !== thisItem['progressList'].length-1"
+                            ></div>
+                        </div>
+                        <div class="steps-right">
+                            <div class="steps-right-title">
+                                <span>{{item.createDate}}</span>
+                                <span
+                                    class="status"
+                                    v-if="index === thisItem['progressList'].length-1"
+                                >{{item.operation}}</span>
+                            </div>
+                            <div class="steps-right-content" v-if="item.type == 1">
+                                <span>报修人:</span>
+                                <span>{{ thisItem['repairName'] }}</span>
                             </div>
-                        </el-step>
-                    </el-steps>
-                </div>
+                            <template v-else>
+                                <div class="steps-right-content">
+                                    <span>处理人:</span>
+                                    <span>{{ item.name }}</span>
+                                </div>
+                                <div class="steps-right-content" v-if="!!item.operation">
+                                    <span>操作:</span>
+                                    <span>{{ item.operation }}</span>
+                                </div>
+                            </template>
+                        </div>
+                    </div>
+                </template>
             </div>
         </div>
     </div>
@@ -183,7 +234,7 @@ export default {
             return videoType.includes(type);
         },
         lookVideos(src) {
-            new Promise((resolve) => {
+            new Promise(resolve => {
                 this.$store.dispatch('addPopup', {
                     url: '/lookVideo.vue',
                     width: '600px',
@@ -248,4 +299,43 @@ export default {
         cursor: pointer;
     }
 }
+
+.steps {
+    display: flex;
+    img {
+        width: 20px;
+        vertical-align: -webkit-baseline-middle;
+    }
+    .steps-left {
+        margin-right: 10px;
+        .steps-left-line {
+            width: 2px;
+            height: calc(100% - 40px);
+            margin: 10px auto;
+            background-color: $mainBgColor;
+        }
+    }
+    .steps-right {
+        width: 100%;
+        line-height: 30px;
+        margin-bottom: 10px;
+        .steps-right-title {
+            font-weight: 600;
+            display: flex;
+            justify-content: space-between;
+            .status {
+                color: $mainBgColor;
+                font-weight: 400;
+            }
+        }
+        .steps-right-content {
+            font-size: 12px;
+            color: #303133;
+            display: flex;
+            span:first-child {
+                margin-right: 10px;
+            }
+        }
+    }
+}
 </style>