index.vue 67 KB

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