123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684 |
- <template>
- <view>
- <view class="white">
- <view class="title">
- <text class="param">参数修正</text>
- <view class="tiao"></view>
- </view>
- <!-- 输入框WDXZ -->
- <view>
- <uni-popup ref="inputDialogWDXZ" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -50 ~ 50)" :value="formData.WD1_XZ"
- placeholder="输入范围: -50 ~ 50的值!" @confirm="dialogInputConfirmWDXZ"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 输入框SDXZ -->
- <view>
- <uni-popup ref="inputDialogSDXZ" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.SD1_XZ"
- placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmSDXZ"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 输入框JRP -->
- <view>
- <uni-popup ref="inputDialogJRP" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.JR_P"
- placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmJRP"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 输入框JRI -->
- <view>
- <uni-popup ref="inputDialogJRI" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.JR_I"
- placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmJRI"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 输入框ZLP -->
- <view>
- <uni-popup ref="inputDialogZLP" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.ZL_P"
- placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmZLP"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 输入框ZLI -->
- <view>
- <uni-popup ref="inputDialogZLI" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.ZL_I"
- placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmZLI"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 输入框JSP -->
- <view>
- <uni-popup ref="inputDialogJSP" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.JS_P"
- placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmJSP"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 输入框JSI -->
- <view>
- <uni-popup ref="inputDialogJSI" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.JS_I"
- placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmJSI"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 输入框CSP -->
- <view>
- <uni-popup ref="inputDialogCSP" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.CS_P"
- placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmCSP"></uni-popup-dialog>
- </uni-popup>
- </view>
- <!-- 输入框CSI -->
- <view>
- <uni-popup ref="inputDialogCSI" type="dialog">
- <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.CS_I"
- placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmCSI"></uni-popup-dialog>
- </uni-popup>
- </view>
- <form>
- <view class="setmenu">
- <view class="setItem">
- <view class="text">
- <text>排风温度修正</text>
- </view>
- <view class="input" @click="inputDialogToggleWDXZ()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.WD1_XZ" />
- <view class="danwei">
- <text style="margin-left: 10rpx;">℃</text>
- </view>
- </view>
- </view>
- <view class="setItem">
- <view class="text">
- <text>排风湿度修正</text>
- </view>
- <view class="input" @click="inputDialogToggleSDXZ()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.SD1_XZ" />
- <view class="danwei"> <text style="margin-left: 14rpx;">%</text></view>
- </view>
- </view>
- <view class="setItem">
- <view class="text">
- <text>加热比例</text>
- </view>
- <view class="input" @click="inputDialogToggleJRP()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JR_P" />
- </view>
- </view>
- <view class="setItem">
- <view class="text">
- <text>加热积分</text>
- </view>
- <view class="input" @click="inputDialogToggleJRI()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JR_I" />
- </view>
- </view>
- <view class="setItem">
- <view class="text">
- <text>降温比例</text>
- </view>
- <view class="input" @click="inputDialogToggleZLP()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.ZL_P" />
- </view>
- </view>
- <view class="setItem">
- <view class="text">
- <text>降温积分</text>
- </view>
- <view class="input" @click="inputDialogToggleZLI()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.ZL_I" />
- </view>
- </view>
- <view class="setItem">
- <view class="text">
- <text>加湿比例</text>
- </view>
- <view class="input" @click="inputDialogToggleJSP()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JS_P" />
- </view>
- </view>
- <view class="setItem">
- <view class="text">
- <text>加湿积分</text>
- </view>
- <view class="input" @click="inputDialogToggleJSI()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JS_I" />
- </view>
- </view>
- <view class="setItem">
- <view class="text">
- <text>除湿比例</text>
- </view>
- <view class="input" @click="inputDialogToggleCSP()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.CS_P" />
- </view>
- </view>
- <view class="setItem">
- <view class="text">
- <text>除湿积分</text>
- </view>
- <view class="input" @click="inputDialogToggleCSI()">
- <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.CS_I" />
- </view>
- </view>
- <view class="stopButton">
- <button class="button" @tap="HFCC()"
- :class="{'active_button': formData.HF_CC == 1}">恢复出厂设定</button>
- </view>
- </view>
- </form>
- <view class="anniu">
- <image class="anniu" src="../../static/设备菜单/前往列表@2x.png" @tap="back"></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- formData: {
- ZL_P: '0.0', //制冷回路增益P
- ZL_I: '0.0', //制冷积分时间I
- CS_P: '0.0', //除湿回路增益P
- CS_I: '0.0', //除湿积分时间I
- JR_P: '0.0', //加热回路增益P
- JR_I: '0.0', //加热积分时间I
- JS_P: '0.0', //加湿回路增益P
- JS_I: '0.0', //加湿积分时间I
- WD1_XZ: '0.0', //排风温度修正(单位为℃)
- SD1_XZ: '0.0', //排风湿度修正(单位为%RH)
- HF_CC: '0', //恢复出厂
- }
- }
- },
- onLoad() {
- this.getWDXZ()
- this.getSDXZ()
- this.getJR_I()
- this.getJR_P()
- this.getJW_I()
- this.getJW_P()
- this.getJS_I()
- this.getJS_P()
- this.getCS_I()
- this.getCS_P()
- },
- methods: {
- //修改设置
- //WDXZ
- inputDialogToggleWDXZ() {
- this.$refs.inputDialogWDXZ.open()
- },
- async dialogInputConfirmWDXZ(val) {
- this.formData.WD1_XZ = val;
- this.updateWDXZ()
- console.log(this.formData.WD1_XZ);
- },
- async updateWDXZ(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "235",
- sn: "CK1",
- name: "WD1_XZ",
- value: this.formData.WD1_XZ
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- //SDXZ
- inputDialogToggleSDXZ() {
- this.$refs.inputDialogSDXZ.open()
- },
- async dialogInputConfirmSDXZ(val) {
- this.formData.SD1_XZ = val;
- this.updateSDXZ()
- console.log(this.formData.SD1_XZ);
- },
- async updateSDXZ(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "287",
- sn: "CK1",
- name: "SD1_XZ",
- value: this.formData.SD1_XZ
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- //JRP
- inputDialogToggleJRP() {
- this.$refs.inputDialogJRP.open()
- },
- async dialogInputConfirmJRP(val) {
- this.formData.JR_P = val;
- this.updateJRP()
- console.log(this.formData.JR_P);
- },
- async updateJRP(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "226",
- sn: "CK1",
- name: "JR_P",
- value: this.formData.JR_P
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- //JRI
- inputDialogToggleJRI() {
- this.$refs.inputDialogJRI.open()
- },
- async dialogInputConfirmJRI(val) {
- this.formData.JR_I = val;
- this.updateJRI()
- console.log(this.formData.JR_I);
- },
- async updateJRI(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "220",
- sn: "CK1",
- name: "JR_I",
- value: this.formData.JR_I
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- //ZLP
- inputDialogToggleZLP() {
- this.$refs.inputDialogZLP.open()
- },
- async dialogInputConfirmZLP(val) {
- this.formData.ZL_P = val;
- this.updateZLP()
- console.log(this.formData.ZL_P);
- },
- async updateZLP(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "275",
- sn: "CK1",
- name: "ZL_P",
- value: this.formData.ZL_P
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- //ZLI
- inputDialogToggleZLI() {
- this.$refs.inputDialogZLI.open()
- },
- async dialogInputConfirmZLI(val) {
- this.formData.ZL_I = val;
- this.updateZLI()
- console.log(this.formData.ZL_I);
- },
- async updateZLI(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "236",
- sn: "CK1",
- name: "ZL_I",
- value: this.formData.ZL_I
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- //JSP
- inputDialogToggleJSP() {
- this.$refs.inputDialogJSP.open()
- },
- async dialogInputConfirmJSP(val) {
- this.formData.JS_P = val;
- this.updateJSP()
- console.log(this.formData.JS_P);
- },
- async updateJSP(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "304",
- sn: "CK1",
- name: "JS_P",
- value: this.formData.JS_P
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- //JSI
- inputDialogToggleJSI() {
- this.$refs.inputDialogJSI.open()
- },
- async dialogInputConfirmJSI(val) {
- this.formData.JS_I = val;
- this.updateJSI()
- console.log(this.formData.JS_I);
- },
- async updateJSI(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "299",
- sn: "CK1",
- name: "JS_I",
- value: this.formData.JS_I
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- //CSP
- inputDialogToggleCSP() {
- this.$refs.inputDialogCSP.open()
- },
- async dialogInputConfirmCSP(val) {
- this.formData.CS_P = val;
- this.updateCSP()
- console.log(this.formData.CS_P);
- },
- async updateCSP(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "240",
- sn: "CK1",
- name: "CS_P",
- value: this.formData.CS_P
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- //CSI
- inputDialogToggleCSI() {
- this.$refs.inputDialogCSI.open()
- },
- async dialogInputConfirmCSI(val) {
- this.formData.CS_I = val;
- this.updateCSI()
- console.log(this.formData.CS_I);
- },
- async updateCSI(e) {
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "217",
- sn: "CK1",
- name: "CS_I",
- value: this.formData.CS_I
- };
- let res = await uni.$http.get(url, data);
- console.log(res);
- },
- async HFCC(e) {
- this.formData.HF_CC == 1 ? this.formData.HF_CC = 0 : this.formData.HF_CC = 1;
- let vm = this;
- let url = uni.$api.deviceParam.updateParam;
- let data = {
- id: "237",
- value: this.formData.HF_CC,
- name: "HF_CC",
- sn: "CK1"
- };
- let res = await uni.$http.get(url, data);
- console.log(res.data.data.value);
- },
- back() {
- uni.navigateTo({
- url: '/pages/device/deviceInfo/deviceInfo'
- })
- },
- async getWDXZ(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "235",
- };
- let res = await uni.$http.get(url, data);
- this.formData.WD1_XZ = res.data.data.deviceParam.value;
- },
- async getSDXZ(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "287",
- };
- let res = await uni.$http.get(url, data);
- this.formData.SD1_XZ = res.data.data.deviceParam.value;
- },
- async getJR_P(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "226",
- };
- let res = await uni.$http.get(url, data);
- this.formData.JR_P = res.data.data.deviceParam.value;
- },
- async getJR_I(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "220",
- };
- let res = await uni.$http.get(url, data);
- this.formData.JR_I = res.data.data.deviceParam.value;
- },
- async getJW_P(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "275",
- };
- let res = await uni.$http.get(url, data);
- this.formData.ZL_P = res.data.data.deviceParam.value;
- },
- async getJW_I(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "236",
- };
- let res = await uni.$http.get(url, data);
- this.formData.ZL_I = res.data.data.deviceParam.value;
- },
- async getJS_P(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "304",
- };
- let res = await uni.$http.get(url, data);
- this.formData.JS_P = res.data.data.deviceParam.value;
- },
- async getJS_I(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "299",
- };
- let res = await uni.$http.get(url, data);
- this.formData.JS_I = res.data.data.deviceParam.value;
- },
- async getCS_P(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "240",
- };
- let res = await uni.$http.get(url, data);
- this.formData.CS_P = res.data.data.deviceParam.value;
- },
- async getCS_I(e) {
- let vm = this;
- let url = uni.$api.deviceParam.detail;
- let data = {
- id: "217",
- };
- let res = await uni.$http.get(url, data);
- this.formData.CS_I = res.data.data.deviceParam.value;
- }
- }
- }
- </script>
- <style>
- .button {
- background: #007AFF;
- color: white;
- width: 654rpx;
- margin-left: 24rpx;
- margin-top: 44rpx;
- }
- .text {
- margin-top: 40rpx;
- margin-bottom: 16rpx;
- color: #444546;
- font-size: 26rpx;
- }
- .input {
- width: 320rpx;
- height: 98rpx;
- background-color: #eaeaea;
- display: flex;
- flex-direction: row;
- align-items: center;
- border-radius: 6rpx;
- border: 1px solid #eaeaea;
- }
- .danwei {
- width: 78rpx;
- height: 98rpx;
- background-color: white;
- display: flex;
- align-items: center;
- }
- .setmenu {
- display: flex;
- flex-wrap: wrap;
- }
- .active_button {
- background-color: crimson;
- }
- .setItem {
- margin-left: 20rpx;
- }
- .white {
- width: 702rpx;
- height: 1230rpx;
- margin-left: 24rpx;
- margin-top: 24rpx;
- border-radius: 10rpx;
- background-color: white;
- }
- .title {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .tiao {
- width: 60px;
- height: 3px;
- margin-top: 20rpx;
- background: #007AFF;
- }
- .param {
- font-size: 38rpx;
- font-weight: 550;
- margin-top: 40rpx;
- }
- .anniu {
- width: 116rpx;
- height: 116rpx;
- float: right;
- margin-top: 20rpx;
- }
- </style>
|