Parcourir la source

排序和模糊搜索

zhulizhen1111 il y a 4 ans
Parent
commit
214f0abd63

+ 4 - 4
public/index.html

@@ -6,14 +6,14 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title>三明万达广场报告</title>
+    <title>万达广场管理说明书</title>
 </head>
 
 <body>
     <noscript>
-    <strong>We're sorry but wandaspecificationofsanming doesn't work properly without JavaScript enabled. Please enable
-      it to continue.</strong>
-  </noscript>
+        <strong>We're sorry but wandaspecificationofsanming doesn't work properly without JavaScript enabled. Please enable
+            it to continue.</strong>
+    </noscript>
     <div id="app"></div>
     <!-- built files will be auto injected -->
 </body>

+ 3 - 3
src/api/equipmentList.js

@@ -1,4 +1,4 @@
-import httputils from '@/api/httputils'
+import httputils from "@/api/httputils"
 
 // 设备设施-主要设备清单
 export function queryEquipmentList({ data, postParams }) {
@@ -30,8 +30,8 @@ export function queryZw({ data, getParams }) {
 }
 
 // 设备设施-其他事项
-export function queryQtsx({ getParams }) {
-    return httputils.getJson(`/data/data/glsms_qtsx/query`, getParams)
+export function queryQtsx({ data, getParams }) {
+    return httputils.getJson(`/data/data/v_glsms_qtsx/query`, data, getParams)
 }
 
 // 设备设施-记录事项

+ 6 - 6
src/views/equipment/eqDialog.vue

@@ -39,9 +39,9 @@
                         <tableList v-else-if='value.id.slice(0,4)=="RDQD"' :param='param' ref='list1' major='弱电'></tableList>
                         <tableList v-else-if='value.id.slice(0,4)=="NTQD"' :param='param' ref='list2' major='暖通'></tableList>
                         <!-- 维保表格 -->
-                        <wb-table v-else-if='value.id.slice(2,4)=="WB"' :smsxt='smsxt'></wb-table>
+                        <wb-table v-else-if='value.id.slice(2,4)=="WB"' :smsxt='smsxt' :major='dialogInfo.id'></wb-table>
                         <!-- 维修的表格 -->
-                        <wx-table v-else-if='value.id.slice(2,4)=="WX"' :smsxt='smsxt'></wx-table>
+                        <wx-table v-else-if='value.id.slice(2,4)=="WX"' :smsxt='smsxt' :major='dialogInfo.id'></wx-table>
                         <!-- 专维 -->
                         <zw-table v-else-if='value.id.slice(2,4)=="ZW"' :smsxt='smsxt' :major='dialogInfo.id'></zw-table>
                         <!-- 其他 -->
@@ -79,9 +79,7 @@ export default {
             rotationImg: [require('@/assets/imgs/eq.jpg'), require('@/assets/imgs/survey_pop2.png'), require('@/assets/imgs/survey_pop1.png')]
         }
     },
-    mounted() {
-        this.initImage()
-    },
+    mounted() {},
     components: { tableList, tjTable, wbTable, zwTable, lookPage, standTable, otherTable, wxTable, recordDialog, djspTable },
     methods: {
         showModal(item) {
@@ -95,12 +93,14 @@ export default {
             this.param = this.activeName
         },
         handleClick(tab) {
+            console.log(tab)
             if (this.param) {
                 this.param = tab.name
             } else if (this.smsxt) {
                 this.smsxt = tab.name
             }
             this.activeName = tab.name
+            this.initImage()
         },
 
         visibalBox() {
@@ -108,7 +108,7 @@ export default {
         },
         initImage() {
             let getParams = {
-                data: { tyepcode: 8, plazaId: '1001145' },
+                data: { tyepcode: 8, plazaId: '1001145', system: this.systemName.slice(0, 2) },
                 params: {}
             }
             queryPic(getParams).then(res => {

+ 49 - 8
src/views/equipment/table/eqDetaileDialog.vue

@@ -4,11 +4,43 @@
     <div class='gdqd-dialog'>
         <div class='top'></div>
         <div class='gdqd-dialog-top'>
-            <Select width='120' style='margin-right:12px;' v-model='floor' tipPlace='top' caption='楼层:' size='small' :selectdata='floorSelect'></Select>
-            <Select v-model='sbglgs' width='180' tipPlace='top' caption='管理归属' size='small' :selectdata='sbglgsOption'></Select>
-            <Select width='146' style='margin: 0 12px;' v-model='status' tipPlace='top' caption='设备状态' size='small' :selectdata='statusOption'></Select>
-            <el-input placeholder='搜索品牌、型号' style='width:192px;margin-right:12px' size='small' prefix-icon='el-icon-search' v-model='keyword'></el-input>
-            <el-input placeholder='搜索生产厂商' style='width:192px;margin-right:12px' size='small' prefix-icon='el-icon-search' v-model='keyword'></el-input>
+            <Select
+                width='120'
+                style='margin-right:12px;'
+                v-model='floor'
+                tipPlace='top'
+                caption='楼层:'
+                size='small'
+                :selectdata='floorSelect'
+                @change='queryTableList'
+            ></Select>
+            <Select v-model='sbglgs' width='180' tipPlace='top' caption='管理归属' size='small' :selectdata='sbglgsOption' @change='queryTableList'></Select>
+            <Select
+                width='146'
+                style='margin: 0 12px;'
+                v-model='status'
+                tipPlace='top'
+                caption='设备状态'
+                size='small'
+                :selectdata='statusOption'
+                @change='queryTableList'
+            ></Select>
+            <el-input
+                placeholder='搜索品牌、型号'
+                style='width:192px;margin-right:12px'
+                size='small'
+                prefix-icon='el-icon-search'
+                v-model='keyword'
+                @blur='queryTableList'
+            ></el-input>
+            <el-input
+                placeholder='搜索生产厂商'
+                style='width:192px;margin-right:12px'
+                size='small'
+                prefix-icon='el-icon-search'
+                v-model='manufacturer'
+                @blur='queryTableList'
+            ></el-input>
             <input-dialog :keyword='keyword' @confirm='confirm'></input-dialog>
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%;amrgin-bottom:30px'>
@@ -83,6 +115,7 @@ export default {
             floor: '',
             status: '',
             sbglgs: '',
+            manufacturer: '',
             sbglgsOption: [],
             statusOption: []
         }
@@ -151,7 +184,6 @@ export default {
                 })
             })
         },
-
         pageChanged(page) {
             this.page = page
             this.queryTableList()
@@ -175,12 +207,21 @@ export default {
                 major: major,
                 plazaId: this.$store.state.plazaId,
                 page: this.page,
-                size: this.size,
-                keyword: this.keyword
+                size: this.size
+
                 // sbglgs:this.sbglgs,
                 // floor:this.floor,
                 // status:this.status
             }
+            if (this.floor) {
+                data.floor = this.floor
+            }
+            if (this.sbglgs) {
+                data.sbglgs = this.sbglgs
+            }
+            if (this.status) {
+                data.status = this.status
+            }
             let postParams = {
                 type_code: this.row.type_code,
                 manufacturer: this.row.manufacturer,

+ 27 - 9
src/views/equipment/table/eqListTable.vue

@@ -5,15 +5,15 @@
             <el-input
                 placeholder='搜索设备简称'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='sbjc'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
                 placeholder='搜索品牌、型号'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
                 v-model='keyword'
                 style='width:192px;margin-right:12px'
@@ -21,17 +21,17 @@
             <el-input
                 placeholder='搜索生产厂商'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='manufacturer'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <Select @change='getList' v-model='floor' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
         </div>
         <el-table :data='tableData' style='width: 100%' :border='true' @row-click='rowHandle'>
             <el-table-column type='index' label='序号' width='80'></el-table-column>
-            <el-table-column prop='assetnum' label='设备编号' width='160'>
-                <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
+            <el-table-column prop='sbjc' label='设备简称' width='160'>
+                <template slot-scope='{row}'>{{row.sbjc || '--'}}</template>
             </el-table-column>
             <el-table-column prop='sl' label='数量'>
                 <template slot-scope='{row}'>{{row.sl || '--'}}</template>
@@ -91,6 +91,8 @@ export default {
             size: 10,
             innerVisible: false, //详情弹框
             keyword: '',
+            manufacturer: '',
+            sbjc: '',
             row: {},
             floor: ''
         }
@@ -117,9 +119,25 @@ export default {
                 page: this.currentPage,
                 size: this.size,
                 plazaId: this.$store.state.plazaId,
-                major: this.major,
-                keyword: this.keyword
+                major: this.major
+            }
+            if (this.floor) {
+                data.floor = this.floor
+            }
+            data.keyword = ''
+            if (this.keyword) {
+                data.keyword += `${this.keyword}:brand,sbxh;`
             }
+            if (this.sbjc) {
+                data.keyword += `${this.sbjc}:sbjc;`
+            }
+            if (this.manufacturer) {
+                data.keyword += `${this.manufacturer}:manufacturer;`
+            }
+            if (data.keyword == '') {
+                delete data.keyword
+            }
+
             queryEquipmentList({ data, postParams }).then(res => {
                 console.log(res)
                 this.tableData = res.data.data

+ 51 - 5
src/views/equipment/table/otherTable.vue

@@ -53,6 +53,7 @@
 import { queryQtsx } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
 import { formatter, number_format } from '@/utils/format.js'
+import { querySelect } from '@/api/public.js'
 export default {
     data() {
         return {
@@ -87,30 +88,75 @@ export default {
                 data: {
                     smsxt: this.smsxt,
                     // tab: this.major,
-                    // plazaId: this.$store.state.plazaId,
-                    plazaId: '1000287',
+                    plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
                     size: this.size
                 }
             }
-            queryQtsx({ getParams }).then(res => {
+            queryQtsx(getParams).then(res => {
                 console.log(res)
                 this.tableData = res.data.data
                 this.total = res.data.count
             })
+        },
+        //下拉框查询
+        tabFind() {
+            let postParams = [
+                {
+                    columnName: { lb: 'lb', xm: 'xm', sxjd: 'sxjd', status: 'status' },
+                    tableName: 'v_glsms_zw' //视图名称
+                }
+            ]
+            let major
+            if (this.major.slice(0, 2) == 'GD') {
+                major = '供电'
+            } else if (this.major.slice(0, 2) == 'XF') {
+                major = '消防'
+            } else if (this.major.slice(0, 2) == 'GPS') {
+                major = '给排水'
+            } else if (this.major.slice(0, 2) == 'DT') {
+                major = '电梯'
+            } else if (this.major.slice(0, 2) == 'RQ') {
+                major = '燃气'
+            } else if (this.major.slice(0, 2) == 'RD') {
+                major = '弱电'
+            } else if (this.major.slice(0, 2) == 'NT') {
+                major = '暖通'
+            } else if (this.major.slice(0, 2) == 'TJ') {
+                major = '土建'
+            } else {
+                major = this.major
+            }
+            let data = {
+                major: major,
+                plazaId: '1000287'
+                // plazaId: this.$store.state.plazaId
+            }
+            querySelect({ data, postParams }).then(res => {
+                console.log(res)
+                let lb = res.data.data.v_glsms_zw.lb
+                this.lbOption = []
+                lb.forEach(el => {
+                    this.lbOption.push({
+                        name: el.value,
+                        id: el.key
+                    })
+                })
+            })
         }
     },
     watch: {
         smsxt(newV, oldV) {
             if (newV !== oldV) {
                 // this.tabFind()
-                // this.getList()
+                this.getList()
             }
         }
     },
     mounted() {
+        // this.tabFind()
         console.log(this.smsxt)
-        // this.getList()
+        this.getList()
     }
 }
 </script>

+ 25 - 8
src/views/equipment/table/standTable.vue

@@ -5,15 +5,15 @@
             <el-input
                 placeholder='搜索设备简称'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='sbjc'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
                 placeholder='搜索品牌、型号'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
                 v-model='keyword'
                 style='width:192px;margin-right:12px'
@@ -21,9 +21,9 @@
             <el-input
                 placeholder='搜索生产厂商'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='manufacturer'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <Select @change='getList' v-model='floor' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
@@ -84,7 +84,9 @@ export default {
             size: 11,
             keyword: '',
             floor: '',
-            row: {}
+            row: {},
+            sbjc: '',
+            manufacturer: ''
         }
     },
     props: ['major', 'param'],
@@ -122,10 +124,25 @@ export default {
                 page: this.currentPage,
                 size: this.size,
                 plazaId: this.$store.state.plazaId,
-                major: major,
-                keyword: this.keyword
+                major: major
                 // floor:this.floor
             }
+            if (this.floor) {
+                data.floor = this.floor
+            }
+            data.keyword = ''
+            if (this.keyword) {
+                data.keyword += `${this.keyword}:brand,sbxh;`
+            }
+            if (this.sbjc) {
+                data.keyword += `${this.sbjc}:sbjc;`
+            }
+            if (this.manufacturer) {
+                data.keyword += `${this.manufacturer}:manufacturer;`
+            }
+            if (data.keyword == '') {
+                delete data.keyword
+            }
             queryEquipmentList({ data, postParams }).then(res => {
                 this.tableData = res.data.data
                 this.total = res.data.count

+ 15 - 19
src/views/equipment/table/tjTable.vue

@@ -2,22 +2,8 @@
     <!-- 土建清单 -->
     <div class='tj-list'>
         <div class='eq-list-top'>
-            <el-input
-                placeholder='搜索类别'
-                size='small'
-                @change='getList'
-                prefix-icon='el-icon-search'
-                v-model='keyword'
-                style='width:192px;margin-right:12px'
-            ></el-input>
-            <el-input
-                placeholder='搜索品牌'
-                size='small'
-                @change='getList'
-                prefix-icon='el-icon-search'
-                v-model='keyword'
-                style='width:192px;margin-right:12px'
-            ></el-input>
+            <el-input placeholder='搜索类别' size='small' @blur='getList' prefix-icon='el-icon-search' v-model='lb' style='width:192px;margin-right:12px'></el-input>
+            <el-input placeholder='搜索品牌' size='small' @blur='getList' prefix-icon='el-icon-search' v-model='brand' style='width:192px'></el-input>
         </div>
         <el-table :data='tableData' style='width: 100%'>
             <el-table-column type='index' label='序号' width='80'></el-table-column>
@@ -58,7 +44,8 @@ export default {
             total: 0,
             currentPage: 1,
             size: 11,
-            keyword: ''
+            lb: '',
+            brand: ''
         }
     },
     props: ['param'],
@@ -75,9 +62,18 @@ export default {
                 page: this.currentPage,
                 size: this.size,
                 // plazaId: this.$store.state.plazaId,
-                plazaId: '1000303',
+                plazaId: '1000303'
                 // major: this.major,
-                keyword: this.keyword
+            }
+            getParams.keyword = ''
+            if (this.lb) {
+                getParams.keyword += `${this.lb}:lb;`
+            }
+            if (this.brand) {
+                getParams.keyword += `${this.brand}:brand;`
+            }
+            if (getParams.keyword == '') {
+                delete getParams.keyword
             }
             queryMaterialList({ getParams }).then(res => {
                 this.tableData = res.data

+ 35 - 12
src/views/equipment/table/wbTable.vue

@@ -5,25 +5,25 @@
             <el-input
                 placeholder='搜索设备名称、编号'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='sbjc'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
                 placeholder='搜索重要事项记录、描述'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='matters'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
                 placeholder='搜索任务编号'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='gzglid'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-date-picker
@@ -69,7 +69,7 @@
                 </el-table-column>
             </el-table-column>
             <el-table-column prop='brand' label='现场照片'>
-                <template slot-scope='{row}'>{{row.brand || '--'}}</template>
+                <template slot-scope='{row}'>{{row.pics || '--'}}</template>
             </el-table-column>
             <el-table-column prop='reportdate' label='填报时间'>
                 <template slot-scope='{row}'>{{row.reportdate?formatter(row.reportdate):'--'}}</template>
@@ -77,8 +77,8 @@
             <el-table-column prop='sjjssj' label='验收时间'>
                 <template slot-scope='{row}'>{{row.sjjssj?formatter(row.sjjssj): '--'}}</template>
             </el-table-column>
-            <el-table-column prop='wonum' label='工单编号' show-overflow-tooltip resizable>
-                <template slot-scope='{row}'>{{row.wonum || '--'}}</template>
+            <el-table-column prop='wonum' label='任务编号' show-overflow-tooltip resizable>
+                <template slot-scope='{row}'>{{row.wb_gzglid || '--'}}</template>
             </el-table-column>
         </el-table>
         <div class='foot'>
@@ -122,7 +122,10 @@ export default {
                     name: '否'
                 }
             ],
-            keyword: ''
+            keyword: '',
+            shjc: '',
+            gzglid: '',
+            matters: ''
         }
     },
     props: ['smsxt', 'major'],
@@ -138,13 +141,33 @@ export default {
             let getParams = {
                 data: {
                     smsxt: this.smsxt,
-                    // tab: this.major,
+
                     // plazaId: this.$store.state.plazaId,
                     plazaId: '1000287',
                     page: this.currentPage,
-                    size: this.size
+                    size: this.size,
+                    orderBy: `wb_gzglid,0;sbjbm,1;reportdate,0;`
                 }
             }
+            if (this.sjjssj) {
+                getParams.sjjssj = this.sjjssj
+            }
+            if (this.reportdate) {
+                getParams.reportdate = this.reportdate
+            }
+            getParams.data.keyword = ''
+            if (this.sbjx) {
+                getParams.data.keyword += `${this.sbjc}:sbjc,sbjbm;`
+            }
+            if (this.matters) {
+                getParams.data.keyword += `${this.matters}:matters,description`
+            }
+            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

+ 31 - 8
src/views/equipment/table/wxTable.vue

@@ -5,25 +5,25 @@
             <el-input
                 placeholder='搜索设备名称、编号'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='sbjc'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
                 placeholder='搜索重要事项记录、描述'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='matters'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
-                placeholder='搜索任务编号'
+                placeholder='搜索工单编号'
                 size='small'
-                @change='getList'
+                @blur='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='wonum'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-date-picker
@@ -110,6 +110,9 @@ export default {
             reportdate: '',
             sjjssj: '',
             ischange: '',
+            sbjc: '',
+            matters: '',
+            wonum: '',
             formatter,
             number_format,
             changeOption: [
@@ -142,9 +145,29 @@ export default {
                     // plazaId: this.$store.state.plazaId,
                     plazaId: '1000388',
                     page: this.currentPage,
-                    size: this.size
+                    size: this.size,
+                    orderBy: `sbjbm,0;sjjssj,1`
                 }
             }
+            if (this.sjjssj) {
+                getParams.sjjssj = this.sjjssj
+            }
+            if (this.reportdate) {
+                getParams.reportdate = this.reportdate
+            }
+            getParams.data.keyword = ''
+            if (this.sbjx) {
+                getParams.data.keyword += `${this.sbjc}:sbjc,sbjbm;`
+            }
+            if (this.matters) {
+                getParams.data.keyword += `${this.matters}:matters,description`
+            }
+            if (this.wonum) {
+                getParams.data.wonum += `${this.wonum}:wonum`
+            }
+            if (getParams.data.keyword == '') {
+                delete getParams.data.keyword
+            }
             queryWx(getParams).then(res => {
                 this.tableData = res.data || []
                 this.total = res.count

+ 23 - 4
src/views/equipment/table/zwTable.vue

@@ -9,12 +9,23 @@
             <el-date-picker
                 size='small'
                 v-model='lxsjwcsj'
-                type='date'
-                placeholder='选择立项日期'
+                type='daterange'
+                range-separator='至'
+                start-placeholder='开始立项日期'
+                end-placeholder='结束立项日期'
                 @change='getList'
                 style='width:180px;margin-left:12px;margin-right:12px'
             ></el-date-picker>
-            <el-date-picker size='small' v-model='yssjwcsj' type='date' placeholder='选择验收日期' @change='getList' style='width:180px;margin-right:12px'></el-date-picker>
+            <el-date-picker
+                size='small'
+                v-model='yssjwcsj'
+                type='daterange'
+                range-separator='至'
+                start-placeholder='开始验收日期'
+                end-placeholder='结束验收日期'
+                @change='getList'
+                style='width:180px;margin-right:12px'
+            ></el-date-picker>
             <Select
                 width='180'
                 tipPlace='top'
@@ -28,7 +39,7 @@
                 size='small'
                 @change='getList'
                 prefix-icon='el-icon-search'
-                v-model='keyword'
+                v-model='ssfasm'
                 style='width:192px;margin-right:12px'
             ></el-input>
         </div>
@@ -99,6 +110,7 @@ export default {
             currentPage: 1,
             yssjwcsj: '',
             lxsjwcsj: '',
+            ssfasm: '',
             size: 10,
             keyword: '',
             nd: '',
@@ -201,6 +213,13 @@ export default {
                     size: this.size
                 }
             }
+            getParams.data.keyword = ''
+            if (this.ssfasm) {
+                getParams.data.keyword += `${this.ssfasm}:ssfasm`
+            }
+            if (getParams.data.keyword == '') {
+                delete getParams.data.keyword
+            }
             queryZw(getParams).then(res => {
                 this.tableData = res.data || []
                 this.total = res.count