|
@@ -9,7 +9,7 @@
|
|
tipPlace="top"
|
|
tipPlace="top"
|
|
caption="系统名称:"
|
|
caption="系统名称:"
|
|
@change="changeCurSystem"
|
|
@change="changeCurSystem"
|
|
- v-model="systemName"
|
|
|
|
|
|
+ v-model="systemId"
|
|
:selectdata="systemList"
|
|
:selectdata="systemList"
|
|
:placeholder="'请选择'"
|
|
:placeholder="'请选择'"
|
|
/>
|
|
/>
|
|
@@ -37,7 +37,7 @@
|
|
<el-table-column prop="is_exception" label="状态">
|
|
<el-table-column prop="is_exception" label="状态">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span style="display: inline-block;width: 6px;height:6px;border-radius: 3px;background: #0091FF;" :style="{'background': !scope.row.is_exception?'#0091FF' : '#F54E45'}"></span>
|
|
<span style="display: inline-block;width: 6px;height:6px;border-radius: 3px;background: #0091FF;" :style="{'background': !scope.row.is_exception?'#0091FF' : '#F54E45'}"></span>
|
|
- <span style="margin-left: 10px">{{ !scope.row.status?'正常' : '异常' }}</span>
|
|
|
|
|
|
+ <span style="margin-left: 10px">{{ !scope.row.is_exception?'正常' : '异常' }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="photos_num" label="照片">
|
|
<el-table-column prop="photos_num" label="照片">
|
|
@@ -99,12 +99,12 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { Select, Input } from 'meri-design';
|
|
import { Select, Input } from 'meri-design';
|
|
-import { queryEquipmentList, queryTableData } from '../../api/coreDeviceReport';
|
|
|
|
|
|
+import { querySystemList, queryEquipmentList, queryTableData } from '../../api/coreDeviceReport';
|
|
import _ from 'lodash';
|
|
import _ from 'lodash';
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
- systemName: '', // 系统名称
|
|
|
|
|
|
+ systemId: '', // 当前系统Id
|
|
systemList: [], // 系统
|
|
systemList: [], // 系统
|
|
systemContentData: [
|
|
systemContentData: [
|
|
{id: 1, name: '高压配电柜', isMaintenance: true, num: 95, statusNum: 0, abnormal: false, isActive: true},
|
|
{id: 1, name: '高压配电柜', isMaintenance: true, num: 95, statusNum: 0, abnormal: false, isActive: true},
|
|
@@ -136,6 +136,7 @@ export default {
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
this.getSystemList();
|
|
this.getSystemList();
|
|
|
|
+ this.getEquipmentOfSystem();
|
|
this.getTableData();
|
|
this.getTableData();
|
|
},
|
|
},
|
|
|
|
|
|
@@ -144,7 +145,7 @@ export default {
|
|
* 获取系统列表数据
|
|
* 获取系统列表数据
|
|
*/
|
|
*/
|
|
getSystemList() {
|
|
getSystemList() {
|
|
- queryEquipmentList().then((res) => {
|
|
|
|
|
|
+ querySystemList().then((res) => {
|
|
if (res.result === 'success') {
|
|
if (res.result === 'success') {
|
|
let data = res.data;
|
|
let data = res.data;
|
|
let newData = [];
|
|
let newData = [];
|
|
@@ -167,6 +168,21 @@ export default {
|
|
console.log('val', val)
|
|
console.log('val', val)
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
|
|
+ * 获取系统下的设备
|
|
|
|
+ */
|
|
|
|
+ getEquipmentOfSystem() {
|
|
|
|
+ let param = {
|
|
|
|
+ plazaId: 1000423,
|
|
|
|
+ ccode: 1002347,
|
|
|
|
+ }
|
|
|
|
+ if (this.systemId !== '') {
|
|
|
|
+ param.smsxt = this.systemId;
|
|
|
|
+ }
|
|
|
|
+ queryEquipmentList('/data/home/querySystemCard', param).then((res) => {
|
|
|
|
+ console.log('res', res)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
* 切换系统下的设备
|
|
* 切换系统下的设备
|
|
*/
|
|
*/
|
|
changeEquipment(id) {
|
|
changeEquipment(id) {
|
|
@@ -179,8 +195,7 @@ export default {
|
|
let query = {
|
|
let query = {
|
|
category_code: 'gdc'
|
|
category_code: 'gdc'
|
|
}
|
|
}
|
|
- queryTableData(`/data/data/glsms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}`, query).then((res) => {
|
|
|
|
- console.log('res', res)
|
|
|
|
|
|
+ queryTableData(`/data/glsms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}`, query).then((res) => {
|
|
const { result, count, data } = res;
|
|
const { result, count, data } = res;
|
|
if (result === 'success') {
|
|
if (result === 'success') {
|
|
this.tatol = count;
|
|
this.tatol = count;
|
|
@@ -205,7 +220,6 @@ export default {
|
|
* 显示设备实例的维保、专维等状态
|
|
* 显示设备实例的维保、专维等状态
|
|
*/
|
|
*/
|
|
showEquipmentStatus(row, column, e) {
|
|
showEquipmentStatus(row, column, e) {
|
|
- console.log('row', row)
|
|
|
|
this.dialogTableVisible = true;
|
|
this.dialogTableVisible = true;
|
|
},
|
|
},
|
|
}
|
|
}
|