|
@@ -8,13 +8,8 @@
|
|
<Option v-for="item in energyTypeData" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
<Option v-for="item in energyTypeData" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
</Select>
|
|
</Select>
|
|
</FormItem>
|
|
</FormItem>
|
|
- <!-- <FormItem label="" prop="type">
|
|
|
|
- <Select v-model="tableParams.type" placeholder="仪表类型">
|
|
|
|
- <Option v-for="item in instrumentTypeData" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
|
|
- </Select>
|
|
|
|
- </FormItem> -->
|
|
|
|
- <FormItem label="" prop="equipmentStatus">
|
|
|
|
- <Select v-model="tableParams.equipmentStatus" placeholder="关联用途类项">
|
|
|
|
|
|
+ <!-- <FormItem label="" prop="relationUsage">
|
|
|
|
+ <Select v-model="tableParams.relationUsage" placeholder="关联用途类项">
|
|
<Option v-for="item in associatedUseData" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
<Option v-for="item in associatedUseData" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
</Select>
|
|
</Select>
|
|
</FormItem>
|
|
</FormItem>
|
|
@@ -27,7 +22,7 @@
|
|
<Select v-model="tableParams.equipmentStatus" placeholder="关联设备">
|
|
<Select v-model="tableParams.equipmentStatus" placeholder="关联设备">
|
|
<Option v-for="item in associatedEquipData" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
<Option v-for="item in associatedEquipData" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
</Select>
|
|
</Select>
|
|
- </FormItem>
|
|
|
|
|
|
+ </FormItem> -->
|
|
<FormItem label="" prop="keywords">
|
|
<FormItem label="" prop="keywords">
|
|
<Input placeholder="输入关键字查询" clearable search v-model="tableParams.keywords" />
|
|
<Input placeholder="输入关键字查询" clearable search v-model="tableParams.keywords" />
|
|
</FormItem>
|
|
</FormItem>
|
|
@@ -146,17 +141,15 @@
|
|
<span class="common-modal-top-text">{{item.name}}</span>
|
|
<span class="common-modal-top-text">{{item.name}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="common-modal-content">
|
|
<div class="common-modal-content">
|
|
- <div class="modal-content-item" v-for="(val,i) in item.value" :key="i" :class="{'item-especial': val.name == '说明'|| val.name == '最后通讯时间' && item.value.length%2!=0,'item-especial-bot':(i==item.value.length-1 || i==item.value.length-2) && item.value.length%2==0}">
|
|
|
|
|
|
+ <div class="modal-content-item" v-for="(val,i) in item.value" :key="i" :class="{'item-especial-app': val.name == '归属应用','item-especial': val.name == '说明'|| val.name == '监测能耗分户' && item.value.length%2!=0,'item-especial-bot':(i==item.value.length-1) && item.value.length%2==0}">
|
|
<div class="modal-content-item-name">
|
|
<div class="modal-content-item-name">
|
|
{{val.name}}
|
|
{{val.name}}
|
|
</div>
|
|
</div>
|
|
<div class="modal-content-item-value">
|
|
<div class="modal-content-item-value">
|
|
- <Tooltip placement="top-start" transfer max-width="350" v-if="val.name == '归属线路' || val.name == '归属站点' || val.value || val.value===0">
|
|
|
|
- <span v-if="val.name == '归属线路' || val.name == '归属站点'">{{!val.value ? '/' : val.value}}</span>
|
|
|
|
- <span v-else>{{val.value}}</span>
|
|
|
|
|
|
+ <Tooltip placement="top-start" transfer max-width="350" v-if="val.value || val.value===0">
|
|
|
|
+ <span>{{val.value}}</span>
|
|
<div slot="content">
|
|
<div slot="content">
|
|
- <span v-if="val.name == '归属线路' || val.name == '归属站点'">{{!val.value ? '/' : val.value}}</span>
|
|
|
|
- <span v-else>{{val.value}}</span>
|
|
|
|
|
|
+ <span>{{val.value}}</span>
|
|
</div>
|
|
</div>
|
|
</Tooltip>
|
|
</Tooltip>
|
|
<span v-else>{{val.value}}</span>
|
|
<span v-else>{{val.value}}</span>
|
|
@@ -189,18 +182,11 @@ export default {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 9999
|
|
pageSize: 9999
|
|
},
|
|
},
|
|
- // appParams: {
|
|
|
|
- // applicationId: '',
|
|
|
|
- // equipmentTypeId: '',
|
|
|
|
- // keywords: '',
|
|
|
|
- // pageNum: 1,
|
|
|
|
- // pageSize: 9999
|
|
|
|
- // },
|
|
|
|
loading: true,
|
|
loading: true,
|
|
tableParams: {
|
|
tableParams: {
|
|
applicationId: '',
|
|
applicationId: '',
|
|
- energyConsumptionId: '',
|
|
|
|
instrumentType: '',
|
|
instrumentType: '',
|
|
|
|
+ energyConsumptionId: '',
|
|
keywords: '',
|
|
keywords: '',
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10
|
|
pageSize: 10
|
|
@@ -213,7 +199,6 @@ export default {
|
|
energyTypeModalData: [],
|
|
energyTypeModalData: [],
|
|
instrumentTypeData: [],
|
|
instrumentTypeData: [],
|
|
instrumentTypeModalData: [],
|
|
instrumentTypeModalData: [],
|
|
- stationTypeData: [],
|
|
|
|
associatedUseData: [
|
|
associatedUseData: [
|
|
{
|
|
{
|
|
value: '-1',
|
|
value: '-1',
|
|
@@ -256,16 +241,7 @@ export default {
|
|
value: '0'
|
|
value: '0'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- equipStateModalData: [],
|
|
|
|
- equipTypeData: [],
|
|
|
|
- equipTypeModalData: [],
|
|
|
|
- equipAppModalData: [],
|
|
|
|
columns: [
|
|
columns: [
|
|
- // {
|
|
|
|
- // type: 'selection',
|
|
|
|
- // width: 60,
|
|
|
|
- // align: 'center'
|
|
|
|
- // },
|
|
|
|
{
|
|
{
|
|
title: '仪表号',
|
|
title: '仪表号',
|
|
key: 'code',
|
|
key: 'code',
|
|
@@ -329,6 +305,7 @@ export default {
|
|
width: 120,
|
|
width: 120,
|
|
}
|
|
}
|
|
],
|
|
],
|
|
|
|
+ equipAppModalData: [],
|
|
showModal: false,
|
|
showModal: false,
|
|
detailStatus: false,
|
|
detailStatus: false,
|
|
modalStatus: false,
|
|
modalStatus: false,
|
|
@@ -365,31 +342,16 @@ export default {
|
|
detailLabel: [],
|
|
detailLabel: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- // watch: {
|
|
|
|
- // currentAppId: {
|
|
|
|
- // handler(newValue) {
|
|
|
|
- // console.log(newValue)
|
|
|
|
- // this.tableParams.applicationId = newValue
|
|
|
|
- // this.getTableData()
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // currentEquTypeId: {
|
|
|
|
- // handler(newValue) {
|
|
|
|
- // this.tableParams.equipmentType = newValue
|
|
|
|
- // this.getTableData()
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // },
|
|
|
|
created() {
|
|
created() {
|
|
this.getType()
|
|
this.getType()
|
|
this.getTableData()
|
|
this.getTableData()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- go (){
|
|
|
|
- // this.$router.push({path:'//ApplicationManage'})
|
|
|
|
- // this.$router.push({path:'/MainPage/ApplicationManage/2'})
|
|
|
|
- this.$router.push({ name: 'ApplicationManage', params: { type:2 }}) // -> /home/123
|
|
|
|
- },
|
|
|
|
|
|
+ // go (){
|
|
|
|
+ // // this.$router.push({path:'//ApplicationManage'})
|
|
|
|
+ // // this.$router.push({path:'/MainPage/ApplicationManage/2'})
|
|
|
|
+ // this.$router.push({ name: 'ApplicationManage', params: { type:2 }}) // -> /home/123
|
|
|
|
+ // },
|
|
rowClassName(row, index) {
|
|
rowClassName(row, index) {
|
|
if (index % 2 == 0) {
|
|
if (index % 2 == 0) {
|
|
return "ivu-table-stripe-even";
|
|
return "ivu-table-stripe-even";
|
|
@@ -449,8 +411,9 @@ export default {
|
|
},
|
|
},
|
|
// 获取表格数据
|
|
// 获取表格数据
|
|
getTableData () {
|
|
getTableData () {
|
|
- let params = JSON.parse(JSON.stringify(this.tableParams))
|
|
|
|
- // params.lineId = params.lineId == '-1' ? '':params.lineId
|
|
|
|
|
|
+ let { ...params } = this.tableParams //扩展运算符 复制对象(用扩展运算符对数组或者对象进行拷贝时,只能扩展和深拷贝第一层的值,对于第二层极其以后的值,扩展运算符将不能对其进行打散扩展,也不能对其进行深拷贝,即拷贝后和拷贝前第二层中的对象或者数组仍然引用的是同一个地址,其中一方改变,另一方也跟着改变)
|
|
|
|
+ // let params = JSON.parse(JSON.stringify(this.tableParams)) //使用JSON.Stringify 转换的数据中,如果包含 function,undefined,Symbol,这几种类型,不可枚举属性, JSON.Stringify序列化后,这个键值对会消失
|
|
|
|
+ params.energyConsumptionId = params.energyConsumptionId == '-1' ? '':params.energyConsumptionId
|
|
// params.stationId = params.stationId == '-1'?'':params.stationId
|
|
// params.stationId = params.stationId == '-1'?'':params.stationId
|
|
// params.equipmentStatus = params.equipmentStatus == '-1' ?'':params.equipmentStatus
|
|
// params.equipmentStatus = params.equipmentStatus == '-1' ?'':params.equipmentStatus
|
|
this.loading = true
|
|
this.loading = true
|
|
@@ -477,7 +440,6 @@ export default {
|
|
searchClick () {
|
|
searchClick () {
|
|
this.tableParams.pageNum = 1
|
|
this.tableParams.pageNum = 1
|
|
this.getTableData()
|
|
this.getTableData()
|
|
- // this.$router.push({ path: '/MainPage/ApplicationManage', query: {deptName: "2"}})
|
|
|
|
},
|
|
},
|
|
resetClick (name) {
|
|
resetClick (name) {
|
|
this.$refs[name].resetFields()
|
|
this.$refs[name].resetFields()
|
|
@@ -492,7 +454,7 @@ export default {
|
|
detailClick (row) {
|
|
detailClick (row) {
|
|
this.rowObj = row
|
|
this.rowObj = row
|
|
this.detailStatus = true
|
|
this.detailStatus = true
|
|
- this.$get('metroapi/equipment/equipmentDetail', {equipmentId:row.id}).then(res=>{
|
|
|
|
|
|
+ this.$get('metroapi/instrument/viewInstrument', {instrumentId:row.id}).then(res=>{
|
|
if (res.httpCode == 1 ){
|
|
if (res.httpCode == 1 ){
|
|
this.detailLabel = res.data
|
|
this.detailLabel = res.data
|
|
} else {
|
|
} else {
|
|
@@ -502,12 +464,7 @@ export default {
|
|
},
|
|
},
|
|
editClick (row) {
|
|
editClick (row) {
|
|
this.rowObj = row
|
|
this.rowObj = row
|
|
- this.formOption = JSON.parse(JSON.stringify(row));
|
|
|
|
- // this.formOption.lineId = this.formOption.lineId ? String(this.formOption.lineId) : '-1'
|
|
|
|
- // this.formOption.stationId = this.formOption.stationId ? String(this.formOption.stationId) : '-1'
|
|
|
|
- // this.getStationData(this.formOption.lineId)
|
|
|
|
- // this.appParams.applicationId = this.formOption.appId
|
|
|
|
- // this.getAddEquipType(this.appParams)
|
|
|
|
|
|
+ this.formOption = JSON.parse(JSON.stringify(row))
|
|
this.title = '编辑仪表'
|
|
this.title = '编辑仪表'
|
|
this.showModal = true
|
|
this.showModal = true
|
|
},
|
|
},
|
|
@@ -754,6 +711,19 @@ export default {
|
|
line-height: 45px;
|
|
line-height: 45px;
|
|
border-bottom: 1px solid #21437B;
|
|
border-bottom: 1px solid #21437B;
|
|
}
|
|
}
|
|
|
|
+>>> .item-especial-app {
|
|
|
|
+ width: 100%;
|
|
|
|
+}
|
|
|
|
+>>> .item-especial-app .modal-content-item-name{
|
|
|
|
+ width: 25%;
|
|
|
|
+ height: 45px;
|
|
|
|
+ line-height: 45px;
|
|
|
|
+}
|
|
|
|
+>>> .item-especial-app .modal-content-item-value{
|
|
|
|
+ width: 75%;
|
|
|
|
+ height: 45px;
|
|
|
|
+ line-height: 45px;
|
|
|
|
+}
|
|
>>> .item-especial-bot .modal-content-item-name {
|
|
>>> .item-especial-bot .modal-content-item-name {
|
|
border-bottom: 1px solid #21437B;
|
|
border-bottom: 1px solid #21437B;
|
|
}
|
|
}
|