systemParameter.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. <template>
  2. <view>
  3. <view class="white">
  4. <view class="title">
  5. <text class="param">参数修正</text>
  6. <view class="tiao"></view>
  7. </view>
  8. <!-- 输入框WDXZ -->
  9. <view>
  10. <uni-popup ref="inputDialogWDXZ" type="dialog">
  11. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -50 ~ 50)" :value="formData.WD1_XZ"
  12. placeholder="输入范围: -50 ~ 50的值!" @confirm="dialogInputConfirmWDXZ"></uni-popup-dialog>
  13. </uni-popup>
  14. </view>
  15. <!-- 输入框SDXZ -->
  16. <view>
  17. <uni-popup ref="inputDialogSDXZ" type="dialog">
  18. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.SD1_XZ"
  19. placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmSDXZ"></uni-popup-dialog>
  20. </uni-popup>
  21. </view>
  22. <!-- 输入框JRP -->
  23. <view>
  24. <uni-popup ref="inputDialogJRP" type="dialog">
  25. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.JR_P"
  26. placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmJRP"></uni-popup-dialog>
  27. </uni-popup>
  28. </view>
  29. <!-- 输入框JRI -->
  30. <view>
  31. <uni-popup ref="inputDialogJRI" type="dialog">
  32. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.JR_I"
  33. placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmJRI"></uni-popup-dialog>
  34. </uni-popup>
  35. </view>
  36. <!-- 输入框ZLP -->
  37. <view>
  38. <uni-popup ref="inputDialogZLP" type="dialog">
  39. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.ZL_P"
  40. placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmZLP"></uni-popup-dialog>
  41. </uni-popup>
  42. </view>
  43. <!-- 输入框ZLI -->
  44. <view>
  45. <uni-popup ref="inputDialogZLI" type="dialog">
  46. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.ZL_I"
  47. placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmZLI"></uni-popup-dialog>
  48. </uni-popup>
  49. </view>
  50. <!-- 输入框JSP -->
  51. <view>
  52. <uni-popup ref="inputDialogJSP" type="dialog">
  53. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.JS_P"
  54. placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmJSP"></uni-popup-dialog>
  55. </uni-popup>
  56. </view>
  57. <!-- 输入框JSI -->
  58. <view>
  59. <uni-popup ref="inputDialogJSI" type="dialog">
  60. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.JS_I"
  61. placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmJSI"></uni-popup-dialog>
  62. </uni-popup>
  63. </view>
  64. <!-- 输入框CSP -->
  65. <view>
  66. <uni-popup ref="inputDialogCSP" type="dialog">
  67. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.CS_P"
  68. placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmCSP"></uni-popup-dialog>
  69. </uni-popup>
  70. </view>
  71. <!-- 输入框CSI -->
  72. <view>
  73. <uni-popup ref="inputDialogCSI" type="dialog">
  74. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: -100 ~ 100)" :value="formData.CS_I"
  75. placeholder="输入范围: -100 ~ 100的值!" @confirm="dialogInputConfirmCSI"></uni-popup-dialog>
  76. </uni-popup>
  77. </view>
  78. <form>
  79. <view class="setmenu">
  80. <view class="setItem">
  81. <view class="text">
  82. <text>排风温度修正</text>
  83. </view>
  84. <view class="input" @click="inputDialogToggleWDXZ()">
  85. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.WD1_XZ" />
  86. <view class="danwei">
  87. <text style="margin-left: 10rpx;">℃</text>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="setItem">
  92. <view class="text">
  93. <text>排风湿度修正</text>
  94. </view>
  95. <view class="input" @click="inputDialogToggleSDXZ()">
  96. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.SD1_XZ" />
  97. <view class="danwei"> <text style="margin-left: 14rpx;">%</text></view>
  98. </view>
  99. </view>
  100. <view class="setItem">
  101. <view class="text">
  102. <text>加热比例</text>
  103. </view>
  104. <view class="input" @click="inputDialogToggleJRP()">
  105. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JR_P" />
  106. </view>
  107. </view>
  108. <view class="setItem">
  109. <view class="text">
  110. <text>加热积分</text>
  111. </view>
  112. <view class="input" @click="inputDialogToggleJRI()">
  113. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JR_I" />
  114. </view>
  115. </view>
  116. <view class="setItem">
  117. <view class="text">
  118. <text>降温比例</text>
  119. </view>
  120. <view class="input" @click="inputDialogToggleZLP()">
  121. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.ZL_P" />
  122. </view>
  123. </view>
  124. <view class="setItem">
  125. <view class="text">
  126. <text>降温积分</text>
  127. </view>
  128. <view class="input" @click="inputDialogToggleZLI()">
  129. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.ZL_I" />
  130. </view>
  131. </view>
  132. <view class="setItem">
  133. <view class="text">
  134. <text>加湿比例</text>
  135. </view>
  136. <view class="input" @click="inputDialogToggleJSP()">
  137. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JS_P" />
  138. </view>
  139. </view>
  140. <view class="setItem">
  141. <view class="text">
  142. <text>加湿积分</text>
  143. </view>
  144. <view class="input" @click="inputDialogToggleJSI()">
  145. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JS_I" />
  146. </view>
  147. </view>
  148. <view class="setItem">
  149. <view class="text">
  150. <text>除湿比例</text>
  151. </view>
  152. <view class="input" @click="inputDialogToggleCSP()">
  153. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.CS_P" />
  154. </view>
  155. </view>
  156. <view class="setItem">
  157. <view class="text">
  158. <text>除湿积分</text>
  159. </view>
  160. <view class="input" @click="inputDialogToggleCSI()">
  161. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.CS_I" />
  162. </view>
  163. </view>
  164. <view class="stopButton">
  165. <button class="button" @tap="HFCC()"
  166. :class="{'active_button': formData.HF_CC == 1}">恢复出厂设定</button>
  167. </view>
  168. </view>
  169. </form>
  170. <view class="anniu">
  171. <image class="anniu" src="../../static/设备菜单/前往列表@2x.png" @tap="back"></image>
  172. </view>
  173. </view>
  174. </view>
  175. </template>
  176. <script>
  177. export default {
  178. data() {
  179. return {
  180. formData: {
  181. ZL_P: '0.0', //制冷回路增益P
  182. ZL_I: '0.0', //制冷积分时间I
  183. CS_P: '0.0', //除湿回路增益P
  184. CS_I: '0.0', //除湿积分时间I
  185. JR_P: '0.0', //加热回路增益P
  186. JR_I: '0.0', //加热积分时间I
  187. JS_P: '0.0', //加湿回路增益P
  188. JS_I: '0.0', //加湿积分时间I
  189. WD1_XZ: '0.0', //排风温度修正(单位为℃)
  190. SD1_XZ: '0.0', //排风湿度修正(单位为%RH)
  191. HF_CC: '0', //恢复出厂
  192. }
  193. }
  194. },
  195. onLoad() {
  196. this.getWDXZ()
  197. this.getSDXZ()
  198. this.getJR_I()
  199. this.getJR_P()
  200. this.getJW_I()
  201. this.getJW_P()
  202. this.getJS_I()
  203. this.getJS_P()
  204. this.getCS_I()
  205. this.getCS_P()
  206. },
  207. methods: {
  208. //修改设置
  209. //WDXZ
  210. inputDialogToggleWDXZ() {
  211. this.$refs.inputDialogWDXZ.open()
  212. },
  213. async dialogInputConfirmWDXZ(val) {
  214. this.formData.WD1_XZ = val;
  215. this.updateWDXZ()
  216. console.log(this.formData.WD1_XZ);
  217. },
  218. async updateWDXZ(e) {
  219. let vm = this;
  220. let url = uni.$api.deviceParam.updateParam;
  221. let data = {
  222. id: "235",
  223. sn: "CK1",
  224. name: "WD1_XZ",
  225. value: this.formData.WD1_XZ
  226. };
  227. let res = await uni.$http.get(url, data);
  228. console.log(res);
  229. },
  230. //SDXZ
  231. inputDialogToggleSDXZ() {
  232. this.$refs.inputDialogSDXZ.open()
  233. },
  234. async dialogInputConfirmSDXZ(val) {
  235. this.formData.SD1_XZ = val;
  236. this.updateSDXZ()
  237. console.log(this.formData.SD1_XZ);
  238. },
  239. async updateSDXZ(e) {
  240. let vm = this;
  241. let url = uni.$api.deviceParam.updateParam;
  242. let data = {
  243. id: "287",
  244. sn: "CK1",
  245. name: "SD1_XZ",
  246. value: this.formData.SD1_XZ
  247. };
  248. let res = await uni.$http.get(url, data);
  249. console.log(res);
  250. },
  251. //JRP
  252. inputDialogToggleJRP() {
  253. this.$refs.inputDialogJRP.open()
  254. },
  255. async dialogInputConfirmJRP(val) {
  256. this.formData.JR_P = val;
  257. this.updateJRP()
  258. console.log(this.formData.JR_P);
  259. },
  260. async updateJRP(e) {
  261. let vm = this;
  262. let url = uni.$api.deviceParam.updateParam;
  263. let data = {
  264. id: "226",
  265. sn: "CK1",
  266. name: "JR_P",
  267. value: this.formData.JR_P
  268. };
  269. let res = await uni.$http.get(url, data);
  270. console.log(res);
  271. },
  272. //JRI
  273. inputDialogToggleJRI() {
  274. this.$refs.inputDialogJRI.open()
  275. },
  276. async dialogInputConfirmJRI(val) {
  277. this.formData.JR_I = val;
  278. this.updateJRI()
  279. console.log(this.formData.JR_I);
  280. },
  281. async updateJRI(e) {
  282. let vm = this;
  283. let url = uni.$api.deviceParam.updateParam;
  284. let data = {
  285. id: "220",
  286. sn: "CK1",
  287. name: "JR_I",
  288. value: this.formData.JR_I
  289. };
  290. let res = await uni.$http.get(url, data);
  291. console.log(res);
  292. },
  293. //ZLP
  294. inputDialogToggleZLP() {
  295. this.$refs.inputDialogZLP.open()
  296. },
  297. async dialogInputConfirmZLP(val) {
  298. this.formData.ZL_P = val;
  299. this.updateZLP()
  300. console.log(this.formData.ZL_P);
  301. },
  302. async updateZLP(e) {
  303. let vm = this;
  304. let url = uni.$api.deviceParam.updateParam;
  305. let data = {
  306. id: "275",
  307. sn: "CK1",
  308. name: "ZL_P",
  309. value: this.formData.ZL_P
  310. };
  311. let res = await uni.$http.get(url, data);
  312. console.log(res);
  313. },
  314. //ZLI
  315. inputDialogToggleZLI() {
  316. this.$refs.inputDialogZLI.open()
  317. },
  318. async dialogInputConfirmZLI(val) {
  319. this.formData.ZL_I = val;
  320. this.updateZLI()
  321. console.log(this.formData.ZL_I);
  322. },
  323. async updateZLI(e) {
  324. let vm = this;
  325. let url = uni.$api.deviceParam.updateParam;
  326. let data = {
  327. id: "236",
  328. sn: "CK1",
  329. name: "ZL_I",
  330. value: this.formData.ZL_I
  331. };
  332. let res = await uni.$http.get(url, data);
  333. console.log(res);
  334. },
  335. //JSP
  336. inputDialogToggleJSP() {
  337. this.$refs.inputDialogJSP.open()
  338. },
  339. async dialogInputConfirmJSP(val) {
  340. this.formData.JS_P = val;
  341. this.updateJSP()
  342. console.log(this.formData.JS_P);
  343. },
  344. async updateJSP(e) {
  345. let vm = this;
  346. let url = uni.$api.deviceParam.updateParam;
  347. let data = {
  348. id: "304",
  349. sn: "CK1",
  350. name: "JS_P",
  351. value: this.formData.JS_P
  352. };
  353. let res = await uni.$http.get(url, data);
  354. console.log(res);
  355. },
  356. //JSI
  357. inputDialogToggleJSI() {
  358. this.$refs.inputDialogJSI.open()
  359. },
  360. async dialogInputConfirmJSI(val) {
  361. this.formData.JS_I = val;
  362. this.updateJSI()
  363. console.log(this.formData.JS_I);
  364. },
  365. async updateJSI(e) {
  366. let vm = this;
  367. let url = uni.$api.deviceParam.updateParam;
  368. let data = {
  369. id: "299",
  370. sn: "CK1",
  371. name: "JS_I",
  372. value: this.formData.JS_I
  373. };
  374. let res = await uni.$http.get(url, data);
  375. console.log(res);
  376. },
  377. //CSP
  378. inputDialogToggleCSP() {
  379. this.$refs.inputDialogCSP.open()
  380. },
  381. async dialogInputConfirmCSP(val) {
  382. this.formData.CS_P = val;
  383. this.updateCSP()
  384. console.log(this.formData.CS_P);
  385. },
  386. async updateCSP(e) {
  387. let vm = this;
  388. let url = uni.$api.deviceParam.updateParam;
  389. let data = {
  390. id: "240",
  391. sn: "CK1",
  392. name: "CS_P",
  393. value: this.formData.CS_P
  394. };
  395. let res = await uni.$http.get(url, data);
  396. console.log(res);
  397. },
  398. //CSI
  399. inputDialogToggleCSI() {
  400. this.$refs.inputDialogCSI.open()
  401. },
  402. async dialogInputConfirmCSI(val) {
  403. this.formData.CS_I = val;
  404. this.updateCSI()
  405. console.log(this.formData.CS_I);
  406. },
  407. async updateCSI(e) {
  408. let vm = this;
  409. let url = uni.$api.deviceParam.updateParam;
  410. let data = {
  411. id: "217",
  412. sn: "CK1",
  413. name: "CS_I",
  414. value: this.formData.CS_I
  415. };
  416. let res = await uni.$http.get(url, data);
  417. console.log(res);
  418. },
  419. async HFCC(e) {
  420. this.formData.HF_CC == 1 ? this.formData.HF_CC = 0 : this.formData.HF_CC = 1;
  421. let vm = this;
  422. let url = uni.$api.deviceParam.updateParam;
  423. let data = {
  424. id: "237",
  425. value: this.formData.HF_CC,
  426. name: "HF_CC",
  427. sn: "CK1"
  428. };
  429. let res = await uni.$http.get(url, data);
  430. console.log(res.data.data.value);
  431. },
  432. back() {
  433. uni.navigateTo({
  434. url: '/pages/device/deviceInfo/deviceInfo'
  435. })
  436. },
  437. async getWDXZ(e) {
  438. let vm = this;
  439. let url = uni.$api.deviceParam.detail;
  440. let data = {
  441. id: "235",
  442. };
  443. let res = await uni.$http.get(url, data);
  444. this.formData.WD1_XZ = res.data.data.deviceParam.value;
  445. },
  446. async getSDXZ(e) {
  447. let vm = this;
  448. let url = uni.$api.deviceParam.detail;
  449. let data = {
  450. id: "287",
  451. };
  452. let res = await uni.$http.get(url, data);
  453. this.formData.SD1_XZ = res.data.data.deviceParam.value;
  454. },
  455. async getJR_P(e) {
  456. let vm = this;
  457. let url = uni.$api.deviceParam.detail;
  458. let data = {
  459. id: "226",
  460. };
  461. let res = await uni.$http.get(url, data);
  462. this.formData.JR_P = res.data.data.deviceParam.value;
  463. },
  464. async getJR_I(e) {
  465. let vm = this;
  466. let url = uni.$api.deviceParam.detail;
  467. let data = {
  468. id: "220",
  469. };
  470. let res = await uni.$http.get(url, data);
  471. this.formData.JR_I = res.data.data.deviceParam.value;
  472. },
  473. async getJW_P(e) {
  474. let vm = this;
  475. let url = uni.$api.deviceParam.detail;
  476. let data = {
  477. id: "275",
  478. };
  479. let res = await uni.$http.get(url, data);
  480. this.formData.ZL_P = res.data.data.deviceParam.value;
  481. },
  482. async getJW_I(e) {
  483. let vm = this;
  484. let url = uni.$api.deviceParam.detail;
  485. let data = {
  486. id: "236",
  487. };
  488. let res = await uni.$http.get(url, data);
  489. this.formData.ZL_I = res.data.data.deviceParam.value;
  490. },
  491. async getJS_P(e) {
  492. let vm = this;
  493. let url = uni.$api.deviceParam.detail;
  494. let data = {
  495. id: "304",
  496. };
  497. let res = await uni.$http.get(url, data);
  498. this.formData.JS_P = res.data.data.deviceParam.value;
  499. },
  500. async getJS_I(e) {
  501. let vm = this;
  502. let url = uni.$api.deviceParam.detail;
  503. let data = {
  504. id: "299",
  505. };
  506. let res = await uni.$http.get(url, data);
  507. this.formData.JS_I = res.data.data.deviceParam.value;
  508. },
  509. async getCS_P(e) {
  510. let vm = this;
  511. let url = uni.$api.deviceParam.detail;
  512. let data = {
  513. id: "240",
  514. };
  515. let res = await uni.$http.get(url, data);
  516. this.formData.CS_P = res.data.data.deviceParam.value;
  517. },
  518. async getCS_I(e) {
  519. let vm = this;
  520. let url = uni.$api.deviceParam.detail;
  521. let data = {
  522. id: "217",
  523. };
  524. let res = await uni.$http.get(url, data);
  525. this.formData.CS_I = res.data.data.deviceParam.value;
  526. }
  527. }
  528. }
  529. </script>
  530. <style>
  531. .button {
  532. background: #007AFF;
  533. color: white;
  534. width: 654rpx;
  535. margin-left: 24rpx;
  536. margin-top: 44rpx;
  537. }
  538. .text {
  539. margin-top: 40rpx;
  540. margin-bottom: 16rpx;
  541. color: #444546;
  542. font-size: 26rpx;
  543. }
  544. .input {
  545. width: 320rpx;
  546. height: 98rpx;
  547. background-color: #eaeaea;
  548. display: flex;
  549. flex-direction: row;
  550. align-items: center;
  551. border-radius: 6rpx;
  552. border: 1px solid #eaeaea;
  553. }
  554. .danwei {
  555. width: 78rpx;
  556. height: 98rpx;
  557. background-color: white;
  558. display: flex;
  559. align-items: center;
  560. }
  561. .setmenu {
  562. display: flex;
  563. flex-wrap: wrap;
  564. }
  565. .active_button {
  566. background-color: crimson;
  567. }
  568. .setItem {
  569. margin-left: 20rpx;
  570. }
  571. .white {
  572. width: 702rpx;
  573. height: 1230rpx;
  574. margin-left: 24rpx;
  575. margin-top: 24rpx;
  576. border-radius: 10rpx;
  577. background-color: white;
  578. }
  579. .title {
  580. display: flex;
  581. flex-direction: column;
  582. align-items: center;
  583. }
  584. .tiao {
  585. width: 60px;
  586. height: 3px;
  587. margin-top: 20rpx;
  588. background: #007AFF;
  589. }
  590. .param {
  591. font-size: 38rpx;
  592. font-weight: 550;
  593. margin-top: 40rpx;
  594. }
  595. .anniu {
  596. width: 116rpx;
  597. height: 116rpx;
  598. float: right;
  599. margin-top: 20rpx;
  600. }
  601. </style>