|
@@ -1,39 +1,63 @@
|
|
<template>
|
|
<template>
|
|
<div class="content-main common-scroll">
|
|
<div class="content-main common-scroll">
|
|
- <div class="content-body">
|
|
|
|
- <Row :gutter="8" style="width:100%;height:100%">
|
|
|
|
- <i-col span="24" style="height:100%">
|
|
|
|
- <div class="right-main">
|
|
|
|
- <div class="manage-main-top">
|
|
|
|
- <Button icon="ios-add" class="common-add-btn" @click="addClick">新增设备类型</Button>
|
|
|
|
- </div>
|
|
|
|
- <div class="manage-main-center">
|
|
|
|
- <Table :columns="columns" :data="tableData" class="common-table" no-data-text="" :row-class-name="rowClassName" :loading="loading">
|
|
|
|
- <template slot="loading">
|
|
|
|
- <Loading-animation></Loading-animation>
|
|
|
|
- </template>
|
|
|
|
- <template slot-scope="{ row }" slot="action">
|
|
|
|
- <Tooltip content="详情" placement="top">
|
|
|
|
- <i class="iconfont icon-xiangqingmingxi" style="cursor:pointer;color:#B8B532;fontSize:20px;marginRight:6px" @click="detailClick(row)"></i>
|
|
|
|
- </Tooltip>
|
|
|
|
- <Tooltip content="编辑" placement="top">
|
|
|
|
- <i class="iconfont icon-bianji" style="cursor:pointer;color:#64ACFE;fontSize:20px;marginRight:6px" @click="editClick(row)"></i>
|
|
|
|
- </Tooltip>
|
|
|
|
- <Tooltip content="删除" placement="top">
|
|
|
|
- <i class="iconfont icon-shanchu" style="cursor:pointer;color:#E92E2E;fontSize:20px;marginRight:6px" @click="delClick(row)"></i>
|
|
|
|
- </Tooltip>
|
|
|
|
- </template>
|
|
|
|
- </Table>
|
|
|
|
- </div>
|
|
|
|
- <div class="common-page">
|
|
|
|
- <div class="common-page-total">
|
|
|
|
- 共<span>{{tablePage}}</span>页 / <span>{{tableTotal}}</span>条数据
|
|
|
|
- </div>
|
|
|
|
- <Page :total="tableTotal" :current="tableParams.pageNum" :page-size="tableParams.pageSize" @on-change="changePage" @on-page-size-change="sizeChange" show-elevator />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </i-col>
|
|
|
|
- </Row>
|
|
|
|
|
|
+ <div class="search-list">
|
|
|
|
+ <div class="search-left">
|
|
|
|
+ <Form class="common-form common-form-list" ref="tableParams" :model="tableParams" inline>
|
|
|
|
+ <FormItem label="" prop="energyConsumptionId">
|
|
|
|
+ <Select v-model="tableParams.energyConsumptionId" placeholder="能耗类型">
|
|
|
|
+ <Option v-for="item in energyTypeData" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
|
|
+ </Select>
|
|
|
|
+ </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="接入仪表数量">
|
|
|
|
+ <Option v-for="item in associatedEquipData" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem label="" prop="keywords">
|
|
|
|
+ <Input placeholder="输入关键字查询" clearable search v-model="tableParams.keywords" />
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem label="" >
|
|
|
|
+ <Button type="primary" class="common-btn-search" @click="searchClick">
|
|
|
|
+ <Icon type="ios-search" style="margin-right:4px;font-size: 16px"/> 筛选
|
|
|
|
+ </Button>
|
|
|
|
+ <Button type="primary" class="common-btn-search" style="margin-left:10px" @click="resetClick('tableParams')">
|
|
|
|
+ <Icon type="ios-search" style="margin-right:4px;font-size: 16px"/> 重置
|
|
|
|
+ </Button>
|
|
|
|
+ </FormItem>
|
|
|
|
+ </Form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="btn-container">
|
|
|
|
+ <Button icon="ios-add" class="common-add-btn" @click="addClick">新增仪表类型</Button>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="manage-main-center">
|
|
|
|
+ <Table :columns="columns" :data="tableData" class="common-table app-table" no-data-text="" :row-class-name="rowClassName" :loading="loading">
|
|
|
|
+ <template slot="loading">
|
|
|
|
+ <Loading-animation></Loading-animation>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="{ row }" slot="action">
|
|
|
|
+ <Tooltip content="详情" placement="top">
|
|
|
|
+ <i class="iconfont icon-xiangqingmingxi" style="cursor:pointer;color:#B8B532;fontSize:20px;marginRight:6px" @click="detailClick(row)"></i>
|
|
|
|
+ </Tooltip>
|
|
|
|
+ <Tooltip content="编辑" placement="top">
|
|
|
|
+ <i class="iconfont icon-bianji" style="cursor:pointer;color:#64ACFE;fontSize:20px;marginRight:6px" @click="editClick(row)"></i>
|
|
|
|
+ </Tooltip>
|
|
|
|
+ <Tooltip content="删除" placement="top">
|
|
|
|
+ <i class="iconfont icon-shanchu" style="cursor:pointer;color:#E92E2E;fontSize:20px;marginRight:6px" @click="delClick(row)"></i>
|
|
|
|
+ </Tooltip>
|
|
|
|
+ </template>
|
|
|
|
+ </Table>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="common-page">
|
|
|
|
+ <div class="common-page-total">
|
|
|
|
+ 共<span>{{tablePage}}</span>页 / <span>{{tableTotal}}</span>条数据
|
|
|
|
+ </div>
|
|
|
|
+ <Page :total="tableTotal" :current="tableParams.pageNum" :page-size="tableParams.pageSize" @on-change="changePage" @on-page-size-change="sizeChange" show-elevator />
|
|
</div>
|
|
</div>
|
|
<Modal
|
|
<Modal
|
|
v-model="showModal"
|
|
v-model="showModal"
|
|
@@ -45,11 +69,16 @@
|
|
:mask-closable="false"
|
|
:mask-closable="false"
|
|
@on-visible-change="modalChange"
|
|
@on-visible-change="modalChange"
|
|
class-name="common-modal">
|
|
class-name="common-modal">
|
|
- <Form class="common-form" ref="formOption" :model="formOption" :rules="ruleValidate" :label-width="120">
|
|
|
|
- <FormItem label="类型名称:" prop="name">
|
|
|
|
|
|
+ <Form class="common-form" ref="formOption" :model="formOption" :rules="ruleValidate" :label-width="130">
|
|
|
|
+ <FormItem label="能耗类型名称:" prop="energyConsumptionId">
|
|
|
|
+ <Select v-model="formOption.energyConsumptionId" placeholder="能耗类型">
|
|
|
|
+ <Option v-for="item in energyTypeModalData" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem label="仪表类型名称:" prop="name">
|
|
<Input v-model.trim="formOption.name" maxlength="20" show-word-limit />
|
|
<Input v-model.trim="formOption.name" maxlength="20" show-word-limit />
|
|
</FormItem>
|
|
</FormItem>
|
|
- <FormItem label="说明:" prop="remark">
|
|
|
|
|
|
+ <FormItem label="备注:" prop="remark">
|
|
<Input v-model="formOption.remark" type="textarea" :rows="6" maxlength="200" show-word-limit />
|
|
<Input v-model="formOption.remark" type="textarea" :rows="6" maxlength="200" show-word-limit />
|
|
</FormItem>
|
|
</FormItem>
|
|
</Form>
|
|
</Form>
|
|
@@ -74,44 +103,10 @@
|
|
<Button type="primary" @click="commonOk">确定</Button>
|
|
<Button type="primary" @click="commonOk">确定</Button>
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
</Modal>
|
|
- <Modal
|
|
|
|
- v-model="detailStatus"
|
|
|
|
- title="设备类型信息"
|
|
|
|
- width="45"
|
|
|
|
- ref="modalGrag"
|
|
|
|
- draggable
|
|
|
|
- reset-drag-position
|
|
|
|
- footer-hide
|
|
|
|
- :mask-closable="false"
|
|
|
|
- @on-visible-change="modalDetailChange"
|
|
|
|
- class-name="common-modal common-modal-detail">
|
|
|
|
- <Tabs :value="currentModalTabs" @on-click="tabsClick" class="common-tabs">
|
|
|
|
- <TabPane v-for="tab in tabsModalData" :key="tab.label" :label="tab.label" :name="tab.label"></TabPane>
|
|
|
|
- </Tabs>
|
|
|
|
- <div v-for="(item,index) in detailLabel" :key="index" v-show="currentModalTabs =='设备类型信息'">
|
|
|
|
- <div class="common-modal-top" :class="{'common-modal-top-especial': index==1}">
|
|
|
|
- <span class="common-modal-top-text">{{item.name}}</span>
|
|
|
|
- </div>
|
|
|
|
- <div class="common-modal-content" v-if="index==0">
|
|
|
|
- <div class="modal-content-item" v-for="(val,i) in item.value" :key="i" :class="{'item-especial': val.name == '说明' }">
|
|
|
|
- <div class="modal-content-item-name">{{val.name}}</div>
|
|
|
|
- <div class="modal-content-item-value">
|
|
|
|
- <Tooltip placement="top-start" transfer max-width="350" v-if="val.value || (typeof(val.value)=='number' && val.value==0)">
|
|
|
|
- <span>{{val.value}}</span>
|
|
|
|
- <div slot="content">
|
|
|
|
- <span>{{val.value}}</span>
|
|
|
|
- </div>
|
|
|
|
- </Tooltip>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <rolling-detail-table :columns1="columnsModal" :apiUrl="apiUrl" ref="detailTable" class="rolling-detail-table"></rolling-detail-table>
|
|
|
|
- </Modal>
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-const defaultFrom = {name: '',remark: ''}
|
|
|
|
|
|
+const defaultFrom = {energyConsumptionId:'',name: '',remark: ''}
|
|
import _ from 'lodash'
|
|
import _ from 'lodash'
|
|
export default {
|
|
export default {
|
|
name: "InstruTypeManage",
|
|
name: "InstruTypeManage",
|
|
@@ -122,9 +117,10 @@ export default {
|
|
tableTotal: 0,
|
|
tableTotal: 0,
|
|
tablePage: 0,
|
|
tablePage: 0,
|
|
tableParams: {
|
|
tableParams: {
|
|
- equipmentTypeId: '',
|
|
|
|
applicationId: '',
|
|
applicationId: '',
|
|
- name: '',
|
|
|
|
|
|
+ energyConsumptionId: '',
|
|
|
|
+ instrumentType: '',
|
|
|
|
+ keywords: '',
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10
|
|
pageSize: 10
|
|
},
|
|
},
|
|
@@ -132,26 +128,32 @@ export default {
|
|
tableData: [],
|
|
tableData: [],
|
|
columns: [
|
|
columns: [
|
|
{
|
|
{
|
|
- title: '设备类型名称',
|
|
|
|
|
|
+ title: '仪表类型名称(唯一)',
|
|
key: 'name',
|
|
key: 'name',
|
|
align: 'center',
|
|
align: 'center',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
tooltip: true
|
|
tooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '关联应用数量',
|
|
|
|
- key: 'appCount',
|
|
|
|
- align: 'center'
|
|
|
|
|
|
+ title: '能耗类型',
|
|
|
|
+ key: 'energyConsumptionName',
|
|
|
|
+ align: 'center',
|
|
|
|
+ ellipsis: true,
|
|
|
|
+ tooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '接入设备数量',
|
|
|
|
|
|
+ title: '关联应用数量',
|
|
key: 'equipmentCount',
|
|
key: 'equipmentCount',
|
|
- align: 'center'
|
|
|
|
|
|
+ align: 'center',
|
|
|
|
+ ellipsis: true,
|
|
|
|
+ tooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '监测指标',
|
|
|
|
|
|
+ title: '接入仪表数量',
|
|
key: 'targetCount',
|
|
key: 'targetCount',
|
|
- align: 'center'
|
|
|
|
|
|
+ align: 'center',
|
|
|
|
+ ellipsis: true,
|
|
|
|
+ tooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '操作',
|
|
title: '操作',
|
|
@@ -161,108 +163,48 @@ export default {
|
|
}
|
|
}
|
|
],
|
|
],
|
|
rowObj: {},
|
|
rowObj: {},
|
|
- formOption: {name: '',remark:''},
|
|
|
|
|
|
+ formOption: {energyConsumptionId:'',name: '',remark: ''},
|
|
ruleValidate: {
|
|
ruleValidate: {
|
|
- name: [{
|
|
|
|
|
|
+ energyConsumptionId: [{
|
|
required: true,
|
|
required: true,
|
|
- message: '请输入应用名称',
|
|
|
|
|
|
+ type: 'number',
|
|
|
|
+ message: '请选择能耗类型名称',
|
|
trigger: 'change'
|
|
trigger: 'change'
|
|
}],
|
|
}],
|
|
|
|
+ name: [{
|
|
|
|
+ required: true,
|
|
|
|
+ message: '请输入仪表类型名称',
|
|
|
|
+ trigger: 'blur'
|
|
|
|
+ }],
|
|
},
|
|
},
|
|
- equipTypeData: [],
|
|
|
|
- showModal: false,
|
|
|
|
- detailStatus: false,
|
|
|
|
- modalStatus: false,
|
|
|
|
- title: '新增设备',
|
|
|
|
- commonTitle: "确认删除",
|
|
|
|
- activeColor: '#E92E2E',
|
|
|
|
- activeClass: '',
|
|
|
|
- modalTitle: '',
|
|
|
|
- currentModalTabs:'设备类型信息',
|
|
|
|
- tabsModalData: [{label:'设备类型信息'},{label:'关联设备'}],
|
|
|
|
- detailLabel: [],
|
|
|
|
- columnsModal: [],
|
|
|
|
- columnsEquipType: [
|
|
|
|
|
|
+ energyTypeData: [],
|
|
|
|
+ energyTypeModalData: [],
|
|
|
|
+ associatedEquipData:[
|
|
{
|
|
{
|
|
- title: '序号',
|
|
|
|
- type: 'index',
|
|
|
|
- align: 'center'
|
|
|
|
|
|
+ value: '-1',
|
|
|
|
+ label: '接入仪表数量'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '应用名称',
|
|
|
|
- key: 'appName',
|
|
|
|
- align: 'center',
|
|
|
|
- ellipsis: true,
|
|
|
|
- tooltip: true
|
|
|
|
|
|
+ label: '0',
|
|
|
|
+ value: '0'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '设备数量',
|
|
|
|
- key: 'equipmentNum',
|
|
|
|
- align: 'center'
|
|
|
|
|
|
+ label: '其他',
|
|
|
|
+ value: '其他'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- columnsRelatedEquip: [
|
|
|
|
- {
|
|
|
|
- title: '序号',
|
|
|
|
- type: 'index',
|
|
|
|
- align: 'center'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '设备ID',
|
|
|
|
- key: 'equipmentId',
|
|
|
|
- align: 'center'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '设备名称',
|
|
|
|
- key: 'equipmentName',
|
|
|
|
- align: 'center',
|
|
|
|
- ellipsis: true,
|
|
|
|
- tooltip: true
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '归属线路',
|
|
|
|
- key: 'lineName',
|
|
|
|
- align: 'center',
|
|
|
|
- ellipsis: true,
|
|
|
|
- tooltip: true
|
|
|
|
- // render:(h,params)=>{
|
|
|
|
- // return h('div', [ h('span',!params.row.lineName ? '/' : params.row.lineName) ])
|
|
|
|
- // }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '归属站点',
|
|
|
|
- key: 'stationName',
|
|
|
|
- align: 'center',
|
|
|
|
- ellipsis: true,
|
|
|
|
- tooltip: true
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '状态',
|
|
|
|
- key: 'equipmentStatusValue',
|
|
|
|
- align: 'center'
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- // equipTypeModal: [],
|
|
|
|
- // equipTypeCount: 0,
|
|
|
|
- detailParams: {
|
|
|
|
- equipmentTypeId: null,
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 10
|
|
|
|
- },
|
|
|
|
- apiUrl: '',
|
|
|
|
- appNameObj: {
|
|
|
|
- level: '',
|
|
|
|
- lineId: '',
|
|
|
|
- stationId: '',
|
|
|
|
- equipmentCheck: '',
|
|
|
|
- instrumentCheck: '',
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 9999
|
|
|
|
- },
|
|
|
|
- appNameList: []
|
|
|
|
|
|
+ showModal: false,
|
|
|
|
+ modalStatus: false,
|
|
|
|
+ title: '新增仪表类型',
|
|
|
|
+ commonTitle: "确认删除",
|
|
|
|
+ activeColor: '#E92E2E',
|
|
|
|
+ activeClass: '',
|
|
|
|
+ modalTitle: '',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
|
|
+ created() {
|
|
|
|
+ this.getType()
|
|
|
|
+ this.getTableData()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
rowClassName(row, index) {
|
|
rowClassName(row, index) {
|
|
@@ -284,7 +226,7 @@ export default {
|
|
},
|
|
},
|
|
getTableData () {
|
|
getTableData () {
|
|
this.loading = true
|
|
this.loading = true
|
|
- this.$get('metroapi/equipment/queryEquipmentTypePage', this.tableParams).then(res=>{
|
|
|
|
|
|
+ this.$get('metroapi/instrumentType/queryInstrumentTypePage', this.tableParams).then(res=>{
|
|
this.loading = false
|
|
this.loading = false
|
|
if ( res.httpCode == 1 ){
|
|
if ( res.httpCode == 1 ){
|
|
this.tableData = res.data.data
|
|
this.tableData = res.data.data
|
|
@@ -304,53 +246,38 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ searchClick () {
|
|
|
|
+ this.tableParams.pageNum = 1
|
|
|
|
+ this.getTableData()
|
|
|
|
+ // this.$router.push({ path: '/MainPage/ApplicationManage', query: {deptName: "2"}})
|
|
|
|
+ },
|
|
|
|
+ resetClick (name) {
|
|
|
|
+ this.$refs[name].resetFields()
|
|
|
|
+ this.tableParams.pageNum = 1
|
|
|
|
+ this.getTableData()
|
|
|
|
+ },
|
|
getType () {
|
|
getType () {
|
|
- // 获取设备类型
|
|
|
|
- this.$get('metroapi/equipment/queryEquipmentType', {name:''}).then(res=>{
|
|
|
|
|
|
+ // 获取能耗类型
|
|
|
|
+ this.$get('metroapi/energyConsumption/queryEnergyConsumption').then(res=>{
|
|
if (res.httpCode == 1 ){
|
|
if (res.httpCode == 1 ){
|
|
- this.equipTypeData = res.data
|
|
|
|
|
|
+ this.energyTypeModalData = JSON.parse(JSON.stringify(res.data))
|
|
|
|
+ this.energyTypeData = res.data
|
|
|
|
+ this.energyTypeData.unshift({ id: '-1', name: '能耗类型' })
|
|
} else {
|
|
} else {
|
|
- this.equipTypeData = []
|
|
|
|
|
|
+ this.energyTypeData = []
|
|
|
|
+ this.energyTypeModalData = []
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- // 获取应用名称
|
|
|
|
- this.$get('metroapi/application/info/list', this.appNameObj).then(res=>{
|
|
|
|
- if (res.httpCode == 1 ){
|
|
|
|
- this.appNameList = res.data.data
|
|
|
|
- } else {
|
|
|
|
- this.appNameList = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
},
|
|
},
|
|
addClick () {
|
|
addClick () {
|
|
- this.title = '新增设备类型'
|
|
|
|
|
|
+ this.title = '新增仪表类型'
|
|
this.formOption = JSON.parse(JSON.stringify(defaultFrom))
|
|
this.formOption = JSON.parse(JSON.stringify(defaultFrom))
|
|
this.showModal = true
|
|
this.showModal = true
|
|
},
|
|
},
|
|
- detailClick (row) {
|
|
|
|
- this.detailParams.equipmentTypeId = Number(row.id)
|
|
|
|
- this.rowObj = row
|
|
|
|
- this.detailStatus = true
|
|
|
|
- this.currentModalTabs = '设备类型信息'
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.apiUrl = 'metroapi/equipment/equipmentTypeDetail'
|
|
|
|
- this.columnsModal = this.columnsEquipType
|
|
|
|
- document.querySelector(".rolling-detail-table .ivu-table-body").scrollTo(0, 0)
|
|
|
|
- this.$refs.detailTable.getChartsDetail(this.detailParams,this.apiUrl)
|
|
|
|
- });
|
|
|
|
- this.$get('metroapi/equipment/equipmentTypeDetail', this.detailParams).then(res=>{
|
|
|
|
- if ( res.httpCode == 1 ){
|
|
|
|
- this.detailLabel = res.data
|
|
|
|
- } else {
|
|
|
|
- this.$Message.info(res.msg)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // document.querySelector(".rolling-detail-table .ivu-table-body").scrollTo(0, 0)
|
|
|
|
- },
|
|
|
|
editClick (row) {
|
|
editClick (row) {
|
|
this.rowObj = row
|
|
this.rowObj = row
|
|
this.formOption = JSON.parse(JSON.stringify(row))
|
|
this.formOption = JSON.parse(JSON.stringify(row))
|
|
- this.title = '编辑设备类型'
|
|
|
|
|
|
+ this.title = '编辑仪表类型'
|
|
this.showModal = true
|
|
this.showModal = true
|
|
},
|
|
},
|
|
delClick (row) {
|
|
delClick (row) {
|
|
@@ -358,7 +285,7 @@ export default {
|
|
this.commonTitle = '确认删除'
|
|
this.commonTitle = '确认删除'
|
|
this.activeColor = '#E92E2E'
|
|
this.activeColor = '#E92E2E'
|
|
this.activeClass = ''
|
|
this.activeClass = ''
|
|
- this.modalTitle = '删除的同时将解绑所有运营数据,且数据不可恢复,请慎重操作。'
|
|
|
|
|
|
+ this.modalTitle = '删除不影响已产生的操作和记录。'
|
|
this.modalStatus = true
|
|
this.modalStatus = true
|
|
},
|
|
},
|
|
modalChange (modalStatus) {
|
|
modalChange (modalStatus) {
|
|
@@ -366,18 +293,12 @@ export default {
|
|
this.$refs.formOption.resetFields();
|
|
this.$refs.formOption.resetFields();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- modalDetailChange (val) {
|
|
|
|
- if (!val) {
|
|
|
|
- this.detailParams.pageNum = 1
|
|
|
|
- document.querySelector(".rolling-detail-table .ivu-table-body").scrollTo(0, 0)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
modalOk (formName) {
|
|
modalOk (formName) {
|
|
- if (this.title == '新增设备类型') {
|
|
|
|
|
|
+ if (this.title == '新增仪表类型') {
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- this.$post('metroapi/equipment/addEquipmentType', this.formOption).then(res=>{
|
|
|
|
- if ( res.httpCode == 1 ){
|
|
|
|
|
|
+ this.$post('metroapi/instrumentType/addInstrumentType', this.formOption).then(res=>{
|
|
|
|
+ if (res.httpCode == 1 ){
|
|
this.showModal = false
|
|
this.showModal = false
|
|
this.$emit('changeTree')
|
|
this.$emit('changeTree')
|
|
this.$Message.info(res.msg)
|
|
this.$Message.info(res.msg)
|
|
@@ -393,7 +314,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- this.$post('metroapi/equipment/editEquipmentType', this.formOption).then(res=>{
|
|
|
|
|
|
+ this.$post('metroapi/instrumentType/editInstrumentType', this.formOption).then(res=>{
|
|
if (res.httpCode == 1 ){
|
|
if (res.httpCode == 1 ){
|
|
this.showModal = false
|
|
this.showModal = false
|
|
this.$emit('changeTree')
|
|
this.$emit('changeTree')
|
|
@@ -414,7 +335,7 @@ export default {
|
|
},
|
|
},
|
|
commonOk () {
|
|
commonOk () {
|
|
let params = {
|
|
let params = {
|
|
- id: this.rowObj.id
|
|
|
|
|
|
+ instrumentTypeId: this.rowObj.id
|
|
}
|
|
}
|
|
this.delData(params)
|
|
this.delData(params)
|
|
},
|
|
},
|
|
@@ -423,7 +344,7 @@ export default {
|
|
},
|
|
},
|
|
// 删除接口
|
|
// 删除接口
|
|
delData (params) {
|
|
delData (params) {
|
|
- this.$get('metroapi/equipment/delEquipmentType',params).then(res=>{
|
|
|
|
|
|
+ this.$get('metroapi/instrumentType/delInstrumentType',params).then(res=>{
|
|
if (res.httpCode == 1 ){
|
|
if (res.httpCode == 1 ){
|
|
this.modalStatus = false
|
|
this.modalStatus = false
|
|
this.$Message.info(res.msg)
|
|
this.$Message.info(res.msg)
|
|
@@ -433,106 +354,76 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- tabsClick (name) {
|
|
|
|
- this.currentModalTabs = name
|
|
|
|
- if (this.currentModalTabs == '设备类型信息') {
|
|
|
|
- this.detailParams.pageNum = 1
|
|
|
|
- this.apiUrl = 'metroapi/equipment/equipmentTypeDetail'
|
|
|
|
- this.columnsModal = this.columnsEquipType
|
|
|
|
- } else if (this.currentModalTabs == '关联设备') {
|
|
|
|
- this.detailParams.pageNum = 1
|
|
|
|
- this.apiUrl = 'metroapi/equipment/queryEquipmentByTypePage'
|
|
|
|
- this.columnsModal = this.columnsRelatedEquip
|
|
|
|
- }
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- document.querySelector(".rolling-detail-table .ivu-table-body").scrollTo(0, 0)
|
|
|
|
- this.$refs.detailTable.getChartsDetail(this.detailParams,this.apiUrl)
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style scoped lang="stylus">
|
|
<style scoped lang="stylus">
|
|
-.content-main {
|
|
|
|
- width: 100%;
|
|
|
|
|
|
+.content-main-manage {
|
|
|
|
+ position: relative;
|
|
height: calc(100% - 50px);
|
|
height: calc(100% - 50px);
|
|
- overflow: hidden;
|
|
|
|
-}
|
|
|
|
-.common-search {
|
|
|
|
- width: 100%;
|
|
|
|
}
|
|
}
|
|
->>> .common-search .ivu-input {
|
|
|
|
- background-color: #06214D;
|
|
|
|
- border: 1px solid #2355A6;
|
|
|
|
- border-radius: 15px;
|
|
|
|
- color: #fff;
|
|
|
|
- height: 32px;
|
|
|
|
-}
|
|
|
|
->>> .common-search .ivu-input:focus {
|
|
|
|
- border-color: #0185ea;
|
|
|
|
-}
|
|
|
|
-.content-body {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- background: #06214D;
|
|
|
|
-}
|
|
|
|
-.station-tree {
|
|
|
|
- height: 100%;
|
|
|
|
- padding: 10px;
|
|
|
|
-}
|
|
|
|
-.station-tree-body {
|
|
|
|
- border: 1px solid #204384;
|
|
|
|
- height: 100%;
|
|
|
|
- padding: 10px;
|
|
|
|
-}
|
|
|
|
-.station-tree-center {
|
|
|
|
- height: calc(100% - 32px);
|
|
|
|
- padding-top: 10px;
|
|
|
|
- // display: flex;
|
|
|
|
-}
|
|
|
|
-.station-tree-left {
|
|
|
|
- height: 100%;
|
|
|
|
- overflow: auto;
|
|
|
|
|
|
+.search-list {
|
|
|
|
+ display: flex;
|
|
|
|
+ padding: 10px 0 0;
|
|
}
|
|
}
|
|
-.station-tree-left-notree {
|
|
|
|
- height: 100%;
|
|
|
|
|
|
+.search-left {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- justify-content: center;
|
|
|
|
- color: #fff;
|
|
|
|
- fon-size: 14px;
|
|
|
|
-}
|
|
|
|
-.right-main {
|
|
|
|
- height: 100%;
|
|
|
|
- padding: 10px 0;
|
|
|
|
- position: relative;
|
|
|
|
- // padding: 16px;
|
|
|
|
|
|
+ .ivu-select {
|
|
|
|
+ width: 150px;
|
|
|
|
+ height: 32px;
|
|
|
|
+ }
|
|
|
|
+ .ivu-select-single .ivu-select-selection {
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+ >>> .ivu-input {
|
|
|
|
+ width: 165px;
|
|
|
|
+ height: 32px;
|
|
|
|
+ }
|
|
|
|
+ >>> .ivu-date-picker-editor .ivu-input {
|
|
|
|
+ width: 210px;
|
|
|
|
+ }
|
|
|
|
+ >>> .ivu-input-prefix, >>> .ivu-input-suffix {
|
|
|
|
+ height: 32px;
|
|
|
|
+ line-height: 32px;
|
|
|
|
+ }
|
|
|
|
+ >>> .ivu-input-icon {
|
|
|
|
+ height: 32px;
|
|
|
|
+ line-height: 32px;
|
|
|
|
+ }
|
|
|
|
+ >>> .date-picker-main .ivu-date-picker-header {
|
|
|
|
+ border-bottom: 0.0052083333rem solid #204384;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-.manage-main-top {
|
|
|
|
- padding: 12px 0;
|
|
|
|
|
|
+.btn-container {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
|
+ padding-bottom: 10px;
|
|
|
|
+}
|
|
|
|
+>>> .common-form-list .ivu-form-item {
|
|
|
|
+ margin-bottom: 10px;
|
|
}
|
|
}
|
|
.manage-main-center {
|
|
.manage-main-center {
|
|
width: 100%;
|
|
width: 100%;
|
|
- height: calc(100% - 100px);
|
|
|
|
|
|
+ height: calc(100% - 150px);
|
|
}
|
|
}
|
|
.common-table {
|
|
.common-table {
|
|
max-height: 100%;
|
|
max-height: 100%;
|
|
}
|
|
}
|
|
>>> .common-table .ivu-table th {
|
|
>>> .common-table .ivu-table th {
|
|
- height: 54px;
|
|
|
|
|
|
+ height: 51px;
|
|
}
|
|
}
|
|
>>> .common-table .ivu-table td {
|
|
>>> .common-table .ivu-table td {
|
|
- height: 54px;
|
|
|
|
|
|
+ height: 51px;
|
|
}
|
|
}
|
|
->>> .common-table .ivu-spin-fix {
|
|
|
|
- top: 54px;
|
|
|
|
- height: calc(100vh - 350px);
|
|
|
|
-}
|
|
|
|
->>> .common-table .ivu-table-tip {
|
|
|
|
|
|
+ >>> .common-table .ivu-spin-fix {
|
|
|
|
+ top: 51px;
|
|
|
|
+ }
|
|
|
|
+ >>> .app-table .ivu-spin-fix {
|
|
|
|
+ height: calc(100vh - 375px);
|
|
|
|
+ }
|
|
|
|
+ >>> .ivu-table-tip {
|
|
background: url('../../../assets/images/noData.png') no-repeat center;
|
|
background: url('../../../assets/images/noData.png') no-repeat center;
|
|
- height: calc(100vh - 350px);
|
|
|
|
}
|
|
}
|
|
>>> .common-table .ivu-table-tip table {
|
|
>>> .common-table .ivu-table-tip table {
|
|
display: none;
|
|
display: none;
|
|
@@ -554,83 +445,4 @@ export default {
|
|
color #409EFF;
|
|
color #409EFF;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
->>> .common-modal-top-text {
|
|
|
|
- font-size: 14px;
|
|
|
|
- font-weight: bold;
|
|
|
|
- color: #29A0FF;
|
|
|
|
- line-height: 42px;
|
|
|
|
- border-left: 3px solid #1590F1;
|
|
|
|
- padding-left: 12px;
|
|
|
|
-}
|
|
|
|
->>> .common-modal-top-especial {
|
|
|
|
- margin-bottom: -10px;
|
|
|
|
-}
|
|
|
|
->>> .common-modal-content {
|
|
|
|
- display: flex;
|
|
|
|
- width: 100%;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
- margin-bottom: 15px;
|
|
|
|
- border-right: 1px solid #21437B;
|
|
|
|
-}
|
|
|
|
->>> .modal-content-item {
|
|
|
|
- width: 100%;
|
|
|
|
- display: flex;
|
|
|
|
-}
|
|
|
|
->>> .item-especial {
|
|
|
|
- width: 100%;
|
|
|
|
-}
|
|
|
|
->>> .modal-content-item-name {
|
|
|
|
- width: 25%;
|
|
|
|
- height: 45px;
|
|
|
|
- line-height: 45px;
|
|
|
|
- background: #13305F;
|
|
|
|
- border-top: 1px solid #21437B;
|
|
|
|
- border-left: 1px solid #21437B;
|
|
|
|
- font-size: 14px;
|
|
|
|
- color: #F5F5F5;
|
|
|
|
- padding-left: 20px;
|
|
|
|
-}
|
|
|
|
->>> .modal-content-item-value {
|
|
|
|
- width: 75%;
|
|
|
|
- height: 45px;
|
|
|
|
- line-height: 45px;
|
|
|
|
- background: #06214D;
|
|
|
|
- border-top: 1px solid #21437B;
|
|
|
|
- border-left: 1px solid #21437B;
|
|
|
|
- font-size: 14px;
|
|
|
|
- color: #F5F5F5;
|
|
|
|
- padding-left: 20px;
|
|
|
|
-}
|
|
|
|
-// >>> .item-especial .modal-content-item-name{
|
|
|
|
-// width: 25%;
|
|
|
|
-// height: auto;
|
|
|
|
-// min-height: 45px;
|
|
|
|
-// border-bottom: 1px solid #21437B;
|
|
|
|
-// display: flex;
|
|
|
|
-// align-items: center;
|
|
|
|
-// }
|
|
|
|
-// >>> .item-especial .modal-content-item-value{
|
|
|
|
-// width: 75%;
|
|
|
|
-// height: auto;
|
|
|
|
-// min-height: 45px;
|
|
|
|
-// border-bottom: 1px solid #21437B;
|
|
|
|
-// display: flex;
|
|
|
|
-// align-items: center;
|
|
|
|
-// line-height: 22px;
|
|
|
|
-// }
|
|
|
|
->>> .item-especial .modal-content-item-name {
|
|
|
|
- border-bottom: 1px solid #21437B;
|
|
|
|
-}
|
|
|
|
->>> .item-especial .modal-content-item-value {
|
|
|
|
- border-bottom: 1px solid #21437B;
|
|
|
|
-}
|
|
|
|
->>> .modal-content-item-value .ivu-tooltip {
|
|
|
|
- width: 100%;
|
|
|
|
-}
|
|
|
|
->>> .modal-content-item-value .ivu-tooltip-rel {
|
|
|
|
- overflow: hidden;
|
|
|
|
- text-overflow:ellipsis;
|
|
|
|
- white-space: nowrap;
|
|
|
|
-}
|
|
|
|
</style>
|
|
</style>
|