index.vue 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832
  1. <template>
  2. <div class="subject">
  3. <div class="subject-page" v-if="pageType == 1">
  4. <div class="subject-page-min">
  5. <div class="left-subject-list" >
  6. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" style="border-bottom:1px solid #D8D8D8">
  7. <el-form-item label="学院" prop="deptId" label-width="60px">
  8. <el-select v-model="queryParams.deptId" placeholder="请选择学院" clearable size="small">
  9. <el-option
  10. v-for="dict in deptOptions"
  11. :key="dict.deptId"
  12. :label="dict.deptName"
  13. :value="dict.deptId"
  14. ></el-option>
  15. </el-select>
  16. </el-form-item>
  17. <el-form-item label="实验室名称" prop="name" label-width="100px">
  18. <el-input
  19. v-model="queryParams.name"
  20. placeholder="请输入实验室名称"
  21. clearable
  22. size="small"
  23. />
  24. </el-form-item>
  25. <el-form-item style="float: right;">
  26. <el-col :span="1.5" style="margin-bottom:26px;margin-right: 20px">
  27. <p class="add-button-one-120"
  28. @click="clickPage(2)"
  29. v-hasPermi="['laboratory:subject:add']"
  30. ><i class="el-icon-plus"></i>新增实验室</p>
  31. </el-col>
  32. </el-form-item>
  33. <el-form-item style="margin-right: 20px;">
  34. <p class="inquire-button-one" style="margin-left:20px;" @click="handleQuery">查询</p>
  35. <p class="reset-button-one" style="margin-left:20px;" @click="resetQuery">重置</p>
  36. </el-form-item>
  37. </el-form>
  38. <div class="table_border">
  39. <el-table ref="multipleTable" border :data="subjectList" highlight-current-row @current-change="handleCurrentChange" style="cursor: pointer;">
  40. <el-table-column label="排序" align="left" prop="id" width="80">
  41. <template slot-scope="scope">
  42. <el-input maxlength="4" type="text" oninput ="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.diyOrder" @focus="liveSort(scope.row)" @blur="editSort(scope.row)"></el-input>
  43. </template>
  44. </el-table-column>
  45. <el-table-column label="实验室名称" align="left" prop="name" show-overflow-tooltip/>
  46. <el-table-column label="房间号" align="left" prop="room" width="120" show-overflow-tooltip/>
  47. <el-table-column label="分类/分级" align="left" prop="levelName" width="150" show-overflow-tooltip>
  48. <template slot-scope="scope">
  49. <span >{{scope.row.typeName}}/</span>
  50. <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="实验室责任人" align="left" prop="adminName" width="130" show-overflow-tooltip/>
  54. <el-table-column label="安全责任人" align="left" prop="safeUserName" width="200" show-overflow-tooltip/>
  55. <el-table-column label="操作" align="left" width="160">
  56. <template slot-scope="scope">
  57. <div style="display: flex;height:30px;">
  58. <p class="table-min-button" style="margin-right:10px;" v-hasPermi="['laboratory:subject:query']" @click="clickPage(7,scope.row)">详情</p>
  59. <el-dropdown trigger="click" size="mini" @command="(command) => handleCommand(command, scope.row)">
  60. <p class="table-min-button">更多<i class="el-icon-d-arrow-right"></i></p>
  61. <el-dropdown-menu slot="dropdown" style="margin:0!important;">
  62. <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="1" v-hasPermiAnd="['laboratory:subject:query','laboratory:subject:edit']">关联配置</el-dropdown-item>
  63. <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="2">物联配置</el-dropdown-item>
  64. <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="3" v-hasPermi="['laboratory:subjectmaterial:add']">准入配置</el-dropdown-item>
  65. <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="4" v-hasPermiAnd="['laboratory:subject:query','laboratory:subject:edit']">编辑</el-dropdown-item>
  66. <!--<el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="5"-->
  67. <!--v-hasPermi="['laboratory:subject:remove']">删除</el-dropdown-item>-->
  68. </el-dropdown-menu>
  69. </el-dropdown>
  70. </div>
  71. </template>
  72. </el-table-column>
  73. </el-table>
  74. <pagination
  75. style="margin-top:10px;"
  76. v-show="total>0"
  77. :total="total"
  78. :page.sync="queryParams.pageNum"
  79. :limit.sync="queryParams.pageSize"
  80. @pagination="getList"
  81. />
  82. </div>
  83. </div>
  84. <div class="right-subject-box scrollbar-box" :class="rightButtonType == 4?'overflow-box':''" v-if="checkedSubject.id">
  85. <div class="top-button-box">
  86. <div :class="rightButtonType == 1 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(1)">传感器监测</div>
  87. <div :class="rightButtonType == 2 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(2)">物联控制</div>
  88. <div :class="rightButtonType == 3 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(3)">视频监控</div>
  89. <div :class="rightButtonType == 4 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(4)">声光报警</div>
  90. <div v-if="versionField() != 'suZhouDaXue'"
  91. :class="rightButtonType == 5 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(5)">智能门禁</div>
  92. </div>
  93. <!--传感器-->
  94. <div class="bottom-max-box" :class="rightButtonType == 4?'overflow-box':''">
  95. <div class="bottom-sensor-box" v-if="rightButtonType == 1">
  96. <p class="top-title">
  97. <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
  98. <i>{{checkedSubject.deptName}}</i>
  99. </el-tooltip>
  100. <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
  101. <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
  102. </el-tooltip>
  103. </p>
  104. <div class="sensor-for-max-box scrollbar-box" v-if="checkedSubject.sensorFunctionStatusList[0]">
  105. <div class="sensor-for-big-box"
  106. :class="item.type == 1 ? 'sensor-color-a' : (item.type == 2 ? 'sensor-color-b' : 'sensor-color-c')"
  107. v-if="item.funNum != 'huoyan'"
  108. v-for="(item,index) in checkedSubject.sensorFunctionStatusList" :key="index">
  109. <div class="sensor-for-min-box">
  110. <img src="@/assets/ZDimages/subject/icon_bj_wd.png" v-if="item.funNum == 'wendu'">
  111. <img src="@/assets/ZDimages/subject/icon_bj_sd.png" v-if="item.funNum == 'shidu'">
  112. <img src="@/assets/ZDimages/subject/icon_bj_eyht.png" v-if="item.funNum == 'co'">
  113. <img src="@/assets/ZDimages/subject/icon_bj_jwnd.png" v-if="item.funNum == 'jiawan'">
  114. <img src="@/assets/ZDimages/subject/icon_sy_yqnd.png" v-if="item.funNum == 'o2'">
  115. <img src="@/assets/ZDimages/subject/icon_bj_yg.png" v-if="item.funNum == 'yanwu'">
  116. <img src="@/assets/ZDimages/subject/icon_sy_dqy.png" v-if="item.funNum == 'daqiya'">
  117. <img src="@/assets/ZDimages/subject/icon_syspz_voc.png" v-if="item.funNum == 'voc'">
  118. <img src="@/assets/ZDimages/subject/icon_syspz_voc.png" v-if="item.funNum == 'FB_VOC'">
  119. <img src="@/assets/ZDimages/subject/icon_syspz_tvoc.png" v-if="item.funNum == 'tvoc'">
  120. <img src="@/assets/ZDimages/subject/icon_sy_mcnd.png" v-if="item.funNum == 'so2'">
  121. <img src="@/assets/ZDimages/subject/icon_bj_yyhd.png" v-if="item.funNum == 'no1'">
  122. <img src="@/assets/ZDimages/subject/icon_bj_dqy.png" v-if="item.funNum == 'fenchen'">
  123. <img src="@/assets/ZDimages/subject/icon_bj_qq.png" v-if="item.funNum == 'H2'">
  124. <img src="@/assets/ZDimages/subject/guangqi.png" v-if="item.funNum == 'guangqi'">
  125. <img src="@/assets/ZDimages/subject/lvqi.png" v-if="item.funNum == 'lvqi'">
  126. <img src="@/assets/ZDimages/subject/icon_syspz_jiaquan.png" v-if="item.funNum == 'jiaquan'">
  127. <img src="@/assets/ZDimages/subject/icon_syspz_hwcw.png" v-if="item.funNum == 'hwcwy'">
  128. <div>
  129. <el-tooltip class="item" effect="dark" :content="item.describe" placement="bottom">
  130. <p>{{item.describe|ellipsis}}</p>
  131. </el-tooltip>
  132. <p>{{item.formatVal}}</p>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <img class="null-data-img" src="@/assets/ZDimages/null-data.png" v-if="!checkedSubject.sensorFunctionStatusList[0]">
  138. <p class="null-text-p" v-if="!checkedSubject.sensorFunctionStatusList[0]">暂无环境监测信息,请在更多操作-物联设备配置中进行添加</p>
  139. <p class="bottom-text" v-if="checkedSubject.sensorFunctionStatusList[0]">数据上报时间:{{checkedSubject.sensorFunctionStatusList[0].sendDate}}</p>
  140. </div>
  141. <div class="bottom-switch-box" v-if="rightButtonType == 2">
  142. <p class="top-title">
  143. <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
  144. <i>{{checkedSubject.deptName}}</i>
  145. </el-tooltip>
  146. <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
  147. <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
  148. </el-tooltip>
  149. </p>
  150. <div class="switch-for-max-box scrollbar-box" v-show="checkedSubject.VOlist[0]" v-hasPermi="['laboratory:subcontrol:set']">
  151. <div class="switch-for-big-box" v-for="(item,index) in checkedSubject.VOlist" :key="index">
  152. <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'SWITCH'">
  153. <div class="switch-for-min-box_t">
  154. <p class="switch-for-min-title">{{item.hardwareName}}</p>
  155. <p class="switch-null-p" v-if="item.state.code != 3 && item.state.code != 4" >{{item.state.name}}</p>
  156. </div>
  157. <div class="switch-for-min-box_b">
  158. <el-switch
  159. v-if="item.state.code == 3||item.state.code == 4"
  160. class="switch"
  161. @click.native="changeIsNeedCaptcha(item)"
  162. v-model="item.state.code"
  163. :active-value="3"
  164. :inactive-value="4"
  165. active-text="开启"
  166. inactive-text="关闭"
  167. disabled>
  168. </el-switch>
  169. </div>
  170. </div>
  171. <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'AI_VENTILATION'">
  172. <div class="switch-for-min-box_t">
  173. <p class="switch-for-min-title">{{item.hardwareName}}</p>
  174. <p class="switch-null-p" v-if="item.state.code != 3 && item.state.code != 4 && item.pcType == 0">{{item.state.name}}</p>
  175. <p class="switch-pc-type-p" v-if="item.pcType == 1" @click="tableButton(item)">操作</p>
  176. </div>
  177. <div class="switch-for-min-box_b" v-if="item.pcType == 0">
  178. <p class="switch-null-ventilate" v-if="item.hardwareTypeEnum.hardwareTypeCode==2 && item.state.code==3">{{item.dictLabel}}</p>
  179. <el-switch
  180. v-if="item.state.code == 3||item.state.code == 4"
  181. class="switch"
  182. @click.native="changeIsNeedCaptcha(item)"
  183. v-model="item.state.code"
  184. :active-value="3"
  185. :inactive-value="4"
  186. active-text="开启"
  187. inactive-text="关闭"
  188. disabled>
  189. </el-switch>
  190. </div>
  191. </div>
  192. <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'ONE_MACHINE'">
  193. <p class="switch-for-min-title">广播系统</p>
  194. <p class="switch-for-min-button" @click="handleAdd(item.subId)">播放文字</p>
  195. </div>
  196. </div>
  197. </div>
  198. <img class="null-data-img" src="@/assets/ZDimages/null-data.png" v-show="!checkedSubject.VOlist[0]">
  199. <p class="null-text-p" v-show="!checkedSubject.VOlist[0]">暂无物联控制信息,请在更多操作-物联设备配置中进行添加</p>
  200. </div>
  201. <div class="bottom-video-box" v-if="rightButtonType == 3">
  202. <p class="top-title">
  203. <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
  204. <i>{{checkedSubject.deptName}}</i>
  205. </el-tooltip>
  206. <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
  207. <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
  208. </el-tooltip>
  209. </p>
  210. <div class="video-for-max-box scrollbar-box" v-if="checkedSubject.videoData[0]">
  211. <div class="switch-for-big-box" v-for="(item,index) in checkedSubject.videoData" :key="index">
  212. <video :id="item.divId" ref="videoRef" autoplay controls muted width="490px" height="262px"></video>
  213. <p class="el-icon-full-screen position-p" @click="videoFullScreen(index)"></p>
  214. </div>
  215. </div>
  216. <img class="null-data-img" src="@/assets/ZDimages/null-data.png" v-if="!checkedSubject.videoData[0]">
  217. <p class="null-text-p" v-if="!checkedSubject.videoData[0]">暂无视频监控信息,请在更多操作-物联设备配置中进行添加</p>
  218. </div>
  219. <div class="bottom-alarm-box" v-if="rightButtonType == 4">
  220. <p class="top-title">
  221. <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
  222. <i>{{checkedSubject.deptName}}</i>
  223. </el-tooltip>
  224. <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
  225. <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
  226. </el-tooltip>
  227. </p>
  228. <div class="alarm-max-box" :class="hardwareData[0]?hardwareData[0].status==3||hardwareData[0].status==4?'BGcolorTypeA':'BGcolorTypeB':''">
  229. <img v-if="hardwareData[0]?hardwareData[0].status == 3:''" src="@/assets/ZDimages/medicUniversity-3_1/img_syslb_znsgbjzx.png" class="alarm-img">
  230. <div class="alarm-big-box" v-if="hardwareData[0]">
  231. <p>报警器编号:{{hardwareData[0].hardwareNum}}</p>
  232. <div class="alarm-position-box" >
  233. <el-switch
  234. v-if="hardwareData[0].status == 3"
  235. @click.native="changeIsNeedCaptchaAlarm(hardwareData[0])"
  236. class="switch captcha-img"
  237. :active-value="3"
  238. :inactive-value="4"
  239. active-color="#FF9900"
  240. inactive-color="#999"
  241. v-model="hardwareData[0].status"
  242. active-text="报警中"
  243. inactive-text="未报警"
  244. disabled
  245. ></el-switch>
  246. </div>
  247. <p :class="hardwareData[0].status==3||hardwareData[0].status==4?'colorTypeA':'colorTypeB'">{{hardwareData[0].status==3||hardwareData[0].status==4?'在线':'离线'}}</p>
  248. </div>
  249. <div class="alarm-big-box" v-if="!hardwareData[0]">
  250. <p>未绑定报警器</p>
  251. </div>
  252. </div>
  253. <div class="alarm-title-box">
  254. <p>报警记录</p>
  255. <p v-hasPermi="['chemical:hxpAlarmRecord:list']" @click="goAlarmRecord">更多>></p>
  256. </div>
  257. <el-table class="subject-alarm-time" style="margin-bottom:10px;" border :data="tableList" ref="multipleTable">
  258. <el-table-column label="报警时间" align="center" prop="alarmTime"/>
  259. <el-table-column label="处理状态" align="center" prop="operate" width="100"/>
  260. <el-table-column label="处理人" align="center" prop="handlingUserName" width="90"/>
  261. </el-table>
  262. <pagination
  263. v-show="totalTwo>0"
  264. :total="totalTwo"
  265. :page.sync="queryParamsTwo.pageNum"
  266. :limit.sync="queryParamsTwo.pageSize"
  267. @pagination="getHxpAlarmRecordNoAuthList"
  268. />
  269. </div>
  270. <div class="bottom-entrance-box" v-if="rightButtonType == 5">
  271. <p class="top-title">
  272. <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
  273. <i>{{checkedSubject.deptName}}</i>
  274. </el-tooltip>
  275. <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
  276. <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
  277. </el-tooltip>
  278. </p>
  279. <div class="entrance" :class="item.operate.code==2?'BGentrance_l_yes':'BGentrance_l_no'" v-for="(item,index) in entranceList" v-if="item.operate">
  280. <img class="entrance_c" v-if="item.operate.code==2" src="@/assets/ZDimages/icon_znmj_zx.png">
  281. <img class="entrance_c" v-if="item.operate.code!=2" src="@/assets/ZDimages/icon_znmj_lx.png">
  282. <div class="entrance_r">门禁编号:{{item.hardwareNum}}</div>
  283. <p :class="item.operate.code==2?'entrance_l_yes':'entrance_l_no'">{{item.operate.code==2?'在线':'离线'}}</p>
  284. </div>
  285. <img class="null-data-img" src="@/assets/ZDimages/null-data.png" v-if="entranceList.length<=0">
  286. <p class="null-text-p" v-if="entranceList.length<=0">暂无智能门禁信息,请在更多操作-物联设备配置中进行添加</p>
  287. </div>
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. <add-subject v-if="pageType == 2" :subjectData="subjectData"></add-subject>
  293. <device-list v-if="pageType == 3" :subjectData="subjectData"></device-list>
  294. <admission-configuration v-if="pageType == 4" :subjectData="subjectData"></admission-configuration>
  295. <association-configuration v-if="pageType == 5" :subjectData="subjectData"></association-configuration>
  296. <info-page v-if="pageType == 6" :newData="newData"></info-page>
  297. <!--播放文字窗口-->
  298. <el-dialog title="广播系统" :visible.sync="open" width="500px" append-to-body>
  299. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  300. <el-form-item label="播放文字" prop="txt">
  301. <el-input v-model="form.txt" placeholder="请输入播放文字" />
  302. </el-form-item>
  303. <el-form-item label="播报方式" prop="type">
  304. <el-radio-group v-model="form.type">
  305. <el-radio :label="1">文字</el-radio>
  306. <el-radio :label="2">音频</el-radio>
  307. </el-radio-group>
  308. </el-form-item>
  309. </el-form>
  310. <div slot="footer" class="dialog-footer">
  311. <el-button @click="cancel">取 消</el-button>
  312. <el-button type="primary" @click="submitFormOne">确 定</el-button>
  313. </div>
  314. </el-dialog>
  315. </div>
  316. </template>
  317. <script>
  318. import { controlSwitch } from "@/api/laboratory/hardware";
  319. import mqtt from 'mqtt'
  320. import flvjs from 'flv.js'
  321. import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
  322. import {
  323. authListSubject,
  324. subjectInfo,
  325. updateSubject,
  326. mangerVoice,
  327. startUrl,
  328. queryHardByTypeList, subjectTriggerModes,
  329. } from '@/api/laboratory/subject'
  330. import { listData} from "@/api/system/dict/data";
  331. import { filterDept } from "@/api/medicUniversity-3_1/index";
  332. import addSubject from "./addSubject.vue";
  333. import deviceList from "./deviceList.vue";
  334. import admissionConfiguration from "./admissionConfiguration.vue";
  335. import associationConfiguration from "./associationConfiguration.vue";
  336. import infoPage from "./infoPage.vue";
  337. import { getHxpAlarmRecordNoAuthList,getEnablelist} from "@/api/medicUniversity-3_1/index";
  338. import store from '@/store'
  339. export default {
  340. filters:{
  341. ellipsis(value){
  342. if (!value) return '';
  343. if (value.length > 6) {
  344. return value.slice(0,6) + '...'
  345. }
  346. return value
  347. }
  348. },
  349. name: "subject",
  350. components: {
  351. addSubject,
  352. deviceList,
  353. admissionConfiguration,
  354. associationConfiguration,
  355. infoPage
  356. },
  357. data(){
  358. return{
  359. pageType:1,
  360. // 遮罩层
  361. loading: true,
  362. // 显示搜索条件
  363. showSearch: true,
  364. // 总条数
  365. total: 0,
  366. // 查询参数
  367. queryParams: {
  368. pageNum: 1,
  369. pageSize:20,
  370. name: null,
  371. floorId: null,
  372. room: null,
  373. deptId: null,
  374. deptName: null,
  375. adminId: null,
  376. isDel: null,
  377. userId: null,
  378. diyOrder: null
  379. },
  380. // 实验室表格数据
  381. subjectList: [],
  382. //学院列表
  383. deptOptions:[],
  384. //当前选中实验室
  385. checkedSubject:{},
  386. //当前选中右侧按钮
  387. rightButtonType:1,
  388. //编辑实验室数据
  389. subjectData:{},
  390. // 临时保存排序
  391. sort:"",
  392. //播放文字的实验室id
  393. subId:"",
  394. open:false,
  395. form:{},
  396. //智能门禁
  397. entranceList:[
  398. {
  399. status:1,
  400. name:'门禁名称',
  401. num:'XD12345678912'
  402. },
  403. {
  404. status:0,
  405. name:'门禁名称',
  406. num:'XD12345678912'
  407. }
  408. ],
  409. rules:{
  410. txt:[
  411. {required: true, message: '请输入播放文字', trigger: 'blur'},
  412. { required: true, message: "请输入播放文字", validator: this.spaceJudgment, trigger: "blur" }
  413. ],
  414. type:[
  415. {required: true, message: '请选择播报方式', trigger: 'blur'}
  416. ],
  417. },
  418. newData:{
  419. },
  420. //MQTT请求参数-传感器
  421. mtopic:"lab/function/data",
  422. //MQTT请求参数-硬件
  423. mtopicOne:"lab/hardware/data",
  424. //MQTT请求参数-传感器-预案
  425. mtopicTow:"lab/riskPlan/trigger/notice",
  426. msg:"",
  427. client:{},
  428. videoList:[],
  429. //警报数据
  430. totalTwo:0,
  431. tableList:[],
  432. queryParamsTwo:{
  433. pageNum:1,
  434. pageSize:20,
  435. },
  436. hardwareData:[],
  437. //mqtt实验室id
  438. mqttIdList:[],
  439. //字典排风扇数组
  440. fanList:[],
  441. selectTriggerList:[],//预案触发下,预案数据存储
  442. }
  443. },
  444. created() {
  445. },
  446. mounted(){
  447. this.getDeptList();
  448. // this.subscriptionMQTT();
  449. this.getList();
  450. this.getlistData();
  451. // this.queryHardByTypeList();
  452. },
  453. methods:{
  454. tableButton(row){
  455. let self = this;
  456. this.$confirm(`是否确认操作此设备`, "提示", {
  457. confirmButtonText: "确定",
  458. cancelButtonText: "取消",
  459. type: "warning"
  460. }).then(async () => {
  461. controlSwitch({id:row.id}).then(response => {
  462. self.msgSuccess(response.msg);
  463. });
  464. }).catch(() => {
  465. })
  466. },
  467. //查询当前用户下的预案触发数据
  468. selectTriggerFun(data){
  469. let self = this;
  470. let dataArr=data;
  471. let list=JSON.parse(localStorage.getItem('selectTriggerList'));
  472. for(let i=0;i<list.length;i++){
  473. if(self.subId==list[i].subId){//如果当前选中的实验室和预案触发的实验室id
  474. for(let b=0;b<dataArr.length;b++){
  475. if(list[i].funNum==dataArr[b].funNum){
  476. if(list[i].minMonitor<dataArr[b].roundVlue<list[i].maxMonitor){//传感器值正常
  477. dataArr[b].type=1
  478. }else{//传感器值异常
  479. }
  480. }
  481. }
  482. }
  483. }
  484. return dataArr;
  485. },
  486. /** 查询字典数据列表 */
  487. getlistData() {
  488. this.loading = true;
  489. listData({pageNum:1,pageSize:20,dictType:'trigger_modes'}).then(response => {
  490. this.fanList=response.rows
  491. });
  492. },
  493. goAlarmRecord(){
  494. this.$router.push({
  495. path: `/chemicalLibrary/alarmRecord`,
  496. })
  497. },
  498. //智能门禁
  499. queryHardByTypeList(){
  500. let _this=this;
  501. let obj={
  502. subjectId:this.subId,
  503. type:'HK_DOOR',
  504. }
  505. queryHardByTypeList(obj).then( response => {
  506. let res=response.data;
  507. _this.entranceList=res;
  508. });
  509. },
  510. //报警器开启关闭方法
  511. changeIsNeedCaptchaAlarm(row){
  512. let self = this;
  513. console.log(row.status)
  514. if(row.status!=3 && row.status!=4){
  515. return
  516. }
  517. let text = row.status==3?'关闭':(row.status==4?'开启':'')
  518. this.$confirm(`是否`+text+`此设备`, "提示", {
  519. confirmButtonText: "确定",
  520. cancelButtonText: "取消",
  521. type: "warning"
  522. }).then(async () => {
  523. self.alarmControl(row)
  524. }).catch(() => {
  525. })
  526. },
  527. //开关按钮
  528. alarmControl(row){
  529. let switchData = {
  530. id:row.id,
  531. switchVal:row.status==3?'close':(row.status==4?'open':'')
  532. };
  533. alarmControl(switchData).then(response => {
  534. if(response.code==200){
  535. row.status = row.status==3?4:(row.status==4?3:'')
  536. }
  537. });
  538. },
  539. //获取实验室绑定报警器设备数据
  540. getEnablelist(){
  541. let obj = {
  542. subjectId:this.subId,
  543. type:"AI_ALARM"
  544. }
  545. getEnablelist(obj).then(response => {
  546. this.hardwareData = response.rows;
  547. });
  548. },
  549. //获取实验室报警列表数据
  550. getHxpAlarmRecordNoAuthList(){
  551. this.queryParamsTwo.subId = this.subId;
  552. getHxpAlarmRecordNoAuthList(this.queryParamsTwo).then(response => {
  553. this.totalTwo = response.total;
  554. this.tableList = response.rows;
  555. });
  556. },
  557. //播放文字
  558. handleAdd(id) {
  559. this.open = true;
  560. this.subId = id;
  561. },
  562. // 取消按钮
  563. cancel() {
  564. this.form = {};
  565. this.open = false;
  566. },
  567. /*播放文字*/
  568. submitFormOne(){
  569. this.$refs["form"].validate(valid => {
  570. if (valid) {
  571. let id = this.subId;
  572. mangerVoice(this.form,id).then(response => {
  573. this.msgSuccess("播放成功");
  574. this.open = false;
  575. this.getList();
  576. });
  577. }
  578. });
  579. },
  580. // 页面切换
  581. clickPage(type,row){
  582. if(this.pageType != type){
  583. if(type == 1){
  584. //列表页面
  585. this.pageType = type;
  586. this.getList();
  587. this.$set(this,'subjectData',{})
  588. }else if(type == 2){
  589. //新增页面
  590. this.pageType = type;
  591. }else if(type == 3){
  592. //编辑页面
  593. //this.pageType = 2;
  594. this.editFun(row);
  595. //this.$set(this,'subjectData',row)
  596. }else if(type == 4){
  597. this.pageType = 3;
  598. this.$set(this,'subjectData',row)
  599. }else if(type == 5){
  600. this.pageType = 4;
  601. this.$set(this,'subjectData',row)
  602. }else if(type == 6){
  603. this.pageType = 5;
  604. this.$set(this,'subjectData',row)
  605. }else if(type == 7){
  606. this.subjectInfoTwo(row);
  607. // this.$set(this,'subjectData',row)
  608. }
  609. }
  610. },
  611. //实验室编辑
  612. editFun(row){
  613. let self = this;
  614. let type = 0; //硬件 //0全部
  615. subjectInfo(row.id,type).then(response => {
  616. console.log(response.data)
  617. this.$set(this,'subjectData',response.data)
  618. this.pageType = 2;
  619. })
  620. },
  621. //获取实验室详情
  622. subjectInfoTwo(row){
  623. let self = this;
  624. let type = 0; //硬件 //0全部
  625. subjectInfo(row.id,type).then(response => {
  626. // console.log("获取实验室详情",response.data)
  627. this.$set(this,'newData',response.data);
  628. if(response.data.safeUserName){
  629. this.$set(this.newData,'safeUserName',response.data.safeUserName.split(','));
  630. }
  631. if(response.data.safeUserPhone){
  632. this.$set(this.newData,'safeUserPhone',response.data.safeUserPhone.split(','));
  633. }
  634. if(response.data.safeSigns){
  635. this.$set(this.newData,'safeSigns',response.data.safeSigns.split(','));
  636. }
  637. if(response.data.hazardCategory){
  638. this.$set(this.newData,'hazardCategory',response.data.hazardCategory.split(','));
  639. }
  640. if(response.data.outfire){
  641. this.$set(this.newData,'outfire',response.data.outfire.split(','));
  642. }
  643. if(response.data.riskMeasure){
  644. this.$set(this.newData,'riskMeasure',response.data.riskMeasure.split(','));
  645. }
  646. let list = [];
  647. let listTwo = [];
  648. if (response.data.labHardwareVOList){
  649. for(let i=0;i<response.data.labHardwareVOList.length;i++){
  650. if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'VIDEO_MONITOR'){
  651. list.push(response.data.labHardwareVOList[i].hardwareNUM);
  652. }
  653. // if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'SWITCH' || response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'AI_VENTILATION' || response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'ONE_MACHINE'){
  654. if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'SWITCH' || response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'AI_VENTILATION'){
  655. listTwo.push(response.data.labHardwareVOList[i])
  656. }
  657. }
  658. }
  659. this.$set(this.newData,'labHardwareVOListTwo',listTwo);
  660. if(list[0]){
  661. let obj = {
  662. count:"100",
  663. deviceIds:list.join(),
  664. page:"1",
  665. };
  666. let urlText = window.location.href;
  667. if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
  668. startUrl(obj).then(res => {
  669. if(res.code == 200){
  670. if(!res.data[0]){
  671. this.msgError("视频配置异常请联系管理员")
  672. this.newData.videoData = [];
  673. this.pageType = 6;
  674. }else{
  675. let newData = res.data;
  676. let videoList = [];
  677. for(let i=0;i<newData.length;i++){
  678. let obj = {
  679. name:response.data.name + response.data.subAddrr.room,
  680. videoType:"flv",
  681. divId:'divId'+i,
  682. url:newData[i].ws_flv,
  683. }
  684. videoList.push(obj)
  685. }
  686. this.$set(this.newData,'videoData',videoList);
  687. this.pageType = 6;
  688. }
  689. }
  690. });
  691. }else{
  692. startUrl(obj).then(res => {
  693. if(res.code == 200){
  694. if(!res.data[0]){
  695. this.msgError("视频配置异常请联系管理员")
  696. this.newData.videoData = [];
  697. this.pageType = 6;
  698. }else{
  699. let newData = res.data;
  700. let videoList = [];
  701. for(let i=0;i<newData.length;i++){
  702. let text = localStorage.getItem('cameraUrl');
  703. let url = newData[i].ws_flv;
  704. url = url.split("rtp/");
  705. let newUrl = text+'rtp/'+url[1];
  706. let obj = {
  707. name:response.data.name + response.data.subAddrr.room,
  708. videoType:"flv",
  709. divId:'divId'+i,
  710. url:newUrl,
  711. }
  712. videoList.push(obj)
  713. }
  714. this.$set(this.newData,'videoData',videoList);
  715. this.pageType = 6;
  716. }
  717. }
  718. });
  719. }
  720. }else{
  721. this.$set(this.newData,'videoData',[]);
  722. this.pageType = 6;
  723. }
  724. })
  725. },
  726. // 开启关闭验证
  727. async changeIsNeedCaptcha (row) {
  728. let self = this;
  729. console.log(row)
  730. if(row.state.code!=3 && row.state.code!=4){
  731. return
  732. }
  733. let text = row.state.code==3?'关闭':(row.state.code==4?'开启':'')
  734. this.$confirm(`是否`+text+`此设备`, "提示", {
  735. confirmButtonText: "确定",
  736. cancelButtonText: "取消",
  737. type: "warning"
  738. }).then(async () => {
  739. self.switchChange(row)
  740. }).catch(() => {
  741. })
  742. },
  743. //点击开关按钮开启的时候充电调用硬件状态
  744. subjectTriggerModes(row){
  745. let self=this;
  746. subjectTriggerModes(row.id).then(response => {
  747. if(response.code==200){
  748. for(let b=0;b<self.fanList.length;b++){
  749. if(self.fanList[b].dictValue==response.data.triggerModes){
  750. for(let i=0;i<self.checkedSubject.VOlist.length;i++){
  751. if(row.id == self.checkedSubject.VOlist[i].id){
  752. this.$set(self.checkedSubject.VOlist[i],'dictLabel',self.fanList[b].dictLabel);
  753. this.$set(self.checkedSubject.VOlist[i],'triggerModes',response.data.triggerModes);
  754. }
  755. }
  756. }
  757. }
  758. }
  759. });
  760. },
  761. //开关按钮
  762. switchChange(row){
  763. let switchData = {
  764. id:row.id,
  765. switchVal:row.state.code==3?'close':(row.state.code==4?'open':'')
  766. };
  767. hardWareControl(switchData).then(response => {
  768. if(response.code==200){
  769. this.msgSuccess("操作成功")
  770. }
  771. });
  772. },
  773. //切换实验室展示数据
  774. rightButtonClick(type){
  775. let self = this;
  776. if(this.rightButtonType != type){
  777. this.rightButtonType = type;
  778. this.videoOff();
  779. if(type == 3){
  780. let self = this;
  781. let list = [];
  782. if(self.checkedSubject.labHardwareVOList){
  783. for(let i=0;i<self.checkedSubject.labHardwareVOList.length;i++){
  784. if(self.checkedSubject.labHardwareVOList[i].hardwareTypeEnum.enumName == 'VIDEO_MONITOR'){
  785. list.push(self.checkedSubject.labHardwareVOList[i].hardwareNUM);
  786. }
  787. }
  788. if(list[0]){
  789. let obj = {
  790. count:"100",
  791. deviceIds:list+'',
  792. page:"1",
  793. };
  794. let urlText = window.location.href;
  795. if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
  796. startUrl(obj).then(res => {
  797. if(res.code == 200){
  798. if(!res.data[0]){
  799. this.msgError("视频配置异常请联系管理员")
  800. return
  801. }
  802. let newData = res.data;
  803. let videoList = [];
  804. for(let i=0;i<newData.length;i++){
  805. let obj = {
  806. name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
  807. videoType:"flv",
  808. divId:'divId'+i,
  809. url:newData[i].ws_flv,
  810. }
  811. videoList.push(obj)
  812. }
  813. this.$set(this.checkedSubject,'videoData',videoList);
  814. if(this.rightButtonType == 3){
  815. setTimeout(function(){
  816. self.videoFunction();
  817. },1000);
  818. }
  819. }
  820. });
  821. }else{
  822. startUrl(obj).then(res => {
  823. if(res.code == 200){
  824. if(!res.data[0]){
  825. this.msgError("视频配置异常请联系管理员")
  826. return
  827. }
  828. let newData = res.data;
  829. let videoList = [];
  830. for(let i=0;i<newData.length;i++){
  831. let text = localStorage.getItem('cameraUrl');
  832. let url = newData[i].ws_flv;
  833. url = url.split("rtp/");
  834. let newUrl = text+'rtp/'+url[1];
  835. let obj = {
  836. name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
  837. videoType:"flv",
  838. divId:'divId'+i,
  839. url:newUrl,
  840. }
  841. videoList.push(obj)
  842. }
  843. this.$set(this.checkedSubject,'videoData',videoList);
  844. if(this.rightButtonType == 3){
  845. setTimeout(function(){
  846. self.videoFunction();
  847. },1000);
  848. }
  849. }
  850. });
  851. }
  852. }else{
  853. this.$set(this.checkedSubject,'videoData',[]);
  854. }
  855. }else{
  856. this.$set(this.checkedSubject,'videoData',[]);
  857. }
  858. }else if(type==2){
  859. for(let i=0;i<self.checkedSubject.VOlist.length;i++){
  860. if(self.checkedSubject.VOlist[i].hardwareTypeEnum.hardwareTypeCode == '2'){
  861. for(let b=0;b<self.fanList.length;b++){
  862. if(self.fanList[b].dictValue==self.checkedSubject.VOlist[i].triggerModes){
  863. self.checkedSubject.VOlist[i].dictLabel=self.fanList[b].dictLabel
  864. }
  865. }
  866. }
  867. }
  868. }else if(type==5){
  869. this.queryHardByTypeList();
  870. }
  871. }
  872. },
  873. //选中实验室
  874. handleCurrentChange(val){
  875. let self = this;
  876. if(val.id != this.checkedSubject.id){
  877. this.videoOff();
  878. this.offMQTT();
  879. this.subjectInfo(val.id);
  880. this.subId = val.id;
  881. this.$set(this,'queryParamsTwo',{
  882. pageNum:1,
  883. pageSize:20,
  884. });
  885. this.getEnablelist();
  886. this.getHxpAlarmRecordNoAuthList();
  887. this.subscriptionMQTT();
  888. }
  889. },
  890. //获取实验室详情
  891. subjectInfo(id){
  892. let type = 1; //硬件 //0全部
  893. subjectInfo(id,type).then(response => {
  894. let obj = JSON.parse(JSON.stringify(response.data));
  895. obj.VOlist = [];
  896. if(response.data.labHardwareVOList){
  897. for(let i=0;i<response.data.labHardwareVOList.length;i++){
  898. if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'SWITCH'||
  899. response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'AI_VENTILATION'){
  900. if( response.data.labHardwareVOList[i].isPcfire == 0 ){
  901. obj.VOlist.push(response.data.labHardwareVOList[i]);
  902. }
  903. }
  904. }
  905. }
  906. //判断传感器是否在线如果不在线type为2
  907. if(response.data.sensorFunctionStatusList){
  908. obj.sensorFunctionStatusList.forEach(function(item) {
  909. if(item.formatVal.indexOf("--") != -1){
  910. item.type=2
  911. }
  912. })
  913. obj.sensorFunctionStatusList=this.selectTriggerFun(obj.sensorFunctionStatusList)
  914. }
  915. this.$set(this,'checkedSubject',obj);
  916. this.$set(this.checkedSubject,'videoData',[]);
  917. this.rightButtonType = 1;
  918. })
  919. },
  920. //编辑按钮
  921. handleCommand(command, row){
  922. switch (command) {
  923. case "1":
  924. console.log('关联配置');
  925. this.clickPage(6,row);
  926. break;
  927. case "2":
  928. console.log('物联配置');
  929. this.clickPage(4,row);
  930. break;
  931. case "3":
  932. console.log('准入配置');
  933. this.clickPage(5,row);
  934. break;
  935. case "4":
  936. console.log('编辑');
  937. this.clickPage(3,row);
  938. break;
  939. case "5":
  940. console.log('删除');
  941. break;
  942. default:
  943. break;
  944. }
  945. },
  946. //保存当前排序
  947. liveSort(row){
  948. let obj = {
  949. sort:row.diyOrder
  950. }
  951. this.sort = JSON.parse(JSON.stringify(obj));
  952. },
  953. //编辑排序
  954. editSort(row){
  955. let self = this;
  956. if(row.diyOrder != this.sort.sort){
  957. self.$confirm('是否确认修改排序?', "", {
  958. confirmButtonText: "确定",
  959. cancelButtonText: "取消",
  960. type: "warning"
  961. }).then(function() {
  962. let obj = {
  963. id:row.id,
  964. diyOrder:row.diyOrder,
  965. };
  966. updateSubject(obj).then(response => {
  967. self.msgSuccess("修改成功");
  968. self.getList();
  969. });
  970. }).then(() => {}).catch(() => {
  971. let obj = JSON.parse(JSON.stringify(self.sort));
  972. row.diyOrder = obj.sort
  973. });
  974. }
  975. },
  976. /** 搜索按钮操作 */
  977. handleQuery() {
  978. this.queryParams.pageNum = 1;
  979. this.getList();
  980. },
  981. /** 重置按钮操作 */
  982. resetQuery() {
  983. this.$set(this,'queryParams',{
  984. pageNum: 1,
  985. pageSize:20,
  986. deptId:"",
  987. name: '',
  988. });
  989. // this.resetForm("queryForm");
  990. this.handleQuery();
  991. },
  992. /** 查询实验室列表 */
  993. getList() {
  994. this.loading = true;
  995. // this.offMQTT();
  996. authListSubject(this.queryParams).then(response => {
  997. this.subjectList = response.rows;
  998. this.total = response.total;
  999. this.loading = false;
  1000. if(response.rows[0]){
  1001. this.$refs.multipleTable.setCurrentRow(response.rows[0]);
  1002. this.subjectInfo(response.rows[0].id);
  1003. }
  1004. let idList = [];
  1005. for(let i=0;i<response.rows.length;i++){
  1006. idList.push(response.rows[i].id)
  1007. }
  1008. this.$set(this,'mqttIdList',idList);
  1009. // this.subscriptionMQTT();
  1010. });
  1011. },
  1012. /** 查询学院列表 */
  1013. getDeptList() {
  1014. filterDept().then(response => {
  1015. this.$set(this, 'deptOptions', response.data)
  1016. });
  1017. },
  1018. //MQTT订阅
  1019. subscriptionMQTT(){
  1020. let self = this;
  1021. this.client = mqtt.connect(localStorage.getItem('mqttUrl'), {
  1022. username: localStorage.getItem('mqttUser'),
  1023. password:localStorage.getItem('mqttPassword')
  1024. });
  1025. this.client.on("connect", e =>{
  1026. console.log("连接成功");
  1027. this.client.subscribe(this.mtopic+self.subId, (err) => {
  1028. if (!err) {
  1029. console.log("订阅成功:" + this.mtopic+self.subId);
  1030. }
  1031. });
  1032. this.client.subscribe(this.mtopicOne+self.subId, (err) => {
  1033. if (!err) {
  1034. console.log("订阅成功:" + this.mtopicOne+self.subId);
  1035. }
  1036. });
  1037. // for(let i = 0; i< self.mqttIdList.length;i++){
  1038. // this.client.subscribe(this.mtopic+self.mqttIdList[i], (err) => {
  1039. // if (!err) {
  1040. // console.log("订阅成功:" + this.mtopic+self.mqttIdList[i]);
  1041. // }
  1042. // });
  1043. // this.client.subscribe(this.mtopicOne+self.mqttIdList[i], (err) => {
  1044. // if (!err) {
  1045. // console.log("订阅成功:" + this.mtopicOne+self.mqttIdList[i]);
  1046. // }
  1047. // });
  1048. // }
  1049. });
  1050. this.client.on("message", (topic, message) => {
  1051. // console.log('message',message)
  1052. if (message){
  1053. let data = JSON.parse(message)
  1054. //console.log("MQTT----message",data)
  1055. if(data.data.subId){
  1056. //传感器
  1057. // console.log("传感器",data.data.subId,'---------',data);
  1058. if(self.checkedSubject.id){
  1059. if(data.data.subId&&data.data.subId == self.checkedSubject.id){
  1060. self.$set(self.checkedSubject,'sensorFunctionStatusList',data.data.functionStatuses);
  1061. self.$set(self.checkedSubject.sensorFunctionStatusList[0],'sendDate',data.sendDate);
  1062. //判断传感器是否在线如果不在线type为2
  1063. self.checkedSubject.sensorFunctionStatusList.forEach(function(item) {
  1064. if(item.formatVal.indexOf("--") != -1){
  1065. item.type=2
  1066. }
  1067. })
  1068. self.checkedSubject.sensorFunctionStatusList=self.selectTriggerFun(self.checkedSubject.sensorFunctionStatusList)
  1069. }
  1070. }
  1071. if(self.newData.id){
  1072. if(data.data.subId&&data.data.subId == self.newData.id){
  1073. self.$set(self.newData,'sensorFunctionStatusList',data.data.functionStatuses);
  1074. self.$set(self.newData.sensorFunctionStatusList[0],'sendDate',data.sendDate);
  1075. }
  1076. }
  1077. }else{
  1078. //硬件
  1079. console.log("硬件",data);
  1080. for (let i = 0; i < data.data.length; i++) {
  1081. if (self.checkedSubject.VOlist) {
  1082. for (let k = 0; k < self.checkedSubject.VOlist.length; k++) {
  1083. if (self.checkedSubject.VOlist[k].id == data.data[i].num) {
  1084. if (data.data[i].hardwareOperate == 'CLOSE') {
  1085. self.checkedSubject.VOlist[k].state.code = 4;
  1086. } else if (data.data[i].hardwareOperate == 'OPEN') {
  1087. self.checkedSubject.VOlist[k].state.code = 3;
  1088. } else if (data.data[i].hardwareOperate == 'OFFLINE') {
  1089. self.checkedSubject.VOlist[k].state.code = 0;
  1090. }
  1091. if(self.checkedSubject.VOlist[k].hardwareTypeEnum.hardwareTypeCode == '2'&&
  1092. self.checkedSubject.VOlist[k].pcType == '0'){
  1093. self.subjectTriggerModes(self.checkedSubject.VOlist[k])
  1094. }
  1095. }
  1096. }
  1097. }
  1098. if(self.newData.labHardwareVOList){
  1099. for(let k=0;k<self.newData.labHardwareVOList.length;k++){
  1100. if(self.newData.labHardwareVOList[k].id == data.data[i].num){
  1101. if(data.data[i].hardwareOperate == 'CLOSE'){
  1102. self.newData.labHardwareVOList[k].state.code = 4;
  1103. }else if(data.data[i].hardwareOperate == 'OPEN'){
  1104. self.newData.labHardwareVOList[k].state.code = 3;
  1105. }else if(data.data[i].hardwareOperate == 'OFFLINE'){
  1106. self.newData.labHardwareVOList[k].state.code = 0;
  1107. }
  1108. }
  1109. }
  1110. }
  1111. }
  1112. }
  1113. }
  1114. });
  1115. },
  1116. //取消订阅关闭MQTT连接
  1117. offMQTT(){
  1118. let self = this;
  1119. if (self.mqttIdList[0]){
  1120. // for(let i=0;i<self.mqttIdList.length;i++){
  1121. // self.client.unsubscribe(self.mtopic+self.mqttIdList[i], error => {
  1122. // if (error) {
  1123. // console.log('Unsubscribe error', error)
  1124. // }
  1125. // })
  1126. // self.client.unsubscribe(self.mtopicOne+self.mqttIdList[i], error => {
  1127. // if (error) {
  1128. // console.log('Unsubscribe error', error)
  1129. // }
  1130. // })
  1131. // }
  1132. self.client.unsubscribe(self.mtopic+self.subId, error => {
  1133. if (error) {
  1134. console.log('Unsubscribe error', error)
  1135. }
  1136. })
  1137. self.client.unsubscribe(self.mtopicOne+self.subId, error => {
  1138. if (error) {
  1139. console.log('Unsubscribe error', error)
  1140. }
  1141. })
  1142. self.client.end();
  1143. self.client = {};
  1144. }
  1145. },
  1146. //视频方法
  1147. videoFunction(){
  1148. let self = this;
  1149. // self.videoList = [];
  1150. for(let i=0;i<self.checkedSubject.videoData.length;i++){
  1151. let obj = {
  1152. player :{},
  1153. flvPlayer:{}
  1154. };
  1155. obj.player = document.getElementById(self.checkedSubject.videoData[i].divId);
  1156. // if (flvjs.isSupported()) {
  1157. obj.flvPlayer = flvjs.createPlayer(
  1158. {
  1159. // isLive: true, //=> 是否为直播流
  1160. // hasAudio: false, //=> 是否开启声音
  1161. type: self.checkedSubject.videoData[i].videoType, //媒体类型 flv 或 mp4
  1162. url: self.checkedSubject.videoData[i].url //视频流地址
  1163. },
  1164. {
  1165. enableStashBuffer: true,//启用 IO 存储缓冲区。 如果您需要实时流播放(最小延迟),请设置为 false,但如果存在网络抖动,则可能会停止。
  1166. stashInitialSize: 128,//IO 存储缓冲区初始大小。 默认值为 384KB。 指示合适的大小可以改善视频加载/搜索时间。
  1167. isLive: true,//是否是直播
  1168. lazyLoadRecoverDuration: 30,//指示以秒为单位的lazyLoad 恢复时间边界。
  1169. autoCleanupSourceBuffer: true,//进行自动清理
  1170. autoCleanupMaxBackwardDuration: 3 * 60,//3 * 60 当向后缓冲持续时间超过这个值(以秒为单位)时,对 SourceBuffer 进行自动清理
  1171. autoCleanupMinBackwardDuration: 2 * 60,//2 * 60 指示在执行自动清理时为后向缓冲区保留的持续时间(以秒为单位)。
  1172. }
  1173. );
  1174. self.videoList.push(obj);
  1175. // }
  1176. console.log("i",i)
  1177. }
  1178. for(let i=0;i<self.videoList.length;i++){
  1179. self.videoList[i].flvPlayer.attachMediaElement(self.videoList[i].player);
  1180. self.videoList[i].flvPlayer.load(); //加载
  1181. self.videoList[i].flvPlayer.play(); //加载
  1182. }
  1183. },
  1184. //视屏全屏方法
  1185. videoFullScreen(index){
  1186. this.$refs.videoRef[index].webkitRequestFullScreen();
  1187. },
  1188. //断开视频流
  1189. videoOff(){
  1190. let self = this;
  1191. if(self.videoList[0]){
  1192. for(let i=0;i<self.videoList.length;i++){
  1193. self.videoList[i].flvPlayer.pause();
  1194. self.videoList[i].flvPlayer.unload();
  1195. self.videoList[i].flvPlayer.detachMediaElement();
  1196. self.videoList[i].flvPlayer.destroy();
  1197. self.videoList[i].flvPlayer = null;
  1198. }
  1199. self.videoList = [];
  1200. }
  1201. },
  1202. },
  1203. beforeDestroy() {
  1204. //清除定时器
  1205. let self = this;
  1206. self.videoOff();
  1207. self.offMQTT();
  1208. },
  1209. }
  1210. </script>
  1211. <style scoped lang="scss">
  1212. .subject{
  1213. flex:1;
  1214. display: flex!important;
  1215. flex-direction: column;
  1216. overflow: hidden;
  1217. *{
  1218. margin:0;
  1219. }
  1220. .subject-page{
  1221. flex:1;
  1222. display: flex;
  1223. flex-direction: column;
  1224. overflow: hidden;
  1225. border-radius:10px;
  1226. margin:5px 0 0 0;
  1227. //box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1);
  1228. .subject-page-min{
  1229. flex:1;
  1230. display: flex;
  1231. overflow: hidden;
  1232. padding: 2px 0 10px 10px;
  1233. box-sizing: border-box;
  1234. }
  1235. .left-subject-list{
  1236. /*flex:1;*/
  1237. width:1143px;
  1238. display: flex;
  1239. flex-direction: column;
  1240. margin-right:6px;
  1241. overflow: hidden ;
  1242. box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.2);
  1243. border-radius: 20px 20px 20px 20px;
  1244. padding-top: 24px;
  1245. margin-bottom:10px;
  1246. .table_border{
  1247. flex:1;
  1248. display: flex;
  1249. flex-direction: column;
  1250. padding: 20px 20px 10px;
  1251. box-sizing: border-box;
  1252. overflow: hidden;
  1253. }
  1254. }
  1255. .overflow-box{
  1256. overflow: hidden;
  1257. }
  1258. .right-subject-box{
  1259. /*width:440px;*/
  1260. flex:1;
  1261. display: flex;
  1262. flex-direction: column;
  1263. .top-button-box{
  1264. display: flex;
  1265. margin-left:6px;
  1266. div{
  1267. padding:0 10px;
  1268. height:40px;
  1269. line-height:40px;
  1270. font-size:14px;
  1271. text-align: center;
  1272. border-top-right-radius: 10px;
  1273. border-top-left-radius: 10px;
  1274. margin-right:1px;
  1275. cursor: pointer;
  1276. font-weight: 500;
  1277. }
  1278. .buttonColorA{
  1279. color:#0045AF;
  1280. background:#fff ;
  1281. border: 1px solid #E0E0E0;
  1282. border-bottom: 1px solid rgba(224,224,224,0.3);
  1283. }
  1284. .buttonColorB{
  1285. color:#333;
  1286. background:#E0E0E0 ;
  1287. border: 1px solid #E0E0E0;
  1288. border-bottom:none;
  1289. }
  1290. }
  1291. .bottom-max-box{
  1292. width:428px;
  1293. box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.2);
  1294. border-radius: 0px 0px 20px 20px;
  1295. font-weight:500;
  1296. flex:1;
  1297. display: flex;
  1298. flex-direction: column;
  1299. margin-left:6px;
  1300. overflow: hidden;
  1301. margin-bottom:10px;
  1302. .bottom-sensor-box{
  1303. overflow: hidden;
  1304. display: flex;
  1305. flex-direction: column;
  1306. background: #fff;
  1307. width:424px;
  1308. flex:1;
  1309. position: relative;
  1310. // border: 1px solid #E0E0E0;
  1311. //border-radius: 0 10px 10px 10px;
  1312. .top-title{
  1313. margin:16px 26px;
  1314. display: flex;
  1315. justify-content: space-between;
  1316. >i{
  1317. font-style: normal;
  1318. line-height:18px;
  1319. font-size:16px;
  1320. color: #333;
  1321. overflow:hidden;
  1322. white-space: nowrap;
  1323. text-overflow: ellipsis;
  1324. }
  1325. }
  1326. .null-text-p{
  1327. text-align: center;
  1328. font-size:16px;
  1329. color:#999;
  1330. line-height:50px;
  1331. margin:0 30px;
  1332. }
  1333. .sensor-for-max-box{
  1334. .sensor-for-big-box{
  1335. display: inline-block;
  1336. width:180px;
  1337. height:60px;
  1338. margin:0 0 11px 22px;
  1339. border-radius: 10px;
  1340. .sensor-for-min-box{
  1341. display: flex;
  1342. img{
  1343. width:26px;
  1344. height:26px;
  1345. margin:17px 11px;
  1346. }
  1347. div{
  1348. margin:9px 0;
  1349. p{
  1350. color:#fff;
  1351. }
  1352. p:nth-child(1){
  1353. font-size:14px;
  1354. line-height:20px;
  1355. }
  1356. p:nth-child(2){
  1357. font-size:16px;
  1358. line-height:22px;
  1359. }
  1360. }
  1361. }
  1362. }
  1363. .sensor-color-a{
  1364. background: #FF7272;
  1365. color:#fff;
  1366. }
  1367. .sensor-color-b{
  1368. background: #E0E0E0;
  1369. color:#999999;
  1370. }
  1371. .sensor-color-c{
  1372. background: #80D164;
  1373. color:#fff;
  1374. }
  1375. }
  1376. .bottom-text{
  1377. line-height:18px;
  1378. font-size:14px;
  1379. color:#999999;
  1380. margin:0 0px 0px 26px;
  1381. position: absolute;
  1382. bottom: 22px;
  1383. }
  1384. }
  1385. .bottom-switch-box{
  1386. overflow: hidden;
  1387. display: flex;
  1388. flex-direction: column;
  1389. background: #fff;
  1390. width:424px;
  1391. flex: 1;
  1392. .top-title{
  1393. margin:16px 26px;
  1394. display: flex;
  1395. justify-content: space-between;
  1396. >i{
  1397. font-style: normal;
  1398. line-height:18px;
  1399. font-size:16px;
  1400. color: #333;
  1401. overflow:hidden;
  1402. white-space: nowrap;
  1403. text-overflow: ellipsis;
  1404. }
  1405. }
  1406. .null-text-p{
  1407. text-align: center;
  1408. font-size:16px;
  1409. color:#999;
  1410. line-height:50px;
  1411. margin:0 30px;
  1412. }
  1413. .switch-for-max-box{
  1414. width: 424px;
  1415. display: flex;
  1416. justify-content: flex-start;
  1417. flex-wrap: wrap;
  1418. .switch-for-big-box{
  1419. .switch-for-min-box{
  1420. width:180px;
  1421. height:70px;
  1422. margin:0 0 14px 20px;
  1423. background: rgba(1,131,250,0.1);
  1424. border-radius: 10px 10px 10px 10px;
  1425. padding: 10px;
  1426. box-sizing: border-box;
  1427. .switch-for-min-box_t{
  1428. width: 100%;
  1429. display: flex;
  1430. justify-content: space-between;
  1431. .switch-for-min-title{
  1432. font-size:14px;
  1433. line-height:24px;
  1434. width: 84px;
  1435. color: #333333;
  1436. display:block;
  1437. overflow:hidden;
  1438. text-overflow:ellipsis;
  1439. white-space:nowrap;
  1440. }
  1441. .switch-null-p{
  1442. font-size:14px;
  1443. line-height:24px;
  1444. color:#999;
  1445. }
  1446. .switch-pc-type-p{
  1447. font-size:14px;
  1448. line-height:24px;
  1449. color:#0183fa;
  1450. cursor: pointer;
  1451. }
  1452. }
  1453. .switch-for-min-box_b{
  1454. margin-top: 10px;
  1455. .switch-null-ventilate{
  1456. width: 62px;
  1457. height: 18px;
  1458. border-radius: 10px 10px 10px 10px;
  1459. opacity: 1;
  1460. border: 1px solid #0183FA;
  1461. font-size: 12px;
  1462. font-weight: 400;
  1463. color: #0183FA;
  1464. line-height: 15px;
  1465. text-align: center;
  1466. float: left;
  1467. }
  1468. .switch{
  1469. float: right;
  1470. }
  1471. }
  1472. .switch-for-min-button{
  1473. width:70px;
  1474. height:30px;
  1475. line-height:30px;
  1476. font-size:14px;
  1477. color:#0045AF;
  1478. border-radius:6px;
  1479. border: 1px solid #0045AF;
  1480. margin-top:14px;
  1481. text-align: center;
  1482. cursor: pointer;
  1483. }
  1484. }
  1485. }
  1486. }
  1487. }
  1488. .bottom-video-box{
  1489. overflow: hidden;
  1490. display: flex;
  1491. flex-direction: column;
  1492. background: #fff;
  1493. width:424px;
  1494. border-radius: 0 10px 10px 10px;
  1495. flex: 1;
  1496. .top-title{
  1497. margin:16px 26px;
  1498. display: flex;
  1499. justify-content: space-between;
  1500. >i{
  1501. font-style: normal;
  1502. line-height:18px;
  1503. font-size:16px;
  1504. color: #333;
  1505. overflow:hidden;
  1506. white-space: nowrap;
  1507. text-overflow: ellipsis;
  1508. }
  1509. }
  1510. .null-text-p{
  1511. text-align: center;
  1512. font-size:16px;
  1513. color:#999;
  1514. line-height:50px;
  1515. margin:0 30px;
  1516. }
  1517. .video-for-max-box{
  1518. .switch-for-big-box{
  1519. width:374px;
  1520. height:262px;
  1521. margin:0 auto 14px;
  1522. position: relative;
  1523. .position-p{
  1524. width:42px;
  1525. height:42px;
  1526. text-align: center;
  1527. line-height:42px;
  1528. font-size:18px;
  1529. position: absolute;
  1530. top:0;
  1531. right:0;
  1532. color:#fff;
  1533. cursor: pointer;
  1534. }
  1535. }
  1536. }
  1537. }
  1538. .bottom-alarm-box{
  1539. flex:1;
  1540. display: flex;
  1541. flex-direction: column;
  1542. background: #fff;
  1543. width:424px;
  1544. overflow-x: hidden;
  1545. padding: 0 27px 0 23px;
  1546. box-sizing: border-box;
  1547. .top-title{
  1548. margin:16px 0px;
  1549. display: flex;
  1550. justify-content: space-between;
  1551. >i{
  1552. font-style: normal;
  1553. line-height:18px;
  1554. font-size:16px;
  1555. color: #333;
  1556. overflow:hidden;
  1557. white-space: nowrap;
  1558. text-overflow: ellipsis;
  1559. }
  1560. }
  1561. .alarm-max-box{
  1562. width:374px;
  1563. height:60px;
  1564. display: flex;
  1565. position:relative;
  1566. background: #f5f5f5;
  1567. border-radius: 10px 10px 10px 10px;
  1568. margin: 10px 0 0 0;
  1569. .alarm-img{
  1570. width:30px;
  1571. height:30px;
  1572. margin:14px;
  1573. }
  1574. .alarm-big-box{
  1575. p:nth-of-type(1){
  1576. position:absolute;
  1577. top:18px;
  1578. left:64px;
  1579. font-size: 14px;
  1580. font-weight: 400;
  1581. color: #333333;
  1582. }
  1583. .alarm-position-box{
  1584. position:absolute;
  1585. top:8px;
  1586. left:260px;
  1587. }
  1588. p:nth-of-type(2){
  1589. position:absolute;
  1590. top:0px;
  1591. right:0px;
  1592. width: 50px;
  1593. height: 20px;
  1594. font-size:12px;
  1595. font-weight:700;
  1596. line-height:20px;
  1597. border-radius: 0px 10px 0px 10px;
  1598. text-align: center;
  1599. }
  1600. .colorTypeA{
  1601. background: rgba(1,131,250,0.2);
  1602. color:#0183FA;
  1603. }
  1604. .colorTypeB{
  1605. background: #ECECEC;
  1606. color:#A2A2A2;
  1607. }
  1608. }
  1609. }
  1610. .BGcolorTypeA{
  1611. width:374px;
  1612. height:60px;
  1613. display: flex;
  1614. position:relative;
  1615. background: rgba(1,131,250,0.1);
  1616. border-radius: 10px 10px 10px 10px;
  1617. margin: 10px 0 0 0;
  1618. }
  1619. .BGcolorTypeB{
  1620. width:374px;
  1621. height:60px;
  1622. display: flex;
  1623. position:relative;
  1624. background: #F5F5F5;
  1625. border-radius: 10px 10px 10px 10px;
  1626. margin: 10px 0 0 0;
  1627. }
  1628. .alarm-title-box{
  1629. display: flex;
  1630. p{
  1631. line-height:60px;
  1632. font-size:14px;
  1633. }
  1634. p:nth-child(1){
  1635. flex:1;
  1636. }
  1637. p:nth-child(2){
  1638. cursor: pointer;
  1639. }
  1640. }
  1641. }
  1642. /*智能门禁*/
  1643. .bottom-entrance-box{
  1644. flex: 1;
  1645. background: #fff;
  1646. width:424px;
  1647. border-radius: 0 10px 10px 10px;
  1648. .top-title{
  1649. margin:16px 26px;
  1650. display: flex;
  1651. justify-content: space-between;
  1652. >i{
  1653. font-style: normal;
  1654. line-height:18px;
  1655. font-size:16px;
  1656. color: #333;
  1657. overflow:hidden;
  1658. white-space: nowrap;
  1659. text-overflow: ellipsis;
  1660. }
  1661. }
  1662. .entrance{
  1663. width: 374px;
  1664. height: 60px;
  1665. display: flex;
  1666. justify-content: flex-start;
  1667. border-radius: 10px 10px 10px 10px;
  1668. margin: 10px 0 0 26px;
  1669. position: relative;
  1670. .entrance_c{
  1671. width: 30px;
  1672. height: 30px;
  1673. margin: 14px 20px 0px 14px;
  1674. }
  1675. .entrance_r{
  1676. font-size: 14px;
  1677. font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  1678. font-weight: 400;
  1679. color: #333333;
  1680. line-height: 60px;
  1681. }
  1682. .entrance_l_yes{
  1683. width: 60px;
  1684. height: 30px;
  1685. background: #0183FA;
  1686. border-radius: 0px 10px 0px 10px;
  1687. font-size: 14px;
  1688. font-weight: 400;
  1689. color: #fff;
  1690. line-height: 30px;
  1691. text-align: center;
  1692. position: absolute;
  1693. top: 0;
  1694. right: 0;
  1695. }
  1696. .entrance_l_no{
  1697. width: 60px;
  1698. height: 30px;
  1699. background: #A2A2A2;
  1700. border-radius: 0px 10px 0px 10px;
  1701. font-size: 14px;
  1702. font-weight: 400;
  1703. color: #fff;
  1704. line-height: 30px;
  1705. text-align: center;
  1706. position: absolute;
  1707. top: 0;
  1708. right: 0;
  1709. }
  1710. }
  1711. .BGentrance_l_yes{
  1712. background: rgba(1,131,250,0.1);
  1713. }
  1714. .BGentrance_l_no{
  1715. background: #F5F5F5;
  1716. }
  1717. }
  1718. .null-data-img{
  1719. width:137px;
  1720. height:137px;
  1721. display: block;
  1722. margin:10px auto;
  1723. }
  1724. .null-text-p{
  1725. text-align: center;
  1726. font-size:16px;
  1727. color:#999;
  1728. line-height:50px;
  1729. margin:0 30px;
  1730. }
  1731. }
  1732. }
  1733. }
  1734. }
  1735. </style>
  1736. <style lang="scss">
  1737. .alarm-position-box{
  1738. .switch .el-switch__label {
  1739. position: absolute;
  1740. display: none;
  1741. color: #fff !important;
  1742. }
  1743. .switch .el-switch__label--right {
  1744. z-index: 1;
  1745. }
  1746. .switch .el-switch__label--right span{
  1747. margin-right: 9px;
  1748. }
  1749. .switch .el-switch__label--left {
  1750. z-index: 1;
  1751. }
  1752. .switch .el-switch__label--left span{
  1753. margin-left: 9px;
  1754. }
  1755. .switch .el-switch__label.is-active {
  1756. display: block;
  1757. }
  1758. .switch.el-switch .el-switch__core{
  1759. background-color: rgba(255,196,124)!important;
  1760. border-color: rgba(255,196,124)!important;
  1761. }
  1762. .switch.el-switch .el-switch__core,
  1763. .el-switch .el-switch__label {
  1764. width: 68px !important;
  1765. height:20px!important;
  1766. line-height:30px!important;
  1767. -webkit-border-radius: 20px!important;
  1768. -moz-border-radius: 20px!important;
  1769. border-radius: 20px!important;
  1770. margin: 0;
  1771. position: absolute;
  1772. top: 0;
  1773. }
  1774. .switch .el-switch__label--left span{
  1775. margin-left:22px!important;
  1776. font-size: 12px;
  1777. color: #fff;
  1778. line-height: 20px;
  1779. position: relative;
  1780. top: -5px;
  1781. }
  1782. .switch .el-switch__label--right span{
  1783. margin-left:5px!important;
  1784. font-size: 12px;
  1785. position: relative;
  1786. top: -5px;
  1787. }
  1788. .el-switch__core:after{
  1789. background: #FA8A01 !important;
  1790. height:16px!important;
  1791. width:16px!important;
  1792. top:1px!important;
  1793. }
  1794. .el-switch.is-checked .el-switch__core::after{
  1795. margin-left: -20px!important;
  1796. }
  1797. .el-switch{
  1798. margin:10px auto 0;
  1799. display: block;
  1800. width:80px!important;
  1801. height:4px!important;
  1802. }
  1803. }
  1804. .subject-alarm-time{
  1805. .el-table__empty-text{
  1806. background-size: 45%;
  1807. }
  1808. }
  1809. </style>