123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166 |
- <template>
- <div class="subject">
- <div class="subject-page" v-if="pageType == 1">
- <div class="subject-page-min">
- <div :class="versionField() == 'xiBeiNongLinDaXue'?'left-subject-list-flex':''" class="left-subject-list" >
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" style="border-bottom:1px solid #D8D8D8">
- <el-form-item label="" prop="searchValue">
- <el-input
- v-model="queryParams.searchValue"
- placeholder="实验室/房间号"
- clearable
- style="width:150px;margin-left:20px;"
- />
- </el-form-item>
- <el-form-item label="" prop="deptId">
- <el-select v-model="queryParams.deptId" placeholder="请选择学院" style="width:150px;">
- <el-option
- v-for="dict in deptOptions"
- :key="dict.deptId"
- :label="dict.deptName"
- :value="dict.deptId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="typeId">
- <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" style="width:160px;">
- <el-option
- v-for="dict in typeList"
- :key="dict.typeId"
- :label="dict.typeName"
- :value="dict.typeId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="levelId">
- <el-select v-model="queryParams.levelId" placeholder="请选择安全分级" style="width:160px;">
- <el-option
- v-for="dict in levelList"
- :key="dict.levelId"
- :label="dict.levelName"
- :value="dict.levelId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item style="float: right;margin-right:20px;" v-hasPermi="['laboratory:subject:import']">
- <el-dropdown @command="importButton">
- <div class="form-dropdown-box">
- <img src="@/assets/ZDimages/integratedManagement/icon_jzgxx_dr.png">
- <p>导入</p>
- <img src="@/assets/ZDimages/integratedManagement/icon_jzggl_xljt.png">
- </div>
- <el-dropdown-menu slot="dropdown">
- <!--<el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:1}">下载模板</el-dropdown-item>-->
- <!--<el-dropdown-item style="margin:0 10px;color:#333;" :command="{command:2}">导入数据</el-dropdown-item>-->
- <el-dropdown-item :command="{command:1}">下载模板</el-dropdown-item>
- <el-dropdown-item :command="{command:2}">导入数据</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </el-form-item>
- <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
- <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
- <p class="page-submit-common-style-button"
- style="float: right;margin-right:20px;"
- @click="clickPage(2)"
- v-hasPermi="['laboratory:subject:add']"
- >新增</p>
- </el-form>
- <div class="table_border">
- <el-table class="table-box" ref="multipleTable" border :data="subjectList" highlight-current-row @current-change="handleCurrentChange" style="cursor: pointer;">
- <el-table-column label="排序" align="left" prop="orderNum" width="80">
- <template slot-scope="scope">
- <el-input maxlength="4" type="text" oninput ="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.orderNum" @focus="liveSort(scope.row)" @blur="editSort(scope.row)"></el-input>
- </template>
- </el-table-column>
- <el-table-column label="实验室名称" align="left" prop="subName" show-overflow-tooltip/>
- <el-table-column label="房间号" align="left" prop="roomName" :width="versionField() == 'xiBeiNongLinDaXue'?250:150" show-overflow-tooltip/>
- <el-table-column label="学院" align="left" prop="deptName" :width="versionField() == 'xiBeiNongLinDaXue'?200:130" show-overflow-tooltip/>
- <el-table-column label="分类/分级" align="left" prop="levelName" :width="versionField() == 'xiBeiNongLinDaXue'?200:150" show-overflow-tooltip>
- <template slot-scope="scope">
- <span >{{scope.row.typeName}}/</span>
- <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
- </template>
- </el-table-column>
- <el-table-column label="实验室责任人" align="left" prop="adminName" :width="versionField() == 'xiBeiNongLinDaXue'?180:130" show-overflow-tooltip/>
- <el-table-column label="安全责任人" align="left" prop="safeUserNames" :width="versionField() == 'xiBeiNongLinDaXue'?180:130" show-overflow-tooltip/>
- <el-table-column label="操作" align="left" :width="versionField() == 'xiBeiNongLinDaXue'?180:140" >
- <template slot-scope="scope">
- <div class="table-button-box">
- <p class="table-button-null"></p>
- <p class="table-button-p" v-hasPermi="['laboratory:subject:query']" @click="clickPage(7,scope.row)">详情</p>
- <el-dropdown trigger="click" size="mini" @command="(command) => handleCommand(command, scope.row)">
- <p class="table-button-p">更多>></p>
- <el-dropdown-menu slot="dropdown" style="margin:0!important;">
- <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>
- <el-dropdown-item v-if="versionField() != 'xiBeiNongLinDaXue'" style="height:36px;line-height:36px;width:90px;text-align: center" command="2">物联配置</el-dropdown-item>
- <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>
- <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>
- <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="5"
- v-hasPermi="['laboratory:subject:remove']">删除</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- <p class="table-button-null"></p>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.page"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- </div>
- </div>
- <div class="right-subject-box scrollbar-box" v-if="checkedSubject.id && versionField() != 'xiBeiNongLinDaXue'"
- :class="rightButtonType == 4?'overflow-box':''">
- <div class="top-button-box">
- <div :class="rightButtonType == 1 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(1)">传感器监测</div>
- <div :class="rightButtonType == 2 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(2)">物联控制</div>
- <div :class="rightButtonType == 3 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(3)">视频监控</div>
- <div :class="rightButtonType == 4 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(4)">声光报警</div>
- <div v-if="versionField() != 'suZhouDaXue'"
- :class="rightButtonType == 5 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(5)">智能门禁</div>
- </div>
- <!--传感器-->
- <div class="bottom-max-box" :class="rightButtonType == 4?'overflow-box':''">
- <div class="bottom-sensor-box" v-if="rightButtonType == 1">
- <p class="top-title">
- <el-tooltip class="item" effect="dark"
- v-if="checkedSubject.deptName"
- :content="checkedSubject.deptName" placement="bottom">
- <i>{{checkedSubject.deptName}}</i>
- </el-tooltip>
- <el-tooltip class="item" effect="dark"
- v-if="checkedSubject.subAddrr.buildName && checkedSubject.subAddrr.floorName"
- :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
- <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
- </el-tooltip>
- </p>
- <div class="sensor-for-max-box scrollbar-box" v-if="checkedSubject.sensorFunctionStatusList[0]">
- <div class="sensor-for-big-box"
- :class="item.type == 1 ? 'sensor-color-a' : (item.type == 2 ? 'sensor-color-b' : 'sensor-color-c')"
- v-if="item.funNum != 'huoyan'"
- v-for="(item,index) in checkedSubject.sensorFunctionStatusList" :key="index">
- <div class="sensor-for-min-box">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_wd.png" v-if="item.funNum == 'wendu'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_wd.png" v-if="item.funNum == 'fbwendu'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_sd.png" v-if="item.funNum == 'shidu'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_sd.png" v-if="item.funNum == 'fbshidu'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_eyht.png" v-if="item.funNum == 'co'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_eyht.png" v-if="item.funNum == 'fbco'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_jwnd.png" v-if="item.funNum == 'jiawan'">
- <img src="@/assets/ZDimages/integratedManagement/icon_sy_yqnd.png" v-if="item.funNum == 'o2'">
- <img src="@/assets/ZDimages/integratedManagement/icon_sy_yqnd.png" v-if="item.funNum == 'fbo2'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_yg.png" v-if="item.funNum == 'yanwu'">
- <img src="@/assets/ZDimages/integratedManagement/icon_sy_dqy.png" v-if="item.funNum == 'daqiya'">
- <img src="@/assets/ZDimages/integratedManagement/icon_syspz_voc.png" v-if="item.funNum == 'voc'">
- <img src="@/assets/ZDimages/integratedManagement/icon_syspz_voc.png" v-if="item.funNum == 'fbvoc'">
- <img src="@/assets/ZDimages/integratedManagement/icon_syspz_tvoc.png" v-if="item.funNum == 'tvoc'">
- <img src="@/assets/ZDimages/integratedManagement/icon_sy_mcnd.png" v-if="item.funNum == 'so2'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_yyhd.png" v-if="item.funNum == 'no1'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_dqy.png" v-if="item.funNum == 'fenchen'">
- <img src="@/assets/ZDimages/integratedManagement/icon_bj_qq.png" v-if="item.funNum == 'H2'">
- <img src="@/assets/ZDimages/integratedManagement/guangqi.png" v-if="item.funNum == 'guangqi'">
- <img src="@/assets/ZDimages/integratedManagement/lvqi.png" v-if="item.funNum == 'lvqi'">
- <img src="@/assets/ZDimages/integratedManagement/icon_syspz_jiaquan.png" v-if="item.funNum == 'jiaquan'">
- <img src="@/assets/ZDimages/integratedManagement/icon_syspz_hwcw.png" v-if="item.funNum == 'hwcwy'">
- <div>
- <el-tooltip class="item" effect="dark" :content="item.describe" placement="bottom">
- <p>{{item.describe|ellipsis}}</p>
- </el-tooltip>
- <p>{{item.formatVal}}</p>
- </div>
- </div>
- </div>
- </div>
- <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data.png" v-if="!checkedSubject.sensorFunctionStatusList[0]">
- <p class="null-text-p" v-if="!checkedSubject.sensorFunctionStatusList[0]">暂无环境监测信息,请在更多操作-物联设备配置中进行添加</p>
- <p class="bottom-text" v-if="checkedSubject.sensorFunctionStatusList[0]">数据上报时间:{{checkedSubject.sensorFunctionStatusList[0].sendDate}}</p>
- </div>
- <div class="bottom-switch-box" v-if="rightButtonType == 2">
- <p class="top-title">
- <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
- <i>{{checkedSubject.deptName}}</i>
- </el-tooltip>
- <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
- <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
- </el-tooltip>
- </p>
- <div class="switch-for-max-box scrollbar-box" v-show="checkedSubject.VOlist[0]" v-hasPermi="['laboratory:subcontrol:set']">
- <div class="switch-for-big-box" v-for="(item,index) in checkedSubject.VOlist" :key="index">
- <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'SWITCH'">
- <div class="switch-for-min-box_t">
- <p class="switch-for-min-title">{{item.hardwareName}}</p>
- <p class="switch-null-p" v-if="item.state.code != 3 && item.state.code != 4" >{{item.state.name}}</p>
- </div>
- <div class="switch-for-min-box_b">
- <el-switch
- v-if="item.state.code == 3||item.state.code == 4"
- class="switch"
- @click.native="changeIsNeedCaptcha(item)"
- v-model="item.state.code"
- :active-value="3"
- :inactive-value="4"
- active-text="开启"
- inactive-text="关闭"
- disabled>
- </el-switch>
- </div>
- </div>
- <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'AI_VENTILATION'">
- <div class="switch-for-min-box_t">
- <p class="switch-for-min-title">{{item.hardwareName}}</p>
- <p class="switch-null-p" v-if="item.state.code != 3 && item.state.code != 4 && item.pcType == 0">{{item.state.name}}</p>
- <p class="switch-pc-type-p" v-if="item.pcType == 1" @click="tableButton(item)">操作</p>
- </div>
- <div class="switch-for-min-box_b" v-if="item.pcType == 0">
- <p class="switch-null-ventilate" v-if="item.hardwareTypeEnum.hardwareTypeCode==2 && item.state.code==3">{{item.dictLabel}}</p>
- <el-switch
- v-if="item.state.code == 3||item.state.code == 4"
- class="switch"
- @click.native="changeIsNeedCaptcha(item)"
- v-model="item.state.code"
- :active-value="3"
- :inactive-value="4"
- active-text="开启"
- inactive-text="关闭"
- disabled>
- </el-switch>
- </div>
- </div>
- <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'ONE_MACHINE'">
- <p class="switch-for-min-title">广播系统</p>
- <p class="switch-for-min-button" @click="handleAdd(item.subId)">播放文字</p>
- </div>
- </div>
- </div>
- <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data.png" v-show="!checkedSubject.VOlist[0]">
- <p class="null-text-p" v-show="!checkedSubject.VOlist[0]">暂无物联控制信息,请在更多操作-物联设备配置中进行添加</p>
- </div>
- <div class="bottom-video-box" v-if="rightButtonType == 3">
- <p class="top-title">
- <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
- <i>{{checkedSubject.deptName}}</i>
- </el-tooltip>
- <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
- <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
- </el-tooltip>
- </p>
- <div class="video-for-max-box scrollbar-box" v-if="checkedSubject.videoData[0]">
- <div class="switch-for-big-box" v-for="(item,index) in checkedSubject.videoData" :key="index">
- <video :id="item.divId" ref="videoRef" autoplay controls muted width="490px" height="262px"></video>
- <p class="el-icon-full-screen position-p" @click="videoFullScreen(index)"></p>
- </div>
- </div>
- <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data.png" v-if="!checkedSubject.videoData[0]">
- <p class="null-text-p" v-if="!checkedSubject.videoData[0]">暂无视频监控信息,请在更多操作-物联设备配置中进行添加</p>
- </div>
- <div class="bottom-alarm-box" v-if="rightButtonType == 4">
- <p class="top-title">
- <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
- <i>{{checkedSubject.deptName}}</i>
- </el-tooltip>
- <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
- <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
- </el-tooltip>
- </p>
- <div class="alarm-max-box" :class="hardwareData[0]?hardwareData[0].status==3||hardwareData[0].status==4?'BGcolorTypeA':'BGcolorTypeB':''">
- <img v-if="hardwareData[0]?hardwareData[0].status == 3:''" src="@/assets/ZDimages/integratedManagement/img_syslb_znsgbjzx.png" class="alarm-img">
- <div class="alarm-big-box" v-if="hardwareData[0]">
- <p>报警器编号:{{hardwareData[0].hardwareNum}}</p>
- <div class="alarm-position-box" >
- <el-switch
- v-if="hardwareData[0].status == 3"
- @click.native="changeIsNeedCaptchaAlarm(hardwareData[0])"
- class="switch captcha-img"
- :active-value="3"
- :inactive-value="4"
- active-color="#FF9900"
- inactive-color="#999"
- v-model="hardwareData[0].status"
- active-text="报警中"
- inactive-text="未报警"
- disabled
- ></el-switch>
- </div>
- <p :class="hardwareData[0].status==3||hardwareData[0].status==4?'colorTypeA':'colorTypeB'">{{hardwareData[0].status==3||hardwareData[0].status==4?'在线':'离线'}}</p>
- </div>
- <div class="alarm-big-box" v-if="!hardwareData[0]">
- <p>未绑定报警器</p>
- </div>
- </div>
- <div class="alarm-title-box">
- <p>报警记录</p>
- <p v-hasPermi="['chemical:hxpAlarmRecord:list']" @click="goAlarmRecord">更多>></p>
- </div>
- <el-table class="subject-alarm-time" style="margin-bottom:10px;" border :data="tableList" ref="multipleTable">
- <el-table-column label="报警时间" align="center" prop="alarmTime"/>
- <el-table-column label="处理状态" align="center" prop="operate" width="100"/>
- <el-table-column label="处理人" align="center" prop="handlingUserName" width="90"/>
- </el-table>
- <pagination
- v-show="totalTwo>0"
- :total="totalTwo"
- :page.sync="queryParamsTwo.page"
- :limit.sync="queryParamsTwo.pageSize"
- @pagination="getHxpAlarmRecordNoAuthList"
- />
- </div>
- <div class="bottom-entrance-box" v-if="rightButtonType == 5">
- <p class="top-title">
- <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
- <i>{{checkedSubject.deptName}}</i>
- </el-tooltip>
- <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
- <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
- </el-tooltip>
- </p>
- <div class="entrance" :class="item.operate.code==2?'BGentrance_l_yes':'BGentrance_l_no'" v-for="(item,index) in entranceList" v-if="item.operate">
- <img class="entrance_c" v-if="item.operate.code==2" src="@/assets/ZDimages/integratedManagement/icon_znmj_zx.png">
- <img class="entrance_c" v-if="item.operate.code!=2" src="@/assets/ZDimages/integratedManagement/icon_znmj_lx.png">
- <div class="entrance_r">门禁编号:{{item.hardwareNum}}</div>
- <p :class="item.operate.code==2?'entrance_l_yes':'entrance_l_no'">{{item.operate.code==2?'在线':'离线'}}</p>
- </div>
- <img class="null-data-img" src="@/assets/ZDimages/basicsModules/null-data.png" v-if="entranceList.length<=0">
- <p class="null-text-p" v-if="entranceList.length<=0">暂无智能门禁信息,请在更多操作-物联设备配置中进行添加</p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <add-subject v-if="pageType == 2" :subjectData="subjectData"></add-subject>
- <device-list v-if="pageType == 3" :subjectData="subjectData"></device-list>
- <admission-configuration v-if="pageType == 4" :subjectData="subjectData"></admission-configuration>
- <association-configuration v-if="pageType == 5" :subjectData="subjectData"></association-configuration>
- <info-page v-if="pageType == 6" :newData="newData"></info-page>
- <!--播放文字窗口-->
- <el-dialog title="广播系统" :visible.sync="open" width="500px" append-to-body>
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-form-item label="播放文字" prop="txt">
- <el-input v-model="form.txt" placeholder="请输入播放文字" />
- </el-form-item>
- <el-form-item label="播报方式" prop="type">
- <el-radio-group v-model="form.type">
- <el-radio :label="1">文字</el-radio>
- <el-radio :label="2">音频</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer dialog-footer-box">
- <p class="dialog-footer-button-null"></p>
- <p class="dialog-footer-button-info" @click="cancel">取消</p>
- <p class="dialog-footer-button-primary" @click="submitFormOne">提交</p>
- <p class="dialog-footer-button-null"></p>
- </div>
- </el-dialog>
- <!--导入窗口-->
- <el-dialog title="导入数据" :visible.sync="importOpen" @close="importOpenOff" width="600px" append-to-body class="checkItemLibrary-dialog-box">
- <el-upload
- class="teacher-import-dialog-upLoad-box"
- :drag="true"
- :data="upImportData"
- :action="uploadImgUrl"
- :show-file-list="false"
- :on-success="handleAvatarSuccess"
- :headers="headers"
- :before-upload="beforeAvatarUpload">
- <i class="el-icon-upload"></i>
- <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
- <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>
- <div class="el-upload-text-box" slot="tip" v-if="getImportData.downFile">
- <div class="img-text-box">
- <img src="@/assets/ZDimages/integratedManagement/icon_dr_wj.png">
- <p>{{getImportData.textName}}</p>
- </div>
- <p class="text-p">数据导入成功 <span style="color:#0183FA;">{{getImportData.successNum}}</span> 条,失败 <span style="color:#FF6464 ;">{{getImportData.failureNum}}</span> 条</p>
- <div class="img-text-box" v-if="getImportData.failureNum">
- <img src="@/assets/ZDimages/integratedManagement/icon_dr_sj.png">
- <p style="color:#0183FA;cursor: pointer;" @click="failureExcel">点击下载失败数据报表</p>
- </div>
- </div>
- </el-upload>
- <div slot="footer" class="dialog-footer dialog-footer-box">
- <p class="dialog-footer-button-null"></p>
- <p class="dialog-footer-button-primary" @click="importOpenOff">提交</p>
- <p class="dialog-footer-button-null"></p>
- </div>
- <div class="teacher-import-dialog-position-box" v-if="loading"></div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { controlSwitch } from "@/apiDemo/laboratory/hardware";
- import mqtt from 'mqtt'
- import flvjs from 'flv.js'
- import { hardWareControl,alarmControl } from "@/apiDemo/laboratory/hardware";
- import {
- updateSubject,
- mangerVoice,
- startUrl,
- queryHardByTypeList, subjectTriggerModes,
- } from '@/apiDemo/laboratory/subject'
- import addSubject from "./addSubject.vue";
- import deviceList from "./deviceList.vue";
- import admissionConfiguration from "./admissionConfiguration.vue";
- import associationConfiguration from "./associationConfiguration.vue";
- import infoPage from "./infoPage.vue";
- import { getHxpAlarmRecordNoAuthList,getEnablelist} from "@/apiDemo/medicUniversity-3_1/index";
- import { getToken } from "@/utils/auth";
- import store from '@/store'
- /********************** V3 **********************/
- import { getDeptDropList,laboratoryClassTypeGetList,laboratoryClassLevelGetList } from "@/api/commonality/permission";
- import {
- laboratorySubRelInfoList,
- laboratorySubRelInfoGetDetailInfo,
- laboratorySubRelInfoGetDetailDelete,
- laboratorySubRelInfoGetHazardSubRelInfo
- } from '@/api/integratedManagement/index'
- import { chemicalCabinetGetDoorList } from '@/api/chemicalManage'
- export default {
- filters:{
- ellipsis(value){
- if (!value) return '';
- if (value.length > 6) {
- return value.slice(0,6) + '...'
- }
- return value
- }
- },
- name: "subject",
- components: {
- addSubject,
- deviceList,
- admissionConfiguration,
- associationConfiguration,
- infoPage
- },
- data(){
- return{
- uploadImgUrl: window.location.href.split('://')[0]+'://' + this.judgmentNetworkReturnAddress() + "/laboratory/subject/importSubData", // 上传地址
- headers: {
- Authorization: "Bearer " + getToken(),
- },
- //导入弹层开关
- importOpen:false,
- //导入数据
- upImportData:{
- sysUserEnable:true,
- upDate:false,
- },
- getImportData:{
- downFile:false,
- successNum:0,
- failureNum:0,
- textName:"",
- },
- pageType:1,
- // 遮罩层
- loading: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 查询参数
- queryParams: {
- page: 1,
- pageSize:20,
- searchValue:'',
- deptId:'',
- typeId:'',
- levelId:'',
- },
- // 实验室表格数据
- subjectList: [],
- //学院列表
- deptOptions:[],
- //当前选中实验室
- checkedSubject:{},
- //当前选中右侧按钮
- rightButtonType:1,
- //编辑实验室数据
- subjectData:{},
- // 临时保存排序
- orderNum:"",
- //播放文字的实验室id
- subId:"",
- open:false,
- form:{},
- //智能门禁
- entranceList:[
- {
- status:1,
- name:'门禁名称',
- num:'XD12345678912'
- },
- {
- status:0,
- name:'门禁名称',
- num:'XD12345678912'
- }
- ],
- rules:{
- txt:[
- {required: true, message: '请输入播放文字', trigger: 'blur'},
- { required: true, message: "请输入播放文字", validator: this.spaceJudgment, trigger: "blur" }
- ],
- type:[
- {required: true, message: '请选择播报方式', trigger: 'blur'}
- ],
- },
- newData:{
- },
- //MQTT请求参数-传感器
- mtopic:"lab/function/data",
- //MQTT请求参数-硬件
- mtopicOne:"lab/hardware/data",
- //MQTT请求参数-传感器-预案
- mtopicTow:"lab/riskPlan/trigger/notice",
- msg:"",
- client:{},
- videoList:[],
- //警报数据
- totalTwo:0,
- tableList:[],
- queryParamsTwo:{
- page:1,
- pageSize:20,
- },
- hardwareData:[],
- //mqtt实验室id
- mqttIdList:[],
- //字典排风扇数组
- fanList:[],
- selectTriggerList:[],//预案触发下,预案数据存储
- //分类数据
- typeList:[],
- //分级数据
- levelList:[],
- }
- },
- created() {
- },
- mounted(){
- //获取院系列表
- this.getDeptDropList();
- //获取分类列表
- this.laboratoryClassTypeGetList();
- //获取分级列表
- this.laboratoryClassLevelGetList();
- //获取列表数据
- this.getList();
- //字典配置初始化
- this.dictsInitialize();
- // this.queryHardByTypeList();
- // this.subscriptionMQTT();
- },
- methods:{
- tableButton(row){
- let self = this;
- this.$confirm(`是否确认操作此设备`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(async () => {
- controlSwitch({id:row.id}).then(response => {
- self.msgSuccess(response.msg);
- });
- }).catch(() => {
- })
- },
- //查询当前用户下的预案触发数据
- selectTriggerFun(data){
- let self = this;
- let dataArr=data;
- let list=JSON.parse(localStorage.getItem('selectTriggerList'));
- for(let i=0;i<list.length;i++){
- if(self.subId==list[i].subId){//如果当前选中的实验室和预案触发的实验室id
- for(let b=0;b<dataArr.length;b++){
- if(list[i].funNum==dataArr[b].funNum){
- if(list[i].minMonitor<dataArr[b].roundVlue<list[i].maxMonitor){//传感器值正常
- dataArr[b].type=1
- }else{//传感器值异常
- }
- }
- }
- }
- }
- return dataArr;
- },
- /** 查询字典数据列表 */
- dictsInitialize() {
- this.getDicts("trigger_modes").then(response => {
- this.$set(this,'fanList',response.data);
- });
- },
- goAlarmRecord(){
- this.$router.push({
- path: `/chemicalLibrary/alarmRecord`,
- })
- },
- //智能门禁
- queryHardByTypeList(){
- let _this=this;
- let obj={
- subjectId:this.subId,
- type:'HK_DOOR',
- }
- queryHardByTypeList(obj).then( response => {
- let res=response.data;
- _this.entranceList=res;
- });
- },
- //报警器开启关闭方法
- changeIsNeedCaptchaAlarm(row){
- let self = this;
- if(row.status!=3 && row.status!=4){
- return
- }
- let text = row.status==3?'关闭':(row.status==4?'开启':'')
- this.$confirm(`是否`+text+`此设备`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(async () => {
- self.alarmControl(row)
- }).catch(() => {
- })
- },
- //开关按钮
- alarmControl(row){
- let switchData = {
- id:row.id,
- switchVal:row.status==3?'close':(row.status==4?'open':'')
- };
- alarmControl(switchData).then(response => {
- if(response.code==200){
- row.status = row.status==3?4:(row.status==4?3:'')
- }
- });
- },
- //获取实验室绑定报警器设备数据
- getEnablelist(){
- let obj = {
- subjectId:this.subId,
- type:"AI_ALARM"
- }
- getEnablelist(obj).then(response => {
- this.hardwareData = response.rows;
- });
- },
- //获取实验室报警列表数据
- getHxpAlarmRecordNoAuthList(){
- this.queryParamsTwo.subId = this.subId;
- getHxpAlarmRecordNoAuthList(this.queryParamsTwo).then(response => {
- this.totalTwo = response.total;
- this.tableList = response.rows;
- });
- },
- //播放文字
- handleAdd(id) {
- this.open = true;
- this.subId = id;
- },
- // 取消按钮
- cancel() {
- this.form = {};
- this.open = false;
- },
- /*播放文字*/
- submitFormOne(){
- this.$refs["form"].validate(valid => {
- if (valid) {
- let id = this.subId;
- mangerVoice(this.form,id).then(response => {
- this.msgSuccess("播放成功");
- this.open = false;
- this.getList();
- });
- }
- });
- },
- // 页面切换
- clickPage(type,row){
- if(this.pageType != type){
- if(type == 1){
- //列表页面
- this.pageType = type;
- this.getList();
- this.$set(this,'subjectData',{})
- }else if(type == 2){
- //新增页面
- this.pageType = type;
- }else if(type == 3){
- //编辑页面
- //this.pageType = 2;
- this.editFun(row);
- //this.$set(this,'subjectData',row)
- }else if(type == 4){
- this.pageType = 3;
- this.$set(this,'subjectData',row)
- }else if(type == 5){
- this.pageType = 4;
- this.$set(this,'subjectData',row)
- }else if(type == 6){
- //关联配置-详情
- laboratorySubRelInfoGetHazardSubRelInfo({infoId:row.infoId}).then(response => {
- this.$set(this,'subjectData',response.data);
- this.pageType = 5;
- });
- }else if(type == 7){
- this.subjectInfoTwo(row);
- // this.$set(this,'subjectData',row)
- }
- }
- },
- //实验室编辑
- editFun(row){
- laboratorySubRelInfoGetDetailInfo({infoId:row.infoId}).then(response => {
- this.$set(this,'subjectData',response.data)
- this.pageType = 2;
- })
- },
- //获取实验室详情
- subjectInfoTwo(row){
- let self = this;
- let type = 0; //硬件 //0全部
- laboratorySubRelInfoGetDetailInfo({infoId:row.infoId}).then(response => {
- this.$set(this,'newData',response.data);
- if(response.data.safeUserName){
- this.$set(this.newData,'safeUserName',response.data.safeUserName.split(','));
- }
- if(response.data.safeUserPhone){
- this.$set(this.newData,'safeUserPhone',response.data.safeUserPhone.split(','));
- }
- if(response.data.safeSigns){
- this.$set(this.newData,'safeSigns',response.data.safeSigns.split(','));
- }
- if(response.data.hazardCategory){
- this.$set(this.newData,'hazardCategory',response.data.hazardCategory.split(','));
- }
- if(response.data.outfire){
- this.$set(this.newData,'outfire',response.data.outfire.split(','));
- }
- if(response.data.riskMeasure){
- this.$set(this.newData,'riskMeasure',response.data.riskMeasure.split(','));
- }
- let list = [];
- let listTwo = [];
- if (response.data.labHardwareVOList){
- for(let i=0;i<response.data.labHardwareVOList.length;i++){
- if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'VIDEO_MONITOR'){
- list.push(response.data.labHardwareVOList[i].hardwareNUM);
- }
- // if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'SWITCH' || response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'AI_VENTILATION' || response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'ONE_MACHINE'){
- if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'SWITCH' || response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'AI_VENTILATION'){
- listTwo.push(response.data.labHardwareVOList[i])
- }
- }
- }
- this.$set(this.newData,'labHardwareVOListTwo',listTwo);
- if(this.versionField() == 'xiBeiNongLinDaXue'){
- this.$set(this.newData,'videoData',[]);
- this.pageType = 6;
- return
- }
- if(list[0]){
- let obj = {
- count:"100",
- deviceIds:list.join(),
- page:"1",
- };
- let urlText = window.location.href;
- if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
- startUrl(obj).then(res => {
- if(res.code == 200){
- if(!res.data[0]){
- this.msgError("视频配置异常请联系管理员")
- this.newData.videoData = [];
- this.pageType = 6;
- }else{
- let newData = res.data;
- let videoList = [];
- for(let i=0;i<newData.length;i++){
- let obj = {
- name:response.data.name + response.data.subAddrr.room,
- videoType:"flv",
- divId:'divId'+i,
- url:newData[i].ws_flv,
- }
- videoList.push(obj)
- }
- this.$set(this.newData,'videoData',videoList);
- this.pageType = 6;
- }
- }
- });
- }else{
- startUrl(obj).then(res => {
- if(res.code == 200){
- if(!res.data[0]){
- this.msgError("视频配置异常请联系管理员")
- this.newData.videoData = [];
- this.pageType = 6;
- }else{
- let newData = res.data;
- let videoList = [];
- for(let i=0;i<newData.length;i++){
- let text = localStorage.getItem('cameraUrl');
- let url = newData[i].ws_flv;
- url = url.split("rtp/");
- let newUrl = text+'rtp/'+url[1];
- let obj = {
- name:response.data.name + response.data.subAddrr.room,
- videoType:"flv",
- divId:'divId'+i,
- url:newUrl,
- }
- videoList.push(obj)
- }
- this.$set(this.newData,'videoData',videoList);
- this.pageType = 6;
- }
- }
- });
- }
- }else{
- this.$set(this.newData,'videoData',[]);
- this.pageType = 6;
- }
- })
- },
- // 开启关闭验证
- async changeIsNeedCaptcha (row) {
- let self = this;
- if(row.state.code!=3 && row.state.code!=4){
- return
- }
- let text = row.state.code==3?'关闭':(row.state.code==4?'开启':'')
- this.$confirm(`是否`+text+`此设备`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(async () => {
- self.switchChange(row)
- }).catch(() => {
- })
- },
- //点击开关按钮开启的时候充电调用硬件状态
- subjectTriggerModes(row){
- let self=this;
- subjectTriggerModes(row.id).then(response => {
- if(response.code==200){
- for(let b=0;b<self.fanList.length;b++){
- if(self.fanList[b].value==response.data.triggerModes){
- for(let i=0;i<self.checkedSubject.VOlist.length;i++){
- if(row.id == self.checkedSubject.VOlist[i].id){
- this.$set(self.checkedSubject.VOlist[i],'dictLabel',self.fanList[b].label);
- this.$set(self.checkedSubject.VOlist[i],'triggerModes',response.data.triggerModes);
- }
- }
- }
- }
- }
- });
- },
- //开关按钮
- switchChange(row){
- let switchData = {
- id:row.id,
- switchVal:row.state.code==3?'close':(row.state.code==4?'open':'')
- };
- hardWareControl(switchData).then(response => {
- if(response.code==200){
- this.msgSuccess("操作成功")
- }
- });
- },
- //切换实验室展示数据
- rightButtonClick(type){
- let self = this;
- if(this.rightButtonType != type){
- this.rightButtonType = type;
- this.videoOff();
- if(type == 3){
- let self = this;
- let list = [];
- if(self.checkedSubject.labHardwareVOList){
- for(let i=0;i<self.checkedSubject.labHardwareVOList.length;i++){
- if(self.checkedSubject.labHardwareVOList[i].hardwareTypeEnum.enumName == 'VIDEO_MONITOR'){
- list.push(self.checkedSubject.labHardwareVOList[i].hardwareNUM);
- }
- }
- if(list[0]){
- let obj = {
- count:"100",
- deviceIds:list+'',
- page:"1",
- };
- let urlText = window.location.href;
- if(urlText.indexOf(localStorage.getItem('ipIdentify')) != -1){
- startUrl(obj).then(res => {
- if(res.code == 200){
- if(!res.data[0]){
- this.msgError("视频配置异常请联系管理员")
- return
- }
- let newData = res.data;
- let videoList = [];
- for(let i=0;i<newData.length;i++){
- let obj = {
- name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
- videoType:"flv",
- divId:'divId'+i,
- url:newData[i].ws_flv,
- }
- videoList.push(obj)
- }
- this.$set(this.checkedSubject,'videoData',videoList);
- if(this.rightButtonType == 3){
- setTimeout(function(){
- self.videoFunction();
- },1000);
- }
- }
- });
- }else{
- startUrl(obj).then(res => {
- if(res.code == 200){
- if(!res.data[0]){
- this.msgError("视频配置异常请联系管理员")
- return
- }
- let newData = res.data;
- let videoList = [];
- for(let i=0;i<newData.length;i++){
- let text = localStorage.getItem('cameraUrl');
- let url = newData[i].ws_flv;
- url = url.split("rtp/");
- let newUrl = text+'rtp/'+url[1];
- let obj = {
- name:self.checkedSubject.name + self.checkedSubject.subAddrr.room,
- videoType:"flv",
- divId:'divId'+i,
- url:newUrl,
- }
- videoList.push(obj)
- }
- this.$set(this.checkedSubject,'videoData',videoList);
- if(this.rightButtonType == 3){
- setTimeout(function(){
- self.videoFunction();
- },1000);
- }
- }
- });
- }
- }else{
- this.$set(this.checkedSubject,'videoData',[]);
- }
- }else{
- this.$set(this.checkedSubject,'videoData',[]);
- }
- }else if(type==2){
- for(let i=0;i<self.checkedSubject.VOlist.length;i++){
- if(self.checkedSubject.VOlist[i].hardwareTypeEnum.hardwareTypeCode == '2'){
- for(let b=0;b<self.fanList.length;b++){
- if(self.fanList[b].dictValue==self.checkedSubject.VOlist[i].triggerModes){
- self.checkedSubject.VOlist[i].dictLabel=self.fanList[b].dictLabel
- }
- }
- }
- }
- }else if(type==5){
- this.queryHardByTypeList();
- }
- }
- },
- //选中实验室
- handleCurrentChange(val){
- console.log(val)
- let self = this;
- if(this.versionField() == 'xiBeiNongLinDaXue'){
- return
- }
- if(val.id != this.checkedSubject.id){
- this.videoOff();
- this.offMQTT();
- this.subjectInfo(val.id);
- this.subId = val.id;
- this.$set(this,'queryParamsTwo',{
- page:1,
- pageSize:20,
- });
- this.getEnablelist();
- this.getHxpAlarmRecordNoAuthList();
- this.subscriptionMQTT();
- }
- },
- //获取实验室详情
- subjectInfo(id){
- let type = 1; //硬件 //0全部
- laboratorySubRelInfoGetDetailInfo({infoId:id}).then(response => {
- let obj = JSON.parse(JSON.stringify(response.data));
- obj.VOlist = [];
- if(response.data.labHardwareVOList){
- for(let i=0;i<response.data.labHardwareVOList.length;i++){
- if(response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'SWITCH'||
- response.data.labHardwareVOList[i].hardwareTypeEnum.enumName == 'AI_VENTILATION'){
- if( response.data.labHardwareVOList[i].isPcfire == 0 ){
- obj.VOlist.push(response.data.labHardwareVOList[i]);
- }
- }
- }
- }
- //判断传感器是否在线如果不在线type为2
- if(response.data.sensorFunctionStatusList){
- obj.sensorFunctionStatusList.forEach(function(item) {
- if(item.formatVal.indexOf("--") != -1){
- item.type=2
- }
- })
- obj.sensorFunctionStatusList=this.selectTriggerFun(obj.sensorFunctionStatusList)
- }
- this.$set(this,'checkedSubject',obj);
- this.$set(this.checkedSubject,'videoData',[]);
- this.rightButtonType = 1;
- })
- },
- //编辑按钮
- handleCommand(command, row){
- let self = this;
- switch (command) {
- case "1":
- //关联配置
- this.clickPage(6,row);
- break;
- case "2":
- //物联配置
- this.clickPage(4,row);
- break;
- case "3":
- //准入配置
- this.clickPage(5,row);
- break;
- case "4":
- //编辑
- this.clickPage(3,row);
- break;
- case "5":
- //删除
- self.$confirm('是否确认删除?', "", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- laboratorySubRelInfoGetDetailDelete({infoId:row.infoId}).then(response => {
- self.msgSuccess(response.message);
- self.getList();
- });
- }).then(() => {}).catch(() => { });
- break;
- default:
- break;
- }
- },
- //保存当前排序
- liveSort(row){
- let obj = {
- orderNum:row.orderNum
- }
- this.orderNum = JSON.parse(JSON.stringify(obj));
- },
- //编辑排序
- editSort(row){
- let self = this;
- if(row.orderNum != this.orderNum.orderNum){
- self.$confirm('是否确认修改排序?', "", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- let obj = {
- id:row.id,
- orderNum:row.orderNum,
- };
- updateSubject(obj).then(response => {
- self.msgSuccess("修改成功");
- self.getList();
- });
- }).then(() => {}).catch(() => {
- let obj = JSON.parse(JSON.stringify(self.orderNum));
- row.orderNum = obj.orderNum
- });
- }
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.page = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.$set(this,'queryParams',{
- page: 1,
- pageSize:20,
- searchValue:'',
- deptId:'',
- typeId:'',
- levelId:'',
- });
- // this.resetForm("queryForm");
- this.handleQuery();
- },
- /** 查询实验室列表 */
- getList() {
- this.loading = true;
- // this.offMQTT();
- laboratorySubRelInfoList(this.queryParams).then(response => {
- this.subjectList = response.data.records;
- this.total = response.data.total;
- this.loading = false;
- if(response.data.records[0]){
- this.$refs.multipleTable.setCurrentRow(response.data.records[0]);
- this.subjectInfo(response.data.records[0].infoId);
- }
- let idList = [];
- for(let i=0;i<response.data.records.length;i++){
- idList.push(response.data.records[i].id)
- }
- this.$set(this,'mqttIdList',idList);
- // this.subscriptionMQTT();
- });
- },
- /** 查询学院列表 */
- getDeptDropList() {
- getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
- this.$set(this, 'deptOptions', response.data)
- });
- },
- //MQTT订阅
- subscriptionMQTT(){
- let self = this;
- this.client = mqtt.connect(localStorage.getItem('mqttUrl'), {
- username: localStorage.getItem('mqttUser'),
- password:localStorage.getItem('mqttPassword')
- });
- this.client.on("connect", e =>{
- //连接成功
- this.client.subscribe(this.mtopic+self.subId, (err) => {
- if (!err) {
- //"订阅成功:" + this.mtopic+self.subId
- }
- });
- this.client.subscribe(this.mtopicOne+self.subId, (err) => {
- if (!err) {
- //"订阅成功:" + this.mtopicOne+self.subId
- }
- });
- });
- this.client.on("message", (topic, message) => {
- if (message){
- let data = JSON.parse(message)
- //"MQTT----message",data
- if(data.data.subId){
- //传感器
- //"传感器",data.data.subId,'---------',data
- if(self.checkedSubject.id){
- if(data.data.subId&&data.data.subId == self.checkedSubject.id){
- self.$set(self.checkedSubject,'sensorFunctionStatusList',data.data.functionStatuses);
- self.$set(self.checkedSubject.sensorFunctionStatusList[0],'sendDate',data.sendDate);
- //判断传感器是否在线如果不在线type为2
- self.checkedSubject.sensorFunctionStatusList.forEach(function(item) {
- if(item.formatVal.indexOf("--") != -1){
- item.type=2
- }
- })
- self.checkedSubject.sensorFunctionStatusList=self.selectTriggerFun(self.checkedSubject.sensorFunctionStatusList)
- }
- }
- if(self.newData.id){
- if(data.data.subId&&data.data.subId == self.newData.id){
- self.$set(self.newData,'sensorFunctionStatusList',data.data.functionStatuses);
- self.$set(self.newData.sensorFunctionStatusList[0],'sendDate',data.sendDate);
- }
- }
- }else{
- //硬件
- for (let i = 0; i < data.data.length; i++) {
- if (self.checkedSubject.VOlist) {
- for (let k = 0; k < self.checkedSubject.VOlist.length; k++) {
- if (self.checkedSubject.VOlist[k].id == data.data[i].num) {
- if (data.data[i].hardwareOperate == 'CLOSE') {
- self.checkedSubject.VOlist[k].state.code = 4;
- } else if (data.data[i].hardwareOperate == 'OPEN') {
- self.checkedSubject.VOlist[k].state.code = 3;
- } else if (data.data[i].hardwareOperate == 'OFFLINE') {
- self.checkedSubject.VOlist[k].state.code = 0;
- }
- if(self.checkedSubject.VOlist[k].hardwareTypeEnum.hardwareTypeCode == '2'&&
- self.checkedSubject.VOlist[k].pcType == '0'){
- self.subjectTriggerModes(self.checkedSubject.VOlist[k])
- }
- }
- }
- }
- if(self.newData.labHardwareVOList){
- for(let k=0;k<self.newData.labHardwareVOList.length;k++){
- if(self.newData.labHardwareVOList[k].id == data.data[i].num){
- if(data.data[i].hardwareOperate == 'CLOSE'){
- self.newData.labHardwareVOList[k].state.code = 4;
- }else if(data.data[i].hardwareOperate == 'OPEN'){
- self.newData.labHardwareVOList[k].state.code = 3;
- }else if(data.data[i].hardwareOperate == 'OFFLINE'){
- self.newData.labHardwareVOList[k].state.code = 0;
- }
- }
- }
- }
- }
- }
- }
- });
- },
- //取消订阅关闭MQTT连接
- offMQTT(){
- let self = this;
- if (self.mqttIdList[0]){
- // for(let i=0;i<self.mqttIdList.length;i++){
- // self.client.unsubscribe(self.mtopic+self.mqttIdList[i], error => {
- // if (error) {
- // }
- // })
- // self.client.unsubscribe(self.mtopicOne+self.mqttIdList[i], error => {
- // if (error) {
- // }
- // })
- // }
- self.client.unsubscribe(self.mtopic+self.subId, error => {
- if (error) {
- }
- })
- self.client.unsubscribe(self.mtopicOne+self.subId, error => {
- if (error) {
- }
- })
- self.client.end();
- self.client = {};
- }
- },
- //视频方法
- videoFunction(){
- let self = this;
- // self.videoList = [];
- for(let i=0;i<self.checkedSubject.videoData.length;i++){
- let obj = {
- player :{},
- flvPlayer:{}
- };
- obj.player = document.getElementById(self.checkedSubject.videoData[i].divId);
- // if (flvjs.isSupported()) {
- obj.flvPlayer = flvjs.createPlayer(
- {
- // isLive: true, //=> 是否为直播流
- // hasAudio: false, //=> 是否开启声音
- type: self.checkedSubject.videoData[i].videoType, //媒体类型 flv 或 mp4
- url: self.checkedSubject.videoData[i].url //视频流地址
- },
- {
- enableStashBuffer: true,//启用 IO 存储缓冲区。 如果您需要实时流播放(最小延迟),请设置为 false,但如果存在网络抖动,则可能会停止。
- stashInitialSize: 128,//IO 存储缓冲区初始大小。 默认值为 384KB。 指示合适的大小可以改善视频加载/搜索时间。
- isLive: true,//是否是直播
- lazyLoadRecoverDuration: 30,//指示以秒为单位的lazyLoad 恢复时间边界。
- autoCleanupSourceBuffer: true,//进行自动清理
- autoCleanupMaxBackwardDuration: 3 * 60,//3 * 60 当向后缓冲持续时间超过这个值(以秒为单位)时,对 SourceBuffer 进行自动清理
- autoCleanupMinBackwardDuration: 2 * 60,//2 * 60 指示在执行自动清理时为后向缓冲区保留的持续时间(以秒为单位)。
- }
- );
- self.videoList.push(obj);
- // }
- }
- for(let i=0;i<self.videoList.length;i++){
- self.videoList[i].flvPlayer.attachMediaElement(self.videoList[i].player);
- self.videoList[i].flvPlayer.load(); //加载
- self.videoList[i].flvPlayer.play(); //加载
- }
- },
- //视屏全屏方法
- videoFullScreen(index){
- this.$refs.videoRef[index].webkitRequestFullScreen();
- },
- //断开视频流
- videoOff(){
- let self = this;
- if(self.videoList[0]){
- for(let i=0;i<self.videoList.length;i++){
- self.videoList[i].flvPlayer.pause();
- self.videoList[i].flvPlayer.unload();
- self.videoList[i].flvPlayer.detachMediaElement();
- self.videoList[i].flvPlayer.destroy();
- self.videoList[i].flvPlayer = null;
- }
- self.videoList = [];
- }
- },
- //查询安全分级
- laboratoryClassLevelGetList(){
- laboratoryClassLevelGetList({}).then(response=>{
- if(response.code==200){
- this.$set(this,'levelList',response.data);
- }
- })
- },
- //查询安全分类
- laboratoryClassTypeGetList(){
- laboratoryClassTypeGetList({}).then(response=>{
- if(response.code==200){
- this.$set(this,'typeList',response.data);
- }
- });
- },
- //****************************************导入功能**************************************
- handleAvatarSuccess(res, file) {
- if(res.code == 200){
- this.getImportData.downFile = true
- this.getImportData.successNum = res.data.successNum
- this.getImportData.failureNum = res.data.failureNum
- // this.importOpen = false;
- // this.getList();
- }else{
- this.msgError(res.msg);
- }
- this.loading = false;
- },
- beforeAvatarUpload(file) {
- let type = false;
- if (file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.type == 'application/vnd.ms-excel') {
- if(file.size> 5250000){
- this.msgError('上传大小不能超过5M')
- return false
- }
- this.getImportData.textName = file.name;
- type = true;
- this.loading = true;
- }else{
- this.$message.error('只能上传xls/xlsx格式文件');
- type = false;
- }
- return type;
- },
- //导入页面关闭
- importOpenOff(){
- this.importOpen = false;
- this.getImportData.downFile = false;
- this.getImportData.successNum = 0;
- this.getImportData.failureNum = 0;
- this.getImportData.textName = "";
- },
- /** 导入按钮操作 */
- importButton(item){
- if(item.command == 1){
- // 下载模板
- this.download('/laboratory/subject/exportSubTemplate', {}, `实验室导入模板.xlsx`)
- }else if(item.command == 2){
- // 导入数据
- this.importOpen = true;
- }
- },
- /** 下载模板操作 */
- importTemplate() {
- this.download('/laboratory/subject/exportSubTemplate', {}, `实验室导入模板.xlsx`)
- },
- /*下载失败列表*/
- failureExcel(){
- this.download('/laboratory/subject/exportProblemData', {}, `实验室导入模板失败报表.xlsx`)
- },
- },
- beforeDestroy() {
- //清除定时器
- let self = this;
- self.videoOff();
- self.offMQTT();
- },
- }
- </script>
- <style scoped lang="scss">
- .subject{
- flex:1;
- display: flex!important;
- flex-direction: column;
- overflow: hidden;
- ::v-deep .el-table__row{
- td:nth-child(1){
- padding:0;
- }
- }
- .subject-page{
- flex:1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- border-radius:10px;
- margin:5px 0 0 0;
- //box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1);
- .subject-page-min{
- flex:1;
- display: flex;
- overflow: hidden;
- padding: 2px 0 10px 10px;
- box-sizing: border-box;
- .form-dropdown-box{
- display: flex;
- margin:0;
- padding:0 10px;
- cursor: pointer;
- height:40px;
- img:nth-child(1){
- width:16px;
- height:16px;
- margin-top:12px;
- }
- p{
- width:47px;
- text-align: center;
- font-size:14px;
- margin:0;
- line-height:40px;
- }
- img:nth-child(3){
- width:10px;
- height:6px;
- margin-top:17px;
- }
- }
- }
- .left-subject-list-flex{
- flex:1;
- }
- .left-subject-list{
- /*flex:1;*/
- width:1143px;
- display: flex;
- flex-direction: column;
- margin-right:6px;
- overflow: hidden ;
- box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.2);
- border-radius: 20px 20px 20px 20px;
- padding-top: 24px;
- margin-bottom:10px;
- .table_border{
- flex:1;
- display: flex;
- flex-direction: column;
- padding: 20px;
- box-sizing: border-box;
- overflow: hidden;
- }
- }
- .overflow-box{
- overflow: hidden;
- }
- .right-subject-box{
- /*width:440px;*/
- display: flex;
- flex-direction: column;
- .top-button-box{
- display: flex;
- margin-left:6px;
- div{
- padding:0 10px;
- height:40px;
- line-height:40px;
- font-size:14px;
- text-align: center;
- border-top-right-radius: 10px;
- border-top-left-radius: 10px;
- margin-right:1px;
- cursor: pointer;
- font-weight: 500;
- }
- .buttonColorA{
- color:#0045AF;
- background:#fff ;
- border: 1px solid #E0E0E0;
- border-bottom: 1px solid rgba(224,224,224,0.3);
- }
- .buttonColorB{
- color:#333;
- background:#E0E0E0 ;
- border: 1px solid #E0E0E0;
- border-bottom:none;
- }
- }
- .bottom-max-box{
- width:428px;
- box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.2);
- border-radius: 0px 0px 20px 20px;
- font-weight:500;
- flex:1;
- display: flex;
- flex-direction: column;
- margin-left:6px;
- overflow: hidden;
- margin-bottom:10px;
- .bottom-sensor-box{
- overflow: hidden;
- display: flex;
- flex-direction: column;
- background: #fff;
- width:424px;
- flex:1;
- position: relative;
- // border: 1px solid #E0E0E0;
- //border-radius: 0 10px 10px 10px;
- .top-title{
- margin:16px 26px;
- display: flex;
- justify-content: space-between;
- >i{
- font-style: normal;
- line-height:18px;
- font-size:16px;
- color: #333;
- overflow:hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- .null-text-p{
- text-align: center;
- font-size:16px;
- color:#999;
- line-height:50px;
- margin:0 30px;
- }
- .sensor-for-max-box{
- .sensor-for-big-box{
- display: inline-block;
- width:180px;
- height:60px;
- margin:0 0 11px 22px;
- border-radius: 10px;
- .sensor-for-min-box{
- display: flex;
- img{
- width:26px;
- height:26px;
- margin:17px 11px;
- }
- div{
- margin:9px 0;
- p{
- color:#fff;
- }
- p:nth-child(1){
- font-size:14px;
- line-height:20px;
- }
- p:nth-child(2){
- font-size:16px;
- line-height:22px;
- }
- }
- }
- }
- .sensor-color-a{
- background: #FF7272;
- color:#fff;
- }
- .sensor-color-b{
- background: #E0E0E0;
- color:#999999;
- }
- .sensor-color-c{
- background: #80D164;
- color:#fff;
- }
- }
- .bottom-text{
- line-height:18px;
- font-size:14px;
- color:#999999;
- margin:0 0px 0px 26px;
- position: absolute;
- bottom: 22px;
- }
- }
- .bottom-switch-box{
- overflow: hidden;
- display: flex;
- flex-direction: column;
- background: #fff;
- width:424px;
- flex: 1;
- .top-title{
- margin:16px 26px;
- display: flex;
- justify-content: space-between;
- >i{
- font-style: normal;
- line-height:18px;
- font-size:16px;
- color: #333;
- overflow:hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- .null-text-p{
- text-align: center;
- font-size:16px;
- color:#999;
- line-height:50px;
- margin:0 30px;
- }
- .switch-for-max-box{
- width: 424px;
- display: flex;
- justify-content: flex-start;
- flex-wrap: wrap;
- .switch-for-big-box{
- .switch-for-min-box{
- width:180px;
- height:70px;
- margin:0 0 14px 20px;
- background: rgba(1,131,250,0.1);
- border-radius: 10px 10px 10px 10px;
- padding: 10px;
- box-sizing: border-box;
- .switch-for-min-box_t{
- width: 100%;
- display: flex;
- justify-content: space-between;
- .switch-for-min-title{
- font-size:14px;
- line-height:24px;
- width: 84px;
- color: #333333;
- display:block;
- overflow:hidden;
- text-overflow:ellipsis;
- white-space:nowrap;
- }
- .switch-null-p{
- font-size:14px;
- line-height:24px;
- color:#999;
- }
- .switch-pc-type-p{
- font-size:14px;
- line-height:24px;
- color:#0183fa;
- cursor: pointer;
- }
- }
- .switch-for-min-box_b{
- margin-top: 10px;
- .switch-null-ventilate{
- width: 62px;
- height: 18px;
- border-radius: 10px 10px 10px 10px;
- opacity: 1;
- border: 1px solid #0183FA;
- font-size: 12px;
- font-weight: 400;
- color: #0183FA;
- line-height: 15px;
- text-align: center;
- float: left;
- }
- .switch{
- float: right;
- }
- }
- .switch-for-min-button{
- width:70px;
- height:30px;
- line-height:30px;
- font-size:14px;
- color:#0045AF;
- border-radius:6px;
- border: 1px solid #0045AF;
- margin-top:14px;
- text-align: center;
- cursor: pointer;
- }
- }
- }
- }
- }
- .bottom-video-box{
- overflow: hidden;
- display: flex;
- flex-direction: column;
- background: #fff;
- width:424px;
- border-radius: 0 10px 10px 10px;
- flex: 1;
- .top-title{
- margin:16px 26px;
- display: flex;
- justify-content: space-between;
- >i{
- font-style: normal;
- line-height:18px;
- font-size:16px;
- color: #333;
- overflow:hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- .null-text-p{
- text-align: center;
- font-size:16px;
- color:#999;
- line-height:50px;
- margin:0 30px;
- }
- .video-for-max-box{
- .switch-for-big-box{
- width:374px;
- height:262px;
- margin:0 auto 14px;
- position: relative;
- .position-p{
- width:42px;
- height:42px;
- text-align: center;
- line-height:42px;
- font-size:18px;
- position: absolute;
- top:0;
- right:0;
- color:#fff;
- cursor: pointer;
- }
- }
- }
- }
- .bottom-alarm-box{
- flex:1;
- display: flex;
- flex-direction: column;
- background: #fff;
- width:424px;
- overflow-x: hidden;
- padding: 0 27px 0 23px;
- box-sizing: border-box;
- .top-title{
- margin:16px 0px;
- display: flex;
- justify-content: space-between;
- >i{
- font-style: normal;
- line-height:18px;
- font-size:16px;
- color: #333;
- overflow:hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- .alarm-max-box{
- width:374px;
- height:60px;
- display: flex;
- position:relative;
- background: #f5f5f5;
- border-radius: 10px 10px 10px 10px;
- margin: 10px 0 0 0;
- .alarm-img{
- width:30px;
- height:30px;
- margin:14px;
- }
- .alarm-big-box{
- p:nth-of-type(1){
- position:absolute;
- top:18px;
- left:64px;
- font-size: 14px;
- font-weight: 400;
- color: #333333;
- }
- .alarm-position-box{
- position:absolute;
- top:8px;
- left:260px;
- }
- p:nth-of-type(2){
- position:absolute;
- top:0px;
- right:0px;
- width: 50px;
- height: 20px;
- font-size:12px;
- font-weight:700;
- line-height:20px;
- border-radius: 0px 10px 0px 10px;
- text-align: center;
- }
- .colorTypeA{
- background: rgba(1,131,250,0.2);
- color:#0183FA;
- }
- .colorTypeB{
- background: #ECECEC;
- color:#A2A2A2;
- }
- }
- }
- .BGcolorTypeA{
- width:374px;
- height:60px;
- display: flex;
- position:relative;
- background: rgba(1,131,250,0.1);
- border-radius: 10px 10px 10px 10px;
- margin: 10px 0 0 0;
- }
- .BGcolorTypeB{
- width:374px;
- height:60px;
- display: flex;
- position:relative;
- background: #F5F5F5;
- border-radius: 10px 10px 10px 10px;
- margin: 10px 0 0 0;
- }
- .alarm-title-box{
- display: flex;
- p{
- line-height:60px;
- font-size:14px;
- }
- p:nth-child(1){
- flex:1;
- }
- p:nth-child(2){
- cursor: pointer;
- }
- }
- }
- /*智能门禁*/
- .bottom-entrance-box{
- flex: 1;
- background: #fff;
- width:424px;
- border-radius: 0 10px 10px 10px;
- .top-title{
- margin:16px 26px;
- display: flex;
- justify-content: space-between;
- >i{
- font-style: normal;
- line-height:18px;
- font-size:16px;
- color: #333;
- overflow:hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- .entrance{
- width: 374px;
- height: 60px;
- display: flex;
- justify-content: flex-start;
- border-radius: 10px 10px 10px 10px;
- margin: 10px 0 0 26px;
- position: relative;
- .entrance_c{
- width: 30px;
- height: 30px;
- margin: 14px 20px 0px 14px;
- }
- .entrance_r{
- font-size: 14px;
- font-family: Microsoft YaHei-Regular, Microsoft YaHei;
- font-weight: 400;
- color: #333333;
- line-height: 60px;
- }
- .entrance_l_yes{
- width: 60px;
- height: 30px;
- background: #0183FA;
- border-radius: 0px 10px 0px 10px;
- font-size: 14px;
- font-weight: 400;
- color: #fff;
- line-height: 30px;
- text-align: center;
- position: absolute;
- top: 0;
- right: 0;
- }
- .entrance_l_no{
- width: 60px;
- height: 30px;
- background: #A2A2A2;
- border-radius: 0px 10px 0px 10px;
- font-size: 14px;
- font-weight: 400;
- color: #fff;
- line-height: 30px;
- text-align: center;
- position: absolute;
- top: 0;
- right: 0;
- }
- }
- .BGentrance_l_yes{
- background: rgba(1,131,250,0.1);
- }
- .BGentrance_l_no{
- background: #F5F5F5;
- }
- }
- .null-data-img{
- width:137px;
- height:137px;
- display: block;
- margin:10px auto;
- }
- .null-text-p{
- text-align: center;
- font-size:16px;
- color:#999;
- line-height:50px;
- margin:0 30px;
- }
- }
- }
- }
- }
- </style>
- <style lang="scss">
- .alarm-position-box{
- .switch .el-switch__label {
- position: absolute;
- display: none;
- color: #fff !important;
- }
- .switch .el-switch__label--right {
- z-index: 1;
- }
- .switch .el-switch__label--right span{
- margin-right: 9px;
- }
- .switch .el-switch__label--left {
- z-index: 1;
- }
- .switch .el-switch__label--left span{
- margin-left: 9px;
- }
- .switch .el-switch__label.is-active {
- display: block;
- }
- .switch.el-switch .el-switch__core{
- background-color: rgba(255,196,124)!important;
- border-color: rgba(255,196,124)!important;
- }
- .switch.el-switch .el-switch__core,
- .el-switch .el-switch__label {
- width: 68px !important;
- height:20px!important;
- line-height:30px!important;
- -webkit-border-radius: 20px!important;
- -moz-border-radius: 20px!important;
- border-radius: 20px!important;
- margin: 0;
- position: absolute;
- top: 0;
- }
- .switch .el-switch__label--left span{
- margin-left:22px!important;
- font-size: 12px;
- color: #fff;
- line-height: 20px;
- position: relative;
- top: -5px;
- }
- .switch .el-switch__label--right span{
- margin-left:5px!important;
- font-size: 12px;
- position: relative;
- top: -5px;
- }
- .el-switch__core:after{
- background: #FA8A01 !important;
- height:16px!important;
- width:16px!important;
- top:1px!important;
- }
- .el-switch.is-checked .el-switch__core::after{
- margin-left: -20px!important;
- }
- .el-switch{
- margin:10px auto 0;
- display: block;
- width:80px!important;
- height:4px!important;
- }
- }
- .subject-alarm-time{
- .el-table__empty-text{
- background-size: 45%;
- }
- }
- .checkItemLibrary-dialog-box{
- .teacher-import-dialog-upLoad-box{
- .el-upload{
- width:450px;
- margin:0 55px;
- .el-upload-dragger{
- width:450px;
- .el-icon-upload{
- font-size:100px;
- color:#CBE6FE;
- }
- .el-upload__text{
- margin-top:20px;
- }
- }
- }
- .el-upload__tip{
- margin-left:60px;
- font-size:14px;
- margin-top:10px;
- }
- .el-upload-text-box{
- background: #F5F5F5;
- border-radius: 10px;
- margin:15px 30px 0;
- padding:0 20px 15px;
- overflow: hidden;
- *{
- margin:0;
- }
- .img-text-box{
- display: flex;
- margin-top:15px;
- img{
- width:16px;
- height:16px;
- margin-right:13px;
- }
- p{
- height:16px;
- line-height:16px;
- font-size:12px;
- }
- }
- .text-p{
- margin-top:15px;
- margin-left:29px;
- height:16px;
- line-height:16px;
- font-size:12px;
- }
- }
- }
- .teacher-import-dialog-button-box{
- display: flex;
- width:190px;
- margin:0 auto;
- p{
- width:70px;
- height:30px;
- line-height:30px;
- font-size:14px;
- margin:0 auto;
- }
- }
- .teacher-import-dialog-position-box{
- width:100%;
- height:100%;
- position: absolute;
- top:0;
- left:0;
- z-index: 999;
- background: rgba(255,255,255,0.4);
- border-radius:20px;
- }
- .code-max-box{
- display: flex;
- .code-button-box{
- display: flex;
- flex-direction: column;
- margin-left:8px;
- p{
- width:40px;
- text-align: center;
- line-height:19px;
- font-size:14px;
- cursor: pointer;
- color:#d8d8d8;
- }
- p:nth-child(1){
- border:1px solid #d8d8d8;
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- }
- p:nth-child(2){
- border-bottom:1px solid #d8d8d8;
- border-left:1px solid #d8d8d8;
- border-right:1px solid #d8d8d8;
- border-bottom-left-radius: 4px;
- border-bottom-right-radius: 4px;
- }
- p:hover{
- color:#fff;
- background-color: #d8d8d8;
- }
- }
- }
- }
- .subject-page{
- .el-table{
- .el-input--medium .el-input__inner{
- height:26px;
- line-height:26px;
- width:55px;
- text-align: center;
- padding:0 10px;
- }
- }
- .pagination-container{
- height: 45px;
- }
- }
- </style>
|