index.vue 67 KB

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