|
@@ -1,537 +0,0 @@
|
|
|
-<template>
|
|
|
- <!-- 详情页面 -->
|
|
|
- <div class='gdqd-dialog'>
|
|
|
- <div class='top'></div>
|
|
|
- <div class='gdqd-dialog-top'>
|
|
|
- <el-input
|
|
|
- placeholder='搜索设备简称编号'
|
|
|
- style='width:192px;margin-right:12px'
|
|
|
- size='small'
|
|
|
- prefix-icon='el-icon-search'
|
|
|
- v-model='sbjc'
|
|
|
- clearable
|
|
|
- @keyup.enter.native='queryTableList'
|
|
|
- @blur='queryTableList'
|
|
|
- ></el-input>
|
|
|
- <Select v-model='sbglgs' width='180' tipPlace='top' caption='管理归属:' size='small' :selectdata='sbglgsOption' @change='queryTableList'></Select>
|
|
|
- <Select
|
|
|
- width='160'
|
|
|
- style='margin: 0 12px;'
|
|
|
- v-model='status'
|
|
|
- tipPlace='top'
|
|
|
- caption='设备状态:'
|
|
|
- size='small'
|
|
|
- :selectdata='statusOption'
|
|
|
- @change='queryTableList'
|
|
|
- ></Select>
|
|
|
- <el-input
|
|
|
- placeholder='搜索品牌、型号'
|
|
|
- style='width:180px;margin-right:12px'
|
|
|
- size='small'
|
|
|
- clearable
|
|
|
- prefix-icon='el-icon-search'
|
|
|
- v-model='brand'
|
|
|
- @keyup.enter.native='queryTableList'
|
|
|
- @blur='queryTableList'
|
|
|
- ></el-input>
|
|
|
- <Select
|
|
|
- width='150'
|
|
|
- style='margin-right:12px;'
|
|
|
- v-model='floor'
|
|
|
- tipPlace='top'
|
|
|
- caption='楼层:'
|
|
|
- size='small'
|
|
|
- :selectdata='floorAllSelect'
|
|
|
- @change='queryTableList'
|
|
|
- ></Select>
|
|
|
- <el-input
|
|
|
- placeholder='搜索安装位置'
|
|
|
- @keyup.enter.native='queryTableList'
|
|
|
- @blur='queryTableList'
|
|
|
- clearable
|
|
|
- style='width:180px;margin-right:12px'
|
|
|
- size='small'
|
|
|
- prefix-icon='el-icon-search'
|
|
|
- v-model='wzjc'
|
|
|
- ></el-input>
|
|
|
- <!-- 多余的筛选 -->
|
|
|
- <input-dialog :type='1' @confirm='confirm'></input-dialog>
|
|
|
- </div>
|
|
|
- <div class='table1'>
|
|
|
- <el-table
|
|
|
- @row-click='innerTable'
|
|
|
- :data='tableData'
|
|
|
- :key='key'
|
|
|
- :border='true'
|
|
|
- style='width: 100%;'
|
|
|
- :height='145'
|
|
|
- :max-height='250'
|
|
|
- :row-style='{height: "30px"}'
|
|
|
- >
|
|
|
- <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
|
|
|
- <el-table-column prop='sbjc' label='设备名称' show-overflow-tooltip resizable min-width='150'>
|
|
|
- <template slot-scope='{row}'>{{row.sbjc || '--'}}</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='sl' label='数量' width='60'>
|
|
|
- <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
|
|
|
- </el-table-column>-->
|
|
|
- <el-table-column prop='sbglgs' label='管理归属' show-overflow-tooltip resizable>
|
|
|
- <template slot-scope='{row}'>{{row.sbglgs || '--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop='sb_status' label='设备状态' width='80' show-overflow-tooltip resizable>
|
|
|
- <template slot-scope='{row}'>{{row.sb_status || '--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop='brand' label='品牌' show-overflow-tooltip resizable width='80'>
|
|
|
- <template slot-scope='{row}'>{{row.brand || '--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop='sbxh' label='型号' show-overflow-tooltip resizable width='80'>
|
|
|
- <template slot-scope='{row}'>{{row.sbxh || '--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop='floor' sortable label='楼层' width='70' show-overflow-tooltip resizable>
|
|
|
- <template slot-scope='{row}'>{{row.floorcode || '--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop='wzjc' label='安装位置' show-overflow-tooltip resizable min-width='150'>
|
|
|
- <template slot-scope='{row}'>{{row.wzjc || '--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop='manufacturer' label='生产厂商' show-overflow-tooltip resizable min-width='150'>
|
|
|
- <template slot-scope='{row}'>{{row.manufacturer || '--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop='fws' label='服务商' show-overflow-tooltip resizable min-width='150'>
|
|
|
- <template slot-scope='{row}'>{{row.fws || '--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='相关资料' show-overflow-tooltip resizable min-width='150'>
|
|
|
- <template slot-scope='{row}'>{{'--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 注释底部分页 -->
|
|
|
- <!-- <div class='foot'>
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- layout='prev, pager, next'
|
|
|
- :total='total'
|
|
|
- :current-page.sync='page'
|
|
|
- :page-size='size'
|
|
|
- @prev-click='pageChanged'
|
|
|
- @next-click='pageChanged'
|
|
|
- @current-change='pageChanged'
|
|
|
- ></el-pagination>
|
|
|
- </div>-->
|
|
|
-
|
|
|
- <!-- 底部表格 -->
|
|
|
- <div class='table-bottom'>
|
|
|
- <div class='title'>
|
|
|
- <div class='text'>维保:</div>
|
|
|
- <div class='d-tab d-tab-left' :class='{active:currentTab === 0}' @click='changeTab(0)'>重要维保</div>
|
|
|
- <div class='d-tab d-tab-right' :class='{active:currentTab === 1}' @click='changeTab(1)'>日常维保</div>
|
|
|
- <div class='text text-r'>维修:</div>
|
|
|
- <div class='d-tab d-tab-left' :class='{active:currentTab === 2}' @click='changeTab(2)'>重要维修</div>
|
|
|
- <div class='d-tab d-tab-right' :class='{active:currentTab === 3}' @click='changeTab(3)'>日常维修</div>
|
|
|
- <!-- <el-tabs v-model='activeName' class='tab2' @tab-click='changeTable'> -->
|
|
|
- </div>
|
|
|
- <!-- TODO: 显示各个表格 -->
|
|
|
- <div class='table2-container'>
|
|
|
- <component
|
|
|
- :is='currentComponent'
|
|
|
- :ref='currentComponent'
|
|
|
- :smsxt='rowData.system_code'
|
|
|
- :tabLabel='tabLabel[currentComponent]'
|
|
|
- :diff='diff'
|
|
|
- :assetnum='rowData.assetnum'
|
|
|
- :size='5'
|
|
|
- ></component>
|
|
|
- <!-- :max-height='220' -->
|
|
|
- <!-- <wbTable ref='wb1' :smsxt='1004' tabLabel='重要维保' diff :assetnum='11266' :size='3' /> -->
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-<script>
|
|
|
-import { Select } from 'meri-design'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
-import { queryAsset } from '@/api/equipmentList.js'
|
|
|
-import { querySelect } from '@/api/public.js'
|
|
|
-import inputDialog from './inputDIalog'
|
|
|
-import wbTable from './wbTable'
|
|
|
-import rcwbTable from './rcwbTable'
|
|
|
-import wxTable from './wxTable'
|
|
|
-import rcwxTable from './rcwxTable'
|
|
|
-import { cloneDeep } from '../../../components/Select/utils'
|
|
|
-
|
|
|
-export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- tableData: [],
|
|
|
- dataSelect2: [
|
|
|
- { id: 'test1', name: '选择项' },
|
|
|
- { id: 'test2', name: '单平米' },
|
|
|
- { id: 'test3', name: '下级分项' },
|
|
|
- { id: 'test4', name: '滑动平均滑动平均' },
|
|
|
- ],
|
|
|
- // page: 1,
|
|
|
- size: 100,
|
|
|
- total: 1,
|
|
|
- page: 1,
|
|
|
- sbjc: '',
|
|
|
- brand: '',
|
|
|
- wzjc: '',
|
|
|
- floor: '1',
|
|
|
- status: '1',
|
|
|
- manufacturer: '',
|
|
|
- fws: '',
|
|
|
- sbglgs: '1',
|
|
|
- sbglgsOption: [],
|
|
|
- statusOption: [],
|
|
|
- floorAllSelect: [],
|
|
|
- key: 0,
|
|
|
- currentTab: 0, //选中页签,默认重要维保
|
|
|
- currentComponent: 'wbTable', //选中的组件,默认 重要维保
|
|
|
- componentArr: ['wbTable', 'rcwbTable', 'wxTable', 'rcwxTable'], //下部表格组件列表
|
|
|
- tabLabel: {
|
|
|
- //下部表格组件列表使用label
|
|
|
- wbTable: '重要维保',
|
|
|
- rcwbTable: '日常维保',
|
|
|
- wxTable: '重要维修',
|
|
|
- rcwxTable: '日常维保',
|
|
|
- },
|
|
|
- diff: '', //?
|
|
|
- rowData: {}, //行数据,供下部表格使用参数
|
|
|
- }
|
|
|
- },
|
|
|
- components: { Select, inputDialog, wbTable, rcwbTable, wxTable, rcwxTable },
|
|
|
- computed: {
|
|
|
- ...mapGetters(['floorSelect']),
|
|
|
- },
|
|
|
- props: ['row', 'major', 'sign'],
|
|
|
- mounted() {
|
|
|
- this.queryTableList()
|
|
|
- this.tabFind()
|
|
|
- this.getFloorAllSelect()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // 上部表格行点击
|
|
|
- innerTable(row) {
|
|
|
- console.log(row)
|
|
|
- // 设置下部表格使用的行数据
|
|
|
- this.rowData = cloneDeep(row)
|
|
|
- // TODO:
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs[this.currentComponent].startMethods()
|
|
|
- })
|
|
|
- if (row.assetuid) {
|
|
|
- window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=assetdevic&uniqueid=${row.assetuid}`)
|
|
|
- }
|
|
|
- },
|
|
|
- //序号的方法
|
|
|
- indexMethod(index) {
|
|
|
- if (this.page) {
|
|
|
- return (this.page - 1) * this.size + index + 1
|
|
|
- }
|
|
|
- },
|
|
|
- //多余输入框监听
|
|
|
- confirm(fws, manufacturer) {
|
|
|
- //console.log(fws, manufacturer, '------')
|
|
|
- this.fws = fws
|
|
|
- this.manufacturer = manufacturer
|
|
|
- this.queryTableList()
|
|
|
- },
|
|
|
- //下拉框查询
|
|
|
- tabFind() {
|
|
|
- let postParams = [
|
|
|
- {
|
|
|
- columnName: { sbglgs: 'sbglgs', sb_status: 'sb_status' },
|
|
|
- params: {
|
|
|
- type_code: this.row.type_code,
|
|
|
- },
|
|
|
- tableName: 'sms_asset', //视图名称
|
|
|
- },
|
|
|
- ]
|
|
|
- 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 {
|
|
|
- major = this.major
|
|
|
- }
|
|
|
- let data = {
|
|
|
- major: major,
|
|
|
- plazaId: this.$store.state.plazaId,
|
|
|
- }
|
|
|
- if (major != '土建') {
|
|
|
- data.onlyMainAsset = true
|
|
|
- }
|
|
|
- querySelect({ data, postParams }).then((res) => {
|
|
|
- //console.log(res)
|
|
|
- let sb_status = res.data.data.sms_asset.sb_status
|
|
|
- let sbglgs = res.data.data.sms_asset.sbglgs
|
|
|
- this.sbglgsOption = []
|
|
|
- this.sbglgsOption.push({
|
|
|
- name: '全部',
|
|
|
- id: '1',
|
|
|
- })
|
|
|
- this.statusOption = []
|
|
|
- this.statusOption.push({
|
|
|
- name: '全部',
|
|
|
- id: '1',
|
|
|
- })
|
|
|
- sb_status.forEach((el) => {
|
|
|
- this.statusOption.push({
|
|
|
- name: el.value,
|
|
|
- id: el.key,
|
|
|
- })
|
|
|
- })
|
|
|
- sbglgs.forEach((el) => {
|
|
|
- this.sbglgsOption.push({
|
|
|
- name: el.value,
|
|
|
- id: el.key,
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- pageChanged(page) {
|
|
|
- this.page = page
|
|
|
- this.queryTableList()
|
|
|
- },
|
|
|
- queryTableList() {
|
|
|
- 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 {
|
|
|
- major = this.major
|
|
|
- }
|
|
|
- let data = {
|
|
|
- major: major,
|
|
|
- plazaId: this.$store.state.plazaId,
|
|
|
- page: this.page,
|
|
|
- // size: this.size,
|
|
|
- }
|
|
|
- //区分主要设备
|
|
|
- if (this.major != '土建') {
|
|
|
- data.onlyMainAsset = true
|
|
|
- }
|
|
|
- //输入框搜索
|
|
|
- data.keyword = ''
|
|
|
- if (this.sbjc) {
|
|
|
- data.keyword += `${this.sbjc}:sbjc,assetnum;`
|
|
|
- }
|
|
|
- if (this.brand) {
|
|
|
- data.keyword += `${this.brand}:brand,sbxh;`
|
|
|
- }
|
|
|
- if (this.wzjc) {
|
|
|
- data.keyword += `${this.wzjc}:wzjc;`
|
|
|
- }
|
|
|
- if (this.manufacturer) {
|
|
|
- data.keyword += `${this.manufacturer}:manufacturer;`
|
|
|
- }
|
|
|
- if (this.fws) {
|
|
|
- data.keyword += `${this.fws}:fws;`
|
|
|
- }
|
|
|
- if (data.keyword == '') {
|
|
|
- delete data.keyword
|
|
|
- }
|
|
|
- let postParams = {
|
|
|
- classstructureid: this.row.classstructureid,
|
|
|
- type_code: this.row.type_code,
|
|
|
- manufacturer: this.row.manufacturer || '--',
|
|
|
- sbxh: this.row.sbxh || '--',
|
|
|
- brand: this.row.brand || '--',
|
|
|
- }
|
|
|
- //下拉筛选
|
|
|
- if (this.floor && this.floor != 1) {
|
|
|
- postParams.gname = this.floor
|
|
|
- }
|
|
|
- if (this.sbglgs && this.sbglgs != 1) {
|
|
|
- postParams.sbglgs = this.sbglgs
|
|
|
- }
|
|
|
- if (this.status && this.status != 1) {
|
|
|
- postParams.status = this.status
|
|
|
- }
|
|
|
- queryAsset({ data, postParams }).then((res) => {
|
|
|
- //console.log(res)
|
|
|
- this.tableData = res.data.data
|
|
|
- this.total = res.data.count
|
|
|
- this.key++
|
|
|
- // 设置下部表格使用的行数据
|
|
|
- if (this.tableData[0]) {
|
|
|
- this.rowData = cloneDeep(this.tableData[0])
|
|
|
- } else {
|
|
|
- this.rowData = {}
|
|
|
- }
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs[this.currentComponent].startMethods()
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- getFloorAllSelect() {
|
|
|
- this.floorAllSelect = []
|
|
|
- this.floorAllSelect.push({
|
|
|
- id: '1',
|
|
|
- name: '全部',
|
|
|
- })
|
|
|
- this.floorSelect.forEach((el) => {
|
|
|
- this.floorAllSelect.push(el)
|
|
|
- })
|
|
|
- console.log(this.floorAllSelect)
|
|
|
- },
|
|
|
- changePageEvent() {
|
|
|
- if (this.sign == 1) {
|
|
|
- this.page = 1
|
|
|
- }
|
|
|
- },
|
|
|
- // 更改tab页签
|
|
|
- changeTab(index) {
|
|
|
- this.currentTab = index
|
|
|
- this.currentComponent = this.componentArr[index]
|
|
|
- // TODO:
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs[this.currentComponent].startMethods()
|
|
|
- })
|
|
|
- },
|
|
|
- },
|
|
|
- watch: {
|
|
|
- row: {
|
|
|
- handler(newV, oldV) {
|
|
|
- // 初始化数据
|
|
|
- this.currentTab = 0
|
|
|
- this.currentComponent = 'wxTable'
|
|
|
- this.rowData = {}
|
|
|
- //
|
|
|
- this.changePageEvent()
|
|
|
- this.queryTableList()
|
|
|
- this.getFloorAllSelect()
|
|
|
- this.tabFind()
|
|
|
- },
|
|
|
- deep: true,
|
|
|
- },
|
|
|
- sbglgs() {
|
|
|
- this.changePageEvent()
|
|
|
- this.queryTableList()
|
|
|
- },
|
|
|
- status() {
|
|
|
- this.changePageEvent()
|
|
|
- this.queryTableList()
|
|
|
- },
|
|
|
- floor() {
|
|
|
- this.changePageEvent()
|
|
|
- this.queryTableList()
|
|
|
- },
|
|
|
- },
|
|
|
-}
|
|
|
-</script>
|
|
|
-<style lang="less" scoped>
|
|
|
-.gdqd-dialog {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- .gdqd-dialog-top {
|
|
|
- display: flex;
|
|
|
- margin-bottom: 12px;
|
|
|
- }
|
|
|
- td {
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- }
|
|
|
- .foot {
|
|
|
- height: 32px;
|
|
|
- display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- margin-top: 28px;
|
|
|
- }
|
|
|
- // 上部表格样式
|
|
|
- // .table1 {
|
|
|
- // width: 100%;
|
|
|
- // // max-height: 170px;
|
|
|
- // padding: 0;
|
|
|
- // overflow: scroll;
|
|
|
- // /deep/.el-table {
|
|
|
- // width: 100%;
|
|
|
- // height: 100%;
|
|
|
- // overflow: scroll;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // 底部表格
|
|
|
- .table-bottom {
|
|
|
- width: 100%;
|
|
|
- flex: 1;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- // tab 样式
|
|
|
- .title {
|
|
|
- display: flex;
|
|
|
- height: 70px;
|
|
|
- line-height: 30px;
|
|
|
- align-items: center;
|
|
|
- padding: 15px 0;
|
|
|
- // 维修维保文本
|
|
|
- .text {
|
|
|
- width: 50px;
|
|
|
- }
|
|
|
- .text-r {
|
|
|
- margin-left: 100px;
|
|
|
- }
|
|
|
- // tab页签
|
|
|
- .d-tab {
|
|
|
- padding: 5px 16px;
|
|
|
- height: 30px;
|
|
|
- line-height: 22px;
|
|
|
- font-size: 14px;
|
|
|
- font-family: MicrosoftYaHei;
|
|
|
- font-weight: 500;
|
|
|
- color: #1f2429;
|
|
|
- text-align: center;
|
|
|
- border: 1px solid #c3c7cb;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- .d-tab-left {
|
|
|
- border-radius: 4px 0 0 4px;
|
|
|
- }
|
|
|
- .d-tab-right {
|
|
|
- border-radius: 0 4px 4px 0;
|
|
|
- }
|
|
|
- // 当前选中页签
|
|
|
- .active {
|
|
|
- color: #025baa !important;
|
|
|
- border-color: #025baa !important;
|
|
|
- }
|
|
|
- }
|
|
|
- //筛选+表格
|
|
|
- .table2-container {
|
|
|
- width: 100%;
|
|
|
- flex: 1;
|
|
|
- position: relative;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-@media screen and (max-width: 1600px) {
|
|
|
- .gdqd-dialog td {
|
|
|
- padding: 4px 0;
|
|
|
- }
|
|
|
-}
|
|
|
-</style>
|
|
|
-<style lang="less">
|
|
|
-.gdqd-dialog {
|
|
|
- /deep/.el-table td {
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
-}
|
|
|
-</style>
|