Commit 935258f6 authored by xiexingan's avatar xiexingan

Merge branch 'dev' of gitlab.suntrayoa.com:geqilin/energyai_vue into dev

parents d62f9e37 588e5abd
...@@ -149,7 +149,6 @@ export default { ...@@ -149,7 +149,6 @@ export default {
isRouterAlive: true, isRouterAlive: true,
queryDetailVisible: false, queryDetailVisible: false,
urlPath: window.CONFIG.urlPath, urlPath: window.CONFIG.urlPath,
paramsList: [],
showList: [], showList: [],
takeoverInfo: '' takeoverInfo: ''
} }
...@@ -174,8 +173,6 @@ export default { ...@@ -174,8 +173,6 @@ export default {
this.initWebSocket() this.initWebSocket()
this.initWebSocket2() this.initWebSocket2()
this.getDateList() this.getDateList()
let paramsList = JSON.parse(sessionStorage.getItem('paramsList'))
this.$store.dispatch('d2admin/paramsList/set', paramsList)
}, },
destroyed: function () { destroyed: function () {
this.websocketclose() this.websocketclose()
...@@ -199,7 +196,8 @@ export default { ...@@ -199,7 +196,8 @@ export default {
let webpath = '' let webpath = ''
//wsuri.substring(0, wsuri.indexOf(':')) //wsuri.substring(0, wsuri.indexOf(':'))
if (wsuri != null && wsuri.indexOf(':') <= -1) { if (wsuri != null && wsuri.indexOf(':') <= -1) {
webpath = 'ws://59.110.43.122:8091/websocket/1001' // webpath = 'ws://59.110.43.122:8091/websocket/1001'
webpath = 'ws://10.20.72.31:8091/websocket/1001'
} else { } else {
webpath = webpath =
'ws:' + 'ws:' +
...@@ -230,7 +228,6 @@ export default { ...@@ -230,7 +228,6 @@ export default {
) { ) {
var paramsInfo = JSON.parse(e.data) var paramsInfo = JSON.parse(e.data)
console.log('paramsInfo:', paramsInfo) console.log('paramsInfo:', paramsInfo)
sessionStorage.setItem('paramsList', JSON.stringify(paramsInfo))
this.$store.dispatch('d2admin/paramsList/set', paramsInfo) this.$store.dispatch('d2admin/paramsList/set', paramsInfo)
} }
}, },
...@@ -256,7 +253,8 @@ export default { ...@@ -256,7 +253,8 @@ export default {
let webpath = '' let webpath = ''
//wsuri.substring(0, wsuri.indexOf(':')) //wsuri.substring(0, wsuri.indexOf(':'))
if (wsuri != null && wsuri.indexOf(':') <= -1) { if (wsuri != null && wsuri.indexOf(':') <= -1) {
webpath = 'ws://59.110.43.122:8091/websocket/1002' // webpath = 'ws://59.110.43.122:8091/websocket/1002'
webpath = 'ws://10.20.72.31:8091/websocket/1002'
} else { } else {
webpath = webpath =
'ws:' + 'ws:' +
...@@ -420,13 +418,8 @@ export default { ...@@ -420,13 +418,8 @@ export default {
params: this.$http.adornParams({}) params: this.$http.adornParams({})
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.paramsList = data.bean console.log('paramsList:', data.bean)
sessionStorage.setItem( this.$store.dispatch('d2admin/paramsList/set', data.bean)
'paramsList',
JSON.stringify(this.paramsList)
)
console.log('paramsList:', this.paramsList)
this.$store.dispatch('d2admin/paramsList/set', this.paramsList)
} }
}) })
} else { } else {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<cardList cardListTitle="候车大厅控制"> <cardList cardListTitle="候车大厅控制">
<div slot="content"> <div slot="content">
<div> <div>
<el-form :inline="true" :model="formData" label-width="100"> <el-form :inline="true" label-width="100">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="模式选择:"> <el-form-item label="模式选择:">
...@@ -46,47 +46,88 @@ ...@@ -46,47 +46,88 @@
@click="timingControl" @click="timingControl"
>定时温控</el-button >定时温控</el-button
> >
<el-dialog
title="定时温控"
:visible.sync="timingControlDialogVisible"
append-to-body
width="40%"
>
<div v-if="isSaving == 1">
<el-form :inline="true">
<el-row>
<el-form-item label="温度设定(℃):">
<el-input size="mini" v-model="formData.temperature" clearable="" ></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="mini" @click="changeTemperature()">确定</el-button>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="定时功能启止时间:">
<el-time-select size="mini" placeholder="起始时间" v-model="formData.startTime"
:picker-options="{ start: '00:00',step: '00:15',end: '24:00'}">
</el-time-select>
<span style="padding: 0 10px"></span>
<el-time-select size="mini" placeholder="结束时间" v-model="formData.endTime"
:picker-options="{ start: '00:00',step: '00:15',end: '24:00',minTime: formData.startTime}">
</el-time-select>
</el-form-item>
<el-form-item>
<div class="switch-warp" style="transform: translateY(5px)" >
<div :class="[isOpen == 1 ? 'on' : '']" @click="setSendTime(1)" ></div>
<div :class="[isOpen == 2 ? 'on' : '']" @click="setSendTime(2)" ></div>
</div>
</el-form-item>
</el-row>
</el-form>
</div>
</el-dialog>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<el-dialog
title="定时温控"
:visible.sync="timingControlDialogVisible"
append-to-body
width="40%"
>
<el-form
:inline="true"
:model="formData"
label-width="100"
:rules="dataRule"
ref="dataForm"
>
<el-row>
<el-form-item label="温度设定(℃):" prop="temperature">
<el-input
size="mini"
v-model="formData.temperature"
clearable=""
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="mini"
@click="changeTemperature()"
>确定</el-button
>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="定时功能起止时间:">
<el-time-select
size="mini"
placeholder="起始时间"
v-model="formData.startTime"
:picker-options="{
start: '00:00',
step: '00:15',
end: '24:00'
}"
>
</el-time-select>
<span style="padding: 0 10px"></span>
<el-time-select
size="mini"
placeholder="结束时间"
v-model="formData.endTime"
:picker-options="{
start: '00:00',
step: '00:15',
end: '24:00',
minTime: formData.startTime
}"
>
</el-time-select>
</el-form-item>
<el-form-item>
<div class="switch-warp" style="transform: translateY(5px)">
<div
:class="[isOpen == 1 ? 'on' : '']"
@click="setSendTime(1)"
>
</div>
<div
:class="[isOpen == 2 ? 'on' : '']"
@click="setSendTime(2)"
>
</div>
</div>
</el-form-item>
</el-row>
</el-form>
</el-dialog>
<!-- tabs --> <!-- tabs -->
<div style="margin-bottom: 20px"> <div style="margin-bottom: 20px">
<!-- <en-tabs :tabList="tabList"></en-tabs> --> <!-- <en-tabs :tabList="tabList"></en-tabs> -->
...@@ -102,68 +143,13 @@ ...@@ -102,68 +143,13 @@
</div> </div>
</div> </div>
<!-- table --> <!-- table -->
<table-list :tableColums='tableColums' :tableData='tableData' :showOpr='true' :opNum='3' :showStateColor='true' :currentMode='currentModel'> <table-list
<template v-slot:operation="scope">
<el-button
type="text"
v-if="activeTab != 'c788ce98c1f248f590434394da485ce4'"
@click="statusHandle"
>开启</el-button
>
<el-button
type="text"
v-if="activeTab != 'c788ce98c1f248f590434394da485ce4'"
@click="statusHandle"
>关闭</el-button
>
<el-button
type="text"
@click="statusHandle"
v-if="activeTab == 'b45827c068254695864ee3c1d42573cb'"
>故障复位</el-button
>
<el-button
type="text"
@click="handleBtnClick(scope.scope.row)"
v-if="
activeTab == '303310efddb34a2e9bf269bdff8a7dc5' ||
activeTab == 'f4c840711eae4bcb9536a890cdfda493'
"
>设置频率</el-button
>
<el-button
type="text"
@click="statusHandle"
v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>上升</el-button
>
<el-button
type="text"
@click="statusHandle"
v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>下降</el-button
>
<el-button
type="text"
@click="statusHandle"
v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>停止</el-button
>
<el-button
type="text"
@click="handleUpAndDownBtnClick"
v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>定时升降</el-button
>
</template>
</table-list>
<!-- <enTable
:tableData="tableData"
:tableColums="tableColums" :tableColums="tableColums"
:isShowOp="true" :tableData="tableData"
isShowPage="true" :showOpr="true"
:showStateColor='true' :opNum="3"
:currentMode='currentId && active ? currentId :null' :showStateColor="true"
:currentMode="currentModel"
> >
<template v-slot:operation="scope"> <template v-slot:operation="scope">
<el-button <el-button
...@@ -218,7 +204,7 @@ ...@@ -218,7 +204,7 @@
>定时升降</el-button >定时升降</el-button
> >
</template> </template>
</enTable> --> </table-list>
</div> </div>
</cardList> </cardList>
<table-pagination <table-pagination
...@@ -254,7 +240,7 @@ export default { ...@@ -254,7 +240,7 @@ export default {
hallModal, hallModal,
tablePagination, tablePagination,
setUpAndDown, setUpAndDown,
tableList, tableList
}, },
data() { data() {
return { return {
...@@ -322,6 +308,15 @@ export default { ...@@ -322,6 +308,15 @@ export default {
label: '电动排烟窗' label: '电动排烟窗'
} }
], ],
dataRule: {
temperature: [
{
required: true,
pattern: /^[0-9]+([.][0-9]{1}){0,1}$/,
message: '温度必须是数字或者一位小数,'
}
]
},
hallModalVisible: false, hallModalVisible: false,
timingControlDialogVisible: false timingControlDialogVisible: false
} }
...@@ -604,47 +599,51 @@ export default { ...@@ -604,47 +599,51 @@ export default {
}, },
// 设置定时任务 // 设置定时任务
setSendTime(type) { setSendTime(type) {
if (!this.formData.startTime || !this.formData.endTime) { this.$refs['dataForm'].validate((valid) => {
this.$message.error('定时功能启止时间不能为空!') if (valid) {
return if (!this.formData.startTime || !this.formData.endTime) {
} this.$message.error('定时功能启止时间不能为空!')
this.$http({ return
url: this.$http.adornUrl('/equipment/timedTask'),
method: 'post',
params: this.$http.adornParams({
taskId: this.formData.taskId ? this.formData.taskId : '',
startTime: this.formData.startTime,
endTime: this.formData.endTime,
businessType: 1,
status: type
})
}).then((data) => {
if (data && data.code === 0) {
if (type === 1) {
this.$message.success('开启定时任务成功')
} else {
this.$message.success('关闭定时任务成功')
} }
this.isOpen = type this.$http({
this.getAllDswk() url: this.$http.adornUrl('/equipment/timedTask'),
method: 'post',
params: this.$http.adornParams({
taskId: this.formData.taskId ? this.formData.taskId : '',
startTime: this.formData.startTime,
endTime: this.formData.endTime,
businessType: 1,
status: type
})
}).then((data) => {
if (data && data.code === 0) {
if (type === 1) {
this.$message.success('开启定时任务成功')
} else {
this.$message.success('关闭定时任务成功')
}
this.isOpen = type
this.getAllDswk()
}
})
} }
}) })
}, },
changeTemperature() { changeTemperature() {
if (!this.formData.temperature) { this.$refs['dataForm'].validate((valid) => {
this.$message.error('温度不能为空!') if (valid) {
return this.$http({
} url: this.$http.adornUrl('/equipment/changeTemperature'),
this.$http({ method: 'post',
url: this.$http.adornUrl('/equipment/changeTemperature'), params: this.$http.adornParams({
method: 'post', temperature: this.formData.temperature
params: this.$http.adornParams({ })
temperature: this.formData.temperature }).then((data) => {
}) if (data && data.code === 0) {
}).then((data) => { this.$message.success('温度设定成功')
if (data && data.code === 0) { this.getAllDswk()
this.$message.success('温度设定成功') }
this.getAllDswk() })
} }
}) })
}, },
...@@ -711,7 +710,7 @@ export default { ...@@ -711,7 +710,7 @@ export default {
.el-table__body-wrapper { .el-table__body-wrapper {
min-height: 400px; min-height: 400px;
} }
.el-dialog .el-form .el-input.el-date-editor{ .el-dialog .el-form .el-input.el-date-editor {
width: 110px; width: 110px;
} }
</style> </style>
...@@ -137,6 +137,7 @@ export default { ...@@ -137,6 +137,7 @@ export default {
this.captchaPath = this.$http.adornUrl( this.captchaPath = this.$http.adornUrl(
`/captcha.jpg?uuid=${this.formLogin.uuid}` `/captcha.jpg?uuid=${this.formLogin.uuid}`
) )
this.$parent.getDateList()
}, },
/** /**
* @description 接收选择一个用户快速登录的事件 * @description 接收选择一个用户快速登录的事件
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
div(slot='content') div(slot='content')
div.tableCard() div.tableCard()
el-form( :inline="true" :model="dataForm" size="mini" @keyup.enter.native="getDataList()" ) el-form( :inline="true" :model="dataForm" size="mini" @keyup.enter.native="getDataList()" )
el-form-item( label="关键词:") el-form-item( label="指令内容:")
el-input( v-model="dataForm.comMark" placeholder="" clearable) el-input( v-model="dataForm.comMark" placeholder="" clearable)
el-form-item( label="指令类型:") el-form-item( label="指令类型:")
el-select( v-model="dataForm.comType" placeholder="请选择" clearable) el-select( v-model="dataForm.comType" placeholder="请选择" clearable)
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
font(v-if='data.scope.comSource == 2') 人工 font(v-if='data.scope.comSource == 2') 人工
template(#comType='data' ) template(#comType='data' )
font(v-if='data.scope.comType == 1') 自动 font(v-if='data.scope.comType == 1') 自动
font(v-if='data.scope.comType == 2') 手动 font(v-if='data.scope.comType == 2') 人工
template(#operation="data") template(#operation="data")
el-button(type="text" size="mini" @click="queryHandle(data.scope.id)") 详情 el-button(type="text" size="mini" @click="queryHandle(data.scope.id)") 详情
el-footer.box_footer el-footer.box_footer
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</el-form-item> </el-form-item>
<el-form-item label='指令类型:' prop='comType'> <el-form-item label='指令类型:' prop='comType'>
<el-input v-if="dataForm.comType==1" value="自动" size="medium" readonly></el-input> <el-input v-if="dataForm.comType==1" value="自动" size="medium" readonly></el-input>
<el-input v-if="dataForm.comType==2" value="手动" size="medium" readonly></el-input> <el-input v-if="dataForm.comType==2" value="人工" size="medium" readonly></el-input>
</el-form-item> </el-form-item>
<el-form-item label='指令来源:' prop='comSource'> <el-form-item label='指令来源:' prop='comSource'>
<el-input v-if="dataForm.comSource==1" value="算法" size="medium" readonly></el-input> <el-input v-if="dataForm.comSource==1" value="算法" size="medium" readonly></el-input>
......
...@@ -230,6 +230,7 @@ service.interceptors.response.use( ...@@ -230,6 +230,7 @@ service.interceptors.response.use(
sessionStorage.removeItem('token') sessionStorage.removeItem('token')
sessionStorage.removeItem('uuid') sessionStorage.removeItem('uuid')
if (this) { if (this) {
this.$parent.getDateList()
//清空接管提示框 //清空接管提示框
this.$store.dispatch('d2admin/takeover/setTakeover', null) this.$store.dispatch('d2admin/takeover/setTakeover', null)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment