xieqy 2 years ago
parent
commit
cee582a0dd

+ 2 - 2
src/permission.ts

@@ -10,7 +10,7 @@ import { ERROR } from '@/router/routes'
 
 NProgress.configure({ showSpinner: true, height: 50 }) // NProgress配置
 
-const whiteList = ['/login','/gislogin'] // 无重定向白名单
+const whiteList = ['/login', '/gislogin'] // 无重定向白名单
 
 router.beforeEach(async (to, from, next) => {
   // 开始进度条
@@ -76,7 +76,7 @@ router.beforeEach(async (to, from, next) => {
           // let appconfig = await store.dispatch('gis/initGISResource')
           // console.log(appconfig)
           // next({ ...to })
-          next(accessRoutes.some(e => e.path == '/groupPage') ? { path: '/groupPage' } : { ...to })
+          next(accessRoutes.some(e => e.path == '/groupPage') ? to.path === '/' ? { path: '/groupPage' } : { ...to } : { ...to })
         } catch (error) {
           // debugger
           console.log(error)

+ 1 - 3
src/views/groupPage/components/ComprehensiveChart/designAndConsChart.vue

@@ -8,7 +8,7 @@ import { fontSize } from '@/views/groupPage/util'
 export default {
   name: 'designAndConsChart', //设计施工综合图表
   props: {
-    chartData: {default: () => {}}
+    chartData: { default: () => {} }
   },
   data() {
     return { myChart: null }
@@ -130,7 +130,6 @@ export default {
           {
             name: '监理',
             type: 'line',
-            stack: '总量',
             symbol: 'circle',
             symbolSize: 6,
             showSymbol: false,
@@ -159,7 +158,6 @@ export default {
           {
             name: '施工',
             type: 'line',
-            stack: '总量',
             symbol: 'circle',
             symbolSize: 6,
             showSymbol: false,

+ 0 - 2
src/views/groupPage/components/ComprehensiveChart/statisticalReportingChart.vue

@@ -78,7 +78,6 @@ export default {
           {
             name: '累计上报',
             type: 'line',
-            stack: '总量',
             symbol: 'circle',
             symbolSize: 8,
             showSymbol: false,
@@ -107,7 +106,6 @@ export default {
           {
             name: '累计完成',
             type: 'line',
-            stack: '总量',
             symbol: 'circle',
             symbolSize: 8,
             showSymbol: false,

+ 2 - 2
src/views/groupPage/districtPageModules/commonModules/SectorToolbar.vue

@@ -269,8 +269,8 @@ export default class SectorToolbar extends Vue {
     this.isRoaming = true
   } //地图选择面板点击事件
   layerItemClick(layerType, poiType) {
-    this.$message.info('网络安全原因,暂时无法切换!')
-    return
+    // this.$message.info('网络安全原因,暂时无法切换!')
+    // return
     if (layerType === this.selectTdtType) return
     this.initTianditu(layerType, poiType)
     this.labelOn = true

+ 1 - 1
src/views/groupPage/districtPageModules/customTools/infoComponents/projectInfo.vue

@@ -87,7 +87,7 @@ export default class projectInfo extends Vue {
     this.addMapEvent()
   }
   async searchInfo() {
-    const data = { queryText: this.info.originname } //查询条件
+    const data = { queryText: this.info.originname || this.info.name } //查询条件
     await mapSearch_api(data).then((res) => {
       let dArray = [],
         bArray = []

+ 1 - 0
src/views/groupPage/districtPageModules/customTools/monitorTree.vue

@@ -265,6 +265,7 @@ export default class monitorTree extends Vue {
   }
   activeMapEvent() {
     const that = this
+    if (handler) return
     handler = new Cesium.ScreenSpaceEventHandler(this.viewer.canvas)
     handler.setInputAction(
       function (movement) {

+ 20 - 13
src/views/widgets/MapToolBar/index.vue

@@ -113,9 +113,10 @@ const viewMemoryType = {
 import Vue from 'vue'
 import $ from 'jquery'
 import { createQRCodePdf_api } from '@/api/APIs'
-// import PipeUnitNowInfo from '@/views/widgets/PipeUnitNowInfo/index.vue'
+import PipeUnitNowInfo from '@/views/widgets/PipeUnitNowInfo/index.vue'
 import MeasurementBar from './MeasurementBar'
 import { Canvas2Image } from '@/utils/mapCommon/tools'
+import { baseAddress } from '@/utils/request'
 export default {
   name: 'MapToolBar',
   data() {
@@ -186,14 +187,14 @@ export default {
       }
     },
     lookAttriInfo() {
-      // const pipeInfoConstructor = Vue.extend(PipeUnitNowInfo);
-      // const pipeInfo = new pipeInfoConstructor({
-      //   data: {
-      //     isInteractive: true,
-      //     locateUnit: null,
-      //   },
-      //   store: this.$store,
-      // }).$mount();
+      const pipeInfoConstructor = Vue.extend(PipeUnitNowInfo)
+      const pipeInfo = new pipeInfoConstructor({
+        data: {
+          isInteractive: true,
+          locateUnit: null
+        },
+        store: this.$store
+      }).$mount()
     },
     /**
      * 地图选择面板点击事件
@@ -514,16 +515,22 @@ export default {
           option.append('file', blob, '部件管理截图.png')
           createQRCodePdf_api(option)
             .then((res) => {
-              if (res.data.code == 1) {
-                const pdf = '/api' + downloadUrl + '?fileName=' + res.data.result
+              if (res.code == 1) {
+                const pdf =
+                  baseAddress +
+                  downloadUrl +
+                  '?fileName=' +
+                  res.result +
+                  '&access_token=' +
+                  sessionStorage.getItem('token')
                 window.open(pdf)
               } else {
                 this.$message.error('导出PDF出错')
               }
             })
             .then(() => {
-              if (type == 'preview') {
-              }
+              // if (type == 'preview') {
+              // }
             })
         })
       }

+ 0 - 4
src/views/widgets/PipeSpeedInfoCheck/index.vue

@@ -221,7 +221,6 @@ export default {
 
       GetProgress(data)
         .then((result) => {
-          result = result.data
           if (result.code === 1) {
             if (Object.keys(result.result).length === 0) {
               this.$message.success('无进度信息')
@@ -321,9 +320,7 @@ export default {
       }
       PipeAndNodeProcess(dateRange)
         .then((result) => {
-          result = result.data
           if (result.code !== 1 || result.result.length === 0) return
-          console.log(result)
           const filters = []
           const cwpInfos = []
           const len = result.result.length
@@ -662,7 +659,6 @@ export default {
      * @param result
      */
     queryComplete(result) {
-      console.log(result)
       const that = this
       if (result.currentCount === 0) {
         return

+ 155 - 162
src/views/widgets/PipeUnitInfo/BaseInfo.vue

@@ -10,11 +10,7 @@
       <!-- <span class='project'>二维码:</span> -->
       <div class="qrcodeItem">
         <!-- <el-image class="qrcode"></el-image> -->
-          <el-image
-          style="width: 100%; height: 100%"
-          :src="qrUrl"
-          :preview-src-list="qrUrlPreview">
-          </el-image>
+        <el-image style="width: 100%; height: 100%" :src="qrUrl" :preview-src-list="qrUrlPreview"> </el-image>
       </div>
     </div>
     <div class="processTime">
@@ -39,37 +35,36 @@
   </div>
 </template>
 <script>
-import VerificationHelper from '@/utils/mapCommon/VerificationHelper';
-import apis from "@/api/PipeUnitInfo";
+import VerificationHelper from '@/utils/mapCommon/VerificationHelper'
+import apis from '@/api/PipeUnitInfo'
+import { baseAddress } from '@/utils/request'
 /**
  * 部件查看---概述
  */
 export default {
-  name: "UnitBaseInfo",
+  name: 'UnitBaseInfo',
   props: {
     apiUrls: null,
     currentUnit: null
   },
   data() {
     return {
-      qrUrl: "", //部件二维码URL
-      qrUrlPreview:[],
+      qrUrl: '', //部件二维码URL
+      qrUrlPreview: [],
       infos: [], //部件概览信息
-      planBeginTime: "/", //部件计划开始时间
-      planEndTime: "/", //部件计划结束时间
-      begintime: "/", //部件实际开始时间
-      lastime: "/", //部件实际结束时间
-      isFinish: "", //部件是否完工
-    };
+      planBeginTime: '/', //部件计划开始时间
+      planEndTime: '/', //部件计划结束时间
+      begintime: '/', //部件实际开始时间
+      lastime: '/', //部件实际结束时间
+      isFinish: '' //部件是否完工
+    }
   },
   computed: {
     lastimeText() {
-      return this.isFinish === "1"
-        ? "部件实际结束时间:"
-        : "部件最后扫码时间:";
+      return this.isFinish === '1' ? '部件实际结束时间:' : '部件最后扫码时间:'
     },
     token() {
-      return this.$store.getters.token;
+      return this.$store.getters.token
     }
   },
   methods: {
@@ -79,8 +74,8 @@ export default {
      * @param info 展示的属性的数据
      */
     showUnitInfoPage(result, info) {
-      this.initUnitBaseInfo(result, info);
-      this.getWbsInfo(result.code);
+      this.initUnitBaseInfo(result, info)
+      this.getWbsInfo(result.code)
     },
     /**
      * 该方法用于初始化管线基础属性信息
@@ -88,19 +83,19 @@ export default {
      */
     initUnitBaseInfo(result, info) {
       //基础信息展示
-      this.infos = info.map(item => {
-        let titleStr = VerificationHelper.setNullAndUndefined(item.title);
-        let valueStr = VerificationHelper.setNullAndUndefined(item.value);
+      this.infos = info.map((item) => {
+        let titleStr = VerificationHelper.setNullAndUndefined(item.title)
+        let valueStr = VerificationHelper.setNullAndUndefined(item.value)
         return { title: titleStr, value: valueStr }
-      });
+      })
       //二维码前面的信息
       //请求后台,获取部件二维码
-      const url = this.currentUnit.geoType === "LINE" ? this.apiUrls.createPicPipe : this.apiUrls.createPicNode;
+      const url = this.currentUnit.geoType === 'LINE' ? this.apiUrls.createPicPipe : this.apiUrls.createPicNode
       const options = {
         pbs: this.currentUnit.code
       }
-      this.qrUrl = this.$store.state.apiRoot + url + "?pbs=" + options.pbs;
-      this.qrUrlPreview=[];
+      this.qrUrl = baseAddress + url + '?pbs=' + options.pbs + '&access_token=' + sessionStorage.getItem('token')
+      this.qrUrlPreview = []
       this.qrUrlPreview.push(this.qrUrl)
     },
     /**
@@ -110,185 +105,183 @@ export default {
       let data = {
         pbs: pbs
       }
-      apis.getWbsInfo(data).then(result => {
-        result=result.data;
+      apis.getWbsInfo(data).then((result) => {
         if (result.result) {
           if (result.result.planBeginTime) {
-            this.planBeginTime=result.result.planBeginTime;
+            this.planBeginTime = result.result.planBeginTime
           }
           if (result.result.planEndTime) {
-            this.planEndTime=result.result.planEndTime;
+            this.planEndTime = result.result.planEndTime
           }
         }
       })
-      apis.getPartsTime({ code: pbs }).then(result => {
-        result=result.data;
+      apis.getPartsTime({ code: pbs }).then((result) => {
         if (result.result) {
-          this.isFinish=result.result.isFinish
+          this.isFinish = result.result.isFinish
           if (result.result.begintime) {
-              this.begintime=result.result.begintime;
+            this.begintime = result.result.begintime
           }
           if (result.result.lastime) {
-              this.lastime=result.result.lastime;
+            this.lastime = result.result.lastime
           }
         }
       })
     }
   }
-};
+}
 </script>
 <style lang="scss" scoped>
 .unitInfo {
-    ::v-deep.el-input__inner{
-      background-color: #f8f8f8;
-    }
-    .baseInfo {
-      width: 75%;
+  ::v-deep.el-input__inner {
+    background-color: #f8f8f8;
+  }
+  .baseInfo {
+    width: 75%;
+    position: relative;
+    float: left;
+    .item {
       position: relative;
       float: left;
-      .item {
+      width: 45%;
+      //padding: 14px 0px 0px 10px;
+      display: flex;
+      align-items: center;
+      padding: 5px;
+
+      .el-input.value {
+        flex: 0.6;
+        display: inline-block;
+        position: relative;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        overflow: hidden;
+        color: black;
+        border: none;
+      }
+      span.title {
+        flex: 0.4;
+        display: block;
+        text-align: right;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        overflow: hidden;
+        color: #888888;
+        padding: 6px;
         position: relative;
         float: left;
-        width: 45%;
-        //padding: 14px 0px 0px 10px;
-        display: flex;
-        align-items: center;
-        padding: 5px;
-
-        .el-input.value {
-          flex: 0.6;
-          display: inline-block;
-          position: relative;
-          white-space: nowrap;
-          text-overflow: ellipsis;
-          overflow: hidden;
-          color: black;
-          border: none;
-        }
-        span.title {
-          flex: 0.4;
-          display: block;
-          text-align: right;
-          white-space: nowrap;
-          text-overflow: ellipsis;
-          overflow: hidden;
-          color: #888888;
-          padding: 6px;
-          position: relative;
-          float: left;
-        }
       }
     }
+  }
 
-    .twoBaseInfo {
+  .twoBaseInfo {
+    position: relative;
+    float: left;
+    width: 20%;
+    left: 2.5%;
+
+    .qrcodeItem {
       position: relative;
       float: left;
-      width: 20%;
-      left: 2.5%;
-
-      .qrcodeItem {
+      // width: 100%;
+      height: 225px;
+      width: 160px;
+      // background-image: url(./images/createPicNode.png);
+      background-repeat: no-repeat;
+      background-size: 100% 100%;
+      .projectName {
         position: relative;
         float: left;
-       // width: 100%;
-       height: 225px;
-       width:160px;
-        // background-image: url(./images/createPicNode.png);
-        background-repeat: no-repeat;
-        background-size: 100% 100%;
-        .projectName {
-          position: relative;
-          float: left;
-          width: 100%;
-          display: block;
-          text-align: left;
-          margin-left: 10px;
-          padding: 0px 10px;
-          white-space: nowrap;
-          text-overflow: ellipsis;
-          overflow: hidden;
-          margin-bottom: 10px;
-          font-weight: 700;
-        }
+        width: 100%;
+        display: block;
+        text-align: left;
+        margin-left: 10px;
+        padding: 0px 10px;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        overflow: hidden;
+        margin-bottom: 10px;
+        font-weight: 700;
+      }
 
-        .qrcode {
-          position: relative;
-          float: left;
-          width: 100%;
-          top: 20px;
-        }
+      .qrcode {
+        position: relative;
+        float: left;
+        width: 100%;
+        top: 20px;
       }
     }
+  }
 
-    .processTime {
+  .processTime {
+    position: relative;
+    float: left;
+    border-top: solid;
+    border-bottom: solid;
+    border-width: 2px;
+    border-color: #f8f8f8;
+    width: 100%;
+    margin-top: 20px;
+    // height: 200px;
+
+    .remake {
       position: relative;
       float: left;
-      border-top: solid;
-      border-bottom: solid;
-      border-width: 2px;
-      border-color: #f8f8f8;
       width: 100%;
-      margin-top: 20px;
-      // height: 200px;
+      // padding: 20px 0px 0px 30px;
+      padding: 10px 0;
 
-      .remake {
+      .remakeColor {
         position: relative;
         float: left;
-        width: 100%;
-        // padding: 20px 0px 0px 30px;
-        padding: 10px 0;
-
-        .remakeColor {
-          position: relative;
-          float: left;
-          width: 5px;
-          // top: 5px;
-          height: 20px;
-          background: #1565cf;
-        }
-
-        .remakeTitle {
-          position: relative;
-          float: left;
-          font-size: 20px;
-          font-weight: 700;
-          left: 10px;
-        }
+        width: 5px;
+        // top: 5px;
+        height: 20px;
+        background: #1565cf;
       }
 
-      .progress-items {
-        // width: 100%;
-        // position: relative;
-        // float: left;
-        // padding: 14px 0 0 10px;
-        display: flex;
-        align-items: center;
-        padding: 10px;
-      }
-
-      .itemTitle {
-        width: 170px;
+      .remakeTitle {
         position: relative;
         float: left;
-        text-align: right;
-        color: #888888;
-        padding: 6px;
+        font-size: 20px;
+        font-weight: 700;
+        left: 10px;
       }
+    }
 
-      .jhStart,
-      .jhEnd,
-      .sjStart,
-      .sjEnd {
-        width: 220px;
-        position: relative;
-        float: left;
-        text-align: left;
-        background-size: 100px;
-        // background: #f8f8f8;
-        margin-right: calc(50% - 390px);
-        color: black;
-        padding-left: 10px;
-        border: none;
-      }
+    .progress-items {
+      // width: 100%;
+      // position: relative;
+      // float: left;
+      // padding: 14px 0 0 10px;
+      display: flex;
+      align-items: center;
+      padding: 10px;
+    }
+
+    .itemTitle {
+      width: 170px;
+      position: relative;
+      float: left;
+      text-align: right;
+      color: #888888;
+      padding: 6px;
+    }
+
+    .jhStart,
+    .jhEnd,
+    .sjStart,
+    .sjEnd {
+      width: 220px;
+      position: relative;
+      float: left;
+      text-align: left;
+      background-size: 100px;
+      // background: #f8f8f8;
+      margin-right: calc(50% - 390px);
+      color: black;
+      padding-left: 10px;
+      border: none;
     }
   }
+}
 </style>

+ 280 - 266
src/views/widgets/PipeUnitInfo/Contract.vue

@@ -1,297 +1,311 @@
 <template>
-    <div class='htclInfo'>
-        <div class='htInfo'>
-            <div class='remake'>
-                <div class='remakeColor'></div>
-                <div class='remakeTitle titleValue'>合同信息</div>
-            </div>
-            <div class='noht' :style="nohtPic" v-if="projectInfo.length==0"><span>暂无合同信息</span></div>
-            <div class='htInfoList'>
-                <div class="info-row" v-for="(item,index) of projectInfo" :key="(item.value+index)">
-                    <span class="info-title">{{item.title}}</span>
-                    <el-input class="info-content" :title="item.value"  :value="item.value" readonly='readonly'  size="medium"></el-input>
-                    <el-input class="info-code" :title="item.code" :value='item.code' readonly='readonly' size="medium"></el-input>
-                </div>
-                <div class="info-row" v-if="projectInfo.length!=0">
-                    <span class="info-title">部件编码:</span>
-                    <el-input class="info-content" :title="partscode"  :value='partscode' ></el-input>
-                    <el-input class="info-code" :title="currentUnit.code" :value='currentUnit.code' ></el-input>
-                </div>
-                <div class="info-row" v-for="(item,index) of unit" :key="(item.value+index)">
-                    <span class="info-title">{{item.title}}</span>
-                    <el-input  class="info-content inputContent" :value='item.value' ></el-input>
-                </div>
-                <div class="info-row" v-for="(item,index) of contract" :key="(item.value+index)">
-                    <span class="info-title">{{item.title}}</span>
-                    <el-input class="info-content inputContent" :title="item.value" :value='item.value' ></el-input>
-                </div>
-            </div>
+  <div class="htclInfo">
+    <div class="htInfo">
+      <div class="remake">
+        <div class="remakeColor"></div>
+        <div class="remakeTitle titleValue">合同信息</div>
+      </div>
+      <div class="noht" :style="nohtPic" v-if="projectInfo.length == 0"><span>暂无合同信息</span></div>
+      <div class="htInfoList">
+        <div class="info-row" v-for="(item, index) of projectInfo" :key="item.value + index">
+          <span class="info-title">{{ item.title }}</span>
+          <el-input
+            class="info-content"
+            :title="item.value"
+            :value="item.value"
+            readonly="readonly"
+            size="medium"
+          ></el-input>
+          <el-input
+            class="info-code"
+            :title="item.code"
+            :value="item.code"
+            readonly="readonly"
+            size="medium"
+          ></el-input>
         </div>
-        <div class='clInfo'>
-            <div class='remake'>
-                <div class='remakeColor'></div>
-                <div class='remakeTitle'>材料信息</div>
-            </div>
-            <div class='nocl' :style="noclPic" v-if="clInfo.length==0"><span>暂无材料信息</span></div>
-            <div class='clInfoList'>
-                <div class='clItem' v-for="item of clInfo" :key="item.title">
-                    <span class='clspan' :title='item.title'>{{item.title}}:</span>
-                    <el-input  class='clInput' :value='item.value' size="medium"></el-input>
-                </div>
-            </div>
+        <div class="info-row" v-if="projectInfo.length != 0">
+          <span class="info-title">部件编码:</span>
+          <el-input class="info-content" :title="partscode" :value="partscode"></el-input>
+          <el-input class="info-code" :title="currentUnit.code" :value="currentUnit.code"></el-input>
         </div>
+        <div class="info-row" v-for="(item, index) of unit" :key="item.value + index">
+          <span class="info-title">{{ item.title }}</span>
+          <el-input class="info-content inputContent" :value="item.value"></el-input>
+        </div>
+        <div class="info-row" v-for="(item, index) of contract" :key="item.value + index">
+          <span class="info-title">{{ item.title }}</span>
+          <el-input class="info-content inputContent" :title="item.value" :value="item.value"></el-input>
+        </div>
+      </div>
     </div>
+    <div class="clInfo">
+      <div class="remake">
+        <div class="remakeColor"></div>
+        <div class="remakeTitle">材料信息</div>
+      </div>
+      <div class="nocl" :style="noclPic" v-if="clInfo.length == 0"><span>暂无材料信息</span></div>
+      <div class="clInfoList">
+        <div class="clItem" v-for="item of clInfo" :key="item.title">
+          <span class="clspan" :title="item.title">{{ item.title }}:</span>
+          <el-input class="clInput" :value="item.value" size="medium"></el-input>
+        </div>
+      </div>
+    </div>
+  </div>
 </template>
 <script>
 /**
  * 部件查看---合同资料
  */
-import apis from "@/api/PipeUnitInfo";
+import apis from '@/api/PipeUnitInfo'
 import verificationHelper from '@/utils/mapCommon/VerificationHelper'
 import Config from './config.json'
 export default {
-    name:"UnitContractInfo",
-    data(){
-        return{
-            nohtPic:"background: url("+require("@/views/widgets/PipeUnitInfo/images/ht.png")+")",
-            noclPic:"background: url("+require("@/views/widgets/PipeUnitInfo/images/cl.png")+")",
-            currentUnit:{},
-            projectInfo:[],
-            partscode:"",
-            unit:{},
-            contract:{},
-            clInfo:[],
-        }
+  name: 'UnitContractInfo',
+  data() {
+    return {
+      nohtPic: 'background: url(' + require('@/views/widgets/PipeUnitInfo/images/ht.png') + ')',
+      noclPic: 'background: url(' + require('@/views/widgets/PipeUnitInfo/images/cl.png') + ')',
+      currentUnit: {},
+      projectInfo: [],
+      partscode: '',
+      unit: {},
+      contract: {},
+      clInfo: []
+    }
+  },
+  methods: {
+    /**
+     * 展示合同材料
+     * @param result 请求的获取的所有数据
+     */
+    showhtclPage(result, currentUnit) {
+      this.currentUnit = currentUnit
+      this.gethtInfo(result)
+      this.getclInfo()
     },
-    methods:{
-        /**
-         * 展示合同材料
-         * @param result 请求的获取的所有数据
-         */
-        showhtclPage(result,currentUnit) {
-            this.currentUnit=currentUnit
-            this.gethtInfo(result);
-            this.getclInfo();
-        },
-        //获取合同信息
-        async gethtInfo(info) {
-            let options={ pbs: this.currentUnit.code }
-            const res = this.currentUnit.geoType === "LINE" ?await apis.getPipeContract(options) :await apis.getPointContract(options);
-            const{code,result}=res.data
-            if(code==1){
-                if (result && result.length > 0) {
-                    let arr = result
-                    //
-                    this.projectInfo = arr.map(item => {
-                        return {
-                            title: item.levelname,
-                            value: item.name,
-                            code: item.code
-                        }
-                    });
-                    //获取部件编码
-                    let partscode = info.filter(item => {
-                        return item.compare == "pipeid";
-                    })
-                    partscode = partscode[0].value;
-                    if(!partscode){
-                        partscode="/"
-                    }
-                    this.partscode=partscode
-                    //获取单位
-                    let unit = [
-                        { title: "权属单位:", compare: "ownerunit", value: undefined },
-                        { title: "设计单位:", compare: "designunit", value: undefined },
-                        { title: "施工单位:", compare: "buildunit", value: undefined },
-                        { title: "监理单位:", compare: "supervisionunit", value: undefined }
-                    ];
-                    for (let item of info) {
-                        for (let un of unit) {
-                            if (item.compare === un.compare) {
-                                un.value = item.value
-                            }
-                        }
-                    }
-                    this.unit=unit
-                    //获取设计施工合同
-                    let contract = [
-                        { title: "设计合同:", compare: "designcontract", value: undefined, code: undefined },
-                        { title: "施工合同:", compare: "contract", value: undefined, code: undefined }
-                    ]
-                    for (let item of info) {
-                        for (let un of contract) {
-                            if (item.compare === un.compare) {
-                                un.value = item.value;
-                            }
-                            if (item.compare === "designcontractcode" && un.compare === "designcontract") un.code = item.value;
-                            if (item.compare === "contractcode" && un.compare === "contract") un.code = item.value;
-                        }
-                    }
-                    this.contract=contract
-                }
-            }else{
-                this.$message.error('获取合同信息失败')
+    //获取合同信息
+    async gethtInfo(info) {
+      let options = { pbs: this.currentUnit.code }
+      const res =
+        this.currentUnit.geoType === 'LINE' ? await apis.getPipeContract(options) : await apis.getPointContract(options)
+      const { code, result } = res
+      if (code == 1) {
+        if (result && result.length > 0) {
+          let arr = result
+          //
+          this.projectInfo = arr.map((item) => {
+            return {
+              title: item.levelname,
+              value: item.name,
+              code: item.code
+            }
+          })
+          //获取部件编码
+          let partscode = info.filter((item) => {
+            return item.compare == 'pipeid'
+          })
+          partscode = partscode[0].value
+          if (!partscode) {
+            partscode = '/'
+          }
+          this.partscode = partscode
+          //获取单位
+          let unit = [
+            { title: '权属单位:', compare: 'ownerunit', value: undefined },
+            { title: '设计单位:', compare: 'designunit', value: undefined },
+            { title: '施工单位:', compare: 'buildunit', value: undefined },
+            { title: '监理单位:', compare: 'supervisionunit', value: undefined }
+          ]
+          for (let item of info) {
+            for (let un of unit) {
+              if (item.compare === un.compare) {
+                un.value = item.value
+              }
             }
-        },
-        //获取材料信息
-        async getclInfo(){
-            let options={ pbs: this.currentUnit.code }
-            const res = await apis.getMaterialInfo(options)
-            const{code,result}=res.data
-            if(code==1){
-                if(!result) return
-                let dataFiled =result
-                for (let key in Config.clInfo) {
-                    let title = Config.clInfo[key];
-                    let value = verificationHelper.setNullAndUndefined(dataFiled[key]);
-                    this.clInfo.push({title:title,value:value})
-                }
-            }else{
-                // this.$message.error('获取材料信息失败')
+          }
+          this.unit = unit
+          //获取设计施工合同
+          let contract = [
+            { title: '设计合同:', compare: 'designcontract', value: undefined, code: undefined },
+            { title: '施工合同:', compare: 'contract', value: undefined, code: undefined }
+          ]
+          for (let item of info) {
+            for (let un of contract) {
+              if (item.compare === un.compare) {
+                un.value = item.value
+              }
+              if (item.compare === 'designcontractcode' && un.compare === 'designcontract') un.code = item.value
+              if (item.compare === 'contractcode' && un.compare === 'contract') un.code = item.value
             }
+          }
+          this.contract = contract
+        }
+      } else {
+        this.$message.error('获取合同信息失败')
+      }
+    },
+    //获取材料信息
+    async getclInfo() {
+      let options = { pbs: this.currentUnit.code }
+      const res = await apis.getMaterialInfo(options)
+      const { code, result } = res
+      if (code == 1) {
+        if (!result) return
+        let dataFiled = result
+        for (let key in Config.clInfo) {
+          let title = Config.clInfo[key]
+          let value = verificationHelper.setNullAndUndefined(dataFiled[key])
+          this.clInfo.push({ title: title, value: value })
         }
+      } else {
+        // this.$message.error('获取材料信息失败')
+      }
     }
+  }
 }
 </script>
 <style lang="scss" scoped>
-    .remake {
-      position: relative;
-      float: left;
-      width: 100%;
-    //   padding: 20px 0px 0px 30px;
+.remake {
+  position: relative;
+  float: left;
+  width: 100%;
+  //   padding: 20px 0px 0px 30px;
 
-      .remakeColor {
-        position: relative;
-        float: left;
-        width: 5px;
-        // top: 5px;
-        height: 20px;
-        background: #1565cf;
-      }
+  .remakeColor {
+    position: relative;
+    float: left;
+    width: 5px;
+    // top: 5px;
+    height: 20px;
+    background: #1565cf;
+  }
 
-      .remakeTitle {
-        position: relative;
-        float: left;
-        font-size: 20px;
-        font-weight: 700;
-        left: 10px;
-      }
-    }
-    .htclInfo {
-        width: 100%;
-        height: 430px;
-        overflow: auto;
-        ::v-deep.el-input__inner{
-            background-color: #f8f8f8;
-        }
-        .htInfo{
-            width: 100%;
-            display: flex;
-            flex-flow: column;
-        }
-        .nocl,.noht{
-            width: 164px;
-            height: 93px;
-            position: relative;
-            float: left;
-            left: calc((100% - 164px) / 2);
-            margin: 40px 0px;
+  .remakeTitle {
+    position: relative;
+    float: left;
+    font-size: 20px;
+    font-weight: 700;
+    left: 10px;
+  }
+}
+.htclInfo {
+  width: 100%;
+  height: 430px;
+  overflow: auto;
+  ::v-deep.el-input__inner {
+    background-color: #f8f8f8;
+  }
+  .htInfo {
+    width: 100%;
+    display: flex;
+    flex-flow: column;
+  }
+  .nocl,
+  .noht {
+    width: 164px;
+    height: 93px;
+    position: relative;
+    float: left;
+    left: calc((100% - 164px) / 2);
+    margin: 40px 0px;
 
-            span {
-            display: block;
-            position: relative;
-            bottom: 0px;
-            top: 120%;
-            text-align: center;
-            }
-        }
-        // .noht {
-        //     background: url(./images/ht.png);
-        // }
-        // .nocl {
-        //     background: url(./images/cl.png);
-        // }
-      .info-row {
-        position: relative;
-        width: 100%;
-        float: left;
-        padding: 10px 0px 0px 0px;
-        display: flex;
-        align-items: center;
-      }
+    span {
+      display: block;
+      position: relative;
+      bottom: 0px;
+      top: 120%;
+      text-align: center;
+    }
+  }
+  // .noht {
+  //     background: url(./images/ht.png);
+  // }
+  // .nocl {
+  //     background: url(./images/cl.png);
+  // }
+  .info-row {
+    position: relative;
+    width: 100%;
+    float: left;
+    padding: 10px 0px 0px 0px;
+    display: flex;
+    align-items: center;
+  }
 
-      span.info-title {
-        width: 170px;
-        display: block;
-        position: relative;
-        float: left;
-        text-align: right;
-        padding: 6px;
-        color: #888888;
-      }
+  span.info-title {
+    width: 170px;
+    display: block;
+    position: relative;
+    float: left;
+    text-align: right;
+    padding: 6px;
+    color: #888888;
+  }
 
-      .info-content {
-        position: relative;
-        float: left;
-        width: calc((100% - 170px) / 2 - 20px);
-        border: none;
-        background: #f8f8f8;
-        margin-right: 10px;
-      }
+  .info-content {
+    position: relative;
+    float: left;
+    width: calc((100% - 170px) / 2 - 20px);
+    border: none;
+    background: #f8f8f8;
+    margin-right: 10px;
+  }
 
-      .info-code {
-        position: relative;
-        float: left;
-        width: calc((100% - 170px) / 2 - 20px);
-        border: none;
-        background: #f8f8f8;
-        color: black;
-        margin-right: 10px;
-      }
+  .info-code {
+    position: relative;
+    float: left;
+    width: calc((100% - 170px) / 2 - 20px);
+    border: none;
+    background: #f8f8f8;
+    color: black;
+    margin-right: 10px;
+  }
 
-      .info-content.inputContent {
-        width: calc(100% - 200px) !important;
-      }
-    }
-    .clInfo {
-      position: relative;
-      float: left;
-      width: 100%;
-      border-top: solid;
-      border-color: rgb(246, 246, 246);
-      margin-top: 20px;
-    }
-    .clInfoList {
-      .clItem {
-        position: relative;
-        float: left;
-        width: 33%;
-        padding: 10px 0px 0px 0px;
-        display: flex;
-        align-items: center;
-      }
+  .info-content.inputContent {
+    width: calc(100% - 200px) !important;
+  }
+}
+.clInfo {
+  position: relative;
+  float: left;
+  width: 100%;
+  border-top: solid;
+  border-color: rgb(246, 246, 246);
+  margin-top: 20px;
+}
+.clInfoList {
+  .clItem {
+    position: relative;
+    float: left;
+    width: 33%;
+    padding: 10px 0px 0px 0px;
+    display: flex;
+    align-items: center;
+  }
 
-      .clItem:last-child {
-        margin-bottom: 30px;
-        width: 66% !important;
-      }
+  .clItem:last-child {
+    margin-bottom: 30px;
+    width: 66% !important;
+  }
 
-      span.clspan {
-        width: 120px;
-        position: relative;
-        float: left;
-        display: block;
-        text-align: right;
-        padding: 6px 0px;
-        color: #888888;
-      }
+  span.clspan {
+    width: 120px;
+    position: relative;
+    float: left;
+    display: block;
+    text-align: right;
+    padding: 6px 0px;
+    color: #888888;
+  }
 
-      .clInput {
-        width: calc(100% - 130px);
-        margin-left: 10px;
-        border: none;
-        background: #f8f8f8;
-        color: black;
-      }
-    }
+  .clInput {
+    width: calc(100% - 130px);
+    margin-left: 10px;
+    border: none;
+    background: #f8f8f8;
+    color: black;
+  }
+}
 </style>

+ 368 - 309
src/views/widgets/PipeUnitInfo/Documents.vue

@@ -4,94 +4,126 @@
       <div class="remake">
         <div class="remakeColor"></div>
         <div class="remakeTitle titleValue">图纸记录</div>
-        <div class="upDown" @click="change" v-if="tzList.length!=0">{{upDown}}<i :class="upDownIcon"></i></div>
+        <div class="upDown" @click="change" v-if="tzList.length != 0">{{ upDown }}<i :class="upDownIcon"></i></div>
       </div>
-      <div class="notz" :style="notzPic" v-show="!hasData" v-if="tzList.length==0"><span>暂无图纸信息</span></div>
+      <div class="notz" :style="notzPic" v-show="!hasData" v-if="tzList.length == 0"><span>暂无图纸信息</span></div>
       <div class="tzInfoList" v-show="hasData" v-else>
-            <div class="tableInfo">
-              <el-table
-                  :data="tzList.slice((paging.current-1)*paging.size,paging.current*paging.size)"
-                  stripe
-                  style="width: 100%"
-                  height="100%"
-                  tooltip-effect="dark"
-                  :cell-style="cellStyle"
-                  :header-cell-style="headerStyle">
-                      <el-table-column  label="序号"  type="index" width="80px">
-                        <template slot-scope="scope">
-                          {{(paging.current - 1) * paging.size + scope.$index + 1}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column class="cell" prop="fileName"  label="图纸名称"  :show-overflow-tooltip="true"></el-table-column>
-                      <el-table-column prop="infoType" label="文件类型"></el-table-column>
-                      <el-table-column prop="fileType" label="文件格式" ></el-table-column>
-                      <el-table-column prop="fileSize" label="文件大小" ></el-table-column>
-                      <el-table-column prop="sourceType" label="数据来源" ></el-table-column>
-                      <el-table-column class="cell" prop="uploadDate" label="上传时间"  :show-overflow-tooltip="true"></el-table-column>
-                      <el-table-column label="操作">
-                          <template slot-scope="scope">
-                            <span :style="{color:'#409EFF', cursor: 'pointer', marginRight: '10px'}" @click.stop="operationClick(scope.row)">下载</span>
-                          </template>
-                      </el-table-column>
-                </el-table>
-            </div>
-            <div class="pageInfo">
-                <el-pagination
-                    :current-page="paging.current"
-                    :page-size="paging.size"
-                    :total="paging.total"
-                    layout="total, prev, pager, next"
-                    @size-change="handleSizeChange"
-                    @current-change="handleCurrentChange"
-                />
-            </div>
+        <div class="tableInfo">
+          <el-table
+            :data="tzList.slice((paging.current - 1) * paging.size, paging.current * paging.size)"
+            stripe
+            style="width: 100%"
+            height="100%"
+            tooltip-effect="dark"
+            :cell-style="cellStyle"
+            :header-cell-style="headerStyle"
+          >
+            <el-table-column label="序号" type="index" width="80px">
+              <template slot-scope="scope">
+                {{ (paging.current - 1) * paging.size + scope.$index + 1 }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              class="cell"
+              prop="fileName"
+              label="图纸名称"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column prop="infoType" label="文件类型"></el-table-column>
+            <el-table-column prop="fileType" label="文件格式"></el-table-column>
+            <el-table-column prop="fileSize" label="文件大小"></el-table-column>
+            <el-table-column prop="sourceType" label="数据来源"></el-table-column>
+            <el-table-column
+              class="cell"
+              prop="uploadDate"
+              label="上传时间"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column label="操作">
+              <template slot-scope="scope">
+                <span
+                  :style="{ color: '#409EFF', cursor: 'pointer', marginRight: '10px' }"
+                  @click.stop="operationClick(scope.row)"
+                  >下载</span
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="pageInfo">
+          <el-pagination
+            :current-page="paging.current"
+            :page-size="paging.size"
+            :total="paging.total"
+            layout="total, prev, pager, next"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+          />
+        </div>
       </div>
     </div>
     <div class="daInfo">
       <div class="remake">
         <div class="remakeColor"></div>
         <div class="remakeTitle">档案记录</div>
-        <div class="upDown" @click="changeDa" v-if="daList.length!=0">{{upDownDa}}<i :class="upDownIconDa"></i></div>
+        <div class="upDown" @click="changeDa" v-if="daList.length != 0">
+          {{ upDownDa }}<i :class="upDownIconDa"></i>
+        </div>
       </div>
-      <div class="noda" :style="nodaPic" v-show="!hasDataDa" v-if="daList.length==0"><span>暂无档案信息</span></div>
+      <div class="noda" :style="nodaPic" v-show="!hasDataDa" v-if="daList.length == 0"><span>暂无档案信息</span></div>
       <div class="daInfoList" v-show="hasDataDa" v-else>
-            <div class="tableInfo">
-              <el-table
-                  :data="daList"
-                  stripe
-                  style="width: 100%"
-                  height="100%"
-                  tooltip-effect="dark"
-                  :cell-style="cellStyle"
-                  :header-cell-style="headerStyle">
-                      <el-table-column  label="序号"  type="index" width="80px">
-                        <template slot-scope="scope" class="cell">
-                          {{(pagingDa.current - 1) * pagingDa.size + scope.$index + 1}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column class="cell" prop="fileName"  label="文件名称"  :show-overflow-tooltip="true"></el-table-column>
-                      <el-table-column prop="fileOrgin" label="文件类型"></el-table-column>
-                      <el-table-column prop="fileType" label="文件格式" ></el-table-column>
-                      <el-table-column prop="fileLength" label="文件大小" ></el-table-column>
-                      <el-table-column prop="sourceType" label="数据来源" ></el-table-column>
-                      <el-table-column class="cell" prop="creatTime" label="上传时间"  :show-overflow-tooltip="true"></el-table-column>
-                      <el-table-column label="操作">
-                          <template slot-scope="scope">
-                            <span :style="{color:'#409EFF', cursor: 'pointer', marginRight: '10px'}" @click.stop="operationClick(scope.row)">下载</span>
-                          </template>
-                      </el-table-column>
-                </el-table>
-            </div>
-            <div class="pageInfo">
-                <el-pagination
-                    :current-page="pagingDa.current"
-                    :page-size="pagingDa.size"
-                    :total="pagingDa.total"
-                    layout="total, prev, pager, next"
-                    @size-change="handleSizeChangeDa"
-                    @current-change="handleCurrentChangeDa"
-                />
-            </div>
+        <div class="tableInfo">
+          <el-table
+            :data="daList"
+            stripe
+            style="width: 100%"
+            height="100%"
+            tooltip-effect="dark"
+            :cell-style="cellStyle"
+            :header-cell-style="headerStyle"
+          >
+            <el-table-column label="序号" type="index" width="80px">
+              <template slot-scope="scope" class="cell">
+                {{ (pagingDa.current - 1) * pagingDa.size + scope.$index + 1 }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              class="cell"
+              prop="fileName"
+              label="文件名称"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column prop="fileOrgin" label="文件类型"></el-table-column>
+            <el-table-column prop="fileType" label="文件格式"></el-table-column>
+            <el-table-column prop="fileLength" label="文件大小"></el-table-column>
+            <el-table-column prop="sourceType" label="数据来源"></el-table-column>
+            <el-table-column
+              class="cell"
+              prop="creatTime"
+              label="上传时间"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column label="操作">
+              <template slot-scope="scope">
+                <span
+                  :style="{ color: '#409EFF', cursor: 'pointer', marginRight: '10px' }"
+                  @click.stop="operationClick(scope.row)"
+                  >下载</span
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="pageInfo">
+          <el-pagination
+            :current-page="pagingDa.current"
+            :page-size="pagingDa.size"
+            :total="pagingDa.total"
+            layout="total, prev, pager, next"
+            @size-change="handleSizeChangeDa"
+            @current-change="handleCurrentChangeDa"
+          />
+        </div>
       </div>
     </div>
   </div>
@@ -101,285 +133,312 @@
  * 部件查看---图纸档案
  */
 import $ from 'jquery'
-import apis from "@/api/PipeUnitInfo";
+import apis from '@/api/PipeUnitInfo'
 import verificationHelper from '@/utils/mapCommon/VerificationHelper'
+import { baseAddress } from '@/utils/request'
+import { getBaseCodePage_api } from '@/api/APIs'
 export default {
-  name:"UnitDocumentInfo",
-  data(){
-    return{
-      nodaPic:"background: url("+require("@/views/widgets/PipeUnitInfo/images/da.png")+")",
-      notzPic:"background: url("+require("@/views/widgets/PipeUnitInfo/images/tz.png")+")",
+  name: 'UnitDocumentInfo',
+  data() {
+    return {
+      nodaPic: 'background: url(' + require('@/views/widgets/PipeUnitInfo/images/da.png') + ')',
+      notzPic: 'background: url(' + require('@/views/widgets/PipeUnitInfo/images/tz.png') + ')',
       //显隐控件
-      hasData:false,
-      upDown:'收起',
-      upDownIcon:'el-icon-arrow-up',
-      hasDataDa:false,
-      upDownDa:'收起',
-      upDownIconDa:'el-icon-arrow-up',
+      hasData: false,
+      upDown: '收起',
+      upDownIcon: 'el-icon-arrow-up',
+      hasDataDa: false,
+      upDownDa: '收起',
+      upDownIconDa: 'el-icon-arrow-up',
       //表格样式
-      cellStyle:{
-          color:"#000",
-          textAlign: 'center',
+      cellStyle: {
+        color: '#000',
+        textAlign: 'center'
       },
-      headerStyle:{
-          background: '#e6f0fd',
-          color: '#3b87d9',
-          height: '38px',
-          textAlign: 'center'
+      headerStyle: {
+        background: '#e6f0fd',
+        color: '#3b87d9',
+        height: '38px',
+        textAlign: 'center'
       },
       //图纸表格
-      tzList:[],
-      paging:{
-          current: 1, //当前页,默认0
-          size: 4, //每页数据条数
-          total:0   //总条数
+      tzList: [],
+      paging: {
+        current: 1, //当前页,默认0
+        size: 4, //每页数据条数
+        total: 0 //总条数
       },
       //档案表格内容
-      daList:[],
-      pagingDa:{
-          current: 1, //当前页,默认0
-          size: 4, //每页数据条数
-          total:0   //总条数
+      daList: [],
+      pagingDa: {
+        current: 1, //当前页,默认0
+        size: 4, //每页数据条数
+        total: 0 //总条数
       },
       //文件类型
-      recordFileType:null
+      recordFileType: null
     }
   },
-  methods:{
+  methods: {
     //展示档案信息
     showDAPage(unitInfo) {
-        this.getFileType(unitInfo)
-        this.gettzInfo(unitInfo);
+      this.getFileType(unitInfo)
+      this.gettzInfo(unitInfo)
     },
-    change(){
-      if(this.hasData){
-        this.upDown='展开';
-        this.upDownIcon='el-icon-arrow-down'
-        this.hasData=!this.hasData
-      }else{
-        this.upDown='收起';
-        this.upDownIcon='el-icon-arrow-up'
-        this.hasData=!this.hasData
+    change() {
+      if (this.hasData) {
+        this.upDown = '展开'
+        this.upDownIcon = 'el-icon-arrow-down'
+        this.hasData = !this.hasData
+      } else {
+        this.upDown = '收起'
+        this.upDownIcon = 'el-icon-arrow-up'
+        this.hasData = !this.hasData
       }
     },
-    changeDa(){
-      if(this.hasDataDa){
-        this.upDownDa='展开';
-        this.upDownIconDa='el-icon-arrow-down'
-        this.hasDataDa=!this.hasDataDa
-      }else{
-        this.upDownDa='收起';
-        this.upDownIconDa='el-icon-arrow-up'
-        this.hasDataDa=!this.hasDataDa
+    changeDa() {
+      if (this.hasDataDa) {
+        this.upDownDa = '展开'
+        this.upDownIconDa = 'el-icon-arrow-down'
+        this.hasDataDa = !this.hasDataDa
+      } else {
+        this.upDownDa = '收起'
+        this.upDownIconDa = 'el-icon-arrow-up'
+        this.hasDataDa = !this.hasDataDa
       }
     },
     //获取文件类型
-    async getFileType(unitInfo){
-        let data = {
-            ulevel: 2,
-            key: "0056",
-            size: 10000
-        }
-        const res = await this.$PortApi.getBaseCodePage_api(data)
-        const{code,result}=res.data
-        if(code==1){
-          this.recordFileType=result.records
-          this.getdaInfo(unitInfo);
-        }else{
-            this.$message.error('文件类型信息获取失败')
-        }  
+    async getFileType(unitInfo) {
+      let data = {
+        ulevel: 2,
+        key: '0056',
+        size: 10000
+      }
+      const res = await getBaseCodePage_api(data)
+      const { code, result } = res
+      if (code == 1) {
+        this.recordFileType = result.records
+        this.getdaInfo(unitInfo)
+      } else {
+        this.$message.error('文件类型信息获取失败')
+      }
     },
     //获取图纸信息
-    async gettzInfo(unitInfo){
-        this.tzList=[];
-        const res = await apis.getDesignInfo({pbs:unitInfo.code})
-        const{code,result}=res.data
-        if(code==1){
-          if(result.length>0){
-            this.tzList=result.map((item)=>{
-              return{
-                ...item,
-                fileName:verificationHelper.setNullAndUndefined(item.FileName),
-                infoType:item.infoType=='01'?"成果表":item.infoType=='03'?"CAD":"/",
-                fileType:verificationHelper.setNullAndUndefined(item.FileType),
-                fileSize:(item.FileSize/(1024*1024)).toFixed(0)+"MB",
-                sourceType:item.sourceType=='01'?"本地导入":(item.sourceType=='02'?"管线宝导入":item.sourceType=='03'?"TGPMS集成":"/"),
-                uploadDate:verificationHelper.setNullAndUndefined(item.UploadDate),
-                fileUrl:this.getDownLoadUrl(item)
-              }
-            })
-            this.hasData=true
-            this.paging.total=this.tzList.length
-          }
-        }else{
-            this.$message.error('图纸信息获取失败')
-        }  
-    },
-    getDownLoadUrl(item){
-        let url=[];
-        if(!item.fileUrl){
-          return []
-        }
-        let urls=item.fileUrl.split(',');
-        if(item.sourceType=='03'){
-            url=urls
-        }else{
-            let token="&access_token=29e2de53-0003-4ee0-a4d6-ba91d8bbd81e";
-            // url="https://yeepms.yeec.com.cn/gis-api"+"/base/file/downloadFile"+"?fileName="+item.FileName+"&remotePath="+item.fileUrl+"&access_token="+token
-            url=urls.map((address)=>{
-              return{
-                  address:"https://yeepms.yeec.com.cn/gis-api"+"/base/file/downloadFile"+"?fileName="+item.FileName+"&remotePath="+address+"&access_token="+token
-              }
-            })
+    async gettzInfo(unitInfo) {
+      this.tzList = []
+      const res = await apis.getDesignInfo({ pbs: unitInfo.code })
+      const { code, result } = res
+      if (code == 1) {
+        if (result.length > 0) {
+          this.tzList = result.map((item) => {
+            return {
+              ...item,
+              fileName: verificationHelper.setNullAndUndefined(item.FileName),
+              infoType: item.infoType == '01' ? '成果表' : item.infoType == '03' ? 'CAD' : '/',
+              fileType: verificationHelper.setNullAndUndefined(item.FileType),
+              fileSize: (item.FileSize / (1024 * 1024)).toFixed(0) + 'MB',
+              sourceType:
+                item.sourceType == '01'
+                  ? '本地导入'
+                  : item.sourceType == '02'
+                  ? '管线宝导入'
+                  : item.sourceType == '03'
+                  ? 'TGPMS集成'
+                  : '/',
+              uploadDate: verificationHelper.setNullAndUndefined(item.UploadDate),
+              fileUrl: this.getDownLoadUrl(item)
+            }
+          })
+          this.hasData = true
+          this.paging.total = this.tzList.length
         }
-        return url
+      } else {
+        this.$message.error('图纸信息获取失败')
+      }
+    },
+    getDownLoadUrl(item) {
+      let url = []
+      if (!item.fileUrl) {
+        return []
+      }
+      let urls = item.fileUrl.split(',')
+      if (item.sourceType == '03') {
+        url = urls
+      } else {
+        let token = sessionStorage.getItem('token')
+        // url="https://yeepms.yeec.com.cn/gis-api"+"/base/file/downloadFile"+"?fileName="+item.FileName+"&remotePath="+item.fileUrl+"&access_token="+token
+        url = urls.map((address) => {
+          return {
+            address:
+              baseAddress +
+              '/base/file/downloadFile' +
+              '?fileName=' +
+              item.FileName +
+              '&remotePath=' +
+              address +
+              '&access_token=' +
+              token
+          }
+        })
+      }
+      return url
     },
     // 每页多少条
     handleSizeChange(val) {
-      this.paging.size = val;
+      this.paging.size = val
     },
     // 当前页
     handleCurrentChange(val) {
-      this.paging.current = val;
+      this.paging.current = val
     },
-    operationClick(row){
+    operationClick(row) {
       console.log(row)
       for (let index = 0; index < row.fileUrl.length; index++) {
-        const element = row.fileUrl[index];
+        const element = row.fileUrl[index]
         downLoad(element.address)
       }
-      function downLoad(address){
-          //创建一个a标签用于下载
-          let a = document.createElement('a');
-          a.href = address;
-          $("body").append(a); // 修复firefox中无法触发click
-          a.click();
-          $(a).remove();  
+      function downLoad(address) {
+        //创建一个a标签用于下载
+        let a = document.createElement('a')
+        a.href = address
+        $('body').append(a) // 修复firefox中无法触发click
+        a.click()
+        $(a).remove()
       }
     },
     //获取档案信息
-    async getdaInfo(unitInfo){
-        let option={
-          pbs:unitInfo.code,
-          current:this.pagingDa.current,
-          size:this.pagingDa.size
-        }
-        this.daList=[];
-        const res = await apis.getPartsfile(option)
-        const{code,result}=res.data
-        if(code==1){
-          if(result.records.length>0){
-            this.daList=result.records.map((item)=>{
-              let typeMatch=this.$_.find(this.recordFileType,function(o){return o.value==item.fileOrgin})
-              let fileOrgin=verificationHelper.setNullAndUndefined(typeMatch.notes)
-              return{
-                ...item,
-                fileName:verificationHelper.setNullAndUndefined(item.fileName),
-                fileType:verificationHelper.setNullAndUndefined(item.fileType),
-                fileLength:(item.fileLength/1024*1024).toFixed(0)+"MB",
-                sourceType:item.sourceType=='01'?"本地导入":(item.sourceType=='02'?"管线宝导入":item.sourceType=='03'?"TGPMS集成":"/"),
-                creatTime:verificationHelper.setNullAndUndefined(item.createTime),
-                fileOrgin:fileOrgin,
-                fileUrl:this.getDownLoadUrl(item),
-              }
+    async getdaInfo(unitInfo) {
+      let option = {
+        pbs: unitInfo.code,
+        current: this.pagingDa.current,
+        size: this.pagingDa.size
+      }
+      this.daList = []
+      const res = await apis.getPartsfile(option)
+      const { code, result } = res
+      if (code == 1) {
+        if (result.records.length > 0) {
+          this.daList = result.records.map((item) => {
+            let typeMatch = this.$_.find(this.recordFileType, function (o) {
+              return o.value == item.fileOrgin
             })
-            this.hasDataDa=true
-            this.pagingDa.total=result.total
-          }
-        }else{
-            this.$message.error('档案信息获取失败')
-        } 
+            let fileOrgin = verificationHelper.setNullAndUndefined(typeMatch.notes)
+            return {
+              ...item,
+              fileName: verificationHelper.setNullAndUndefined(item.fileName),
+              fileType: verificationHelper.setNullAndUndefined(item.fileType),
+              fileLength: ((item.fileLength / 1024) * 1024).toFixed(0) + 'MB',
+              sourceType:
+                item.sourceType == '01'
+                  ? '本地导入'
+                  : item.sourceType == '02'
+                  ? '管线宝导入'
+                  : item.sourceType == '03'
+                  ? 'TGPMS集成'
+                  : '/',
+              creatTime: verificationHelper.setNullAndUndefined(item.createTime),
+              fileOrgin: fileOrgin,
+              fileUrl: this.getDownLoadUrl(item)
+            }
+          })
+          this.hasDataDa = true
+          this.pagingDa.total = result.total
+        }
+      } else {
+        this.$message.error('档案信息获取失败')
+      }
     },
     // 每页多少条
     handleSizeChangeDa(val) {
-      this.pagingDa.size = val;
+      this.pagingDa.size = val
     },
     // 当前页
     handleCurrentChangeDa(val) {
-      this.pagingDa.current = val;
-    },
+      this.pagingDa.current = val
+    }
   }
-};
+}
 </script>
 <style lang="scss" scoped>
-    .tzlInfo{
-      width: 100%;
-      max-height: 430px;
-      overflow: auto;
-      .htInfo,.daInfo{
-        display: flex;
-        flex-flow: column;
-        margin-bottom: 10px;
-      }
-    }
-    //图纸档案
-    // .noda {
-    //   background: url(./images/da.png);
-    // }
-    // .notz {
-    //   background: url(./images/tz.png);
-    // }
-    .noda,
-    .notz {
-      width: 164px;
-      height: 93px;
-      position: relative;
-      float: left;
-      left: calc((100% - 164px) / 2);
-      margin: 40px 0px;
+.tzlInfo {
+  width: 100%;
+  max-height: 430px;
+  overflow: auto;
+  .htInfo,
+  .daInfo {
+    display: flex;
+    flex-flow: column;
+    margin-bottom: 10px;
+  }
+}
+//图纸档案
+// .noda {
+//   background: url(./images/da.png);
+// }
+// .notz {
+//   background: url(./images/tz.png);
+// }
+.noda,
+.notz {
+  width: 164px;
+  height: 93px;
+  position: relative;
+  float: left;
+  left: calc((100% - 164px) / 2);
+  margin: 40px 0px;
 
-      span {
-        display: block;
-        position: relative;
-        bottom: 0px;
-        top: 120%;
-        text-align: center;
-      }
-    }
-    .remake {
-      position: relative;
-      float: left;
-      width: 100%;
-      // padding: 20px 0px 0px 30px;
-      .remakeColor {
-        position: relative;
-        float: left;
-        width: 5px;
-        // top: 5px;
-        height: 20px;
-        background: #1565cf;
-      }
-      .remakeTitle {
-        position: relative;
-        float: left;
-        font-size: 20px;
-        font-weight: 700;
-        left: 10px;
-      }
-      .upDown {
-        position: relative;
-        float: right;
-        right: 20px;
-        font-family: "Glyphicons Halflings" !important;
-        -webkit-font-smoothing: antialiased;
-        cursor: pointer;
-      }
-    }
-    .daInfoList,
-    .tzInfoList {
-      position: relative;
-      width: 100%;
-      .tableInfo{
-        margin: 10px 0;
-        width: 100%;
-        max-height: 240px;
-        overflow: hidden;
-        .elTable .cell {
-            white-space: nowrap;
-        }
-      }
-      .pageInfo{
-        width: 100%;
-      }
+  span {
+    display: block;
+    position: relative;
+    bottom: 0px;
+    top: 120%;
+    text-align: center;
+  }
+}
+.remake {
+  position: relative;
+  float: left;
+  width: 100%;
+  // padding: 20px 0px 0px 30px;
+  .remakeColor {
+    position: relative;
+    float: left;
+    width: 5px;
+    // top: 5px;
+    height: 20px;
+    background: #1565cf;
+  }
+  .remakeTitle {
+    position: relative;
+    float: left;
+    font-size: 20px;
+    font-weight: 700;
+    left: 10px;
+  }
+  .upDown {
+    position: relative;
+    float: right;
+    right: 20px;
+    font-family: 'Glyphicons Halflings' !important;
+    -webkit-font-smoothing: antialiased;
+    cursor: pointer;
+  }
+}
+.daInfoList,
+.tzInfoList {
+  position: relative;
+  width: 100%;
+  .tableInfo {
+    margin: 10px 0;
+    width: 100%;
+    max-height: 240px;
+    overflow: hidden;
+    .elTable .cell {
+      white-space: nowrap;
     }
+  }
+  .pageInfo {
+    width: 100%;
+  }
+}
 </style>

+ 288 - 239
src/views/widgets/PipeUnitInfo/Quality.vue

@@ -1,261 +1,310 @@
 <template>
-    <div class='baseInfo'>
-        <div class='nozl' :style="nozlPic" v-if="dataList.length==0"><span>暂无质量信息</span></div>
-        <div class='data-item' v-for="(item,index) of dataList" :key="index">
-            <div style='height:40px;width:100%;border-bottom:1px solid #999999'>
-                <div style='height:40px;width:40px;float:left'>
-                    <div :style='packInfo(item).symbolStyle'></div>
-                </div>
-                <div style='margin-left:-33px;float:left;color:#000'>{{(index+1)}}</div>
-                <div style='height:40px;line-height:40px;float:left'><span style='color:black'>评定日期:{{packInfo(item).evaluateTime}}</span></div>
-                <div style='height:40px;margin-left:30px;line-height:40px;float:right'>检验批类型:<span style='color:black'>{{item.typeName}}</span></div>
-            </div>
-            <div style='width:100%;'>
-                <div style='width:100%;float:left'>
-                    <div class='turnItem'><span class='turnspan'>施工状态:</span><el-input type='text' class='turnInput' :style='packInfo(item).stateStyle' :value='packInfo(item).curState' size="medium"></el-input></div>
-                    <div class='turnItem'><span class='turnspan'>验评等级:</span><el-input type='text' class='turnInput' :style='packInfo(item).gradeStyle' :value='packInfo(item).evaluateGrade' size="medium"></el-input></div>
-                    <div class='turnItem'><span class='turnspan'>检验批编码:</span><el-input type='text' class='turnInput' :value='item.code' size="medium"></el-input></div>
-                    <div class='turnItem'><span class='turnspan'>检验批名称:</span><el-input type='text' class='turnInput' :value='item.name' size="medium"></el-input></div>
-                    <div class='turnItem'><span class='turnspan'>监理单位:</span><el-input type='text' class='turnInput' :value='item.supervisorDeptName' size="medium"></el-input></div>
-                    <div class='turnItem'><span class='turnspan'>施工单位:</span><el-input type='text' class='turnInput' :value='item.constructionDeptName' size="medium"></el-input></div>
-                    <div class='turnItem'><span class='turnspan'>创建人:</span><el-input type='text' class='turnInput' :value='packInfo(item).createUser' size="medium"></el-input></div>
-                    <div class='turnItem'><span class='turnspan'>创建单位:</span><el-input type='text' class='turnInput' :value='packInfo(item).createUnit' size="medium"></el-input></div>
-                    <div class='turnItem'><span class='turnspan'>施工时段:</span><el-input type='text' class='turnInput' :value='packInfo(item).periodTime' size="medium"></el-input></div>
-                    <div class='turnItem'><span class='turnspan'>备注:</span><el-input type='text' class='turnInput' :value='item.comments' size="medium"></el-input></div>
-                </div>
-            </div>
-            <div class="pictureList">
-                <div class="image-item" v-for="(item,index) of picList" :key="index">
-                    <el-image 
-                        :src="item" 
-                        :preview-src-list="picList">
-                    </el-image>
-                </div>
-            </div>
+  <div class="baseInfo">
+    <div class="nozl" :style="nozlPic" v-if="dataList.length == 0"><span>暂无质量信息</span></div>
+    <div class="data-item" v-for="(item, index) of dataList" :key="index">
+      <div style="height: 40px; width: 100%; border-bottom: 1px solid #999999">
+        <div style="height: 40px; width: 40px; float: left">
+          <div :style="packInfo(item).symbolStyle"></div>
         </div>
+        <div style="margin-left: -33px; float: left; color: #000">{{ index + 1 }}</div>
+        <div style="height: 40px; line-height: 40px; float: left">
+          <span style="color: black">评定日期:{{ packInfo(item).evaluateTime }}</span>
+        </div>
+        <div style="height: 40px; margin-left: 30px; line-height: 40px; float: right">
+          检验批类型:<span style="color: black">{{ item.typeName }}</span>
+        </div>
+      </div>
+      <div style="width: 100%">
+        <div style="width: 100%; float: left">
+          <div class="turnItem">
+            <span class="turnspan">施工状态:</span
+            ><el-input
+              type="text"
+              class="turnInput"
+              :style="packInfo(item).stateStyle"
+              :value="packInfo(item).curState"
+              size="medium"
+            ></el-input>
+          </div>
+          <div class="turnItem">
+            <span class="turnspan">验评等级:</span
+            ><el-input
+              type="text"
+              class="turnInput"
+              :style="packInfo(item).gradeStyle"
+              :value="packInfo(item).evaluateGrade"
+              size="medium"
+            ></el-input>
+          </div>
+          <div class="turnItem">
+            <span class="turnspan">检验批编码:</span
+            ><el-input type="text" class="turnInput" :value="item.code" size="medium"></el-input>
+          </div>
+          <div class="turnItem">
+            <span class="turnspan">检验批名称:</span
+            ><el-input type="text" class="turnInput" :value="item.name" size="medium"></el-input>
+          </div>
+          <div class="turnItem">
+            <span class="turnspan">监理单位:</span
+            ><el-input type="text" class="turnInput" :value="item.supervisorDeptName" size="medium"></el-input>
+          </div>
+          <div class="turnItem">
+            <span class="turnspan">施工单位:</span
+            ><el-input type="text" class="turnInput" :value="item.constructionDeptName" size="medium"></el-input>
+          </div>
+          <div class="turnItem">
+            <span class="turnspan">创建人:</span
+            ><el-input type="text" class="turnInput" :value="packInfo(item).createUser" size="medium"></el-input>
+          </div>
+          <div class="turnItem">
+            <span class="turnspan">创建单位:</span
+            ><el-input type="text" class="turnInput" :value="packInfo(item).createUnit" size="medium"></el-input>
+          </div>
+          <div class="turnItem">
+            <span class="turnspan">施工时段:</span
+            ><el-input type="text" class="turnInput" :value="packInfo(item).periodTime" size="medium"></el-input>
+          </div>
+          <div class="turnItem">
+            <span class="turnspan">备注:</span
+            ><el-input type="text" class="turnInput" :value="item.comments" size="medium"></el-input>
+          </div>
+        </div>
+      </div>
+      <div class="pictureList">
+        <div class="image-item" v-for="(item, index) of picList" :key="index">
+          <el-image :src="item" :preview-src-list="picList"> </el-image>
+        </div>
+      </div>
     </div>
+  </div>
 </template>
 <script>
 /**
  * 部件查看----质量
  */
-import apis from "@/api/PipeUnitInfo";
+import apis from '@/api/PipeUnitInfo'
 import verificationHelper from '@/utils/mapCommon/VerificationHelper'
+import { baseAddress } from '@/utils/request'
 export default {
-    name:"UnitQuality",
-    data(){
-        return{
-            nozlPic:"background: url("+require("@/views/widgets/PipeUnitInfo/images/zl.png")+")",
-            dataList:[],
-            picList:[]
-        }
+  name: 'UnitQuality',
+  data() {
+    return {
+      nozlPic: 'background: url(' + require('@/views/widgets/PipeUnitInfo/images/zl.png') + ')',
+      dataList: [],
+      picList: []
+    }
+  },
+  methods: {
+    //展示质量页面
+    showUnitQualityPage(code) {
+      this.unitQualityInfo(code)
     },
-    methods:{
-        //展示质量页面
-        showUnitQualityPage(code) {
-            this.unitQualityInfo(code);
-        },
-        /**
-         * 该方法用于获取部件质量信息
-         * @param {string} pbsCode pbs编码
-         */
-        async unitQualityInfo(pbsCode){
-            const data={
-                pbs:pbsCode
-                // pbs:"HN06GG06.035.01.01.4"//测试使用
-            }
-            const res = await apis.getQbsInfo(data)
-            const{code,result}=res.data
-            if(code==1){
-                this.dataList=[];
-                if(result&&result.length>0){
-                    this.dataList=result.map((item)=>{
-                        if(item.files.length>0){
-                            item.files.forEach(item => {
-                                let token="&access_token=29e2de53-0003-4ee0-a4d6-ba91d8bbd81e";
-                                let picurl="https://yeepms.yeec.com.cn/gis-api" + '/base/file/loadImg' + "?remotePath=" + item.fileUrl + token;
-                                this.picList.push(picurl)
-                            });
-                        }
-                        return{
-                            ...item,
-                            typeName:verificationHelper.setNullAndUndefined(item.typeName),
-                            code:verificationHelper.setNullAndUndefined(item.code),
-                            name:verificationHelper.setNullAndUndefined(item.name),
-                            supervisorDeptName:verificationHelper.setNullAndUndefined(item.supervisorDeptName),
-                            constructionDeptName:verificationHelper.setNullAndUndefined(item.constructionDeptName),
-                            comments:verificationHelper.setNullAndUndefined(item.comments),
-                        }
-                    })
-                }
-            }else{
-                this.$message.error('质量信息获取失败')
-            }       
-        },
-        //数据信息
-        packInfo(item){
-            let curState;
-            let evaluateGrade;
-            let symbolStyle;
-            let stateStyle;
-            let gradeStyle;
-            let createUser;
-            let createUnit;
-            switch(item.curState){
-                case 0:curState="未开始";
-                        stateStyle='color:black';
-                        break;
-                case 1:curState="施工中";
-                        stateStyle='color:black';
-                        break;
-                case 2:curState="已完成";
-                        stateStyle='color:#08CA5F';
-                        break;
-            }
-            if(item.evaluateGrade=="0"){
-                evaluateGrade='不合格'
-                gradeStyle='color:red'
-                symbolStyle='width:0;height:0;border-top: 40px solid red;border-right: 40px solid transparent;'
-            }else{
-                evaluateGrade='合格'
-                gradeStyle='color:#08CA5F'
-                symbolStyle='width:0;height:0;border-top: 40px solid #3f85d2;border-right: 40px solid transparent;'
-            }
-            if(item.files.length>0){
-                createUser=verificationHelper.setNullAndUndefined(item.files[0].CreateUserName)
-                createUnit=verificationHelper.setNullAndUndefined(item.files[0].CreateDeptName)
-            }else{
-                createUser='/'
-                createUnit='/'
-            }
-            let evaluateTime=verificationHelper.setNullAndUndefined(/\d{4}-\d{1,2}-\d{1,2}/g.exec(item.evaluateTime))
-            let periodTime
-            if (item.startTime==null&&item.endTime==null) {
-                periodTime="/"
-            }else{
-                periodTime=verificationHelper.setNullAndUndefined(/\d{4}-\d{1,2}-\d{1,2}/g.exec(item.startTime))+"~"+verificationHelper.setNullAndUndefined(/\d{4}-\d{1,2}-\d{1,2}/g.exec(item.endTime))
+    /**
+     * 该方法用于获取部件质量信息
+     * @param {string} pbsCode pbs编码
+     */
+    async unitQualityInfo(pbsCode) {
+      const data = {
+        pbs: pbsCode
+        // pbs:"HN06GG06.035.01.01.4"//测试使用
+      }
+      const res = await apis.getQbsInfo(data)
+      const { code, result } = res
+      if (code == 1) {
+        this.dataList = []
+        if (result && result.length > 0) {
+          this.dataList = result.map((item) => {
+            if (item.files.length > 0) {
+              item.files.forEach((item) => {
+                let token = '&access_token=' + sessionStorage.getItem('token')
+                let picurl = baseAddress + '/base/file/loadImg' + '?remotePath=' + item.fileUrl + token
+                this.picList.push(picurl)
+              })
             }
-            return{
-                curState:curState,
-                stateStyle:stateStyle,
-                evaluateGrade:evaluateGrade,
-                gradeStyle:gradeStyle,
-                symbolStyle:symbolStyle,
-                createUser:createUser,
-                createUnit:createUnit,
-                periodTime:periodTime,
-                evaluateTime:evaluateTime[0]
+            return {
+              ...item,
+              typeName: verificationHelper.setNullAndUndefined(item.typeName),
+              code: verificationHelper.setNullAndUndefined(item.code),
+              name: verificationHelper.setNullAndUndefined(item.name),
+              supervisorDeptName: verificationHelper.setNullAndUndefined(item.supervisorDeptName),
+              constructionDeptName: verificationHelper.setNullAndUndefined(item.constructionDeptName),
+              comments: verificationHelper.setNullAndUndefined(item.comments)
             }
+          })
         }
-    }
-}
-</script>
-<style lang="scss" scoped>
-    ::v-deep.el-input__inner{
-    background-color: #f8f8f8;
-    }
-    .nozl {
-        // background: url(./images/zl.png);
-        margin-top: 250px !important;
-    }
-    .nozl{
-        width: 164px;
-        height: 93px;
-        position: relative;
-        float: left;
-        left: calc((100% - 164px) / 2);
-        margin: 40px 0px;
-        span {
-        display: block;
-        position: relative;
-        bottom: 0px;
-        top: 120%;
-        text-align: center;
-        }
-    }
-    //质量页面的样式
-    .baseInfo {
-      color: #888888;
-      height: 430px;
-      overflow: auto;
-      .headerInfo {
-        position: relative;
-        float: left;
-        width: 100%;
-        padding: 40px 0px 10px 0px;
-        border-bottom: solid;
-        border-color: rgb(246, 246, 246);
-        border-width: 2px;
+      } else {
+        this.$message.error('质量信息获取失败')
       }
-
-      .remakeCon {
-        width: 40px;
-        height: 40px;
-        border: 20px solid;
-        border-top-left-radius: 5px;
-        border-color: rgb(16, 102, 208) transparent transparent
-          rgb(16, 102, 208);
-        color: white;
-        position: relative;
-        float: left;
-
-        span {
-          position: absolute;
-          top: -20px;
-          left: -14px;
-        }
-      }
-      .data-item{
-        width: 100%;
-        display: flex;
-        flex-flow: column;
-      }
-      .turnInfo {
-        position: relative;
-        float: left;
-        width: 100%;
-      }
-      .turnInfo:last-child {
-        padding-bottom: 30px;
-      }
-      .turnItem {
-        position: relative;
-        float: left;
-        width: 33%;
-        padding: 20px 0px 0px 0px;
+    },
+    //数据信息
+    packInfo(item) {
+      let curState
+      let evaluateGrade
+      let symbolStyle
+      let stateStyle
+      let gradeStyle
+      let createUser
+      let createUnit
+      switch (item.curState) {
+        case 0:
+          curState = '未开始'
+          stateStyle = 'color:black'
+          break
+        case 1:
+          curState = '施工中'
+          stateStyle = 'color:black'
+          break
+        case 2:
+          curState = '已完成'
+          stateStyle = 'color:#08CA5F'
+          break
       }
-      .turnItem{
-        width: 50%;
-        float: left;
-        padding: 10px 0px 0px 0px;
+      if (item.evaluateGrade == '0') {
+        evaluateGrade = '不合格'
+        gradeStyle = 'color:red'
+        symbolStyle = 'width:0;height:0;border-top: 40px solid red;border-right: 40px solid transparent;'
+      } else {
+        evaluateGrade = '合格'
+        gradeStyle = 'color:#08CA5F'
+        symbolStyle = 'width:0;height:0;border-top: 40px solid #3f85d2;border-right: 40px solid transparent;'
       }
-      span.turnspan {
-        width: 120px;
-        position: relative;
-        float: left;
-        display: block;
-        text-align: right;
-        padding: 3px 0px;
-        color: #888888;
+      if (item.files.length > 0) {
+        createUser = verificationHelper.setNullAndUndefined(item.files[0].CreateUserName)
+        createUnit = verificationHelper.setNullAndUndefined(item.files[0].CreateDeptName)
+      } else {
+        createUser = '/'
+        createUnit = '/'
       }
-      .turnInput {
-        width: calc(100% - 140px);
-        margin-left: 5px;
-        border: none;
-        background: #f8f8f8;
-        color: black;
-        text-overflow: ellipsis;
+      let evaluateTime = verificationHelper.setNullAndUndefined(/\d{4}-\d{1,2}-\d{1,2}/g.exec(item.evaluateTime))
+      let periodTime
+      if (item.startTime == null && item.endTime == null) {
+        periodTime = '/'
+      } else {
+        periodTime =
+          verificationHelper.setNullAndUndefined(/\d{4}-\d{1,2}-\d{1,2}/g.exec(item.startTime)) +
+          '~' +
+          verificationHelper.setNullAndUndefined(/\d{4}-\d{1,2}-\d{1,2}/g.exec(item.endTime))
       }
-      .pictureList{
-        width: 100%;
-        margin-top: 10px;
-        .image-item{
-            width: 25%;
-            float: left;
-        }
-        .el-image{
-            width: 95%;
-        }
+      return {
+        curState: curState,
+        stateStyle: stateStyle,
+        evaluateGrade: evaluateGrade,
+        gradeStyle: gradeStyle,
+        symbolStyle: symbolStyle,
+        createUser: createUser,
+        createUnit: createUnit,
+        periodTime: periodTime,
+        evaluateTime: evaluateTime[0]
       }
     }
+  }
+}
+</script>
+<style lang="scss" scoped>
+::v-deep.el-input__inner {
+  background-color: #f8f8f8;
+}
+.nozl {
+  // background: url(./images/zl.png);
+  margin-top: 250px !important;
+}
+.nozl {
+  width: 164px;
+  height: 93px;
+  position: relative;
+  float: left;
+  left: calc((100% - 164px) / 2);
+  margin: 40px 0px;
+  span {
+    display: block;
+    position: relative;
+    bottom: 0px;
+    top: 120%;
+    text-align: center;
+  }
+}
+//质量页面的样式
+.baseInfo {
+  color: #888888;
+  height: 430px;
+  overflow: auto;
+  .headerInfo {
+    position: relative;
+    float: left;
+    width: 100%;
+    padding: 40px 0px 10px 0px;
+    border-bottom: solid;
+    border-color: rgb(246, 246, 246);
+    border-width: 2px;
+  }
+
+  .remakeCon {
+    width: 40px;
+    height: 40px;
+    border: 20px solid;
+    border-top-left-radius: 5px;
+    border-color: rgb(16, 102, 208) transparent transparent rgb(16, 102, 208);
+    color: white;
+    position: relative;
+    float: left;
+
+    span {
+      position: absolute;
+      top: -20px;
+      left: -14px;
+    }
+  }
+  .data-item {
+    width: 100%;
+    display: flex;
+    flex-flow: column;
+  }
+  .turnInfo {
+    position: relative;
+    float: left;
+    width: 100%;
+  }
+  .turnInfo:last-child {
+    padding-bottom: 30px;
+  }
+  .turnItem {
+    position: relative;
+    float: left;
+    width: 33%;
+    padding: 20px 0px 0px 0px;
+  }
+  .turnItem {
+    width: 50%;
+    float: left;
+    padding: 10px 0px 0px 0px;
+  }
+  span.turnspan {
+    width: 120px;
+    position: relative;
+    float: left;
+    display: block;
+    text-align: right;
+    padding: 3px 0px;
+    color: #888888;
+  }
+  .turnInput {
+    width: calc(100% - 140px);
+    margin-left: 5px;
+    border: none;
+    background: #f8f8f8;
+    color: black;
+    text-overflow: ellipsis;
+  }
+  .pictureList {
+    width: 100%;
+    margin-top: 10px;
+    .image-item {
+      width: 25%;
+      float: left;
+    }
+    .el-image {
+      width: 95%;
+    }
+  }
+}
 </style>

+ 408 - 400
src/views/widgets/PipeUnitInfo/SmInfo.vue

@@ -1,451 +1,459 @@
 <template>
-    <div class='smInfo'>
-      <div class='smList'>
-          <div class='remake'>
-              <div class='remakeColor'></div>
-              <div class='remakeTitle'>{{titleValue}}</div>
-              <div class='searchInfo'>
-                  <el-select class="smSearch" v-model="smSearch" placeholder="请选择" size="small">
-                      <el-option label="施工" value="CON"></el-option>
-                      <el-option label="监理" value="SPV"></el-option>
-                  </el-select>
-              </div>
+  <div class="smInfo">
+    <div class="smList">
+      <div class="remake">
+        <div class="remakeColor"></div>
+        <div class="remakeTitle">{{ titleValue }}</div>
+        <div class="searchInfo">
+          <el-select class="smSearch" v-model="smSearch" placeholder="请选择" size="small">
+            <el-option label="施工" value="CON"></el-option>
+            <el-option label="监理" value="SPV"></el-option>
+          </el-select>
+        </div>
+      </div>
+      <div class="tableDiv">
+        <div class="procedureInfo">
+          <div
+            class="infoItem"
+            v-for="(item, index) of procedureInfo"
+            :key="index"
+            :style="procedureStyle"
+            :class="setClass(item)"
+          >
+            <div class="start" :class="setClass(item)"></div>
+            <div class="spanTilte" :class="setClass(item)">
+              <span class="indexSpan">{{ index + 1 }}</span
+              ><span class="spanText">{{ item.pdName }}</span>
+            </div>
+            <div class="end" :class="setClass(item)"></div>
           </div>
-          <div class='tableDiv'>
-              <div class='procedureInfo'>
-                  <div class='infoItem' v-for="(item,index) of procedureInfo" :key="index" :style='procedureStyle' :class="setClass(item)">
-                      <div class='start' :class="setClass(item)"></div>
-                      <div class='spanTilte' :class="setClass(item)"><span class='indexSpan'>{{(index+1)}}</span><span class='spanText'>{{item.pdName}}</span></div>
-                      <div class='end' :class="setClass(item)"></div>
-                  </div>
-              </div>
-              <div class='procedureContent'>
-                  <template v-if="tableData.length>0">
-                      <div class="procedureTable">
-                        <el-table
-                            :data="tableData"
-                            stripe
-                            style="width: 100%"
-                            height="100%"
-                            tooltip-effect="dark"
-                            :cell-style="cellStyle"
-                            :header-cell-style="headerStyle">
-                                <el-table-column label="序号" type="index"  />
-                                <el-table-column prop="dataType" label="人员类型" ></el-table-column>
-                                <el-table-column prop="createTime" label="时间" width="200"></el-table-column>
-                                <el-table-column prop="createUserName" label="人员" ></el-table-column>
-                                <el-table-column prop="pdCodeName" label="工序" ></el-table-column>
-                                <el-table-column prop="distance" label="距离(米)" ></el-table-column>
-                                <el-table-column prop="scanTimes" label="扫码次序" ></el-table-column>
-                                <el-table-column prop="newpspipefileList" label="照片"></el-table-column>
-                        </el-table>
-                      </div>
-                      <el-pagination
-                          style="display:flex"
-                          :current-page="paging.current"
-                          :page-size="paging.size"
-                          :total="paging.total"
-                          layout="total, prev, pager, next"
-                          @size-change="handleSizeChange"
-                          @current-change="handleCurrentChange"
-                      />
-                  </template>
-                  <div v-else class="noData">
-                    <div class="icon" :style="noDataPic"></div>
-                    <span>暂无{{titleValue}}信息</span>
-                  </div>
-              </div>
+        </div>
+        <div class="procedureContent">
+          <template v-if="tableData.length > 0">
+            <div class="procedureTable">
+              <el-table
+                :data="tableData"
+                stripe
+                style="width: 100%"
+                height="100%"
+                tooltip-effect="dark"
+                :cell-style="cellStyle"
+                :header-cell-style="headerStyle"
+              >
+                <el-table-column label="序号" type="index" />
+                <el-table-column prop="dataType" label="人员类型"></el-table-column>
+                <el-table-column prop="createTime" label="时间" width="200"></el-table-column>
+                <el-table-column prop="createUserName" label="人员"></el-table-column>
+                <el-table-column prop="pdCodeName" label="工序"></el-table-column>
+                <el-table-column prop="distance" label="距离(米)"></el-table-column>
+                <el-table-column prop="scanTimes" label="扫码次序"></el-table-column>
+                <el-table-column prop="newpspipefileList" label="照片"></el-table-column>
+              </el-table>
+            </div>
+            <el-pagination
+              style="display: flex"
+              :current-page="paging.current"
+              :page-size="paging.size"
+              :total="paging.total"
+              layout="total, prev, pager, next"
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+            />
+          </template>
+          <div v-else class="noData">
+            <div class="icon" :style="noDataPic"></div>
+            <span>暂无{{ titleValue }}信息</span>
           </div>
+        </div>
       </div>
-      <div class='pictureList'>
-          <div class="image-item" v-for="(item,index) of picList" :key="index">
-            <el-image 
-                :src="item.url" 
-                :preview-src-list="deconstruction(picList,index)">
-            </el-image>
-            <div class="picCreateTime">{{item.time}}</div>
-            <div class="picGxName">{{item.gx}}</div>
-          </div>
+    </div>
+    <div class="pictureList">
+      <div class="image-item" v-for="(item, index) of picList" :key="index">
+        <el-image :src="item.url" :preview-src-list="deconstruction(picList, index)"> </el-image>
+        <div class="picCreateTime">{{ item.time }}</div>
+        <div class="picGxName">{{ item.gx }}</div>
       </div>
     </div>
+  </div>
 </template>
 <script>
-import apis from "@/api/PipeUnitInfo";
+import apis from '@/api/PipeUnitInfo'
 import verificationHelper from '@/utils/mapCommon/VerificationHelper'
+import { baseAddress } from '@/utils/request'
 export default {
-    name: "UnitScanInfo",
-    data(){
-        return{
-            noDataPic:"background-image: url("+require("@/views/widgets/PipeUnitInfo/images/sg.png")+")",
-            selectOption:{
-                geoType: '',
-                dataType: '',
-                pbsCode: '',
-                prjId:''
-            },
-            paging:{
-                current: 1, //当前页,默认0
-                size: 10, //每页数据条数
-                total:0   //总条数
-            },
-            smSearch:"",
-            titleValue:"",
-            //表格内容
-            cellStyle:{
-                color:"#000",
-                textAlign: 'center'
-            },
-            headerStyle:{
-                background: '#e6f0fd',
-                color: '#3b87d9',
-                height: '38px',
-                textAlign: 'center'
-            },
-            tableData: [],
-            //工序信息
-            procedureInfo:[],
-            procedureStyle:'',
-            //照片信息
-            picList:[],
-        }
+  name: 'UnitScanInfo',
+  data() {
+    return {
+      noDataPic: 'background-image: url(' + require('@/views/widgets/PipeUnitInfo/images/sg.png') + ')',
+      selectOption: {
+        geoType: '',
+        dataType: '',
+        pbsCode: '',
+        prjId: ''
+      },
+      paging: {
+        current: 1, //当前页,默认0
+        size: 10, //每页数据条数
+        total: 0 //总条数
+      },
+      smSearch: '',
+      titleValue: '',
+      //表格内容
+      cellStyle: {
+        color: '#000',
+        textAlign: 'center'
+      },
+      headerStyle: {
+        background: '#e6f0fd',
+        color: '#3b87d9',
+        height: '38px',
+        textAlign: 'center'
+      },
+      tableData: [],
+      //工序信息
+      procedureInfo: [],
+      procedureStyle: '',
+      //照片信息
+      picList: []
+    }
+  },
+  methods: {
+    /**
+     * 展示概述页面
+     * @param {string} geoType 部件geometry类型
+     * @param {string} dataType 扫码信息主体
+     * @param {string} pbsCode 部件pbs编码
+     * @param {string} prjId 工程编码
+     */
+    showSmInfoPage(geoType, dataType, pbsCode, prjId) {
+      this.selectOption = {
+        geoType: geoType,
+        dataType: dataType,
+        pbsCode: pbsCode,
+        prjId: prjId
+      }
+      this.titleValue = this.selectOption.dataType == 'CON' ? '施工' : '监理'
+      this.smSearch = this.selectOption.dataType
     },
-    methods:{
-        /**
-         * 展示概述页面
-         * @param {string} geoType 部件geometry类型
-         * @param {string} dataType 扫码信息主体
-         * @param {string} pbsCode 部件pbs编码 
-         * @param {string} prjId 工程编码 
-         */
-        showSmInfoPage(geoType, dataType, pbsCode, prjId) {
-            this.selectOption = {
-                geoType: geoType,
-                dataType: dataType,
-                pbsCode: pbsCode,
-                prjId:prjId
-            };
-            this.titleValue=this.selectOption.dataType=='CON'?'施工':'监理'
-            this.smSearch=this.selectOption.dataType
-        },
-        //信息获取
-        async showPage() {
-            let geoType = this.selectOption.geoType
-            let dataType =this.selectOption.dataType
-            let pbsCode=this.selectOption.pbsCode
-            const options = {
-                "orders[0].asc": false,
-                "orders[0].column": "create_time",
-                "current": this.paging.current,
-                "size":this.paging.size,
-                "dataType": dataType,
-                "pbsCode": pbsCode
-            };
-            this.picList=[];
-            this.tableData=[];
-            this.procedureInfo=[];
-            const res = geoType === "LINE" ?await apis.getNewpsPipeInfo(options) :await apis.getNewpsNodeInfo(options);
-            const { code, result } = res.data;
-            if(code==1){
-                if(result.records.length!=0){
-                    this.tableData=result.records.map((item)=>{
-                      let picArray = null;
-                      if (geoType === "LINE") {
-                          picArray = item.newpspipefileList;
-                      } else {
-                          picArray = item.newpsnodefileList;
-                      }
-                      this.getPhoto(picArray,item.createTime,verificationHelper.setNullAndUndefined(item.pdCodeName))
-                      return {
-                        ...item,
-                        dataType:(dataType == "SPV" ? "监理" : "施工"),
-                        createTime:verificationHelper.setNullAndUndefined(item.createTime),
-                        createUserName:verificationHelper.setNullAndUndefined(item.createUserName),
-                        pdCodeName:verificationHelper.setNullAndUndefined(item.pdCodeName),
-                        distance:!isNaN(parseFloat(verificationHelper.setNullAndUndefined(item.distance))) ? 
-                        (parseFloat(verificationHelper.setNullAndUndefined(item.distance))).toFixed(2) : '/',
-                        scanTimes:"第" + verificationHelper.setNullAndUndefined(item.scanTimes) + "次",
-                        newpspipefileList:picArray.length + "张"
-                      };
-                    })
-                    this.paging.total=result.records.length
-                    this.getProcedure(result);
-                }
-                
-            }else{
-                this.$message.error("扫码信息获取失败");
+    //信息获取
+    async showPage() {
+      let geoType = this.selectOption.geoType
+      let dataType = this.selectOption.dataType
+      let pbsCode = this.selectOption.pbsCode
+      const options = {
+        'orders[0].asc': false,
+        'orders[0].column': 'create_time',
+        current: this.paging.current,
+        size: this.paging.size,
+        dataType: dataType,
+        pbsCode: pbsCode
+      }
+      this.picList = []
+      this.tableData = []
+      this.procedureInfo = []
+      const res = geoType === 'LINE' ? await apis.getNewpsPipeInfo(options) : await apis.getNewpsNodeInfo(options)
+      const { code, result } = res
+      if (code == 1) {
+        if (result.records.length != 0) {
+          this.tableData = result.records.map((item) => {
+            let picArray = null
+            if (geoType === 'LINE') {
+              picArray = item.newpspipefileList
+            } else {
+              picArray = item.newpsnodefileList
             }
-        },
-        //获取照片信息
-        getPhoto(picArray,createTime,gx){
-          if (picArray && picArray.length && picArray.length > 0) {
-              picArray.forEach(picItem => {
-                  let time = "/";
-                  if (createTime) {
-                      time = verificationHelper.setNullAndUndefined(createTime);
-                  }
-                  let token="&access_token=29e2de53-0003-4ee0-a4d6-ba91d8bbd81e";
-                  let picurl="https://yeepms.yeec.com.cn/gis-api" + '/base/file/loadImg' + "?remotePath=" + picItem.filePath + token
-                  this.picList.push({url:picurl,time:time,gx:gx})
-              })
-          }
-        },
-        deconstruction(data,index){
-            let temp=[]
-            data.forEach((item)=>{
-                temp.push(item.url)
-            })
-            return temp.slice(index).concat(temp.slice(0,index))//构建一个以当前图片为起始的数组
-        },
-        //获取工序信息
-        async getProcedure(resultInfo) {
-          let searchData = {
-              prjId: this.selectOption.prjId,
-              pipeType: this.selectOption.geoType === "LINE" ? "1" : "0",
-              current: 1,
-              pbsCode: this.selectOption.pbsCode,
-              size: 10000,
-              "orders[0].column": "pd_sort",
-              "orders[0].asc": true
-          };
-          const res = await apis.getProcedureInfo(searchData);
-          const { code, result } = res.data;
-          if (code === 1) {
-                this.procedureInfo=result.records
-                this.procedureStyle='width:'+(100 / result.records.length)+'%';
-          }else{
-            this.$message.error('工序信息获取失败')
+            this.getPhoto(picArray, item.createTime, verificationHelper.setNullAndUndefined(item.pdCodeName))
+            return {
+              ...item,
+              dataType: dataType == 'SPV' ? '监理' : '施工',
+              createTime: verificationHelper.setNullAndUndefined(item.createTime),
+              createUserName: verificationHelper.setNullAndUndefined(item.createUserName),
+              pdCodeName: verificationHelper.setNullAndUndefined(item.pdCodeName),
+              distance: !isNaN(parseFloat(verificationHelper.setNullAndUndefined(item.distance)))
+                ? parseFloat(verificationHelper.setNullAndUndefined(item.distance)).toFixed(2)
+                : '/',
+              scanTimes: '第' + verificationHelper.setNullAndUndefined(item.scanTimes) + '次',
+              newpspipefileList: picArray.length + '张'
+            }
+          })
+          this.paging.total = result.records.length
+          this.getProcedure(result)
+        }
+      } else {
+        this.$message.error('扫码信息获取失败')
+      }
+    },
+    //获取照片信息
+    getPhoto(picArray, createTime, gx) {
+      if (picArray && picArray.length && picArray.length > 0) {
+        picArray.forEach((picItem) => {
+          let time = '/'
+          if (createTime) {
+            time = verificationHelper.setNullAndUndefined(createTime)
           }
-        },
-        setClass(item){
-          let index = this.tableData.findIndex(item2 => item2.pdCodeName == item.pdName);
-          let pclass=index != -1?'wc':'';
-          return pclass
-        },
-        // 每页多少条
-        handleSizeChange(val) {
-          this.paging.size = val;
-        },
-        // 当前页
-        handleCurrentChange(val) {
-          this.paging.current = val;
-        },
+          let token = '&access_token=' + sessionStorage.getItem('token')
+          let picurl = baseAddress + '/base/file/loadImg' + '?remotePath=' + picItem.filePath + token
+          this.picList.push({ url: picurl, time: time, gx: gx })
+        })
+      }
     },
-    watch:{
-      smSearch:{
-        handler(n,o){
-          this.selectOption.dataType=n;
-          this.titleValue=this.selectOption.dataType=='CON'?'施工':'监理'
-          this.showPage()
-        }
-      },
-      selectOption:{
-        handler(n,o){
-          this.selectOption=n;
-          this.showPage()
-        },
-        deep:true
+    deconstruction(data, index) {
+      let temp = []
+      data.forEach((item) => {
+        temp.push(item.url)
+      })
+      return temp.slice(index).concat(temp.slice(0, index)) //构建一个以当前图片为起始的数组
+    },
+    //获取工序信息
+    async getProcedure(resultInfo) {
+      let searchData = {
+        prjId: this.selectOption.prjId,
+        pipeType: this.selectOption.geoType === 'LINE' ? '1' : '0',
+        current: 1,
+        pbsCode: this.selectOption.pbsCode,
+        size: 10000,
+        'orders[0].column': 'pd_sort',
+        'orders[0].asc': true
+      }
+      const res = await apis.getProcedureInfo(searchData)
+      const { code, result } = res
+      if (code === 1) {
+        this.procedureInfo = result.records
+        this.procedureStyle = 'width:' + 100 / result.records.length + '%'
+      } else {
+        this.$message.error('工序信息获取失败')
       }
+    },
+    setClass(item) {
+      let index = this.tableData.findIndex((item2) => item2.pdCodeName == item.pdName)
+      let pclass = index != -1 ? 'wc' : ''
+      return pclass
+    },
+    // 每页多少条
+    handleSizeChange(val) {
+      this.paging.size = val
+    },
+    // 当前页
+    handleCurrentChange(val) {
+      this.paging.current = val
+    }
+  },
+  watch: {
+    smSearch: {
+      handler(n, o) {
+        this.selectOption.dataType = n
+        this.titleValue = this.selectOption.dataType == 'CON' ? '施工' : '监理'
+        this.showPage()
+      }
+    },
+    selectOption: {
+      handler(n, o) {
+        this.selectOption = n
+        this.showPage()
+      },
+      deep: true
     }
+  }
 }
 </script>
 <style lang="scss" scoped>
-  .smInfo {
-    display: flex;
-    flex-flow: column;
-    height: 430px;
-    overflow: auto;
-    .smList{
-      .procedureInfo {
-        position: relative;
-        width: 100%;
-        height: 30px;
-        float: left;
+.smInfo {
+  display: flex;
+  flex-flow: column;
+  height: 430px;
+  overflow: auto;
+  .smList {
+    .procedureInfo {
+      position: relative;
+      width: 100%;
+      height: 30px;
+      float: left;
       //   margin-bottom: 20px;
-        margin: 15px 0 15px 0;
-        text-align: center;
-        line-height: 30px;
+      margin: 15px 0 15px 0;
+      text-align: center;
+      line-height: 30px;
 
-        .infoItem {
-          float: left;
-          height: 30px;
-        }
+      .infoItem {
+        float: left;
+        height: 30px;
+      }
 
-        .infoItem:first-child .start {
-          width: 10px;
-          height: 100%;
-          background: #dedede;
-          border: none;
-        }
+      .infoItem:first-child .start {
+        width: 10px;
+        height: 100%;
+        background: #dedede;
+        border: none;
+      }
 
-        .infoItem:first-child .start.wc {
-          background: #0970cf;
-        }
+      .infoItem:first-child .start.wc {
+        background: #0970cf;
+      }
 
-        .start {
-          width: 0;
-          height: 0;
-          border-top: 15px solid #dedede;
-          border-left: 10px solid transparent;
-          border-bottom: 15px solid #dedede;
-          position: relative;
-          float: left;
-        }
+      .start {
+        width: 0;
+        height: 0;
+        border-top: 15px solid #dedede;
+        border-left: 10px solid transparent;
+        border-bottom: 15px solid #dedede;
+        position: relative;
+        float: left;
+      }
 
-        .start.wc {
-          border-top: 15px solid #0970cf;
-          border-bottom: 15px solid #0970cf;
-        }
+      .start.wc {
+        border-top: 15px solid #0970cf;
+        border-bottom: 15px solid #0970cf;
+      }
 
-        .spanTilte {
-          position: relative;
-          width: calc(100% - 20px);
-          float: left;
-          background: #dedede;
-          height: 100%;
-        }
+      .spanTilte {
+        position: relative;
+        width: calc(100% - 20px);
+        float: left;
+        background: #dedede;
+        height: 100%;
+      }
 
-        .spanTilte.wc {
-          background: #0970cf;
-          color: white;
-        }
+      .spanTilte.wc {
+        background: #0970cf;
+        color: white;
+      }
 
-        span.indexSpan {
-          display: block;
-          position: relative;
-          float: left;
-          width: 22px;
-          top: 4px;
-          border: 1px solid;
-          border-radius: 11px;
-          line-height: 20px;
-          left: calc((100% - 100px) / 2);
-        }
+      span.indexSpan {
+        display: block;
+        position: relative;
+        float: left;
+        width: 22px;
+        top: 4px;
+        border: 1px solid;
+        border-radius: 11px;
+        line-height: 20px;
+        left: calc((100% - 100px) / 2);
+      }
 
-        span.spanText {
-          display: block;
-          position: relative;
-        }
+      span.spanText {
+        display: block;
+        position: relative;
+      }
 
-        .end {
-          width: 0;
-          height: 0;
-          border-top: 15px solid transparent;
-          border-left: 10px solid #dedede;
-          border-bottom: 15px solid transparent;
-          position: relative;
-          float: left;
-        }
+      .end {
+        width: 0;
+        height: 0;
+        border-top: 15px solid transparent;
+        border-left: 10px solid #dedede;
+        border-bottom: 15px solid transparent;
+        position: relative;
+        float: left;
+      }
 
-        .end.wc {
-          border-left: 10px solid #0970cf;
-        }
+      .end.wc {
+        border-left: 10px solid #0970cf;
+      }
 
-        .infoItem:last-child .end {
-          width: 10px;
-          height: 100%;
-          background: #dedede;
-          border: none;
-        }
+      .infoItem:last-child .end {
+        width: 10px;
+        height: 100%;
+        background: #dedede;
+        border: none;
+      }
 
-        .infoItem:last-child .end.wc {
-          background: #0970cf;
-        }
+      .infoItem:last-child .end.wc {
+        background: #0970cf;
       }
-      .procedureContent{
+    }
+    .procedureContent {
+      width: 100%;
+      .procedureTable {
         width: 100%;
-        .procedureTable{
-            width: 100%;
-            max-height: 240px;
-            overflow: auto;
-        }
+        max-height: 240px;
+        overflow: auto;
       }
-      .remake {
-        position: relative;
-        float: left;
-        width: 100%;
+    }
+    .remake {
+      position: relative;
+      float: left;
+      width: 100%;
       //   padding: 20px 0px 0px 30px;
 
-        .remakeColor {
-          position: relative;
-          float: left;
-          width: 5px;
-          // top: 5px;
-          height: 20px;
-          background: #1565cf;
-        }
-
-        .remakeTitle {
-          position: relative;
-          float: left;
-          font-size: 20px;
-          font-weight: 700;
-          left: 10px;
-        }
-
-        .smSearch {
-          position: relative;
-          float: right;
-          width: 100px;
-          right: 30px;
-        }
-      }
-      .tableDiv {
+      .remakeColor {
         position: relative;
         float: left;
-        width: 100%;
-      //   padding: 20px 20px 20px 20px;
-        text-align: center;
-        border-bottom: solid;
-        border-width: 2px;
-        border-color: rgb(246, 246, 246);
-        display: flex;
-        flex-flow: column;
+        width: 5px;
+        // top: 5px;
+        height: 20px;
+        background: #1565cf;
       }
-      .noData{
-        width: 164px;
-        height: 93px;
+
+      .remakeTitle {
         position: relative;
         float: left;
-        left: calc((100% - 164px) / 2);
-        margin: 40px 0px;
-        .icon{
-          width: 100%;
-          height: 100%;
-          // background-image: url(./images/sg.png);
-          background-repeat: no-repeat;
-          background-size: 100% 100%;
-        }
-        span{
-          display: inline-block;
-          padding: 10px;
-          text-align: center;
-        }
-      }
-    }
-    .pictureList{
-      width: 100%;
-      margin-top: 10px;
-      .image-item{
-        width: 25%;
-        float: left;
+        font-size: 20px;
+        font-weight: 700;
+        left: 10px;
       }
-      .picCreateTime{
-        width: 97%;
+
+      .smSearch {
         position: relative;
-        bottom: 20px;
-        font-size: 18px;
-        color: #000;
-        background-color: rgba(255, 255, 255, 0.5);
+        float: right;
+        width: 100px;
+        right: 30px;
       }
-      .picGxName{
-        text-align: right;
-        padding-right: 8px;
-        margin: -10px 0 10px 0;
+    }
+    .tableDiv {
+      position: relative;
+      float: left;
+      width: 100%;
+      //   padding: 20px 20px 20px 20px;
+      text-align: center;
+      border-bottom: solid;
+      border-width: 2px;
+      border-color: rgb(246, 246, 246);
+      display: flex;
+      flex-flow: column;
+    }
+    .noData {
+      width: 164px;
+      height: 93px;
+      position: relative;
+      float: left;
+      left: calc((100% - 164px) / 2);
+      margin: 40px 0px;
+      .icon {
+        width: 100%;
+        height: 100%;
+        // background-image: url(./images/sg.png);
+        background-repeat: no-repeat;
+        background-size: 100% 100%;
       }
-      .el-image{
-        width: 95%;
-        height: 200px;
+      span {
+        display: inline-block;
+        padding: 10px;
+        text-align: center;
       }
     }
   }
+  .pictureList {
+    width: 100%;
+    margin-top: 10px;
+    .image-item {
+      width: 25%;
+      float: left;
+    }
+    .picCreateTime {
+      width: 97%;
+      position: relative;
+      bottom: 20px;
+      font-size: 18px;
+      color: #000;
+      background-color: rgba(255, 255, 255, 0.5);
+    }
+    .picGxName {
+      text-align: right;
+      padding-right: 8px;
+      margin: -10px 0 10px 0;
+    }
+    .el-image {
+      width: 95%;
+      height: 200px;
+    }
+  }
+}
 </style>

+ 565 - 0
src/views/widgets/PipeUnitNowInfo/config.json

@@ -0,0 +1,565 @@
+{
+    "pipeunitnowinfo": {
+        "baseInfo": [],
+        "qrRecords": [
+            {
+                "date": "2020-6-8 12:00",
+                "user": "张三",
+                "job": "监理"
+            },
+            {
+                "date": "2020-6-8 12:00",
+                "user": "张三",
+                "job": "监理"
+            },
+            {
+                "date": "2020-6-8 12:00",
+                "user": "张三",
+                "job": "监理"
+            },
+            {
+                "date": "2020-6-8 12:00",
+                "user": "张三",
+                "job": "监理"
+            }
+        ],
+        "qualityInfo": {
+            "type": "未解决",
+            "remark": "测量误差导致管道偏移"
+        },
+        "meterialInfo": {
+            "design": "HDPE",
+            "actual": "PVC-U"
+        },
+        "photos": [
+            {
+                "name": "现场照片1",
+                "url": "./widgets/PipeUnitNowInfo/images/photo1.jpg"
+            },
+            {
+                "name": "现场照片2",
+                "url": "./widgets/PipeUnitNowInfo/images/photo2.jpg"
+            },
+            {
+                "name": "现场照片3",
+                "url": "./widgets/PipeUnitNowInfo/images/photo1.jpg"
+            },
+            {
+                "name": "现场照片4",
+                "url": "./widgets/PipeUnitNowInfo/images/photo2.jpg"
+            }
+        ],
+        "desiglPaper": [
+            {
+                "img": "./widgets/PipeUnitNowInfo/images/designpaper.jpg",
+                "url": "./widgets/PipeUnitNowInfo/images/designpaper.pdf"
+            }
+        ],
+        "documents": [
+            {
+                "name": "青年东路钢板桩施工",
+                "size": "12KB",
+                "date": "2020-04-27",
+                "url": "./widgets/PipeUnitNowInfo/images/designpaper.pdf"
+            },
+            {
+                "name": "青年东路钢板桩施工",
+                "size": "12KB",
+                "date": "2020-04-27",
+                "url": "./widgets/PipeUnitNowInfo/images/designpaper.pdf"
+            },
+            {
+                "name": "青年东路钢板桩施工",
+                "size": "12KB",
+                "date": "2020-04-27",
+                "url": "./widgets/PipeUnitNowInfo/images/designpaper.pdf"
+            },
+            {
+                "name": "青年东路钢板桩施工",
+                "size": "12KB",
+                "date": "2020-04-27",
+                "url": "./widgets/PipeUnitNowInfo/images/designpaper.pdf"
+            }
+        ]
+    },
+    "queryParameter": {
+        "urlKey": "tiplayers",
+        "urlDataKey": "sjfw",
+        "dataSource": "sxgk",
+        "datasets": [
+            {
+                "title": "雨水",
+                "name": "NETWORK_SJ_PSYS@sxgk#1",
+                "dataset": "NETWORK_SJ_PSYS"
+            },
+            {
+                "title": "污水",
+                "name": "NETWORK_SJ_PSWS@sxgk#1",
+                "dataset": "NETWORK_SJ_PSWS"
+            }
+        ]
+    },
+    "fields": {
+        "pbs": "CODE",
+        "id": "SMID",
+        "pipeID": "PIPE_ID"
+    },
+    "pcFieldsInfo": {
+        "POINT": {
+            "PIPE_ID": "管点编码",
+            "CITY": "城区名称",
+            "PROJECT_NAME": "工程名称",
+            "ROAD_NAME": "道路名称",
+            "TZ": "特征",
+            "FSW": "附属物",
+            "X_COOR": "X坐标",
+            "Y_COOR": "Y坐标"
+        },
+        "LINE": {
+            "PIPE_ID": "管点编码",
+            "CITY": "城区名称",
+            "PROJECT_NAME": "工程名称",
+            "IN_JUNEID": "起点编号",
+            "OUT_JUNEID": "终点编号",
+            "ROAD_NAME": "道路名称",
+            "PIPE_WELLMATERIAL": "材质",
+            "PCONSTR_METHOD": "埋设方式",
+            "PIPE_MODEL": "管径"
+        }
+    },
+    "sjFieldsInfo": {
+        "POINT": {
+            "CITY":"城市",
+            "PROJECT_NAME":"单位工程名称",
+            "ROAD_NAME":"所在道路",
+            "DRAWING_PROJECT_NAME":"图纸工程名称",
+            "CODE":"PBS编码",
+            "PIPE_CATEGORY":"类别",
+            "TYPE":"类型",
+            "MANHOLE_TYPE":"检查井类型",
+            "JUNE_CLASS":"检查井等级",
+            "PIPE_ID":"部件标识码",
+            "X_COOR":"坐标X",
+            "Y_COOR":"坐标Y",
+            "DESIGN_DEPTH":"设计井深",
+            "WELLMATERIAL":"井材质",
+            "MANHOLE_MODEL":"井规格",
+            "COV_MATERIAL":"井盖材质",
+            "COV_MODEL":"井盖规格"
+        },
+        "LINE": {
+            "CITY":"城市",
+            "PROJECT_NAME":"单位工程名称",
+            "ROAD_NAME":"所在道路",
+            "DRAWING_PROJECT_NAME":"图纸工程名称",
+            "CODE":"PBS编码",
+            "PIPE_CATEGORY":"类别",
+            "TYPE":"类型",
+            "PIPE_CLASS":"管线等级",
+            "PIPE_ID":"部件标识码",
+            "DESIGN_IN_DEEP":"终点埋深",
+            "DESIGN_OUT_DEEP":"起点埋深",
+            "PIPE_LENGTH":"管道长度",
+            "PIPE_WELLMATERIAL":"管道材质",
+            "SHAPE_DATA1":"断面数据1",
+            "SHAPE_DATA2":"断面数据2"
+        }
+    },
+    "xxglsmjl": [
+        [
+            "2020-04-27 16:25",
+            "张郭论",
+            "监理",
+            "详情",
+            "./widgets/PipeUnitNowInfo/images/gczp1.png,./widgets/PipeUnitNowInfo/images/gczp2.png,./widgets/PipeUnitNowInfo/images/gczp2.png"
+        ],
+        [
+            "2020-04-27 16:25",
+            "张郭论",
+            "监理",
+            "详情",
+            "./widgets/PipeUnitNowInfo/images/gczp1.png,./widgets/PipeUnitNowInfo/images/gczp2.png,./widgets/PipeUnitNowInfo/images/gczp2.png"
+        ],
+        [
+            "2020-04-27 16:25",
+            "张郭论",
+            "监理",
+            "详情",
+            "./widgets/PipeUnitNowInfo/images/gczp1.png,./widgets/PipeUnitNowInfo/images/gczp2.png,./widgets/PipeUnitNowInfo/images/gczp2.png"
+        ]
+    ],
+    "jcxx": [
+        {
+            "title": "结构性缺陷评估信息",
+            "data": [
+                {
+                    "title": "平均值S",
+                    "value": "0.5"
+                },
+                {
+                    "title": "最大值Smax",
+                    "value": "0.5"
+                },
+                {
+                    "title": "缺陷等级",
+                    "value": "I"
+                },
+                {
+                    "title": "缺陷密度",
+                    "value": "0.08"
+                },
+                {
+                    "title": "修复指数RI",
+                    "value": "0.9"
+                },
+                {
+                    "title": "综合状况评价",
+                    "value": "(局部缺陷)无或有轻微影响,管道运行基本不受影响。"
+                }
+            ]
+        },
+        {
+            "title": "功能性缺陷评估信息",
+            "data": [
+                {
+                    "title": "评价值Y",
+                    "value": "0.5"
+                },
+                {
+                    "title": "最大值Ymax",
+                    "value": "0.5"
+                },
+                {
+                    "title": "缺陷等级",
+                    "value": "Ⅰ"
+                },
+                {
+                    "title": "缺陷密度",
+                    "value": "0.03"
+                },
+                {
+                    "title": "养护指数MI",
+                    "value": "0.4"
+                },
+                {
+                    "title": "综合状况评价",
+                    "value": "(局部缺陷)无或有轻微影响,管道运行基本不受影响。没有明显要处理的缺陷,不需要养护。"
+                }
+            ]
+        },
+        {
+            "title": "管段检测报告",
+            "data": [
+                {
+                    "title": "报告",
+                    "value": "<a style='text-decoration: underline; cursor: pointer;'>管段检测报告</a>"
+                },
+                {
+                    "title": "视频",
+                    "value": "<span class='lookAudio' style='cursor: pointer;'>查看</span>"
+                }
+            ]
+        }
+    ],
+    "qxxx": [
+        [
+            {
+                "qxlx": "功能性缺陷",
+                "qxmc": "沉积",
+                "zgjy": "立即处理"
+            },
+            {
+                "title": "井号",
+                "value": "[LY-1]- [LY-2]"
+            },
+            {
+                "title": "管段类型",
+                "value": "雨水管"
+            },
+            {
+                "title": "管段长度",
+                "value": "45.00"
+            },
+            {
+                "title": "检测长度",
+                "value": "45.00"
+            },
+            {
+                "title": "材质",
+                "value": "聚乙烯缠绕结构壁管(B型)"
+            },
+            {
+                "title": "管径",
+                "value": "Φ600"
+            },
+            {
+                "title": "缺陷类型",
+                "value": "功能性缺陷"
+            },
+            {
+                "title": "缺陷名称",
+                "value": "沉积"
+            },
+            {
+                "title": "纵向",
+                "value": "1.25"
+            },
+            {
+                "title": "环向",
+                "value": "507"
+            },
+            {
+                "title": "整改建议",
+                "value": "立即处理"
+            },
+            {
+                "title": "整改方式",
+                "value": "机械/人工清理"
+            },
+            {
+                "title": "照片",
+                "type": "img",
+                "value": "./widgets/PipeUnitNowInfo/images/gczp1.png,./widgets/PipeUnitNowInfo/images/gczp2.png,./widgets/PipeUnitNowInfo/images/gczp2.png"
+            }
+        ],
+        [
+            {
+                "qxlx": "功能性缺陷",
+                "qxmc": "沉积",
+                "zgjy": "立即处理"
+            },
+            {
+                "title": "井号",
+                "value": "[LY-2]- [LY-3]"
+            },
+            {
+                "title": "管段类型",
+                "value": "雨水管"
+            },
+            {
+                "title": "管段长度",
+                "value": "35.00"
+            },
+            {
+                "title": "检测长度",
+                "value": "35.00"
+            },
+            {
+                "title": "材质",
+                "value": "聚乙烯缠绕结构壁管(B型)"
+            },
+            {
+                "title": "管径",
+                "value": "Φ600"
+            },
+            {
+                "title": "缺陷类型",
+                "value": "功能性缺陷"
+            },
+            {
+                "title": "缺陷名称",
+                "value": "沉积"
+            },
+            {
+                "title": "纵向",
+                "value": "1.20"
+            },
+            {
+                "title": "环向",
+                "value": "505"
+            },
+            {
+                "title": "整改建议",
+                "value": "立即处理"
+            },
+            {
+                "title": "整改方式",
+                "value": "机械/人工清理"
+            },
+            {
+                "title": "照片",
+                "type": "img",
+                "value": "./widgets/PipeUnitNowInfo/images/gczp1.png,./widgets/PipeUnitNowInfo/images/gczp2.png,./widgets/PipeUnitNowInfo/images/gczp2.png"
+            }
+        ]
+    ],
+    "pssp": "./widgets/PipeUnitNowInfo/video/pssp.mp4",
+    "pipeQuery": [
+        {
+            "title": "设计_污水管线",
+            "name": "NETWORK_SJ_PSWS@sxgk#1",
+            "mapname": "NETWORK_SJ_PSWS@sxgk",
+            "datasource": "sxgk",
+            "dataset": "NETWORK_SJ_PSWS",
+            "geometryType": "line",
+            "pipeType": "SJ",
+            "lineColor": [
+                0,
+                255,
+                255
+            ],
+            "origindataset": "TF_SJ_PSWS_PIPE_B"
+        },
+        {
+            "title": "设计_污水管点",
+            "name": "NETWORK_SJ_PSWS_Node@sxgk#1",
+            "mapname": "NETWORK_SJ_PSWS_Node@sxgk",
+            "datasource": "sxgk",
+            "dataset": "TF_SJ_PSWS_NODE_B_3D",
+            "tubewelldataset": "TF_SJ_PSWS_JG_B_3D",
+            "geometryType": "point",
+            "pipeType": "SJ",
+            "origindataset": "TF_SJ_PSWS_NODE_B",
+            "ADJUNCT": [],
+            "WELL": [
+                "TF_SJ_PSWS_JG_B_3D@sxgk#1",
+                "TF_SJ_PSWS_JG_B_3D@sxgk#2"
+            ]
+        },
+        {
+            "title": "设计_雨水管线",
+            "name": "NETWORK_SJ_PSYS@sxgk#1",
+            "mapname": "NETWORK_SJ_PSYS@sxgk",
+            "datasource": "sxgk",
+            "dataset": "NETWORK_SJ_PSYS",
+            "geometryType": "line",
+            "pipeType": "SJ",
+            "lineColor": [
+                0,
+                255,
+                255
+            ],
+            "origindataset": "TF_SJ_PSYS_PIPE_B"
+        },
+        {
+            "title": "设计_雨水管点",
+            "name": "NETWORK_SJ_PSYS_Node@sxgk#1",
+            "mapname": "NETWORK_SJ_PSYS_Node@sxgk",
+            "datasource": "sxgk",
+            "dataset": "TF_SJ_PSYS_NODE_B_3D",
+            "tubewelldataset": "TF_SJ_PSYS_JG_B_3D",
+            "geometryType": "point",
+            "pipeType": "SJ",
+            "origindataset": "TF_SJ_PSYS_NODE_B",
+            "ADJUNCT": [],
+            "WELL": [
+                "TF_SJ_PSYS_JG_B_3D@sxgk#1",
+                "TF_SJ_PSYS_JG_B_3D@sxgk#2"
+            ]
+        },
+        {
+            "title": "设计_雨污管线",
+            "name": "NETWORK_SJ_PSHS@sxgk#1",
+            "mapname": "NETWORK_SJ_PSHS@sxgk",
+            "datasource": "sxgk",
+            "dataset": "NETWORK_SJ_PSHS",
+            "geometryType": "line",
+            "pipeType": "SJ",
+            "lineColor": [
+                0,
+                255,
+                255
+            ],
+            "origindataset": "TF_SJ_PSHS_PIPE_B"
+        },
+        {
+            "title": "设计_雨污管点",
+            "name": "NETWORK_SJ_PSHS_Node@sxgk#1",
+            "mapname": "NETWORK_SJ_PSHS_Node@sxgk",
+            "datasource": "sxgk",
+            "dataset": "TF_SJ_PSHS_NODE_B_3D",
+            "tubewelldataset": "TF_SJ_PSHS_JG_B_3D",
+            "geometryType": "point",
+            "pipeType": "SJ",
+            "origindataset": "TF_SJ_PSHS_NODE_B",
+            "ADJUNCT": [],
+            "WELL": [
+                "TF_SJ_PSHS_JG_B_3D@sxgk#1",
+                "TF_SJ_PSHS_JG_B_3D@sxgk#2"
+            ]
+        },
+        {
+            "title": "普查_燃气节点",
+            "name": "NETWORK_PC_RQTR_Node@sxgk#1",
+            "mapname": "NETWORK_PC_RQTR_Node@sxgk",
+            "datasource": "sxgk",
+            "dataset": "TF_PC_RQTR_NODE_B_3D",
+            "tubewelldataset": "TF_PC_RQTR_JG_B_3D",
+            "geometryType": "point",
+            "pipeType": "PC",
+            "origindataset": "TF_PC_RQTR_NODE_B",
+            "ADJUNCT": [],
+            "WELL": [
+                "TF_PC_RQTR_JG_B_3D@sxgk#1",
+                "TF_PC_RQTR_JG_B_3D@sxgk#2"
+            ]
+        },
+        {
+            "title": "普查_燃气管线",
+            "name": "NETWORK_PC_RQTR@sxgk#1",
+            "mapname": "NETWORK_PC_RQTR@sxgk",
+            "datasource": "sxgk",
+            "dataset": "NETWORK_PC_RQTR",
+            "geometryType": "line",
+            "pipeType": "PC",
+            "lineColor": [
+                0,
+                255,
+                255
+            ],
+            "origindataset": "TF_PC_RQTR_PIPE_B"
+        },
+        {
+            "title": "普查_给水管点",
+            "name": "NETWORK_PC_JSJS_Node@sxgk#1",
+            "mapname": "NETWORK_PC_JSJS_Node@sxgk",
+            "datasource": "sxgk",
+            "dataset": "TF_PC_JSJS_NODE_B_3D",
+            "tubewelldataset": "TF_PC_JSJS_JG_B_3D",
+            "geometryType": "point",
+            "pipeType": "PC",
+            "origindataset": "TF_PC_JSJS_NODE_B",
+            "ADJUNCT": [],
+            "WELL": [
+                "TF_PC_JSJS_JG_B_3D@sxgk#1",
+                "TF_PC_JSJS_JG_B_3D@sxgk#2"
+            ]
+        },
+        {
+            "title": "普查_给水管线",
+            "name": "NETWORK_PC_JSJS@sxgk#1",
+            "mapname": "NETWORK_PC_JSJS@sxgk",
+            "datasource": "sxgk",
+            "dataset": "NETWORK_PC_JSJS",
+            "geometryType": "line",
+            "pipeType": "PC",
+            "origindataset": "TF_PC_JSJS_PIPE_B"
+        },
+        {
+            "title": "普查_强电节点",
+            "name": "NETWORK_PC_DLGD_Node@sxgk#1",
+            "mapname": "NETWORK_PC_DLGD_Node@sxgk",
+            "datasource": "sxgk",
+            "dataset": "TF_PC_DLGD_NODE_B_3D",
+            "tubewelldataset": "TF_PC_DLGD_JG_B_3D",
+            "geometryType": "point",
+            "pipeType": "PC",
+            "origindataset": "TF_PC_DLGD_NODE_B",
+            "ADJUNCT": [],
+            "WELL": [
+                "TF_PC_DLGD_JG_B_3D@sxgk#1",
+                "TF_PC_DLGD_JG_B_3D@sxgk#2"
+            ]
+        },
+        {
+            "title": "普查_强电管线",
+            "name": "NETWORK_PC_DLGD@sxgk#1",
+            "mapname": "NETWORK_PC_DLGD@sxgk",
+            "datasource": "sxgk",
+            "dataset": "NETWORK_PC_DLGD",
+            "geometryType": "line",
+            "pipeType": "PC",
+            "origindataset": "TF_PC_DLGD_PIPE_B"
+        }
+    ]
+}

+ 801 - 0
src/views/widgets/PipeUnitNowInfo/index.vue

@@ -0,0 +1,801 @@
+<template>
+  <div class="widget-pipeunitnowinfo">
+    <div class="item" v-for="info in infos" :key="info.title">
+      <span class="title" :title="info.title">{{ info.title }}:</span>
+      <span class="value" :title="info.value">{{ info.value }}</span>
+    </div>
+    <!-- <div class="card">
+       
+        <div class="card-body">
+            <table id="baseInfoTb" class="table table-borderless table-sm">
+                <tbody>
+                </tbody>
+            </table>
+        </div>
+    </div> -->
+  </div>
+</template>
+<script>
+import { InfoWindow, createTooltip, CesiumToSuperMap } from '@/utils/mapCommon/tools'
+import PipeQueryHelper from '@/utils/mapCommon/PipeQueryHelper'
+import $ from 'jquery'
+import _ from 'lodash'
+import Config from './config.json'
+let gPrimitiveCollection = null
+let gPointPrimitiveCollection = null
+let gPolylineprimitiveCollection = null
+let gToolTip = null
+let gTooltipHandler = null
+let gInfoWindow = null
+let gSelectPick = null //已选中的对象
+export default {
+  name: 'PipeUnitNowInfo',
+  data() {
+    return {
+      infos: [],
+      isInteractive: true, //是否与模型交互
+      locateUnit: undefined,
+      _selectFeatures: [],
+      apiUrls: {
+        getUnitInfo: '/tofly-sxgkloc/structure/spatialData',
+        sjfw: ''
+      }
+    }
+  },
+  computed: {
+    AppX() {
+      return this.$store.getters.AppX
+    }
+  },
+  mounted() {
+    if (!window.viewer) return
+    this.viewer = window.viewer
+    this.apiUrls.sjfw = this.AppX.appConfig.gisResource.tiplayers.config['sjfw'].url
+    if (!gPrimitiveCollection) {
+      gPrimitiveCollection = new Cesium.PrimitiveCollection()
+      this.viewer.scene.primitives.add(gPrimitiveCollection)
+    }
+    this.initInfoWindow()
+    if (this.isInteractive) {
+      gInfoWindow._setHandler(true)
+      this.addPointClickEvent()
+    } else {
+      if (this.locateUnit) {
+        gInfoWindow._handler.setInputAction(function () {}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
+        this.queryForpipeunitnowinfoBySQL(this.locateUnit.name, this.locateUnit.sql)
+      }
+    }
+  },
+  methods: {
+    /**
+     * 该方法用于初始化信息窗,考虑工程结构树的对外接口
+     *
+     */
+    initInfoWindow() {
+      if (!this.AppX.appConfig.infowindow) {
+        this.AppX.appConfig.infowindow = InfoWindow(
+          document.querySelector('#' + this.$store.state.cesiumMap.mapContainerId),
+          this.viewer
+        )
+      }
+      gInfoWindow = this.AppX.appConfig.infowindow
+      this.domObj = $(gInfoWindow._div)
+      var that = this
+      this.domObj
+        .find('.bubbleclose')
+        .off('click')
+        .on('click', function () {
+          if (!that.isInteractive) {
+            that.clearSelection()
+          }
+          that.domObj.hide() //++
+        })
+    },
+    /**
+     * 该方法用于更新对话库中的部件信息
+     * @param unitInfo
+     *
+     */
+    updateUnitInfo(unitInfo) {
+      this.infos = unitInfo.baseInfo
+    },
+    /**
+     * 该方法用于组织管线或管点属性信息
+     * @param {object} attrs 属性信息
+     * @param {string} geotType 几何类型
+     * @returns {Array<any>} 返回包含中文字段名的信息
+     */
+    formPipeAttribs(geotType, attrs, pipeType) {
+      const unitType = geotType === 'LINE3D' ? 'LINE' : 'POINT'
+      const fieldsInfo = pipeType === 'SJ' ? Config.sjFieldsInfo : Config.pcFieldsInfo
+      const fields = fieldsInfo[unitType]
+      let info = []
+      for (let name in fields) {
+        info.push({ title: fields[name], value: attrs[name] })
+      }
+      return info
+    },
+    /**
+     *  点选
+     */
+    addPointClickEvent() {
+      gToolTip = createTooltip(document.querySelector('#' + this.$store.state.cesiumMap.mapContainerId))
+      const handler = new Cesium.ScreenSpaceEventHandler(this.viewer.canvas)
+      gTooltipHandler = handler
+      handler.setInputAction((e) => {
+        const radius = 2
+        const position = this.viewer.scene.pickPosition(e.position)
+        const ellpise = new Cesium.Entity({
+          position: position,
+          ellipse: {
+            semiMajorAxis: radius,
+            semiMinorAxis: radius,
+            material: Cesium.Color.ORANGERED,
+            classificationType: Cesium.ClassificationType.TERRAIN
+          }
+        })
+        gInfoWindow.hide()
+        const positions = PipeQueryHelper.converCesiumToSuperMapEllipse(ellpise)
+        this.queryForPipeUnitInfoByPolygon(positions.positions)
+      }, Cesium.ScreenSpaceEventType.LEFT_CLICK)
+      handler.setInputAction((movement) => {
+        gToolTip.showAt(movement.endPosition, '<p>鼠标左键确定缓冲中心,右键单击取消</p>')
+      }, Cesium.ScreenSpaceEventType.MOUSE_MOVE)
+      gTooltipHandler.setInputAction(
+        function (movement) {
+          this.otherDestroy()
+        }.bind(this),
+        Cesium.ScreenSpaceEventType.RIGHT_CLICK
+      )
+    },
+    /**
+     * 该方法用于空间查询数据服务
+     * @param {Cesium.Cartesian3[]} positions 多边形顶点
+     */
+    queryForPipeUnitInfoByPolygon(positions) {
+      const geometry = CesiumToSuperMap.convertPolygon(Cesium, SuperMap, { positions: positions })
+
+      const layers = this.viewer.scene.layers
+      const layerList = layers.layerQueue
+      const fieldName = Config.fields
+      const pipeInfo = []
+      const allPipe = PipeQueryHelper.pipe
+      const filters = []
+      layerList.forEach((item) => {
+        if (!item.visible) return false
+        const pipe = _.find(allPipe, (sjpipe) => {
+          const isnode = sjpipe.geometryType === 'point' && sjpipe.WELL.indexOf(item.name) > -1
+          const ispipe = sjpipe.geometryType === 'line' && item.name === sjpipe.name
+          return isnode || ispipe
+        })
+        if (!pipe) return false
+        let unipipeInfo = { dataset: null }
+        if (pipe.geometryType === 'line') {
+          unipipeInfo.dataset = pipe.origindataset
+        } else if (pipe.geometryType === 'point' && pipe.WELL.indexOf(item.name) > -1) {
+          unipipeInfo.dataset = pipe.origindataset
+        }
+        const isExsit = _.find(pipeInfo, (pipeItem) => {
+          return pipeItem.dataset === unipipeInfo.dataset
+        })
+        if (!isExsit) {
+          pipeInfo.push(unipipeInfo)
+          const filter = unipipeInfo.dataset + '@' + pipe.datasource
+          // const filter = new SuperMap.REST.FilterParameter({
+          //     name: unipipeInfo.dataset + "@" + pipe.datasource,
+          //     fields: [fieldName.id, fieldName.pbs, fieldName.pipeID]
+          // });
+          filters.push(filter)
+        }
+      })
+      if (filters.length === 0) return
+      const onComplete = function (geoResult) {
+        if (geoResult.originResult.currentCount === 0) {
+          this.$message.warning('当前范围内无管网数据')
+          return
+        }
+        // if (gTooltipHandler && !gTooltipHandler.isDestroyed()) {
+        //     gTooltipHandler.destroy();
+        //     gTooltipHandler = null;
+        // }
+        this.flashMapService(geoResult.originResult.recordsets, geoResult.originResult.totalCount)
+      }.bind(this)
+      PipeQueryHelper.queryMapByGeometry({
+        url: this.AppX.appConfig.gisResource.tiplayers.config['geoquery'].url,
+        datasetNames: filters,
+        geometry: geometry,
+        completed: onComplete.bind(this),
+        failed: function (err) {
+          console.log(err)
+        }
+      })
+    },
+    /**
+     * 该方法用于添加二维管线高亮
+     * @param records
+     */
+    flashMapService(records, totalCount) {
+      const that = this
+      //that.pointArrCluster.splice(0,this.pointArrCluster.length);//清空已存在的数据
+      if (!records || records.length === 0) return
+      if (!gPrimitiveCollection) return
+      const primtCol = gPrimitiveCollection
+      primtCol.removeAll()
+      //保存feature属性信息
+      const newFeatures = []
+      records.forEach((record) => {
+        record.features.forEach((feature) => {
+          const obj = new Object()
+          feature.fieldNames.forEach((fieldName, index) => {
+            obj[fieldName] = feature.fieldValues[index]
+          })
+          obj['s3mlayername'] = record.datasetName.split('@')[0]
+          newFeatures.push(obj)
+        })
+      })
+      this._selectFeatures = newFeatures
+      //fade材质
+      let t = 0.0
+      const linefadeMaterial = Cesium.Material.fromType(Cesium.Material.FadeType, {
+        repeat: true,
+        fadeInColor: Cesium.Color.CYAN,
+        fadeOutColor: Cesium.Color.CYAN.withAlpha(0.0),
+        time: new Cesium.Cartesian2(0.0, 0.0),
+        fadeDirection: {
+          x: false,
+          y: false
+        }
+      })
+      records.forEach((record) => {
+        if (record.features.length == 0) return false
+        // const pipe = _.find(that.config.pipe, function (item: any) {
+        //     return item.smidmapname === record.datasetName;
+        // })
+        // const ids = record.features.map(item => { return item.ID; });
+        // const s3mNames = pipe.geometryType === "line" ? [pipe.name] : pipe.WELL;
+        const layerName = record.datasetName
+        record.features.forEach((feature) => {
+          const geometry = feature.geometry.points
+          const geotype = feature.geometry.type.toLowerCase().indexOf('line') > -1 ? 'LINE' : 'POINT'
+          let entity
+          if (geotype === 'LINE') {
+            const pointA = Cesium.Cartesian3.fromDegrees(geometry[0].x, geometry[0].y)
+            const pointB = Cesium.Cartesian3.fromDegrees(geometry[1].x, geometry[1].y)
+            primtCol.add(this.generaGroundPolyline([pointA, pointB], layerName, feature, totalCount === 1))
+            //primtCol.show=false;
+            const pointL = [geometry[0].x, geometry[0].y, geometry[0].z]
+            //this.pointArrCluster.push(pointL);
+          } else {
+            const pointS = Cesium.Cartesian3.fromDegrees(geometry[0].x, geometry[0].y, 1000)
+            primtCol.add(this.generaGroundCircle(pointS, 10, 1.5, layerName, feature, totalCount === 1))
+            //primtCol.show=false;
+            const pointR = [geometry[0].x, geometry[0].y, geometry[0].z]
+            //this.pointArrCluster.push(pointR);
+          }
+        })
+      })
+      if (totalCount === 1) {
+        const primitive = primtCol.get(0)
+        that.queryForpipeunitnowinfoBySQL(primitive.custom.tablename, primitive.custom.sql)
+      } else {
+        this.clearDrawEvent()
+        this.addPrimitiveHandler()
+      }
+    },
+    addPrimitiveHandler() {
+      if (gToolTip) {
+        gToolTip.remove()
+        gToolTip = null
+      }
+      gToolTip = createTooltip(document.querySelector('#' + this.$store.state.cesiumMap.mapContainerId))
+      //二维亮圈比例变换
+      const handler = new Cesium.ScreenSpaceEventHandler(this.viewer.canvas)
+      gTooltipHandler = handler
+      const that = this
+      const fields = Config.fields
+      handler.setInputAction(function () {}, Cesium.ScreenSpaceEventType.WHEEL)
+      handler.setInputAction(function (movement) {
+        that.removeHightLight(gSelectPick)
+        var pick = that.viewer.scene.pick(movement.position)
+        if (pick) {
+          that.pickHightLight(pick)
+          const tablename = pick.primitive.custom.tablename
+          const sql = pick.primitive.custom.sql
+          that.queryForpipeunitnowinfoBySQL(tablename, sql)
+        } else {
+          gInfoWindow.hide()
+        }
+      }, Cesium.ScreenSpaceEventType.LEFT_CLICK)
+      handler.setInputAction(
+        function (movement) {
+          gToolTip.showAt(movement.endPosition, '<p>当前范围内有多条管线,鼠标左键选中目标管线,右键单击取消</p>')
+        }.bind(this),
+        Cesium.ScreenSpaceEventType.MOUSE_MOVE
+      )
+      handler.setInputAction(
+        function (movement) {
+          that.otherDestroy()
+        }.bind(this),
+        Cesium.ScreenSpaceEventType.RIGHT_CLICK
+      )
+    },
+    /**
+     * 该方法用于通过iserver接口利用smid查询构件信息
+     * @param {string} tableName 数据服务中的二维数据表名
+     * @param {number} whereclause 查询条件
+     */
+    queryForpipeunitnowinfoBySQL(tableName, whereclause) {
+      const gl = this
+      const pipes = PipeQueryHelper.pipe
+      const queryParameter = _.find(pipes, function (item) {
+        return item.origindataset === tableName
+      })
+      if (queryParameter) {
+        const options = {
+          url: this.apiUrls.sjfw,
+          datasetNames: [queryParameter.datasource + ':' + queryParameter.threeDDateset],
+          whereclause: whereclause,
+          completed: function (result) {
+            if (result.result.featureCount > 0) {
+              if (!gl.isInteractive) {
+                //去除高亮
+                gl.clearSelection()
+                //高亮
+                gl.clickHightLight(result.originResult)
+              }
+              const attrs = result.result.features[0].attributes
+              const geometry = result.originResult.features[0].geometry
+              const geoType = geometry.type
+              const baseInfo = gl.formPipeAttribs(geoType, attrs, queryParameter.pipeType)
+              //添加部件类型
+              //baseInfo.unshift({ "title": "类型", "value": queryParameter.title });
+              let config = Config.pipeunitnowinfo
+              config.baseInfo = baseInfo
+              const title = queryParameter.title + ' ' + attrs['PIPE_ID']
+              const pbsCode = attrs['CODE']
+              if (!gl.isInteractive) {
+                gl.location(geometry, function () {
+                  gInfoWindow.show(title, gl.$el)
+                  gl.updateUnitInfo(config)
+                })
+              } else {
+                gl.location(geometry, function () {
+                  gInfoWindow.show(title, gl.$el)
+                  gl.updateUnitInfo(config)
+                })
+              }
+            } else {
+              gInfoWindow.hide()
+            }
+          },
+          failed: function (error) {
+            console.error(error)
+          }
+        }
+        this.queryByAttribute(options)
+      }
+    },
+    /**
+     * 清除拾取对象框
+     */
+    removePickInfo() {
+      this.parentDom = $('#mainMap .pickUpInfo')
+      if (this.parentDom.hasClass('show')) {
+        this.parentDom.removeClass('show')
+      }
+      this.parentDom.empty()
+    },
+    /**
+     * 对象高亮
+     * @param pick 拾取对象
+     * @param index 对象索引值
+     */
+    pickHightLight(pick) {
+      var attributes = pick.primitive.getGeometryInstanceAttributes(pick.id) //获取某个实例的属性集
+      attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.fromBytes(255, 125, 0)) //设置其高亮
+      gSelectPick = pick
+    },
+    /**
+     * 清除对象高亮
+     * @param pick
+     * @param index
+     */
+    removeHightLight(pick) {
+      if (pick) {
+        var attributes = pick.primitive.getGeometryInstanceAttributes(pick.id) //获取某个实例的属性集
+        attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.fromBytes(0, 255, 255, 100)) //设置其初始颜色
+      }
+    },
+    /**
+     * 该方法用于属性查询(查询数据服务)
+     * @param options
+     */
+    queryByAttribute(options) {
+      const filterparams = new SuperMap.REST.FilterParameter({
+        attributeFilter: options.whereclause,
+        fields: options.fields
+      })
+      const sqlParams = new SuperMap.REST.GetFeaturesBySQLParameters({
+        queryParameter: filterparams,
+        datasetNames: options.datasetNames,
+        toIndex: -1
+      })
+      const queryservice = new SuperMap.REST.GetFeaturesBySQLService(options.url, {
+        eventListeners: {
+          processCompleted: options.completed,
+          processFailed: options.failed
+        }
+      })
+      queryservice.processAsync(sqlParams)
+    },
+    /**
+     * 提供对外接口时,定位至构件位置
+     * @param geometry 几何图形
+     * @param completed 回调函数
+     */
+    location(geometry, completed) {
+      const position = geometry.position
+      const location = Cesium.Cartographic.fromDegrees(position.x, position.y, position.z + 50)
+      const scenePosition = Cesium.Cartographic.fromDegrees(position.x, position.y, position.z)
+      const cartesian3 = Cesium.Cartographic.toCartesian(location)
+      gInfoWindow._scenePosition = Cesium.Cartographic.toCartesian(scenePosition)
+      const camera = this.viewer.camera
+      camera.flyTo({
+        destination: cartesian3,
+        orientation: {
+          heading: camera.heading,
+          pitch: Cesium.Math.toRadians(-82),
+          roll: 0
+        },
+        complete: completed()
+      })
+    },
+    /**
+     * 查询结果二三维高亮
+     * @param result
+     * @returns
+     */
+    entitiesHighLight(result, pbsCode, name) {
+      const that = this
+      if (result.originResult.featureCount === 0) {
+        return
+      }
+      // this.hightLight3D(pbsCode,name);
+      this.clickHightLight(result.originResult)
+    },
+    /**
+     * 二维高亮
+     * @param result
+     * @returns
+     */
+    clickHightLight(result) {
+      if (!gPolylineprimitiveCollection) {
+        gPolylineprimitiveCollection = new Cesium.PrimitiveCollection()
+        this.viewer.scene.primitives.add(gPolylineprimitiveCollection) //添加线容器
+      }
+      if (!gPointPrimitiveCollection) {
+        gPointPrimitiveCollection = new Cesium.PointPrimitiveCollection()
+        this.viewer.scene.primitives.add(gPointPrimitiveCollection) //添加点容器
+      }
+      if (!result) return
+      if (!gPolylineprimitiveCollection) return
+      if (!gPointPrimitiveCollection) return
+      const geometry = result.features[0].geometry.points
+      const geotype = result.features[0].geometry.type
+      if (geotype === 'LINE3D') {
+        const pointA = Cesium.Cartesian3.fromDegrees(geometry[0].x, geometry[0].y, geometry[0].z)
+        const pointB = Cesium.Cartesian3.fromDegrees(geometry[1].x, geometry[1].y, geometry[0].z)
+        gPolylineprimitiveCollection.add(GroundPolyline([pointA, pointB]))
+      } else {
+        const pointS = Cesium.Cartesian3.fromDegrees(geometry[0].x, geometry[0].y, geometry[0].z)
+        gPointPrimitiveCollection.add({
+          heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+          pixelSize: 30,
+          color: Cesium.Color.fromBytes(255, 125, 0),
+          outlineColor: Cesium.Color.TRANSPARENT,
+          outlineWidth: 0.0,
+          position: pointS
+        })
+      }
+      function GroundPolyline(positions) {
+        const instance = new Cesium.GeometryInstance({
+          geometry: new Cesium.GroundPolylineGeometry({
+            positions: positions,
+            width: 15.0
+          }),
+          attributes: {
+            color: new Cesium.ColorGeometryInstanceAttribute(1.0, 0.5, 0.0, 1)
+          }
+        })
+        const polyline = new Cesium.GroundPolylinePrimitive({
+          geometryInstances: instance,
+          appearance: new Cesium.PolylineColorAppearance(),
+          classificationType: Cesium.ClassificationType.TERRAIN
+        })
+        return polyline
+      }
+    },
+    clearDrawEvent() {
+      if (gToolTip) {
+        gToolTip.remove()
+        gToolTip = null
+      }
+      if (gTooltipHandler && !gTooltipHandler.isDestroyed()) {
+        gTooltipHandler.destroy()
+        gTooltipHandler = null
+      }
+    },
+    /**
+     * 清除高亮显示
+     */
+    clearSelection() {
+      this.viewer.scene.layers.releaseSelection()
+      this.clearAllPrimitives()
+    },
+    /**
+     * 该方法用于清除二维点和线的primitivecollection
+     */
+    clearAllPrimitives() {
+      if (gPointPrimitiveCollection) {
+        gPointPrimitiveCollection.removeAll()
+        const isPointDel = this.viewer.scene.primitives.remove(gPointPrimitiveCollection)
+        if (isPointDel) gPointPrimitiveCollection = null
+      }
+      if (gPolylineprimitiveCollection) {
+        gPolylineprimitiveCollection.removeAll()
+        const isPolylineDel = this.viewer.scene.primitives.remove(gPolylineprimitiveCollection)
+        if (isPolylineDel) gPolylineprimitiveCollection = null
+      }
+    },
+    /**
+     * 设置选中的空间数据
+     */
+    setSpaceSelect(target, condition, dircList, attributes) {
+      Object.keys(target).forEach((item) => {
+        if (item.indexOf(condition) !== -1) {
+          const result = dircList.find((v) => {
+            if (v.name == target[item].parentLayer && v.layerType == target[item].type) return v
+          })
+          this.selectTarget = {
+            layerId: result.id,
+            prjId: attributes['PRJ_ID'],
+            partsCode: attributes['PARTS_CODE'],
+            size: 1000
+          }
+        }
+      })
+    },
+    /**
+     * 清除临时对象
+     */
+    clearObjs() {
+      if (gToolTip) {
+        gToolTip.remove()
+        gToolTip = null
+      }
+      if (gInfoWindow) {
+        gInfoWindow.remove()
+        gInfoWindow = null
+        this.AppX.appConfig.infowindow = null
+      }
+      //this.activeCursor(false);
+      if (gTooltipHandler && !gTooltipHandler.isDestroyed()) {
+        gTooltipHandler.destroy()
+        gTooltipHandler = null
+      }
+      this.clearPrimitives()
+      this.clearAllPrimitives()
+    },
+    /**
+     * 该方法用于清除primitivecollection
+     */
+    clearPrimitives() {
+      if (gPrimitiveCollection) {
+        gPrimitiveCollection.removeAll()
+        const isDel = this.viewer.scene.primitives.remove(gPrimitiveCollection)
+        if (isDel) gPrimitiveCollection = null
+      }
+    },
+    /**
+     * 其他模块操作冲突销毁
+     */
+    otherDestroy() {
+      this.clearObjs()
+      gSelectPick = null
+    },
+    /**
+     * 该方法用于生成贴地线图元
+     * @returns groundPolylinePrimitive
+     */
+    generaGroundPolyline(positions, mapname, feature, isPicked) {
+      const fields = Config.fields
+      const pipe = _.find(PipeQueryHelper.pipe, (item) => {
+        return item.mapname === mapname
+      })
+      const id = feature.fieldValues[feature.fieldNames.indexOf(fields.id)]
+      const code =
+        pipe.pipeType === 'SJ'
+          ? feature.fieldValues[feature.fieldNames.indexOf(fields.pbs)]
+          : feature.fieldValues[feature.fieldNames.indexOf(fields.pipeID)]
+      const pipeId = feature.fieldValues[feature.fieldNames.indexOf(fields.pipeID)]
+      const color = isPicked
+        ? new Cesium.ColorGeometryInstanceAttribute(1.0, 0.5, 0.0, 1.0)
+        : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5)
+      const instance = new Cesium.GeometryInstance({
+        geometry: new Cesium.GroundPolylineGeometry({
+          positions: positions,
+          width: 15.0
+        }),
+        attributes: {
+          color: color
+        },
+        id: code
+      })
+      const polyline = new Cesium.GroundPolylinePrimitive({
+        geometryInstances: instance,
+        // appearance: new Cesium.MaterialAppearance({
+        //     material: material,
+        //     faceForward: true,
+        //     flat: true
+        // }),
+        appearance: new Cesium.PolylineColorAppearance(),
+        classificationType: Cesium.ClassificationType.TERRAIN
+      })
+      let sql = ''
+      if (pipe.pipeType === 'SJ') {
+        sql = fields.pbs + "='" + code + "'"
+      } else {
+        sql = fields.pipeID + "='" + code + "'"
+      }
+      polyline.custom = { tablename: pipe.origindataset, sql: sql }
+      return polyline
+    },
+    /**
+     * 该方法用于生成贴地圆图元
+     * @returns groundPolylinePrimitive
+     */
+    generaGroundCircle(center, radius, axis, mapname, feature, isPicked) {
+      const fields = Config.fields
+      const pipe = _.find(PipeQueryHelper.pipe, (item) => {
+        return item.mapname === mapname
+      })
+      const id = feature.fieldValues[feature.fieldNames.indexOf(fields.id)]
+      const code =
+        pipe.pipeType === 'SJ'
+          ? feature.fieldValues[feature.fieldNames.indexOf(fields.pbs)]
+          : feature.fieldValues[feature.fieldNames.indexOf(fields.pipeID)]
+      const pipeId = feature.fieldValues[feature.fieldNames.indexOf(fields.pipeID)]
+      const color = isPicked
+        ? new Cesium.ColorGeometryInstanceAttribute(1.0, 0.5, 0.0, 1.0)
+        : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5)
+      const instance = new Cesium.GeometryInstance({
+        geometry: new Cesium.EllipseGeometry({
+          center: center,
+          semiMajorAxis: axis,
+          semiMinorAxis: axis,
+          height: 100
+        }),
+        attributes: {
+          color: color
+        },
+        id: code
+      })
+      const circle = new Cesium.GroundPrimitive({
+        geometryInstances: instance
+      })
+      let sql = ''
+      if (pipe.pipeType === 'SJ') {
+        sql = fields.pbs + "='" + code + "'"
+      } else {
+        sql = fields.pipeID + "='" + code + "'"
+      }
+      circle.custom = { tablename: pipe.origindataset, sql: sql }
+      return circle
+    },
+    /**
+     * 贴地线
+     * @param positions
+     * @returns
+     */
+    GroundPolyline(positions) {
+      const instance = new Cesium.GeometryInstance({
+        geometry: new Cesium.GroundPolylineGeometry({
+          positions: positions,
+          width: 15.0
+        }),
+        attributes: {
+          color: new Cesium.ColorGeometryInstanceAttribute(1.0, 0.5, 0.0, 1)
+        }
+      })
+      const polyline = new Cesium.GroundPolylinePrimitive({
+        geometryInstances: instance,
+        appearance: new Cesium.PolylineColorAppearance(),
+        classificationType: Cesium.ClassificationType.TERRAIN
+      })
+      return polyline
+    },
+    /**
+     * 该方法用于生成贴地圆图元
+     * @returns groundPolylinePrimitive
+     */
+    GroundCircle(center, radius, axis, feature, isPicked) {
+      // const fields = Config.fields;
+      // const id = feature.fieldValues[feature.fieldNames.indexOf(fields.id)];
+      // const code = feature.fieldValues[feature.fieldNames.indexOf(fields.pbs)];
+      // const pipeId = feature.fieldValues[feature.fieldNames.indexOf(fields.pipeID)];
+      const color = isPicked
+        ? new Cesium.ColorGeometryInstanceAttribute(1.0, 0.5, 0.0, 1.0)
+        : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5)
+      const instance = new Cesium.GeometryInstance({
+        geometry: new Cesium.EllipseGeometry({
+          center: center,
+          semiMajorAxis: axis,
+          semiMinorAxis: axis,
+          height: 100
+        }),
+        attributes: {
+          color: color
+        }
+        //id: code
+      })
+      const circle = new Cesium.GroundPrimitive({
+        geometryInstances: instance
+      })
+      //circle.custom = { id: id, pipeId: pipeId };
+      return circle
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.widget-pipeunitnowinfo {
+  height: 100%;
+  overflow-y: auto;
+  .item {
+    position: relative;
+    width: 95%;
+    //padding: 14px 0px 0px 10px;
+    display: flex;
+    align-items: center;
+    padding: 5px;
+
+    span.value {
+      flex: 0.6;
+      display: inline-block;
+      position: relative;
+      white-space: nowrap;
+      overflow: hidden;
+      color: black;
+      border: none;
+    }
+    span.title {
+      flex: 0.4;
+      display: block;
+      text-align: right;
+      white-space: nowrap;
+      overflow: hidden;
+      color: #888888;
+      padding: 6px;
+      position: relative;
+      float: left;
+    }
+  }
+}
+</style>
+<style lang="scss">
+.bubblewindow {
+  max-width: unset;
+  max-height: unset;
+  height: 394px;
+  width: 440px;
+
+  .bubblecontent {
+    overflow: hidden;
+    background-color: #fff;
+  }
+}
+
+.bubblewindow:after {
+  left: 216px;
+}
+</style>