index.vue 78 KB

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