indexjinan.vue 53 KB

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