xieqy 1 year ago
parent
commit
f5512aeb96

+ 41 - 28
src/views/pipelineDefect/manage/defect/widget.vue

@@ -46,7 +46,7 @@
             <el-option v-for="(item, i) in gradeArr" :key="i" :label="item" :value="item"></el-option>
             <el-option v-for="(item, i) in gradeArr" :key="i" :label="item" :value="item"></el-option>
           </el-select> -->
           </el-select> -->
           <div class="title">缺陷等级:</div>
           <div class="title">缺陷等级:</div>
-          <el-select clearable v-model="searchValue.defectLevel" placeholder="全部">
+          <el-select style="width: 120px" clearable v-model="searchValue.defectLevel" placeholder="全部">
             <el-option v-for="(item, i) in defectLevel" :key="i" :label="item" :value="item"></el-option>
             <el-option v-for="(item, i) in defectLevel" :key="i" :label="item" :value="item"></el-option>
           </el-select>
           </el-select>
           <!-- <div class="title">功能性缺陷等级:</div>
           <!-- <div class="title">功能性缺陷等级:</div>
@@ -85,7 +85,7 @@
         :row-style="{ height: '40px' }"
         :row-style="{ height: '40px' }"
       >
       >
         <template slot="empty">
         <template slot="empty">
-          <img src="@/assets/icon/null.png"   />
+          <img src="@/assets/icon/null.png" />
         </template>
         </template>
         <el-table-column header-align="center" align="center" type="selection" width="55"> </el-table-column>
         <el-table-column header-align="center" align="center" type="selection" width="55"> </el-table-column>
         <el-table-column align="center" type="index" label="序号" width="50"> </el-table-column>
         <el-table-column align="center" type="index" label="序号" width="50"> </el-table-column>
@@ -106,14 +106,22 @@
             <div style="text-align: center">{{ `(${scope.row.defectCode})${scope.row.defectName}` }}</div>
             <div style="text-align: center">{{ `(${scope.row.defectCode})${scope.row.defectName}` }}</div>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column header-align="center" width="200" label="管道内部状况描述" align="center" show-overflow-tooltip>
+        <el-table-column
+          header-align="center"
+          width="200"
+          label="管道内部状况描述"
+          align="center"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
           <template slot-scope="scope">
             <div style="text-align: center">{{ scope.row.pipeNote }}</div>
             <div style="text-align: center">{{ scope.row.pipeNote }}</div>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column fixed="right" width="120" header-align="center" label="操作" align="center">
         <el-table-column fixed="right" width="120" header-align="center" label="操作" align="center">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-button type="text" :disabled="!scope.row.videopath" size="small" @click.stop="toVideo(scope.row)">视频</el-button>
+            <el-button type="text" :disabled="!scope.row.videopath" size="small" @click.stop="toVideo(scope.row)"
+              >视频</el-button
+            >
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <!-- <el-table-column fixed="right" header-align="center" label="操作" align="center" width="100">
         <!-- <el-table-column fixed="right" header-align="center" label="操作" align="center" width="100">
@@ -136,10 +144,17 @@
       </div>
       </div>
     </div>
     </div>
 
 
-    <el-dialog width='70%' top="5vh" :title="videoTitle" v-if="showVideo" :visible.sync="showVideo" :append-to-body="true">
+    <el-dialog
+      width="70%"
+      top="5vh"
+      :title="videoTitle"
+      v-if="showVideo"
+      :visible.sync="showVideo"
+      :append-to-body="true"
+    >
       <div style="width: 100%; height: 80%">
       <div style="width: 100%; height: 80%">
         <video controls="controls" width="100%" height="83%">
         <video controls="controls" width="100%" height="83%">
-            <source :src="videoUrl" type="video/mp4" />
+          <source :src="videoUrl" type="video/mp4" />
         </video>
         </video>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
