index.vue 77 KB

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