room.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002
  1. <template>
  2. <div>
  3. <el-row class="ba commonWidth" v-if="state"><!--房间信息弹框-->
  4. <el-col class="top">
  5. <el-col class="title">
  6. <img src="../../../assets/image/arrow.png" alt="" />
  7. <span>房间信息 &nbsp;&nbsp;&nbsp;&nbsp;{{Message.num || "--"}}</span>
  8. <!-- <img src="../../../assets/image/icon1.png" alt="" class="equipment-icon"/> -->
  9. </el-col>
  10. <p class="close" @click="close"></p>
  11. </el-col>
  12. <el-col class="contain scroll">
  13. <col-row :gutter="10">
  14. <!-- <el-col class="title" :span="12">
  15. <span class="type">房间号:</span>
  16. <span class="data">{{Message.num || "--"}}</span>
  17. </el-col> -->
  18. <el-col class="title" :span="12">
  19. <span class="type">房态:</span>
  20. <span class="data" v-if="Message.status">
  21. {{Message.status == "VC" ? "空房": Message.status == "VD" ? "空脏房" :
  22. Message.status == "OC" ? "在住干净房" : Message.status == "OD" ? "在住脏房" :
  23. Message.status == "OS" ? "锁房" : Message.status == "OO" ? "维修房" : ""}}</span>
  24. <span class="data" v-else>--</span>
  25. </el-col>
  26. <!-- <el-col class="title" :span="12">
  27. <span class="type">总开:</span>
  28. <el-switch v-if="Message.zk"
  29. @change="control(zk,Message.zk.value,Message.zk.id)"
  30. v-model="zk"
  31. active-color="#1C52D8"
  32. inactive-color="#ccc">
  33. </el-switch>
  34. <span class="data" v-else>--</span>
  35. </el-col>
  36. <el-col class="title" :span="12">
  37. <span class="type">总关:</span>
  38. <el-switch v-if="Message.zg"
  39. @change="control(zg,Message.zg.value,Message.zg.id)"
  40. v-model="zg"
  41. active-color="#1C52D8"
  42. inactive-color="#ccc">
  43. </el-switch>
  44. <span class="data" v-else>--</span>
  45. </el-col> -->
  46. <el-col class="title" :span="12">
  47. <span class="type">房顶灯:</span>
  48. <el-switch v-if="Message.fdd"
  49. @change="control(fdd,Message.fdd.value,Message.fdd.id)"
  50. v-model="fdd"
  51. active-color="#1C52D8"
  52. inactive-color="#ccc">
  53. </el-switch>
  54. <span class="data" v-else>--</span>
  55. </el-col>
  56. <el-col class="title" :span="12">
  57. <span class="type">影视筒灯:</span>
  58. <el-switch v-if="Message.ystd"
  59. @change="control(ystd,Message.ystd.value,Message.ystd.id)"
  60. v-model="ystd"
  61. active-color="#1C52D8"
  62. inactive-color="#ccc">
  63. </el-switch>
  64. <span class="data" v-else>--</span>
  65. </el-col>
  66. <el-col class="title" :span="12">
  67. <span class="type">夜灯:</span>
  68. <el-switch v-if="Message.yd"
  69. @change="control(yd,Message.yd.value,Message.yd.id)"
  70. v-model="yd"
  71. active-color="#1C52D8"
  72. inactive-color="#ccc">
  73. </el-switch>
  74. <span class="data" v-else>--</span>
  75. </el-col>
  76. <!-- <el-col class="title" :span="12">
  77. <span class="type">阳台灯:</span>
  78. <el-switch v-if="Message.ytd"
  79. @change="control(ytd,Message.ytd.value,Message.ytd.id)"
  80. v-model="ytd"
  81. active-color="#1C52D8"
  82. inactive-color="#ccc">
  83. </el-switch>
  84. <span class="data" v-else>--</span>
  85. </el-col> -->
  86. <!-- 阳台灯控制器是雾化玻璃的,有现场情况规定的,属特例 -->
  87. <el-col class="title" :span="12">
  88. <span class="type">阳台灯:</span>
  89. <el-switch v-if="Message.whbl"
  90. @change="control(whbl,Message.whbl.value,Message.whbl.id)"
  91. v-model="whbl"
  92. active-color="#1C52D8"
  93. inactive-color="#ccc">
  94. </el-switch>
  95. <span class="data" v-else>--</span>
  96. </el-col>
  97. <el-col class="title" :span="12">
  98. <span class="type">吧灯:</span>
  99. <el-switch v-if="Message.bd"
  100. @change="control(bd,Message.bd.value,Message.bd.id)"
  101. v-model="bd"
  102. active-color="#1C52D8"
  103. inactive-color="#ccc">
  104. </el-switch>
  105. <span class="data" v-else>--</span>
  106. </el-col>
  107. <el-col class="title" :span="12">
  108. <span class="type">床头射灯:</span>
  109. <el-switch v-if="Message.ctsd"
  110. @change="control(ctsd,Message.ctsd.value,Message.ctsd.id)"
  111. v-model="ctsd"
  112. active-color="#1C52D8"
  113. inactive-color="#ccc">
  114. </el-switch>
  115. <span class="data" v-else>--</span>
  116. </el-col>
  117. <el-col class="title" :span="12">
  118. <span class="type">廊灯:</span>
  119. <el-switch v-if="Message.ld"
  120. @change="control(ld,Message.ld.value,Message.ld.id)"
  121. v-model="ld"
  122. active-color="#1C52D8"
  123. inactive-color="#ccc">
  124. </el-switch>
  125. <span class="data" v-else>--</span>
  126. </el-col>
  127. <el-col class="title" :span="12">
  128. <span class="type">浴室灯:</span>
  129. <el-switch v-if="Message.ysd"
  130. @change="control(ysd,Message.ysd.value,Message.ysd.id)"
  131. v-model="ysd"
  132. active-color="#1C52D8"
  133. inactive-color="#ccc">
  134. </el-switch>
  135. <span class="data" v-else>--</span>
  136. </el-col>
  137. <el-col class="title" :span="12">
  138. <span class="type">卫生间灯带:</span>
  139. <el-switch v-if="Message.wsjdd"
  140. @change="control(wsjdd,Message.wsjdd.value,Message.wsjdd.id)"
  141. v-model="wsjdd"
  142. active-color="#1C52D8"
  143. inactive-color="#ccc">
  144. </el-switch>
  145. <span class="data" v-else>--</span>
  146. </el-col>
  147. <el-col class="title" :span="12">
  148. <span class="type">洗手盆射灯:</span>
  149. <el-switch v-if="Message.xspsd"
  150. @change="control(xspsd,Message.xspsd.value,Message.xspsd.id)"
  151. v-model="xspsd"
  152. active-color="#1C52D8"
  153. inactive-color="#ccc">
  154. </el-switch>
  155. <span class="data" v-else>--</span>
  156. </el-col>
  157. <el-col class="title" :span="12">
  158. <span class="type">排气扇:</span>
  159. <el-switch v-if="Message.pqs"
  160. @change="control(pqs,Message.pqs.value,Message.pqs.id)"
  161. v-model="pqs"
  162. active-color="#1C52D8"
  163. inactive-color="#ccc">
  164. </el-switch>
  165. <span class="data" v-else>--</span>
  166. </el-col>
  167. <el-col class="title" :span="12">
  168. <span class="type">卫生间筒灯:</span>
  169. <el-switch v-if="Message.wsjtd"
  170. @change="control(wsjtd,Message.wsjtd.value,Message.wsjtd.id)"
  171. v-model="wsjtd"
  172. active-color="#1C52D8"
  173. inactive-color="#ccc">
  174. </el-switch>
  175. <span class="data" v-else>--</span>
  176. </el-col>
  177. <el-col class="title" :span="12">
  178. <span class="type">窗帘:</span>
  179. <el-switch v-if="Message.cl"
  180. @change="control(cl,Message.cl.value,Message.cl.id)"
  181. v-model="cl"
  182. active-color="#1C52D8"
  183. inactive-color="#ccc">
  184. </el-switch>
  185. <span class="data" v-else>--</span>
  186. </el-col>
  187. <el-col class="title" :span="12">
  188. <span class="type">窗纱:</span>
  189. <el-switch v-if="Message.cs"
  190. @change="control(cs,Message.cs.value,Message.cs.id)"
  191. v-model="cs"
  192. active-color="#1C52D8"
  193. inactive-color="#ccc">
  194. </el-switch>
  195. <span class="data" v-else>--</span>
  196. </el-col>
  197. <el-col class="title" :span="12">
  198. <span class="type">空调开关:</span>
  199. <el-switch v-if="Message.ktkg"
  200. @change="control(ktkg,Message.ktkg.value,Message.ktkg.id)"
  201. v-model="ktkg"
  202. active-color="#1C52D8"
  203. inactive-color="#ccc">
  204. </el-switch>
  205. <span class="data" v-else>--</span>
  206. </el-col>
  207. <el-col class="title" :span="12">
  208. <span class="type">室内温度:</span>
  209. <span class="data">{{Message.ktdqwd.value ? Number(Message.ktdqwd.value).toFixed(1) + "℃" : Message.ktdqwd.value == "0" ? Number(Message.ktdqwd.value).toFixed(1) + "℃" : "--"}}</span>
  210. </el-col>
  211. <el-col class="title" :span="12">
  212. <span class="type">空调模式:</span>
  213. <div class="data" v-if="Message.ktms">
  214. <el-select
  215. v-model="ktms"
  216. placeholder="模式选择"
  217. size="small"
  218. style="width: 90px"
  219. @change="control(undefined,ktms,Message.ktms.id)"
  220. >
  221. <el-option
  222. v-for="dict in ktmsOptions"
  223. :key="dict.dictValue"
  224. :label="dict.dictLabel"
  225. :value="dict.dictValue"
  226. />
  227. </el-select>
  228. </div>
  229. <span class="data" v-else> -- </span>
  230. </el-col>
  231. <el-col class="title" :span="12">
  232. <span class="type">空调风力:</span>
  233. <div class="data" v-if="Message.ktfl">
  234. <el-select
  235. v-model="ktfl"
  236. placeholder="模式选择"
  237. size="small"
  238. style="width: 90px"
  239. @change="control(undefined,ktfl,Message.ktfl.id)"
  240. >
  241. <el-option
  242. v-for="dict in ktflOptions"
  243. :key="dict.dictValue"
  244. :label="dict.dictLabel"
  245. :value="dict.dictValue"
  246. />
  247. </el-select>
  248. </div>
  249. <span class="data" v-else> -- </span>
  250. </el-col>
  251. <el-col class="title" :span="12">
  252. <span class="type">空调温度:</span>
  253. <span class="data" v-if="Message.ktwd">
  254. <input v-model="Message.ktwd.value" type="number" min="10" max="40" style="ime-mode:disabled" onkeypress="noPermitInput(event)">
  255. {{"℃"}}
  256. <button @click="control(undefined,Message.ktwd.value,Message.ktwd.id)">提交</button>
  257. </span>
  258. <span class="data" v-else>--</span>
  259. </el-col>
  260. <el-col class="title" :span="12">
  261. <span class="type">新风启停:</span>
  262. <el-switch v-if="Message.xfqt"
  263. @change="control(xfqt,Message.xfqt.value,Message.xfqt.id)"
  264. v-model="xfqt"
  265. active-color="#1C52D8"
  266. inactive-color="#ccc">
  267. </el-switch>
  268. <span class="data" v-else>--</span>
  269. </el-col>
  270. <el-col class="title" :span="12" >
  271. <span class="type">新风挡位:</span>
  272. <div class="data" v-if="Message.xfdw">
  273. <el-select
  274. v-model="xfdw"
  275. placeholder="选择"
  276. size="small"
  277. style="width: 90px"
  278. @change="control(undefined,xfdw,Message.xfdw.id)"
  279. >
  280. <el-option
  281. v-for="dict in xfdwOptions"
  282. :key="dict.dictValue"
  283. :label="dict.dictLabel"
  284. :value="dict.dictValue"
  285. />
  286. </el-select>
  287. </div>
  288. <span class="data" v-else> -- </span>
  289. </el-col>
  290. <!-- <el-col class="title" :span="12">
  291. <span class="type">新风空调温度:</span>
  292. <span class="data" v-if="Message.xfwd">
  293. <input v-model="Message.xfwd.value" type="number" min="10" max="60" style="ime-mode:disabled" onkeypress="noPermitInput(event)">
  294. {{"℃"}}
  295. <button @click="control(undefined,Message.xfwd.value,Message.xfwd.id)">提交</button>
  296. </span>
  297. <span class="data" v-else>--</span>
  298. </el-col> -->
  299. </col-row>
  300. </el-col>
  301. </el-row>
  302. </div>
  303. </template>
  304. <script>
  305. import { btRoomGet } from "@/plugins/api";
  306. import { Message } from 'element-ui'
  307. export default {
  308. props:['resInfo'],
  309. data() {
  310. return {
  311. state:false,
  312. fjmsOptions:[
  313. {
  314. dictLabel:"自动",
  315. dictValue:"0"
  316. },
  317. {
  318. dictLabel:"手动",
  319. dictValue:"1"
  320. },
  321. ],
  322. ktmsOptions:[
  323. {
  324. dictLabel:"制冷",
  325. dictValue:0
  326. },
  327. {
  328. dictLabel:"制热",
  329. dictValue:1
  330. },
  331. {
  332. dictLabel:"通风",
  333. dictValue:2
  334. },
  335. ],
  336. xfqtOptions:[
  337. {
  338. dictLabel:"关机",
  339. dictValue:0
  340. },
  341. {
  342. dictLabel:"开机",
  343. dictValue:1
  344. },
  345. ],
  346. xfdwOptions:[
  347. {
  348. dictLabel:"抵挡",
  349. dictValue:1
  350. },
  351. {
  352. dictLabel:"中档",
  353. dictValue:2
  354. },
  355. {
  356. dictLabel:"高档",
  357. dictValue:3
  358. },
  359. ],
  360. ktflOptions:[
  361. {
  362. dictLabel:"低速",
  363. dictValue:1
  364. },
  365. {
  366. dictLabel:"中速",
  367. dictValue:2
  368. },
  369. {
  370. dictLabel:"高速",
  371. dictValue:3
  372. },
  373. {
  374. dictLabel:"自动",
  375. dictValue:4
  376. },
  377. ],
  378. Message:{},
  379. ktms:undefined,
  380. fdd:undefined,
  381. ld:undefined,
  382. ktkg:undefined,
  383. cl:undefined,
  384. cs:undefined,
  385. zk:undefined,
  386. zg:undefined,
  387. ysd:undefined,
  388. xspsd:undefined,
  389. pqs:undefined,
  390. wsjtd:undefined,
  391. ytd:undefined,
  392. bd:undefined,
  393. ctsd:undefined,
  394. wsjdd:undefined,
  395. ystd:undefined,
  396. yd:undefined,
  397. whbl:undefined,
  398. xfqt:undefined,
  399. xfdw:undefined,
  400. xfwd:undefined,
  401. }
  402. },
  403. mounted(){
  404. this.getData()
  405. },
  406. methods: {
  407. getData(){//获取数据赋值
  408. this.state = true
  409. let arr = []
  410. arr.num = this.resInfo.num
  411. arr.status = this.resInfo.roomStatus
  412. arr.hotelCode = this.resInfo.hotelCode
  413. arr.zk = {}
  414. arr.ld = {}
  415. arr.fdd = {}
  416. arr.ktkg = {}
  417. arr.ktms = {}
  418. arr.ktdqwd = {}
  419. arr.ktwd = {}
  420. arr.ktfl = {}
  421. arr.cl = {}
  422. arr.cs = {}
  423. arr.zk = {}
  424. arr.zg = {}
  425. arr.ysd = {}
  426. arr.xspsd ={}
  427. arr.pqs = {}
  428. arr.wsjtd = {}
  429. arr.ytd = {}
  430. arr.bd = {}
  431. arr.ctsd = {}
  432. arr.wsjdd = {}
  433. arr.ystd = {}
  434. arr.ktfl = {}
  435. arr.yd = {}
  436. arr.whbl = {}
  437. arr.xfqt = {}
  438. arr.xfdw = {}
  439. arr.xfwd = {}
  440. let data = this.resInfo.data
  441. console.log(data)
  442. for(let i = 0;i<data.length;i++){
  443. if(data[i].name == "总开"){
  444. arr.zk.name = data[i].name
  445. arr.zk.id = data[i].deviceId
  446. if(data[i].value == "0"){
  447. arr.zk.value = false
  448. this.zk = false
  449. }else{
  450. arr.zk.value = true
  451. this.zk = true
  452. }
  453. }
  454. if(data[i].name == "廊灯"){
  455. arr.ld.name = data[i].name
  456. arr.ld.id = data[i].deviceId
  457. if(data[i].value == "0"){
  458. arr.ld.value = false
  459. this.ld = false
  460. }else{
  461. arr.ld.value = true
  462. this.ld = true
  463. }
  464. }
  465. if(data[i].name == "房顶灯"){
  466. arr.fdd.name = data[i].name
  467. arr.fdd.id = data[i].deviceId
  468. if(data[i].value == "0"){
  469. arr.fdd.value = false
  470. this.fdd = false
  471. }else{
  472. arr.fdd.value = true
  473. this.fdd = true
  474. }
  475. }
  476. if(data[i].name == "空调-开关"){
  477. arr.ktkg.name = data[i].name
  478. arr.ktkg.id = data[i].deviceId
  479. if(data[i].value == "0"){
  480. arr.ktkg.value = false
  481. this.ktkg = false
  482. }else{
  483. arr.ktkg.value = true
  484. this.ktkg = true
  485. }
  486. }
  487. if(data[i].name == "空调-模式"){
  488. arr.ktms.name = data[i].name
  489. arr.ktms.id = data[i].deviceId
  490. arr.ktms.value = data[i].value
  491. this.ktms = Number(data[i].value)
  492. }
  493. if(data[i].name == "空调-风力"){
  494. arr.ktfl.name = data[i].name
  495. arr.ktfl.id = data[i].deviceId
  496. arr.ktfl.value = data[i].value
  497. this.ktfl = Number(data[i].value)
  498. }
  499. if(data[i].name == "空调-当前温度"){
  500. arr.ktdqwd.name = data[i].name
  501. arr.ktdqwd.id = data[i].deviceId
  502. arr.ktdqwd.value = data[i].value
  503. }
  504. if(data[i].name == "空调-温度"){
  505. arr.ktwd.name = data[i].name
  506. arr.ktwd.id = data[i].deviceId
  507. arr.ktwd.value = data[i].value
  508. }
  509. if(data[i].name == "窗帘"){
  510. arr.cl.name = data[i].name
  511. arr.cl.id = data[i].deviceId
  512. if(data[i].value == "0"){
  513. arr.cl.value = false
  514. this.cl = false
  515. }else{
  516. arr.cl.value = true
  517. this.cl = true
  518. }
  519. }
  520. if(data[i].name == "窗纱"){
  521. arr.cs.name = data[i].name
  522. arr.cs.id = data[i].deviceId
  523. if(data[i].value == "0"){
  524. arr.cs.value = false
  525. this.cs = false
  526. }else{
  527. arr.cs.value = true
  528. this.cs = true
  529. }
  530. }
  531. if(data[i].name == "浴室灯"){
  532. arr.ysd.name = data[i].name
  533. arr.ysd.id = data[i].deviceId
  534. if(data[i].value == "0"){
  535. arr.ysd.value = false
  536. this.ysd = false
  537. }else{
  538. arr.ysd.value = true
  539. this.ysd = true
  540. }
  541. }
  542. if(data[i].name == "洗手盆射灯"){
  543. arr.xspsd.name = data[i].name
  544. arr.xspsd.id = data[i].deviceId
  545. if(data[i].value == "0"){
  546. arr.xspsd.value = false
  547. this.xspsd = false
  548. }else{
  549. arr.xspsd.value = true
  550. this.xspsd = true
  551. }
  552. }
  553. if(data[i].name == "排气扇"){
  554. arr.pqs.name = data[i].name
  555. arr.pqs.id = data[i].deviceId
  556. if(data[i].value == "0"){
  557. arr.pqs.value = false
  558. this.pqs = false
  559. }else{
  560. arr.pqs.value = true
  561. this.pqs = true
  562. }
  563. }
  564. if(data[i].name == "卫生间筒灯"){
  565. arr.wsjtd.name = data[i].name
  566. arr.wsjtd.id = data[i].deviceId
  567. if(data[i].value == "0"){
  568. arr.wsjtd.value = false
  569. this.wsjtd = false
  570. }else{
  571. arr.wsjtd.value = true
  572. this.wsjtd = true
  573. }
  574. }
  575. if(data[i].name == "影视筒灯"){
  576. arr.ystd.name = data[i].name
  577. arr.ystd.id = data[i].deviceId
  578. if(data[i].value == "0"){
  579. arr.ystd.value = false
  580. this.ystd = false
  581. }else{
  582. arr.ystd.value = true
  583. this.ystd = true
  584. }
  585. }
  586. if(data[i].name == "阳台灯"){
  587. arr.ytd.name = data[i].name
  588. arr.ytd.id = data[i].deviceId
  589. if(data[i].value == "0"){
  590. arr.ytd.value = false
  591. this.ytd = false
  592. }else{
  593. arr.ytd.value = true
  594. this.ytd = true
  595. }
  596. }
  597. if(data[i].name == "吧灯"){
  598. arr.bd.name = data[i].name
  599. arr.bd.id = data[i].deviceId
  600. if(data[i].value == "0"){
  601. arr.bd.value = false
  602. this.bd = false
  603. }else{
  604. arr.bd.value = true
  605. this.bd = true
  606. }
  607. }
  608. if(data[i].name == "床头射灯"){
  609. arr.ctsd.name = data[i].name
  610. arr.ctsd.id = data[i].deviceId
  611. if(data[i].value == "0"){
  612. arr.ctsd.value = false
  613. this.ctsd = false
  614. }else{
  615. arr.ctsd.value = true
  616. this.ctsd = true
  617. }
  618. }
  619. if(data[i].name == "卫生间灯带"){
  620. arr.wsjdd.name = data[i].name
  621. arr.wsjdd.id = data[i].deviceId
  622. if(data[i].value == "0"){
  623. arr.wsjdd.value = false
  624. this.wsjdd = false
  625. }else{
  626. arr.wsjdd.value = true
  627. this.wsjdd = true
  628. }
  629. }
  630. if(data[i].name == "夜灯"){
  631. arr.yd.name = data[i].name
  632. arr.yd.id = data[i].deviceId
  633. if(data[i].value == "0"){
  634. arr.yd.value = false
  635. this.yd = false
  636. }else{
  637. arr.yd.value = true
  638. this.yd = true
  639. }
  640. }
  641. if(data[i].name == "雾化玻璃"){
  642. arr.whbl.name = data[i].name
  643. arr.whbl.id = data[i].deviceId
  644. if(data[i].value == "0"){
  645. arr.whbl.value = false
  646. this.whbl = false
  647. }else{
  648. arr.whbl.value = true
  649. this.whbl = true
  650. }
  651. }
  652. // 新风
  653. if(data[i].name == "新风系统-开关"){
  654. arr.xfqt.name = data[i].name
  655. arr.xfqt.id = data[i].deviceId
  656. if(data[i].value == "0"){
  657. arr.xfqt.value = false
  658. this.xfqt = false
  659. }else{
  660. arr.xfqt.value = true
  661. this.xfqt = true
  662. }
  663. }
  664. if(data[i].name == "新风系统-挡位"){
  665. arr.xfdw.name = data[i].name
  666. arr.xfdw.id = data[i].deviceId
  667. if(data[i].value == 0){
  668. arr.xfdw.value = undefined
  669. this.xfdw = undefined
  670. }else{
  671. arr.xfdw.value = data[i].value
  672. this.xfdw = data[i].value
  673. }
  674. }
  675. // if(data[i].name == "新风系统-室内温度"){
  676. // arr.xfwd.name = data[i].name
  677. // arr.xfwd.id = data[i].deviceId
  678. // arr.xfwd.value = data[i].value
  679. // this.xfwd = data[i].value
  680. // }
  681. }
  682. this.Message = arr
  683. // console.log(this.Message)
  684. },
  685. control(type,value,id){//控制
  686. if(type == false){
  687. value = 0
  688. }
  689. if(type == true){
  690. value = 1
  691. }
  692. if(type == undefined){
  693. }
  694. // console.log(type,value,id)
  695. let url = `http://www.limark.net:81/api/hotel/control/action.do?hotelCode=${this.Message.hotelCode}&roomNo=${this.Message.num}&device=${id}&value=${value}`
  696. // console.log(url)
  697. btRoomGet({url:url}).then(res =>{
  698. Message({
  699. message:"信息已提交,请在2分钟后查看信息变更情况",
  700. type: 'success'
  701. });
  702. })
  703. },
  704. noPermitInput(e){
  705. var evt = window.event || e ;
  706. if(isIE()){
  707. evt.returnValue=false; //ie 禁止键盘输入
  708. }else{
  709. evt.preventDefault(); //fire fox 禁止键盘输入
  710. }
  711. },
  712. isIE() {
  713. if (window.navigator.userAgent.toLowerCase().indexOf("msie") >= 1)
  714. return true;
  715. else
  716. return false;
  717. },
  718. close(){//关闭
  719. this.state = false
  720. this.$emit("close",false)
  721. },
  722. },
  723. };
  724. </script>
  725. <style lang="scss" scoped>
  726. .commonWidth{
  727. width:450px;
  728. display: block;
  729. margin:0 auto;
  730. .top{
  731. height: 39px;
  732. line-height: 35px;
  733. background: rgba(28,82,216,.6);
  734. border: 1px solid #1C52D8;
  735. border-bottom:none;
  736. border-radius: 4px 4px 0 0;
  737. .title{
  738. width:50%;
  739. margin-top:-2px;
  740. font-size: 16px;
  741. margin-left:16px;
  742. vertical-align: middle;
  743. color:#38E7EE;
  744. vertical-align: middle;
  745. img{
  746. margin-right:4px;
  747. vertical-align: middle;
  748. }
  749. span{
  750. margin-left:16px;
  751. vertical-align: middle;
  752. }
  753. .equipment-icon{
  754. width:16px;
  755. position: absolute;
  756. top:12px;
  757. right:45%;
  758. }
  759. }
  760. .close{
  761. width:16px;
  762. height:16px;
  763. background: url('../../../assets/image/close.png') ;
  764. float:right;
  765. margin:10px 6px 0 0;
  766. }
  767. }
  768. .contain{
  769. background-color:rgba(0,22,103,.85);
  770. border-radius: 0 0 4px 4px;
  771. }
  772. }
  773. .ba{
  774. .contain{
  775. padding: 10px 10px 55px;
  776. height:400px;
  777. overflow-y:scroll;
  778. .title{
  779. margin-top:10px;
  780. font-size: 14px;
  781. letter-spacing: 1px;
  782. .type{
  783. width:50%;
  784. text-align: right;
  785. display: inline-block;
  786. }
  787. .data{
  788. width:50%;
  789. text-align: left;
  790. display: inline-block;
  791. vertical-align: top;
  792. input{
  793. width:28%;
  794. border-radius: 5px;
  795. padding:0 0 0 6px;
  796. height:20px;
  797. line-height: 20px;
  798. }
  799. button{
  800. width:40px;
  801. height:25px;
  802. line-height: 25px;
  803. background-color: rgba(28,82,216,.6);
  804. color:#fff;
  805. font-size: 12px;
  806. border:none;
  807. text-align: center;
  808. border-radius: 4px;
  809. }
  810. }
  811. }
  812. }
  813. }
  814. /deep/ .el-input--small{
  815. width:93% !important;
  816. }
  817. /deep/ .el-input--small .el-input__inner{
  818. height:25px;
  819. line-height: 25px;
  820. }
  821. /deep/ .el-input__inner{
  822. color:#fff;
  823. border-color:#fff;
  824. }
  825. /deep/ .el-input__icon{
  826. color:#fff !important
  827. }
  828. /deep/ .el-input__suffix{
  829. top:2px
  830. }
  831. /deep/ .el-table__row>td {
  832. border: none;
  833. }
  834. /deep/ .el-input__icon{
  835. font-size:10px;-webkit-transform:scale(0.4);
  836. }
  837. /deep/ .el-table::before {
  838. height: 0px;
  839. }
  840. .scroll{
  841. overflow-y: scroll;
  842. overflow-x: hidden;
  843. }
  844. // ::-webkit-scrollbar {
  845. // /*滚动条整体样式*/
  846. // width : 0px; /*高宽分别对应横竖滚动条的尺寸*/
  847. // height: 1px;
  848. // overflow: hidden;
  849. // }
  850. // ::-webkit-scrollbar-thumb {
  851. // /*滚动条里面小方块*/
  852. // border-radius: 1px;
  853. // box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
  854. // background : rgba(28,82,216,1);
  855. // }
  856. // ::-webkit-scrollbar-track {
  857. // /*滚动条里面轨道*/
  858. // box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
  859. // border-radius: 1px;
  860. // background : #ededed;
  861. // }
  862. // 对话框
  863. /deep/ .el-dialog{
  864. background-color: transparent;
  865. top:15%;
  866. }
  867. /deep/ .el-dialog__header{
  868. padding:0;
  869. padding-bottom:0;
  870. }
  871. /deep/ .el-dialog__body{
  872. padding:0;
  873. }
  874. /deep/ .el-dialog__headerbtn .el-dialog__close{
  875. display: none;
  876. }
  877. // table
  878. /deep/ .el-table--group, /deep/ .el-table--border{
  879. border:none;
  880. }
  881. /deep/ .el-table thead{
  882. color:#fff;
  883. // background-color: rgba(28,82,216,.2);
  884. }
  885. /deep/ .el-table--border th{
  886. border:1px solid #fff;
  887. border-bottom:none;
  888. }
  889. /deep/ .el-table--border td{
  890. border:1px solid #fff
  891. }
  892. /deep/ .el-table, .el-table__expanded-cell {
  893. background-color: transparent;//这是设置透明背景色
  894. color:#fff;
  895. border-collapse: collapse;
  896. }
  897. /deep/ .el-table__empty-text{
  898. color:#fff;
  899. font-size: 10px;
  900. letter-spacing: 2px;
  901. }
  902. // data
  903. /deep/ .el-date-editor{
  904. border:1px solid #ccc;
  905. background-color: transparent;
  906. height:25px;
  907. line-height: 20px;
  908. padding:0;
  909. margin-top:2px;
  910. box-sizing: border-box;
  911. }
  912. /deep/ .el-range-input, /deep/ .el-input__icon el-range__close-icon{
  913. background-color: transparent;
  914. color:#fff;
  915. font-size: 12px;
  916. text-align: top;
  917. padding:0;
  918. position: relative;
  919. top:-4px
  920. }
  921. /deep/ .el-range__icon{
  922. display: none;
  923. }
  924. /deep/ .el-date-editor--datetimerange.el-input__inner{
  925. width:77%;
  926. display: inline-block;
  927. }
  928. /deep/ ::placeholder{
  929. color:#fff
  930. }
  931. /deep/ .el-range-separator{
  932. color:#fff;
  933. position: relative;
  934. top:-4px
  935. }
  936. /deep/table,/deep/ tr,/deep/ td{
  937. border-collapse: collapse !important;
  938. }
  939. /deep/ tr:hover, /deep/ td:hover, /deep/ table:hover{
  940. background-color: none !important;
  941. }
  942. /deep/ .el-table__empty-block{
  943. border:1px solid #fff;
  944. }
  945. /deep/ .el-table tbody tr:hover>td {
  946. background-color:transparent
  947. }
  948. ::-webkit-scrollbar {
  949. /*滚动条整体样式*/
  950. width : 0px; /*高宽分别对应横竖滚动条的尺寸*/
  951. height: 0px;
  952. }
  953. ::-webkit-scrollbar-thumb {
  954. /*滚动条里面小方块*/
  955. border-radius: 0px;
  956. box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
  957. background : #535353;
  958. }
  959. ::-webkit-scrollbar-track {
  960. /*滚动条里面轨道*/
  961. box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
  962. border-radius: 0px;
  963. background : #ededed;
  964. }
  965. ::-webkit-scrollbar {
  966. display: none
  967. }
  968. /deep/.el-table--scrollable-y ::-webkit-scrollbar {
  969. display: none;
  970. }
  971. </style>