index.vue 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145
  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, subjectTriggerModes,
  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. // console.log("获取实验室详情",response.data)
  729. this.$set(this,'newData',response.data);
  730. if(response.data.safeUserName){
  731. this.$set(this.newData,'safeUserName',response.data.safeUserName.split(','));
  732. }
  733. if(response.data.safeUserPhone){
  734. this.$set(this.newData,'safeUserPhone',response.data.safeUserPhone.split(','));
  735. }
  736. if(response.data.safeSigns){
  737. this.$set(this.newData,'safeSigns',response.data.safeSigns.split(','));
  738. }
  739. if(response.data.hazardCategory){
  740. this.$set(this.newData,'hazardCategory',response.data.hazardCategory.split(','));
  741. }
  742. if(response.data.outfire){
  743. this.$set(this.newData,'outfire',response.data.outfire.split(','));
  744. }
  745. if(response.data.riskMeasure){
  746. this.$set(this.newData,'riskMeasure',response.data.riskMeasure.split(','));
  747. }
  748. let list = [];
  749. let listTwo = [];
  750. if (response.data.labHardwareVOList){
  751. for(let i=0;i<response.data.labHardwareVOList.length;i++){
  752. if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'VIDEO_MONITOR'){
  753. list.push(response.data.labHardwareVOList[i].hardwareNUM);
  754. }
  755. // if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'SWITCH' || response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'AI_VENTILATION' || response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'ONE_MACHINE'){
  756. if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'SWITCH' || response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'AI_VENTILATION'){
  757. listTwo.push(response.data.labHardwareVOList[i])
  758. }
  759. }
  760. }
  761. this.$set(this.newData,'labHardwareVOListTwo',listTwo);
  762. if(this.versionField() == 'xiBeiNongLinDaXue'){
  763. this.$set(this.newData,'videoData',[]);
  764. this.pageType = 6;
  765. return
  766. }
  767. if(list[0]){
  768. let obj = {
  769. count:"100",
  770. deviceIds:list.join(),
  771. page:"1",
  772. };
  773. let urlText = window.location.href;
  774. if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
  775. startUrl(obj).then(res => {
  776. if(res.code == 200){
  777. if(!res.data[0]){
  778. this.msgError("视频配置异常请联系管理员")
  779. this.newData.videoData = [];
  780. this.pageType = 6;
  781. }else{
  782. let newData = res.data;
  783. let videoList = [];
  784. for(let i=0;i<newData.length;i++){
  785. let obj = {
  786. name:response.data.name + response.data.subAddrr.room,
  787. videoType:"flv",
  788. divId:'divId'+i,
  789. url:newData[i].ws_flv,
  790. }
  791. videoList.push(obj)
  792. }
  793. this.$set(this.newData,'videoData',videoList);
  794. this.pageType = 6;
  795. }
  796. }
  797. });
  798. }else{
  799. startUrl(obj).then(res => {
  800. if(res.code == 200){
  801. if(!res.data[0]){
  802. this.msgError("视频配置异常请联系管理员")
  803. this.newData.videoData = [];
  804. this.pageType = 6;
  805. }else{
  806. let newData = res.data;
  807. let videoList = [];
  808. for(let i=0;i<newData.length;i++){
  809. let text = localStorage.getItem('cameraUrl');
  810. let url = newData[i].ws_flv;
  811. url = url.split("rtp/");
  812. let newUrl = text+'rtp/'+url[1];
  813. let obj = {
  814. name:response.data.name + response.data.subAddrr.room,
  815. videoType:"flv",
  816. divId:'divId'+i,
  817. url:newUrl,
  818. }
  819. videoList.push(obj)
  820. }
  821. this.$set(this.newData,'videoData',videoList);
  822. this.pageType = 6;
  823. }
  824. }
  825. });
  826. }
  827. }else{
  828. this.$set(this.newData,'videoData',[]);
  829. this.pageType = 6;
  830. }
  831. })
  832. },
  833. // 开启关闭验证
  834. async changeIsNeedCaptcha (row) {
  835. let self = this;
  836. console.log(row)
  837. if(row.state.code!=3 && row.state.code!=4){
  838. return
  839. }
  840. let text = row.state.code==3?'关闭':(row.state.code==4?'开启':'')
  841. this.$confirm(`是否`+text+`此设备`, "提示", {
  842. confirmButtonText: "确定",
  843. cancelButtonText: "取消",
  844. type: "warning"
  845. }).then(async () => {
  846. self.switchChange(row)
  847. }).catch(() => {
  848. })
  849. },
  850. //点击开关按钮开启的时候充电调用硬件状态
  851. subjectTriggerModes(row){
  852. let self=this;
  853. subjectTriggerModes(row.id).then(response => {
  854. if(response.code==200){
  855. for(let b=0;b<self.fanList.length;b++){
  856. if(self.fanList[b].dictValue==response.data.triggerModes){
  857. for(let i=0;i<self.checkedSubject.VOlist.length;i++){
  858. if(row.id == self.checkedSubject.VOlist[i].id){
  859. this.$set(self.checkedSubject.VOlist[i],'dictLabel',self.fanList[b].dictLabel);
  860. this.$set(self.checkedSubject.VOlist[i],'triggerModes',response.data.triggerModes);
  861. }
  862. }
  863. }
  864. }
  865. }
  866. });
  867. },
  868. //开关按钮
  869. switchChange(row){
  870. let switchData = {
  871. id:row.id,
  872. switchVal:row.state.code==3?'close':(row.state.code==4?'open':'')
  873. };
  874. hardWareControl(switchData).then(response => {
  875. if(response.code==200){
  876. this.msgSuccess("操作成功")
  877. }
  878. });
  879. },
  880. //切换实验室展示数据
  881. rightButtonClick(type){
  882. let self = this;
  883. if(this.rightButtonType != type){
  884. this.rightButtonType = type;
  885. this.videoOff();
  886. if(type == 3){
  887. let self = this;
  888. let list = [];
  889. if(self.checkedSubject.labHardwareVOList){
  890. for(let i=0;i<self.checkedSubject.labHardwareVOList.length;i++){
  891. if(self.checkedSubject.labHardwareVOList[i].hardwareTypeEnum.enumName == 'VIDEO_MONITOR'){
  892. list.push(self.checkedSubject.labHardwareVOList[i].hardwareNUM);
  893. }
  894. }
  895. if(list[0]){
  896. let obj = {
  897. count:"100",
  898. deviceIds:list+'',
  899. page:"1",
  900. };
  901. let urlText = window.location.href;
  902. if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
  903. startUrl(obj).then(res => {
  904. if(res.code == 200){
  905. if(!res.data[0]){
  906. this.msgError("视频配置异常请联系管理员")
  907. return
  908. }
  909. let newData = res.data;
  910. let videoList = [];
  911. for(let i=0;i<newData.length;i++){
  912. let obj = {
  913. name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
  914. videoType:"flv",
  915. divId:'divId'+i,
  916. url:newData[i].ws_flv,
  917. }
  918. videoList.push(obj)
  919. }
  920. this.$set(this.checkedSubject,'videoData',videoList);
  921. if(this.rightButtonType == 3){
  922. setTimeout(function(){
  923. self.videoFunction();
  924. },1000);
  925. }
  926. }
  927. });
  928. }else{
  929. startUrl(obj).then(res => {
  930. if(res.code == 200){
  931. if(!res.data[0]){
  932. this.msgError("视频配置异常请联系管理员")
  933. return
  934. }
  935. let newData = res.data;
  936. let videoList = [];
  937. for(let i=0;i<newData.length;i++){
  938. let text = localStorage.getItem('cameraUrl');
  939. let url = newData[i].ws_flv;
  940. url = url.split("rtp/");
  941. let newUrl = text+'rtp/'+url[1];
  942. let obj = {
  943. name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
  944. videoType:"flv",
  945. divId:'divId'+i,
  946. url:newUrl,
  947. }
  948. videoList.push(obj)
  949. }
  950. this.$set(this.checkedSubject,'videoData',videoList);
  951. if(this.rightButtonType == 3){
  952. setTimeout(function(){
  953. self.videoFunction();
  954. },1000);
  955. }
  956. }
  957. });
  958. }
  959. }else{
  960. this.$set(this.checkedSubject,'videoData',[]);
  961. }
  962. }else{
  963. this.$set(this.checkedSubject,'videoData',[]);
  964. }
  965. }else if(type==2){
  966. for(let i=0;i<self.checkedSubject.VOlist.length;i++){
  967. if(self.checkedSubject.VOlist[i].hardwareTypeEnum.hardwareTypeCode == '2'){
  968. for(let b=0;b<self.fanList.length;b++){
  969. if(self.fanList[b].dictValue==self.checkedSubject.VOlist[i].triggerModes){
  970. self.checkedSubject.VOlist[i].dictLabel=self.fanList[b].dictLabel
  971. }
  972. }
  973. }
  974. }
  975. }else if(type==5){
  976. this.queryHardByTypeList();
  977. }
  978. }
  979. },
  980. //选中实验室
  981. handleCurrentChange(val){
  982. let self = this;
  983. if(this.versionField() == 'xiBeiNongLinDaXue'){
  984. return
  985. }
  986. if(val.id != this.checkedSubject.id){
  987. this.videoOff();
  988. this.offMQTT();
  989. this.subjectInfo(val.id);
  990. this.subId = val.id;
  991. this.$set(this,'queryParamsTwo',{
  992. pageNum:1,
  993. pageSize:20,
  994. });
  995. this.getEnablelist();
  996. this.getHxpAlarmRecordNoAuthList();
  997. this.subscriptionMQTT();
  998. }
  999. },
  1000. //获取实验室详情
  1001. subjectInfo(id){
  1002. let type = 1; //硬件 //0全部
  1003. subjectInfo(id,type).then(response => {
  1004. let obj = JSON.parse(JSON.stringify(response.data));
  1005. obj.VOlist = [];
  1006. if(response.data.labHardwareVOList){
  1007. for(let i=0;i<response.data.labHardwareVOList.length;i++){
  1008. if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'SWITCH'||
  1009. response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'AI_VENTILATION'){
  1010. if( response.data.labHardwareVOList[i].isPcfire == 0 ){
  1011. obj.VOlist.push(response.data.labHardwareVOList[i]);
  1012. }
  1013. }
  1014. }
  1015. }
  1016. //判断传感器是否在线如果不在线type为2
  1017. if(response.data.sensorFunctionStatusList){
  1018. obj.sensorFunctionStatusList.forEach(function(item) {
  1019. if(item.formatVal.indexOf("--") != -1){
  1020. item.type=2
  1021. }
  1022. })
  1023. obj.sensorFunctionStatusList=this.selectTriggerFun(obj.sensorFunctionStatusList)
  1024. }
  1025. this.$set(this,'checkedSubject',obj);
  1026. this.$set(this.checkedSubject,'videoData',[]);
  1027. this.rightButtonType = 1;
  1028. })
  1029. },
  1030. //编辑按钮
  1031. handleCommand(command, row){
  1032. switch (command) {
  1033. case "1":
  1034. console.log('关联配置');
  1035. this.clickPage(6,row);
  1036. break;
  1037. case "2":
  1038. console.log('物联配置');
  1039. this.clickPage(4,row);
  1040. break;
  1041. case "3":
  1042. console.log('准入配置');
  1043. this.clickPage(5,row);
  1044. break;
  1045. case "4":
  1046. console.log('编辑');
  1047. this.clickPage(3,row);
  1048. break;
  1049. case "5":
  1050. console.log('删除');
  1051. break;
  1052. default:
  1053. break;
  1054. }
  1055. },
  1056. //保存当前排序
  1057. liveSort(row){
  1058. let obj = {
  1059. sort:row.diyOrder
  1060. }
  1061. this.sort = JSON.parse(JSON.stringify(obj));
  1062. },
  1063. //编辑排序
  1064. editSort(row){
  1065. let self = this;
  1066. if(row.diyOrder != this.sort.sort){
  1067. self.$confirm('是否确认修改排序?', "", {
  1068. confirmButtonText: "确定",
  1069. cancelButtonText: "取消",
  1070. type: "warning"
  1071. }).then(function() {
  1072. let obj = {
  1073. id:row.id,
  1074. diyOrder:row.diyOrder,
  1075. };
  1076. updateSubject(obj).then(response => {
  1077. self.msgSuccess("修改成功");
  1078. self.getList();
  1079. });
  1080. }).then(() => {}).catch(() => {
  1081. let obj = JSON.parse(JSON.stringify(self.sort));
  1082. row.diyOrder = obj.sort
  1083. });
  1084. }
  1085. },
  1086. /** 搜索按钮操作 */
  1087. handleQuery() {
  1088. this.queryParams.pageNum = 1;
  1089. this.getList();
  1090. },
  1091. /** 重置按钮操作 */
  1092. resetQuery() {
  1093. this.$set(this,'queryParams',{
  1094. pageNum: 1,
  1095. pageSize:20,
  1096. deptId:"",
  1097. name: '',
  1098. });
  1099. // this.resetForm("queryForm");
  1100. this.handleQuery();
  1101. },
  1102. /** 查询实验室列表 */
  1103. getList() {
  1104. this.loading = true;
  1105. // this.offMQTT();
  1106. authListSubject(this.queryParams).then(response => {
  1107. this.subjectList = response.rows;
  1108. this.total = response.total;
  1109. this.loading = false;
  1110. if(response.rows[0]){
  1111. this.$refs.multipleTable.setCurrentRow(response.rows[0]);
  1112. this.subjectInfo(response.rows[0].id);
  1113. }
  1114. let idList = [];
  1115. for(let i=0;i<response.rows.length;i++){
  1116. idList.push(response.rows[i].id)
  1117. }
  1118. this.$set(this,'mqttIdList',idList);
  1119. // this.subscriptionMQTT();
  1120. });
  1121. },
  1122. /** 查询学院列表 */
  1123. getDeptList() {
  1124. listDepartments().then(response => {
  1125. this.$set(this, 'deptOptions', response.data)
  1126. });
  1127. },
  1128. //MQTT订阅
  1129. subscriptionMQTT(){
  1130. let self = this;
  1131. this.client = mqtt.connect(localStorage.getItem('mqttUrl'), {
  1132. username: localStorage.getItem('mqttUser'),
  1133. password:localStorage.getItem('mqttPassword')
  1134. });
  1135. this.client.on("connect", e =>{
  1136. console.log("连接成功");
  1137. this.client.subscribe(this.mtopic+self.subId, (err) => {
  1138. if (!err) {
  1139. console.log("订阅成功:" + this.mtopic+self.subId);
  1140. }
  1141. });
  1142. this.client.subscribe(this.mtopicOne+self.subId, (err) => {
  1143. if (!err) {
  1144. console.log("订阅成功:" + this.mtopicOne+self.subId);
  1145. }
  1146. });
  1147. });
  1148. this.client.on("message", (topic, message) => {
  1149. // console.log('message',message)
  1150. if (message){
  1151. let data = JSON.parse(message)
  1152. //console.log("MQTT----message",data)
  1153. if(data.data.subId){
  1154. //传感器
  1155. // console.log("传感器",data.data.subId,'---------',data);
  1156. if(self.checkedSubject.id){
  1157. if(data.data.subId&&data.data.subId == self.checkedSubject.id){
  1158. self.$set(self.checkedSubject,'sensorFunctionStatusList',data.data.functionStatuses);
  1159. self.$set(self.checkedSubject.sensorFunctionStatusList[0],'sendDate',data.sendDate);
  1160. //判断传感器是否在线如果不在线type为2
  1161. self.checkedSubject.sensorFunctionStatusList.forEach(function(item) {
  1162. if(item.formatVal.indexOf("--") != -1){
  1163. item.type=2
  1164. }
  1165. })
  1166. self.checkedSubject.sensorFunctionStatusList=self.selectTriggerFun(self.checkedSubject.sensorFunctionStatusList)
  1167. }
  1168. }
  1169. if(self.newData.id){
  1170. if(data.data.subId&&data.data.subId == self.newData.id){
  1171. self.$set(self.newData,'sensorFunctionStatusList',data.data.functionStatuses);
  1172. self.$set(self.newData.sensorFunctionStatusList[0],'sendDate',data.sendDate);
  1173. }
  1174. }
  1175. }else{
  1176. //硬件
  1177. console.log("硬件",data);
  1178. for (let i = 0; i < data.data.length; i++) {
  1179. if (self.checkedSubject.VOlist) {
  1180. for (let k = 0; k < self.checkedSubject.VOlist.length; k++) {
  1181. if (self.checkedSubject.VOlist[k].id == data.data[i].num) {
  1182. if (data.data[i].hardwareOperate == 'CLOSE') {
  1183. self.checkedSubject.VOlist[k].state.code = 4;
  1184. } else if (data.data[i].hardwareOperate == 'OPEN') {
  1185. self.checkedSubject.VOlist[k].state.code = 3;
  1186. } else if (data.data[i].hardwareOperate == 'OFFLINE') {
  1187. self.checkedSubject.VOlist[k].state.code = 0;
  1188. }
  1189. if(self.checkedSubject.VOlist[k].hardwareTypeEnum.hardwareTypeCode == '2'&&
  1190. self.checkedSubject.VOlist[k].pcType == '0'){
  1191. self.subjectTriggerModes(self.checkedSubject.VOlist[k])
  1192. }
  1193. }
  1194. }
  1195. }
  1196. if(self.newData.labHardwareVOList){
  1197. for(let k=0;k<self.newData.labHardwareVOList.length;k++){
  1198. if(self.newData.labHardwareVOList[k].id == data.data[i].num){
  1199. if(data.data[i].hardwareOperate == 'CLOSE'){
  1200. self.newData.labHardwareVOList[k].state.code = 4;
  1201. }else if(data.data[i].hardwareOperate == 'OPEN'){
  1202. self.newData.labHardwareVOList[k].state.code = 3;
  1203. }else if(data.data[i].hardwareOperate == 'OFFLINE'){
  1204. self.newData.labHardwareVOList[k].state.code = 0;
  1205. }
  1206. }
  1207. }
  1208. }
  1209. }
  1210. }
  1211. }
  1212. });
  1213. },
  1214. //取消订阅关闭MQTT连接
  1215. offMQTT(){
  1216. let self = this;
  1217. if (self.mqttIdList[0]){
  1218. // for(let i=0;i<self.mqttIdList.length;i++){
  1219. // self.client.unsubscribe(self.mtopic+self.mqttIdList[i], error => {
  1220. // if (error) {
  1221. // console.log('Unsubscribe error', error)
  1222. // }
  1223. // })
  1224. // self.client.unsubscribe(self.mtopicOne+self.mqttIdList[i], error => {
  1225. // if (error) {
  1226. // console.log('Unsubscribe error', error)
  1227. // }
  1228. // })
  1229. // }
  1230. self.client.unsubscribe(self.mtopic+self.subId, error => {
  1231. if (error) {
  1232. console.log('Unsubscribe error', error)
  1233. }
  1234. })
  1235. self.client.unsubscribe(self.mtopicOne+self.subId, error => {
  1236. if (error) {
  1237. console.log('Unsubscribe error', error)
  1238. }
  1239. })
  1240. self.client.end();
  1241. self.client = {};
  1242. }
  1243. },
  1244. //视频方法
  1245. videoFunction(){
  1246. let self = this;
  1247. // self.videoList = [];
  1248. for(let i=0;i<self.checkedSubject.videoData.length;i++){
  1249. let obj = {
  1250. player :{},
  1251. flvPlayer:{}
  1252. };
  1253. obj.player = document.getElementById(self.checkedSubject.videoData[i].divId);
  1254. // if (flvjs.isSupported()) {
  1255. obj.flvPlayer = flvjs.createPlayer(
  1256. {
  1257. // isLive: true, //=> 是否为直播流
  1258. // hasAudio: false, //=> 是否开启声音
  1259. type: self.checkedSubject.videoData[i].videoType, //媒体类型 flv 或 mp4
  1260. url: self.checkedSubject.videoData[i].url //视频流地址
  1261. },
  1262. {
  1263. enableStashBuffer: true,//启用 IO 存储缓冲区。 如果您需要实时流播放(最小延迟),请设置为 false,但如果存在网络抖动,则可能会停止。
  1264. stashInitialSize: 128,//IO 存储缓冲区初始大小。 默认值为 384KB。 指示合适的大小可以改善视频加载/搜索时间。
  1265. isLive: true,//是否是直播
  1266. lazyLoadRecoverDuration: 30,//指示以秒为单位的lazyLoad 恢复时间边界。
  1267. autoCleanupSourceBuffer: true,//进行自动清理
  1268. autoCleanupMaxBackwardDuration: 3 * 60,//3 * 60 当向后缓冲持续时间超过这个值(以秒为单位)时,对 SourceBuffer 进行自动清理
  1269. autoCleanupMinBackwardDuration: 2 * 60,//2 * 60 指示在执行自动清理时为后向缓冲区保留的持续时间(以秒为单位)。
  1270. }
  1271. );
  1272. self.videoList.push(obj);
  1273. // }
  1274. console.log("i",i)
  1275. }
  1276. for(let i=0;i<self.videoList.length;i++){
  1277. self.videoList[i].flvPlayer.attachMediaElement(self.videoList[i].player);
  1278. self.videoList[i].flvPlayer.load(); //加载
  1279. self.videoList[i].flvPlayer.play(); //加载
  1280. }
  1281. },
  1282. //视屏全屏方法
  1283. videoFullScreen(index){
  1284. this.$refs.videoRef[index].webkitRequestFullScreen();
  1285. },
  1286. //断开视频流
  1287. videoOff(){
  1288. let self = this;
  1289. if(self.videoList[0]){
  1290. for(let i=0;i<self.videoList.length;i++){
  1291. self.videoList[i].flvPlayer.pause();
  1292. self.videoList[i].flvPlayer.unload();
  1293. self.videoList[i].flvPlayer.detachMediaElement();
  1294. self.videoList[i].flvPlayer.destroy();
  1295. self.videoList[i].flvPlayer = null;
  1296. }
  1297. self.videoList = [];
  1298. }
  1299. },
  1300. //查询安全分级
  1301. getListClassifiedAll(){
  1302. listClassifiedAll().then(response=>{
  1303. if(response.code==200){
  1304. console.log(response)
  1305. this.levelList=response.data
  1306. }
  1307. })
  1308. },
  1309. //查询安全分类
  1310. getListClasstypeAll(){
  1311. listClasstypeAll().then(response=>{
  1312. if(response.code==200){
  1313. this.typeList=response.data;
  1314. }
  1315. });
  1316. },
  1317. //****************************************导入功能**************************************
  1318. handleAvatarSuccess(res, file) {
  1319. if(res.code == 200){
  1320. this.getImportData.downFile = true
  1321. this.getImportData.successNum = res.data.successNum
  1322. this.getImportData.failureNum = res.data.failureNum
  1323. // this.importOpen = false;
  1324. // this.getList();
  1325. }else{
  1326. this.msgError(res.msg);
  1327. }
  1328. this.loading = false;
  1329. },
  1330. beforeAvatarUpload(file) {
  1331. let type = false;
  1332. console.log('file',file);
  1333. if (file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.type == 'application/vnd.ms-excel') {
  1334. if(file.size> 5250000){
  1335. this.msgError('上传大小不能超过5M')
  1336. return false
  1337. }
  1338. this.getImportData.textName = file.name;
  1339. type = true;
  1340. this.loading = true;
  1341. }else{
  1342. this.$message.error('只能上传xls/xlsx格式文件');
  1343. type = false;
  1344. }
  1345. return type;
  1346. },
  1347. //导入页面关闭
  1348. importOpenOff(){
  1349. this.importOpen = false;
  1350. this.getImportData.downFile = false;
  1351. this.getImportData.successNum = 0;
  1352. this.getImportData.failureNum = 0;
  1353. this.getImportData.textName = "";
  1354. },
  1355. /** 导入按钮操作 */
  1356. importButton(item){
  1357. if(item.command == 1){
  1358. // 下载模板
  1359. this.download('/laboratory/subject/exportSubTemplate', {}, `实验室导入模板.xlsx`)
  1360. }else if(item.command == 2){
  1361. // 导入数据
  1362. console.log('导入数据');
  1363. this.importOpen = true;
  1364. }
  1365. },
  1366. /** 下载模板操作 */
  1367. importTemplate() {
  1368. this.download('/laboratory/subject/exportSubTemplate', {}, `实验室导入模板.xlsx`)
  1369. },
  1370. /*下载失败列表*/
  1371. failureExcel(){
  1372. this.download('/laboratory/subject/exportProblemData', {}, `实验室导入模板失败报表.xlsx`)
  1373. },
  1374. },
  1375. beforeDestroy() {
  1376. //清除定时器
  1377. let self = this;
  1378. self.videoOff();
  1379. self.offMQTT();
  1380. },
  1381. }
  1382. </script>
  1383. <style scoped lang="scss">
  1384. .subject{
  1385. flex:1;
  1386. display: flex!important;
  1387. flex-direction: column;
  1388. overflow: hidden;
  1389. *{
  1390. margin:0;
  1391. }
  1392. ::v-deep .el-table__row{
  1393. td:nth-child(1){
  1394. padding:0;
  1395. }
  1396. }
  1397. .subject-page{
  1398. flex:1;
  1399. display: flex;
  1400. flex-direction: column;
  1401. overflow: hidden;
  1402. border-radius:10px;
  1403. margin:5px 0 0 0;
  1404. //box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1);
  1405. .subject-page-min{
  1406. flex:1;
  1407. display: flex;
  1408. overflow: hidden;
  1409. padding: 2px 0 10px 10px;
  1410. box-sizing: border-box;
  1411. .form-dropdown-box{
  1412. display: flex;
  1413. margin:0;
  1414. padding:0 10px;
  1415. cursor: pointer;
  1416. height:40px;
  1417. img:nth-child(1){
  1418. width:16px;
  1419. height:16px;
  1420. margin-top:12px;
  1421. }
  1422. p{
  1423. width:47px;
  1424. text-align: center;
  1425. font-size:14px;
  1426. margin:0;
  1427. line-height:40px;
  1428. }
  1429. img:nth-child(3){
  1430. width:10px;
  1431. height:6px;
  1432. margin-top:17px;
  1433. }
  1434. }
  1435. }
  1436. .left-subject-list-flex{
  1437. flex:1;
  1438. }
  1439. .left-subject-list{
  1440. /*flex:1;*/
  1441. width:1143px;
  1442. display: flex;
  1443. flex-direction: column;
  1444. margin-right:6px;
  1445. overflow: hidden ;
  1446. box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.2);
  1447. border-radius: 20px 20px 20px 20px;
  1448. padding-top: 24px;
  1449. margin-bottom:10px;
  1450. .table_border{
  1451. flex:1;
  1452. display: flex;
  1453. flex-direction: column;
  1454. padding: 20px 20px 10px;
  1455. box-sizing: border-box;
  1456. overflow: hidden;
  1457. }
  1458. }
  1459. .overflow-box{
  1460. overflow: hidden;
  1461. }
  1462. .right-subject-box{
  1463. /*width:440px;*/
  1464. display: flex;
  1465. flex-direction: column;
  1466. .top-button-box{
  1467. display: flex;
  1468. margin-left:6px;
  1469. div{
  1470. padding:0 10px;
  1471. height:40px;
  1472. line-height:40px;
  1473. font-size:14px;
  1474. text-align: center;
  1475. border-top-right-radius: 10px;
  1476. border-top-left-radius: 10px;
  1477. margin-right:1px;
  1478. cursor: pointer;
  1479. font-weight: 500;
  1480. }
  1481. .buttonColorA{
  1482. color:#0045AF;
  1483. background:#fff ;
  1484. border: 1px solid #E0E0E0;
  1485. border-bottom: 1px solid rgba(224,224,224,0.3);
  1486. }
  1487. .buttonColorB{
  1488. color:#333;
  1489. background:#E0E0E0 ;
  1490. border: 1px solid #E0E0E0;
  1491. border-bottom:none;
  1492. }
  1493. }
  1494. .bottom-max-box{
  1495. width:428px;
  1496. box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.2);
  1497. border-radius: 0px 0px 20px 20px;
  1498. font-weight:500;
  1499. flex:1;
  1500. display: flex;
  1501. flex-direction: column;
  1502. margin-left:6px;
  1503. overflow: hidden;
  1504. margin-bottom:10px;
  1505. .bottom-sensor-box{
  1506. overflow: hidden;
  1507. display: flex;
  1508. flex-direction: column;
  1509. background: #fff;
  1510. width:424px;
  1511. flex:1;
  1512. position: relative;
  1513. // border: 1px solid #E0E0E0;
  1514. //border-radius: 0 10px 10px 10px;
  1515. .top-title{
  1516. margin:16px 26px;
  1517. display: flex;
  1518. justify-content: space-between;
  1519. >i{
  1520. font-style: normal;
  1521. line-height:18px;
  1522. font-size:16px;
  1523. color: #333;
  1524. overflow:hidden;
  1525. white-space: nowrap;
  1526. text-overflow: ellipsis;
  1527. }
  1528. }
  1529. .null-text-p{
  1530. text-align: center;
  1531. font-size:16px;
  1532. color:#999;
  1533. line-height:50px;
  1534. margin:0 30px;
  1535. }
  1536. .sensor-for-max-box{
  1537. .sensor-for-big-box{
  1538. display: inline-block;
  1539. width:180px;
  1540. height:60px;
  1541. margin:0 0 11px 22px;
  1542. border-radius: 10px;
  1543. .sensor-for-min-box{
  1544. display: flex;
  1545. img{
  1546. width:26px;
  1547. height:26px;
  1548. margin:17px 11px;
  1549. }
  1550. div{
  1551. margin:9px 0;
  1552. p{
  1553. color:#fff;
  1554. }
  1555. p:nth-child(1){
  1556. font-size:14px;
  1557. line-height:20px;
  1558. }
  1559. p:nth-child(2){
  1560. font-size:16px;
  1561. line-height:22px;
  1562. }
  1563. }
  1564. }
  1565. }
  1566. .sensor-color-a{
  1567. background: #FF7272;
  1568. color:#fff;
  1569. }
  1570. .sensor-color-b{
  1571. background: #E0E0E0;
  1572. color:#999999;
  1573. }
  1574. .sensor-color-c{
  1575. background: #80D164;
  1576. color:#fff;
  1577. }
  1578. }
  1579. .bottom-text{
  1580. line-height:18px;
  1581. font-size:14px;
  1582. color:#999999;
  1583. margin:0 0px 0px 26px;
  1584. position: absolute;
  1585. bottom: 22px;
  1586. }
  1587. }
  1588. .bottom-switch-box{
  1589. overflow: hidden;
  1590. display: flex;
  1591. flex-direction: column;
  1592. background: #fff;
  1593. width:424px;
  1594. flex: 1;
  1595. .top-title{
  1596. margin:16px 26px;
  1597. display: flex;
  1598. justify-content: space-between;
  1599. >i{
  1600. font-style: normal;
  1601. line-height:18px;
  1602. font-size:16px;
  1603. color: #333;
  1604. overflow:hidden;
  1605. white-space: nowrap;
  1606. text-overflow: ellipsis;
  1607. }
  1608. }
  1609. .null-text-p{
  1610. text-align: center;
  1611. font-size:16px;
  1612. color:#999;
  1613. line-height:50px;
  1614. margin:0 30px;
  1615. }
  1616. .switch-for-max-box{
  1617. width: 424px;
  1618. display: flex;
  1619. justify-content: flex-start;
  1620. flex-wrap: wrap;
  1621. .switch-for-big-box{
  1622. .switch-for-min-box{
  1623. width:180px;
  1624. height:70px;
  1625. margin:0 0 14px 20px;
  1626. background: rgba(1,131,250,0.1);
  1627. border-radius: 10px 10px 10px 10px;
  1628. padding: 10px;
  1629. box-sizing: border-box;
  1630. .switch-for-min-box_t{
  1631. width: 100%;
  1632. display: flex;
  1633. justify-content: space-between;
  1634. .switch-for-min-title{
  1635. font-size:14px;
  1636. line-height:24px;
  1637. width: 84px;
  1638. color: #333333;
  1639. display:block;
  1640. overflow:hidden;
  1641. text-overflow:ellipsis;
  1642. white-space:nowrap;
  1643. }
  1644. .switch-null-p{
  1645. font-size:14px;
  1646. line-height:24px;
  1647. color:#999;
  1648. }
  1649. .switch-pc-type-p{
  1650. font-size:14px;
  1651. line-height:24px;
  1652. color:#0183fa;
  1653. cursor: pointer;
  1654. }
  1655. }
  1656. .switch-for-min-box_b{
  1657. margin-top: 10px;
  1658. .switch-null-ventilate{
  1659. width: 62px;
  1660. height: 18px;
  1661. border-radius: 10px 10px 10px 10px;
  1662. opacity: 1;
  1663. border: 1px solid #0183FA;
  1664. font-size: 12px;
  1665. font-weight: 400;
  1666. color: #0183FA;
  1667. line-height: 15px;
  1668. text-align: center;
  1669. float: left;
  1670. }
  1671. .switch{
  1672. float: right;
  1673. }
  1674. }
  1675. .switch-for-min-button{
  1676. width:70px;
  1677. height:30px;
  1678. line-height:30px;
  1679. font-size:14px;
  1680. color:#0045AF;
  1681. border-radius:6px;
  1682. border: 1px solid #0045AF;
  1683. margin-top:14px;
  1684. text-align: center;
  1685. cursor: pointer;
  1686. }
  1687. }
  1688. }
  1689. }
  1690. }
  1691. .bottom-video-box{
  1692. overflow: hidden;
  1693. display: flex;
  1694. flex-direction: column;
  1695. background: #fff;
  1696. width:424px;
  1697. border-radius: 0 10px 10px 10px;
  1698. flex: 1;
  1699. .top-title{
  1700. margin:16px 26px;
  1701. display: flex;
  1702. justify-content: space-between;
  1703. >i{
  1704. font-style: normal;
  1705. line-height:18px;
  1706. font-size:16px;
  1707. color: #333;
  1708. overflow:hidden;
  1709. white-space: nowrap;
  1710. text-overflow: ellipsis;
  1711. }
  1712. }
  1713. .null-text-p{
  1714. text-align: center;
  1715. font-size:16px;
  1716. color:#999;
  1717. line-height:50px;
  1718. margin:0 30px;
  1719. }
  1720. .video-for-max-box{
  1721. .switch-for-big-box{
  1722. width:374px;
  1723. height:262px;
  1724. margin:0 auto 14px;
  1725. position: relative;
  1726. .position-p{
  1727. width:42px;
  1728. height:42px;
  1729. text-align: center;
  1730. line-height:42px;
  1731. font-size:18px;
  1732. position: absolute;
  1733. top:0;
  1734. right:0;
  1735. color:#fff;
  1736. cursor: pointer;
  1737. }
  1738. }
  1739. }
  1740. }
  1741. .bottom-alarm-box{
  1742. flex:1;
  1743. display: flex;
  1744. flex-direction: column;
  1745. background: #fff;
  1746. width:424px;
  1747. overflow-x: hidden;
  1748. padding: 0 27px 0 23px;
  1749. box-sizing: border-box;
  1750. .top-title{
  1751. margin:16px 0px;
  1752. display: flex;
  1753. justify-content: space-between;
  1754. >i{
  1755. font-style: normal;
  1756. line-height:18px;
  1757. font-size:16px;
  1758. color: #333;
  1759. overflow:hidden;
  1760. white-space: nowrap;
  1761. text-overflow: ellipsis;
  1762. }
  1763. }
  1764. .alarm-max-box{
  1765. width:374px;
  1766. height:60px;
  1767. display: flex;
  1768. position:relative;
  1769. background: #f5f5f5;
  1770. border-radius: 10px 10px 10px 10px;
  1771. margin: 10px 0 0 0;
  1772. .alarm-img{
  1773. width:30px;
  1774. height:30px;
  1775. margin:14px;
  1776. }
  1777. .alarm-big-box{
  1778. p:nth-of-type(1){
  1779. position:absolute;
  1780. top:18px;
  1781. left:64px;
  1782. font-size: 14px;
  1783. font-weight: 400;
  1784. color: #333333;
  1785. }
  1786. .alarm-position-box{
  1787. position:absolute;
  1788. top:8px;
  1789. left:260px;
  1790. }
  1791. p:nth-of-type(2){
  1792. position:absolute;
  1793. top:0px;
  1794. right:0px;
  1795. width: 50px;
  1796. height: 20px;
  1797. font-size:12px;
  1798. font-weight:700;
  1799. line-height:20px;
  1800. border-radius: 0px 10px 0px 10px;
  1801. text-align: center;
  1802. }
  1803. .colorTypeA{
  1804. background: rgba(1,131,250,0.2);
  1805. color:#0183FA;
  1806. }
  1807. .colorTypeB{
  1808. background: #ECECEC;
  1809. color:#A2A2A2;
  1810. }
  1811. }
  1812. }
  1813. .BGcolorTypeA{
  1814. width:374px;
  1815. height:60px;
  1816. display: flex;
  1817. position:relative;
  1818. background: rgba(1,131,250,0.1);
  1819. border-radius: 10px 10px 10px 10px;
  1820. margin: 10px 0 0 0;
  1821. }
  1822. .BGcolorTypeB{
  1823. width:374px;
  1824. height:60px;
  1825. display: flex;
  1826. position:relative;
  1827. background: #F5F5F5;
  1828. border-radius: 10px 10px 10px 10px;
  1829. margin: 10px 0 0 0;
  1830. }
  1831. .alarm-title-box{
  1832. display: flex;
  1833. p{
  1834. line-height:60px;
  1835. font-size:14px;
  1836. }
  1837. p:nth-child(1){
  1838. flex:1;
  1839. }
  1840. p:nth-child(2){
  1841. cursor: pointer;
  1842. }
  1843. }
  1844. }
  1845. /*智能门禁*/
  1846. .bottom-entrance-box{
  1847. flex: 1;
  1848. background: #fff;
  1849. width:424px;
  1850. border-radius: 0 10px 10px 10px;
  1851. .top-title{
  1852. margin:16px 26px;
  1853. display: flex;
  1854. justify-content: space-between;
  1855. >i{
  1856. font-style: normal;
  1857. line-height:18px;
  1858. font-size:16px;
  1859. color: #333;
  1860. overflow:hidden;
  1861. white-space: nowrap;
  1862. text-overflow: ellipsis;
  1863. }
  1864. }
  1865. .entrance{
  1866. width: 374px;
  1867. height: 60px;
  1868. display: flex;
  1869. justify-content: flex-start;
  1870. border-radius: 10px 10px 10px 10px;
  1871. margin: 10px 0 0 26px;
  1872. position: relative;
  1873. .entrance_c{
  1874. width: 30px;
  1875. height: 30px;
  1876. margin: 14px 20px 0px 14px;
  1877. }
  1878. .entrance_r{
  1879. font-size: 14px;
  1880. font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  1881. font-weight: 400;
  1882. color: #333333;
  1883. line-height: 60px;
  1884. }
  1885. .entrance_l_yes{
  1886. width: 60px;
  1887. height: 30px;
  1888. background: #0183FA;
  1889. border-radius: 0px 10px 0px 10px;
  1890. font-size: 14px;
  1891. font-weight: 400;
  1892. color: #fff;
  1893. line-height: 30px;
  1894. text-align: center;
  1895. position: absolute;
  1896. top: 0;
  1897. right: 0;
  1898. }
  1899. .entrance_l_no{
  1900. width: 60px;
  1901. height: 30px;
  1902. background: #A2A2A2;
  1903. border-radius: 0px 10px 0px 10px;
  1904. font-size: 14px;
  1905. font-weight: 400;
  1906. color: #fff;
  1907. line-height: 30px;
  1908. text-align: center;
  1909. position: absolute;
  1910. top: 0;
  1911. right: 0;
  1912. }
  1913. }
  1914. .BGentrance_l_yes{
  1915. background: rgba(1,131,250,0.1);
  1916. }
  1917. .BGentrance_l_no{
  1918. background: #F5F5F5;
  1919. }
  1920. }
  1921. .null-data-img{
  1922. width:137px;
  1923. height:137px;
  1924. display: block;
  1925. margin:10px auto;
  1926. }
  1927. .null-text-p{
  1928. text-align: center;
  1929. font-size:16px;
  1930. color:#999;
  1931. line-height:50px;
  1932. margin:0 30px;
  1933. }
  1934. }
  1935. }
  1936. }
  1937. }
  1938. </style>
  1939. <style lang="scss">
  1940. .alarm-position-box{
  1941. .switch .el-switch__label {
  1942. position: absolute;
  1943. display: none;
  1944. color: #fff !important;
  1945. }
  1946. .switch .el-switch__label--right {
  1947. z-index: 1;
  1948. }
  1949. .switch .el-switch__label--right span{
  1950. margin-right: 9px;
  1951. }
  1952. .switch .el-switch__label--left {
  1953. z-index: 1;
  1954. }
  1955. .switch .el-switch__label--left span{
  1956. margin-left: 9px;
  1957. }
  1958. .switch .el-switch__label.is-active {
  1959. display: block;
  1960. }
  1961. .switch.el-switch .el-switch__core{
  1962. background-color: rgba(255,196,124)!important;
  1963. border-color: rgba(255,196,124)!important;
  1964. }
  1965. .switch.el-switch .el-switch__core,
  1966. .el-switch .el-switch__label {
  1967. width: 68px !important;
  1968. height:20px!important;
  1969. line-height:30px!important;
  1970. -webkit-border-radius: 20px!important;
  1971. -moz-border-radius: 20px!important;
  1972. border-radius: 20px!important;
  1973. margin: 0;
  1974. position: absolute;
  1975. top: 0;
  1976. }
  1977. .switch .el-switch__label--left span{
  1978. margin-left:22px!important;
  1979. font-size: 12px;
  1980. color: #fff;
  1981. line-height: 20px;
  1982. position: relative;
  1983. top: -5px;
  1984. }
  1985. .switch .el-switch__label--right span{
  1986. margin-left:5px!important;
  1987. font-size: 12px;
  1988. position: relative;
  1989. top: -5px;
  1990. }
  1991. .el-switch__core:after{
  1992. background: #FA8A01 !important;
  1993. height:16px!important;
  1994. width:16px!important;
  1995. top:1px!important;
  1996. }
  1997. .el-switch.is-checked .el-switch__core::after{
  1998. margin-left: -20px!important;
  1999. }
  2000. .el-switch{
  2001. margin:10px auto 0;
  2002. display: block;
  2003. width:80px!important;
  2004. height:4px!important;
  2005. }
  2006. }
  2007. .subject-alarm-time{
  2008. .el-table__empty-text{
  2009. background-size: 45%;
  2010. }
  2011. }
  2012. .checkItemLibrary-dialog-box{
  2013. .teacher-import-dialog-upLoad-box{
  2014. .el-upload{
  2015. width:450px;
  2016. margin:0 55px;
  2017. .el-upload-dragger{
  2018. width:450px;
  2019. .el-icon-upload{
  2020. font-size:100px;
  2021. color:#CBE6FE;
  2022. }
  2023. .el-upload__text{
  2024. margin-top:20px;
  2025. }
  2026. }
  2027. }
  2028. .el-upload__tip{
  2029. margin-left:60px;
  2030. font-size:14px;
  2031. margin-top:10px;
  2032. }
  2033. .el-upload-text-box{
  2034. background: #F5F5F5;
  2035. border-radius: 10px;
  2036. margin:15px 30px 0;
  2037. padding:0 20px 15px;
  2038. overflow: hidden;
  2039. *{
  2040. margin:0;
  2041. }
  2042. .img-text-box{
  2043. display: flex;
  2044. margin-top:15px;
  2045. img{
  2046. width:16px;
  2047. height:16px;
  2048. margin-right:13px;
  2049. }
  2050. p{
  2051. height:16px;
  2052. line-height:16px;
  2053. font-size:12px;
  2054. }
  2055. }
  2056. .text-p{
  2057. margin-top:15px;
  2058. margin-left:29px;
  2059. height:16px;
  2060. line-height:16px;
  2061. font-size:12px;
  2062. }
  2063. }
  2064. }
  2065. .teacher-import-dialog-button-box{
  2066. display: flex;
  2067. width:190px;
  2068. margin:0 auto;
  2069. p{
  2070. width:70px;
  2071. height:30px;
  2072. line-height:30px;
  2073. font-size:14px;
  2074. margin:0 auto;
  2075. }
  2076. }
  2077. .teacher-import-dialog-position-box{
  2078. width:100%;
  2079. height:100%;
  2080. position: absolute;
  2081. top:0;
  2082. left:0;
  2083. z-index: 999;
  2084. background: rgba(255,255,255,0.4);
  2085. border-radius:20px;
  2086. }
  2087. .code-max-box{
  2088. display: flex;
  2089. .code-button-box{
  2090. display: flex;
  2091. flex-direction: column;
  2092. margin-left:8px;
  2093. p{
  2094. width:40px;
  2095. text-align: center;
  2096. line-height:19px;
  2097. font-size:14px;
  2098. cursor: pointer;
  2099. color:#d8d8d8;
  2100. }
  2101. p:nth-child(1){
  2102. border:1px solid #d8d8d8;
  2103. border-top-left-radius: 4px;
  2104. border-top-right-radius: 4px;
  2105. }
  2106. p:nth-child(2){
  2107. border-bottom:1px solid #d8d8d8;
  2108. border-left:1px solid #d8d8d8;
  2109. border-right:1px solid #d8d8d8;
  2110. border-bottom-left-radius: 4px;
  2111. border-bottom-right-radius: 4px;
  2112. }
  2113. p:hover{
  2114. color:#fff;
  2115. background-color: #d8d8d8;
  2116. }
  2117. }
  2118. }
  2119. }
  2120. </style>