YaolongHan před 4 roky
rodič
revize
b850e762d8
3 změnil soubory, kde provedl 646 přidání a 514 odebrání
  1. 443 349
      src/views/equipment/table/rcwxTable.vue
  2. 190 161
      src/views/room/index.vue
  3. 13 4
      src/views/room/room4.vue

+ 443 - 349
src/views/equipment/table/rcwxTable.vue

@@ -1,372 +1,466 @@
 <!-- 维修-->
 <template>
-    <div class='rcwx-list'>
-        <div class='eq-list-top'>
-            <el-input
-                placeholder='搜索设备名称编号'
-                size='small'
-                @keyup.enter.native='getList'
-                @blur='getList'
-                clearable
-                prefix-icon='el-icon-search'
-                v-model='sbjc'
-                style='width:192px;margin-right:12px'
-            ></el-input>
-            <el-input
-                placeholder='搜索描述'
-                size='small'
-                clearable
-                @keyup.enter.native='getList'
-                @blur='getList'
-                prefix-icon='el-icon-search'
-                v-model='matters'
-                style='width:192px;margin-right:12px'
-            ></el-input>
-            <el-input
-                placeholder='搜索工单编号'
-                size='small'
-                clearable
-                @keyup.enter.native='getList'
-                @blur='getList'
-                prefix-icon='el-icon-search'
-                v-model='wonum2'
-                style='width:192px;margin-right:12px'
-            ></el-input>
-            <Select
-                @change='getList'
-                style='margin-right:12px;'
-                v-model='source'
-                width='180'
-                tipPlace='top'
-                caption='报修来源:'
-                :selectdata='sourceOption'
-            ></Select>
-            <el-input
-                placeholder='搜索执行人'
-                size='small'
-                clearable
-                @keyup.enter.native='getList'
-                @blur='getList'
-                prefix-icon='el-icon-search'
-                v-model='people'
-                style='width:192px;margin-right:12px'
-            ></el-input>
-            <input-dialog :type='5' @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 min-width='100'>
-                    <template slot-scope='{row}'>{{row.sbmc || '--'}}</template>
-                </el-table-column>
-                <el-table-column prop='matters' label='位置名称' width='240' show-overflow-tooltip resizable>
-                    <template slot-scope='{row}'>{{row.wzjc || '--'}}</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 prop='description' label='工单编号' show-overflow-tooltip resizable min-width='80'>
-                    <template slot-scope='{row}'>
-                        <div v-if='row.wonum' @click.stop='staff(row)' style='cursor:pointer;color: #0091ff;'>{{row.wonum}}</div>
-                        <div v-else>{{'--'}}</div>
-                    </template>
-                </el-table-column>
-                <el-table-column prop='description' label='报修来源' show-overflow-tooltip resizable min-width='340'>
-                    <template slot-scope='{row}'>{{row.bxfwlymc || '--'}}</template>
-                </el-table-column>
-                <el-table-column prop='description' label='执行人' show-overflow-tooltip resizable min-width='80'>
-                    <template slot-scope='{row}'>{{row.lead || '--'}}</template>
-                </el-table-column>
-                <el-table-column prop='reportdate' label='要求完成时间' width='140'>
-                    <template slot-scope='{row}'>{{row.schedfinish?formatterTime(row.schedfinish): '--'}}</template>
-                </el-table-column>
-                <el-table-column prop='sjjssj' label='实际完工时间' width='140'>
-                    <template slot-scope='{row}'>{{row.wotjyssj?formatterTime(row.wotjyssj): '--'}}</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='description' label='位置内码' show-overflow-tooltip resizable min-width='80'>
-                    <template slot-scope='{row}'>{{row.location || '--'}}</template>
-                </el-table-column>
-                <el-table-column prop='brand' label='报修照片' width='80'>
-                    <template slot-scope='{row}'>
-                        <div
-                            v-if='row.repair_photos_num'
-                            style='cursor:pointer;color: #0091ff;'
-                            @click.stop='clickPic(row.repair_photos_num)'
-                        >{{row.repair_photos_num+'张'}}</div>
-                        <div v-else>{{'--'}}</div>
-                    </template>
-                </el-table-column>
-                <el-table-column prop='brand' label='完工照片' width='80'>
-                    <template slot-scope='{row}'>
-                        <div
-                            v-if='row.finish_photos_num'
-                            style='cursor:pointer;color: #0091ff;'
-                            @click.stop='clickPic(row.finish_photos_num)'
-                        >{{row.finish_photos_num+'张'}}</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'
-                @prev-click='pageChanged'
-                @next-click='pageChanged'
-                @current-change='pageChanged'
-            ></el-pagination>
-            <pic-large :imgUrl='imgUrl' ref='picLargeOpen'></pic-large>
-        </div>
+  <div class="rcwx-list">
+    <div class="eq-list-top">
+      <el-input
+        placeholder="搜索设备名称编号"
+        size="small"
+        @keyup.enter.native="getList"
+        @blur="getList"
+        clearable
+        prefix-icon="el-icon-search"
+        v-model="sbjc"
+        style="width:192px;margin-right:12px"
+      ></el-input>
+      <el-input
+        placeholder="搜索描述"
+        size="small"
+        clearable
+        @keyup.enter.native="getList"
+        @blur="getList"
+        prefix-icon="el-icon-search"
+        v-model="matters"
+        style="width:192px;margin-right:12px"
+      ></el-input>
+      <el-input
+        placeholder="搜索工单编号"
+        size="small"
+        clearable
+        @keyup.enter.native="getList"
+        @blur="getList"
+        prefix-icon="el-icon-search"
+        v-model="wonum2"
+        style="width:192px;margin-right:12px"
+      ></el-input>
+      <Select
+        @change="getList"
+        style="margin-right:12px;"
+        v-model="status"
+        width="180"
+        tipPlace="top"
+        caption="任务状态描述:"
+        :selectdata="statusOption"
+      ></Select>
+      <Select
+        @change="getList"
+        style="margin-right:12px;"
+        v-model="source"
+        width="180"
+        tipPlace="top"
+        caption="报修来源:"
+        :selectdata="sourceOption"
+      ></Select>
+      <el-input
+        placeholder="搜索执行人"
+        size="small"
+        clearable
+        @keyup.enter.native="getList"
+        @blur="getList"
+        prefix-icon="el-icon-search"
+        v-model="people"
+        style="width:192px;margin-right:12px"
+      ></el-input>
+      <input-dialog :type="5" @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 min-width="100">
+          <template slot-scope="{row}">{{row.sbmc || '--'}}</template>
+        </el-table-column>
+        <el-table-column prop="matters" label="位置名称" width="240" show-overflow-tooltip resizable>
+          <template slot-scope="{row}">{{row.wzjc || '--'}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="description"
+          label="问题描述"
+          show-overflow-tooltip
+          resizable
+          min-width="280"
+        >
+          <template slot-scope="{row}">{{row.description || '--'}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="description"
+          label="工单编号"
+          show-overflow-tooltip
+          resizable
+          min-width="80"
+        >
+          <template slot-scope="{row}">
+            <div
+              v-if="row.wonum"
+              @click.stop="staff(row)"
+              style="cursor:pointer;color: #0091ff;"
+            >{{row.wonum}}</div>
+            <div v-else>{{'--'}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="description"
+          label="报修来源"
+          show-overflow-tooltip
+          resizable
+          min-width="200"
+        >
+          <template slot-scope="{row}">{{row.bxfwlymc || '--'}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="description"
+          label="任务状态描述"
+          show-overflow-tooltip
+          resizable
+          min-width="200"
+        >
+          <template slot-scope="{row}">{{row.status || '--'}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="description"
+          label="执行人"
+          show-overflow-tooltip
+          resizable
+          min-width="80"
+        >
+          <template slot-scope="{row}">{{row.lead || '--'}}</template>
+        </el-table-column>
+        <el-table-column prop="reportdate" label="要求完成时间" width="140">
+          <template slot-scope="{row}">{{row.schedfinish?formatterTime(row.schedfinish): '--'}}</template>
+        </el-table-column>
+        <el-table-column prop="sjjssj" label="实际完工时间" width="140">
+          <template slot-scope="{row}">{{row.wotjyssj?formatterTime(row.wotjyssj): '--'}}</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="description"
+          label="位置内码"
+          show-overflow-tooltip
+          resizable
+          min-width="80"
+        >
+          <template slot-scope="{row}">{{row.location || '--'}}</template>
+        </el-table-column>
+        <el-table-column prop="brand" label="报修照片" width="80">
+          <template slot-scope="{row}">
+            <div
+              v-if="row.repair_photos_num"
+              style="cursor:pointer;color: #0091ff;"
+              @click.stop="clickPic(row.repair_photos_num)"
+            >{{row.repair_photos_num+'张'}}</div>
+            <div v-else>{{'--'}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="brand" label="完工照片" width="80">
+          <template slot-scope="{row}">
+            <div
+              v-if="row.finish_photos_num"
+              style="cursor:pointer;color: #0091ff;"
+              @click.stop="clickPic(row.finish_photos_num)"
+            >{{row.finish_photos_num+'张'}}</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"
+        @prev-click="pageChanged"
+        @next-click="pageChanged"
+        @current-change="pageChanged"
+      ></el-pagination>
+      <pic-large :imgUrl="imgUrl" ref="picLargeOpen"></pic-large>
+    </div>
+  </div>
 </template>
 <script>
-import { queryWxzy } from '@/api/equipmentList.js'
-import { mapGetters } from 'vuex'
-import inputDialog from './inputDIalog'
-import { Select } from 'meri-design'
-import { querySelect } from '@/api/public.js'
-import { formatterTime, number_format } from '@/utils/format.js'
+import { queryWxzy } from "@/api/equipmentList.js";
+import { mapGetters } from "vuex";
+import inputDialog from "./inputDIalog";
+import { Select } from "meri-design";
+import { querySelect } from "@/api/public.js";
+import { formatterTime, number_format } from "@/utils/format.js";
 export default {
-    components: { Select, inputDialog },
-    data() {
-        return {
-            tableData: [],
-            total: 0,
-            currentPage: 1,
-            reportdate: '',
-            sjjssj: '',
-            sbjc: '',
-            matters: '',
-            wonum2: '',
-            wonum: '',
-            sourceOption: [],
-            source: '全部',
-            formatterTime,
-            number_format,
-            imgUrl: [],
-            people: '',
-            locationName: '',
-            keyword: '',
-        }
+  components: { Select, inputDialog },
+  data() {
+    return {
+      tableData: [],
+      total: 0,
+      currentPage: 1,
+      reportdate: "",
+      sjjssj: "",
+      sbjc: "",
+      matters: "",
+      wonum2: "",
+      wonum: "",
+      sourceOption: [],
+      statusOption: [],
+      source: "全部",
+      formatterTime,
+      number_format,
+      imgUrl: [],
+      people: "",
+      locationName: "",
+      keyword: "",
+      status: "全部" //搜索状态描述
+    };
+  },
+  computed: {
+    ...mapGetters(["floorSelect"])
+  },
+  props: ["smsxt", "diff", "tabLabel", "size", "assetnum"],
+  methods: {
+    //序号的方法
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.size + index + 1;
     },
-    computed: {
-        ...mapGetters(['floorSelect']),
+    innerTable(row) {
+      if (row.workorderid) {
+        window.open(
+          `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=JXWO&uniqueid=${row.workorderid}`
+        );
+      }
     },
-    props: ['smsxt', 'diff', 'tabLabel', 'size', 'assetnum'],
-    methods: {
-        //序号的方法
-        indexMethod(index) {
-            return (this.currentPage - 1) * this.size + index + 1
-        },
-        innerTable(row) {
-            if (row.workorderid) {
-                window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=JXWO&uniqueid=${row.workorderid}`)
-            }
-        },
-        //跳转工单编号
-        staff(row) {
-            console.log(row)
-            if (row.wonum) {
-                window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=JXWO&uniqueid=${row.wonum}`)
-            }
-        },
-        //多余输入框监听
-        confirm(reportdate, real, locationName) {
-            this.reportdate = reportdate
-            this.sjjssj = real
-            this.locationName = locationName
-            this.getList()
-        },
-        pageChanged(page) {
-            this.currentPage = page
-            this.getList()
-        },
-        getList() {
-            let getParams = {
-                data: {
-                    smsxt: this.smsxt,
-                    // diff: this.diff,
-                    plazaId: this.$store.state.plazaId,
-                    page: this.currentPage,
-                    size: this.size,
-                },
-            }
-            //区分主要设备和全部设备
-            if(this.smsxt != '1008'){
-                getParams.data.onlyMainAsset = true
-            }
-            if (this.assetnum) {
-                getParams.data.assetnum = this.assetnum
-            }
-            //下拉
-            if (this.reportdate) {
-                getParams.data.schedfinishStartDate = this.reportdate[0] + '000000'
-                getParams.data.schedfinishEndDate = this.reportdate[1] + '000000'
-            }
-            if (this.real) {
-                getParams.data.wotjyssjStartDate = this.real[0] + '000000'
-                getParams.data.wotjyssjEndDate = this.real[1] + '000000'
-            }
-            if (this.source && this.source != '全部') {
-                getParams.data.bxfwlymc = this.source
-            }
-            //输入框搜索
-            getParams.data.keyword = ''
-            if (this.sbjc) {
-                getParams.data.keyword += `${this.sbjc}:sbmc,assetnum;`
-            }
-            if (this.matters) {
-                getParams.data.keyword += `${this.matters}:description;`
-            }
-            if (this.locationName) {
-                getParams.data.keyword += `${this.locationName}:location;`
-            }
-            if (this.wonum2) {
-                getParams.data.keyword += `${this.wonum2}:wonum;`
-            }
-            if(this.people){
-                getParams.data.keyword += `${this.people}:lead;`
-            }
-            if (getParams.data.keyword == '') {
-                delete getParams.data.keyword
-            }
-            queryWxzy(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.tabFind()
-            this.getList()
-        },
-        //下拉框查询
-        tabFind() {
-            let postParams = [
-                {
-                    columnName: { bxfwly: 'bxfwlymc' },
-                    params: {
-                        smsxt: this.smsxt,
-                    },
-                    tableName: 'sms_wxzy', //视图名称
-                },
-            ]
-            let data = {
-                plazaId: this.$store.state.plazaId,
-            }
-            if(this.smsxt!='1008'){
-                data.onlyMainAsset = true
-            }
-            querySelect({ data, postParams }).then((res) => {
-                //console.log(res)
-                let bxfwlymc = res.data && res.data.data && res.data.data.sms_wxzy ? res.data.data.sms_wxzy.bxfwly : []
-                this.sourceOption = []
-                this.sourceOption.push({
-                    name: '全部',
-                    id: '全部',
-                })
-                bxfwlymc.forEach((el) => {
-                    this.sourceOption.push({
-                        name: el.value,
-                        id: el.key,
-                    })
-                })
-            })
-        },
+    //跳转工单编号
+    staff(row) {
+      console.log(row);
+      if (row.wonum) {
+        window.open(
+          `http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=JXWO&uniqueid=${row.wonum}`
+        );
+      }
     },
-    watch: {
-        diff(newV, oldV) {
-            if (newV !== oldV) {
-                this.startMethods()
-            }
-        },
-        tabLabel(newV, oldV) {
-            if (newV !== oldV) {
-                this.startMethods()
-            }
-        },
+    //多余输入框监听
+    confirm(reportdate, real, locationName) {
+      this.reportdate = reportdate;
+      this.sjjssj = real;
+      this.locationName = locationName;
+      this.getList();
     },
-    mounted() {
-        this.startMethods()
+    pageChanged(page) {
+      this.currentPage = page;
+      this.getList();
     },
-}
-</script>
-<style lang="less" scoped>
-.rcwx-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);
-            }
+    getList() {
+      let getParams = {
+        data: {
+          smsxt: this.smsxt,
+          // diff: this.diff,
+          plazaId: this.$store.state.plazaId,
+          page: this.currentPage,
+          size: this.size
         }
+      };
+      //区分主要设备和全部设备
+      if (this.smsxt != "1008") {
+        getParams.data.onlyMainAsset = true;
+      }
+      if (this.assetnum) {
+        getParams.data.assetnum = this.assetnum;
+      }
+      //下拉
+      if (this.reportdate) {
+        getParams.data.schedfinishStartDate = this.reportdate[0] + "000000";
+        getParams.data.schedfinishEndDate = this.reportdate[1] + "000000";
+      }
+      if (this.real) {
+        getParams.data.wotjyssjStartDate = this.real[0] + "000000";
+        getParams.data.wotjyssjEndDate = this.real[1] + "000000";
+      }
+      if (this.source && this.source != "全部") {
+        getParams.data.bxfwlymc = this.source;
+      }
+      if (this.status && this.status != "全部") {
+        getParams.data.status = this.status;
+      }
+      //输入框搜索
+      getParams.data.keyword = "";
+      if (this.sbjc) {
+        getParams.data.keyword += `${this.sbjc}:sbmc,assetnum;`;
+      }
+      if (this.matters) {
+        getParams.data.keyword += `${this.matters}:description;`;
+      }
+      if (this.locationName) {
+        getParams.data.keyword += `${this.locationName}:location;`;
+      }
+      if (this.wonum2) {
+        getParams.data.keyword += `${this.wonum2}:wonum;`;
+      }
+      if (this.people) {
+        getParams.data.keyword += `${this.people}:lead;`;
+      }
+      if (getParams.data.keyword == "") {
+        delete getParams.data.keyword;
+      }
+
+      queryWxzy(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.tabFind();
+      this.getList();
+    },
+    //下拉框查询
+    tabFind() {
+      // 1保修来源
+      let postParams = [
+        {
+          columnName: { bxfwly: "bxfwlymc" },
+          params: {
+            smsxt: this.smsxt
+          },
+          tableName: "sms_wxzy" //视图名称
+        }
+      ];
+      let data = {
+        plazaId: this.$store.state.plazaId
+      };
+      if (this.smsxt != "1008") {
+        data.onlyMainAsset = true;
+      }
+      querySelect({ data, postParams }).then(res => {
+        //console.log(res)
+        let bxfwlymc =
+          res.data && res.data.data && res.data.data.sms_wxzy
+            ? res.data.data.sms_wxzy.bxfwly
+            : [];
+        this.sourceOption = [];
+        this.sourceOption.push({
+          name: "全部",
+          id: "全部"
+        });
+        bxfwlymc.forEach(el => {
+          this.sourceOption.push({
+            name: el.value,
+            id: el.key
+          });
+        });
+      });
+      // 2任务状态
+      let postParams2 = [
+        {
+          columnName: { status: "status" },
+          params: {
+            smsxt: this.smsxt
+          },
+          tableName: "sms_wxzy" //视图名称
+        }
+      ];
+      querySelect({ data, postParams: postParams2 }).then(res => {
+        console.log("resrfes", res);
+        let bxfwlymc =
+          res.data && res.data.data && res.data.data.sms_wxzy
+            ? res.data.data.sms_wxzy.status
+            : [];
+        this.statusOption = [];
+        this.statusOption.push({
+          name: "全部",
+          id: "全部"
+        });
+        bxfwlymc.forEach(el => {
+          this.statusOption.push({
+            name: el.value,
+            id: el.key
+          });
+        });
+      });
     }
-    td {
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
+  },
+  watch: {
+    diff(newV, oldV) {
+      if (newV !== oldV) {
+        this.startMethods();
+      }
+    },
+    tabLabel(newV, oldV) {
+      if (newV !== oldV) {
+        this.startMethods();
+      }
     }
-    .foot {
-        height: 32px;
-        display: flex;
-        justify-content: flex-end;
-        margin-top: 28px;
+  },
+  mounted() {
+    this.startMethods();
+  }
+};
+</script>
+<style lang="less" scoped>
+.rcwx-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" >
 .rcwx-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>

+ 190 - 161
src/views/room/index.vue

@@ -141,119 +141,6 @@
               @Index2Emit="Index2Emit"
             ></room-table3>
           </el-tab-pane>
-          <el-tab-pane label="核心设备日常维修" name="4">
-            <div class="compute-center">
-              <el-input
-                placeholder="搜索设备名称编号"
-                size="small"
-                @keyup.enter.native="Index3"
-                @blur="Index3"
-                clearable
-                prefix-icon="el-icon-search"
-                v-model="sbjc"
-                style="width:192px;margin-right:12px"
-              ></el-input>
-              <el-input
-                placeholder="搜索描述"
-                size="small"
-                clearable
-                @keyup.enter.native="Index3"
-                @blur="Index3"
-                prefix-icon="el-icon-search"
-                v-model="matters"
-                style="width:192px;margin-right:12px"
-              ></el-input>
-              <el-input
-                placeholder="搜索工单编号"
-                size="small"
-                clearable
-                @keyup.enter.native="Index3"
-                @blur="Index3"
-                prefix-icon="el-icon-search"
-                v-model="wonum2"
-                style="width:192px;margin-right:12px"
-              ></el-input>
-              <Select
-                @change="Index3"
-                style="margin-right:12px;"
-                v-model="source"
-                width="180"
-                tipPlace="top"
-                caption="报修来源:"
-                :selectdata="allArr"
-              ></Select>
-              <el-input
-                placeholder="搜索执行人"
-                size="small"
-                clearable
-                @keyup.enter.native="Index3"
-                @blur="Index3"
-                prefix-icon="el-icon-search"
-                v-model="people"
-                style="width:192px;margin-right:12px"
-              ></el-input>
-            </div>
-            <div class="dialog-none">
-              <div class="input-dialog">
-                <div class="input-dialog-top" @click="show">
-                  <img src="@/assets/imgs/select.png" />
-                  筛选
-                </div>
-                <div class="input-dialog-form" v-if="dialogFormVisible">
-                  <el-form style=" padding: 20px 24px;">
-                    <p style="margin:16px 0 8px 0">要求完成日期</p>
-                    <el-date-picker
-                      clearable
-                      style="width:232px"
-                      v-model="inputForm.reportdate"
-                      value-format="yyyyMMdd"
-                      type="daterange"
-                      size="small"
-                      range-separator="-"
-                      start-placeholder
-                      end-placeholder
-                    ></el-date-picker>
-                    <p style="margin:16px 0 8px 0">实际完工日期</p>
-                    <el-date-picker
-                      clearable
-                      style="width:232px"
-                      v-model="inputForm.real"
-                      value-format="yyyyMMdd"
-                      type="daterange"
-                      size="small"
-                      range-separator="-"
-                      start-placeholder
-                      end-placeholder
-                    ></el-date-picker>
-                    <p style="margin:16px 0 8px 0">位置名称编号</p>
-                    <el-input
-                      placeholder="搜索位置名称编号"
-                      size="small"
-                      clearable
-                      prefix-icon="el-icon-search"
-                      v-model="inputForm.locationName"
-                      style="width:232px;margin-right:12px"
-                    ></el-input>
-                  </el-form>
-                  <div style="position:absolute;bottom:24px;right:24px;z-index:9999">
-                    <el-button @click="dialogFormVisible = false" size="small">取 消</el-button>
-                    <el-button type="primary" @click="confirm" size="small">确 定</el-button>
-                  </div>
-                </div>
-              </div>
-            </div>
-            <room-table4
-              ref="roomTable4"
-              v-if="table4.length>=0"
-              :table4="table4"
-              :loading="loading3"
-              :page="page3"
-              :total="total3"
-              :size="size3"
-              :sjjssj="sjjssj"
-              @Index3Emit="Index3Emit"
-            ></room-table4>
-          </el-tab-pane>
           <el-tab-pane label="核心设备日常维保" name="5">
             <div class="compute-center">
               <el-input
@@ -410,6 +297,128 @@
               @Index4Emit="Index4Emit"
             ></room-table5>
           </el-tab-pane>
+          <el-tab-pane label="核心设备日常维修" name="4">
+            <div class="compute-center">
+              <el-input
+                placeholder="搜索设备名称编号"
+                size="small"
+                @keyup.enter.native="Index3"
+                @blur="Index3"
+                clearable
+                prefix-icon="el-icon-search"
+                v-model="sbjc"
+                style="width:192px;margin-right:12px"
+              ></el-input>
+              <el-input
+                placeholder="搜索描述"
+                size="small"
+                clearable
+                @keyup.enter.native="Index3"
+                @blur="Index3"
+                prefix-icon="el-icon-search"
+                v-model="matters"
+                style="width:192px;margin-right:12px"
+              ></el-input>
+              <el-input
+                placeholder="搜索工单编号"
+                size="small"
+                clearable
+                @keyup.enter.native="Index3"
+                @blur="Index3"
+                prefix-icon="el-icon-search"
+                v-model="wonum2"
+                style="width:192px;margin-right:12px"
+              ></el-input>
+                 <Select
+        @change="getList"
+        style="margin-right:12px;"
+        v-model="statue"
+        width="180"
+        tipPlace="top"
+        caption="任务状态描述:"
+        :selectdata="statusOption"
+      ></Select>
+              <Select
+                @change="Index3"
+                style="margin-right:12px;"
+                v-model="source"
+                width="180"
+                tipPlace="top"
+                caption="报修来源:"
+                :selectdata="allArr"
+              ></Select>
+              <el-input
+                placeholder="搜索执行人"
+                size="small"
+                clearable
+                @keyup.enter.native="Index3"
+                @blur="Index3"
+                prefix-icon="el-icon-search"
+                v-model="people"
+                style="width:192px;margin-right:12px"
+              ></el-input>
+            </div>
+            <div class="dialog-none">
+              <div class="input-dialog">
+                <div class="input-dialog-top" @click="show">
+                  <img src="@/assets/imgs/select.png" />
+                  筛选
+                </div>
+                <div class="input-dialog-form" v-if="dialogFormVisible">
+                  <el-form style=" padding: 20px 24px;">
+                    <p style="margin:16px 0 8px 0">要求完成日期</p>
+                    <el-date-picker
+                      clearable
+                      style="width:232px"
+                      v-model="inputForm.reportdate"
+                      value-format="yyyyMMdd"
+                      type="daterange"
+                      size="small"
+                      range-separator="-"
+                      start-placeholder
+                      end-placeholder
+                    ></el-date-picker>
+                    <p style="margin:16px 0 8px 0">实际完工日期</p>
+                    <el-date-picker
+                      clearable
+                      style="width:232px"
+                      v-model="inputForm.real"
+                      value-format="yyyyMMdd"
+                      type="daterange"
+                      size="small"
+                      range-separator="-"
+                      start-placeholder
+                      end-placeholder
+                    ></el-date-picker>
+                    <p style="margin:16px 0 8px 0">位置名称编号</p>
+                    <el-input
+                      placeholder="搜索位置名称编号"
+                      size="small"
+                      clearable
+                      prefix-icon="el-icon-search"
+                      v-model="inputForm.locationName"
+                      style="width:232px;margin-right:12px"
+                    ></el-input>
+                  </el-form>
+                  <div style="position:absolute;bottom:24px;right:24px;z-index:9999">
+                    <el-button @click="dialogFormVisible = false" size="small">取 消</el-button>
+                    <el-button type="primary" @click="confirm" size="small">确 定</el-button>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <room-table4
+              ref="roomTable4"
+              v-if="table4.length>=0"
+              :table4="table4"
+              :loading="loading3"
+              :page="page3"
+              :total="total3"
+              :size="size3"
+              :sjjssj="sjjssj"
+              @Index3Emit="Index3Emit"
+            ></room-table4>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </el-dialog>
@@ -529,8 +538,10 @@ export default {
         real: "",
         locationName: ""
       },
-      sjjssj:'',
-      real:''
+      sjjssj: "",
+      real: "",
+      statue:'全部',
+      statusOption:[]
     };
   },
   components: {
@@ -729,14 +740,14 @@ export default {
 
       //下拉
       // 监听下拉框
-        if (this.reportdate) {
-          getParams.data.schedfinishStartDate = this.reportdate[0] + "000000";
-          getParams.data.schedfinishEndDate = this.reportdate[1] + "000000";
-        }
-        if (this.real) {
-          getParams.data.wotjyssjStartDate = this.real[0] + "000000";
-          getParams.data.wotjyssjEndDate = this.real[1] + "000000";
-        }
+      if (this.reportdate) {
+        getParams.data.schedfinishStartDate = this.reportdate[0] + "000000";
+        getParams.data.schedfinishEndDate = this.reportdate[1] + "000000";
+      }
+      if (this.real) {
+        getParams.data.wotjyssjStartDate = this.real[0] + "000000";
+        getParams.data.wotjyssjEndDate = this.real[1] + "000000";
+      }
       if (this.source && this.source != "全部") {
         getParams.data.bxfwlymc = this.source;
       }
@@ -847,60 +858,78 @@ export default {
       });
     },
     confirm() {
-        this.reportdate = this.inputForm.reportdate;
-        this.sjjssj = this.inputForm.real;
-        this.real = this.inputForm.real;
-        this.locationName = this.inputForm.locationName;
-        this.Index3();
+      this.reportdate = this.inputForm.reportdate;
+      this.sjjssj = this.inputForm.real;
+      this.real = this.inputForm.real;
+      this.locationName = this.inputForm.locationName;
+      this.Index3();
     },
     confirm2() {
       this.Index4();
     },
     // 下拉框数据
     changeSelect() {
-      this.department = [];
+        // 1保修来源
       let postParams = [
         {
-          columnName: { status: "status", zt: "zt" },
-          tableName: "sms_wbzy"
+          columnName: { bxfwly: "bxfwlymc" },
+          params: {
+            smsxt: this.smsxt
+          },
+          tableName: "sms_wxzy" //视图名称
         }
       ];
       let data = {
-        plazaId: this.plazaId
+        plazaId: this.$store.state.plazaId
       };
+      if (this.smsxt != "1008") {
+        data.onlyMainAsset = true;
+      }
       querySelect({ data, postParams }).then(res => {
-        //console.log('下拉框', 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);
+        //console.log(res)
+        let bxfwlymc =
+          res.data && res.data.data && res.data.data.sms_wxzy
+            ? res.data.data.sms_wxzy.bxfwly
+            : [];
+        this.sourceOption = [];
+        this.sourceOption.push({
+          name: "全部",
+          id: "全部"
+        });
+        bxfwlymc.forEach(el => {
+          this.sourceOption.push({
+            name: el.value,
+            id: el.key
           });
-          this.status = this.allArr.concat(arr);
-          console.log(this.status);
+        });
+      });
+      // 2任务状态
+      let postParams2 = [
+        {
+          columnName: { status: "status" },
+          params: {
+            smsxt: this.smsxt
+          },
+          tableName: "sms_wxzy" //视图名称
         }
-        if (zt.length > 0) {
-          zt.forEach(el => {
-            let obj = {
-              id: el.key,
-              name: el.value == "正常" ? "是" : "否"
-            };
-            arr1.push(obj);
+      ];
+      querySelect({ data, postParams: postParams2 }).then(res => {
+        console.log("resrfes", res);
+        let bxfwlymc =
+          res.data && res.data.data && res.data.data.sms_wxzy
+            ? res.data.data.sms_wxzy.status
+            : [];
+        this.statusOption = [];
+        this.statusOption.push({
+          name: "全部",
+          id: "全部"
+        });
+        bxfwlymc.forEach(el => {
+          this.statusOption.push({
+            name: el.value,
+            id: el.key
           });
-          this.zt = this.allArr.concat(arr1);
-          console.log(this.zt);
-        }
+        });
       });
     },
     // 查询楼层功能下的机房属于哪类设备

+ 13 - 4
src/views/room/room4.vue

@@ -14,7 +14,7 @@
           label="问题描述"
           show-overflow-tooltip
           resizable
-          min-width="340"
+          min-width="280"
         >
           <template slot-scope="{row}">{{row.description || '--'}}</template>
         </el-table-column>
@@ -39,12 +39,21 @@
           label="报修来源"
           show-overflow-tooltip
           resizable
-          min-width="340"
+          min-width="200"
         >
           <template slot-scope="{row}">{{row.bxfwlymc || '--'}}</template>
         </el-table-column>
         <el-table-column
           prop="description"
+          label="任务状态描述"
+          show-overflow-tooltip
+          resizable
+          min-width="200"
+        >
+          <template slot-scope="{row}">{{row.status || '--'}}</template>
+        </el-table-column>
+        <el-table-column
+          prop="description"
           label="执行人"
           show-overflow-tooltip
           resizable
@@ -112,9 +121,9 @@
 // import Select from '@/components/Select/Select.vue'
 import { Select } from "meri-design";
 import moment from "moment";
-import { formatterTime,number_format } from "@/utils/format.js";
+import { formatterTime, number_format } from "@/utils/format.js";
 export default {
-  props: ["table4","sjjssj" ,"total", "page", "size", "loading"],
+  props: ["table4", "sjjssj", "total", "page", "size", "loading"],
   data() {
     return {
       dateVal: "",