@@ -183,20 +198,20 @@ export default {
   data() {
   data() {
     return {
     return {
       json_fields: {
       json_fields: {
-        '管段编号': 'expNo',
-        '管段类型': 'pipeType',
+        管段编号: 'expNo',
+        管段类型: 'pipeType',
         '管径(mm)': 'diameter',
         '管径(mm)': 'diameter',
-        '材质': 'material',
-        '检测方向': 'detectDir',
+        材质: 'material',
+        检测方向: 'detectDir',
         '距离(m)': 'checkLength',
         '距离(m)': 'checkLength',
-        '分值': 'defectNum',
-        '等级': 'defectLevel',
-        '检测视频': 'videoFileName',
-        '工程名称': 'prjName',
-        '工程地点': 'checkAddress',
+        分值: 'defectNum',
+        等级: 'defectLevel',
+        检测视频: 'videoFileName',
+        工程名称: 'prjName',
+        工程地点: 'checkAddress',
         // '检测日期': 'sampleTime',
         // '检测日期': 'sampleTime',
-        '管道内部状况描述': 'structEstimate',
-        '缺陷名称代码': 'defectCode'
+        管道内部状况描述: 'structEstimate',
+        缺陷名称代码: 'defectCode'
       },
       },
       currentId: null,
       currentId: null,
       id: null,
       id: null,
@@ -264,13 +279,13 @@ export default {
         { width: '80', sortable: true, label: '分值', name: 'defectNum' },
         { width: '80', sortable: true, label: '分值', name: 'defectNum' },
         { width: '100', sortable: true, label: '等级', name: 'defectLevel' },
         { width: '100', sortable: true, label: '等级', name: 'defectLevel' },
         { width: '100', sortable: false, label: '工程名称', name: 'prjName' },
         { width: '100', sortable: false, label: '工程名称', name: 'prjName' },
-        { width: '', sortable: false, label: '工程地点', name: 'checkAddress' },
+        { width: '', sortable: false, label: '工程地点', name: 'checkAddress' }
         // { width: '100', sortable: true, label: '检测日期', name: 'sampleTime' }
         // { width: '100', sortable: true, label: '检测日期', name: 'sampleTime' }
         // { label: '结构性缺陷评价', name: 'structEstimate' },
         // { label: '结构性缺陷评价', name: 'structEstimate' },
         // { label: '检测地点', name: 'checkAddress' },
         // { label: '检测地点', name: 'checkAddress' },
       ],
       ],
       // gradeArr: ['Ⅰ', 'Ⅱ', 'Ⅲ', 'Ⅳ'], // 缺陷等级
       // gradeArr: ['Ⅰ', 'Ⅱ', 'Ⅲ', 'Ⅳ'], // 缺陷等级
-      defectLevel: ['一级', '二级', '三级', '四级'], 
+      defectLevel: ['一级', '二级', '三级', '四级'],
       // 日期选择器规则
       // 日期选择器规则
       sOpition: {
       sOpition: {
         disabledDate: (time) => {
         disabledDate: (time) => {
@@ -317,10 +332,10 @@ export default {
       clickEvent: null,
       clickEvent: null,
       projUtil: null,
       projUtil: null,
       currentDataProjName: appconfig.currPRJ,
       currentDataProjName: appconfig.currPRJ,
-      // 
+      //
       hadLoad: false,
       hadLoad: false,
       popup: null,
       popup: null,
-      // 
+      //
       showVideo: false,
       showVideo: false,
       videoUrl: '',
       videoUrl: '',
       videoTitle: '视频',
       videoTitle: '视频',
@@ -329,10 +344,8 @@ export default {
       themLayer: null
       themLayer: null
     }
     }
   },
   },
-  watch: {
-  },
-  created() {
-  },
+  watch: {},
+  created() {},
   mounted() {
   mounted() {
     this.upDateTable()
     this.upDateTable()
   },
   },
@@ -351,7 +364,7 @@ export default {
         })
         })
       }
       }
     },
     },
