Przeglądaj źródła

feat:1、新增八大系统主要设备维保事项-》重要维保事项列表,以及逻辑跳转
2、新增日常维保项筛选,查看详情功能。

zhangjiaqi 3 lat temu
rodzic
commit
50ba477d82

+ 8 - 0
public/index.html

@@ -158,6 +158,14 @@
             font-size: 12px;
             color: #F54E45;
         }
+        .p-drop-box-multiple{
+            max-height: 400px !important;
+            height: 290px !important;
+        }
+        .p-drop-box-multiple .p-drop-box-list{
+            max-height: 400px !important;
+            height: 290px !important;
+        }
     </style>
     <script>
         var remHandle = function () {

+ 122 - 0
src/api/coreDeviceReport.js

@@ -38,3 +38,125 @@ export function queryHistoryTableData(url, getParams) {
 export function queryDetailData(url, getParams) {
     return httputils.getJson(url, getParams)
 }
+//核心设备报表
+export function queryFxbbList({ postParams }) {
+    return new Promise(resolve => {
+        resolve({
+            data: [
+                {
+                  //类型:Object  必有字段  备注:无
+                  num: 1, //类型:Number  必有字段  备注:序号
+                  equipmentName: "排烟风机-2-2", //类型:String  必有字段  备注:"排烟风机-2-2",
+                  equipmentCode: "1009", //类型:String  必有字段  备注:"1009",
+                  testResult: 10, //类型:String  必有字段  备注:"强检合格",//检测结果
+                  importantTestImg: [
+                    //类型:Array  必有字段  备注:无
+                    {
+                      //类型:Object  必有字段  备注:无
+                      id:'1',
+                      url: "https://cn.vuejs.org/images/dcloud1.png", //类型:String  必有字段  备注:无
+                      name: "dcloud1.png" //类型:String  必有字段  备注:无
+                    },
+                    {
+                      //类型:Object  必有字段  备注:无
+                      id:'2',
+                      url: "https://cn.vuejs.org/images/logo.png", //类型:String  必有字段  备注:无
+                      name: "vue.png" //类型:String  必有字段  备注:无
+                    }
+                  ],
+                  importantTestFile: [],
+                  currentStatus: 1, //类型:String  必有字段  备注://当前状态
+                  importantWbTime:1615865312160, //类型:String  必有字段  备注:,//最近一次重要维保完成时间
+                  importantWbTaskCode: "mock", //类型:String  必有字段  备注:/最近一次重要维保任务编号
+                  importantWbimg: [
+                    //类型:Array  必有字段  备注:最近一次重要维保
+                    {
+                        id:3,
+                      //类型:Object  必有字段  备注:无
+                      name: "mock", //类型:String  必有字段  备注:无
+                      url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng", //类型:String  必有字段  备注:无
+                      wbName: "mock", //类型:String  必有字段  备注:维保项名称
+                      checkStatus: "mock", //类型:String  必有字段  备注:维保结果
+                      wxResult: "mock", //类型:String  必有字段  备注:无
+                      childimg: [
+                        //类型:Array  必有字段  备注:维保完工
+                        {
+                          //类型:Object  必有字段  备注:无
+                          name: "mock", //类型:String  必有字段  备注:完工照片名称
+                          url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:完工照片地址
+                        }
+                      ]
+                    }
+                  ],
+                  importantWxTime: 1615865312160, //类型:String  必有字段  备注:/最近一次重要维修完成时间
+                  importantWxTaskCode: "mock", //类型:String  必有字段  备注:/最近一次重要维修任务编号
+                  importantWximg: [
+                    //类型:Array  必有字段  备注:无
+                    {
+                        id:3,
+                      //类型:Object  必有字段  备注:无
+                      name: "mock", //类型:String  必有字段  备注:最近一次重要维修报修照片名称
+                      url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:最近一次重要维修报修照片地址
+                    }
+                  ],
+                  importantWxWcImg: [
+                    //类型:Array  必有字段  备注:最新一次重要维修完工照片
+                    {
+                        id:3,
+                      //类型:Object  必有字段  备注:无
+                      name: "mock", //类型:String  必有字段  备注:名字
+                      url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:地址
+                    }
+                  ],
+                  importantZwTime: 1615865312160, //类型:String  必有字段  备注:最近一次专维完成时间
+                  importantZwTaskCode: "mock", //类型:String  必有字段  备注:最近一次专维任务编号
+                  importantZwWcImg: [
+                    //类型:Array  必有字段  备注:无
+                    {
+                      //类型:Object  必有字段  备注:无
+                      id:3,
+                      name: "mock", //类型:String  必有字段  备注:无
+                      url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:无
+                    }
+                  ]
+                }
+              ]
+        })
+    })
+    return httputils.postJson(`/data/sms_asset/query`, postParams)
+}
+//核心设备报表头部筛选
+export function queryFxbbOrderArray() {
+    return new Promise((resolve,reject) => {
+        resolve({
+            "result":"success",                //类型:String  可有字段  备注:无
+            // "data":  {                //类型:Object  必有字段  备注:无
+                "currentStatus": [                //类型:Array  必有字段  备注:无
+                     {                //类型:Object  必有字段  备注:无
+                        "id":"1",                //类型:String  必有字段  备注:无
+                        "name":"正常使用"                //类型:String  必有字段  备注:无
+                    },
+                    {                //类型:Object  必有字段  备注:无
+                        "id":"2",                //类型:String  必有字段  备注:无
+                        "name":"维修中"                //类型:String  必有字段  备注:无
+                    }
+                ],
+                "mainCheckResult":  [                //类型:Array  必有字段  备注:无
+                      {                //类型:Object  必有字段  备注:无
+                        "id":"10",                //类型:String  必有字段  备注:无
+                        "name":"强检合格"                //类型:String  必有字段  备注:无
+                    },
+                    {                //类型:Object  必有字段  备注:无
+                        "id":"11",                //类型:String  必有字段  备注:无
+                        "name":"无强检及供方维保要求"                //类型:String  必有字段  备注:无
+                    },
+                    {                //类型:Object  必有字段  备注:无
+                        "id":"12",                //类型:String  必有字段  备注:无
+                        "name":"强检不合格"                //类型:String  必有字段  备注:无
+                    }
+                ]
+            // }
+        })
+    })
+    return httputils.postJson(`/data/statusCode/query`)
+}

+ 12 - 0
src/api/room.js

@@ -50,3 +50,15 @@ export function queryWb({ getParams }) {
 export function querySystem({ getParams }) {
     return httputils.getJson(`/data/t_system_wzfl/querySystem`, getParams)
 }
+//查询设备树
+export function querySblist({ postParams }) {
+    return httputils.postJson(`/data/sms_wbzy/queryEquipmentTree`, postParams)
+}
+//日常维保事项列表
+export function queryWblist({ postParams }) {
+    return httputils.postJson(`/data/sms_wbzy/queryList`, postParams)
+}
+//日常维保事项列表详情
+export function queryWbDetail({ postParams }) {
+    return httputils.postJson(`/data/sms_wbzy/queryMetterDetails`, postParams)
+}

+ 2 - 0
src/components/PicLarge/src/picLarge.vue

@@ -70,6 +70,7 @@ export default {
             ]
          */
         handleData(data) {
+            // debugger
             let patternFileExtension = /\.([0-9a-z]+)(?:[\?#]|$)/i
             data = data.map(item => {
                 let type = item.name.match(patternFileExtension)[1]
@@ -80,6 +81,7 @@ export default {
                 }
                 return obj
             })
+            // debugger
             this.imgUrl = data
         }
     },

+ 40 - 0
src/utils/plugins/components.js

@@ -41,6 +41,11 @@ var system = [
                     id: 'GDWB',
                     children: [
                         {
+                            label: '重要维保事项列表',
+                            id: 'ZYWBP',
+                            param: { tab_code: '1595', diff: 'in', wznw: '内', apply: '维修维保' },
+                        },
+                        {
                             label: '配电室内重要维保',
                             id: 'GDWB1',
                             param: { tab_code: '1592', diff: 'in', wznw: '内', apply: '维修维保' },
@@ -156,6 +161,11 @@ var system = [
                     label: '主要设备维保事项',
                     children: [
                         {
+                            label: '重要维保事项列表',
+                            id: 'ZYWBP',
+                            param: { tab_code: '1595', diff: 'in', wznw: '内', apply: '维修维保' },
+                        },
+                        {
                             label: '冷源机房内重要维保',
                             id: 'NTWB1',
                             param: { tab_code: '1592', diff: 'in', wznw: '内', apply: '维修维保' },
@@ -268,6 +278,11 @@ var system = [
                     id: 'XFWB',
                     children: [
                         {
+                            label: '重要维保事项列表',
+                            id: 'ZYWBP',
+                            param: { tab_code: '1595', diff: 'in', wznw: '内', apply: '维修维保' },
+                        },
+                        {
                             label: '中控室/消防泵房内重要维保',
                             id: 'XFWB1',
                             param: { tab_code: '1573', diff: 'in', wznw: '内', apply: '维修维保' },
@@ -384,6 +399,11 @@ var system = [
                     id: 'RDWB',
                     children: [
                         {
+                            label: '重要维保事项列表',
+                            id: 'ZYWBP',
+                            param: { tab_code: '1595', diff: 'in', wznw: '内', apply: '维修维保' },
+                        },
+                        {
                             label: '慧云机房内重要维保',
                             id: 'RDWB1',
                             param: { tab_code: '1592', diff: 'in', wznw: '内', apply: '维修维保' },
@@ -480,6 +500,11 @@ var system = [
                     id: 'GSWB',
                     children: [
                         {
+                            label: '重要维保事项列表',
+                            id: 'ZYWBP',
+                            param: { tab_code: '1595', diff: 'in', wznw: '内', apply: '维修维保' },
+                        },
+                        {
                             label: '给水系统重要维保',
                             id: 'GSWB1',
                             param: { tab_code: 'gps01', diff: 'gs', difference: '给水', wznw: '内', apply: '维修维保' },
@@ -581,6 +606,11 @@ var system = [
                     id: 'DTWB',
                     children: [
                         {
+                            label: '重要维保事项列表',
+                            id: 'ZYWBP',
+                            param: { tab_code: '1595', wznw: '0', apply: '维修维保' },
+                        },
+                        {
                             label: '重要维保事项',
                             id: 'DTWB1',
                             param: { tab_code: 'dt01', wznw: '0', apply: '维修维保' },
@@ -657,6 +687,11 @@ var system = [
                     id: 'RQWB',
                     children: [
                         {
+                            label: '重要维保事项列表',
+                            id: 'ZYWBP',
+                            param: { tab_code: '1595', wznw: '0', apply: '维修维保' },
+                        },
+                        {
                             label: '重要维保事项',
                             id: 'RQWB1',
                             param: { tab_code: '1592', wznw: '0', apply: '维修维保' },
@@ -753,6 +788,11 @@ var system = [
                     id: 'TJWB',
                     children: [
                         {
+                            label: '重要维保事项列表',
+                            id: 'ZYWBP',
+                            param: { tab_code: '1595', wznw: '0', apply: '维修维保' },
+                        },
+                        {
                             label: '重要维保事项',
                             id: 'TJWB1',
                             param: { tab_code: '1592', wznw: '0', apply: '维修维保' },

Plik diff jest za duży
+ 688 - 106
src/views/analysis/CoreDeviceReport.vue


+ 800 - 0
src/views/analysis/CoreDeviceReportBank.vue

@@ -0,0 +1,800 @@
+<!-- 核心设备报表 -->
+<template>
+  <div class="core-device-report">
+    <div class="main-left">
+      <Select
+        class="system-select"
+        width="217"
+        :isReadOnly="true"
+        tipPlace="top"
+        caption="系统名称:"
+        @change="changeCurSystem"
+        v-model="systemId"
+        :selectdata="systemList"
+        :placeholder="'请选择'"
+        hideClear
+      />
+      <div class="system-content">
+        <div
+          v-for="(item) in systemContentData"
+          :key="'key_' + item.category_code"
+          class="item-content"
+          :class="{'active': item.isActive}"
+          @click="changeEquipment(item.category_code)"
+        >
+          <div class="first-row">
+            <div>{{item.name}}</div>
+            <div>{{item.isMaintenance?'维保中' : ''}}</div>
+          </div>
+          <div class="sec-row">
+            <div>
+              {{item.num}}
+              <span>{{systemId !== '1008'?'台' : item.unitText}}</span>
+            </div>
+            <span :class="{'abnormal': item.abnormal}">{{item.statusNum !== 0?item.statusNum : ''}}</span>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="main-right">
+      <div class="search-container">
+        <Input
+          iconType="search"
+          v-model="searchKey"
+          placeholder="搜索"
+          width="192"
+          @pressEnter="getTableData"
+          @clear="getTableData"
+        />
+      </div>
+      <el-table
+        :data="tableData"
+        style="width: 100%;margin-bottom: 63px;"
+        @row-click="showEquipmentStatus"
+      >
+        <el-table-column label="序号" prop="index" width="60"></el-table-column>
+        <el-table-column prop="sbjc" label="设备名称" width="600"></el-table-column>
+        <el-table-column prop="assetnum" label="设备内码"></el-table-column>
+        <el-table-column prop="is_exception" label="状态">
+          <template slot-scope="scope">
+            <span
+              style="display: inline-block;width: 6px;height:6px;border-radius: 3px;background: #0091FF;"
+              :style="{'background': !scope.row.is_exception?'#0091FF' : '#F54E45'}"
+            ></span>
+            <span style="margin-left: 10px">{{ !scope.row.is_exception?'正常' : '异常' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="photos_num" label="照片">
+          <template slot-scope="scope">
+            <span
+              style="color: #025BAA"
+              :style="{'cursor': scope.row.photos_num?'pointer' : 'default'}"
+              @click="showPicturesDetail(scope.row, 'equip')"
+            >{{ scope.row.photos_num?(scope.row.photos_num + '张') : '—' }}</span>
+            <!-- <span style="color: #025BAA" @click="showPicturesDetail(scope.row)">1张</span> -->
+          </template>
+        </el-table-column>
+        <el-table-column prop="attachments_num" label="报告">
+          <template slot-scope="scope">
+            <span
+              style="color: #025BAA"
+              :style="{'cursor': scope.row.attachments_num?'pointer' : 'default'}"
+              @click="(e) => showReportDetail(scope.row, 'equip', e)"
+            >{{ scope.row.attachments_num?(scope.row.attachments_num+ '张') : '—'}}</span>
+            <!-- <span style="color: #025BAA" @click="(e) => showReportDetail(scope.row, 'equip', e)">1张</span> -->
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="page">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :total="tatol"
+          :current-page="curPage"
+          :page-size="pageSize"
+          @current-change="changeTablePage"
+        ></el-pagination>
+      </div>
+      <el-dialog :title="equipTitle" :visible.sync="dialogTableVisible" width="1260px">
+        <el-date-picker
+          style="margin-bottom: 12px;"
+          v-model="dialogTime"
+          type="daterange"
+          range-separator="至"
+          @change="changeTime"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+        <el-table :data="historyTableData" style="margin-bottom: 55px;" max-height="500">
+          <el-table-column width="200" property="finishDate" label="日期"></el-table-column>
+          <el-table-column width="100" property="typeName" label="事项类型"></el-table-column>
+          <el-table-column property="taskName" label="事项名称"></el-table-column>
+          <el-table-column width="100" property="photosNum" label="照片">
+            <template slot-scope="scope">
+              <span
+                style="color: #025BAA"
+                :style="{'cursor': scope.row.photosNum?'pointer' : 'default'}"
+                @click="showPicturesDetail(scope.row, 'his')"
+              >{{ scope.row.photosNum?(scope.row.photosNum + '张') : '—' }}</span>
+              <!-- <span style="color: #025BAA" @click="showPicturesDetail(scope.row)">1张</span> -->
+            </template>
+          </el-table-column>
+          <el-table-column width="100" property="attachmentsNum" label="报告">
+            <template slot-scope="scope">
+              <span
+                style="color: #025BAA"
+                :style="{'cursor': scope.row.attachmentsNum?'pointer' : 'default'}"
+                @click="(e) => showReportDetail(scope.row, 'his', e)"
+              >{{ scope.row.attachmentsNum?(scope.row.attachmentsNum+ '张') : '—'}}</span>
+              <!-- <span style="color: #025BAA" @click="(e) => showReportDetail(scope.row, 'his', e)">1张</span> -->
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="page">
+          <el-pagination
+            background
+            layout="prev, pager, next"
+            :current-page="hisCurPage"
+            :page-size="hisPageSize"
+            :total="hisTotal"
+            @current-change="changeHisTablePage"
+          ></el-pagination>
+        </div>
+      </el-dialog>
+      <div class="img-detail-container">
+        <el-dialog :title="detailTitle" :visible.sync="showDetail" width="1260px">
+          <div class="detail-container">
+            <div class="pictures-menu">
+              <div
+                v-for="(item) in pictureList"
+                :key="'id_' + item.id"
+                class="item"
+                @click="changeCurImg(item.id)"
+                :class="{'active': item.isActive}"
+              >
+                <img :src="item.url" alt />
+                <div class="name" :title="item.name">{{item.name}}</div>
+              </div>
+            </div>
+            <div class="cur-img-container">
+              <img v-if="curImg.url" :src="curImg.url" alt />
+            </div>
+          </div>
+        </el-dialog>
+      </div>
+    </div>
+    <div
+      v-show="showAccessory"
+      class="accessory-container"
+      :style="{'top': accessoryPos.top + 'px', 'left': accessoryPos.left + 'px'}"
+    >
+      <div v-for="(item) in accessoryList" :key="'id_' + item.id">
+        <a :href="item.url" target="_blank" :title="item.name">{{item.name}}</a>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { Select, Input } from "meri-design";
+import {
+  querySystemList,
+  queryEquipmentList,
+  queryTableData,
+  queryHistoryTableData,
+  queryDetailData,
+} from "../../api/coreDeviceReport";
+import _ from "lodash";
+import moment from "moment";
+export default {
+  data() {
+    return {
+      plazaId: 1000423, // 广场id
+      systemId: "", // 当前系统Id
+      systemList: [], // 系统
+      systemContentData: [
+        // {id: 1, name: '高压配电柜', isMaintenance: true, num: 95, statusNum: 0, abnormal: false, isActive: true},
+        // {id: 2, name: '变压器', isMaintenance: false, num: 256, statusNum: 12, abnormal: true, isActive: false},
+        // {id: 3, name: '低压配电柜', isMaintenance: false, num: 354, statusNum: 0, abnormal: false, isActive: false},
+        // {id: 4, name: '直流屏', isMaintenance: false, num: 175, statusNum: 0, abnormal: false, isActive: false},
+        // {id: 5, name: '柴油发电机组', isMaintenance: false, num: 186, status: 0, abnormal: false, isActive: false},
+      ], // 系统下的各种组成
+      searchKey: "", // 搜索关键字
+      tableData: [
+        // {serialNumber: 1, equipmentName: 2, equipmentNumber: 3, status: '正常', photo: 5, report: 6},
+        // {serialNumber: 1, equipmentName: 2, equipmentNumber: 3, status: '异常', photo: 5, report: 6},
+        // {serialNumber: 1, equipmentName: 2, equipmentNumber: 3, status: '正常', photo: 5, report: 6},
+      ], // 表数据
+      curPage: 1, // 当前页码
+      pageSize: 10, // 每页条数
+      tatol: 0, // 总数据
+      dialogTableVisible: false, // 弹窗显示状态
+
+      // 核心设备实例
+      equipTitle: "", // 核心设备弹窗名称
+      assetnum: null, // 设备台账编码
+      historyTableData: [], // 核心设备实例的所有历史事项信息
+      dialogTime: null, // 弹框内的时间
+      hisCurPage: 1, // 当前页码
+      hisPageSize: 8, // 当前页码
+      hisTotal: 0, // 总条数
+      startTime: null, // 开始时间
+      endTime: null, // 结束事件
+
+      showDetail: false, // 显示照片、报告详情
+      detailTitle: "图片预览", // 弹窗名称
+      pictureList: [
+        // {id: 1, url: require('../../assets/images/login_back.png'), name: '图层名称1.jpg'},
+        // {id: 2, url: require('../../assets/images/matter_pop3.png'), name: '图层名称2.jpg'},
+        // {id: 3, url: require('../../assets/images/login_back.png'), name: '图层名称3.jpg'},
+      ], // 图片列表
+      curImg: {}, // 当前图片
+      isClickPicture: false, // 是否点击的是照片
+
+      showAccessory: false, // 附件窗口显示状态
+      isClickAccessory: false, // 是否点击的是附件
+      accessoryList: [], // 附件
+      accessoryPos: {
+        top: 0,
+        left: 0,
+      }, // 附件弹窗位置
+    };
+  },
+
+  components: {
+    Select,
+    Input,
+  },
+
+  computed: {},
+
+  beforeMount() {
+    let PLAZAID = localStorage.getItem("PLAZAID");
+    this.plazaId = Number(PLAZAID) || 1000423;
+  },
+  mounted() {
+    document.addEventListener("click", () => {
+      setTimeout(() => {
+        if (this.isClickAccessory) {
+          this.isClickAccessory = false;
+          return;
+        }
+        this.showAccessory = false;
+      }, 20);
+    });
+    this.getSystemList();
+  },
+
+  methods: {
+    /**
+     * 获取系统列表数据
+     */
+    getSystemList() {
+      querySystemList().then((res) => {
+        if (res.result === "success") {
+          let data = res.data;
+          let newData = [];
+          _.forEach(data, (item) => {
+            newData.push({
+              id: item.code,
+              name: item.name,
+            });
+          });
+          this.systemList = newData;
+          const { query } = this.$route;
+          if (!_.isEmpty(query)) {
+            this.systemId = query.smsxt || newData[0].id;
+          } else {
+            this.systemId = newData[0].id;
+          }
+          this.getEquipmentOfSystem();
+        }
+      });
+    },
+    /**
+     * 切换系统名称
+     */
+    changeCurSystem(val) {
+      console.log("val", val);
+      this.curPage = 1;
+      this.getEquipmentOfSystem();
+    },
+    /**
+     * 获取系统下的设备
+     */
+    getEquipmentOfSystem() {
+      let param = {
+        plazaId: this.plazaId,
+      };
+      if (this.systemId !== "") {
+        param.smsxt = this.systemId;
+      }
+      queryEquipmentList("/data/home/querySystemCard", param).then((res) => {
+        const { result, data } = res;
+        if (result === "success") {
+          let newData = [],
+            abnormalList = [];
+          if (!data[0].assetTypeList) {
+            this.tableData = [];
+            this.systemContentData = [];
+            this.curPage = 1;
+            this.tatol = 0;
+            return;
+          }
+          _.forEach(data[0].assetTypeList, (item, index) => {
+            let itemData = {
+              name: item.category_name,
+              isMaintenance: item.is_detecting,
+              statusNum:
+                item.category_code !== "rdd" && item.category_code !== "rqa"
+                  ? item.is_exception_num
+                  : item.is_exception_workorder_num,
+              num: item.asset_num,
+              abnormal: item.is_exception_num !== 0,
+              category_code: item.category_code,
+            };
+            if (!item.category_code) {
+              console.error("without category_code..", item);
+            }
+            if (item.is_exception_num === 0) {
+              newData.push(itemData);
+            } else {
+              abnormalList.push(itemData);
+            }
+          });
+          newData = abnormalList.concat(newData);
+          _.map(newData, (o, i) => {
+            return (o.isActive = i === 0);
+          });
+          const { query } = this.$route;
+          _.forEach(newData, (item) => {
+            if (item.category_code === "tja") {
+              item.unitText = "个";
+            } else if (item.category_code === "tjb") {
+              item.unitText = "段";
+            } else {
+              item.unitText = "台";
+            }
+          });
+          this.systemContentData = newData;
+          if (!_.isEmpty(query) && query.equipId) {
+            _.map(this.systemContentData, (o) => {
+              return (o.isActive = o.category_code == query.equipId);
+            });
+          }
+          this.getTableData();
+        }
+      });
+    },
+    /**
+     * 切换系统下的设备
+     */
+    changeEquipment(id) {
+      this.curPage = 1;
+      _.map(this.systemContentData, (o) => {
+        return (o.isActive = o.category_code === id);
+      });
+      this.getTableData();
+    },
+    /**
+     * 获取表数据
+     */
+    getTableData() {
+      let query = {
+        category_code: _.find(this.systemContentData, (o) => {
+          return o.isActive;
+        }).category_code,
+      };
+      let url = `/data/sms_asset/query?plazaId=${this.plazaId}&page=${this.curPage}&size=${this.pageSize}&orderBy=is_exception,0`;
+      if (_.trim(this.searchKey) !== "") {
+        url = `${url}&keyword=${this.searchKey}:sbjc,sbjbm`;
+      }
+      queryTableData(url, query).then((res) => {
+        const { result, count, data } = res;
+        if (result === "success") {
+          this.tatol = count;
+          this.tableData = data;
+          _.forEach(this.tableData, (item, index) => {
+            item.index = (this.curPage - 1) * this.pageSize + index + 1;
+          });
+        }
+      });
+    },
+    /**
+     * 表第一列序号
+     */
+    indexMethod(index) {
+      return index + 1;
+    },
+    /**
+     * 切换页码
+     */
+    changeTablePage(page) {
+      this.curPage = page;
+      this.getTableData();
+    },
+    /**
+     * 显示设备实例的维保、专维等状态
+     */
+    showEquipmentStatus(row, column, e) {
+      let ins = this;
+      setTimeout(() => {
+        ins.hisCurPage = 1;
+        if (ins.showDetail || ins.showAccessory) {
+          return;
+        }
+        if (ins.isClickPicture) {
+          ins.isClickPicture = false;
+          return;
+        }
+        ins.equipTitle = row.sbjc;
+        ins.dialogTableVisible = true;
+        ins.assetnum = row.assetnum;
+        ins.initTimePicker();
+      }, 36);
+    },
+    /**
+     * 获取核心设备实例的所有历史事项信息
+     */
+    getEquipmentHistoryMsg() {
+      this.historyTableData = [];
+      let param = {
+        page: this.hisCurPage,
+        size: this.hisPageSize,
+        plazaId: this.plazaId,
+        assetnum: this.assetnum,
+        // assetnum: 24071,
+        startDate: this.startTime,
+        // startDate: 20000101000000,
+        endDate: this.endTime,
+        // endDate: 20200201000000
+      };
+      queryHistoryTableData("/data/base/queryDateByAssetNum", param).then(
+        (res) => {
+          const { result, data, count } = res;
+          if (result === "success") {
+            this.historyTableData = data;
+            this.hisTotal = count;
+            _.forEach(this.historyTableData, (item) => {
+              let name;
+              switch (item.type) {
+                case 0:
+                  name = "专维";
+                  break;
+                case 1:
+                  name = "维保";
+                  break;
+                case 2:
+                  name = "第三方视图";
+                  break;
+              }
+              item.typeName = name;
+              item.finishDate = moment
+                .unix(item.finishDate / 1000)
+                .format("YYYY.MM.DD");
+            });
+          }
+        }
+      );
+    },
+    /**
+     * 初始化时间选择器
+     */
+    initTimePicker() {
+      let endTime = new Date(),
+        startTime = new Date(endTime.getTime() - 1000 * 60 * 60 * 24 * 30);
+      this.dialogTime = [startTime, endTime];
+      this.changeTime();
+    },
+    /**
+     * 切换时间
+     */
+    changeTime() {
+      this.hisCurPage = 1;
+      if (this.dialogTime) {
+        this.startTime = moment
+          .unix(new Date(this.dialogTime[0]).getTime() / 1000)
+          .format("YYYYMMDDHHmmss");
+        this.endTime = moment
+          .unix(new Date(this.dialogTime[1]).getTime() / 1000)
+          .format("YYYYMMDDHHmmss");
+      } else {
+        this.initTimePicker();
+      }
+      this.getEquipmentHistoryMsg();
+    },
+    /**
+     * 切换设备台账下所有历史事项信息页码
+     */
+    changeHisTablePage(page) {
+      this.hisCurPage = page;
+      this.getEquipmentHistoryMsg();
+    },
+    /**
+     * 显示图片详情
+     */
+    showPicturesDetail(val, type) {
+      if (type === "equip") {
+        if (!val.photos_num) {
+          this.isClickPicture = true;
+          return;
+        }
+        if (!val.file_type || !val.file_type_id) {
+          return;
+        }
+      } else {
+        if (!val.photosNum) {
+          this.isClickPicture = true;
+          return;
+        }
+      }
+      this.showDetail = true;
+      this.detailTitle = "图片预览";
+      this.getDetailData(val, type);
+    },
+    /**
+     * 显示附件详情
+     */
+    showReportDetail(val, type, e) {
+      if (type === "equip") {
+        if (!val.attachments_num) {
+          this.isClickPicture = true;
+          return;
+        }
+        if (!val.file_type || !val.file_type_id) {
+          return;
+        }
+      } else {
+        if (!val.attachmentsNum) {
+          this.isClickPicture = true;
+          return;
+        }
+      }
+      this.accessoryPos = {
+        top: e.clientY + 5,
+        left: e.clientX - 360 - 5,
+      };
+      this.showAccessory = true;
+      this.isClickAccessory = true;
+      this.detailTitle = "附件预览";
+      this.getDetailData(val, type);
+    },
+    /**
+     * 获取图片/报告详情
+     */
+    getDetailData(val, type) {
+      let param = {
+        assetnum: this.assetnum,
+        plazaId: this.plazaId,
+        file_type: type === "equip" ? val.file_type : val.type,
+        // file_type: 0,
+        file_type_id: type === "equip" ? val.file_type_id : val.id,
+        // file_type_id: this.detailTitle === "图片预览" ?2914 : 1136,
+        // file_type_id: 9886,
+        type: this.detailTitle === "图片预览" ? 0 : 1,
+      };
+      queryDetailData("/data/base/queryFileDetails", param).then((res) => {
+        const { result, data } = res;
+        if (result === "success") {
+          let newData = [];
+          _.forEach(data, (item, index) => {
+            newData.push({
+              id: item.id,
+              url: item.urlname,
+              isActive: index === 0,
+              name: item.description,
+            });
+          });
+          if (this.detailTitle === "图片预览") {
+            this.pictureList = newData;
+            if (this.pictureList.length > 0) {
+              this.curImg = this.pictureList[0];
+            }
+          } else {
+            this.accessoryList = newData;
+          }
+        }
+      });
+    },
+    /**
+     * 切换当前预览大图
+     */
+    changeCurImg(id) {
+      _.map(this.pictureList, (o) => {
+        return (o.isActive = o.id === id);
+      });
+      this.curImg = _.find(this.pictureList, (o) => {
+        return o.isActive;
+      });
+    },
+  },
+};
+</script>
+
+<style lang='less' scoped>
+.core-device-report {
+  display: flex;
+  width: 100%;
+  height: 100%;
+  .main-left {
+    padding-left: 16px;
+    padding-right: 14px;
+    padding-top: 12px;
+    padding-bottom: 12px;
+    width: 247px;
+    border-top: 1px solid #e4e6e7;
+    border-right: 1px solid #e4e6e7;
+    .system-select {
+      margin-bottom: 16px;
+    }
+    .item-content {
+      padding-left: 12px;
+      padding-right: 21px;
+      padding-top: 7px;
+      padding-bottom: 8px;
+      border-bottom: 1px solid #e4e6e7;
+      cursor: pointer;
+      > div {
+        display: flex;
+      }
+      .first-row {
+        margin-bottom: 6px;
+        display: flex;
+        justify-content: space-between;
+        > div:first-child {
+          font-size: 14px;
+          color: #1f2429;
+          line-height: 19px;
+        }
+        > div:nth-of-type(2) {
+          margin-left: 8px;
+          font-size: 12px;
+          color: #cd981d;
+          line-height: 20px;
+        }
+      }
+      .sec-row {
+        margin-bottom: 6px;
+        > div:first-child {
+          font-size: 14px;
+          color: #1f2429;
+          line-height: 19px;
+          > span {
+            font-size: 12px;
+            color: #646c73;
+          }
+        }
+        // >div:nth-of-type(2){
+        //   padding-left: 8px;
+        //   padding-right: 8px;
+        //   font-size: 12px;
+        //   color: #0065B3;
+        //   line-height: 22px;
+        //   background: #E1F2FF;
+        // }
+        .abnormal {
+          margin-left: 11px;
+          padding-left: 3px;
+          padding-right: 3px;
+          font-size: 12px;
+          color: #f54e45 !important;
+          background: #fde3e2 !important;
+          border-radius: 9px;
+        }
+      }
+    }
+    .system-content {
+      .active {
+        background: #e5eef5;
+        border-radius: 2px;
+        .first-row > div:first-child,
+        .sec-row > div {
+          color: #025baa;
+          > span {
+            color: #025baa;
+          }
+        }
+      }
+    }
+  }
+  .main-right {
+    flex: 1;
+    background: #fff;
+    padding-left: 15px;
+    padding-right: 13px;
+    padding-top: 13px;
+    padding-bottom: 25px;
+    overflow: auto;
+    .search-container {
+      margin-bottom: 12px;
+    }
+    .page {
+      display: flex;
+      justify-content: flex-end;
+    }
+  }
+  .el-dialog {
+    min-height: 600px;
+  }
+  .detail-container {
+    display: flex;
+    height: 600px;
+  }
+  .pictures-menu {
+    margin-right: 21px;
+    padding-top: 16px;
+    padding-bottom: 16px;
+    padding-right: 5px;
+    height: 100%;
+    overflow: auto;
+    .item {
+      cursor: pointer;
+      > img {
+        width: 180px;
+        border: 4px solid rgba(245, 246, 247, 1);
+        border-radius: 4px;
+      }
+      .name {
+        width: 180px;
+        font-size: 12px;
+        color: #1f2429;
+        line-height: 16px;
+        margin-top: 12px;
+        text-align: center;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      &:not(:last-of-type) {
+        margin-bottom: 20px;
+      }
+      .active > img {
+        border-color: rgba(31, 35, 41, 0.15);
+      }
+    }
+    .active > img {
+      border-color: rgba(31, 35, 41, 0.15);
+    }
+  }
+  .cur-img-container {
+    padding: 20px;
+    flex: 1;
+    height: 100%;
+    background: #f5f6f7;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    > img {
+      max-width: 730px;
+      max-height: 530px;
+    }
+  }
+  .accessory-container {
+    padding-top: 4px;
+    padding-bottom: 4px;
+    width: 360px;
+    max-height: 166px;
+    overflow: auto;
+    position: fixed;
+    background: #fff;
+    box-shadow: 0px 2px 10px 0px rgba(31, 35, 41, 0.1);
+    border-radius: 2px;
+    border: 1px solid rgba(228, 229, 231, 1);
+    z-index: 5000;
+    > div > a {
+      padding-left: 12px;
+      padding-right: 12px;
+      display: block;
+      height: 38px;
+      font-size: 14px;
+      line-height: 38px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      &:hover {
+        background: #f5f6f7;
+      }
+    }
+  }
+}
+</style>

Plik diff jest za duży
+ 685 - 575
src/views/equipment/eqDialog.vue


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

@@ -401,6 +401,8 @@ export default {
       this.querySmsxt();
     },
     dialogVisible(eve) {
+    //  debugger
+      
       // console.log('dialogVisible')
       // 点击后显示弹窗组件
       // if (eve.label != '查看图纸') {

+ 267 - 0
src/views/equipment/table/mainWbTable.vue

@@ -0,0 +1,267 @@
+<template>
+  <!-- 记录事项 -->
+  <div class="detail-dialog">
+    <!-- <el-dialog :title='`${major}${tabName}记录事项`' width='80%' :visible.sync='visible' style='height:900px;overflow-y:scroll;'> -->
+    <div class="bottom-table" style="height: 100%;">
+      <el-table
+        :data="tableData"
+        :height="tableHeight"
+        :border="true"
+        style="width: 100%; margin-bottom: 12px;"
+        :span-method="objectSpanMethod"
+        v-if="tableData.length > 0"
+      >
+        <el-table-column label="位置" prop width="230" show-overflow-tooltip resizable>
+          <template slot-scope="{ row }">{{ row.smswz || '--' }}</template>
+        </el-table-column>
+        <el-table-column label="设备" width="280" resizable>
+          <template slot-scope="{ row }">{{ row.smsasset || '--' }}</template>
+        </el-table-column>
+        <el-table-column label="记录事项" show-overflow-tooltip resizable>
+          <template slot-scope="{ row , $index }">
+            <p class="p-style" v-for="(item, index) in row.children" :key="item.sn">
+              <span v-if="item.lable==1">{{ index + 1 }}) {{ item.matter }}</span>
+            </p>
+            <p>
+              <span
+                class="morestyle"
+                @click="changeOpensta($index)"
+                v-if="row.showNewlist && row.close"
+              >
+                <i>更多</i>
+                <i v-if="row.close" class="el-icon-caret-bottom"></i>
+              </span>
+            </p>
+            <section>
+              <p class="p-style" v-for="(item, index) in row.children" :key="item.sn">
+                <span v-if="item.lable==2 && !row.close">{{ index + 1 }}) {{ item.matter }}</span>
+              </p>
+            </section>
+            <p>
+              <span
+                class="morestyle"
+                @click="changeOpensta($index)"
+                v-if="row.showNewlist && !row.close"
+              >
+                <i>收起</i>
+                <i class="el-icon-caret-top"></i>
+              </span>
+            </p>
+          </template>
+        </el-table-column>
+        <el-table-column show-overflow-tooltip resizable>
+          <template slot="header" slot-scope="scope">
+            <p>维护结果</p>
+            <p>(本年度内此工作出现次数/此工作涉及到的设备数量)</p>
+          </template>
+          <template slot-scope="{ row }">
+            <p
+              class="p-style"
+              v-for="(item, index) in row.children"
+              @click="goTabs(row,item)"
+              :key="index"
+            >
+              <span class="lastp">
+                <span
+                  v-if="item.lable==1"
+                >{{ item.workNum?item.workNum:'-' }} / {{ item.equipmentNum?item.equipmentNum:'-'}}</span>
+                <span
+                  v-if="item.lable==2 && !row.close"
+                >{{ item.workNum?item.workNum:'-' }} / {{ item.equipmentNum?item.equipmentNum:'-'}}</span>
+              </span>
+            </p>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+import { queryRecord } from "@/api/equipmentList.js";
+
+export default {
+  props: {
+    paramsdata: {
+      type: Array,
+      default: () => {
+        return [];
+      }
+    },
+    smsxt: {
+      type: [Number, String],
+      default: "1002"
+    }
+  },
+  data() {
+    return {
+      visible: false,
+      major: "",
+      tabName: "",
+      tableData: []
+    };
+  },
+  computed: {
+    newparamsdata() {
+      return this.paramsdata.slice(1, this.paramsdata.length - 1).map(item => {
+        return {
+          system_code: this.smsxt,
+          apply: item.param.apply,
+          plazaId: this.$store.state.plazaId,
+          wznw: item.param.wznw,
+          difference: item.param.difference,
+          tab_code: item.param.tab_code
+        };
+      });
+    },
+    tableHeight() {
+      if (window.screen.height <= 768) {
+        return 560;
+      } else {
+        return 800;
+      }
+    },
+    height() {
+      if (window.screen.height <= 768) {
+        return 500;
+      } else {
+        return 600;
+      }
+    }
+  },
+  methods: {
+    changeOpensta(v) {
+      this.tableData[v].close = !this.tableData[v].close;
+    },
+    goTabs(val, val2) {
+      this.$emit("change-table", {
+        tab_code: val.tab_code,
+        from_mainpage: true,
+        smsasset: val.smsasset,
+        marks: val2.matter
+      });
+    },
+    async addGetRecordList() {
+      const result1 = await this.getRecordList(this.newparamsdata[0]);
+      if (this.newparamsdata.length > 1) {
+        const result2 = await this.getRecordList(this.newparamsdata[1]);
+        this.tableData = [...result1, ...result2];
+      } else {
+        this.tableData = [...result1];
+      }
+      // debugger
+      this.tableData.forEach(item => {
+        if (item.children && item.children.length > 0) {
+          //判断是否有新增得数据,lable为2 显示更多按钮,全是1不显示
+          if (
+            item.children.some(k => {
+              if (k.lable == 2) {
+                return true;
+              }
+            })
+          ) {
+            item.showNewlist = true;
+            this.$set(item, "close", true);
+          }
+          item.children.sort((a, b) => {
+            return a.lable - b.lable;
+          });
+        }
+      });
+    },
+    open({ system_code, wznw, apply, difference }) {
+      this.visible = true;
+      this.getRecordList({ system_code, wznw, apply, difference });
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+        if (row.col0Count > 0) {
+          return {
+            rowspan: row.col0Count,
+            colspan: 1
+          };
+        }
+        return {
+          rowspan: 0,
+          colspan: 0
+        };
+      }
+    },
+    /**
+     * @param { string } system_code 八大系统code
+     * @param { string } wznw   区分各系统内外(如: 慧云机房内,慧云机房外)
+     * @param { string } apply  事项类型, 含: 维修维保,专维及其
+     */
+    getRecordList(params) {
+      const getParams = { ...params };
+      // 处理给排水
+      if (getParams.difference) {
+        delete getParams.wznw; //不上传内外
+      }
+      if (getParams.wznw == "0" || getParams.wznw == "-1") {
+        delete getParams.wznw; //不上传内外
+      }
+      return new Promise((resolve, reject) => {
+        queryRecord({ getParams })
+          .then(res => {
+            const tableData = [];
+            res.data.forEach(i => {
+              i.children.forEach((j, index) => {
+                tableData.push({
+                  tab_code: params.tab_code,
+                  tableType: getParams.wznw,
+                  smswz: i.smswz,
+                  smsasset: j.smsasset,
+                  col0Count: index === 0 ? i.children.length : 0,
+                  children: j.children
+                });
+              });
+            });
+            resolve(tableData);
+          })
+          .catch(err => {
+            console.log(err);
+            reject(err);
+          });
+      });
+    }
+  },
+  mounted() {
+    this.addGetRecordList();
+  }
+};
+</script>
+<style lang="less" scoped>
+.morestyle {
+  color: #025baa;
+  margin-left: 10px;
+  cursor: pointer;
+  i {
+    color: #025baa;
+  }
+}
+.lastp {
+  cursor: pointer;
+}
+</style>
+<style lang="less">
+.detail-dialog {
+  .el-dialog__wrapper {
+    // overflow: hidden !important;
+  }
+  .el-dialog__header {
+    // background: #fff !important;
+    // color: #909399 !important;
+  }
+  .el-dialog__title {
+    color: #fff !important;
+  }
+  .el-dialog__close {
+    // color: #909399 !important;
+  }
+  /deep/.el-dialog {
+    margin-top: 7vh !important;
+    padding-bottom: 5px;
+    // overflow-y: scroll !important;
+  }
+}
+</style>

+ 602 - 0
src/views/equipment/table/newrcwbTable.vue

@@ -0,0 +1,602 @@
+<!-- 维保 -->
+<template>
+  <div class="rcwb-list">
+    <div class="eq-list-top">
+      <!-- 设备名称筛选 -->
+      <Cascader
+        :key="changeid"
+        :excludeTop="true"
+        v-model="sbdata"
+        @confirm="confirmSel"
+        multiple
+        :data="cascaderData"
+        width="192"
+      ></Cascader>
+       <!-- 任务编号筛选 -->
+      <el-input
+        @keyup.enter.native="pageChanged(1)"
+        @blur="pageChanged(1)"
+        clearable
+        placeholder="搜索任务编号"
+        size="small"
+        prefix-icon="el-icon-search"
+        v-model="rwbh"
+        style="margin:0 12px;width:180px;"
+      ></el-input>
+       <!-- 任务状态筛选 -->
+      <Select
+        @change="pageChanged(1)"
+        width="160"
+        tipPlace="top"
+        v-model="status"
+        caption="任务状态:"
+        v-if="status.length>=0"
+        :selectdata="statusOption"
+        :placeholder="''"
+      ></Select>
+       <!-- 计划开始日期 -->
+      <div class="picker-box" style="margin-left:12px">
+        <span class="picker-span">计划开始日期:</span>
+        <el-date-picker
+          style="width:182px;margin-left:12px"
+          v-model="reportdate"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          @change="pageChanged(1)"
+          size="mini"
+          range-separator="-"
+          start-placeholder
+          end-placeholder
+        ></el-date-picker>
+      </div>
+      <!-- 计划结束日期 -->
+      <div class="picker-box">
+        <span class="picker-span">计划结束日期:</span>
+        <el-date-picker
+          style="width:182px"
+          v-model="complete"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          @change="pageChanged(1)"
+          size="mini"
+          range-separator="-"
+          start-placeholder
+          end-placeholder
+        ></el-date-picker>
+      </div>
+    </div>
+    <div ref="tableBox">
+      <el-table
+        :data="tableData"
+        :border="true"
+        style="width: 100%"
+        v-loading="loading"
+        @sort-change="changeSort"
+        :span-method="objectSpanMethod"
+      >
+        <el-table-column type="index" label="序号" width="70">
+          <template slot-scope="{row}">{{row.orderNum||'--'}}</template>
+        </el-table-column>
+        <el-table-column prop label="设备名称" show-overflow-tooltip resizable min-width="434">
+          <template slot-scope="{row}">{{row.equipmentName||'--'}}</template>
+        </el-table-column>
+        <el-table-column prop label="设备内码" :show-overflow-tooltip="true" width="80">
+          <template slot-scope="{row}">{{row.equipmentCode||'--'}}</template>
+        </el-table-column>
+        <el-table-column prop label="任务编号" :show-overflow-tooltip="true">
+          <template slot-scope="{row}">
+            <div style="cursor:pointer;color: #0091ff;" @click="innerTable(row)">{{row.taskCode||'--'}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop label="维保任务名称" :show-overflow-tooltip="true" min-width="360">
+          <template slot-scope="{row}">
+            <div @click.stop="clickWbrwmc(row)">{{row.taskName || '--'}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop label="任务状态" :show-overflow-tooltip="true">
+          <template slot-scope="{row}">{{row.taskStatus||'--'}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="realStartTime"
+          label="实际开始时间"
+          sortable="custom"
+          :show-overflow-tooltip="true"
+          width="130"
+        >
+          <template slot-scope="{row}">{{row.realStartTime?formatterTime(row.realStartTime):'--'}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="realEndTime"
+          label="实际完成时间"
+          sortable="custom"
+          :show-overflow-tooltip="true"
+          width="130"
+        >
+          <template slot-scope="{row}">{{row.realEndTime?formatterTime(row.realEndTime):'--'}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="executeDays"
+          label="执行耗时(天)"
+          :show-overflow-tooltip="true"
+          min-width="130"
+          sortable="custom"
+        >
+          <template slot-scope="{row}">{{row.executeDays||'--'}}</template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <draw-table
+      :totalcount="drawtotalcount"
+      :showdrawer="showdrawer"
+      @changeDrawer="changeDrawer"
+      @getDetails="theDetails(arguments)"
+      :drawtableData="drawtableData"
+    ></draw-table>
+    <div class="foot">
+      <el-pagination
+        background
+        layout="prev, pager, next"
+        :total="total"
+        :current-page="currentPage"
+        :page-size="size"
+        @prev-click="pageChanged"
+        @next-click="pageChanged"
+        @current-change="pageChanged"
+      ></el-pagination>
+      <pic-large :imgUrl="imgUrl" ref="picLargeOpen"></pic-large>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  queryWb,
+  queryWblist,
+  querySblist,
+  queryWbDetail
+} from "@/api/room.js";
+import { mapGetters } from "vuex";
+import { Select, Cascader, CascaderSearchList } from "meri-design";
+import moment from "moment";
+import inputDialog from "./inputDIalog";
+import { formatterTime, number_format } from "@/utils/format.js";
+import DrawTable from "./rcwbDraw/draw";
+import { querySelect } from "@/api/public.js";
+export default {
+  components: { DrawTable, Select, inputDialog, Cascader, CascaderSearchList },
+  data() {
+    return {
+      loading:true,
+      drawtableData: [], //抽屉表格数据
+      drawtotalcount: 12, //抽屉总条数
+      currentItem: {}, //当前点击的列表
+      showdrawer: false,
+      changeid: 0,
+      sbdata: [],
+      allsbdata: [],
+      cascaderData: [],
+      tableData: [],
+      total: 0,
+      currentPage: 1,
+      reportdate: "",
+      ischange: "全部",
+      // sbjc: "",
+      formatterTime,
+      number_format,
+      changeOption: [
+        {
+          id: "2",
+          name: "全部"
+        }
+      ],
+      id_array: [],
+      id_pos: 0,
+      statusOption: [],
+      status: "全部",
+      rwbh: "",
+      imgUrl: [],
+      allArr: [
+        {
+          id: "全部",
+          name: "全部"
+        }
+      ],
+      matters: "",
+      bill: "",
+      ycgdtbsj: "",
+      complete: "",
+      ycgdyssj: "",
+      count: 0,
+      orderkey:{
+        realStartTime:0,
+        realEndTime:0,
+        executeDays:0
+      }
+    };
+  },
+  props: ["smsxt", "diff", "tabLabel", "size", "assetnum"],
+  computed: {
+    ...mapGetters(["floorSelect", "plazaId"])
+  },
+  methods: {
+    /**
+     * @description 排序方法,
+     * @param {object} 
+     * @return {void}
+     */
+    changeSort(val) {
+      this.orderkey[val.prop] = val.order == 'ascending'?1:0;
+      this.getList();
+    },
+    //获取子组件参数,获取详情
+    theDetails() {
+      let arr = Array.from(arguments[0]);
+      this.getRcDetail(...arr);
+    },
+    //改变抽屉状态
+    changeDrawer(v) {
+      this.showdrawer = v;
+    },
+    /**
+     * @param {Object} 行点击得数据
+     */
+    clickWbrwmc(val) {
+      this.currentItem = val;
+      this.showdrawer = true;
+      this.getRcDetail();
+    },
+    //行点击获取详情数据
+    getRcDetail(pageNum = 1, matterDescribe = "", matterStatus = "") {
+      const postParams = {
+        onlyMainAsset: this.smsxt != "1008" ? true : false,
+        plazaId: this.plazaId, //类型:String  必有字段  备注:项目编码
+        systemCode: this.smsxt, //类型:String  必有字段  备注:系统编码
+        equipmentId: this.currentItem.equipmentCode, //类型:Array  必有字段  备注:设备编码
+        taskCode: this.currentItem.taskCode, //类型:String  必有字段  备注:任务编号
+        matterDescribe: matterDescribe, //类型:String  必有字段  备注:事项描述
+        matterStatus: matterStatus=='全部'?'':matterStatus, //类型:String  必有字段  备注:事项状态
+        pageSize: 10, //类型:Number  必有字段  备注:记录条数
+        pageNum: pageNum //类型:Number  必有字段  备注:页码数
+      };
+      queryWbDetail({ postParams }).then(res => {
+        this.drawtotalcount = res.count;
+        this.drawtableData = res.data ? res.data : [];
+      });
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2) {
+        //   if(columnIndex === 0) {
+        // this.id_array[rowIndex] 取出当前存放行的合并状态
+        const _row = this.id_array[rowIndex];
+        // 判断当前的 列是否需要显示
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+        //   }
+      }
+    },
+    testConfirm() {},
+    confirmSel(val) {
+      console.log("确定按钮回调", val);
+      this.sbdata = [];
+      if (val && val.length > 0) {
+        val.forEach(item => {
+          this.sbdata.push(item.id);
+        });
+        this.getList();
+      }
+    },
+    //序号的方法
+    indexMethod(index) {
+      // const resdata = this.id_array.filter( item => {
+      //     return item
+      // })
+      //   console.log(resdata);
+      // this.count+=1;
+      // this.pageCount.push(index)
+      return 1;
+      // console.log('index',index);
+      // if(index ==0)return 1;
+      //   return (this.currentPage - 1) * this.size + index + 1;
+    },
+    //工单详情
+    innerTable(row) {
+      if (row.apptype == "外委" || row.apptype == "自维") {
+        if (row.taskCode) {
+          window.open(
+            `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`
+          );
+        }
+      } else if (row.apptype == "安全维保") {
+        window.open(
+          `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=AQ_WB_GZGL&uniqueid=${row.wb_gzglid}`
+        );
+      }
+    },
+    // 工单
+    ycgd(row) {
+      if (row.apptype == "外委" || row.apptype == "自维") {
+        if (row.wb_gzglid) {
+          window.open(
+            `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`
+          );
+        }
+      } else if (row.apptype == "安全维保") {
+        window.open(
+          `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`
+        );
+      }
+    },
+    //多余输入框监听
+    confirm(complete, bill, ycgdtbsj, ycgdyssj) {
+      this.complete = complete;
+      this.bill = bill;
+      this.ycgdtbsj = ycgdtbsj;
+      this.ycgdyssj = ycgdyssj;
+      this.pageChanged(1);
+    },
+    pageChanged(page) {
+      this.currentPage = page;
+      this.getList();
+    },
+    // 下拉框数据
+    changeSelect() {
+      this.department = [];
+      let postParams = [
+        {
+          columnName: { status: "status", zt: "zt" },
+          tableName: "sms_wbzy"
+        }
+      ];
+      let data = {
+        plazaId: this.plazaId
+      };
+      if (this.smsxt != "1008") {
+        data.onlyMainAsset = true;
+      }
+      querySelect({ data, postParams }).then(res => {
+        let status = [],
+          zt = [],
+          arr = [],
+          arr1 = [];
+
+        status = res.data.data.sms_wbzy.status
+          ? res.data.data.sms_wbzy.status
+          : [];
+        zt = res.data.data.sms_wbzy.zt ? res.data.data.sms_wbzy.zt : [];
+        if (status.length > 0) {
+          status.forEach(el => {
+            let obj = {
+              id: el.key,
+              name: el.value
+            };
+            arr.push(obj);
+          });
+          this.statusOption = this.allArr.concat(arr);
+        }
+        if (zt.length > 0) {
+          zt.forEach(el => {
+            let obj = {
+              id: el.key,
+              name: el.value
+            };
+            arr1.push(obj);
+          });
+          this.changeOption = this.allArr.concat(arr1);
+        }
+      });
+    },
+    getList() {
+      this.loading = true;
+      const that = this;
+      let postParams = {
+        ...this.orderkey,
+        plazaId: this.plazaId, //类型:String  必有字段  备注:项目编码
+        systemCode: this.smsxt, //类型:String  必有字段  备注:系统编码
+        equipmentId: this.sbdata, //类型:Array  必有字段  备注:设备编码
+        taskCode: this.rwbh, //类型:String  必有字段  备注:任务编码
+        taskStatus: "", //类型:String  必有字段  备注:任务状态
+        pageNum: this.currentPage, //类型:String  必有字段  备注:页码数
+        pageSize: this.size, //类型:String  必有字段  备注:条数
+        onlyMainAsset: this.smsxt != "1008" ? true : false, //类型:Boolean  必有字段  备注:土建装饰为false,其他为true
+        planStartTimeFrom: this.reportdate
+          ? this.reportdate[0] + " 00:00:00"
+          : "",
+        planStartTimeTo: this.reportdate
+          ? moment(this.reportdate[1]).format("YYYY-MM-DD 23:59:59")
+          : "",
+        planEndTimeFrom: this.complete ? this.complete[0] + " 00:00:00" : "",
+        planEndTimeTo: this.complete
+          ? moment(this.complete[1]).format("YYYY-MM-DD 23:59:59")
+          : ""
+      };
+      if (this.status && this.status != "全部") {
+        postParams.taskStatus = this.status;
+      }
+      queryWblist({ postParams }).then(res => {
+        this.total = res.count;
+        this.tableData = res.data ? res.data : [];
+        that.id_init();
+        this.loading = false;
+      });
+    },
+    clickPic(row) {
+      this.imgUrl = [];
+      if (row) {
+        row.forEach(el => {
+          let obj = {
+            name: el.description,
+            url: el.url
+          };
+          this.imgUrl.push(obj);
+        });
+      }
+      this.$refs.picLargeOpen.open(this.imgUrl);
+    },
+    async startMethods() {
+      this.changeSelect();
+      try {
+        await this.getSbList();
+        this.getList();
+      } catch (error) {
+        console.log(error);
+      }
+    },
+    //获取所有设备列表
+    getSbList() {
+      const postParams = {
+        plazaId: this.plazaId, //类型:String  必有字段  备注:项目编码
+        systemId: this.smsxt
+      };
+      return new Promise((resolve, reject) => {
+        querySblist({ postParams }).then(res => {
+          if (res.result == "success" && res.data.length > 0) {
+            this.sbdata = [];
+            this.cascaderData = JSON.parse(
+              JSON.stringify(this.formatTree(res.data))
+            );
+            this.changeid++;
+            resolve();
+          }
+        });
+      });
+    },
+    //格式化后台返回得设备列表,
+    formatTree(arr) {
+      const that = this;
+      arr.forEach(item => {
+        that.$set(item, "title", item.equipmentName);
+        that.$set(item, "id", item.equipmentCode);
+        delete item.equipmentName;
+        delete item.equipmentCode;
+        if (item.children && item.children.length > 0) {
+          item.children.forEach(jtem => {
+            that.sbdata.push(jtem.equipmentCode);
+            that.allsbdata = JSON.parse(JSON.stringify(that.sbdata));
+          });
+          this.formatTree(item.children);
+        }
+      });
+      return arr;
+    },
+    id_init() {
+      this.id_array = [];
+      this.id_pos = 0;
+      for (let i = 0; i < this.tableData.length; i++) {
+        // 如果当 i == 0 说明数据是第一行, 需要重新赋值
+        if (i == 0) {
+          this.id_array.push(1);
+          this.id_pos = 0;
+        }
+        // 说明不是从第一行开始遍历的
+        else {
+          // 判断当前的指定数据是否和之前的指定数据值相同
+          if (
+            this.tableData[i].equipmentCode ==
+            this.tableData[i - 1].equipmentCode
+          ) {
+            // 如果相同就需要将 this.id_array 的数据自加
+            this.id_array[this.id_pos] += 1;
+            // 同时需要将 this.id_array push一个0 表示下一行不用显示
+            this.id_array.push(0);
+          }
+          // 说明 当前的数据和上一行的指定数据不同
+          else {
+            this.id_array.push(1);
+            // 重新给计数器赋值
+            this.id_pos = i;
+          }
+        }
+      }
+    }
+  },
+  watch: {
+    diff(newV, oldV) {
+      if (newV !== oldV) {
+        this.startMethods();
+      }
+    },
+    assetnum(newV, oldV) {
+      if (newV !== oldV) {
+        // this.tabFind()
+        this.startMethods();
+      }
+    },
+    tabLabel(newV, oldV) {
+      if (newV !== oldV) {
+        this.changeSelect();
+        this.startMethods();
+      }
+    },
+    ischange() {
+      this.startMethods();
+    }
+  },
+  mounted() {
+    console.log(DrawTable);
+    this.startMethods();
+  }
+};
+</script>
+<style lang="less" scoped>
+.rcwb-list {
+  .eq-list-top {
+    display: flex;
+    margin-bottom: 12px;
+    .picker-box {
+      display: flex;
+      align-items: center;
+      background: #fff;
+      padding: 0 6px;
+      border: 1px solid #dcdfe6;
+      border-radius: 4px;
+      height: 32px;
+      box-sizing: border-box;
+      margin-right: 12px;
+      .picker-span {
+        margin-right: 6px;
+        color: rgba(0, 0, 0, 0.65);
+      }
+    }
+  }
+  td {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  .foot {
+    height: 32px;
+    display: flex;
+    justify-content: flex-end;
+    margin-top: 28px;
+  }
+}
+</style>
+<style lang="less" >
+.rcwb-list {
+  .picker-box {
+    .el-input__inner {
+      border: none;
+    }
+    .el-range-editor.el-input__inner {
+      padding: 3px 0px;
+    }
+    .el-icon-date {
+      display: none;
+    }
+    .el-range__close-icon {
+      position: absolute;
+      right: 0px;
+      top: 2px;
+    }
+    .el-range-editor--mini .el-range-input {
+      font-size: 14px;
+      color: rgb(31, 36, 41);
+    }
+  }
+  /deep/.el-table td {
+    cursor: pointer;
+  }
+}
+</style>

+ 260 - 0
src/views/equipment/table/rcwbDraw/draw.vue

@@ -0,0 +1,260 @@
+/**
+*@author:Zhangjiaqi
+*@date:2021.03.05
+*@info:日常维保抽屉
+*/
+<template>
+  <div class="drawstyle">
+    <el-drawer :modal="false" title="任务事项详情" :visible.sync="drawer_" direction="rtl" size="50%">
+      <section>
+        <div class="drawsearch">
+          <div>
+            <el-input
+              @keyup.enter.native="pageChanged(1)"
+              @blur="pageChanged(1)"
+              clearable
+              placeholder="搜索事项记录描述"
+              size="small"
+              prefix-icon="el-icon-search"
+              v-model="rwbh"
+              style="margin-right:12px;width:180px;"
+            ></el-input>
+          </div>
+          <div>
+            <Select
+              @change="pageChanged(1)"
+              width="160"
+              tipPlace="top"
+              v-model="status"
+              caption="是否正常:"
+              v-if="status.length>=0"
+              :selectdata="statusOption"
+              :placeholder="''"
+            ></Select>
+          </div>
+        </div>
+      </section>
+      <section>
+        <div class="tablestyle">
+          <el-table :data="drawtableData">
+            <el-table-column prop label="序号" width="55">
+              <template slot-scope="{row}">{{row.orderNum||'--'}}</template>
+            </el-table-column>
+            <el-table-column prop label="核心维保事项记录" :show-overflow-tooltip="true" min-width="225">
+              <template slot-scope="{row}">{{row.matterDescribe||'--'}}</template>
+            </el-table-column>
+            <el-table-column prop label="现场照片" :show-overflow-tooltip="true" width="80">
+              <template slot-scope="{row}">
+                <div
+                  v-if="row.sceneImg"
+                  style="cursor:pointer;color: #0091ff;"
+                  @click.stop="clickPic(row.sceneImg)"
+                >
+                <img class="imgzs" :src="row.sceneImg[0].url" :alt="row.sceneImg[0].description">
+                <span class="imgsl" v-if="row.sceneImg.length>1">...</span>
+                </div>
+                <div v-else>{{'--'}}</div>
+              </template>
+            </el-table-column>
+            <el-table-column prop label="是否正常" :show-overflow-tooltip="true" width="80">
+              <template slot-scope="{row}">{{row.matterStatus||'--'}}</template>
+            </el-table-column>
+            <el-table-column prop label="异常工单编号" :show-overflow-tooltip="true" min-width="110">
+              <template slot-scope="{row}">
+                <div @click="ycgd(row)">{{row.abnormalWorkOrder||'--'}}</div>
+              </template>
+            </el-table-column>
+            <el-table-column prop label="描述" :show-overflow-tooltip="true" width="130">
+              <template slot-scope="{row}">{{row.describe||'--'}}</template>
+            </el-table-column>
+            <el-table-column prop label="填报时间" :show-overflow-tooltip="true" width="130">
+              <template slot-scope="{row}">{{row.submitTime?formatterTime(row.submitTime):'--'}}</template>
+            </el-table-column>
+            <el-table-column prop label="验收时间" :show-overflow-tooltip="true" width="130">
+              <template slot-scope="{row}">{{row.checkTime?formatterTime(row.checkTime):'--'}}</template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </section>
+      <section>
+        <div class="pagestyle">
+          <el-pagination
+            layout="prev, pager, next"
+            :total="totalcount"
+            :current-page="currentPage"
+            :page-size="size"
+            @prev-click="pageChanged"
+            @next-click="pageChanged"
+            @current-change="pageChanged"
+          ></el-pagination>
+        </div>
+      </section>
+    </el-drawer>
+     <pic-large :imgUrl='imgUrl' ref='picLargeOpen'></pic-large>
+  </div>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import { querySelect } from "@/api/public.js";
+export default {
+  name: "rcwbDraw",
+  props: {
+    //总条数
+    totalcount: {
+      type: Number,
+      default: 0
+    },
+    //抽屉显示状态
+    showdrawer: {
+      type: Boolean,
+      default: false
+    },
+    //系统id
+    smsxt: {
+      type: String,
+      default: ""
+    },
+    //表格数据
+    drawtableData: {
+      type: Array,
+      default: () => {
+        return [];
+      }
+    }
+  },
+  data() {
+    return {
+      imgUrl: [],
+      currentPage: 1,
+      size: 10,
+      rwbh: "",
+      status: "",
+      statusOption: [],
+      allArr: [
+        {
+          id: "全部",
+          name: "全部"
+        }
+      ]
+    };
+  },
+  computed: {
+    ...mapGetters(["floorSelect", "plazaId"]),
+    //控制抽屉状态
+    drawer_: {
+      get() {
+        this.rwbh = "";
+        this.status = "";
+        this.currentPage = 1;
+        return this.showdrawer;
+      },
+      set(v) {
+        this.$emit("changeDrawer", v);
+      }
+    }
+  },
+  methods: {
+    /**
+     * @description 点击图片查看大图,调用element本身的查看大图组件
+     * @param {object} 点击的整行数据
+     * @return void
+     */
+    clickPic(row) {
+      this.imgUrl = [];
+      if (row) {
+        row.forEach(el => {
+          let obj = {
+            name: el.description,
+            url: el.url
+          };
+          this.imgUrl.push(obj);
+        });
+      }
+      this.$refs.picLargeOpen.open(this.imgUrl);
+    },
+    //页码改变以及删选条件改变
+    pageChanged(page) {
+      this.$emit("getDetails", page, this.rwbh, this.status);
+    },
+    // 下拉框数据
+    changeSelect() {
+      let postParams = [
+        {
+          columnName: { status: "status", zt: "zt" },
+          tableName: "sms_wbzy"
+        }
+      ];
+      let data = {
+        plazaId: this.plazaId
+      };
+      if (this.smsxt != "1008") {
+        data.onlyMainAsset = true;
+      }
+      querySelect({ data, postParams }).then(res => {
+        let zt = [],
+          arr1 = [];
+        zt = res.data.data.sms_wbzy.zt ? res.data.data.sms_wbzy.zt : [];
+        if (zt.length > 0) {
+          zt.forEach(el => {
+            let obj = {
+              id: el.key,
+              name: el.value
+            };
+            arr1.push(obj);
+          });
+          this.statusOption = this.allArr.concat(arr1);
+        }
+      });
+    }
+  },
+  mounted() {
+    this.changeSelect();
+  },
+  watch: {}
+};
+</script>
+<style lang="less" scoped>
+.drawstyle {
+  .drawsearch {
+    display: flex;
+    margin: 16px 0 16px 16px;
+  }
+  .tablestyle {
+    padding-left: 16px;
+  }
+  .tableimg {
+    width: 40px;
+    height: 26px;
+  }
+  .tabledes {
+    color: #055dab;
+    padding-left: 8px;
+  }
+  .pagestyle {
+    position: fixed;
+    bottom: 20px;
+    right: 20px;
+  }
+  .imgsl{
+    color: rgb(5, 93, 171);
+    padding-left: 5px;
+    vertical-align: text-bottom;
+  }
+  .imgzs{
+    width:40px;
+    height:26px
+  }
+}
+/deep/ .el-drawer__header {
+  border-bottom: 1px solid #e4e5e7;
+  padding: 16px !important;
+  margin-bottom: 0 !important;
+}
+/deep/ .el-drawer__header {
+  span {
+    color: #1f2329;
+    font-size: 16px;
+    font-weight: 500;
+  }
+}
+</style>

+ 417 - 352
src/views/equipment/table/wbTable.vue

@@ -1,377 +1,442 @@
 <!-- 维保 -->
 <template>
-    <div class='wb-list'>
-        <div class='eq-list-top'>
-            <el-input
-                placeholder='搜索设备名称或内码'
-                size='small'
-                @keyup.enter.native='pageChanged(1)'
-                @blur='pageChanged(1)'
-                prefix-icon='el-icon-search'
-                v-model='sbjc'
-                clearable
-                style='width:192px;margin-right:12px'
-            ></el-input>
-            <el-input
-                placeholder='搜索事项类型事项描述'
-                size='small'
-                @keyup.enter.native='pageChanged(1)'
-                @blur='pageChanged(1)'
-                clearable
-                prefix-icon='el-icon-search'
-                v-model='matters'
-                style='width:192px;margin-right:12px'
-            ></el-input>
-            <Select
-                @change='pageChanged(1)'
-                v-model='ischange'
-                style='margin-right:12px'
-                width='220'
-                tipPlace='top'
-                caption='是否更换:'
-                :selectdata='changeOption'
-            ></Select>
-            <!-- placeholder='选择填报时间' -->
-            <div class='picker-box'>
-                <span class='picker-span'>填报日期:</span>
-                <el-date-picker
-                    style='width:190px'
-                    v-model='reportdate'
-                    value-format='yyyyMMdd'
-                    type='daterange'
-                    @change='pageChanged(1)'
-                    size='mini'
-                    range-separator='-'
-                    start-placeholder
-                    end-placeholder
-                ></el-date-picker>
-            </div>
+  <div class="wb-list">
+    <div class="eq-list-top">
+      <el-input
+        placeholder="搜索设备名称或内码"
+        size="small"
+        @keyup.enter.native="pageChanged(1)"
+        @blur="pageChanged(1)"
+        prefix-icon="el-icon-search"
+        v-model="childrensbname"
+        clearable
+        style="width:192px;margin-right:12px"
+      ></el-input>
+      <el-input
+        placeholder="搜索事项类型事项描述"
+        size="small"
+        @keyup.enter.native="pageChanged(1)"
+        @blur="pageChanged(1)"
+        clearable
+        prefix-icon="el-icon-search"
+        v-model="matters"
+        style="width:192px;margin-right:12px"
+      ></el-input>
+      <Select
+        @change="pageChanged(1)"
+        v-model="ischange"
+        style="margin-right:12px"
+        width="220"
+        tipPlace="top"
+        caption="是否更换:"
+        :selectdata="changeOption"
+      ></Select>
+      <!-- placeholder='选择填报时间' -->
+      <div class="picker-box">
+        <span class="picker-span">填报日期:</span>
+        <el-date-picker
+          style="width:190px"
+          v-model="reportdate"
+          value-format="yyyyMMdd"
+          type="daterange"
+          @change="pageChanged(1)"
+          size="mini"
+          range-separator="-"
+          start-placeholder
+          end-placeholder
+        ></el-date-picker>
+      </div>
 
-            <!-- placeholder='选择验收时间' -->
-            <div class='picker-box'>
-                <span class='picker-span'>验收日期:</span>
-                <el-date-picker
-                    style='width:190px'
-                    v-model='sjjssj'
-                    value-format='yyyyMMdd'
-                    type='daterange'
-                    @change='pageChanged(1)'
-                    size='mini'
-                    range-separator='-'
-                    start-placeholder
-                    end-placeholder
-                ></el-date-picker>
-            </div>
-            <input-dialog :type='2' @confirm='confirm'></input-dialog>
-        </div>
-        <div ref='tableBox'>
-            <el-table :data='tableData' :border='true' style='width: 100%' @row-click='innerTable'>
-                <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
-                <el-table-column prop='sbmc' label='设备名称' show-overflow-tooltip resizable width='460'>
-                    <template slot-scope='{row}'>{{row.sbmc || '--'}}</template>
-                </el-table-column>
-                <el-table-column prop='assetnum' label='设备内码' show-overflow-tooltip resizable width='80'>
-                    <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
-                </el-table-column>
-                <el-table-column prop='matters' label='事项类型' width='180' show-overflow-tooltip resizable>
-                    <template slot-scope='{row}'>{{row.matters || '--'}}</template>
-                </el-table-column>
-                <el-table-column prop='description' label='事项描述' show-overflow-tooltip resizable min-width='340'>
-                    <template slot-scope='{row}'>{{row.description || '--'}}</template>
-                </el-table-column>
-                <el-table-column label='更换配件信息' align='center'>
-                    <el-table-column prop='ischangepj' label='是/否更换' width='80'>
-                        <template slot-scope='{row}'>{{row.ismodel==1?'是':(row.ismodel==0?"否" :'--')}}</template>
-                    </el-table-column>
-                    <el-table-column prop='model' label='配件名称型号' width='140' show-overflow-tooltip resizable>
-                        <template slot-scope='{row}'>{{row.model || '--'}}</template>
-                    </el-table-column>
-                    <el-table-column prop='sl' label='数量' width='80' show-overflow-tooltip resizable>
-                        <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
-                    </el-table-column>
-                    <el-table-column prop='cost' label='费用(万元)' show-overflow-tooltip resizable width='80' align='right'>
-                        <template slot-scope='{row}'>{{row.cost || '--'}}</template>
-                    </el-table-column>
-                    <el-table-column prop='source' label='费用出处' show-overflow-tooltip resizable width='100'>
-                        <template slot-scope='{row}'>{{row.source|| '--'}}</template>
-                    </el-table-column>
-                </el-table-column>
-                <el-table-column prop='brand' label='现场照片' width='70'>
-                    <template slot-scope='{row}'>
-                        <div
-                            v-if='row.glsmsImage'
-                            style='cursor:pointer;color: #0091ff;'
-                            @click.stop='clickPic(row.glsmsImage)'
-                        >{{row.glsmsImage.length+'张'}}</div>
-                        <div v-else>{{'--'}}</div>
-                    </template>
-                </el-table-column>
-                <el-table-column prop='reportdate' label='填报时间' width='140'>
-                    <template slot-scope='{row}'>{{row.reportdate?formatterTime(row.reportdate):'--'}}</template>
-                </el-table-column>
-                <el-table-column prop='sjjssj' label='验收时间' width='140'>
-                    <template slot-scope='{row}'>{{row.sjjssj?formatterTime(row.sjjssj): '--'}}</template>
-                </el-table-column>
-                <el-table-column prop='wonum' label='任务编号' show-overflow-tooltip resizable width='90'>
-                    <template slot-scope='{row}'>
-                        <div v-if='row.wb_gzglid' @click.stop='ycgd(row)' style='cursor:pointer;color: #0091ff;'>{{row.wb_gzglid}}</div>
-                        <div v-else>{{'--'}}</div>
-                    </template>
-                </el-table-column>
-            </el-table>
-        </div>
-        <div class='foot'>
-            <el-pagination
-                background
-                layout='prev, pager, next'
-                :total='total'
-                :page-size='size'
-                :current-page='currentPage'
-                @prev-click='pageChanged'
-                @next-click='pageChanged'
-                @current-change='pageChanged'
-            ></el-pagination>
-            <pic-large :imgUrl='imgUrl' ref='picLargeOpen'></pic-large>
-        </div>
+      <!-- placeholder='选择验收时间' -->
+      <div class="picker-box">
+        <span class="picker-span">验收日期:</span>
+        <el-date-picker
+          style="width:190px"
+          v-model="sjjssj"
+          value-format="yyyyMMdd"
+          type="daterange"
+          @change="pageChanged(1)"
+          size="mini"
+          range-separator="-"
+          start-placeholder
+          end-placeholder
+        ></el-date-picker>
+      </div>
+      <div >
+        <el-input
+          placeholder="搜索任务编号"
+          clearable
+          size="small"
+          prefix-icon="el-icon-search"
+          @keyup.enter.native="pageChanged(1)"
+          @blur="pageChanged(1)"
+          v-model="gzglid"
+          style="width:232px;"
+        ></el-input>
+      </div>
+      <!-- <input-dialog :type='2' @confirm='confirm'></input-dialog> -->
     </div>
+    <div ref="tableBox">
+      <el-table :data="tableData" :border="true" style="width: 100%" @row-click="innerTable">
+        <el-table-column type="index" label="序号" width="60" :index="indexMethod"></el-table-column>
+        <el-table-column prop="sbmc" label="设备名称" show-overflow-tooltip resizable width="460">
+          <template slot-scope="{row}">{{row.sbmc || '--'}}</template>
+        </el-table-column>
+        <el-table-column prop="assetnum" label="设备内码" show-overflow-tooltip resizable width="80">
+          <template slot-scope="{row}">{{row.assetnum || '--'}}</template>
+        </el-table-column>
+        <el-table-column prop="matters" label="事项类型" width="180" show-overflow-tooltip resizable>
+          <template slot-scope="{row}">{{row.matters || '--'}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="description"
+          label="事项描述"
+          show-overflow-tooltip
+          resizable
+          min-width="340"
+        >
+          <template slot-scope="{row}">{{row.description || '--'}}</template>
+        </el-table-column>
+        <el-table-column label="更换配件信息" align="center">
+          <el-table-column prop="ischangepj" label="是/否更换" width="80">
+            <template slot-scope="{row}">{{row.ismodel==1?'是':(row.ismodel==0?"否" :'--')}}</template>
+          </el-table-column>
+          <el-table-column prop="model" label="配件名称型号" width="140" show-overflow-tooltip resizable>
+            <template slot-scope="{row}">{{row.model || '--'}}</template>
+          </el-table-column>
+          <el-table-column prop="sl" label="数量" width="80" show-overflow-tooltip resizable>
+            <template slot-scope="{row}">{{row.sl>=0?row.sl:'--'}}</template>
+          </el-table-column>
+          <el-table-column
+            prop="cost"
+            label="费用(万元)"
+            show-overflow-tooltip
+            resizable
+            width="80"
+            align="right"
+          >
+            <template slot-scope="{row}">{{row.cost || '--'}}</template>
+          </el-table-column>
+          <el-table-column prop="source" label="费用出处" show-overflow-tooltip resizable width="100">
+            <template slot-scope="{row}">{{row.source|| '--'}}</template>
+          </el-table-column>
+        </el-table-column>
+        <el-table-column prop="brand" label="现场照片" width="70">
+          <template slot-scope="{row}">
+            <div
+              v-if="row.glsmsImage"
+              style="cursor:pointer;color: #0091ff;"
+              @click.stop="clickPic(row.glsmsImage)"
+            >{{row.glsmsImage.length+'张'}}</div>
+            <div v-else>{{'--'}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="reportdate" label="填报时间" width="140">
+          <template slot-scope="{row}">{{row.reportdate?formatterTime(row.reportdate):'--'}}</template>
+        </el-table-column>
+        <el-table-column prop="sjjssj" label="验收时间" width="140">
+          <template slot-scope="{row}">{{row.sjjssj?formatterTime(row.sjjssj): '--'}}</template>
+        </el-table-column>
+        <el-table-column prop="wonum" label="任务编号" show-overflow-tooltip resizable width="90">
+          <template slot-scope="{row}">
+            <div
+              v-if="row.wb_gzglid"
+              @click.stop="ycgd(row)"
+              style="cursor:pointer;color: #0091ff;"
+            >{{row.wb_gzglid}}</div>
+            <div v-else>{{'--'}}</div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div class="foot">
+      <el-pagination
+        background
+        layout="prev, pager, next"
+        :total="total"
+        :page-size="size"
+        :current-page="currentPage"
+        @prev-click="pageChanged"
+        @next-click="pageChanged"
+        @current-change="pageChanged"
+      ></el-pagination>
+      <pic-large :imgUrl="imgUrl" ref="picLargeOpen"></pic-large>
+    </div>
+  </div>
 </template>
 <script>
-import moment from 'moment'
-import { queryWbsms } from '@/api/equipmentList.js'
-import { mapGetters } from 'vuex'
-import { Select } from 'meri-design'
-import inputDialog from './inputDIalog'
-import { formatterTime, number_format } from '@/utils/format.js'
+import moment from "moment";
+import { queryWbsms } from "@/api/equipmentList.js";
+import { mapGetters } from "vuex";
+import { Select } from "meri-design";
+import inputDialog from "./inputDIalog";
+import { formatterTime, number_format } from "@/utils/format.js";
 export default {
-    components: { Select, inputDialog },
-    data() {
-        return {
-            tableData: [],
-            total: 0,
-            currentPage: 1,
-            sjjssj: '',
-            reportdate: '',
-            ischange: '2',
-            sbjc: '',
-            formatterTime,
-            number_format,
-            changeOption: [
-                {
-                    id: '2',
-                    name: '全部',
-                },
-                {
-                    id: '1',
-                    name: '是',
-                },
-                {
-                    id: ' 0',
-                    name: '否',
-                },
-            ],
-            imgUrl: [],
-            shjc: '',
-            gzglid: '',
-            matters: '',
+  components: { Select, inputDialog },
+  data() {
+    return {
+      tableData: [],
+      total: 0,
+      currentPage: 1,
+      sjjssj: "",
+      reportdate: "",
+      ischange: "2",
+      formatterTime,
+      gzglid: "", //任务编号
+      number_format,
+      changeOption: [
+        {
+          id: "2",
+          name: "全部"
+        },
+        {
+          id: "1",
+          name: "是"
+        },
+        {
+          id: " 0",
+          name: "否"
         }
+      ],
+      imgUrl: [],
+      shjc: "",
+      childrensbname:'',
+      matters:""
+      // matters: '',
+    };
+  },
+  props: [
+    "smsxt",
+    "diff",
+    "tabLabel",
+    "size",
+    "assetnum",
+    "sbname",
+    "mattertype",
+  ],
+  computed: {
+    ...mapGetters(["floorSelect"]),
+  },
+  methods: {
+    //序号的方法
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.size + index + 1;
     },
-    props: ['smsxt', 'diff', 'tabLabel', 'size', 'assetnum'],
-    computed: {
-        ...mapGetters(['floorSelect']),
+    //工单详情
+    innerTable(row) {
+      console.log(row);
+      if (row.apptype == "外委" || row.apptype == "自维") {
+        if (row.wb_gzglid) {
+          window.open(
+            `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`
+          );
+        }
+      } else if (row.apptype == "安全维保") {
+        window.open(
+          `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=AQ_WB_GZGL&uniqueid=${row.wb_gzglid}`
+        );
+      }
     },
-    methods: {
-        //序号的方法
-        indexMethod(index) {
-            return (this.currentPage - 1) * this.size + index + 1
-        },
-        //工单详情
-        innerTable(row) {
-            console.log(row)
-            if (row.apptype == '外委' || row.apptype == '自维') {
-                if (row.wb_gzglid) {
-                    window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`)
-                }
-            } else if (row.apptype == '安全维保') {
-                window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=AQ_WB_GZGL&uniqueid=${row.wb_gzglid}`)
-            }
-        },
-        // 工单
-        ycgd(row) {
-            if (row.apptype == '外委' || row.apptype == '自维') {
-                if (row.wb_gzglid) {
-                    window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`)
-                }
-            } else if (row.apptype == '安全维保') {
-                window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`)
-            }
-        },
-        //多余输入框监听
-        confirm(gzglid) {
-            this.gzglid = gzglid
-            this.pageChanged(1)
-        },
-        pageChanged(page) {
-            this.currentPage = page
-            this.getList()
-        },
-        getList() {
-            let getParams = {
-                data: {
-                    smsxt: this.smsxt,
-                    plazaId: this.$store.state.plazaId,
-                    page: this.currentPage,
-                    size: this.size,
-                },
-            }
-            //区分主要设备和全部设备
-            if (this.smsxt != '1008') {
-                getParams.data.onlyMainAsset = true
-            }
-            if (this.diff) {
-                getParams.data.diff = this.diff
-            }
-            if (this.assetnum) {
-                getParams.data.assetnum = this.assetnum
-            }
-            //下拉
-            if (this.ischange && this.ischange != 2) {
-                // getParams.data.ischangepj = this.ischange
-                getParams.data.ismodel = this.ischange
-            }
-            // 验收日期
-            if (this.sjjssj) {
-                getParams.data.sjjssjStartDate = this.sjjssj[0] + '000000'
-                // getParams.data.sjjssjEndDate = this.sjjssj[1] + '000000'
-                getParams.data.sjjssjEndDate = moment(this.sjjssj[1]).format('YYYYMMDD235959')
-            }
-            // 填报时间
-            if (this.reportdate) {
-                getParams.data.reportdateStartDate = this.reportdate[0] + '000000'
-                // getParams.data.reportdateEndDate = this.reportdate[1] + '000000'
-                getParams.data.reportdateEndDate = moment(this.reportdate[1]).format('YYYYMMDD235959')
-            }
-            //输入框
-            getParams.data.keyword = ''
-            if (this.sbjc) {
-                console.log(this.sbjc)
-                getParams.data.keyword += `${this.sbjc}:sbmc,assetnum;`
-            }
-            if (this.matters) {
-                getParams.data.keyword += `${this.matters}:description,matters;`
-            }
-            if (this.gzglid) {
-                getParams.data.keyword += `${this.gzglid}:wb_gzglid;`
-            }
-            if (getParams.data.keyword == '') {
-                delete getParams.data.keyword
-            }
-            queryWbsms(getParams).then((res) => {
-                this.tableData = res.data || []
-                this.total = res.count
-            })
-        },
-        clickPic(row) {
-            this.imgUrl = []
-            if (row) {
-                row.forEach((el) => {
-                    let obj = {
-                        name: el.description,
-                        url: el.url,
-                    }
-                    this.imgUrl.push(obj)
-                })
-            }
-            this.$refs.picLargeOpen.open(this.imgUrl)
-        },
-        startMethods() {
-            this.getList()
-        },
+    // 工单
+    ycgd(row) {
+      if (row.apptype == "外委" || row.apptype == "自维") {
+        if (row.wb_gzglid) {
+          window.open(
+            `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`
+          );
+        }
+      } else if (row.apptype == "安全维保") {
+        window.open(
+          `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`
+        );
+      }
     },
-    watch: {
-        diff(newV, oldV) {
-            if (newV !== oldV) {
-                this.getList()
-            }
-        },
-        tabLabel(newV, oldV) {
-            if (newV !== oldV) {
-                // this.tabFind()
-                this.getList()
-            }
-        },
-        assetnum(newV, oldV) {
-            if (newV !== oldV) {
-                // this.tabFind()
-                this.getList()
-            }
-        },
-        ischange() {
-            this.getList()
-        },
+    //多余输入框监听
+    // confirm(gzglid) {
+    //     this.gzglid = gzglid
+    //     this.pageChanged(1)
+    // },
+    pageChanged(page) {
+      // debugger
+      this.currentPage = page;
+      this.getList();
     },
-    mounted() {
-        this.startMethods()
+    getList() {
+      let getParams = {
+        data: {
+          smsxt: this.smsxt,
+          plazaId: this.$store.state.plazaId,
+          page: this.currentPage,
+          size: this.size
+        }
+      };
+      //区分主要设备和全部设备
+      if (this.smsxt != "1008") {
+        getParams.data.onlyMainAsset = true;
+      }
+      if (this.diff) {
+        getParams.data.diff = this.diff;
+      }
+      if (this.assetnum) {
+        getParams.data.assetnum = this.assetnum;
+      }
+      //下拉
+      if (this.ischange && this.ischange != 2) {
+        // getParams.data.ischangepj = this.ischange
+        getParams.data.ismodel = this.ischange;
+      }
+      // 验收日期
+      if (this.sjjssj) {
+        getParams.data.sjjssjStartDate = this.sjjssj[0] + "000000";
+        // getParams.data.sjjssjEndDate = this.sjjssj[1] + '000000'
+        getParams.data.sjjssjEndDate = moment(this.sjjssj[1]).format(
+          "YYYYMMDD235959"
+        );
+      }
+      // 填报时间
+      if (this.reportdate) {
+        getParams.data.reportdateStartDate = this.reportdate[0] + "000000";
+        // getParams.data.reportdateEndDate = this.reportdate[1] + '000000'
+        getParams.data.reportdateEndDate = moment(this.reportdate[1]).format(
+          "YYYYMMDD235959"
+        );
+      }
+      //输入框
+      getParams.data.keyword = "";
+      if (this.childrensbname) {
+        console.log(this.childrensbname);
+        getParams.data.keyword += `${this.childrensbname}:sbmc,assetnum;`;
+      }
+      if (this.matters) {
+        getParams.data.keyword += `${this.matters}:description,matters;`;
+      }
+      if (this.gzglid) {
+        getParams.data.keyword += `${this.gzglid}:wb_gzglid;`;
+      }
+      if (getParams.data.keyword == "") {
+        delete getParams.data.keyword;
+      }
+      queryWbsms(getParams).then(res => {
+        this.tableData = res.data || [];
+        this.total = res.count;
+      });
     },
-}
+    clickPic(row) {
+      this.imgUrl = [];
+      if (row) {
+        row.forEach(el => {
+          let obj = {
+            name: el.description,
+            url: el.url
+          };
+          this.imgUrl.push(obj);
+        });
+      }
+      this.$refs.picLargeOpen.open(this.imgUrl);
+    },
+    startMethods() {
+      this.getList();
+    }
+  },
+  watch: {
+    sbname(newV, oldV) {
+      this.childrensbname = newV;
+      if (newV !== oldV) {
+        this.getList();
+      }
+    },
+    mattertype(newV, oldV) {
+      this.matters = newV;
+      if (newV !== oldV) {
+        this.getList();
+      }
+    },
+    diff(newV, oldV) {
+      if (newV !== oldV) {
+        this.getList();
+      }
+    },
+    tabLabel(newV, oldV) {
+      if (newV !== oldV) {
+        // this.tabFind()
+        this.getList();
+      }
+    },
+    assetnum(newV, oldV) {
+      if (newV !== oldV) {
+        // this.tabFind()
+        this.getList();
+      }
+    },
+    ischange() {
+      this.getList();
+    }
+  },
+  mounted() {
+    this.childrensbname = this.sbname;
+    this.matters = this.mattertype;
+    this.startMethods();
+  }
+};
 </script>
 <style lang="less" scoped>
 .wb-list {
-    .eq-list-top {
-        display: flex;
-        margin-bottom: 12px;
-        .picker-box {
-            display: flex;
-            align-items: center;
-            background: #fff;
-            padding: 0 6px;
-            border: 1px solid #dcdfe6;
-            border-radius: 4px;
-            height: 32px;
-            box-sizing: border-box;
-            margin-right: 12px;
-            .picker-span {
-                margin-right: 6px;
-                color: rgba(0, 0, 0, 0.65);
-            }
-        }
-    }
-    td {
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-    }
-    .foot {
-        height: 32px;
-        display: flex;
-        justify-content: flex-end;
-        margin-top: 28px;
+  .eq-list-top {
+    display: flex;
+    margin-bottom: 12px;
+    .picker-box {
+      display: flex;
+      align-items: center;
+      background: #fff;
+      padding: 0 6px;
+      border: 1px solid #dcdfe6;
+      border-radius: 4px;
+      height: 32px;
+      box-sizing: border-box;
+      margin-right: 12px;
+      .picker-span {
+        margin-right: 6px;
+        color: rgba(0, 0, 0, 0.65);
+      }
     }
+  }
+  td {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  .foot {
+    height: 32px;
+    display: flex;
+    justify-content: flex-end;
+    margin-top: 28px;
+  }
 }
 </style>
 <style lang="less" >
 .wb-list {
-    .picker-box {
-        .el-input__inner {
-            border: none;
-        }
-        .el-range-editor.el-input__inner {
-            padding: 3px 0px;
-        }
-        .el-icon-date {
-            display: none;
-        }
-        .el-range__close-icon {
-            position: absolute;
-            right: 0px;
-            top: 2px;
-        }
-        .el-range-editor--mini .el-range-input {
-            font-size: 14px;
-            color: rgb(31, 36, 41);
-        }
+  .picker-box {
+    .el-input__inner {
+      border: none;
+    }
+    .el-range-editor.el-input__inner {
+      padding: 3px 0px;
+    }
+    .el-icon-date {
+      display: none;
+    }
+    .el-range__close-icon {
+      position: absolute;
+      right: 0px;
+      top: 2px;
     }
-    /deep/.el-table td {
-        cursor: pointer;
+    .el-range-editor--mini .el-range-input {
+      font-size: 14px;
+      color: rgb(31, 36, 41);
     }
+  }
+  /deep/.el-table td {
+    cursor: pointer;
+  }
 }
 </style>

+ 1 - 0
src/views/overview/picModal.vue

@@ -35,6 +35,7 @@ export default {
     },
     methods: {
         showModal(params, type) {
+            // debugger
             this.key++
             this.dialogVisible = true
             this.rotationImg = params