pc-master #154

Merged
xiaomeng merged 3 commits from pc-master into portal 2024-06-25 07:08:20 +00:00
7 changed files with 108 additions and 39 deletions

View File

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

View File

@ -1535,6 +1535,8 @@
.el-dialog__wrapper .el-dialog .el-dialog__body .model1-top.model4-top {
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 {
@ -1546,6 +1548,13 @@
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 {
width: 10px;
height: 14px;

File diff suppressed because one or more lines are too long

View File

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

View File

@ -65,7 +65,7 @@ export default new Vuex.Store({
{ label: '土壤磷含量', value: 42, countType: 0,unit:'mg/kg' },
{ label: '土壤钾含量', value: 43, countType: 0,unit:'mg/kg' },
{ 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: 47, countType: 0,unit:'ppm' },
{ label: '氧气', value: 48, countType: 2,unit:'%vol' },

View File

@ -412,12 +412,38 @@
</div>
</el-dialog>
<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="model1-top model4-top">
<div class="btn blue" @click="model4 = true">
<div style="display: flex;align-items: center;">
<div class="btn blue">
<img src="../../assets/image/model4-icon.png" alt="" />外控模式
</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>
<div class="number">1</div>
@ -437,20 +463,39 @@
</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:2}}),model4Sel=2" :class="model4Sel==2?'blue':'off'">
{{model4Sel==2?'有效':'无效'}}
</div>
<span>液位传感器控制方式:</span>
</div>
<div class="model-right">
<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" />
<span>液位信号通道</span>
<input @blur="blurChange(10 + (indexs - 1) + '72', $event)" v-model="inputData[10 + (indexs - 1) + '72']"
@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 class="model-return">
@ -478,6 +523,7 @@ export default {
model2: false,
model3: false,
model4: false,
model4Sel:0,
model5: false,
timer: null,
indexs: 2,
@ -691,7 +737,7 @@ export default {
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
pattern: 10 + (this.indexs - 1) + "00", // //6ph-
regNum: 71,
regNum: 75,
};
this.api.postReg(data).then((res) => {
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) + '43'] = this.countData10(this.inputData[10 + (indexs - 1) + '43'])
this.inputData[10 + (indexs - 1) + '44'] = this.countData10(this.inputData[10 + (indexs - 1) + '44'])
this.model4Sel= this.inputData[10 + (indexs - 1) + '71']
} else {
this.$message.error(res.data.msg);
}
@ -776,6 +823,9 @@ export default {
clearInterval(this.timer);
}
}, 100);
},
changeModel4(){
},
//
change(code, el) {

View File

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