index.vue 77 KB

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