parameterSetting.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256
  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. <view class="setmenu">
  9. <view class="setItem">
  10. <view class="text">
  11. <text>排风温度设定</text>
  12. </view>
  13. <view class="input" @click="inputDialogToggle()">
  14. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.WD_SD" />
  15. <view class="danwei">
  16. <text style="margin-left: 10rpx;">℃</text>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="setItem">
  21. <view class="text">
  22. <text>排风湿度设定</text>
  23. </view>
  24. <view class="input" @click="inputDialogToggle2()">
  25. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.SD_SD" />
  26. <view class="danwei"> <text style="margin-left: 14rpx;">%</text></view>
  27. </view>
  28. </view>
  29. <view class="setItem">
  30. <view class="text">
  31. <text>停机延时设定</text>
  32. </view>
  33. <view class="input" @click="inputDialogToggle3()">
  34. <input style="margin-left: 20rpx;" placeholder="请输入" v-model="formData.JZ_YSTZ" />
  35. <view class="danwei"> <text style="margin-left: 20rpx;">S</text></view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="buttonItem">
  40. <view class="item">
  41. <view class="text">
  42. <text>控制选择模式</text>
  43. </view>
  44. <button class="button" :class="{'Green_button': formData.JZ_XZ == 1}"
  45. @tap="JZXZ">{{formData.JZ_XZ == 0?"CK1":"CK2"}}</button>
  46. </view>
  47. <view class="item">
  48. <view class="text">
  49. <text>控制模式复位</text>
  50. </view>
  51. <button class="button" :class="{'Green_button': formData.MS_XZ == 1}" @tap="MSXZ()">
  52. {{ formData.MS_XZ == 0 ? "主用" : "备用" }}</button>
  53. </view>
  54. <view class="item">
  55. <view class="text">
  56. <text>故障复位</text>
  57. </view>
  58. <button class="button" :class="{'Red_button': formData.GZ_FW == 0}"
  59. @tap="GZFW()">{{formData.GZ_FW == 0?"关闭":"打开"}}</button>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 输入框1 -->
  64. <view>
  65. <uni-popup ref="inputDialog" type="dialog">
  66. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0.0 - 50.0)" :value="formData.WD_SD"
  67. placeholder="输入范围: 0 - 50.0的值" @confirm="dialogInputConfirm"></uni-popup-dialog>
  68. </uni-popup>
  69. </view>
  70. <!-- 输入框2 -->
  71. <view>
  72. <uni-popup ref="inputDialog2" type="dialog">
  73. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0.0 - 100.0)" :value="formData.SD_SD"
  74. placeholder="输入范围: 0 - 100.0的值!" @confirm="dialogInputConfirm2"></uni-popup-dialog>
  75. </uni-popup>
  76. </view>
  77. <!-- 输入框3 -->
  78. <view>
  79. <uni-popup ref="inputDialog3" type="dialog">
  80. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0 - 9999)" :value="formData.JZ_YSTZ"
  81. placeholder="输入范围: 0 - 9999的值!" @confirm="dialogInputConfirm3"></uni-popup-dialog>
  82. </uni-popup>
  83. </view>
  84. <!-- 输入框FA1 -->
  85. <view>
  86. <uni-popup ref="inputDialogFA1" type="dialog">
  87. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0 - 100)" :value="formData.LSF_SDKD"
  88. placeholder="输入范围: 0 - 100的值!" @confirm="dialogInputConfirmFA1"></uni-popup-dialog>
  89. </uni-popup>
  90. </view>
  91. <!-- 输入框FA2 -->
  92. <view>
  93. <uni-popup ref="inputDialogFA2" type="dialog">
  94. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0 - 100)" :value="formData.RSF_SDKD"
  95. placeholder="输入范围: 0 - 100的值!" @confirm="dialogInputConfirmFA2"></uni-popup-dialog>
  96. </uni-popup>
  97. </view>
  98. <!-- 输入框FA3 -->
  99. <view>
  100. <uni-popup ref="inputDialogFA3" type="dialog">
  101. <uni-popup-dialog ref="inputClose" mode="input" title="(输入范围: 0 - 100)" :value="formData.JSF_SDKD"
  102. placeholder="输入范围: 0 - 100的值!" @confirm="dialogInputConfirmFA3"></uni-popup-dialog>
  103. </uni-popup>
  104. </view>
  105. <view class="xiabu">
  106. <view class="title">
  107. <text class="param">运行状态</text>
  108. <view class="tiao"></view>
  109. </view>
  110. <view class="head">
  111. <text>设备名称</text>
  112. <text style="margin-left: 30rpx">控制模式</text>
  113. <text>手动命令</text>
  114. <text>实时反馈</text>
  115. </view>
  116. <view class="whiteItem">
  117. <text class="text1">空调送风机</text>
  118. <button class="auto" :class="{'active_button': formData.SFJ_SZXZ == 1}"
  119. @tap="shouZiDongSFJ()">{{formData.SFJ_SZXZ == 0?'自动':'手动'}}</button>
  120. <button class="stop" :class="{'active_button': formData.SFJ_SDQD == 1}"
  121. @tap="shouZiDongSFJSD()">{{formData.SFJ_SDQD == 1?'启动':'停止'}}</button>
  122. <text class="four">{{formData.SFJ_QT == 0?"停止":"启动"}}</text>
  123. </view>
  124. <view class="grayItem">
  125. <text class="text1">空调排风机</text>
  126. <button class="auto" :class="{'active_button': formData.PFJ_SZXZ == 1}"
  127. @tap="shouZiDongPFJ">{{formData.PFJ_SZXZ == 0?'自动':'手动'}}</button>
  128. <button class="stop" :class="{'active_button': formData.PFJ_SDQD == 1}"
  129. @tap="shouZiDongPFJSD()">{{formData.PFJ_SDQD == 1?'启动':'停止'}}</button>
  130. <text class="four">{{formData.PFJ_QT == 0?"停止":"启动"}}</text>
  131. </view>
  132. <view class="whiteItem">
  133. <text class="text1">风 冷 主 机</text>
  134. <button class="auto" :class="{'active_button': formData.FLZJ_SZXZ == 1}"
  135. @tap="shouZiDongFLZJ">{{formData.FLZJ_SZXZ == 0?'自动':'手动'}}</button>
  136. <button class="stop" :class="{'active_button': formData.FLZJ_SDQD == 1}"
  137. @tap="shouZiDongFLZJSD()">{{formData.FLZJ_SDQD == 1?'启动':'停止'}}</button>
  138. <text class="four">{{formData.FLZJ_QT == 0?"停止":"启动"}}</text>
  139. </view>
  140. <view class="grayItem">
  141. <text class="text1">一级电加热</text>
  142. <button class="auto" :class="{'active_button': formData.YJDJR_SZXZ == 1}"
  143. @tap="shouZiDongYJDJR">{{formData.YJDJR_SZXZ == 0?'自动':'手动'}}</button>
  144. <button class="stop" :class="{'active_button': formData.YJDJR_SDQD == 1}"
  145. @tap="shouZiDongYJDJRSD()">{{formData.YJDJR_SDQD == 1?'启动':'停止'}}</button>
  146. <text class="four">{{formData.YJDJR_QT == 0?"停止":"启动"}}</text>
  147. </view>
  148. <view class="whiteItem">
  149. <text class="text1">二级电加热</text>
  150. <button class="auto" :class="{'active_button': formData.EJDJR_SZXZ == 1}"
  151. @tap="shouZiDongEJDJR">{{formData.EJDJR_SZXZ == 0?'自动':'手动'}}</button>
  152. <button class="stop" :class="{'active_button': formData.SJDJR_SDQD == 1}"
  153. @tap="shouZiDongEJDJRSD()">{{formData.SJDJR_SDQD == 1?'启动':'停止'}}</button>
  154. <text class="four">{{formData.EJDJR_QT == 0?"停止":"启动"}}</text>
  155. </view>
  156. <view class="grayItem">
  157. <text class="text1">三级电加热</text>
  158. <button class="auto" :class="{'active_button': formData.SJDJR_SZXZ == 1}"
  159. @tap="shouZiDongSJDJR">{{formData.SJDJR_SZXZ == 0?'自动':'手动'}}</button>
  160. <button class="stop" :class="{'active_button': formData.SJDJR_SDQD == 1}"
  161. @tap="shouZiDongSJDJRSD()">{{formData.SJDJR_SDQD == 1?'启动':'停止'}}</button>
  162. <text class="four">{{formData.SJDJR_QT == 0?"停止":"启动"}}</text>
  163. </view>
  164. <view class="whiteItem">
  165. <text class="text1">空调送风阀</text>
  166. <button class="auto" :class="{'active_button': formData.SFF_SZXZ == 1}"
  167. @tap="shouZiDongSFF">{{formData.SFF_SZXZ == 0?'自动':'手动'}}</button>
  168. <button class="stop" :class="{'active_button': formData.SFF_SDQD == 1}"
  169. @tap="shouZiDongSFFSD()">{{formData.SFF_SDQD == 1?'启动':'停止'}}</button>
  170. <text class="four">{{formData.SFF_KGKZ == 0?"关闭":"打开"}}</text>
  171. </view>
  172. <view class="grayItem">
  173. <text class="text1">空调排风阀</text>
  174. <button class="auto" :class="{'active_button': formData.PFF_SZXZ == 1}"
  175. @tap="shouZiDongPFF">{{formData.PFF_SZXZ == 0?'自动':'手动'}}</button>
  176. <button class="stop" :class="{'active_button': formData.PFF_SDQD == 1}"
  177. @tap="shouZiDongPFFSD()">{{formData.PFF_SDQD == 1?'启动':'停止'}}</button>
  178. <text class="four">{{formData.PFF_KGKZ == 0?"关闭":"打开"}}</text>
  179. </view>
  180. <view class="whiteItem">
  181. <text class="text1">空调冷水阀</text>
  182. <button class="auto" :class="{'active_button': formData.LSF_SZXZ == 1}"
  183. @tap="shouZiDong2">{{formData.LSF_SZXZ == 0?'自动':'手动'}}</button>
  184. <view style="display: flex;flex-direction: row;align-items: center;">
  185. <button class="three" @click="inputDialogToggleFA1()">{{formData.LSF_SDKD}}</button>%
  186. </view>
  187. <view class="four1">
  188. <text>{{formData.LSF}}%</text>
  189. </view>
  190. </view>
  191. <view class="grayItem">
  192. <text class="text1">空调热水阀</text>
  193. <button class="auto" :class="{'active_button': formData.RSF_SZXZ == 1}"
  194. @tap="shouZiDong3">{{formData.RSF_SZXZ == 0?'自动':'手动'}}</button>
  195. <view style="display: flex;flex-direction: row;align-items: center;">
  196. <button class="three" @click="inputDialogToggleFA2()">{{formData.RSF_SDKD}}</button>%
  197. </view>
  198. <view class="four1">
  199. <text>{{formData.RSF}}%</text>
  200. </view>
  201. </view>
  202. <view class="whiteItem">
  203. <text class="text1">空调加湿器</text>
  204. <button class="auto" :class="{'active_button': formData.JSF_SZXZ == 1}"
  205. @tap="shouZiDong">{{formData.JSF_SZXZ == 0?'自动':'手动'}}</button>
  206. <view style="display: flex;flex-direction: row;align-items: center;">
  207. <button class="three" @click="inputDialogToggleFA3()">{{formData.JSF_SDKD}}</button>%
  208. </view>
  209. <view class="four1">
  210. <text>{{formData.JSF}}%</text>
  211. </view>
  212. </view>
  213. </view>
  214. <view class="anniu">
  215. <image class="anniu" src="../../static/设备菜单/前往列表@2x.png" @tap="back"></image>
  216. </view>
  217. </view>
  218. </template>
  219. <script>
  220. export default {
  221. data() {
  222. return {
  223. // value: '',
  224. deviceParams: [],
  225. formData: {
  226. GZ_FW: '0',
  227. JZ_XZ: '0',
  228. MS_XZ: '0',
  229. RSF: '',
  230. LSF: '',
  231. JSF: '',
  232. WD_SD: '',
  233. SD_SD: '',
  234. JZ_YSTZ: '',
  235. RSF_SDKD: '', //热水温度手动_设定(0~100,单位为%)
  236. LSF_SDKD: '', //冷水温度手动_设定(0~100,单位为%)
  237. JSF_SDKD: '', //电加湿手动_设定(0~100,单位为%)
  238. LSF_SZXZ: '0',
  239. RSF_SZXZ: '0',
  240. JSF_SZXZ: '0',
  241. //下部按钮参数
  242. SFF_SZXZ: '0',
  243. SFF_SDQD: '0',
  244. PFF_SZXZ: '0',
  245. PFF_SDQD: '0',
  246. SFJ_SZXZ: '0',
  247. SFJ_SZXZ: '0',
  248. SFJ_SDQD: '0',
  249. PFJ_SZXZ: '0',
  250. PFJ_SDQD: '0',
  251. FLZJ_SZXZ: '0',
  252. FLZJ_SDQD: '0',
  253. YJDJR_SZXZ: '0',
  254. YJDJR_SDQD: '0',
  255. EJDJR_SZXZ: '0',
  256. EJDJR_SDQD: '0',
  257. SJDJR_SZXZ: '0',
  258. SJDJR_SDQD: '0',
  259. //第四列实时反馈
  260. SFJ_QT: '1', //送风机工频启动(0:停止,1:启动)
  261. PFJ_QT: '0', //排风机工频启动(0:停止,1:启动)
  262. YJDJR_QT: '0', //一级电加热启停(0:停止,1:启动)
  263. EJDJR_QT: '0', //二级电加热启停(0:停止,1:启动)
  264. SJDJR_QT: '0', //三级电加热启停(0:停止,1:启动)
  265. SFF_KGKZ: '0', //送风阀开关控制(0:关闭,1:打开)
  266. PFF_KGKZ: '0', //排风阀开关控制(0:关闭,1:打开)
  267. FLZJ_QT: '0', //风冷主机启停(0:停止,1:启动)
  268. //上部三个按钮
  269. }
  270. }
  271. },
  272. onLoad(e) {
  273. console.log(e);
  274. this.getYSTZ()
  275. this.getSD_SD()
  276. this.getWD_SD()
  277. this.getJSF_SDKD()
  278. this.getLSF_SDKD()
  279. this.getRSF_SDKD()
  280. this.getRSF()
  281. this.getLSF()
  282. this.getJSF()
  283. this.getYJQT()
  284. this.getEJQT()
  285. this.getSJQT()
  286. this.getFLZJQT()
  287. this.getSFFQT()
  288. this.getPFFQT()
  289. this.getSFJQT()
  290. this.getPFJQT()
  291. },
  292. methods: {
  293. //三个按钮选择
  294. async JZXZ(e) {
  295. this.formData.JZ_XZ == 1 ? this.formData.JZ_XZ = 0 : this.formData.JZ_XZ = 1;
  296. let vm = this;
  297. let url = uni.$api.deviceParam.updateParam;
  298. let data = {
  299. id: "247",
  300. value: this.formData.JZ_XZ,
  301. name: "JZ_XZ",
  302. sn: "CK1"
  303. };
  304. let res = await uni.$http.get(url, data);
  305. console.log(res.data.data.value);
  306. },
  307. async MSXZ(e) {
  308. this.formData.MS_XZ == 1 ? this.formData.MS_XZ = 0 : this.formData.MS_XZ = 1;
  309. let vm = this;
  310. let url = uni.$api.deviceParam.updateParam;
  311. let data = {
  312. id: "242",
  313. value: this.formData.MS_XZ,
  314. name: "MS_XZ",
  315. sn: "CK1"
  316. };
  317. let res = await uni.$http.get(url, data);
  318. console.log(res.data.data.value);
  319. },
  320. async GZFW(e) {
  321. this.formData.GZ_FW == 1 ? this.formData.GZ_FW = 0 : this.formData.GZ_FW = 1;
  322. let vm = this;
  323. let url = uni.$api.deviceParam.updateParam;
  324. let data = {
  325. id: "260",
  326. value: this.formData.GZ_FW,
  327. name: "GZ_FW",
  328. sn: "CK1"
  329. };
  330. let res = await uni.$http.get(url, data);
  331. console.log(res.data.data.value);
  332. },
  333. async shouZiDong(e) {
  334. this.formData.JSF_SZXZ == 1 ? this.formData.JSF_SZXZ = 0 : this.formData.JSF_SZXZ = 1;
  335. let vm = this;
  336. let url = uni.$api.deviceParam.updateParam;
  337. let data = {
  338. id: "209",
  339. value: this.formData.JSF_SZXZ,
  340. name: "JSF_SZXZ",
  341. sn: "CK1"
  342. };
  343. let res = await uni.$http.get(url, data);
  344. console.log(res.data.data.value);
  345. },
  346. async shouZiDong2(e) {
  347. this.formData.LSF_SZXZ == 1 ? this.formData.LSF_SZXZ = 0 : this.formData.LSF_SZXZ = 1;
  348. let vm = this;
  349. let url = uni.$api.deviceParam.updateParam;
  350. let data = {
  351. id: "210",
  352. value: this.formData.LSF_SZXZ,
  353. name: "LSF_SZXZ",
  354. sn: "CK1"
  355. };
  356. let res = await uni.$http.get(url, data);
  357. console.log(res.data.data.value);
  358. },
  359. async shouZiDong3(e) {
  360. this.formData.RSF_SZXZ == 1 ? this.formData.RSF_SZXZ = 0 : this.formData.RSF_SZXZ = 1;
  361. let vm = this;
  362. let url = uni.$api.deviceParam.updateParam;
  363. let data = {
  364. id: "208",
  365. value: this.formData.RSF_SZXZ,
  366. name: "RSF_SZXZ",
  367. sn: "CK1"
  368. };
  369. let res = await uni.$http.get(url, data);
  370. console.log(res.data.data.value);
  371. },
  372. //下部按钮的自动手动
  373. async shouZiDongSFJ(e) {
  374. this.formData.SFJ_SZXZ == 1 ? this.formData.SFJ_SZXZ = 0 : this.formData.SFJ_SZXZ = 1;
  375. let vm = this;
  376. let url = uni.$api.deviceParam.updateParam;
  377. let data = {
  378. id: "204",
  379. value: this.formData.SFJ_SZXZ,
  380. name: "SFJ_SZXZ",
  381. sn: "CK1"
  382. };
  383. let res = await uni.$http.get(url, data);
  384. console.log(res.data.data.value);
  385. },
  386. async shouZiDongPFJ(e) {
  387. this.formData.PFJ_SZXZ == 1 ? this.formData.PFJ_SZXZ = 0 : this.formData.PFJ_SZXZ = 1;
  388. let vm = this;
  389. let url = uni.$api.deviceParam.updateParam;
  390. let data = {
  391. id: "203",
  392. value: this.formData.PFJ_SZXZ,
  393. name: "PFJ_SZXZ",
  394. sn: "CK1"
  395. };
  396. let res = await uni.$http.get(url, data);
  397. console.log(res.data.data.value);
  398. },
  399. async shouZiDongSFF(e) {
  400. this.formData.SFF_SZXZ == 1 ? this.formData.SFF_SZXZ = 0 : this.formData.SFF_SZXZ = 1;
  401. let vm = this;
  402. let url = uni.$api.deviceParam.updateParam;
  403. let data = {
  404. id: "290",
  405. value: this.formData.SFF_SZXZ,
  406. name: "SFF_SZXZ",
  407. sn: "CK1"
  408. };
  409. let res = await uni.$http.get(url, data);
  410. console.log(res.data.data.value);
  411. },
  412. async shouZiDongPFF(e) {
  413. this.formData.PFF_SZXZ == 1 ? this.formData.PFF_SZXZ = 0 : this.formData.PFF_SZXZ = 1;
  414. let vm = this;
  415. let url = uni.$api.deviceParam.updateParam;
  416. let data = {
  417. id: "241",
  418. value: this.formData.PFF_SZXZ,
  419. name: "PFF_SZXZ",
  420. sn: "CK1"
  421. };
  422. let res = await uni.$http.get(url, data);
  423. console.log(res.data.data.value);
  424. },
  425. async shouZiDongYJDJR(e) {
  426. this.formData.YJDJR_SZXZ == 1 ? this.formData.YJDJR_SZXZ = 0 : this.formData.YJDJR_SZXZ = 1;
  427. let vm = this;
  428. let url = uni.$api.deviceParam.updateParam;
  429. let data = {
  430. id: "249",
  431. value: this.formData.YJDJR_SZXZ,
  432. name: "YJDJR_SZXZ",
  433. sn: "CK1"
  434. };
  435. let res = await uni.$http.get(url, data);
  436. console.log(res.data.data.value);
  437. },
  438. async shouZiDongEJDJR(e) {
  439. this.formData.EJDJR_SZXZ == 1 ? this.formData.EJDJR_SZXZ = 0 : this.formData.EJDJR_SZXZ = 1;
  440. let vm = this;
  441. let url = uni.$api.deviceParam.updateParam;
  442. let data = {
  443. id: "214",
  444. value: this.formData.EJDJR_SZXZ,
  445. name: "EJDJR_SZXZ",
  446. sn: "CK1"
  447. };
  448. let res = await uni.$http.get(url, data);
  449. console.log(res.data.data.value);
  450. },
  451. async shouZiDongSJDJR(e) {
  452. this.formData.SJDJR_SZXZ == 1 ? this.formData.SJDJR_SZXZ = 0 : this.formData.SJDJR_SZXZ = 1;
  453. let vm = this;
  454. let url = uni.$api.deviceParam.updateParam;
  455. let data = {
  456. id: "265",
  457. value: this.formData.SJDJR_SZXZ,
  458. name: "SJDJR_SZXZ",
  459. sn: "CK1"
  460. };
  461. let res = await uni.$http.get(url, data);
  462. console.log(res.data.data.value);
  463. },
  464. async shouZiDongFLZJ(e) {
  465. this.formData.FLZJ_SZXZ == 1 ? this.formData.FLZJ_SZXZ = 0 : this.formData.FLZJ_SZXZ = 1;
  466. let vm = this;
  467. let url = uni.$api.deviceParam.updateParam;
  468. let data = {
  469. id: "305",
  470. value: this.formData.FLZJ_SZXZ,
  471. name: "FLZJ_SZXZ",
  472. sn: "CK1"
  473. };
  474. let res = await uni.$http.get(url, data);
  475. console.log(res.data.data.value);
  476. },
  477. //-----------------------------------------------------------------------------------------------
  478. //第四列实时反馈的获取数据
  479. async getSFJQT(e) {
  480. let vm = this;
  481. let url = uni.$api.deviceParam.detail;
  482. let data = {
  483. id: "262",
  484. };
  485. let res = await uni.$http.get(url, data);
  486. this.formData.SFJ_QT = res.data.data.deviceParam.value;
  487. },
  488. async getPFJQT(e) {
  489. let vm = this;
  490. let url = uni.$api.deviceParam.detail;
  491. let data = {
  492. id: "277",
  493. };
  494. let res = await uni.$http.get(url, data);
  495. this.formData.PFJ_QT = res.data.data.deviceParam.value;
  496. },
  497. async getSFFQT(e) {
  498. let vm = this;
  499. let url = uni.$api.deviceParam.detail;
  500. let data = {
  501. id: "300",
  502. };
  503. let res = await uni.$http.get(url, data);
  504. this.formData.SFF_KGKZ = res.data.data.deviceParam.value;
  505. },
  506. async getPFFQT(e) {
  507. let vm = this;
  508. let url = uni.$api.deviceParam.detail;
  509. let data = {
  510. id: "281",
  511. };
  512. let res = await uni.$http.get(url, data);
  513. this.formData.PFF_KGKZ = res.data.data.deviceParam.value;
  514. },
  515. async getFLZJQT(e) {
  516. let vm = this;
  517. let url = uni.$api.deviceParam.detail;
  518. let data = {
  519. id: "224",
  520. };
  521. let res = await uni.$http.get(url, data);
  522. this.formData.FLZJ_QT = res.data.data.deviceParam.value;
  523. },
  524. async getYJQT(e) {
  525. let vm = this;
  526. let url = uni.$api.deviceParam.detail;
  527. let data = {
  528. id: "215",
  529. };
  530. let res = await uni.$http.get(url, data);
  531. this.formData.YJDJR_QT = res.data.data.deviceParam.value;
  532. },
  533. async getEJQT(e) {
  534. let vm = this;
  535. let url = uni.$api.deviceParam.detail;
  536. let data = {
  537. id: "211",
  538. };
  539. let res = await uni.$http.get(url, data);
  540. this.formData.EJDJR_QT = res.data.data.deviceParam.value;
  541. },
  542. async getSJQT(e) {
  543. let vm = this;
  544. let url = uni.$api.deviceParam.detail;
  545. let data = {
  546. id: "213",
  547. };
  548. let res = await uni.$http.get(url, data);
  549. this.formData.SJDJR_QT = res.data.data.deviceParam.value;
  550. },
  551. //三个阀的实时反馈
  552. async getRSF(e) {
  553. let vm = this;
  554. let url = uni.$api.deviceParam.detail;
  555. let data = {
  556. id: "216",
  557. };
  558. let res = await uni.$http.get(url, data);
  559. this.formData.RSF = res.data.data.deviceParam.value;
  560. console.log(this.formData.RSF);
  561. },
  562. async getLSF(e) {
  563. let vm = this;
  564. let url = uni.$api.deviceParam.detail;
  565. let data = {
  566. id: "268",
  567. };
  568. let res = await uni.$http.get(url, data);
  569. this.formData.LSF = res.data.data.deviceParam.value;
  570. console.log(this.formData.LSF);
  571. },
  572. async getJSF(e) {
  573. let vm = this;
  574. let url = uni.$api.deviceParam.detail;
  575. let data = {
  576. id: "212",
  577. };
  578. let res = await uni.$http.get(url, data);
  579. this.formData.JSF = res.data.data.deviceParam.value;
  580. console.log(this.formData.JSF);
  581. },
  582. //-----
  583. async dialogInputConfirm(val) {
  584. this.formData.WD_SD = val;
  585. console.log(val);
  586. this.updateWD_SD()
  587. },
  588. async dialogInputConfirm2(val) {
  589. this.formData.SD_SD = val;
  590. console.log(this.formData.SD_SD);
  591. this.updateSD_SD()()
  592. },
  593. async dialogInputConfirm3(val) {
  594. this.formData.JZ_YSTZ = val;
  595. console.log(val);
  596. this.updateYSTZ()()
  597. },
  598. async dialogInputConfirmFA1(val) {
  599. this.formData.LSF_SDKD = val;
  600. this.updateLSF_SDKD()
  601. console.log(this.formData.LSF_SDKD);
  602. },
  603. async dialogInputConfirmFA2(val) {
  604. this.formData.RSF_SDKD = val;
  605. this.updateRSF_SDKD()
  606. console.log(val);
  607. },
  608. async dialogInputConfirmFA3(val) {
  609. this.formData.JSF_SDKD = val;
  610. this.updateJSF_SDKD()
  611. console.log(val);
  612. },
  613. inputDialogToggle() {
  614. this.$refs.inputDialog.open()
  615. },
  616. inputDialogToggle2() {
  617. this.$refs.inputDialog2.open()
  618. },
  619. inputDialogToggle3() {
  620. this.$refs.inputDialog3.open()
  621. },
  622. inputDialogToggleFA1() {
  623. this.$refs.inputDialogFA1.open()
  624. },
  625. inputDialogToggleFA2() {
  626. this.$refs.inputDialogFA2.open()
  627. },
  628. inputDialogToggleFA3() {
  629. this.$refs.inputDialogFA3.open()
  630. },
  631. back() {
  632. uni.navigateTo({
  633. url: '/pages/device/deviceInfo/deviceInfo'
  634. })
  635. },
  636. //三个参数设定
  637. async getYSTZ(e) {
  638. let vm = this;
  639. let url = uni.$api.deviceParam.detail;
  640. let data = {
  641. id: "219",
  642. };
  643. let res = await uni.$http.get(url, data);
  644. this.formData.JZ_YSTZ = res.data.data.deviceParam.value;
  645. console.log(this.formData.JZ_YSTZ);
  646. },
  647. async getWD_SD(e) {
  648. let vm = this;
  649. let url = uni.$api.deviceParam.detail;
  650. let data = {
  651. id: "296",
  652. };
  653. let res = await uni.$http.get(url, data);
  654. this.formData.WD_SD = res.data.data.deviceParam.value;
  655. console.log(this.formData.WD_SD);
  656. },
  657. async getSD_SD(e) {
  658. let vm = this;
  659. let url = uni.$api.deviceParam.detail;
  660. let data = {
  661. id: "231",
  662. };
  663. let res = await uni.$http.get(url, data);
  664. this.formData.SD_SD = res.data.data.deviceParam.value;
  665. console.log(this.formData.SD_SD);
  666. },
  667. //三个参数设定更新
  668. async updateWD_SD(e) {
  669. let vm = this;
  670. let url = uni.$api.deviceParam.updateParam;
  671. let data = {
  672. id: "296",
  673. sn: "CK1",
  674. name: "WD_SD",
  675. value: this.formData.WD_SD
  676. };
  677. let res = await uni.$http.get(url, data);
  678. console.log(res);
  679. },
  680. async updateSD_SD(e) {
  681. let vm = this;
  682. let url = uni.$api.deviceParam.updateParam;
  683. let data = {
  684. id: "231",
  685. sn: "CK1",
  686. name: "SD_SD",
  687. value: this.formData.SD_SD
  688. };
  689. let res = await uni.$http.get(url, data);
  690. console.log(res);
  691. },
  692. async updateYSTZ(e) {
  693. let vm = this;
  694. let url = uni.$api.deviceParam.updateParam;
  695. let data = {
  696. id: "219",
  697. sn: "CK1",
  698. name: "JZ_YSTZ",
  699. value: this.formData.JZ_YSTZ
  700. };
  701. let res = await uni.$http.get(url, data);
  702. console.log(res);
  703. },
  704. //-----三个阀手动命令列
  705. async getLSF_SDKD(e) {
  706. let vm = this;
  707. let url = uni.$api.deviceParam.detail;
  708. let data = {
  709. id: "238",
  710. };
  711. let res = await uni.$http.get(url, data);
  712. this.formData.LSF_SDKD = res.data.data.deviceParam.value;
  713. console.log(this.formData.LSF_SDKD);
  714. },
  715. async getRSF_SDKD(e) {
  716. let vm = this;
  717. let url = uni.$api.deviceParam.detail;
  718. let data = {
  719. id: "289",
  720. };
  721. let res = await uni.$http.get(url, data);
  722. this.formData.RSF_SDKD = res.data.data.deviceParam.value;
  723. console.log(this.formData.RSF_SDKD);
  724. },
  725. async getJSF_SDKD(e) {
  726. let vm = this;
  727. let url = uni.$api.deviceParam.detail;
  728. let data = {
  729. id: "288",
  730. };
  731. let res = await uni.$http.get(url, data);
  732. this.formData.JSF_SDKD = res.data.data.deviceParam.value;
  733. console.log(this.formData.JSF_SDKD);
  734. },
  735. //-------三个阀手动命令列更新
  736. async updateLSF_SDKD(e) {
  737. let vm = this;
  738. let url = uni.$api.deviceParam.updateParam;
  739. let data = {
  740. id: "238",
  741. sn: "CK1",
  742. name: "LSF_SDKD",
  743. value: this.formData.LSF_SDKD
  744. };
  745. let res = await uni.$http.get(url, data);
  746. console.log(res);
  747. },
  748. async updateRSF_SDKD(e) {
  749. let vm = this;
  750. let url = uni.$api.deviceParam.updateParam;
  751. let data = {
  752. id: "289",
  753. sn: "CK1",
  754. name: "RSF_SDKD",
  755. value: this.formData.RSF_SDKD
  756. };
  757. let res = await uni.$http.get(url, data);
  758. console.log(res);
  759. },
  760. async updateJSF_SDKD(e) {
  761. let vm = this;
  762. let url = uni.$api.deviceParam.updateParam;
  763. let data = {
  764. id: "288",
  765. sn: "CK1",
  766. name: "JSF_SDKD",
  767. value: this.formData.JSF_SDKD
  768. };
  769. let res = await uni.$http.get(url, data);
  770. console.log(res);
  771. },
  772. //第三列手动启动停止
  773. async shouZiDongSFJSD(e) {
  774. this.formData.SFJ_SDQD == 1 ? this.formData.SFJ_SDQD = 0 : this.formData.SFJ_SDQD = 1;
  775. let vm = this;
  776. let url = uni.$api.deviceParam.updateParam;
  777. let data = {
  778. id: "261",
  779. value: this.formData.SFJ_SDQD,
  780. name: "SFJ_SDQD",
  781. sn: "CK1"
  782. };
  783. let res = await uni.$http.get(url, data);
  784. console.log(res.data.data.value);
  785. },
  786. async shouZiDongPFJSD(e) {
  787. this.formData.PFJ_SDQD == 1 ? this.formData.PFJ_SDQD = 0 : this.formData.PFJ_SDQD = 1;
  788. let vm = this;
  789. let url = uni.$api.deviceParam.updateParam;
  790. let data = {
  791. id: "263",
  792. value: this.formData.PFJ_SDQD,
  793. name: "PFJ_SDQD",
  794. sn: "CK1"
  795. };
  796. let res = await uni.$http.get(url, data);
  797. console.log(res.data.data.value);
  798. },
  799. async shouZiDongFLZJSD(e) {
  800. this.formData.FLZJ_SDQD == 1 ? this.formData.FLZJ_SDQD = 0 : this.formData.FLZJ_SDQD = 1;
  801. let vm = this;
  802. let url = uni.$api.deviceParam.updateParam;
  803. let data = {
  804. id: "244",
  805. value: this.formData.FLZJ_SDQD,
  806. name: "FLZJ_SDQD",
  807. sn: "CK1"
  808. };
  809. let res = await uni.$http.get(url, data);
  810. console.log(res.data.data.value);
  811. },
  812. async shouZiDongPFFSD(e) {
  813. this.formData.PFF_SDQD == 1 ? this.formData.PFF_SDQD = 0 : this.formData.PFF_SDQD = 1;
  814. let vm = this;
  815. let url = uni.$api.deviceParam.updateParam;
  816. let data = {
  817. id: "284",
  818. value: this.formData.PFF_SDQD,
  819. name: "PFF_SDQD",
  820. sn: "CK1"
  821. };
  822. let res = await uni.$http.get(url, data);
  823. console.log(res.data.data.value);
  824. },
  825. async shouZiDongSFFSD(e) {
  826. this.formData.SFF_SDQD == 1 ? this.formData.SFF_SDQD = 0 : this.formData.SFF_SDQD = 1;
  827. let vm = this;
  828. let url = uni.$api.deviceParam.updateParam;
  829. let data = {
  830. id: "239",
  831. value: this.formData.SFF_SDQD,
  832. name: "SFF_SDQD",
  833. sn: "CK1"
  834. };
  835. let res = await uni.$http.get(url, data);
  836. console.log(res.data.data.value);
  837. },
  838. async shouZiDongYJDJRSD(e) {
  839. this.formData.YJDJR_SDQD == 1 ? this.formData.YJDJR_SDQD = 0 : this.formData.YJDJR_SDQD = 1;
  840. let vm = this;
  841. let url = uni.$api.deviceParam.updateParam;
  842. let data = {
  843. id: "301",
  844. value: this.formData.YJDJR_SDQD,
  845. name: "YJDJR_SDQD",
  846. sn: "CK1"
  847. };
  848. let res = await uni.$http.get(url, data);
  849. console.log(res.data.data.value);
  850. },
  851. async shouZiDongEJDJRSD(e) {
  852. this.formData.EJDJR_SDQD == 1 ? this.formData.EJDJR_SDQD = 0 : this.formData.EJDJR_SDQD = 1;
  853. let vm = this;
  854. let url = uni.$api.deviceParam.updateParam;
  855. let data = {
  856. id: "272",
  857. value: this.formData.EJDJR_SDQD,
  858. name: "EJDJR_SDQD",
  859. sn: "CK1"
  860. };
  861. let res = await uni.$http.get(url, data);
  862. console.log(res.data.data.value);
  863. },
  864. async shouZiDongSJDJRSD(e) {
  865. this.formData.SJDJR_SDQD == 1 ? this.formData.SJDJR_SDQD = 0 : this.formData.SJDJR_SDQD = 1;
  866. let vm = this;
  867. let url = uni.$api.deviceParam.updateParam;
  868. let data = {
  869. id: "202",
  870. value: this.formData.SJDJR_SDQD,
  871. name: "SJDJR_SDQD",
  872. sn: "CK1"
  873. };
  874. let res = await uni.$http.get(url, data);
  875. console.log(res.data.data.value);
  876. },
  877. }
  878. }
  879. </script>
  880. <style>
  881. .button {
  882. width: 208rpx;
  883. height: 98rpx;
  884. margin-top: 20rpx;
  885. background-color: #007AFF;
  886. color: white;
  887. font-size: unset;
  888. display: flex;
  889. align-items: center;
  890. justify-content: center;
  891. }
  892. .Green_button {
  893. background-color: green;
  894. }
  895. .Red_button {
  896. background-color: crimson;
  897. }
  898. .anniu {
  899. width: 116rpx;
  900. height: 116rpx;
  901. float: right;
  902. margin-right: 10rpx;
  903. }
  904. .four1 {
  905. margin-right: 30rpx;
  906. margin-left: 30rpx;
  907. }
  908. .four {
  909. margin-right: 60rpx;
  910. }
  911. .whiteItem {
  912. height: 60px;
  913. background: white;
  914. border-radius: 4px;
  915. font-size: 30rpx;
  916. display: flex;
  917. justify-content: space-around;
  918. align-items: center;
  919. color: #444546;
  920. }
  921. .grayItem {
  922. height: 60px;
  923. background: #F6F7FB;
  924. border-radius: 4px;
  925. font-size: 30rpx;
  926. display: flex;
  927. align-items: center;
  928. color: #444546;
  929. }
  930. .text1 {
  931. margin-left: 20rpx;
  932. font-size: 30rpx;
  933. color: #444546;
  934. }
  935. .auto {
  936. width: 60px;
  937. height: 33px;
  938. background: #007AFF;
  939. border-radius: 4px;
  940. font-size: 30rpx;
  941. color: white;
  942. display: flex;
  943. align-items: center;
  944. justify-content: center;
  945. }
  946. .three {
  947. margin-right: 10rpx;
  948. margin-left: 0rpx;
  949. display: flex;
  950. align-items: center;
  951. justify-content: center;
  952. font-size: 30rpx;
  953. color: #007AFF;
  954. width: 60px;
  955. height: 33px;
  956. border-radius: 4px;
  957. border: 1px solid #007AFF;
  958. }
  959. .stop {
  960. margin-right: 75rpx;
  961. margin-left: 0rpx;
  962. display: flex;
  963. align-items: center;
  964. justify-content: center;
  965. font-size: 30rpx;
  966. color: #007AFF;
  967. width: 60px;
  968. height: 33px;
  969. border-radius: 4px;
  970. border: 1px solid #007AFF;
  971. }
  972. .head {
  973. height: 60px;
  974. background: #EAF1FE;
  975. border-radius: 4px;
  976. font-size: 30rpx;
  977. display: flex;
  978. justify-content: space-around;
  979. align-items: center;
  980. color: #444546;
  981. }
  982. .xiabu {
  983. margin-left: 24rpx;
  984. margin-top: 24rpx;
  985. background-color: white;
  986. width: 702rpx;
  987. height: 1520rpx;
  988. border-radius: 10rpx;
  989. }
  990. .buttonItem {
  991. display: flex;
  992. flex-direction: row;
  993. margin-top: 5rpx;
  994. justify-content: center;
  995. }
  996. .item {
  997. margin-left: 20rpx;
  998. }
  999. .setmenu {
  1000. display: flex;
  1001. flex-wrap: wrap;
  1002. }
  1003. .setItem {
  1004. margin-left: 20rpx;
  1005. }
  1006. .text {
  1007. margin-top: 40rpx;
  1008. margin-bottom: 16rpx;
  1009. color: #444546;
  1010. font-size: 26rpx;
  1011. }
  1012. .input {
  1013. width: 320rpx;
  1014. height: 98rpx;
  1015. background-color: #eaeaea;
  1016. display: flex;
  1017. flex-direction: row;
  1018. align-items: center;
  1019. border-radius: 5rpx;
  1020. border: 1px solid #eaeaea;
  1021. }
  1022. .danwei {
  1023. width: 78rpx;
  1024. height: 98rpx;
  1025. background-color: white;
  1026. display: flex;
  1027. align-items: center;
  1028. }
  1029. .white {
  1030. width: 702rpx;
  1031. height: 711rpx;
  1032. background-color: white;
  1033. margin-left: 24rpx;
  1034. margin-top: 26rpx;
  1035. }
  1036. .title {
  1037. display: flex;
  1038. flex-direction: column;
  1039. align-items: center;
  1040. }
  1041. .tiao {
  1042. width: 60px;
  1043. height: 3px;
  1044. margin-top: 20rpx;
  1045. background: #007AFF;
  1046. }
  1047. .param {
  1048. font-size: 38rpx;
  1049. font-weight: 550;
  1050. margin-top: 40rpx;
  1051. }
  1052. .active_button {
  1053. background-color: skyblue;
  1054. }
  1055. </style>