index.vue 78 KB

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