Compare commits

...

4 Commits

Author SHA1 Message Date
xiaomeng 6e16780800 Merge pull request 'pc-master' (#154) from pc-master into portal
Reviewed-on: #154
2024-06-25 07:08:20 +00:00
wb-zhuangyuehuang-vjzzZ 28233bc38a 1 2024-06-25 14:54:12 +08:00
wb-zhuangyuehuang-vjzzZ 7a945ff5ce Merge branch 'pc-master' of https://git.lihe-control.com/xiaomeng/wszhyWx into pc-master 2024-06-25 11:37:42 +08:00
wb-zhuangyuehuang-vjzzZ c49e5803d3 1 2024-06-25 11:37:35 +08:00
7 changed files with 108 additions and 39 deletions

View File

@ -334,7 +334,10 @@ geteqetdata(data) {
addWarnMessage(data) { addWarnMessage(data) {
return sendPostRequest(`/shortMessage/setMessage`, data) return sendPostRequest(`/shortMessage/setMessage`, data)
}, },
//短信报警填写条件
selnowmes(data) {
return sendGetRequest(`/shortMessage/selnowmes`, data)
},
//根据设备id查看短信报警 //根据设备id查看短信报警
messageList(data) { messageList(data) {
return sendGetRequest(`/shortMessage/selMesById`, data) return sendGetRequest(`/shortMessage/selMesById`, data)

View File

@ -1535,6 +1535,8 @@
.el-dialog__wrapper .el-dialog .el-dialog__body .model1-top.model4-top { .el-dialog__wrapper .el-dialog .el-dialog__body .model1-top.model4-top {
align-items: flex-start; align-items: flex-start;
padding: 20px 0 0;
justify-content: flex-start;
} }
.el-dialog__wrapper .el-dialog .el-dialog__body .model1-top.model4-top .btn { .el-dialog__wrapper .el-dialog .el-dialog__body .model1-top.model4-top .btn {
@ -1546,6 +1548,13 @@
height: 24px; height: 24px;
} }
.el-dialog__wrapper .el-dialog .el-dialog__body .model1-top.model4-top .model-left {
display: flex;
align-items: center;
height: 54px;
margin-right: 10px;
}
.el-dialog__wrapper .el-dialog .el-dialog__body .model1-top .btn img { .el-dialog__wrapper .el-dialog .el-dialog__body .model1-top .btn img {
width: 10px; width: 10px;
height: 14px; height: 14px;

File diff suppressed because one or more lines are too long

View File

@ -1632,7 +1632,8 @@
&.model4-top { &.model4-top {
align-items: flex-start; align-items: flex-start;
padding: 20px 0 0;
justify-content: flex-start;
.btn { .btn {
padding: 0 10px; padding: 0 10px;
@ -1641,6 +1642,12 @@
height: 24px; height: 24px;
} }
} }
.model-left{
display: flex;
align-items: center;
height: 54px;
margin-right: 10px;
}
} }
.btn { .btn {
@ -1649,7 +1656,7 @@
height: 14px; height: 14px;
} }
} }
.model-right { .model-right {
>div { >div {
display: flex; display: flex;

View File

@ -65,7 +65,7 @@ export default new Vuex.Store({
{ label: '土壤磷含量', value: 42, countType: 0,unit:'mg/kg' }, { label: '土壤磷含量', value: 42, countType: 0,unit:'mg/kg' },
{ label: '土壤钾含量', value: 43, countType: 0,unit:'mg/kg' }, { label: '土壤钾含量', value: 43, countType: 0,unit:'mg/kg' },
{ label: '管道压力', value: 44, countType: 0,unit:'Kpa' }, { label: '管道压力', value: 44, countType: 0,unit:'Kpa' },
{ label: '一氧化碳', value: 45, countType: 0,unit:'ppm' }, { label: '水位', value: 45, countType: 0,unit:'cm' },
{ label: '氨气', value: 46, countType: 0,unit:'ppm' }, { label: '氨气', value: 46, countType: 0,unit:'ppm' },
{ label: '硫化氢', value: 47, countType: 0,unit:'ppm' }, { label: '硫化氢', value: 47, countType: 0,unit:'ppm' },
{ label: '氧气', value: 48, countType: 2,unit:'%vol' }, { label: '氧气', value: 48, countType: 2,unit:'%vol' },

View File

@ -412,12 +412,38 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model4" <el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model4"
width="560px" :before-close="handleClose4"> width="700px" :before-close="handleClose4">
<div class="page-title title-302">{{ indexs }}#灌溉组控制参数配置</div> <div class="page-title title-302">{{ indexs }}#灌溉组控制参数配置</div>
<div class="model1-top model4-top"> <div style="display: flex;align-items: center;">
<div class="btn blue" @click="model4 = true"> <div class="btn blue">
<img src="../../assets/image/model4-icon.png" alt="" />外控模式 <img src="../../assets/image/model4-icon.png" alt="" />外控模式
</div> </div>
<div>
<div class="input-main-80">
<span>有效时间</span>
<input @blur="blurChange(10 + (indexs - 1) + '67', $event)" v-model="inputData[10 + (indexs - 1) + '67']"
@input="change(10 + (indexs - 1) + '67', $event)" type="number" placeholder="0" min="0" max="23" />
<span>:</span>
<input @blur="blurChange(10 + (indexs - 1) + '68', $event)" v-model="inputData[10 + (indexs - 1) + '68']"
@input="change(10 + (indexs - 1) + '68', $event)" type="number" placeholder="0" min="0" max="59" />
<span>--</span>
<input @blur="blurChange(10 + (indexs - 1) + '69', $event)" v-model="inputData[10 + (indexs - 1) + '69']"
@input="change(10 + (indexs - 1) + '69', $event)" type="number" placeholder="0" min="0" max="23" />
<span>:</span>
<input @blur="blurChange(10 + (indexs - 1) + '70', $event)" v-model="inputData[10 + (indexs - 1) + '70']"
@input="change(10 + (indexs - 1) + '70', $event)" type="number" placeholder="0" min="0" max="59" />
</div>
</div>
</div>
<div class="model1-top model4-top">
<div class="model-left">
<div class="btn btn-w80" @click="blurChange(10 + (indexs - 1) + '71', {target:{value:1}}),model4Sel=1" :class="model4Sel==1?'blue':'off'">
{{model4Sel==1?'有效':'无效'}}
</div>
<span>外部数字量控制方式:</span>
</div>
<div class="model-right"> <div class="model-right">
<div> <div>
<div class="number">1</div> <div class="number">1</div>
@ -437,20 +463,39 @@
</div> </div>
</div> </div>
</div> </div>
<div> <div class="model1-top model4-top">
<div class="input-main-80"> <div class="model-left">
<span>有效时间</span> <div class="btn btn-w80 " @click="blurChange(10 + (indexs - 1) + '71', {target:{value:2}}),model4Sel=2" :class="model4Sel==2?'blue':'off'">
<input @blur="blurChange(10 + (indexs - 1) + '67', $event)" v-model="inputData[10 + (indexs - 1) + '67']" {{model4Sel==2?'有效':'无效'}}
@input="change(10 + (indexs - 1) + '67', $event)" type="number" placeholder="0" min="0" max="23" /> </div>
<span>:</span> <span>液位传感器控制方式:</span>
<input @blur="blurChange(10 + (indexs - 1) + '68', $event)" v-model="inputData[10 + (indexs - 1) + '68']" </div>
@input="change(10 + (indexs - 1) + '68', $event)" type="number" placeholder="0" min="0" max="59" />
<span>--</span> <div class="model-right">
<input @blur="blurChange(10 + (indexs - 1) + '69', $event)" v-model="inputData[10 + (indexs - 1) + '69']" <div>
@input="change(10 + (indexs - 1) + '69', $event)" type="number" placeholder="0" min="0" max="23" /> <div class="input-main-80">
<span>:</span> <span>液位信号通道</span>
<input @blur="blurChange(10 + (indexs - 1) + '70', $event)" v-model="inputData[10 + (indexs - 1) + '70']" <input @blur="blurChange(10 + (indexs - 1) + '72', $event)" v-model="inputData[10 + (indexs - 1) + '72']"
@input="change(10 + (indexs - 1) + '70', $event)" type="number" placeholder="0" min="0" max="59" /> @input="change(10 + (indexs - 1) + '72', $event)" type="number" placeholder="0" />
</div>
</div>
<div>
<div class="input-main-80">
<span>启动低液位值</span>
<input @blur="blurChange(10 + (indexs - 1) + '73', $event)" v-model="inputData[10 + (indexs - 1) + '73']"
@input="change(10 + (indexs - 1) + '73', $event)" type="number" placeholder="0" />
<span>cm</span>
</div>
</div>
<div>
<div class="input-main-80">
<span>停止高液位值</span>
<input @blur="blurChange(10 + (indexs - 1) + '74', $event)" v-model="inputData[10 + (indexs - 1) + '74']"
@input="change(10 + (indexs - 1) + '74', $event)" type="number" placeholder="0" />
<span>cm</span>
</div>
</div>
</div> </div>
</div> </div>
<div class="model-return"> <div class="model-return">
@ -478,6 +523,7 @@ export default {
model2: false, model2: false,
model3: false, model3: false,
model4: false, model4: false,
model4Sel:0,
model5: false, model5: false,
timer: null, timer: null,
indexs: 2, indexs: 2,
@ -691,7 +737,7 @@ export default {
var data = { var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId, equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
pattern: 10 + (this.indexs - 1) + "00", // //6ph- pattern: 10 + (this.indexs - 1) + "00", // //6ph-
regNum: 71, regNum: 75,
}; };
this.api.postReg(data).then((res) => { this.api.postReg(data).then((res) => {
this.loading.close() this.loading.close()
@ -707,6 +753,7 @@ export default {
this.inputData[10 + (indexs - 1) + '40'] = this.countData10(this.inputData[10 + (indexs - 1) + '40']) this.inputData[10 + (indexs - 1) + '40'] = this.countData10(this.inputData[10 + (indexs - 1) + '40'])
this.inputData[10 + (indexs - 1) + '43'] = this.countData10(this.inputData[10 + (indexs - 1) + '43']) this.inputData[10 + (indexs - 1) + '43'] = this.countData10(this.inputData[10 + (indexs - 1) + '43'])
this.inputData[10 + (indexs - 1) + '44'] = this.countData10(this.inputData[10 + (indexs - 1) + '44']) this.inputData[10 + (indexs - 1) + '44'] = this.countData10(this.inputData[10 + (indexs - 1) + '44'])
this.model4Sel= this.inputData[10 + (indexs - 1) + '71']
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
@ -776,6 +823,9 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
} }
}, 100); }, 100);
},
changeModel4(){
}, },
// //
change(code, el) { change(code, el) {

View File

@ -411,15 +411,9 @@
<el-table :data="tableData" :row-class-name="tableRowClassName" height="520" <el-table :data="tableData" :row-class-name="tableRowClassName" height="520"
style="width: 100%"> style="width: 100%">
<el-table-column prop="environmentId" label="报警名称"> <el-table-column prop="environmentName" label="报警名称">
<template slot-scope="scope">
<div>
{{ typeSelList[scope.row.environmentId - 1].name }}
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="environmentId" label="判断条件"> <el-table-column prop="environmentId" label="判断条件">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
{{ typeSelList1[scope.row.unit - 1].name }} {{ typeSelList1[scope.row.unit - 1].name }}
@ -437,7 +431,7 @@
删除 删除
</div> </div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@ -526,12 +520,7 @@ export default {
}, },
tableData: [], tableData: [],
// //
typeSelList: [{ name: '1#平均空气温度', value: 1, }, typeSelList: [],
{ name: '2#平均空气温度', value: 2, },
{ name: '1#平均光亮度', value: 3, },
{ name: '1#平均二氧化碳', value: 4, },
{ name: '1#平均土壤温度', value: 5, },
{ name: '1#平均土壤湿度', value: 6, },],
typeSelList1: [{ name: '大于(>)', value: 1, }, typeSelList1: [{ name: '大于(>)', value: 1, },
{ name: '小于(<)', value: 2, }, { name: '小于(<)', value: 2, },
{ name: '大于等于(>=)', value: 3, }, { name: '大于等于(>=)', value: 3, },
@ -566,7 +555,8 @@ export default {
this.deviceName = store.equipmentList[this.indexs - 1].deviceName this.deviceName = store.equipmentList[this.indexs - 1].deviceName
this.deviceState = store.equipmentList[this.indexs - 1].deviceState this.deviceState = store.equipmentList[this.indexs - 1].deviceState
// this.getTime() // this.getTime()
console.log(store.equipmentList[this.indexs - 1].deviceName, this.indexs - 1, 77);
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
that.timer && clearInterval(that.timer) that.timer && clearInterval(that.timer)
@ -686,7 +676,8 @@ export default {
// //
handleCommand(index) { handleCommand(index) {
this.warnModelSel1 = this.typeSelList[index].name this.warnModelSel1 = this.typeSelList[index].name
this.warnForm.environmentId = this.typeSelList[index].value this.warnForm.environmentId = this.typeSelList[index].environmentId
this.warnForm.equipmentNumber = this.typeSelList[index].equipmentNumber
// this.TypeSel = this.typeSelList[index].name // this.TypeSel = this.typeSelList[index].name
// this.TypeSelIndex = this.typeSelList[index].value // this.TypeSelIndex = this.typeSelList[index].value
// var dataNum = { // var dataNum = {
@ -923,6 +914,15 @@ export default {
var formData = { var formData = {
equipmentId: store.equipmentList[this.indexs - 1].deviceId equipmentId: store.equipmentList[this.indexs - 1].deviceId
} }
var selData={
messageId:store.equipmentList[this.indexs - 1].deviceId
}
this.api.selnowmes(selData).then(res=>{
if(res.data.code==200){
this.typeSelList=res.data.data
}
})
var list = store.typeList var list = store.typeList
if (this.deviceName == 1) { if (this.deviceName == 1) {
this.api.postRtdata(equipmentId).then((res) => { this.api.postRtdata(equipmentId).then((res) => {