index.vue 77 KB

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