-    toVideo (row) {
+    toVideo(row) {
       let { videopath, videoFileName } = row
       let { videopath, videoFileName } = row
       if (!videopath) return this.$message.warning('暂无视频')
       if (!videopath) return this.$message.warning('暂无视频')
       let address = baseAddress + '/psjc/file' + videopath
       let address = baseAddress + '/psjc/file' + videopath
@@ -468,7 +481,7 @@ export default {
     // 表格多选事件
     // 表格多选事件
     handleSelectionChange(val) {
     handleSelectionChange(val) {
       console.log('缺陷')
       console.log('缺陷')
-      this.multipleSelection = val.map(item => {
+      this.multipleSelection = val.map((item) => {
         return { ...item, defectCode: `(${item.defectCode})${item.defectName}` }
         return { ...item, defectCode: `(${item.defectCode})${item.defectName}` }
       })
       })
     },
     },
@@ -511,7 +524,7 @@ export default {
   box-sizing: border-box;
   box-sizing: border-box;
   position: relative;
   position: relative;
   font-size: 12px;
   font-size: 12px;
-    /deep/.el-table .el-table__cell {
+  /deep/.el-table .el-table__cell {
     padding: 0;
     padding: 0;
   }
   }
   // 卡片样式
   // 卡片样式

+ 73 - 53
src/views/pipelineDefect/manage/evaluate/widget.vue

@@ -42,11 +42,11 @@
             </el-row>
             </el-row>
           </div> -->
           </div> -->
           <div class="title">结构性缺陷等级:</div>
           <div class="title">结构性缺陷等级:</div>
-          <el-select clearable v-model="searchValue.structClass" placeholder="全部">
+          <el-select style="width: 120px" clearable v-model="searchValue.structClass" placeholder="全部">
             <el-option v-for="(item, i) in gradeArr" :key="i" :label="item" :value="item"></el-option>
             <el-option v-for="(item, i) in gradeArr" :key="i" :label="item" :value="item"></el-option>
           </el-select>
           </el-select>
           <div class="title">功能性缺陷等级:</div>
           <div class="title">功能性缺陷等级:</div>
-          <el-select clearable v-model="searchValue.funcClass" placeholder="全部">
+          <el-select style="width: 120px" clearable v-model="searchValue.funcClass" placeholder="全部">
             <el-option v-for="(item, i) in gradeArr" :key="i" :label="item" :value="item"></el-option>
             <el-option v-for="(item, i) in gradeArr" :key="i" :label="item" :value="item"></el-option>
           </el-select>
           </el-select>
           <el-button size="small" style="margin-left: 26px" type="primary" @click="searchApi"> 搜索 </el-button>
           <el-button size="small" style="margin-left: 26px" type="primary" @click="searchApi"> 搜索 </el-button>
@@ -62,9 +62,10 @@
             name="管道评估结果表单.xls"
             name="管道评估结果表单.xls"
             type="xls"
             type="xls"
           >
           >
-            <el-button size="small" type="primary">导出
+            <el-button size="small" type="primary"
+              >导出
               <!-- <i class="el-icon-download el-icon--right"></i> -->
               <!-- <i class="el-icon-download el-icon--right"></i> -->
-              </el-button>
+            </el-button>
           </download-excel>
           </download-excel>
         </div>
         </div>
       </div>
       </div>
@@ -82,7 +83,7 @@
         :default-sort="{ prop: 'date', order: 'descending' }"
         :default-sort="{ prop: 'date', order: 'descending' }"
       >
       >
         <template slot="empty">
         <template slot="empty">
-          <img src="@/assets/icon/null.png"   />
+          <img src="@/assets/icon/null.png" />
         </template>
         </template>
         <el-table-column header-align="center" align="center" type="selection" width="55"> </el-table-column>
         <el-table-column header-align="center" align="center" type="selection" width="55"> </el-table-column>
         <el-table-column header-align="center" align="center" type="index" label="序号" width="50"> </el-table-column>
         <el-table-column header-align="center" align="center" type="index" label="序号" width="50"> </el-table-column>
@@ -100,7 +101,9 @@
         </el-table-column>
         </el-table-column>
         <el-table-column fixed="right" header-align="center" label="操作" align="center" width="150">
         <el-table-column fixed="right" header-align="center" label="操作" align="center" width="150">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-button type="text" size="small" :disabled="!scope.row.videopath" @click.stop="toVideo(scope.row)">视频</el-button>
+            <el-button type="text" size="small" :disabled="!scope.row.videopath" @click.stop="toVideo(scope.row)"
+              >视频</el-button
+            >
             <!-- <el-button type="text" size="small"  @click.stop="toPdfPage(scope.row.pdfFilePath)">报告</el-button> -->
             <!-- <el-button type="text" size="small"  @click.stop="toPdfPage(scope.row.pdfFilePath)">报告</el-button> -->
             <el-button type="text" size="small" @click.stop="openDetails(scope.row)">详情</el-button>
             <el-button type="text" size="small" @click.stop="openDetails(scope.row)">详情</el-button>
           </template>
           </template>
@@ -174,7 +177,7 @@
                 <div class="right" style="width: 250px; margin-left: 20px; min-height: 240px">
                 <div class="right" style="width: 250px; margin-left: 20px; min-height: 240px">
                   <el-tabs v-model="activeName">
                   <el-tabs v-model="activeName">
                     <!-- <el-tab-pane :label="`照片(${getCurrentForm.pipeDefects.length || 0})`" name="picnum"> -->
                     <!-- <el-tab-pane :label="`照片(${getCurrentForm.pipeDefects.length || 0})`" name="picnum"> -->
-                      <el-tab-pane :label="`照片`" name="picnum">
+                    <el-tab-pane :label="`照片`" name="picnum">
                       <div class="container">
                       <div class="container">
                         <el-image
                         <el-image
                           style="width: 100%; height: 90%; -webkit-user-drag: none"
                           style="width: 100%; height: 90%; -webkit-user-drag: none"
@@ -210,10 +213,17 @@
       </div>
       </div>
     </transition>
     </transition>
     <!-- 视频 -->
     <!-- 视频 -->
-    <el-dialog width='70%' top="5vh" :title="videoTitle" v-if="showVideo" :visible.sync="showVideo" :append-to-body="true">
+    <el-dialog
+      width="70%"
+      top="5vh"
+      :title="videoTitle"
+      v-if="showVideo"
+      :visible.sync="showVideo"
+      :append-to-body="true"
+    >
       <div style="width: 100%; height: 80%">
       <div style="width: 100%; height: 80%">
         <video controls="controls" width="100%" height="83%">
         <video controls="controls" width="100%" height="83%">
-            <source :src="videoUrl" type="video/mp4" />
+          <source :src="videoUrl" type="video/mp4" />
         </video>
         </video>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
@@ -222,7 +232,12 @@
 
 
 <script>
 <script>
 import JsonExcel from 'vue-json-excel'
 import JsonExcel from 'vue-json-excel'
-import { getDefectData, queryPageAssessment, downloadFile, histroyPipeData } from '@/views/pipelineDefect/api/pipelineDefect'
+import {
+  getDefectData,
+  queryPageAssessment,
+  downloadFile,
+  histroyPipeData
+} from '@/views/pipelineDefect/api/pipelineDefect'
 import { projUtil } from '@/views/pipelineDefect/common/proj'
 import { projUtil } from '@/views/pipelineDefect/common/proj'
 
 
 // 引入公共ip地址
 // 引入公共ip地址
@@ -246,19 +261,19 @@ export default {
   data() {
   data() {
     return {
     return {
       json_fields: {
       json_fields: {
-        '工程名称': 'prjName',
-        '管段编号': 'expNo',
-        '管段类型': 'pipeType',
+        工程名称: 'prjName',
+        管段编号: 'expNo',
+        管段类型: 'pipeType',
         '管径(mm)': 'diameter',
         '管径(mm)': 'diameter',
-        '材质': 'material',
-        '结构性缺陷评价': 'structEstimate',
-        '缺陷数量': 'defectnum',
-        '检测照片': 'picnum',
-        '检测视频': 'videoFileName',
-        '检测地点': 'checkAddress',
+        材质: 'material',
+        结构性缺陷评价: 'structEstimate',
+        缺陷数量: 'defectnum',
+        检测照片: 'picnum',
+        检测视频: 'videoFileName',
+        检测地点: 'checkAddress',
         // '检测日期': 'sampleTime',
         // '检测日期': 'sampleTime',
-        '结构性缺陷等级': 'structClass',
-        '功能性缺陷等级': 'funcClass'
+        结构性缺陷等级: 'structClass',
+        功能性缺陷等级: 'funcClass'
       },
       },
       id: null, // 当前列表id
       id: null, // 当前列表id
       activeName: 'picnum', // 照片视频tab标签
       activeName: 'picnum', // 照片视频tab标签
@@ -309,7 +324,7 @@ export default {
         { width: '150', sortable: true, label: '结构性缺陷等级', name: 'structClass' },
         { width: '150', sortable: true, label: '结构性缺陷等级', name: 'structClass' },
         { width: '150', sortable: true, label: '功能性缺陷等级', name: 'funcClass' },
         { width: '150', sortable: true, label: '功能性缺陷等级', name: 'funcClass' },
         { width: '200', sortable: false, label: '结构性缺陷评价', name: 'structEstimate' },
         { width: '200', sortable: false, label: '结构性缺陷评价', name: 'structEstimate' },
-        { width: '200', sortable: false, label: '功能性缺陷评价', name: 'funcEstimate' },
+        { width: '200', sortable: false, label: '功能性缺陷评价', name: 'funcEstimate' }
         // { width: '100', sortable: true, label: '检测日期', name: 'sampleTime' },
         // { width: '100', sortable: true, label: '检测日期', name: 'sampleTime' },
       ],
       ],
       gradeArr: ['Ⅰ', 'Ⅱ', 'Ⅲ', 'Ⅳ'], // 缺陷等级
       gradeArr: ['Ⅰ', 'Ⅱ', 'Ⅲ', 'Ⅳ'], // 缺陷等级
@@ -359,7 +374,7 @@ export default {
       currentDataProjName: appconfig.currPRJ, // 当前坐标系
       currentDataProjName: appconfig.currPRJ, // 当前坐标系
       popup: null,
       popup: null,
       hasLoad: false,
       hasLoad: false,
-      // 
+      //
       showVideo: false,
       showVideo: false,
       videoUrl: '',
       videoUrl: '',
       videoTitle: '视频',
       videoTitle: '视频',
@@ -369,15 +384,12 @@ export default {
       themLayer: null
       themLayer: null
     }
     }
   },
   },
-  watch: {
-  },
+  watch: {},
   mounted() {
   mounted() {
-      this.upDateTable()
-  },
-  destroyed() {
-  },
-  computed: {
+    this.upDateTable()
   },
   },
+  destroyed() {},
+  computed: {},
   methods: {
   methods: {
     sDateChange(t) {
     sDateChange(t) {
       console.log('起始时间变化')
       console.log('起始时间变化')
@@ -394,11 +406,11 @@ export default {
         })
         })
       }
       }
     },
     },
-    rect () {
+    rect() {
       this.removeEvent()
       this.removeEvent()
       this.drawer = new iDraw(this.map, 'rect', {
       this.drawer = new iDraw(this.map, 'rect', {
         showCloser: false,
         showCloser: false,
-        endDrawCallBack: fea => {
+        endDrawCallBack: (fea) => {
           this.addEvent()
           this.addEvent()
           this.drawer.remove()
           this.drawer.remove()
           this.drawFea = fea
           this.drawFea = fea
@@ -485,7 +497,7 @@ export default {
     closePromptBox() {
     closePromptBox() {
       this.currentInfoCard = false
       this.currentInfoCard = false
     },
     },
-    toVideo (row) {
+    toVideo(row) {
       console.log('暂无视频')
       console.log('暂无视频')
       let { videopath, videoFileName } = row
       let { videopath, videoFileName } = row
       if (!videopath) return this.$message.warning('暂无视频')
       if (!videopath) return this.$message.warning('暂无视频')
@@ -570,8 +582,8 @@ export default {
     async openDetails(row) {
     async openDetails(row) {
       console.log('详情')
       console.log('详情')
       this.id = row.id
       this.id = row.id
-          this.data.that.setDefectId(row.id)
-          this.data.that.setDetailVisible(true)
+      this.data.that.setDefectId(row.id)
+      this.data.that.setDetailVisible(true)
     },
     },
     // 重置
     // 重置
     resetBtn() {
     resetBtn() {
@@ -596,16 +608,18 @@ export default {
         structClass: this.searchValue.structClass,
         structClass: this.searchValue.structClass,
         queryText: this.searchValue.queryParams,
         queryText: this.searchValue.queryParams,
         endDate: this.searchValue.finishDate,
         endDate: this.searchValue.finishDate,
-        startDate: this.searchValue.startDate,
+        startDate: this.searchValue.startDate
       })
       })
       console.log(this.searchValue)
       console.log(this.searchValue)
     },
     },
-    
+
     // 搜索地图
     // 搜索地图
-    searchMap (filterObj) {
+    searchMap(filterObj) {
       console.log('过滤条件', filterObj)
       console.log('过滤条件', filterObj)
       let features = this.vectorLayer.getSource().getFeatures()
       let features = this.vectorLayer.getSource().getFeatures()
-      features = features.filter(fea => filter(fea)).map(fea => new Feature({ geometry: fea.getGeometry().clone() }))
+      features = features
+        .filter((fea) => filter(fea))
+        .map((fea) => new Feature({ geometry: fea.getGeometry().clone() }))
 
 
       let source = this.lightLayer.getSource()
       let source = this.lightLayer.getSource()
       source.clear()
       source.clear()
@@ -617,14 +631,17 @@ export default {
         view.setCenter(center)
         view.setCenter(center)
         view.setZoom(17)
         view.setZoom(17)
       }
       }
-      function filter (fea) {
-        let expNo = fea.get('expNo'), 
-            material = fea.get('material'), 
-            funcClass = fea.get('funcClass'), 
-            structClass = fea.get('structClass'),
-            date = fea.get('sampleTime');
+      function filter(fea) {
+        let expNo = fea.get('expNo'),
+          material = fea.get('material'),
+          funcClass = fea.get('funcClass'),
+          structClass = fea.get('structClass'),
+          date = fea.get('sampleTime')
         if (filterObj.queryText) {
         if (filterObj.queryText) {
-          if (!expNo.toLowerCase().includes(filterObj.queryText.toLowerCase()) && !material.includes(filterObj.queryText)) {
+          if (
+            !expNo.toLowerCase().includes(filterObj.queryText.toLowerCase()) &&
+            !material.includes(filterObj.queryText)
+          ) {
             return false
             return false
           }
           }
         }
         }
@@ -642,9 +659,13 @@ export default {
           if (endDate === startDate) {
           if (endDate === startDate) {
             return date === endDate
             return date === endDate
           } else {
           } else {
-            return (!startDate ? true : new Date(date) >= new Date(filterObj.startDate)) && (!endDate ? true : new Date(date) <= new Date(filterObj.endDate))
+            return (
+              (!startDate ? true : new Date(date) >= new Date(filterObj.startDate)) &&
+              (!endDate ? true : new Date(date) <= new Date(filterObj.endDate))
+            )
           }
           }
-        } return true
+        }
+        return true
       }
       }
     },
     },
 
 
@@ -684,7 +705,6 @@ export default {
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-
 .engineering-manage {
 .engineering-manage {
   height: 100vh;
   height: 100vh;
   margin: 0;
   margin: 0;
@@ -693,7 +713,7 @@ export default {
   position: relative;
   position: relative;
   font-size: 12px;
   font-size: 12px;
   // 卡片样式
   // 卡片样式
-    /deep/.el-table .el-table__cell {
+  /deep/.el-table .el-table__cell {
     padding: 0;
     padding: 0;
   }
   }
   /deep/ .el-dialog {
   /deep/ .el-dialog {
@@ -991,9 +1011,9 @@ export default {
     }
     }
   }
   }
 }
 }
-  /deep/.el-table .el-table__cell:not(td) {
-    padding: 0;
-  }
+/deep/.el-table .el-table__cell:not(td) {
+  padding: 0;
+}
 #popupCardEva {
 #popupCardEva {
   &::after {
   &::after {
     content: '';
     content: '';