index.vue 77 KB

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