index.vue 77 KB

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