infoPage.vue 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324
  1. <template>
  2. <div class="subject-infoPage" v-if="subjectData.infoId">
  3. <!--左侧数据展示-->
  4. <div class="left-max-box scrollbar-box">
  5. <div class="all-title-box">
  6. <p></p>
  7. <p style="flex:1;">实验室安全信息牌</p>
  8. </div>
  9. <div class="left-top-title-box">
  10. <div class="left-box">
  11. <div class="lv-name-box">
  12. <p :style="'color:'+subjectData.levelColor+';border:1px solid '+subjectData.levelColor+';'">{{subjectData.levelName}}</p>
  13. <p>{{subjectData.subName}}</p>
  14. <p class="subArea-p" v-if="subjectData.subArea != 0">({{subjectData.subArea}}M²)</p>
  15. </div>
  16. <div class="type-address-box">
  17. <p class="type-p" v-for="(item,index) in subjectData.labClassTypeList">{{item.typeName}}</p>
  18. <p class="address-p">{{subjectData.buildName}}{{subjectData.floorName}}</p>
  19. </div>
  20. </div>
  21. <div class="right-code-img" @click="clickCode">
  22. <vue-qr style="display: block;height:60px;width:60px;cursor:pointer;margin:0 10px 0 0;"
  23. :text="identification+'?code='+subjectData.infoId+'&subId='+subjectData.subId+'&type=5'" :size="300">
  24. </vue-qr>
  25. </div>
  26. </div>
  27. <div class="user-max-box">
  28. <div class="left-box">
  29. <p>实验室责任人:<span>{{subjectData.adminName}}</span></p>
  30. <p>联系方式:<span>{{subjectData.adminPhone}}</span></p>
  31. </div>
  32. <div class="right-box">
  33. <div v-for="(item,index) in subjectData.safeUserList" :key="index">
  34. <p>安全员:<span>{{item.safeUserName}}</span></p>
  35. <p>联系方式:<span>{{item.safeUserPhone}}</span></p>
  36. </div>
  37. </div>
  38. </div>
  39. <p class="info-max-title-p">管控一体机信息</p>
  40. <div class="info-max-box">
  41. <div class="left-box">
  42. <div class="for-text-box">
  43. <p class="info-title">主要危险类别:{{!subjectData.hazardCategory?'未配置':''}}</p>
  44. <div class="for-box" v-for="(item,index1) in subjectData.hazardCategory" :key="index1">
  45. <p class="for-info-p" v-for="(minItem,index2) in hazardCategory" :key="index2" v-if="minItem.value == item">● {{minItem.label}}</p>
  46. </div>
  47. </div>
  48. <div class="for-text-box">
  49. <p class="info-title">灭火要点:{{!subjectData.outFire?'未配置':''}}</p>
  50. <div class="for-box" v-for="(item,index1) in subjectData.outFire" :key="index1">
  51. <p class="for-info-p" v-for="(minItem,index2) in extinguishingKeyPoints" :key="index2" v-if="minItem.value == item">● {{minItem.label}}</p>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="right-box">
  56. <div class="for-text-box">
  57. <p class="info-title">风险防控措施:{{!subjectData.riskMeasure?'未配置':''}}</p>
  58. <div class="for-box" v-for="(item,index1) in subjectData.riskMeasure" :key="index1">
  59. <p class="for-info-p" v-for="(minItem,index2) in riskMeasure" :key="index2" v-if="minItem.value == item">● {{minItem.label}}</p>
  60. </div>
  61. </div>
  62. <div class="for-img-box">
  63. <p class="info-title" style="margin-bottom:7px;">安全警示标识:{{!subjectData.safeSigns?'未配置':''}}</p>
  64. <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_jzxy.png" v-if="item == 'xiyan'" v-for="(item,index) in subjectData.safeSigns" :key="index">
  65. <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_jzys.png" v-if="item == 'yinshi'" v-for="(item,index) in subjectData.safeSigns" :key="index">
  66. <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_dxaq.png" v-if="item == 'anquan'" v-for="(item,index) in subjectData.safeSigns" :key="index">
  67. <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_gzf.png" v-if="item == 'gongzuofu'" v-for="(item,index) in subjectData.safeSigns" :key="index">
  68. <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_gbmc.png" v-if="item == 'menchuang'" v-for="(item,index) in subjectData.safeSigns" :key="index">
  69. <img src="@/assets/ZDimages/integratedManagement/icon_aqxxp_gbsd.png" v-if="item == 'shuidian'" v-for="(item,index) in subjectData.safeSigns" :key="index">
  70. </div>
  71. </div>
  72. </div>
  73. <p class="info-max-title-p">电子信息牌信息</p>
  74. <div class="info-max-box">
  75. <p class="null-text-p" v-if="!subjectData.classifyList[0]">电子信息牌未配置</p>
  76. <div class="for-text-box" v-if="item.privateList.length>0 && item.brandType==1" v-for="(item,index) in subjectData.classifyList">
  77. <p class="info-title">{{item.brandName}}:</p>
  78. <div class="for-box" v-if="!item.isSpecial" v-for="(item2,index2) in item.privateList" :key="index2">
  79. <p class="for-info-p">● {{item2.infoName}}</p>
  80. </div>
  81. <!--特殊类目-->
  82. <div class="for-box" v-if="item.isSpecial" v-for="(item2,index2) in item.privateList" :key="index2">
  83. <p class="for-info-p">{{item2.infoName}}</p>
  84. </div>
  85. </div>
  86. <div class="for-img-box" v-if="item.privateList.length>0 && item.brandType==2" v-for="(item,index) in subjectData.classifyList">
  87. <p class="info-title" style="margin-bottom:7px;">{{item.brandName}}:</p>
  88. <img :src="item2.infoContent" v-for="(item2,index2) in item.privateList" :key="index2">
  89. </div>
  90. </div>
  91. </div>
  92. <!--右侧数据展示-->
  93. <div class="right-max-box scrollbar-box">
  94. <!--传感器监测 上报时间 返回按钮-->
  95. <div class="all-title-box" style="height:40px;">
  96. <p></p>
  97. <p>传感器监测</p>
  98. <p v-if="lastOnlineTime">数据上报时间:{{parseTime(lastOnlineTime)}}</p>
  99. <p></p>
  100. <p class="page-out-common-style-button" style="line-height:40px;" @click="backPage">返回</p>
  101. </div>
  102. <p class="sensor-box" v-for="(item,index) in sensorList" :key="index">{{item.deviceName}}:<span>{{item.deviceValue}}{{item.unit}}</span></p>
  103. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data-1.png" v-if="!sensorList[0]">
  104. <!--物联控制-->
  105. <div class="all-title-box" style="height:40px;margin-top:20px;">
  106. <p></p>
  107. <p>物联控制</p>
  108. </div>
  109. <div class="things-box-one" v-for="(item,index) in hardwareList" :key="item.id" v-if="item.hardwareTypeKey == 'airConditioner'">
  110. <div class="things-box-one-for">
  111. <p class="name-p">{{item.hardwareName}}</p>
  112. <div class="text-box">
  113. <p :class="item.switchType==1?'colorOpen':'colorOff'">{{item.switchType == 1?'开启':(item.switchType == 0?'关闭':'')}}</p>
  114. <p :class="item.switchType==1?'':'colorText'" v-for="(minItem,minIndex) in infraredControllerData.functionList"
  115. :key="minItem.value" v-if="minItem.value == item.functionType">{{minItem.label}}</p>
  116. <p :class="item.switchType==1?'':'colorText'" v-for="(minItem,minIndex) in infraredControllerData.refrigerationList"
  117. :key="minItem.value" v-if="item.functionType == 1&&minItem.value == item.orderType">{{minItem.label}}</p>
  118. <p :class="item.switchType==1?'':'colorText'" v-for="(minItem,minIndex) in infraredControllerData.heatingList"
  119. :key="minItem.value" v-if="item.functionType == 2&&minItem.value == item.orderType">{{minItem.label}}</p>
  120. </div>
  121. <p class="button-p" @click="dialogOpen(item)">操作</p>
  122. </div>
  123. </div>
  124. <div class="things-box" v-for="(item,index) in hardwareList" :key="item.id" v-if="item.hardwareTypeKey != 'airConditioner'">
  125. <div class="things-for-box">
  126. <p class="left-title">{{item.hardwareName}}</p>
  127. <el-switch
  128. class="switch"
  129. @click.native="changeIsNeedCaptcha(item)"
  130. v-model="item.operatingState"
  131. :active-value="true"
  132. :inactive-value="false"
  133. active-text="开启"
  134. inactive-text="关闭"
  135. disabled>
  136. </el-switch>
  137. </div>
  138. </div>
  139. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data-1.png" v-if="!hardwareList[0]">
  140. <!--视频监控-->
  141. <div class="all-title-box" style="height:40px;margin-top:20px;" v-if="videoType">
  142. <p></p>
  143. <p>视频监控</p>
  144. </div>
  145. <div v-if="videoType">
  146. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data-1.png" v-if="!videoList[0]">
  147. <H5PlayerVideo v-for="(item,index) in videoList" :key="index" :videoProps="item"></H5PlayerVideo>
  148. </div>
  149. <!--广播-->
  150. <div class="all-title-box" style="height:40px;margin-top:10px;">
  151. <p></p>
  152. <p>语音广播</p>
  153. </div>
  154. <div class="things-box" v-for="(item,index) in loudspeakerList" :key="item.id">
  155. <div class="things-for-box">
  156. <p class="left-title">{{item.deviceName}}</p>
  157. <p class="right-button" @click="handleAdd(item.deviceNo)">播放文字</p>
  158. </div>
  159. </div>
  160. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data-1.png" v-if="!loudspeakerList[0]">
  161. <!--危险源信息-->
  162. <div class="all-title-box" style="height:40px;margin-top:10px;">
  163. <p></p>
  164. <p>危险源信息</p>
  165. </div>
  166. <div class="source-box" style="margin-bottom:20px;" v-if="checkInData.hazardNames">
  167. <span>{{checkInData.hazardNames}}</span>
  168. </div>
  169. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data-1.png" v-if="!checkInData.hazardNames">
  170. <!--检查项信息-->
  171. <div class="all-title-box" style="height:30px;">
  172. <p></p>
  173. <p>检查项信息</p>
  174. </div>
  175. <div class="inspection-box">
  176. <div class="inspection-left-box">
  177. <div v-if="checkInData.checkIn">
  178. <p>穿戴检查项:</p>
  179. <p>{{checkInData.checkIn}}</p>
  180. </div>
  181. <div v-if="checkInData.skipped">
  182. <p>穿戴检查可跳过:</p>
  183. <p>{{checkInData.skipped?'是':'否'}}</p>
  184. </div>
  185. <div v-if="checkInData.checkIn && checkInData.skipped">
  186. <p>穿戴检查识别上限:</p>
  187. <p>{{checkInData.checkCount}}次</p>
  188. </div>
  189. <div v-if="checkInData.signTime">
  190. <p>签到有效时间:</p>
  191. <p>{{checkInData.signTime}}小时</p>
  192. </div>
  193. <div v-if="checkInData.checkOutUpload">
  194. <p>离开检查是否上传照片:</p>
  195. <p>{{checkInData.checkOutUpload?'是':'否'}}</p>
  196. </div>
  197. <div v-if="checkInData.signTime">
  198. <p>签到有效时间:</p>
  199. <p>{{checkInData.signTime}}小时</p>
  200. </div>
  201. </div>
  202. <div class="inspection-right-box">
  203. <div v-if="checkInData.inspectCheckIn">
  204. <p>穿戴检查项(巡查):</p>
  205. <p>{{checkInData.inspectCheckIn}}</p>
  206. </div>
  207. <div v-if="checkInData.inspectSkipped">
  208. <p>穿戴检查可跳过(巡查):</p>
  209. <p>{{checkInData.inspectSkipped?'是':'否'}}</p>
  210. </div>
  211. <div v-if="checkInData.inspectCheckIn && checkInData.inspectSkipped">
  212. <p>穿戴检查识别上限(巡查):</p>
  213. <p>{{checkInData.inspectCheckCount}}次</p>
  214. </div>
  215. <div v-if="checkInData.inspectSignTime">
  216. <p>签到有效时间(巡查):</p>
  217. <p>{{checkInData.inspectSignTime}}小时</p>
  218. </div>
  219. </div>
  220. </div>
  221. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data-1.png" v-if="!checkInData.signTime && !checkInData.inspectSignTime">
  222. </div>
  223. <qr-code-dialog ref="qrCodeDialog" :qrCodeDialogData="qrCodeDialogData"></qr-code-dialog>
  224. <!--播放文字窗口-->
  225. <el-dialog title="语音广播" :visible.sync="open" width="500px" append-to-body>
  226. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  227. <el-form-item label="播放文字" prop="text">
  228. <el-input v-model="form.text" placeholder="请输入播放文字" />
  229. </el-form-item>
  230. </el-form>
  231. <div slot="footer" class="dialog-footer">
  232. <el-button @click="cancel">取 消</el-button>
  233. <el-button type="primary" @click="submitFormOne">确 定</el-button>
  234. </div>
  235. </el-dialog>
  236. <!--红外控制器-->
  237. <el-dialog class="subject-infoPage-dialog" :title='infraredControllerTitle' width="460px" append-to-body
  238. :visible.sync="infraredControllerType" v-if="infraredControllerType" @close="dialogOff()"
  239. :close-on-click-modal="false" :close-on-press-escape="false">
  240. <div class="infraredController-max-big-box">
  241. <div class="infraredController-switchType-box">
  242. <p class="switchType-name-p">{{infraredControllerForm.name}}</p>
  243. <p class="switchType-type-p"
  244. @click="switchTypeButton"
  245. :class="infraredControllerForm.switchType == 1 ? '': 'switchType-type-off-p'">{{infraredControllerForm.switchType == 1 ? '开启':'关闭'}}</p>
  246. </div>
  247. <div style="overflow: hidden;height:130px;">
  248. <div class="infraredController-functionType-box" v-if="infraredControllerForm.switchType == 1">
  249. <p :class="infraredControllerForm.functionType == item.value?'check-button':''"
  250. @click="functionButton(item.value)"
  251. v-for="(item,index) in infraredControllerData.functionList"
  252. :key="item.value">{{item.label}}</p>
  253. </div>
  254. <div class="infraredController-orderType-box" v-if="infraredControllerForm.switchType == 1 && (infraredControllerForm.functionType == 1 || infraredControllerForm.functionType == 2)">
  255. <p class="order-minus" @click="minusTextButton()">-</p>
  256. <p class="order-text" v-for="(item,index) in infraredControllerData.refrigerationList" :key="item.value" v-if="infraredControllerForm.functionType==1&&infraredControllerForm.orderType == item.value">{{item.label}}</p>
  257. <p class="order-text" v-for="(item,index) in infraredControllerData.heatingList" :key="item.value" v-if="infraredControllerForm.functionType==2&&infraredControllerForm.orderType == item.value">{{item.label}}</p>
  258. <p class="order-add" @click="addTextButton()">+</p>
  259. </div>
  260. </div>
  261. </div>
  262. <div slot="footer" class="dialog-footer dialog-footer-box">
  263. <p class="dialog-footer-button-null"></p>
  264. <p class="dialog-footer-button-primary" @click="dialogSubmit">确定</p>
  265. <p class="dialog-footer-button-null"></p>
  266. </div>
  267. </el-dialog>
  268. </div>
  269. </template>
  270. <script>
  271. import vueQr from 'vue-qr'
  272. import mqtt from 'mqtt'
  273. import { controlsRestrictVerify } from '@/utils/index'
  274. import qrCodeDialog from "@/components/qrCodeDialog/index.vue"
  275. import {laboratorySubRelInfoGetSubRelByCheckHazard} from '@/api/integratedManagement/index'
  276. import {
  277. iotSensorFindBySubId,
  278. iotHardwareFindByType,
  279. iotHardwareOperatingHardware,
  280. iotDeviceFindByType,
  281. iotSpeakerPlayText
  282. } from '@/api/commonality/permission'
  283. import { iotCameraFindByCondition } from "@/api/basicsModules/index";
  284. import H5PlayerVideo from '@/components/H5PlayerVideo/H5PlayerVideo.vue';
  285. export default {
  286. name: "infoPage",
  287. components: {
  288. vueQr,
  289. qrCodeDialog,
  290. H5PlayerVideo
  291. },
  292. props:{
  293. subjectData:{},
  294. },
  295. data() {
  296. return {
  297. //二维码规则 服务器域名,需与微信后台开发配置内一致.
  298. identification: localStorage.getItem('codeOnlineAdd'),
  299. //二维码参数
  300. qrCodeDialogData:{},
  301. //主要危险类别
  302. hazardCategory:[],
  303. //风险防控措施
  304. riskMeasure:[],
  305. //灭火要点
  306. extinguishingKeyPoints:[],
  307. //实验室二维码展示开关
  308. codeType:false,
  309. //播放文字的实验室id
  310. open:false,
  311. form:{},
  312. rules:{
  313. text:[
  314. {required: true, message: '请输入播放文字', trigger: 'blur'},
  315. { required: true, message: "请输入播放文字", validator: this.spaceJudgment, trigger: "blur" }
  316. ],
  317. },
  318. //传感器数据
  319. sensorList:[],
  320. //硬件数据
  321. hardwareList:[],
  322. width: 490,
  323. height: 280,
  324. //视频权限
  325. videoType:false,
  326. //视频数据
  327. videoList:[],
  328. //危险源-关联配置数据
  329. checkInData:{},
  330. //喇叭数据
  331. loudspeakerList:[],
  332. //MQTT请求参数-传感器
  333. sensorMtOpic:"iot/device/sensor/sub/",
  334. sensorClient:{},
  335. lastOnlineTime:'',
  336. //MQTT请求参数-硬件
  337. hardwareMtOpic:"iot/hardware/all/sub/",
  338. hardwareClient:{},
  339. //红外控制器相关
  340. infraredControllerType:false,
  341. infraredControllerTitle:"",
  342. infraredControllerForm:{
  343. name:null,//设备名称
  344. switchType:null,//0.关 1.开
  345. functionType:null, //1.制冷 2.制热 3.通风
  346. orderType:null, //温度指令
  347. hardwareNo:null, //设备编号
  348. },
  349. infraredControllerData:{
  350. functionList:[
  351. {label:'制冷',value:'1'},
  352. {label:'制热',value:'2'},
  353. {label:'通风',value:'3'},
  354. ],
  355. //制冷
  356. refrigerationList:[
  357. {label:"18°C",value:18},
  358. {label:"19°C",value:19},
  359. {label:"20°C",value:20},
  360. {label:"21°C",value:21},
  361. {label:"22°C",value:22},
  362. {label:"23°C",value:23},
  363. {label:"24°C",value:24},
  364. {label:"25°C",value:25},
  365. {label:"26°C",value:26},
  366. {label:"27°C",value:27},
  367. {label:"28°C",value:28},
  368. ],
  369. //制热
  370. heatingList:[
  371. {label:"22°C",value:22},
  372. {label:"23°C",value:23},
  373. {label:"24°C",value:24},
  374. {label:"25°C",value:25},
  375. {label:"26°C",value:26},
  376. {label:"27°C",value:27},
  377. {label:"28°C",value:28},
  378. {label:"29°C",value:29},
  379. {label:"30°C",value:30},
  380. ],
  381. }
  382. }
  383. },
  384. created() {
  385. },
  386. mounted(){
  387. // 初始化
  388. this.initialize();
  389. },
  390. methods:{
  391. initialize(){
  392. //主要危险类别
  393. this.getDicts("sys_hazard_category").then(response => {
  394. this.hazardCategory = response.data;
  395. });
  396. //风险防控措施
  397. this.getDicts("sys_risk_measure").then(response => {
  398. this.riskMeasure = response.data;
  399. });
  400. //灭火要点
  401. this.getDicts("sys_extinguishing_key_points").then(response => {
  402. this.extinguishingKeyPoints = response.data;
  403. });
  404. //安全警示标识
  405. if(this.subjectData.safeSigns){
  406. this.subjectData.safeSigns = this.subjectData.safeSigns.split(',')
  407. }
  408. //风控防控措施
  409. if(this.subjectData.riskMeasure){
  410. this.subjectData.riskMeasure = this.subjectData.riskMeasure.split(',')
  411. }
  412. //主要危险类别
  413. if(this.subjectData.hazardCategory){
  414. this.subjectData.hazardCategory = this.subjectData.hazardCategory.split(',')
  415. }
  416. //灭火要点
  417. if(this.subjectData.outFire){
  418. this.subjectData.outFire = this.subjectData.outFire.split(',')
  419. }
  420. //传感器查询
  421. iotSensorFindBySubId({subId:this.subjectData.subId}).then(response => {
  422. this.$set(this,'sensorList',response.data);
  423. })
  424. //硬件查询
  425. iotHardwareFindByType({subjectId:this.subjectData.subId}).then(response => {
  426. response.data.forEach((item)=>{
  427. if(item.hardwareTypeKey == 'airConditioner'){
  428. if(item.reservedThree == 0){
  429. item.switchType = 0;
  430. }else if(item.reservedThree == 2){
  431. item.switchType = 1;
  432. item.functionType = 3;
  433. }else if(item.reservedThree.indexOf('-') != -1){
  434. let list = item.reservedThree.split('-');
  435. item.switchType = 1;
  436. item.functionType = list[0]==3?1:(list[0]==4?2:'');
  437. item.orderType = list[1]?list[1]:'';
  438. }else{
  439. item.switchType = '';
  440. item.functionType = '';
  441. item.orderType = '';
  442. }
  443. }
  444. })
  445. this.$set(this,'hardwareList',response.data);
  446. })
  447. //喇叭查询
  448. iotDeviceFindByType({ subjectId:this.subjectData.subId, typeKeyList:['horn'] }).then(response => {
  449. this.$set(this,'loudspeakerList',response.data);
  450. })
  451. //危险源-关联配置查询
  452. laboratorySubRelInfoGetSubRelByCheckHazard({ infoId:this.subjectData.infoId }).then(response => {
  453. this.$set(this,'checkInData',response.data);
  454. })
  455. //视频查询
  456. if(!controlsRestrictVerify('subVideo')){
  457. this.$set(this,'videoType',false);
  458. }else{
  459. this.videoInitialize();
  460. }
  461. //mqtt订阅
  462. this.sensorOffMQTT('on');
  463. this.hardwareOffMQTT('on');
  464. },
  465. videoInitialize() {
  466. let self = this;
  467. // type 1.楼栋 2.楼层 3.楼道 4.实验室
  468. let obj = {
  469. page:'1',
  470. pageSize:'10',
  471. buildId:'',
  472. floorId:'',
  473. passageway:'',
  474. subIds:[this.subjectData.subId],
  475. };
  476. iotCameraFindByCondition(obj).then(response => {
  477. let list = [];
  478. for(let i=0;i<response.data.records.length;i++){
  479. list.push(
  480. {
  481. width: this.width, //(宽度:非必传-默认600)
  482. height: this.height, //(高度:非必传-默认338)
  483. url: response.data.records[i].streamUrl,
  484. }
  485. )
  486. }
  487. this.$set(this,'videoList',list)
  488. this.$nextTick(()=>{
  489. setTimeout(function(){
  490. self.$set(self, 'videoType', true);
  491. },1000);
  492. })
  493. });
  494. },
  495. //播放文字
  496. handleAdd(deviceNo) {
  497. if(!controlsRestrictVerify('subHardwareControl')){
  498. this.msgError('没有相关操作权限,请联系管理员')
  499. return
  500. }
  501. this.$set(this,'form',{
  502. deviceNo:deviceNo,
  503. text:'',
  504. });
  505. this.$set(this,'open',true);
  506. },
  507. // 取消按钮
  508. cancel() {
  509. this.$set(this,'form',{});
  510. this.$set(this,'open',false);
  511. },
  512. /*播放文字*/
  513. submitFormOne(){
  514. this.$refs["form"].validate(valid => {
  515. if (valid) {
  516. iotSpeakerPlayText(this.form).then(response => {
  517. this.msgSuccess(response.message)
  518. this.$set(this,'open',false);
  519. })
  520. }
  521. });
  522. },
  523. //展示实验室二维码
  524. clickCode(){
  525. this.$set(this,'qrCodeDialogData',{
  526. // title:this.subjectData.subName, //弹窗名称(非必传)
  527. download:true, //二维码下载按钮(非必传)
  528. type:'5', //二维码类型 用于区分二维码功能类型
  529. parameter:this.subjectData.infoId+'&subId='+this.subjectData.subId, //二维码参数
  530. name:this.subjectData.subName, //二维码名称用于下载时命名(非必传)
  531. codeName:this.subjectData.subName, //二维码图片下名称展示(非必传)
  532. });
  533. this.$refs['qrCodeDialog'].initialize();
  534. },
  535. // 开启关闭验证
  536. async changeIsNeedCaptcha (row) {
  537. let self = this;
  538. if(!controlsRestrictVerify('subHardwareControl')){
  539. this.msgError('没有相关操作权限,请联系管理员')
  540. return
  541. }
  542. let text = row.operatingState?'关闭':'开启';
  543. this.$confirm(`是否`+text+`此设备`, "提示", {
  544. confirmButtonText: "确定",
  545. cancelButtonText: "取消",
  546. type: "warning"
  547. }).then(async () => {
  548. self.switchChange(row)
  549. }).catch(() => {
  550. })
  551. },
  552. //开关按钮
  553. switchChange(row){
  554. let switchData = {
  555. hardwareNo:row.hardwareNo,
  556. command:row.operatingState?'0':'1'
  557. };
  558. iotHardwareOperatingHardware(switchData).then(response => {
  559. if(response.code==200){
  560. this.msgSuccess("操作成功")
  561. }
  562. });
  563. },
  564. //返回上一页
  565. backPage(){
  566. this.$parent.clickPage(1);
  567. },
  568. //MQTT订阅
  569. sensorMQTT(){
  570. let self = this;
  571. this.sensorClient = mqtt.connect(localStorage.getItem('mqttUrl'), {
  572. username: localStorage.getItem('mqttUser'),
  573. password:localStorage.getItem('mqttPassword')
  574. });
  575. this.sensorClient.on("connect", e =>{
  576. this.sensorClient.subscribe(this.sensorMtOpic+self.subjectData.subId, (err) => {
  577. if (!err) {
  578. // console.log("订阅成功:" + this.sensorMtOpic+self.subjectData.subId);
  579. }else{
  580. // console.log("连接错误:" + err);
  581. }
  582. });
  583. });
  584. this.sensorClient.on("message", (topic, message) => {
  585. if (message){
  586. let data = JSON.parse(message)
  587. let list = JSON.parse(JSON.stringify(this.sensorList))
  588. list.forEach((item)=>{
  589. data.forEach((minItem)=>{
  590. if(item.deviceNo == minItem.deviceNo){
  591. item.deviceValue = minItem.deviceValue;
  592. item.online = minItem.online;
  593. }
  594. })
  595. })
  596. if(data[0].lastOnlineTime){
  597. this.$set(this,'lastOnlineTime',data[0].lastOnlineTime);
  598. }else{
  599. this.$set(this,'lastOnlineTime','');
  600. }
  601. this.$set(this,'sensorList',list);
  602. }
  603. });
  604. },
  605. //取消订阅关闭MQTT连接
  606. sensorOffMQTT(type){
  607. let self = this;
  608. if(self.sensorClient.unsubscribe){
  609. self.sensorClient.unsubscribe(this.sensorMtOpic+self.subjectData.subId, error => {
  610. if (error) {
  611. // console.log('mqtt关闭连接错误:', error)
  612. }
  613. })
  614. self.sensorClient.end();
  615. this.$set(this,'sensorClient',{});
  616. }
  617. //判断传入参数如果存在 发起一次新的连接
  618. if(type){
  619. this.sensorMQTT();
  620. }
  621. },
  622. //MQTT订阅
  623. hardwareMQTT(){
  624. let self = this;
  625. this.hardwareClient = mqtt.connect(localStorage.getItem('mqttUrl'), {
  626. username: localStorage.getItem('mqttUser'),
  627. password:localStorage.getItem('mqttPassword')
  628. });
  629. this.hardwareClient.on("connect", e =>{
  630. this.hardwareClient.subscribe(self.hardwareMtOpic+self.subjectData.subId, (err) => {
  631. if (!err) {
  632. // console.log("订阅成功:" + self.hardwareMtOpic+self.subjectData.subId);
  633. }else{
  634. // console.log("连接错误:" + err);
  635. }
  636. });
  637. });
  638. this.hardwareClient.on("message", (topic, message) => {
  639. if (message){
  640. let data = JSON.parse(message)
  641. // console.log('硬件-mqtt',data)
  642. let list = JSON.parse(JSON.stringify(this.hardwareList))
  643. list.forEach((item)=>{
  644. if(item.hardwareNo == data.hardwareNo){
  645. if(item.hardwareTypeKey == 'airConditioner'){
  646. if(data.command == 0){
  647. item.switchType = 0;
  648. item.functionType = '';
  649. item.orderType = '';
  650. }else if(data.command == 2){
  651. item.switchType = 1;
  652. item.functionType = 3;
  653. item.orderType = '';
  654. }else if(data.command.indexOf('-') != -1){
  655. let list = data.command.split('-');
  656. item.switchType = 1;
  657. item.functionType = list[0]==3?1:(list[0]==4?2:'');
  658. item.orderType = list[1]?list[1]:'';
  659. }else{
  660. item.switchType = '';
  661. item.functionType = '';
  662. item.orderType = '';
  663. }
  664. }else{
  665. item.operatingState = data.operatingState;
  666. item.online = data.online;
  667. }
  668. }
  669. })
  670. this.$set(this,'hardwareList',list);
  671. }
  672. });
  673. },
  674. //取消订阅关闭MQTT连接
  675. hardwareOffMQTT(type){
  676. let self = this;
  677. if(self.hardwareClient.unsubscribe){
  678. self.hardwareClient.unsubscribe(self.hardwareMtOpic+self.subjectData.subId, error => {
  679. if (error) {
  680. // console.log('mqtt关闭连接错误:', error)
  681. }
  682. })
  683. self.hardwareClient.end();
  684. this.$set(this,'hardwareClient',{});
  685. }
  686. //判断传入参数如果存在 发起一次新的连接
  687. if(type){
  688. this.hardwareMQTT();
  689. }
  690. },
  691. /**************** 红外控制器操作相关 ****************/
  692. //弹层关闭
  693. dialogOff(){
  694. this.$set(this,'infraredControllerType',false);
  695. },
  696. //弹层开启
  697. dialogOpen(item){
  698. if(!controlsRestrictVerify('subHardwareControl')){
  699. this.msgError('没有相关操作权限,请联系管理员')
  700. return
  701. }
  702. this.$set(this,'infraredControllerTitle','空调控制');
  703. this.$set(this,'infraredControllerForm',{
  704. name:item.hardwareName,
  705. switchType:parseInt(item.switchType),
  706. functionType:item.switchType == 0 ? 1 : parseInt(item.functionType),
  707. orderType:item.switchType == 1 && item.functionType !=3 ? parseInt(item.orderType):18,
  708. hardwareNo:item.hardwareNo,
  709. });
  710. this.$set(this,'infraredControllerType',true);
  711. },
  712. dialogSubmit(){
  713. let text = '';
  714. if(this.infraredControllerForm.switchType == 1){
  715. if(this.infraredControllerForm.functionType == 1){
  716. text = '3-' + this.infraredControllerForm.orderType;
  717. }else if(this.infraredControllerForm.functionType == 2){
  718. text = '4-' + this.infraredControllerForm.orderType;
  719. }else if(this.infraredControllerForm.functionType == 3){
  720. text = '2';
  721. }
  722. }else if(this.infraredControllerForm.switchType == 0){
  723. text = '0';
  724. }
  725. let switchData = {
  726. hardwareNo:this.infraredControllerForm.hardwareNo,
  727. command:text
  728. };
  729. iotHardwareOperatingHardware(switchData).then(response => {
  730. if(response.code==200){
  731. this.msgSuccess("操作成功")
  732. this.$set(this,'infraredControllerType',false);
  733. }
  734. });
  735. },
  736. //开关切换
  737. switchTypeButton(){
  738. if(!this.infraredControllerForm.switchType){
  739. if (this.infraredControllerForm.functionType == 1){
  740. if(this.infraredControllerForm.orderType<18 || this.infraredControllerForm.orderType>28){
  741. this.$set(this.infraredControllerForm,'orderType',18);
  742. }
  743. } else if(this.infraredControllerForm.functionType == 2){
  744. if(this.infraredControllerForm.orderType<22 || this.infraredControllerForm.orderType>30){
  745. this.$set(this.infraredControllerForm,'orderType',22);
  746. }
  747. }else if(this.infraredControllerForm.functionType == 3){
  748. this.$set(this.infraredControllerForm,'orderType',18);
  749. }else{
  750. this.$set(this.infraredControllerForm,'functionType',1);
  751. this.$set(this.infraredControllerForm,'orderType',18);
  752. }
  753. }
  754. this.$set(this.infraredControllerForm,'switchType',!this.infraredControllerForm.switchType);
  755. },
  756. //状态切换
  757. functionButton(value){
  758. if(this.infraredControllerForm.functionType != value){
  759. if (value == 1){
  760. if(this.infraredControllerForm.orderType<18 || this.infraredControllerForm.orderType>28){
  761. this.$set(this.infraredControllerForm,'orderType',18);
  762. }
  763. } else if(value == 2){
  764. if(this.infraredControllerForm.orderType<22 || this.infraredControllerForm.orderType>30){
  765. this.$set(this.infraredControllerForm,'orderType',22);
  766. }
  767. }
  768. this.$set(this.infraredControllerForm,'functionType',value);
  769. }
  770. },
  771. //指令切换
  772. minusTextButton(){
  773. if (this.infraredControllerForm.functionType == 1){
  774. if(this.infraredControllerForm.orderType>18){
  775. this.infraredControllerForm.orderType--
  776. }
  777. } else if(this.infraredControllerForm.functionType == 2){
  778. if(this.infraredControllerForm.orderType>22){
  779. this.infraredControllerForm.orderType--
  780. }
  781. }
  782. },
  783. addTextButton(){
  784. if (this.infraredControllerForm.functionType == 1){
  785. if(this.infraredControllerForm.orderType<28){
  786. this.infraredControllerForm.orderType++
  787. }
  788. } else if(this.infraredControllerForm.functionType == 2){
  789. if(this.infraredControllerForm.orderType<30){
  790. this.infraredControllerForm.orderType++
  791. }
  792. }
  793. },
  794. },
  795. beforeDestroy() {
  796. //清除定时器
  797. let self = this;
  798. self.sensorOffMQTT();
  799. self.hardwareOffMQTT();
  800. },
  801. }
  802. </script>
  803. <style lang="scss" scoped>
  804. .subject-infoPage{
  805. flex:1;
  806. display: flex;
  807. overflow: hidden;
  808. .left-max-box{
  809. font-weight:500;
  810. width:1035px;
  811. display: flex;
  812. flex-direction: column;
  813. border-radius:10px!important;
  814. box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
  815. padding:20px;
  816. margin:5px 10px 20px 10px;
  817. .left-top-title-box{
  818. margin-top:13px;
  819. display: flex;
  820. border-bottom:1px dashed #999999;
  821. .left-box{
  822. flex:1;
  823. .lv-name-box{
  824. height:34px;
  825. display: flex;
  826. p:nth-child(1){
  827. height:22px;
  828. line-height:20px;
  829. margin:6px 15px 0 0;
  830. font-size:12px;
  831. text-align: center;
  832. padding:0 8px;
  833. border-radius:4px;
  834. }
  835. p:nth-child(2){
  836. font-size:16px;
  837. height:34px;
  838. line-height:34px;
  839. color:#333;
  840. }
  841. .subArea-p{
  842. font-size:14px;
  843. height:34px;
  844. line-height:34px;
  845. color:#333;
  846. margin-left:10px;
  847. }
  848. }
  849. .type-address-box{
  850. padding:5px 0 10px 0;
  851. p{
  852. display: inline-block;
  853. font-size:14px;
  854. height:20px;
  855. line-height:20px;
  856. color:#999;
  857. }
  858. .type-p{
  859. margin-right:10px;
  860. }
  861. .type-address{
  862. margin-left:10px;
  863. }
  864. }
  865. }
  866. .right-code-img{
  867. width:60px;
  868. height:60px;
  869. margin:0 10px 0 0;
  870. cursor: pointer;
  871. }
  872. }
  873. .user-max-box{
  874. margin-top:10px;
  875. display: flex;
  876. .left-box{
  877. width:420px;
  878. display: flex;
  879. p{
  880. line-height: 32px;
  881. font-size:14px;
  882. flex:1;
  883. color:#333;
  884. span{
  885. color:#999;
  886. }
  887. }
  888. }
  889. .right-box{
  890. flex:1;
  891. div{
  892. flex:1;
  893. display: flex;
  894. p{
  895. line-height: 32px;
  896. font-size:14px;
  897. flex:1;
  898. color:#333;
  899. span{
  900. color:#999;
  901. }
  902. }
  903. }
  904. }
  905. }
  906. .info-max-title-p{
  907. line-height:20px;
  908. font-size:16px;
  909. color:#333;
  910. font-weight:700;
  911. border-top:1px dashed #999999;
  912. padding-top:20px;
  913. margin-top:10px;
  914. }
  915. .info-max-box{
  916. margin-top:7px;
  917. display: flex;
  918. flex-wrap: wrap;
  919. .null-text-p{
  920. flex:1;
  921. font-size:16px;
  922. color:#999;
  923. text-align: center;
  924. line-height:60px;
  925. }
  926. .for-text-box{
  927. width:420px;
  928. .info-title{
  929. font-size:14px;
  930. color:#333;
  931. line-height:40px;
  932. font-weight:700;
  933. }
  934. .for-box{
  935. overflow: hidden;
  936. .for-info-p{
  937. line-height:16px;
  938. font-size:14px;
  939. color:#999;
  940. margin:7px 0;
  941. overflow: hidden;
  942. }
  943. }
  944. }
  945. .for-img-box{
  946. width:420px;
  947. .info-title{
  948. font-size:14px;
  949. color:#333;
  950. line-height:40px;
  951. font-weight:700;
  952. }
  953. img{
  954. width:37px;
  955. height:50px;
  956. margin:0 14px 14px 0;
  957. }
  958. }
  959. }
  960. }
  961. .right-max-box{
  962. font-weight:500;
  963. width:545px;
  964. border-radius:10px!important;
  965. box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
  966. margin:5px 20px 20px 10px;
  967. padding:20px;
  968. .sensor-box{
  969. display: inline-block;
  970. font-size:14px;
  971. color:#333;
  972. line-height:34px;
  973. width:220px;
  974. span{
  975. color:#999;
  976. }
  977. }
  978. .things-box{
  979. width:200px;
  980. height:30px;
  981. display: inline-block;
  982. margin-bottom:10px;
  983. margin-right:40px;
  984. .things-for-box{
  985. display: flex;
  986. .left-title{
  987. flex:1;
  988. font-size:14px;
  989. color:#333;
  990. line-height:30px;
  991. margin-right:10px;
  992. display:block;
  993. overflow:hidden;
  994. text-overflow:ellipsis;
  995. white-space:nowrap;
  996. }
  997. .switch{
  998. }
  999. .switch-null-p{
  1000. font-size:14px;
  1001. color:#999;
  1002. line-height:30px;
  1003. }
  1004. .right-button{
  1005. cursor: pointer;
  1006. line-height:30px;
  1007. border-radius:6px;
  1008. border:1px solid #0045af;
  1009. color:#0045af;
  1010. font-size:14px;
  1011. text-align: center;
  1012. width:80px;
  1013. }
  1014. }
  1015. }
  1016. .things-box-one{
  1017. width:440px;
  1018. height:30px;
  1019. display: inline-block;
  1020. margin-bottom:10px;
  1021. margin-right:40px;
  1022. .things-box-one-for{
  1023. display: flex;
  1024. p{
  1025. font-size:14px;
  1026. height:20px;
  1027. line-height:20px;
  1028. }
  1029. .name-p{
  1030. width:140px;
  1031. color:#333;
  1032. margin-right:10px;
  1033. display:block;
  1034. overflow:hidden;
  1035. text-overflow:ellipsis;
  1036. white-space:nowrap;
  1037. }
  1038. .text-box{
  1039. display: flex;
  1040. flex:1;
  1041. p:nth-child(1){
  1042. width:40px;
  1043. text-align: center;
  1044. border-radius:4px;
  1045. margin-right:10px;
  1046. font-size:12px!important;
  1047. }
  1048. p:nth-child(2){
  1049. width:50px;
  1050. text-align: center;
  1051. }
  1052. p:nth-child(3){
  1053. width:40px;
  1054. text-align: center;
  1055. }
  1056. .colorOpen{
  1057. background-color: #0183FA;
  1058. color:#fff;
  1059. }
  1060. .colorOff{
  1061. background-color: #999;
  1062. color:#fff;
  1063. }
  1064. .colorText{
  1065. color:#999;
  1066. }
  1067. }
  1068. .button-p{
  1069. background-color: #0183FA;
  1070. color:#fff;
  1071. font-size:12px;
  1072. width:50px;
  1073. line-height:20px;
  1074. text-align: center;
  1075. border-radius:20px;
  1076. cursor: pointer;
  1077. }
  1078. }
  1079. }
  1080. .source-box{
  1081. span{
  1082. font-size:14px;
  1083. line-height:18px;
  1084. color:#333;
  1085. }
  1086. }
  1087. .inspection-box{
  1088. display: flex;
  1089. .inspection-left-box{
  1090. flex:1;
  1091. div{
  1092. display: flex;
  1093. p:nth-child(1){
  1094. line-height:16px;
  1095. font-size:14px;
  1096. margin:11px 0;
  1097. color:#333;
  1098. }
  1099. p:nth-child(2){
  1100. flex:1;
  1101. line-height:16px;
  1102. font-size:14px;
  1103. margin:11px 0;
  1104. color:#999;
  1105. span{
  1106. color:#999;
  1107. }
  1108. }
  1109. }
  1110. }
  1111. .inspection-right-box{
  1112. flex:1;
  1113. div{
  1114. display: flex;
  1115. p:nth-child(1){
  1116. line-height:16px;
  1117. font-size:14px;
  1118. margin:11px 0;
  1119. color:#333;
  1120. }
  1121. p:nth-child(2){
  1122. flex:1;
  1123. line-height:16px;
  1124. font-size:14px;
  1125. margin:11px 0;
  1126. color:#999;
  1127. span{
  1128. color:#999;
  1129. }
  1130. }
  1131. }
  1132. }
  1133. }
  1134. }
  1135. .null-p{
  1136. line-height:50px;
  1137. text-align: center;
  1138. font-size:14px;
  1139. color:#999;
  1140. }
  1141. .null-data-img{
  1142. display: block;
  1143. margin:10px auto;
  1144. width:150px;
  1145. }
  1146. .all-title-box{
  1147. display: flex;
  1148. height:18px;
  1149. p{
  1150. line-height:18px;
  1151. }
  1152. p:nth-child(1){
  1153. width:4px;
  1154. height:18px;
  1155. margin-right:12px;
  1156. background: #0045af;
  1157. }
  1158. p:nth-child(2){
  1159. font-size:18px;
  1160. color:#0045af;
  1161. margin-right:28px;
  1162. font-weight:700;
  1163. }
  1164. p:nth-child(3){
  1165. font-size:14px;
  1166. color:#999;
  1167. flex:1;
  1168. }
  1169. p:nth-child(4){
  1170. line-height:40px!important;
  1171. }
  1172. }
  1173. }
  1174. </style>
  1175. <style lang="scss">
  1176. .subject-infoPage{
  1177. .el-switch{
  1178. display: block;
  1179. width:50px!important;
  1180. height:20px!important;
  1181. margin-top: 5px!important;
  1182. }
  1183. .switch .el-switch__label {
  1184. position: absolute;
  1185. display: none;
  1186. color: #fff !important;
  1187. }
  1188. .switch .el-switch__label.is-active {
  1189. display: block;
  1190. }
  1191. .switch.el-switch .el-switch__core,
  1192. .el-switch .el-switch__label {
  1193. width: 50px !important;
  1194. height:20px!important;
  1195. line-height:20px!important;
  1196. -webkit-border-radius: 20px!important;
  1197. -moz-border-radius: 20px!important;
  1198. border-radius: 20px!important;
  1199. margin: 0;
  1200. position: absolute;
  1201. top: 0;
  1202. }
  1203. .switch .el-switch__label--left {
  1204. z-index: 1;
  1205. }
  1206. .switch .el-switch__label--left span{
  1207. margin-left:19px;
  1208. font-size: 12px;
  1209. color:#fff;
  1210. }
  1211. .switch .el-switch__label--right {
  1212. z-index: 1;
  1213. }
  1214. .switch .el-switch__label--right span{
  1215. margin-left:6px;
  1216. font-size: 12px;
  1217. color:#fff;
  1218. }
  1219. .el-switch__core{
  1220. background-color: #999;
  1221. }
  1222. .el-switch__core:after{
  1223. height:14px!important;
  1224. width:14px!important;
  1225. top:2px!important;
  1226. left:2px;
  1227. }
  1228. .el-switch.is-checked .el-switch__core{
  1229. background-color: #1890ff;
  1230. }
  1231. .el-switch.is-checked .el-switch__core::after{
  1232. margin-left: -16px!important;
  1233. }
  1234. }
  1235. .subject-infoPage-dialog{
  1236. .infraredController-max-big-box{
  1237. font-size:16px;
  1238. .infraredController-switchType-box{
  1239. display: flex;
  1240. p{
  1241. line-height:30px;
  1242. }
  1243. .switchType-name-p{
  1244. font-size:18px;
  1245. flex:1;
  1246. display:block;
  1247. overflow:hidden;
  1248. text-overflow:ellipsis;
  1249. white-space:nowrap;
  1250. }
  1251. .switchType-type-p{
  1252. cursor: pointer;
  1253. width:80px;
  1254. text-align: center;
  1255. border-radius:6px;
  1256. background-color: #fff;
  1257. border:1px solid #0183FB;
  1258. color:#0183FB;
  1259. }
  1260. .switchType-type-off-p{
  1261. background-color: #fff!important;
  1262. border:1px solid #999!important;
  1263. color:#999!important;
  1264. }
  1265. }
  1266. .infraredController-functionType-box{
  1267. margin-top:20px;
  1268. display: flex;
  1269. p{
  1270. border-radius:6px;
  1271. background-color: #fff;
  1272. border:1px solid #999;
  1273. color:#333;
  1274. line-height:40px;
  1275. width:130px;
  1276. text-align: center;
  1277. margin-left:14px;
  1278. cursor: pointer;
  1279. }
  1280. p:nth-child(1){
  1281. margin-left:0!important;
  1282. }
  1283. .check-button{
  1284. background-color: #0183FB!important;
  1285. border:1px solid #0183FB!important;
  1286. color:#fff!important;
  1287. }
  1288. }
  1289. .infraredController-orderType-box{
  1290. margin-top:20px;
  1291. display: flex;
  1292. p{
  1293. text-align: center;
  1294. line-height:40px;
  1295. width:60px;
  1296. }
  1297. .order-minus{
  1298. cursor: pointer;
  1299. border:1px solid #999;
  1300. border-top-left-radius: 6px;
  1301. border-bottom-left-radius: 6px;
  1302. }
  1303. .order-text{
  1304. width:300px;
  1305. border-top:1px solid #999;
  1306. border-bottom:1px solid #999;
  1307. }
  1308. .order-add{
  1309. cursor: pointer;
  1310. border:1px solid #999;
  1311. border-top-right-radius: 6px;
  1312. border-bottom-right-radius: 6px;
  1313. }
  1314. }
  1315. }
  1316. }
  1317. </style>