index.vue 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166
  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">
  8. <el-input
  9. v-model="queryParams.searchValue"
  10. placeholder="实验室/房间号"
  11. clearable
  12. style="width:150px;margin-left:20px;"
  13. />
  14. </el-form-item>
  15. <el-form-item label="" prop="deptId">
  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">
  26. <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" style="width:160px;">
  27. <el-option
  28. v-for="dict in typeList"
  29. :key="dict.typeId"
  30. :label="dict.typeName"
  31. :value="dict.typeId"
  32. ></el-option>
  33. </el-select>
  34. </el-form-item>
  35. <el-form-item label="" prop="levelId">
  36. <el-select v-model="queryParams.levelId" placeholder="请选择安全分级" style="width:160px;">
  37. <el-option
  38. v-for="dict in levelList"
  39. :key="dict.levelId"
  40. :label="dict.levelName"
  41. :value="dict.levelId"
  42. ></el-option>
  43. </el-select>
  44. </el-form-item>
  45. <el-form-item style="float: right;margin-right:20px;" v-hasPermi="['laboratory:subject:import']">
  46. <el-dropdown @command="importButton">
  47. <div class="form-dropdown-box">
  48. <img src="@/assets/ZDimages/integratedManagement/icon_jzgxx_dr.png">
  49. <p>导入</p>
  50. <img src="@/assets/ZDimages/integratedManagement/icon_jzggl_xljt.png">
  51. </div>
  52. <el-dropdown-menu slot="dropdown">
  53. <!--<el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:1}">下载模板</el-dropdown-item>-->
  54. <!--<el-dropdown-item style="margin:0 10px;color:#333;" :command="{command:2}">导入数据</el-dropdown-item>-->
  55. <el-dropdown-item :command="{command:1}">下载模板</el-dropdown-item>
  56. <el-dropdown-item :command="{command:2}">导入数据</el-dropdown-item>
  57. </el-dropdown-menu>
  58. </el-dropdown>
  59. </el-form-item>
  60. <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
  61. <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
  62. <p class="page-submit-common-style-button"
  63. style="float: right;margin-right:20px;"
  64. @click="clickPage(2)"
  65. v-hasPermi="['laboratory:subject:add']"
  66. >新增</p>
  67. </el-form>
  68. <div class="table_border">
  69. <el-table class="table-box" ref="multipleTable" border :data="subjectList" highlight-current-row @current-change="handleCurrentChange" style="cursor: pointer;">
  70. <el-table-column label="排序" align="left" prop="orderNum" width="80">
  71. <template slot-scope="scope">
  72. <el-input maxlength="4" type="text" oninput ="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.orderNum" @focus="liveSort(scope.row)" @blur="editSort(scope.row)"></el-input>
  73. </template>
  74. </el-table-column>
  75. <el-table-column label="实验室名称" align="left" prop="subName" show-overflow-tooltip/>
  76. <el-table-column label="房间号" align="left" prop="roomName" :width="versionField() == 'xiBeiNongLinDaXue'?250:150" show-overflow-tooltip/>
  77. <el-table-column label="学院" align="left" prop="deptName" :width="versionField() == 'xiBeiNongLinDaXue'?200:130" show-overflow-tooltip/>
  78. <el-table-column label="分类/分级" align="left" prop="levelName" :width="versionField() == 'xiBeiNongLinDaXue'?200:150" show-overflow-tooltip>
  79. <template slot-scope="scope">
  80. <span >{{scope.row.typeName}}/</span>
  81. <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="实验室责任人" align="left" prop="adminName" :width="versionField() == 'xiBeiNongLinDaXue'?180:130" show-overflow-tooltip/>
  85. <el-table-column label="安全责任人" align="left" prop="safeUserNames" :width="versionField() == 'xiBeiNongLinDaXue'?180:130" show-overflow-tooltip/>
  86. <el-table-column label="操作" align="left" :width="versionField() == 'xiBeiNongLinDaXue'?180:140" >
  87. <template slot-scope="scope">
  88. <div class="table-button-box">
  89. <p class="table-button-null"></p>
  90. <p class="table-button-p" v-hasPermi="['laboratory:subject:query']" @click="clickPage(7,scope.row)">详情</p>
  91. <el-dropdown trigger="click" size="mini" @command="(command) => handleCommand(command, scope.row)">
  92. <p class="table-button-p">更多>></p>
  93. <el-dropdown-menu slot="dropdown" style="margin:0!important;">
  94. <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>
  95. <el-dropdown-item v-if="versionField() != 'xiBeiNongLinDaXue'" style="height:36px;line-height:36px;width:90px;text-align: center" command="2">物联配置</el-dropdown-item>
  96. <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>
  97. <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>
  98. <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="5"
  99. v-hasPermi="['laboratory:subject:remove']">删除</el-dropdown-item>
  100. </el-dropdown-menu>
  101. </el-dropdown>
  102. <p class="table-button-null"></p>
  103. </div>
  104. </template>
  105. </el-table-column>
  106. </el-table>
  107. <pagination
  108. v-show="total>0"
  109. :total="total"
  110. :page.sync="queryParams.page"
  111. :limit.sync="queryParams.pageSize"
  112. @pagination="getList"
  113. />
  114. </div>
  115. </div>
  116. <div class="right-subject-box scrollbar-box" v-if="checkedSubject.id && versionField() != 'xiBeiNongLinDaXue'"
  117. :class="rightButtonType == 4?'overflow-box':''">
  118. <div class="top-button-box">
  119. <div :class="rightButtonType == 1 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(1)">传感器监测</div>
  120. <div :class="rightButtonType == 2 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(2)">物联控制</div>
  121. <div :class="rightButtonType == 3 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(3)">视频监控</div>
  122. <div :class="rightButtonType == 4 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(4)">声光报警</div>
  123. <div v-if="versionField() != 'suZhouDaXue'"
  124. :class="rightButtonType == 5 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(5)">智能门禁</div>
  125. </div>
  126. <!--传感器-->
  127. <div class="bottom-max-box" :class="rightButtonType == 4?'overflow-box':''">
  128. <div class="bottom-sensor-box" v-if="rightButtonType == 1">
  129. <p class="top-title">
  130. <el-tooltip class="item" effect="dark"
  131. v-if="checkedSubject.deptName"
  132. :content="checkedSubject.deptName" placement="bottom">
  133. <i>{{checkedSubject.deptName}}</i>
  134. </el-tooltip>
  135. <el-tooltip class="item" effect="dark"
  136. v-if="checkedSubject.subAddrr.buildName && checkedSubject.subAddrr.floorName"
  137. :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/integratedManagement/icon_bj_wd.png" v-if="item.funNum == 'wendu'">
  148. <img src="@/assets/ZDimages/integratedManagement/icon_bj_wd.png" v-if="item.funNum == 'fbwendu'">
  149. <img src="@/assets/ZDimages/integratedManagement/icon_bj_sd.png" v-if="item.funNum == 'shidu'">
  150. <img src="@/assets/ZDimages/integratedManagement/icon_bj_sd.png" v-if="item.funNum == 'fbshidu'">
  151. <img src="@/assets/ZDimages/integratedManagement/icon_bj_eyht.png" v-if="item.funNum == 'co'">
  152. <img src="@/assets/ZDimages/integratedManagement/icon_bj_eyht.png" v-if="item.funNum == 'fbco'">
  153. <img src="@/assets/ZDimages/integratedManagement/icon_bj_jwnd.png" v-if="item.funNum == 'jiawan'">
  154. <img src="@/assets/ZDimages/integratedManagement/icon_sy_yqnd.png" v-if="item.funNum == 'o2'">
  155. <img src="@/assets/ZDimages/integratedManagement/icon_sy_yqnd.png" v-if="item.funNum == 'fbo2'">
  156. <img src="@/assets/ZDimages/integratedManagement/icon_bj_yg.png" v-if="item.funNum == 'yanwu'">
  157. <img src="@/assets/ZDimages/integratedManagement/icon_sy_dqy.png" v-if="item.funNum == 'daqiya'">
  158. <img src="@/assets/ZDimages/integratedManagement/icon_syspz_voc.png" v-if="item.funNum == 'voc'">
  159. <img src="@/assets/ZDimages/integratedManagement/icon_syspz_voc.png" v-if="item.funNum == 'fbvoc'">
  160. <img src="@/assets/ZDimages/integratedManagement/icon_syspz_tvoc.png" v-if="item.funNum == 'tvoc'">
  161. <img src="@/assets/ZDimages/integratedManagement/icon_sy_mcnd.png" v-if="item.funNum == 'so2'">
  162. <img src="@/assets/ZDimages/integratedManagement/icon_bj_yyhd.png" v-if="item.funNum == 'no1'">
  163. <img src="@/assets/ZDimages/integratedManagement/icon_bj_dqy.png" v-if="item.funNum == 'fenchen'">
  164. <img src="@/assets/ZDimages/integratedManagement/icon_bj_qq.png" v-if="item.funNum == 'H2'">
  165. <img src="@/assets/ZDimages/integratedManagement/guangqi.png" v-if="item.funNum == 'guangqi'">
  166. <img src="@/assets/ZDimages/integratedManagement/lvqi.png" v-if="item.funNum == 'lvqi'">
  167. <img src="@/assets/ZDimages/integratedManagement/icon_syspz_jiaquan.png" v-if="item.funNum == 'jiaquan'">
  168. <img src="@/assets/ZDimages/integratedManagement/icon_syspz_hwcw.png" v-if="item.funNum == 'hwcwy'">
  169. <div>
  170. <el-tooltip class="item" effect="dark" :content="item.describe" placement="bottom">
  171. <p>{{item.describe|ellipsis}}</p>
  172. </el-tooltip>
  173. <p>{{item.formatVal}}</p>
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data.png" v-if="!checkedSubject.sensorFunctionStatusList[0]">
  179. <p class="null-text-p" v-if="!checkedSubject.sensorFunctionStatusList[0]">暂无环境监测信息,请在更多操作-物联设备配置中进行添加</p>
  180. <p class="bottom-text" v-if="checkedSubject.sensorFunctionStatusList[0]">数据上报时间:{{checkedSubject.sensorFunctionStatusList[0].sendDate}}</p>
  181. </div>
  182. <div class="bottom-switch-box" v-if="rightButtonType == 2">
  183. <p class="top-title">
  184. <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
  185. <i>{{checkedSubject.deptName}}</i>
  186. </el-tooltip>
  187. <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
  188. <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
  189. </el-tooltip>
  190. </p>
  191. <div class="switch-for-max-box scrollbar-box" v-show="checkedSubject.VOlist[0]" v-hasPermi="['laboratory:subcontrol:set']">
  192. <div class="switch-for-big-box" v-for="(item,index) in checkedSubject.VOlist" :key="index">
  193. <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'SWITCH'">
  194. <div class="switch-for-min-box_t">
  195. <p class="switch-for-min-title">{{item.hardwareName}}</p>
  196. <p class="switch-null-p" v-if="item.state.code != 3 && item.state.code != 4" >{{item.state.name}}</p>
  197. </div>
  198. <div class="switch-for-min-box_b">
  199. <el-switch
  200. v-if="item.state.code == 3||item.state.code == 4"
  201. class="switch"
  202. @click.native="changeIsNeedCaptcha(item)"
  203. v-model="item.state.code"
  204. :active-value="3"
  205. :inactive-value="4"
  206. active-text="开启"
  207. inactive-text="关闭"
  208. disabled>
  209. </el-switch>
  210. </div>
  211. </div>
  212. <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'AI_VENTILATION'">
  213. <div class="switch-for-min-box_t">
  214. <p class="switch-for-min-title">{{item.hardwareName}}</p>
  215. <p class="switch-null-p" v-if="item.state.code != 3 && item.state.code != 4 && item.pcType == 0">{{item.state.name}}</p>
  216. <p class="switch-pc-type-p" v-if="item.pcType == 1" @click="tableButton(item)">操作</p>
  217. </div>
  218. <div class="switch-for-min-box_b" v-if="item.pcType == 0">
  219. <p class="switch-null-ventilate" v-if="item.hardwareTypeEnum.hardwareTypeCode==2 && item.state.code==3">{{item.dictLabel}}</p>
  220. <el-switch
  221. v-if="item.state.code == 3||item.state.code == 4"
  222. class="switch"
  223. @click.native="changeIsNeedCaptcha(item)"
  224. v-model="item.state.code"
  225. :active-value="3"
  226. :inactive-value="4"
  227. active-text="开启"
  228. inactive-text="关闭"
  229. disabled>
  230. </el-switch>
  231. </div>
  232. </div>
  233. <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'ONE_MACHINE'">
  234. <p class="switch-for-min-title">广播系统</p>
  235. <p class="switch-for-min-button" @click="handleAdd(item.subId)">播放文字</p>
  236. </div>
  237. </div>
  238. </div>
  239. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data.png" v-show="!checkedSubject.VOlist[0]">
  240. <p class="null-text-p" v-show="!checkedSubject.VOlist[0]">暂无物联控制信息,请在更多操作-物联设备配置中进行添加</p>
  241. </div>
  242. <div class="bottom-video-box" v-if="rightButtonType == 3">
  243. <p class="top-title">
  244. <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
  245. <i>{{checkedSubject.deptName}}</i>
  246. </el-tooltip>
  247. <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
  248. <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
  249. </el-tooltip>
  250. </p>
  251. <div class="video-for-max-box scrollbar-box" v-if="checkedSubject.videoData[0]">
  252. <div class="switch-for-big-box" v-for="(item,index) in checkedSubject.videoData" :key="index">
  253. <video :id="item.divId" ref="videoRef" autoplay controls muted width="490px" height="262px"></video>
  254. <p class="el-icon-full-screen position-p" @click="videoFullScreen(index)"></p>
  255. </div>
  256. </div>
  257. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data.png" v-if="!checkedSubject.videoData[0]">
  258. <p class="null-text-p" v-if="!checkedSubject.videoData[0]">暂无视频监控信息,请在更多操作-物联设备配置中进行添加</p>
  259. </div>
  260. <div class="bottom-alarm-box" v-if="rightButtonType == 4">
  261. <p class="top-title">
  262. <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
  263. <i>{{checkedSubject.deptName}}</i>
  264. </el-tooltip>
  265. <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
  266. <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
  267. </el-tooltip>
  268. </p>
  269. <div class="alarm-max-box" :class="hardwareData[0]?hardwareData[0].status==3||hardwareData[0].status==4?'BGcolorTypeA':'BGcolorTypeB':''">
  270. <img v-if="hardwareData[0]?hardwareData[0].status == 3:''" src="@/assets/ZDimages/integratedManagement/img_syslb_znsgbjzx.png" class="alarm-img">
  271. <div class="alarm-big-box" v-if="hardwareData[0]">
  272. <p>报警器编号:{{hardwareData[0].hardwareNum}}</p>
  273. <div class="alarm-position-box" >
  274. <el-switch
  275. v-if="hardwareData[0].status == 3"
  276. @click.native="changeIsNeedCaptchaAlarm(hardwareData[0])"
  277. class="switch captcha-img"
  278. :active-value="3"
  279. :inactive-value="4"
  280. active-color="#FF9900"
  281. inactive-color="#999"
  282. v-model="hardwareData[0].status"
  283. active-text="报警中"
  284. inactive-text="未报警"
  285. disabled
  286. ></el-switch>
  287. </div>
  288. <p :class="hardwareData[0].status==3||hardwareData[0].status==4?'colorTypeA':'colorTypeB'">{{hardwareData[0].status==3||hardwareData[0].status==4?'在线':'离线'}}</p>
  289. </div>
  290. <div class="alarm-big-box" v-if="!hardwareData[0]">
  291. <p>未绑定报警器</p>
  292. </div>
  293. </div>
  294. <div class="alarm-title-box">
  295. <p>报警记录</p>
  296. <p v-hasPermi="['chemical:hxpAlarmRecord:list']" @click="goAlarmRecord">更多>></p>
  297. </div>
  298. <el-table class="subject-alarm-time" style="margin-bottom:10px;" border :data="tableList" ref="multipleTable">
  299. <el-table-column label="报警时间" align="center" prop="alarmTime"/>
  300. <el-table-column label="处理状态" align="center" prop="operate" width="100"/>
  301. <el-table-column label="处理人" align="center" prop="handlingUserName" width="90"/>
  302. </el-table>
  303. <pagination
  304. v-show="totalTwo>0"
  305. :total="totalTwo"
  306. :page.sync="queryParamsTwo.page"
  307. :limit.sync="queryParamsTwo.pageSize"
  308. @pagination="getHxpAlarmRecordNoAuthList"
  309. />
  310. </div>
  311. <div class="bottom-entrance-box" v-if="rightButtonType == 5">
  312. <p class="top-title">
  313. <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
  314. <i>{{checkedSubject.deptName}}</i>
  315. </el-tooltip>
  316. <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
  317. <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
  318. </el-tooltip>
  319. </p>
  320. <div class="entrance" :class="item.operate.code==2?'BGentrance_l_yes':'BGentrance_l_no'" v-for="(item,index) in entranceList" v-if="item.operate">
  321. <img class="entrance_c" v-if="item.operate.code==2" src="@/assets/ZDimages/integratedManagement/icon_znmj_zx.png">
  322. <img class="entrance_c" v-if="item.operate.code!=2" src="@/assets/ZDimages/integratedManagement/icon_znmj_lx.png">
  323. <div class="entrance_r">门禁编号:{{item.hardwareNum}}</div>
  324. <p :class="item.operate.code==2?'entrance_l_yes':'entrance_l_no'">{{item.operate.code==2?'在线':'离线'}}</p>
  325. </div>
  326. <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data.png" v-if="entranceList.length<=0">
  327. <p class="null-text-p" v-if="entranceList.length<=0">暂无智能门禁信息,请在更多操作-物联设备配置中进行添加</p>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. <add-subject v-if="pageType == 2" :subjectData="subjectData"></add-subject>
  334. <device-list v-if="pageType == 3" :subjectData="subjectData"></device-list>
  335. <admission-configuration v-if="pageType == 4" :subjectData="subjectData"></admission-configuration>
  336. <association-configuration v-if="pageType == 5" :subjectData="subjectData"></association-configuration>
  337. <info-page v-if="pageType == 6" :newData="newData"></info-page>
  338. <!--播放文字窗口-->
  339. <el-dialog title="广播系统" :visible.sync="open" width="500px" append-to-body>
  340. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  341. <el-form-item label="播放文字" prop="txt">
  342. <el-input v-model="form.txt" placeholder="请输入播放文字" />
  343. </el-form-item>
  344. <el-form-item label="播报方式" prop="type">
  345. <el-radio-group v-model="form.type">
  346. <el-radio :label="1">文字</el-radio>
  347. <el-radio :label="2">音频</el-radio>
  348. </el-radio-group>
  349. </el-form-item>
  350. </el-form>
  351. <div slot="footer" class="dialog-footer dialog-footer-box">
  352. <p class="dialog-footer-button-null"></p>
  353. <p class="dialog-footer-button-info" @click="cancel">取消</p>
  354. <p class="dialog-footer-button-primary" @click="submitFormOne">提交</p>
  355. <p class="dialog-footer-button-null"></p>
  356. </div>
  357. </el-dialog>
  358. <!--导入窗口-->
  359. <el-dialog title="导入数据" :visible.sync="importOpen" @close="importOpenOff" width="600px" append-to-body class="checkItemLibrary-dialog-box">
  360. <el-upload
  361. class="teacher-import-dialog-upLoad-box"
  362. :drag="true"
  363. :data="upImportData"
  364. :action="uploadImgUrl"
  365. :show-file-list="false"
  366. :on-success="handleAvatarSuccess"
  367. :headers="headers"
  368. :before-upload="beforeAvatarUpload">
  369. <i class="el-icon-upload"></i>
  370. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  371. <div class="el-upload__tip" slot="tip">仅允许导入xls、xlsx、格式文件。<span style="color:#0183FA;cursor: pointer" v-hasPermi="['system:user_teacher:exceltemplate']" @click="importTemplate">下载模板</span></div>
  372. <div class="el-upload-text-box" slot="tip" v-if="getImportData.downFile">
  373. <div class="img-text-box">
  374. <img src="@/assets/ZDimages/integratedManagement/icon_dr_wj.png">
  375. <p>{{getImportData.textName}}</p>
  376. </div>
  377. <p class="text-p">数据导入成功 <span style="color:#0183FA;">{{getImportData.successNum}}</span> 条,失败 <span style="color:#FF6464 ;">{{getImportData.failureNum}}</span> 条</p>
  378. <div class="img-text-box" v-if="getImportData.failureNum">
  379. <img src="@/assets/ZDimages/integratedManagement/icon_dr_sj.png">
  380. <p style="color:#0183FA;cursor: pointer;" @click="failureExcel">点击下载失败数据报表</p>
  381. </div>
  382. </div>
  383. </el-upload>
  384. <div slot="footer" class="dialog-footer dialog-footer-box">
  385. <p class="dialog-footer-button-null"></p>
  386. <p class="dialog-footer-button-primary" @click="importOpenOff">提交</p>
  387. <p class="dialog-footer-button-null"></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 "@/apiDemo/laboratory/hardware";
  395. import mqtt from 'mqtt'
  396. import flvjs from 'flv.js'
  397. import { hardWareControl,alarmControl } from "@/apiDemo/laboratory/hardware";
  398. import {
  399. updateSubject,
  400. mangerVoice,
  401. startUrl,
  402. queryHardByTypeList, subjectTriggerModes,
  403. } from '@/apiDemo/laboratory/subject'
  404. import addSubject from "./addSubject.vue";
  405. import deviceList from "./deviceList.vue";
  406. import admissionConfiguration from "./admissionConfiguration.vue";
  407. import associationConfiguration from "./associationConfiguration.vue";
  408. import infoPage from "./infoPage.vue";
  409. import { getHxpAlarmRecordNoAuthList,getEnablelist} from "@/apiDemo/medicUniversity-3_1/index";
  410. import { getToken } from "@/utils/auth";
  411. import store from '@/store'
  412. /********************** V3 **********************/
  413. import { getDeptDropList,laboratoryClassTypeGetList,laboratoryClassLevelGetList } from "@/api/commonality/permission";
  414. import {
  415. laboratorySubRelInfoList,
  416. laboratorySubRelInfoGetDetailInfo,
  417. laboratorySubRelInfoGetDetailDelete,
  418. laboratorySubRelInfoGetHazardSubRelInfo
  419. } from '@/api/integratedManagement/index'
  420. import { chemicalCabinetGetDoorList } from '@/api/chemicalManage'
  421. export default {
  422. filters:{
  423. ellipsis(value){
  424. if (!value) return '';
  425. if (value.length > 6) {
  426. return value.slice(0,6) + '...'
  427. }
  428. return value
  429. }
  430. },
  431. name: "subject",
  432. components: {
  433. addSubject,
  434. deviceList,
  435. admissionConfiguration,
  436. associationConfiguration,
  437. infoPage
  438. },
  439. data(){
  440. return{
  441. uploadImgUrl: window.location.href.split('://')[0]+'://' + this.judgmentNetworkReturnAddress() + "/laboratory/subject/importSubData", // 上传地址
  442. headers: {
  443. Authorization: "Bearer " + getToken(),
  444. },
  445. //导入弹层开关
  446. importOpen:false,
  447. //导入数据
  448. upImportData:{
  449. sysUserEnable:true,
  450. upDate:false,
  451. },
  452. getImportData:{
  453. downFile:false,
  454. successNum:0,
  455. failureNum:0,
  456. textName:"",
  457. },
  458. pageType:1,
  459. // 遮罩层
  460. loading: true,
  461. // 显示搜索条件
  462. showSearch: true,
  463. // 总条数
  464. total: 0,
  465. // 查询参数
  466. queryParams: {
  467. page: 1,
  468. pageSize:20,
  469. searchValue:'',
  470. deptId:'',
  471. typeId:'',
  472. levelId:'',
  473. },
  474. // 实验室表格数据
  475. subjectList: [],
  476. //学院列表
  477. deptOptions:[],
  478. //当前选中实验室
  479. checkedSubject:{},
  480. //当前选中右侧按钮
  481. rightButtonType:1,
  482. //编辑实验室数据
  483. subjectData:{},
  484. // 临时保存排序
  485. orderNum:"",
  486. //播放文字的实验室id
  487. subId:"",
  488. open:false,
  489. form:{},
  490. //智能门禁
  491. entranceList:[
  492. {
  493. status:1,
  494. name:'门禁名称',
  495. num:'XD12345678912'
  496. },
  497. {
  498. status:0,
  499. name:'门禁名称',
  500. num:'XD12345678912'
  501. }
  502. ],
  503. rules:{
  504. txt:[
  505. {required: true, message: '请输入播放文字', trigger: 'blur'},
  506. { required: true, message: "请输入播放文字", validator: this.spaceJudgment, trigger: "blur" }
  507. ],
  508. type:[
  509. {required: true, message: '请选择播报方式', trigger: 'blur'}
  510. ],
  511. },
  512. newData:{
  513. },
  514. //MQTT请求参数-传感器
  515. mtopic:"lab/function/data",
  516. //MQTT请求参数-硬件
  517. mtopicOne:"lab/hardware/data",
  518. //MQTT请求参数-传感器-预案
  519. mtopicTow:"lab/riskPlan/trigger/notice",
  520. msg:"",
  521. client:{},
  522. videoList:[],
  523. //警报数据
  524. totalTwo:0,
  525. tableList:[],
  526. queryParamsTwo:{
  527. page:1,
  528. pageSize:20,
  529. },
  530. hardwareData:[],
  531. //mqtt实验室id
  532. mqttIdList:[],
  533. //字典排风扇数组
  534. fanList:[],
  535. selectTriggerList:[],//预案触发下,预案数据存储
  536. //分类数据
  537. typeList:[],
  538. //分级数据
  539. levelList:[],
  540. }
  541. },
  542. created() {
  543. },
  544. mounted(){
  545. //获取院系列表
  546. this.getDeptDropList();
  547. //获取分类列表
  548. this.laboratoryClassTypeGetList();
  549. //获取分级列表
  550. this.laboratoryClassLevelGetList();
  551. //获取列表数据
  552. this.getList();
  553. //字典配置初始化
  554. this.dictsInitialize();
  555. // this.queryHardByTypeList();
  556. // this.subscriptionMQTT();
  557. },
  558. methods:{
  559. tableButton(row){
  560. let self = this;
  561. this.$confirm(`是否确认操作此设备`, "提示", {
  562. confirmButtonText: "确定",
  563. cancelButtonText: "取消",
  564. type: "warning"
  565. }).then(async () => {
  566. controlSwitch({id:row.id}).then(response => {
  567. self.msgSuccess(response.msg);
  568. });
  569. }).catch(() => {
  570. })
  571. },
  572. //查询当前用户下的预案触发数据
  573. selectTriggerFun(data){
  574. let self = this;
  575. let dataArr=data;
  576. let list=JSON.parse(localStorage.getItem('selectTriggerList'));
  577. for(let i=0;i<list.length;i++){
  578. if(self.subId==list[i].subId){//如果当前选中的实验室和预案触发的实验室id
  579. for(let b=0;b<dataArr.length;b++){
  580. if(list[i].funNum==dataArr[b].funNum){
  581. if(list[i].minMonitor<dataArr[b].roundVlue<list[i].maxMonitor){//传感器值正常
  582. dataArr[b].type=1
  583. }else{//传感器值异常
  584. }
  585. }
  586. }
  587. }
  588. }
  589. return dataArr;
  590. },
  591. /** 查询字典数据列表 */
  592. dictsInitialize() {
  593. this.getDicts("trigger_modes").then(response => {
  594. this.$set(this,'fanList',response.data);
  595. });
  596. },
  597. goAlarmRecord(){
  598. this.$router.push({
  599. path: `/chemicalLibrary/alarmRecord`,
  600. })
  601. },
  602. //智能门禁
  603. queryHardByTypeList(){
  604. let _this=this;
  605. let obj={
  606. subjectId:this.subId,
  607. type:'HK_DOOR',
  608. }
  609. queryHardByTypeList(obj).then( response => {
  610. let res=response.data;
  611. _this.entranceList=res;
  612. });
  613. },
  614. //报警器开启关闭方法
  615. changeIsNeedCaptchaAlarm(row){
  616. let self = this;
  617. if(row.status!=3 && row.status!=4){
  618. return
  619. }
  620. let text = row.status==3?'关闭':(row.status==4?'开启':'')
  621. this.$confirm(`是否`+text+`此设备`, "提示", {
  622. confirmButtonText: "确定",
  623. cancelButtonText: "取消",
  624. type: "warning"
  625. }).then(async () => {
  626. self.alarmControl(row)
  627. }).catch(() => {
  628. })
  629. },
  630. //开关按钮
  631. alarmControl(row){
  632. let switchData = {
  633. id:row.id,
  634. switchVal:row.status==3?'close':(row.status==4?'open':'')
  635. };
  636. alarmControl(switchData).then(response => {
  637. if(response.code==200){
  638. row.status = row.status==3?4:(row.status==4?3:'')
  639. }
  640. });
  641. },
  642. //获取实验室绑定报警器设备数据
  643. getEnablelist(){
  644. let obj = {
  645. subjectId:this.subId,
  646. type:"AI_ALARM"
  647. }
  648. getEnablelist(obj).then(response => {
  649. this.hardwareData = response.rows;
  650. });
  651. },
  652. //获取实验室报警列表数据
  653. getHxpAlarmRecordNoAuthList(){
  654. this.queryParamsTwo.subId = this.subId;
  655. getHxpAlarmRecordNoAuthList(this.queryParamsTwo).then(response => {
  656. this.totalTwo = response.total;
  657. this.tableList = response.rows;
  658. });
  659. },
  660. //播放文字
  661. handleAdd(id) {
  662. this.open = true;
  663. this.subId = id;
  664. },
  665. // 取消按钮
  666. cancel() {
  667. this.form = {};
  668. this.open = false;
  669. },
  670. /*播放文字*/
  671. submitFormOne(){
  672. this.$refs["form"].validate(valid => {
  673. if (valid) {
  674. let id = this.subId;
  675. mangerVoice(this.form,id).then(response => {
  676. this.msgSuccess("播放成功");
  677. this.open = false;
  678. this.getList();
  679. });
  680. }
  681. });
  682. },
  683. // 页面切换
  684. clickPage(type,row){
  685. if(this.pageType != type){
  686. if(type == 1){
  687. //列表页面
  688. this.pageType = type;
  689. this.getList();
  690. this.$set(this,'subjectData',{})
  691. }else if(type == 2){
  692. //新增页面
  693. this.pageType = type;
  694. }else if(type == 3){
  695. //编辑页面
  696. //this.pageType = 2;
  697. this.editFun(row);
  698. //this.$set(this,'subjectData',row)
  699. }else if(type == 4){
  700. this.pageType = 3;
  701. this.$set(this,'subjectData',row)
  702. }else if(type == 5){
  703. this.pageType = 4;
  704. this.$set(this,'subjectData',row)
  705. }else if(type == 6){
  706. //关联配置-详情
  707. laboratorySubRelInfoGetHazardSubRelInfo({infoId:row.infoId}).then(response => {
  708. this.$set(this,'subjectData',response.data);
  709. this.pageType = 5;
  710. });
  711. }else if(type == 7){
  712. this.subjectInfoTwo(row);
  713. // this.$set(this,'subjectData',row)
  714. }
  715. }
  716. },
  717. //实验室编辑
  718. editFun(row){
  719. laboratorySubRelInfoGetDetailInfo({infoId:row.infoId}).then(response => {
  720. this.$set(this,'subjectData',response.data)
  721. this.pageType = 2;
  722. })
  723. },
  724. //获取实验室详情
  725. subjectInfoTwo(row){
  726. let self = this;
  727. let type = 0; //硬件 //0全部
  728. laboratorySubRelInfoGetDetailInfo({infoId:row.infoId}).then(response => {
  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. if(row.state.code!=3 && row.state.code!=4){
  837. return
  838. }
  839. let text = row.state.code==3?'关闭':(row.state.code==4?'开启':'')
  840. this.$confirm(`是否`+text+`此设备`, "提示", {
  841. confirmButtonText: "确定",
  842. cancelButtonText: "取消",
  843. type: "warning"
  844. }).then(async () => {
  845. self.switchChange(row)
  846. }).catch(() => {
  847. })
  848. },
  849. //点击开关按钮开启的时候充电调用硬件状态
  850. subjectTriggerModes(row){
  851. let self=this;
  852. subjectTriggerModes(row.id).then(response => {
  853. if(response.code==200){
  854. for(let b=0;b<self.fanList.length;b++){
  855. if(self.fanList[b].value==response.data.triggerModes){
  856. for(let i=0;i<self.checkedSubject.VOlist.length;i++){
  857. if(row.id == self.checkedSubject.VOlist[i].id){
  858. this.$set(self.checkedSubject.VOlist[i],'dictLabel',self.fanList[b].label);
  859. this.$set(self.checkedSubject.VOlist[i],'triggerModes',response.data.triggerModes);
  860. }
  861. }
  862. }
  863. }
  864. }
  865. });
  866. },
  867. //开关按钮
  868. switchChange(row){
  869. let switchData = {
  870. id:row.id,
  871. switchVal:row.state.code==3?'close':(row.state.code==4?'open':'')
  872. };
  873. hardWareControl(switchData).then(response => {
  874. if(response.code==200){
  875. this.msgSuccess("操作成功")
  876. }
  877. });
  878. },
  879. //切换实验室展示数据
  880. rightButtonClick(type){
  881. let self = this;
  882. if(this.rightButtonType != type){
  883. this.rightButtonType = type;
  884. this.videoOff();
  885. if(type == 3){
  886. let self = this;
  887. let list = [];
  888. if(self.checkedSubject.labHardwareVOList){
  889. for(let i=0;i<self.checkedSubject.labHardwareVOList.length;i++){
  890. if(self.checkedSubject.labHardwareVOList[i].hardwareTypeEnum.enumName == 'VIDEO_MONITOR'){
  891. list.push(self.checkedSubject.labHardwareVOList[i].hardwareNUM);
  892. }
  893. }
  894. if(list[0]){
  895. let obj = {
  896. count:"100",
  897. deviceIds:list+'',
  898. page:"1",
  899. };
  900. let urlText = window.location.href;
  901. if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
  902. startUrl(obj).then(res => {
  903. if(res.code == 200){
  904. if(!res.data[0]){
  905. this.msgError("视频配置异常请联系管理员")
  906. return
  907. }
  908. let newData = res.data;
  909. let videoList = [];
  910. for(let i=0;i<newData.length;i++){
  911. let obj = {
  912. name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
  913. videoType:"flv",
  914. divId:'divId'+i,
  915. url:newData[i].ws_flv,
  916. }
  917. videoList.push(obj)
  918. }
  919. this.$set(this.checkedSubject,'videoData',videoList);
  920. if(this.rightButtonType == 3){
  921. setTimeout(function(){
  922. self.videoFunction();
  923. },1000);
  924. }
  925. }
  926. });
  927. }else{
  928. startUrl(obj).then(res => {
  929. if(res.code == 200){
  930. if(!res.data[0]){
  931. this.msgError("视频配置异常请联系管理员")
  932. return
  933. }
  934. let newData = res.data;
  935. let videoList = [];
  936. for(let i=0;i<newData.length;i++){
  937. let text = localStorage.getItem('cameraUrl');
  938. let url = newData[i].ws_flv;
  939. url = url.split("rtp/");
  940. let newUrl = text+'rtp/'+url[1];
  941. let obj = {
  942. name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
  943. videoType:"flv",
  944. divId:'divId'+i,
  945. url:newUrl,
  946. }
  947. videoList.push(obj)
  948. }
  949. this.$set(this.checkedSubject,'videoData',videoList);
  950. if(this.rightButtonType == 3){
  951. setTimeout(function(){
  952. self.videoFunction();
  953. },1000);
  954. }
  955. }
  956. });
  957. }
  958. }else{
  959. this.$set(this.checkedSubject,'videoData',[]);
  960. }
  961. }else{
  962. this.$set(this.checkedSubject,'videoData',[]);
  963. }
  964. }else if(type==2){
  965. for(let i=0;i<self.checkedSubject.VOlist.length;i++){
  966. if(self.checkedSubject.VOlist[i].hardwareTypeEnum.hardwareTypeCode == '2'){
  967. for(let b=0;b<self.fanList.length;b++){
  968. if(self.fanList[b].dictValue==self.checkedSubject.VOlist[i].triggerModes){
  969. self.checkedSubject.VOlist[i].dictLabel=self.fanList[b].dictLabel
  970. }
  971. }
  972. }
  973. }
  974. }else if(type==5){
  975. this.queryHardByTypeList();
  976. }
  977. }
  978. },
  979. //选中实验室
  980. handleCurrentChange(val){
  981. console.log(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. page: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. laboratorySubRelInfoGetDetailInfo({infoId:id}).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. let self = this;
  1033. switch (command) {
  1034. case "1":
  1035. //关联配置
  1036. this.clickPage(6,row);
  1037. break;
  1038. case "2":
  1039. //物联配置
  1040. this.clickPage(4,row);
  1041. break;
  1042. case "3":
  1043. //准入配置
  1044. this.clickPage(5,row);
  1045. break;
  1046. case "4":
  1047. //编辑
  1048. this.clickPage(3,row);
  1049. break;
  1050. case "5":
  1051. //删除
  1052. self.$confirm('是否确认删除?', "", {
  1053. confirmButtonText: "确定",
  1054. cancelButtonText: "取消",
  1055. type: "warning"
  1056. }).then(function() {
  1057. laboratorySubRelInfoGetDetailDelete({infoId:row.infoId}).then(response => {
  1058. self.msgSuccess(response.message);
  1059. self.getList();
  1060. });
  1061. }).then(() => {}).catch(() => { });
  1062. break;
  1063. default:
  1064. break;
  1065. }
  1066. },
  1067. //保存当前排序
  1068. liveSort(row){
  1069. let obj = {
  1070. orderNum:row.orderNum
  1071. }
  1072. this.orderNum = JSON.parse(JSON.stringify(obj));
  1073. },
  1074. //编辑排序
  1075. editSort(row){
  1076. let self = this;
  1077. if(row.orderNum != this.orderNum.orderNum){
  1078. self.$confirm('是否确认修改排序?', "", {
  1079. confirmButtonText: "确定",
  1080. cancelButtonText: "取消",
  1081. type: "warning"
  1082. }).then(function() {
  1083. let obj = {
  1084. id:row.id,
  1085. orderNum:row.orderNum,
  1086. };
  1087. updateSubject(obj).then(response => {
  1088. self.msgSuccess("修改成功");
  1089. self.getList();
  1090. });
  1091. }).then(() => {}).catch(() => {
  1092. let obj = JSON.parse(JSON.stringify(self.orderNum));
  1093. row.orderNum = obj.orderNum
  1094. });
  1095. }
  1096. },
  1097. /** 搜索按钮操作 */
  1098. handleQuery() {
  1099. this.queryParams.page = 1;
  1100. this.getList();
  1101. },
  1102. /** 重置按钮操作 */
  1103. resetQuery() {
  1104. this.$set(this,'queryParams',{
  1105. page: 1,
  1106. pageSize:20,
  1107. searchValue:'',
  1108. deptId:'',
  1109. typeId:'',
  1110. levelId:'',
  1111. });
  1112. // this.resetForm("queryForm");
  1113. this.handleQuery();
  1114. },
  1115. /** 查询实验室列表 */
  1116. getList() {
  1117. this.loading = true;
  1118. // this.offMQTT();
  1119. laboratorySubRelInfoList(this.queryParams).then(response => {
  1120. this.subjectList = response.data.records;
  1121. this.total = response.data.total;
  1122. this.loading = false;
  1123. if(response.data.records[0]){
  1124. this.$refs.multipleTable.setCurrentRow(response.data.records[0]);
  1125. this.subjectInfo(response.data.records[0].infoId);
  1126. }
  1127. let idList = [];
  1128. for(let i=0;i<response.data.records.length;i++){
  1129. idList.push(response.data.records[i].id)
  1130. }
  1131. this.$set(this,'mqttIdList',idList);
  1132. // this.subscriptionMQTT();
  1133. });
  1134. },
  1135. /** 查询学院列表 */
  1136. getDeptDropList() {
  1137. getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
  1138. this.$set(this, 'deptOptions', response.data)
  1139. });
  1140. },
  1141. //MQTT订阅
  1142. subscriptionMQTT(){
  1143. let self = this;
  1144. this.client = mqtt.connect(localStorage.getItem('mqttUrl'), {
  1145. username: localStorage.getItem('mqttUser'),
  1146. password:localStorage.getItem('mqttPassword')
  1147. });
  1148. this.client.on("connect", e =>{
  1149. //连接成功
  1150. this.client.subscribe(this.mtopic+self.subId, (err) => {
  1151. if (!err) {
  1152. //"订阅成功:" + this.mtopic+self.subId
  1153. }
  1154. });
  1155. this.client.subscribe(this.mtopicOne+self.subId, (err) => {
  1156. if (!err) {
  1157. //"订阅成功:" + this.mtopicOne+self.subId
  1158. }
  1159. });
  1160. });
  1161. this.client.on("message", (topic, message) => {
  1162. if (message){
  1163. let data = JSON.parse(message)
  1164. //"MQTT----message",data
  1165. if(data.data.subId){
  1166. //传感器
  1167. //"传感器",data.data.subId,'---------',data
  1168. if(self.checkedSubject.id){
  1169. if(data.data.subId&&data.data.subId == self.checkedSubject.id){
  1170. self.$set(self.checkedSubject,'sensorFunctionStatusList',data.data.functionStatuses);
  1171. self.$set(self.checkedSubject.sensorFunctionStatusList[0],'sendDate',data.sendDate);
  1172. //判断传感器是否在线如果不在线type为2
  1173. self.checkedSubject.sensorFunctionStatusList.forEach(function(item) {
  1174. if(item.formatVal.indexOf("--") != -1){
  1175. item.type=2
  1176. }
  1177. })
  1178. self.checkedSubject.sensorFunctionStatusList=self.selectTriggerFun(self.checkedSubject.sensorFunctionStatusList)
  1179. }
  1180. }
  1181. if(self.newData.id){
  1182. if(data.data.subId&&data.data.subId == self.newData.id){
  1183. self.$set(self.newData,'sensorFunctionStatusList',data.data.functionStatuses);
  1184. self.$set(self.newData.sensorFunctionStatusList[0],'sendDate',data.sendDate);
  1185. }
  1186. }
  1187. }else{
  1188. //硬件
  1189. for (let i = 0; i < data.data.length; i++) {
  1190. if (self.checkedSubject.VOlist) {
  1191. for (let k = 0; k < self.checkedSubject.VOlist.length; k++) {
  1192. if (self.checkedSubject.VOlist[k].id == data.data[i].num) {
  1193. if (data.data[i].hardwareOperate == 'CLOSE') {
  1194. self.checkedSubject.VOlist[k].state.code = 4;
  1195. } else if (data.data[i].hardwareOperate == 'OPEN') {
  1196. self.checkedSubject.VOlist[k].state.code = 3;
  1197. } else if (data.data[i].hardwareOperate == 'OFFLINE') {
  1198. self.checkedSubject.VOlist[k].state.code = 0;
  1199. }
  1200. if(self.checkedSubject.VOlist[k].hardwareTypeEnum.hardwareTypeCode == '2'&&
  1201. self.checkedSubject.VOlist[k].pcType == '0'){
  1202. self.subjectTriggerModes(self.checkedSubject.VOlist[k])
  1203. }
  1204. }
  1205. }
  1206. }
  1207. if(self.newData.labHardwareVOList){
  1208. for(let k=0;k<self.newData.labHardwareVOList.length;k++){
  1209. if(self.newData.labHardwareVOList[k].id == data.data[i].num){
  1210. if(data.data[i].hardwareOperate == 'CLOSE'){
  1211. self.newData.labHardwareVOList[k].state.code = 4;
  1212. }else if(data.data[i].hardwareOperate == 'OPEN'){
  1213. self.newData.labHardwareVOList[k].state.code = 3;
  1214. }else if(data.data[i].hardwareOperate == 'OFFLINE'){
  1215. self.newData.labHardwareVOList[k].state.code = 0;
  1216. }
  1217. }
  1218. }
  1219. }
  1220. }
  1221. }
  1222. }
  1223. });
  1224. },
  1225. //取消订阅关闭MQTT连接
  1226. offMQTT(){
  1227. let self = this;
  1228. if (self.mqttIdList[0]){
  1229. // for(let i=0;i<self.mqttIdList.length;i++){
  1230. // self.client.unsubscribe(self.mtopic+self.mqttIdList[i], error => {
  1231. // if (error) {
  1232. // }
  1233. // })
  1234. // self.client.unsubscribe(self.mtopicOne+self.mqttIdList[i], error => {
  1235. // if (error) {
  1236. // }
  1237. // })
  1238. // }
  1239. self.client.unsubscribe(self.mtopic+self.subId, error => {
  1240. if (error) {
  1241. }
  1242. })
  1243. self.client.unsubscribe(self.mtopicOne+self.subId, error => {
  1244. if (error) {
  1245. }
  1246. })
  1247. self.client.end();
  1248. self.client = {};
  1249. }
  1250. },
  1251. //视频方法
  1252. videoFunction(){
  1253. let self = this;
  1254. // self.videoList = [];
  1255. for(let i=0;i<self.checkedSubject.videoData.length;i++){
  1256. let obj = {
  1257. player :{},
  1258. flvPlayer:{}
  1259. };
  1260. obj.player = document.getElementById(self.checkedSubject.videoData[i].divId);
  1261. // if (flvjs.isSupported()) {
  1262. obj.flvPlayer = flvjs.createPlayer(
  1263. {
  1264. // isLive: true, //=> 是否为直播流
  1265. // hasAudio: false, //=> 是否开启声音
  1266. type: self.checkedSubject.videoData[i].videoType, //媒体类型 flv 或 mp4
  1267. url: self.checkedSubject.videoData[i].url //视频流地址
  1268. },
  1269. {
  1270. enableStashBuffer: true,//启用 IO 存储缓冲区。 如果您需要实时流播放(最小延迟),请设置为 false,但如果存在网络抖动,则可能会停止。
  1271. stashInitialSize: 128,//IO 存储缓冲区初始大小。 默认值为 384KB。 指示合适的大小可以改善视频加载/搜索时间。
  1272. isLive: true,//是否是直播
  1273. lazyLoadRecoverDuration: 30,//指示以秒为单位的lazyLoad 恢复时间边界。
  1274. autoCleanupSourceBuffer: true,//进行自动清理
  1275. autoCleanupMaxBackwardDuration: 3 * 60,//3 * 60 当向后缓冲持续时间超过这个值(以秒为单位)时,对 SourceBuffer 进行自动清理
  1276. autoCleanupMinBackwardDuration: 2 * 60,//2 * 60 指示在执行自动清理时为后向缓冲区保留的持续时间(以秒为单位)。
  1277. }
  1278. );
  1279. self.videoList.push(obj);
  1280. // }
  1281. }
  1282. for(let i=0;i<self.videoList.length;i++){
  1283. self.videoList[i].flvPlayer.attachMediaElement(self.videoList[i].player);
  1284. self.videoList[i].flvPlayer.load(); //加载
  1285. self.videoList[i].flvPlayer.play(); //加载
  1286. }
  1287. },
  1288. //视屏全屏方法
  1289. videoFullScreen(index){
  1290. this.$refs.videoRef[index].webkitRequestFullScreen();
  1291. },
  1292. //断开视频流
  1293. videoOff(){
  1294. let self = this;
  1295. if(self.videoList[0]){
  1296. for(let i=0;i<self.videoList.length;i++){
  1297. self.videoList[i].flvPlayer.pause();
  1298. self.videoList[i].flvPlayer.unload();
  1299. self.videoList[i].flvPlayer.detachMediaElement();
  1300. self.videoList[i].flvPlayer.destroy();
  1301. self.videoList[i].flvPlayer = null;
  1302. }
  1303. self.videoList = [];
  1304. }
  1305. },
  1306. //查询安全分级
  1307. laboratoryClassLevelGetList(){
  1308. laboratoryClassLevelGetList({}).then(response=>{
  1309. if(response.code==200){
  1310. this.$set(this,'levelList',response.data);
  1311. }
  1312. })
  1313. },
  1314. //查询安全分类
  1315. laboratoryClassTypeGetList(){
  1316. laboratoryClassTypeGetList({}).then(response=>{
  1317. if(response.code==200){
  1318. this.$set(this,'typeList',response.data);
  1319. }
  1320. });
  1321. },
  1322. //****************************************导入功能**************************************
  1323. handleAvatarSuccess(res, file) {
  1324. if(res.code == 200){
  1325. this.getImportData.downFile = true
  1326. this.getImportData.successNum = res.data.successNum
  1327. this.getImportData.failureNum = res.data.failureNum
  1328. // this.importOpen = false;
  1329. // this.getList();
  1330. }else{
  1331. this.msgError(res.msg);
  1332. }
  1333. this.loading = false;
  1334. },
  1335. beforeAvatarUpload(file) {
  1336. let type = false;
  1337. if (file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.type == 'application/vnd.ms-excel') {
  1338. if(file.size> 5250000){
  1339. this.msgError('上传大小不能超过5M')
  1340. return false
  1341. }
  1342. this.getImportData.textName = file.name;
  1343. type = true;
  1344. this.loading = true;
  1345. }else{
  1346. this.$message.error('只能上传xls/xlsx格式文件');
  1347. type = false;
  1348. }
  1349. return type;
  1350. },
  1351. //导入页面关闭
  1352. importOpenOff(){
  1353. this.importOpen = false;
  1354. this.getImportData.downFile = false;
  1355. this.getImportData.successNum = 0;
  1356. this.getImportData.failureNum = 0;
  1357. this.getImportData.textName = "";
  1358. },
  1359. /** 导入按钮操作 */
  1360. importButton(item){
  1361. if(item.command == 1){
  1362. // 下载模板
  1363. this.download('/laboratory/subject/exportSubTemplate', {}, `实验室导入模板.xlsx`)
  1364. }else if(item.command == 2){
  1365. // 导入数据
  1366. this.importOpen = true;
  1367. }
  1368. },
  1369. /** 下载模板操作 */
  1370. importTemplate() {
  1371. this.download('/laboratory/subject/exportSubTemplate', {}, `实验室导入模板.xlsx`)
  1372. },
  1373. /*下载失败列表*/
  1374. failureExcel(){
  1375. this.download('/laboratory/subject/exportProblemData', {}, `实验室导入模板失败报表.xlsx`)
  1376. },
  1377. },
  1378. beforeDestroy() {
  1379. //清除定时器
  1380. let self = this;
  1381. self.videoOff();
  1382. self.offMQTT();
  1383. },
  1384. }
  1385. </script>
  1386. <style scoped lang="scss">
  1387. .subject{
  1388. flex:1;
  1389. display: flex!important;
  1390. flex-direction: column;
  1391. overflow: hidden;
  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;
  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. .subject-page{
  2121. .el-table{
  2122. .el-input--medium .el-input__inner{
  2123. height:26px;
  2124. line-height:26px;
  2125. width:55px;
  2126. text-align: center;
  2127. padding:0 10px;
  2128. }
  2129. }
  2130. .pagination-container{
  2131. height: 45px;
  2132. }
  2133. }
  2134. </style>