🐛 fix(设备):解决设备列表子设备状态问题,添加格式化文件
This commit is contained in:
parent
3ff144d18e
commit
4daa3fffc4
9
.env.dr
9
.env.dr
|
@ -30,7 +30,7 @@ VUE_APP_THEME_CLASS = 'theme-blue-black'
|
||||||
#VUE_APP_THEME_CLASS = 'theme-blue-white'
|
#VUE_APP_THEME_CLASS = 'theme-blue-white'
|
||||||
|
|
||||||
# 智慧用电管理系统/开发环境
|
# 智慧用电管理系统/开发环境
|
||||||
VUE_APP_BASE_API = ''
|
VUE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
@ -41,12 +41,13 @@ port= 9988
|
||||||
# 服务端地址
|
# 服务端地址
|
||||||
// 陈志荣 本地
|
// 陈志荣 本地
|
||||||
// target = http://192.168.18.140:8899
|
// target = http://192.168.18.140:8899
|
||||||
// 黄明 本地
|
|
||||||
// target = http://192.168.18.134:8899
|
|
||||||
//target = http://192.168.18.139:8899
|
//target = http://192.168.18.139:8899
|
||||||
// target = http://192.168.18.136:8899
|
// target = http://192.168.18.136:8899
|
||||||
|
|
||||||
// 测试端
|
// 测试端
|
||||||
// target = http://192.168.10.241:32024
|
// target = http://192.168.10.241:32024
|
||||||
// 开发端
|
// 开发端
|
||||||
target = https://digital-core.drgyen.com
|
# target = https://digital-core.dieruen-iot.com
|
||||||
|
// 黄明 本地
|
||||||
|
target = http://192.168.1.17:8899
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
// "printWidth": 220,
|
||||||
|
// "tabWidth": 4,
|
||||||
|
// "useTabs": true,
|
||||||
|
// "semi": true,
|
||||||
|
// "singleQuote": true,
|
||||||
|
// "quoteProps": "as-needed",
|
||||||
|
// "trailingComma": "none",
|
||||||
|
// "bracketSpacing": true,
|
||||||
|
// "jsxBracketSameLine": false,
|
||||||
|
// "arrowParens": "avoid",
|
||||||
|
// "endOfLine": "lf",
|
||||||
|
// "jsxSingleQuote": false,
|
||||||
|
// "vueIndentScriptAndStyle": false
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ let prodApi = window.dasConfig.ip || '/prod-api';
|
||||||
let wsProtocol = 'ws://';
|
let wsProtocol = 'ws://';
|
||||||
let iotWebSocketAlarmBaseUrl = ''
|
let iotWebSocketAlarmBaseUrl = ''
|
||||||
let bigWebSocketUrl = ''
|
let bigWebSocketUrl = ''
|
||||||
let port = '32024'
|
let port = '8899'
|
||||||
let webSocketProjectGatewayUrl = ''
|
let webSocketProjectGatewayUrl = ''
|
||||||
let hrefHostUrl = '';
|
let hrefHostUrl = '';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="device-select-nav">
|
<div class="device-select-nav">
|
||||||
<div class="layout-select-wrap" v-if="childDeviceList.length > 0">
|
<div v-if="childDeviceList.length > 0" class="layout-select-wrap">
|
||||||
<!-- <div
|
<!-- <div
|
||||||
class="but"
|
class="but"
|
||||||
:disabled="tSelectLabelList.length <= 0"
|
:disabled="tSelectLabelList.length <= 0"
|
||||||
|
@ -41,10 +41,10 @@
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
:disabled="tSelectLabelList.length <= 0"
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
type="info"
|
type="info"
|
||||||
:disabled="tSelectLabelList.length <= 0"
|
|
||||||
@click="handleChildStatus('true')"
|
@click="handleChildStatus('true')"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
@ -60,10 +60,10 @@
|
||||||
</div>
|
</div>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
:disabled="tSelectLabelList.length <= 0"
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
type="info"
|
type="info"
|
||||||
:disabled="tSelectLabelList.length <= 0"
|
|
||||||
@click="handleChildStatus('false')"
|
@click="handleChildStatus('false')"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
分闸
|
分闸
|
||||||
</div>
|
</div>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button plain type="info" size="mini" @click="handleAllStatus('true')">
|
<el-button plain size="mini" type="info" @click="handleAllStatus('true')">
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -93,8 +93,8 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
plain
|
plain
|
||||||
type="info"
|
|
||||||
size="mini"
|
size="mini"
|
||||||
|
type="info"
|
||||||
@click="handleAllStatus('false')"
|
@click="handleAllStatus('false')"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
@ -110,10 +110,10 @@
|
||||||
</div></el-button
|
</div></el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
:disabled="tSelectLabelList.length <= 0"
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
type="info"
|
type="info"
|
||||||
:disabled="tSelectLabelList.length <= 0"
|
|
||||||
@click="handleDevSearch()"
|
@click="handleDevSearch()"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
@ -145,21 +145,20 @@
|
||||||
<span class="title-span">已选择设备:</span>
|
<span class="title-span">已选择设备:</span>
|
||||||
<span v-if="tSelectLabelList.length <= 0">当前未选择设备</span>
|
<span v-if="tSelectLabelList.length <= 0">当前未选择设备</span>
|
||||||
<el-tag
|
<el-tag
|
||||||
style="margin: 5px 5px 5px 0px"
|
|
||||||
v-for="(item, idx) in tSelectLabelList"
|
v-for="(item, idx) in tSelectLabelList"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
closable
|
closable
|
||||||
|
style="margin: 5px 5px 5px 0px"
|
||||||
@close="selectDevClose(item)"
|
@close="selectDevClose(item)"
|
||||||
>
|
>
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="layout-select-wrap" v-else>
|
<div v-else class="layout-select-wrap">
|
||||||
<span class="title-span">当前没有可用于分闸合闸设备~</span>
|
<span class="title-span">当前没有可用于分闸合闸设备~</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layout-device-list">
|
<div class="layout-device-list">
|
||||||
<el-card
|
<el-card
|
||||||
@click.native="viewDeviceChange(deviceInfo.deviceId)"
|
|
||||||
:body-style="{
|
:body-style="{
|
||||||
padding: '0px',
|
padding: '0px',
|
||||||
width: '220px',
|
width: '220px',
|
||||||
|
@ -170,6 +169,7 @@
|
||||||
? 'border: 1px solid #1890ff; margin: 5px; width: 220px; flex-shrink: 0;'
|
? 'border: 1px solid #1890ff; margin: 5px; width: 220px; flex-shrink: 0;'
|
||||||
: ' margin: 5px; width: 220px; flex-shrink: 0;'
|
: ' margin: 5px; width: 220px; flex-shrink: 0;'
|
||||||
"
|
"
|
||||||
|
@click.native="viewDeviceChange(deviceInfo.deviceId)"
|
||||||
>
|
>
|
||||||
<div class="nav-p-dev">
|
<div class="nav-p-dev">
|
||||||
<div
|
<div
|
||||||
|
@ -186,6 +186,7 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
:title="deviceInfo.deviceName"
|
||||||
class="dev-info-title"
|
class="dev-info-title"
|
||||||
style="
|
style="
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -198,7 +199,6 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
"
|
"
|
||||||
:title="deviceInfo.deviceName"
|
|
||||||
>{{ deviceInfo.deviceName }}</span
|
>{{ deviceInfo.deviceName }}</span
|
||||||
>
|
>
|
||||||
<div style="width: 60px; display: flex; justify-content: center">
|
<div style="width: 60px; display: flex; justify-content: center">
|
||||||
|
@ -239,15 +239,15 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card
|
<el-card
|
||||||
|
v-for="item in childDeviceList"
|
||||||
|
:key="item.deviceId"
|
||||||
:body-style="{ padding: '0px', width: '220px' }"
|
:body-style="{ padding: '0px', width: '220px' }"
|
||||||
@click.native="viewDeviceChange(item.deviceId)"
|
|
||||||
:style="
|
:style="
|
||||||
item.deviceId === checkobxDeviceId
|
item.deviceId === checkobxDeviceId
|
||||||
? 'border: 1px solid #1890ff; margin: 5px; width: 220px; flex-shrink: 0; boxShadow: 0 1px 5px 0 #2530341a;'
|
? 'border: 1px solid #1890ff; margin: 5px; width: 220px; flex-shrink: 0; boxShadow: 0 1px 5px 0 #2530341a;'
|
||||||
: ' margin: 5px; width: 220px; flex-shrink: 0; boxShadow: 0 1px 5px 0 #2530341a;'
|
: ' margin: 5px; width: 220px; flex-shrink: 0; boxShadow: 0 1px 5px 0 #2530341a;'
|
||||||
"
|
"
|
||||||
v-for="item in childDeviceList"
|
@click.native="viewDeviceChange(item.deviceId)"
|
||||||
:key="item.deviceId"
|
|
||||||
>
|
>
|
||||||
<div class="nav-c-dev">
|
<div class="nav-c-dev">
|
||||||
<div
|
<div
|
||||||
|
@ -263,6 +263,7 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
:title="item.deviceName"
|
||||||
class="dev-info-title"
|
class="dev-info-title"
|
||||||
style="
|
style="
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -275,16 +276,15 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
"
|
"
|
||||||
:title="item.deviceName"
|
|
||||||
>{{ item.deviceName }}</span
|
>{{ item.deviceName }}</span
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@click.stop="handleCheckbox(item)"
|
|
||||||
:class="
|
:class="
|
||||||
tSelectList.indexOf(item.deviceId) >= 0
|
tSelectList.indexOf(item.deviceId) >= 0
|
||||||
? 'checkbox-i selected-c'
|
? 'checkbox-i selected-c'
|
||||||
: 'checkbox-i'
|
: 'checkbox-i'
|
||||||
"
|
"
|
||||||
|
@click.stop="handleCheckbox(item)"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
v-show="tSelectList.indexOf(item.deviceId) >= 0"
|
v-show="tSelectList.indexOf(item.deviceId) >= 0"
|
||||||
|
@ -339,8 +339,8 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
<e-web-socket
|
<e-web-socket
|
||||||
:wsServiceUrl="wsStatusService"
|
|
||||||
:closeSleepTime="10000"
|
:closeSleepTime="10000"
|
||||||
|
:wsServiceUrl="wsStatusService"
|
||||||
@message="wsMessage($event)"
|
@message="wsMessage($event)"
|
||||||
></e-web-socket>
|
></e-web-socket>
|
||||||
</div>
|
</div>
|
||||||
|
@ -406,7 +406,7 @@ export default {
|
||||||
this.wsDeviceInfo["deviceId"]
|
this.wsDeviceInfo["deviceId"]
|
||||||
) {
|
) {
|
||||||
this.childDeviceList[i]["switch"] =
|
this.childDeviceList[i]["switch"] =
|
||||||
this.wsDeviceInfoswitch?.switch.toString();
|
this.wsDeviceInfo?.switch.toString();
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue