fix(加载): 删除debuger,格式化代码
This commit is contained in:
parent
352d6bdebe
commit
a9395ad80b
|
@ -3,13 +3,13 @@
|
|||
<scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
|
||||
<router-link
|
||||
v-for="tag in visitedViews"
|
||||
ref="tag"
|
||||
:key="tag.path"
|
||||
ref="tag"
|
||||
:class="isActive(tag)?'active':''"
|
||||
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
|
||||
tag="span"
|
||||
class="tags-view-item"
|
||||
:style="activeStyle(tag)"
|
||||
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
|
||||
class="tags-view-item"
|
||||
tag="span"
|
||||
@click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
|
||||
@contextmenu.prevent.native="openMenu(tag,$event)"
|
||||
>
|
||||
|
@ -137,7 +137,7 @@ export default {
|
|||
},
|
||||
refreshSelectedTag(view) {
|
||||
this.$store.dispatch('tagsView/delCachedView', view).then(() => {
|
||||
debugger
|
||||
// debugger
|
||||
const { fullPath } = view
|
||||
this.$nextTick(() => {
|
||||
this.$router.replace({
|
||||
|
|
|
@ -9,7 +9,7 @@ const attribute = {
|
|||
|
||||
mutations: {
|
||||
SET_ATTRIBUTE_LIST: (state, list) => {
|
||||
debugger
|
||||
// debugger
|
||||
state.attributeList = list
|
||||
},
|
||||
SET_GROUP_LIST: (state, list) => {
|
||||
|
@ -49,7 +49,7 @@ const attribute = {
|
|||
|
||||
actions: {
|
||||
GetAttributeList({state}) {
|
||||
debugger
|
||||
// debugger
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(state.attributeList)
|
||||
})
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
<template>
|
||||
<div class="app-container iot-detail-space">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
v-show="showSearch"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
:model="queryParams"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="上级建筑" prop="parentCode">
|
||||
<treeselect
|
||||
style="width: 200px;"
|
||||
v-model="queryParams.parentCode"
|
||||
:options="querySpaceOptions"
|
||||
:normalizer="normalizer"
|
||||
:options="querySpaceOptions"
|
||||
placeholder="请选择上级建筑"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="建筑名称" prop="buildingName">
|
||||
<el-input
|
||||
v-model="queryParams.buildingName"
|
||||
placeholder="建筑名称"
|
||||
clearable
|
||||
placeholder="建筑名称"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="建筑类型" prop="buildingType">
|
||||
<el-select v-model="queryParams.buildingType" placeholder="建筑类型" clearable>
|
||||
<el-select v-model="queryParams.buildingType" clearable placeholder="建筑类型">
|
||||
<el-option
|
||||
v-for="dict in buildingTypeList"
|
||||
:key="dict.buildingTypeCode"
|
||||
|
@ -35,14 +35,14 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-search" type="primary" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
<el-button icon="el-icon-plus" plain size="mini" type="primary" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -50,26 +50,26 @@
|
|||
<el-table
|
||||
v-loading="loading"
|
||||
:data="spaceList"
|
||||
row-key="buildingCode"
|
||||
default-expand-all
|
||||
:tree-props="{ children: 'children' }"
|
||||
default-expand-all
|
||||
row-key="buildingCode"
|
||||
>
|
||||
<el-table-column type="index" label="序号" align="center" :index="indexFormatter" width="80px"></el-table-column>
|
||||
<el-table-column label="建筑名称" align="left" prop="buildingName" />
|
||||
<el-table-column label="建筑类型" align="center" prop="buildingType" :formatter="statusFormat" />
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<el-table-column :index="indexFormatter" align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column align="left" label="建筑名称" prop="buildingName" />
|
||||
<el-table-column :formatter="statusFormat" align="center" label="建筑类型" prop="buildingType" />
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-search"
|
||||
@click="handleDetails(scope.row)"
|
||||
>建筑设备</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button icon="el-icon-edit" size="mini" type="text" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
|
@ -77,7 +77,7 @@
|
|||
</el-table>
|
||||
|
||||
<!-- 添加或修改项目建筑对话框 -->
|
||||
<dialog-template :title="title" :visible.sync="open" @close="open = false" width="500px">
|
||||
<dialog-template :title="title" :visible.sync="open" width="500px" @close="open = false">
|
||||
<el-form ref="form" slot="dialog-center" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="上级建筑:" prop="parentCode">
|
||||
<treeselect v-model="form.parentCode" :normalizer="normalizer" :options="spaceOptions" placeholder="请选择上级建筑" />
|
||||
|
@ -89,7 +89,7 @@
|
|||
<el-input v-model="form.buildingCode" placeholder="请输入建筑编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="建筑类型:" prop="buildingType">
|
||||
<el-select v-model="form.buildingType" filterable style="width: 100%;" placeholder="请选择建筑类型">
|
||||
<el-select v-model="form.buildingType" filterable placeholder="请选择建筑类型" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in buildingTypeList"
|
||||
:key="dict.buildingTypeCode"
|
||||
|
@ -106,12 +106,12 @@
|
|||
</dialog-template>
|
||||
|
||||
<el-dialog
|
||||
class="eldialog-wrap"
|
||||
:close-on-click-modal="false"
|
||||
:title="spaceDeviceTitle"
|
||||
:visible.sync="selectTableShow"
|
||||
width="75%"
|
||||
class="eldialog-wrap"
|
||||
top="10vh"
|
||||
:close-on-click-modal="false"
|
||||
width="75%"
|
||||
>
|
||||
<building-device
|
||||
v-if="selectTableShow"
|
||||
|
@ -339,7 +339,7 @@ export default {
|
|||
}
|
||||
)
|
||||
.then(function() {
|
||||
debugger
|
||||
// debugger
|
||||
return delBuildings({ buildingCode: row.buildingCode });
|
||||
})
|
||||
.then(() => {
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<template>
|
||||
<div class="app-container power-maintenance">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
v-show="showSearch"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
:model="queryParams"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input
|
||||
v-model="queryParams.deviceName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
placeholder="请输入设备名称"
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
@ -19,8 +19,8 @@
|
|||
<el-form-item label="故障类型" prop="faultType">
|
||||
<el-select
|
||||
v-model="queryParams.faultType"
|
||||
placeholder="请选择故障类型"
|
||||
clearable
|
||||
placeholder="请选择故障类型"
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
|
@ -35,8 +35,8 @@
|
|||
<el-form-item label="上报人" prop="reporterName">
|
||||
<el-input
|
||||
v-model="queryParams.reporterName"
|
||||
placeholder="请输入上报人名称"
|
||||
clearable
|
||||
placeholder="请输入上报人名称"
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
@ -45,8 +45,8 @@
|
|||
<el-form-item label="处理人" prop="handlerName">
|
||||
<el-input
|
||||
v-model="queryParams.handlerName"
|
||||
placeholder="请输入处理人名称"
|
||||
clearable
|
||||
placeholder="请输入处理人名称"
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
@ -54,36 +54,36 @@
|
|||
|
||||
<el-form-item label="处理时间" prop="handleTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.handleTime"
|
||||
clearable
|
||||
placeholder="选择处理时间"
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="queryParams.handleTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择处理时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="工单状态" prop="maintenanceStatus">
|
||||
<el-select
|
||||
v-model="queryParams.maintenanceStatus"
|
||||
placeholder="请选择工单状态"
|
||||
clearable
|
||||
placeholder="请选择工单状态"
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
:label="keys"
|
||||
:value="val"
|
||||
v-for="(keys, val) in workStateList"
|
||||
:key="keys"
|
||||
:label="keys"
|
||||
:value="val"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
|
@ -96,23 +96,23 @@
|
|||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['iot:maintenance:add']"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['iot:maintenance:export']"
|
||||
icon="el-icon-download"
|
||||
plain
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
@ -129,41 +129,41 @@
|
|||
@sort-change="sortChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
align="center"
|
||||
:index="indexFormatter"
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column label="项目名称" align="left" prop="projectName" />
|
||||
<el-table-column label="项目地址" align="left" prop="projectAddress">
|
||||
<el-table-column align="left" label="项目名称" prop="projectName" />
|
||||
<el-table-column align="left" label="项目地址" prop="projectAddress">
|
||||
<template slot-scope="scope">
|
||||
<span class="lay-table-textarea" :title="scope.row.projectAddress">
|
||||
<span :title="scope.row.projectAddress" class="lay-table-textarea">
|
||||
{{ scope.row.projectAddress }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" align="left" prop="deviceName" />
|
||||
<el-table-column align="left" label="设备名称" prop="deviceName" />
|
||||
<el-table-column
|
||||
label="故障类型"
|
||||
:formatter="statusFormat"
|
||||
align="center"
|
||||
label="故障类型"
|
||||
prop="faultType"
|
||||
sortable="custom"
|
||||
width="150"
|
||||
prop="faultType"
|
||||
:formatter="statusFormat"
|
||||
/>
|
||||
<el-table-column label="上报人" align="left" prop="reporterNickName" />
|
||||
<el-table-column label="处理人" align="left" prop="handleNickName" />
|
||||
<el-table-column label="工作内容" align="left" prop="maintenanceContext">
|
||||
<el-table-column align="left" label="上报人" prop="reporterNickName" />
|
||||
<el-table-column align="left" label="处理人" prop="handleNickName" />
|
||||
<el-table-column align="left" label="工作内容" prop="maintenanceContext">
|
||||
<template slot-scope="scope">
|
||||
<span class="lay-table-textarea" :title="scope.row.maintenanceContext">
|
||||
<span :title="scope.row.maintenanceContext" class="lay-table-textarea">
|
||||
{{ scope.row.maintenanceContext }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="上报时间"
|
||||
align="left"
|
||||
label="上报时间"
|
||||
prop="createTime"
|
||||
sortable="custom"
|
||||
width="120"
|
||||
|
@ -174,8 +174,8 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="处理时间"
|
||||
align="left"
|
||||
label="处理时间"
|
||||
prop="handleTime"
|
||||
width="120"
|
||||
>
|
||||
|
@ -185,16 +185,16 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="工单状态"
|
||||
align="center"
|
||||
width="120"
|
||||
label="工单状态"
|
||||
prop="maintenanceStatus"
|
||||
width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
v-if="scope.row.maintenanceStatus === '-1'"
|
||||
type="info"
|
||||
effect="plain"
|
||||
type="info"
|
||||
>
|
||||
{{ workStateList[scope.row.maintenanceStatus] }}
|
||||
</el-tag>
|
||||
|
@ -207,24 +207,24 @@
|
|||
<el-tag v-if="scope.row.maintenanceStatus === '3'">{{
|
||||
workStateList[scope.row.maintenanceStatus]
|
||||
}}</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.maintenanceStatus === '2'">{{
|
||||
<el-tag v-if="scope.row.maintenanceStatus === '2'" type="warning">{{
|
||||
workStateList[scope.row.maintenanceStatus]
|
||||
}}</el-tag>
|
||||
<el-tag
|
||||
type="danger"
|
||||
v-if="
|
||||
scope.row.maintenanceStatus === '1' ||
|
||||
scope.row.maintenanceStatus === '4'
|
||||
"
|
||||
type="danger"
|
||||
>{{ workStateList[scope.row.maintenanceStatus] }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150"
|
||||
class-name="small-padding fixed-width"
|
||||
label="操作"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button
|
||||
|
@ -250,33 +250,33 @@
|
|||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改工单信息对话框 -->
|
||||
<el-dialog
|
||||
class="eldialog-wrap"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
class="eldialog-wrap"
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input
|
||||
v-model="form.deviceName"
|
||||
@focus="openTableSelectDialog"
|
||||
placeholder="请输入设备名称"
|
||||
@focus="openTableSelectDialog"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障类型" prop="faultType">
|
||||
<el-select
|
||||
v-model="form.faultType"
|
||||
style="width: 100%"
|
||||
placeholder="请选择故障类型"
|
||||
style="width: 100%"
|
||||
@change="faultTypeChange"
|
||||
>
|
||||
<el-option
|
||||
|
@ -299,8 +299,8 @@
|
|||
<el-form-item label="处理人" prop="handlerId">
|
||||
<el-select
|
||||
v-model="form.handlerId"
|
||||
style="width: 100%"
|
||||
placeholder="请选择处理人"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in gdUserList"
|
||||
|
@ -314,9 +314,9 @@
|
|||
<el-form-item label="工作内容" prop="maintenanceContext">
|
||||
<el-input
|
||||
v-model="form.maintenanceContext"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
placeholder="请输入内容"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -329,20 +329,20 @@
|
|||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="选择"
|
||||
:visible.sync="selectTableShow"
|
||||
width="75%"
|
||||
top="10vh"
|
||||
class="select-table-dialog"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="selectTableShow"
|
||||
class="select-table-dialog"
|
||||
title="选择"
|
||||
top="10vh"
|
||||
width="75%"
|
||||
>
|
||||
<select-table-wrap
|
||||
v-if="selectTableShow"
|
||||
:tableOption="tableSelectOption.tableOpt"
|
||||
:otherOption="tableSelectOption.otherOption"
|
||||
:queryOption="tableSelectOption.queryOpt"
|
||||
:tableList="tableSelectOption.tableList"
|
||||
:tableOption="tableSelectOption.tableOpt"
|
||||
@parentGetList="childGetList($event)"
|
||||
:otherOption="tableSelectOption.otherOption"
|
||||
@returnEvent="returnEvent($event)"
|
||||
/>
|
||||
|
||||
|
@ -363,19 +363,19 @@
|
|||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="工单详情"
|
||||
class="eldialog-wrap dialot-det"
|
||||
top="5vh"
|
||||
@close="dialogCloes()"
|
||||
:visible.sync="openDestail"
|
||||
width="800px"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="openDestail"
|
||||
class="eldialog-wrap dialot-det"
|
||||
title="工单详情"
|
||||
top="5vh"
|
||||
width="800px"
|
||||
@close="dialogCloes()"
|
||||
>
|
||||
<div class="dialot-details">
|
||||
<details-wrap
|
||||
v-if="openDestail"
|
||||
tempType="workList"
|
||||
:maintenanceId="workDetails.maintenanceId"
|
||||
tempType="workList"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
@ -630,7 +630,7 @@ export default {
|
|||
var userList = [];
|
||||
var _this = this;
|
||||
listUser().then((response) => {
|
||||
debugger;
|
||||
// debugger;
|
||||
userList = response.rows;
|
||||
if (userList) {
|
||||
userList.forEach((v) => {
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
:body-style="{
|
||||
padding: '0px',
|
||||
width: '220px',
|
||||
boxShadow: '0 1px 5px 0 #2530341a',
|
||||
boxShadow: '0 1px 5px 0 #2530341a'
|
||||
}"
|
||||
:style="
|
||||
deviceInfo.deviceId === checkobxDeviceId
|
||||
|
@ -347,10 +347,15 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listChildrenDevice, setSwitchControl, setLivetimeControl, searchDevControl } from "@/api/iot/device";
|
||||
import {
|
||||
listChildrenDevice,
|
||||
setSwitchControl,
|
||||
setLivetimeControl,
|
||||
searchDevControl
|
||||
} from "@/api/iot/device";
|
||||
import {
|
||||
devLiveWebSocketBaseUrl,
|
||||
webSocketProjectGatewayUrl,
|
||||
webSocketProjectGatewayUrl
|
||||
} from "@/config/env";
|
||||
import SignalIntensity from "./signalIntensity";
|
||||
import EWebSocket from "@/components/EWebSocket/src/basic/index";
|
||||
|
@ -358,21 +363,21 @@ export default {
|
|||
name: "DeviceSelectNav",
|
||||
components: {
|
||||
SignalIntensity,
|
||||
EWebSocket,
|
||||
EWebSocket
|
||||
},
|
||||
props: {
|
||||
deviceInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
}
|
||||
},
|
||||
wsDeviceInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -386,18 +391,18 @@ export default {
|
|||
tSelectLabelList: [],
|
||||
iotSignalType: [],
|
||||
// wsDeviceInfo: null?,
|
||||
wsStatusService: "",
|
||||
wsStatusService: ""
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.checkobxDeviceId = this.deviceInfo.deviceId || null;
|
||||
this.getDicts("iot_signal_type").then((response) => {
|
||||
this.getDicts("iot_signal_type").then(response => {
|
||||
this.iotSignalType = response.data;
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
wsDeviceInfo: {
|
||||
handler: function () {
|
||||
handler: function() {
|
||||
this.timingPingWs(this.wsDeviceInfo);
|
||||
if (this.deviceInfo.deviceId !== this.wsDeviceInfo.deviceId) {
|
||||
for (let i = 0; i < this.childDeviceList.length; i++) {
|
||||
|
@ -406,7 +411,10 @@ export default {
|
|||
this.wsDeviceInfo["deviceId"]
|
||||
) {
|
||||
this.childDeviceList[i]["switch"] =
|
||||
this.wsDeviceInfo?.switch.toString();
|
||||
this.wsDeviceInfo?.switch !== null
|
||||
? this.wsDeviceInfo?.switch.toString()
|
||||
: this.wsDeviceInfo?.switch;
|
||||
// this.wsDeviceInfo?.switch;
|
||||
this.$forceUpdate();
|
||||
break;
|
||||
}
|
||||
|
@ -418,15 +426,15 @@ export default {
|
|||
this.connection();
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
deep: true
|
||||
},
|
||||
deviceInfo: {
|
||||
handler: function () {
|
||||
handler: function() {
|
||||
this.checkobxDeviceId = this.deviceInfo.deviceId || null;
|
||||
this.getList();
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDeviceState(e) {
|
||||
|
@ -459,7 +467,7 @@ export default {
|
|||
this.deviceInfo = Object.assign(this.deviceInfo, param);
|
||||
} else {
|
||||
if (this.childDeviceList && this.childDeviceList.length > 0) {
|
||||
this.childDeviceList = this.childDeviceList.map((v) => {
|
||||
this.childDeviceList = this.childDeviceList.map(v => {
|
||||
if (v["deviceKey"] === param["deviceKey"]) {
|
||||
return Object.assign(v, param);
|
||||
} else {
|
||||
|
@ -472,7 +480,7 @@ export default {
|
|||
},
|
||||
handleAllStatus(type) {
|
||||
if (this.childDeviceList.length > 0) {
|
||||
this.childDeviceList.forEach((v) => {
|
||||
this.childDeviceList.forEach(v => {
|
||||
if (this.tSelectList.indexOf(v.deviceId) < 0) {
|
||||
this.tSelectList.push(v.deviceId);
|
||||
this.tSelectLabelList.push(v.deviceName);
|
||||
|
@ -481,24 +489,23 @@ export default {
|
|||
this.handleChildStatus(type);
|
||||
}
|
||||
},
|
||||
handleDevSearch(){
|
||||
handleDevSearch() {
|
||||
this.$prompt("请输入登录密码", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
inputPattern: /^[a-z A-z 0-9 $.]+/,
|
||||
inputType: "password",
|
||||
inputErrorMessage: "登录密码不能为空",
|
||||
inputErrorMessage: "登录密码不能为空"
|
||||
}).then(({ value }) => {
|
||||
let params = {
|
||||
data: {
|
||||
params: {
|
||||
},
|
||||
params: {}
|
||||
},
|
||||
deviceId: this.tSelectList.toString(),
|
||||
verifyKey: value,
|
||||
verifyKey: value
|
||||
};
|
||||
|
||||
searchDevControl(params).then((res) => {
|
||||
searchDevControl(params).then(res => {
|
||||
this.msgSuccess("修改成功");
|
||||
});
|
||||
});
|
||||
|
@ -509,7 +516,7 @@ export default {
|
|||
this.tSelectList = [];
|
||||
this.tSelectLabelList = [];
|
||||
} else {
|
||||
this.childDeviceList.forEach((v) => {
|
||||
this.childDeviceList.forEach(v => {
|
||||
if (this.tSelectList.indexOf(v.deviceId) < 0) {
|
||||
this.tSelectList.push(v.deviceId);
|
||||
this.tSelectLabelList.push(v.deviceName);
|
||||
|
@ -527,17 +534,17 @@ export default {
|
|||
cancelButtonText: "取消",
|
||||
inputPattern: /^[a-z A-z 0-9 $.]+/,
|
||||
inputType: "password",
|
||||
inputErrorMessage: "登录密码不能为空",
|
||||
inputErrorMessage: "登录密码不能为空"
|
||||
}).then(({ value }) => {
|
||||
let params = {
|
||||
data: {
|
||||
// cmd: "set_switch",
|
||||
params: {
|
||||
switch: 1,
|
||||
},
|
||||
switch: 1
|
||||
}
|
||||
},
|
||||
deviceId: "",
|
||||
verifyKey: value,
|
||||
verifyKey: value
|
||||
};
|
||||
|
||||
switch (type) {
|
||||
|
@ -552,7 +559,7 @@ export default {
|
|||
break;
|
||||
}
|
||||
|
||||
setSwitchControl(params).then((res) => {
|
||||
setSwitchControl(params).then(res => {
|
||||
this.msgSuccess("修改成功");
|
||||
});
|
||||
});
|
||||
|
@ -613,7 +620,7 @@ export default {
|
|||
let headers = {
|
||||
clientid: this.wsDeviceInfo.wsClientId,
|
||||
username: this.wsDeviceInfo.wsUsername,
|
||||
sign: this.wsDeviceInfo.wsSign,
|
||||
sign: this.wsDeviceInfo.wsSign
|
||||
};
|
||||
// console.log("connection:--");
|
||||
this.stompClient = new WebSocket(
|
||||
|
@ -657,7 +664,7 @@ export default {
|
|||
if (this.socket_flag) {
|
||||
this.socket_flag = false;
|
||||
let this_ = this;
|
||||
this_.setTimeOut_flag = setTimeout(function () {
|
||||
this_.setTimeOut_flag = setTimeout(function() {
|
||||
this_.socket_flag = true;
|
||||
this_.connection();
|
||||
}, 10000);
|
||||
|
@ -679,7 +686,7 @@ export default {
|
|||
timingPingWs(row) {
|
||||
this.extenSubmit(row);
|
||||
const _this = this;
|
||||
this.timingPingWs_flag = setInterval(function () {
|
||||
this.timingPingWs_flag = setInterval(function() {
|
||||
_this.extenSubmit(row);
|
||||
}, 110000);
|
||||
},
|
||||
|
@ -688,12 +695,12 @@ export default {
|
|||
data: {
|
||||
params: {
|
||||
ltime: 15, // 上报间隔(0.1秒)
|
||||
dtime: 1200, //上报时长(0.1秒)
|
||||
},
|
||||
dtime: 1200 //上报时长(0.1秒)
|
||||
}
|
||||
},
|
||||
deviceId: row.deviceId,
|
||||
deviceId: row.deviceId
|
||||
};
|
||||
setLivetimeControl(params).then((res) => {
|
||||
setLivetimeControl(params).then(res => {
|
||||
console.log(res);
|
||||
// this.msgSuccess("成功");
|
||||
});
|
||||
|
@ -705,19 +712,19 @@ export default {
|
|||
cancelButtonText: "取消",
|
||||
inputPattern: /^[a-z A-z 0-9 $.]+/,
|
||||
inputType: "password",
|
||||
inputErrorMessage: "登录密码不能为空",
|
||||
inputErrorMessage: "登录密码不能为空"
|
||||
}).then(({ value }) => {
|
||||
let params = {
|
||||
data: {
|
||||
params: {
|
||||
switch: type === "true" ? 1 : 0,
|
||||
},
|
||||
switch: type === "true" ? 1 : 0
|
||||
}
|
||||
},
|
||||
deviceId: row.deviceId,
|
||||
verifyKey: value,
|
||||
verifyKey: value
|
||||
};
|
||||
|
||||
setSwitchControl(params).then((res) => {
|
||||
setSwitchControl(params).then(res => {
|
||||
// console.log(res);
|
||||
this.msgSuccess("修改成功");
|
||||
});
|
||||
|
@ -737,19 +744,19 @@ export default {
|
|||
listChildrenDevice({
|
||||
parentId: this.deviceInfo.deviceId,
|
||||
pageNum: 1,
|
||||
pageSize: 999999,
|
||||
}).then((response) => {
|
||||
pageSize: 999999
|
||||
}).then(response => {
|
||||
this.childDeviceList = response.rows;
|
||||
var childDeviceIds = [...response.rows].map((v) => {
|
||||
var childDeviceIds = [...response.rows].map(v => {
|
||||
return v.deviceKey;
|
||||
});
|
||||
this.handleOpenDevStatusService(childDeviceIds.toString());
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
this.closeWebscoket();
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="device-run-starts-wrap">
|
||||
<div class="cmd-list" v-for="(doct, index) in cmdList" :key="index">
|
||||
<div v-for="(doct, index) in cmdList" :key="index" class="cmd-list">
|
||||
<div class="cmd-title-wrap">
|
||||
<svg-icon
|
||||
icon-class="A_product1"
|
||||
|
@ -9,9 +9,9 @@
|
|||
<span class="cmd-title">{{ doct.cmdName }}</span>
|
||||
</div>
|
||||
<div
|
||||
class="param-item2"
|
||||
v-for="(doctItem, indexs) in doct.children"
|
||||
:key="indexs"
|
||||
class="param-item2"
|
||||
>
|
||||
<div class="title-top">
|
||||
<span class="name-wr">{{ doctItem.funName }}</span>
|
||||
|
@ -41,23 +41,23 @@
|
|||
</div>
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogShow"
|
||||
append-to-body
|
||||
class="device-run-state-dailog"
|
||||
title="查看数据"
|
||||
:visible.sync="dialogShow"
|
||||
width="700px"
|
||||
:close-on-click-modal="false"
|
||||
@close="dialogCloseCell"
|
||||
@opened="dialogOpen"
|
||||
>
|
||||
<run-state-table
|
||||
:dialogData="dialogData"
|
||||
:deviceId="sourceId"
|
||||
:prodId="prodId"
|
||||
:pro_type="dialogData.funDataType"
|
||||
:dialogShow="dialogShow"
|
||||
:deviceKey="deviceInfo.deviceKey"
|
||||
ref="showChart"
|
||||
:deviceId="sourceId"
|
||||
:deviceKey="deviceInfo.deviceKey"
|
||||
:dialogData="dialogData"
|
||||
:dialogShow="dialogShow"
|
||||
:pro_type="dialogData.funDataType"
|
||||
:prodId="prodId"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogShow = false">关 闭</el-button>
|
||||
|
@ -134,23 +134,23 @@ export default {
|
|||
},
|
||||
recursionSet(list, result) {
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
if (this.firstWsMassage) {
|
||||
// result["cmd"] && list[i]['cmdKey'] === result["cmd"]
|
||||
// if (result["cmd"] && list[i]['cmdKey'] === result["cmd"]) {
|
||||
for (var v = 0; v < list[i].children.length; v++) {
|
||||
if (
|
||||
result.params[list[i].children[v]["funKey"]] !== null &&
|
||||
result.params[list[i].children[v]["funKey"]] !== undefined
|
||||
) {
|
||||
list[i].children[v]["lastValue"] =
|
||||
result.params[list[i].children[v]["funKey"]];
|
||||
list[i].children[v]["lastTime"] = result.params["timestamp"]
|
||||
? result.params["timestamp"]
|
||||
: "";
|
||||
}
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
// if (this.firstWsMassage) {
|
||||
// // result["cmd"] && list[i]['cmdKey'] === result["cmd"]
|
||||
// // if (result["cmd"] && list[i]['cmdKey'] === result["cmd"]) {
|
||||
// for (var v = 0; v < list[i].children.length; v++) {
|
||||
// if (
|
||||
// result.params[list[i].children[v]["funKey"]] !== null &&
|
||||
// result.params[list[i].children[v]["funKey"]] !== undefined
|
||||
// ) {
|
||||
// list[i].children[v]["lastValue"] =
|
||||
// result.params[list[i].children[v]["funKey"]];
|
||||
// list[i].children[v]["lastTime"] = result.params["timestamp"]
|
||||
// ? result.params["timestamp"]
|
||||
// : "";
|
||||
// }
|
||||
// }
|
||||
// // }
|
||||
// } else {
|
||||
if (result["cmd"] && list[i]["cmdKey"] === result["cmd"]) {
|
||||
for (var v = 0; v < list[i].children.length; v++) {
|
||||
if (
|
||||
|
@ -166,7 +166,7 @@ export default {
|
|||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
},
|
||||
socket_onclose(e) {
|
||||
|
|
Loading…
Reference in New Issue