123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268 |
- <template>
- <!-- 全局大容器 -->
- <view class="body2">
- <view class="box">
- <!-- 左侧监控容器 -->
- <view class="left_box">
- <view class="topTab">
- <view class="" style="display: flex">
- <image style="width: 100rpx; height: 100rpx" src="../../static/img/wlt.png" mode="widthFix"></image>
- <h3 class="bh_title">湖里区不可移动文物数字化监管平台</h3>
- </view>
- <el-button
- icon="el-icon-view"
- class="btn"
- @click="
- maintabindex = 0;
- refreshBtn();
- "
- :class="{ activeBtn: maintabindex == 0 }"
- >
- 预览
- </el-button>
- <el-button
- icon="el-icon-document"
- class="btn"
- @click="
- maintabindex = 2;
- postEventList();
- "
- :class="{ activeBtn: maintabindex == 2 }"
- >
- 事件
- </el-button>
- <el-button
- class="btn"
- icon="el-icon-setting"
- @click="
- maintabindex = 3;
- getPollingConfig();
- "
- :class="{ activeBtn: maintabindex == 3 }"
- >
- 轮巡配置
- </el-button>
- <el-button
- icon="el-icon-loading"
- style="width: 230rpx; font-size: 30rpx"
- v-if="maintabindex == 0"
- @click="
- maintabindex = 0;
- refreshBtn();
- "
- type="success"
- >
- 刷新
- </el-button>
- </view>
- <!-- 监控视频容器 -->
- <view id="player" v-show="maintabindex == 0"></view>
- <!-- 事件 -->
- <view v-if="maintabindex == 2">
- <view class="box2">
- <view>
- <el-row justify="space-between" :gutter="20">
- <el-col :span="6">
- <el-input v-model.trim="queryVal" customStyle="width:360rpx;" placeholder="输入信息查询" border="surround"></el-input>
- </el-col>
- <el-col :span="6">
- <el-date-picker v-model="dateVal" align="right" type="date" placeholder="选择日期" :picker-options="pickerOptions"></el-date-picker>
- </el-col>
- <el-col :span="5">
- <el-select v-model="stateVal" clearable placeholder="按状态查询">
- <el-option v-for="item in options" :key="item.id" :label="item.label" :value="item.label"></el-option>
- </el-select>
- </el-col>
- <el-col :span="3">
- <u-button @click="searchBtn" type="primary" text="搜索" customStyle="width:130rpx;"></u-button>
- </el-col>
- <el-col :span="4">
- <u-button v-print="'#printDiv'" type="primary" text="打印" customStyle="width:130rpx;"></u-button>
- </el-col>
- </el-row>
- </view>
- <view class="shijian_box" id="printDiv">
- <view class="shijian_item" v-for="(item, index) in tableData">
- <img :src="item.image" style="width: 300rpx; height: 250rpx" />
- <view class="">{{ item.name }}</view>
- <view class="">报警原因:{{ item.reason }}</view>
- <view class="">报警类型:{{ item.event_type_text }}</view>
- <view class="">事件等级:{{ item.event_level_text }}</view>
- <!-- <el-button @click="falseAlarmBtn(item)" type="text">误报</el-button> -->
- </view>
- <el-empty style="margin: auto" v-if="tableData.length <= 0" description="暂无事件"></el-empty>
- </view>
- <el-pagination
- style="text-align: right; margin-top: 30rpx"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- background
- :page-sizes="[8, 12, 16]"
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- ></el-pagination>
- </view>
- </view>
- <!-- 事件end -->
- <!-- 轮巡设置 -->
- <view v-if="maintabindex == 3">
- <view class="lunxun_box">
- <view>
- <el-row justify="space-between" :gutter="20">
- <el-col :span="8" style="display: flex">
- <view style="width: 280rpx; line-height: 80rpx">轮巡时间/分钟</view>
- <el-input v-model.trim="interval" customStyle="width:360rpx;" :placeholder="interval" border="surround"></el-input>
- </el-col>
- <el-col :span="8" style="display: flex">
- <view style="width: 160rpx; line-height: 80rpx">轮巡个数</view>
- <el-select v-model="number" placeholder="请选择">
- <el-option v-for="item in numberList" :key="item.value" :label="item.label" :value="item.label"></el-option>
- </el-select>
- </el-col>
- <el-col :span="3">
- <u-button @click="modifyBtn" type="primary" text="修改" customStyle="width:130rpx;"></u-button>
- </el-col>
- </el-row>
- </view>
- <!-- 图文列表 -->
- <view class="lunxun_tw" v-if="turningList.length > 0">
- <view class="" v-for="(item, index) in turningList">
- <view class="tw_item">
- <img style="width: 400rpx; height: 200rpx" :src="item.image" alt="" />
- <view>{{ item.name }}</view>
- <view>{{ item.position }}</view>
- <el-button @click="lunxunBtn(item, index)" type="text">删除轮巡</el-button>
- </view>
- </view>
- </view>
- <el-empty v-else description="暂无配置"></el-empty>
- </view>
- </view>
- <!-- 轮巡设置end -->
- </view>
- <!-- 左侧监控容器end -->
- <!-- 右侧文物列表容器 -->
- <view v-if="maintabindex == 0 || maintabindex == 1">
- <view class="right_box">
- <view class="right_box_top">
- <h3 class="right_box_title">文物列表</h3>
- <u-button @click="qhGetZhoujieDevice" type="primary" size="mini" customStyle="width:160rpx; height: 53rpx;">
- <i style="line-height: 10rpx; margin-right: 5rpx" :class="qhBtn ? 'el-icon-guide ' : 'el-icon-office-building'"></i>
- {{ qhBtn ? '显示文物 ' : '显示城区' }}
- </u-button>
- <view style="display: flex">
- <el-input
- v-model="culturalValue"
- clearable
- style="width: 360rpx"
- size="mini"
- placeholder="输入文物关键字进行筛选"
- suffix-icon="el-icon-search"
- ></el-input>
- <!-- <u-button @click="SearchCultural" icon="search" type= "primary" text="搜索" size="mini" customStyle="width:80rpx; height: 55rpx;"></u-button> -->
- </view>
- </view>
- <view class="right_box_item">
- <el-tree ref="tree" :filter-node-method="filterNode" :data="treeData" :props="defaultProps" @node-click="handleNodeClick">
- <span class="custom-tree-node" slot-scope="{ node, data }">
- <span v-if="data.zhoujie_device_type != '1'">{{ node.label }}</span>
- <span
- v-if="data.zhoujie_device_type == '1'"
- :style="monitors.length > 0 && monitors[selectIndex].device_code == data.device_code ? 'color:#3c9cff' : 'color:black'"
- >
- {{ node.label }}
- </span>
- <span v-if="data.area != undefined">
- <el-button @click.stop="timeBtn(data)" type="text" size="mini">文物开放时间</el-button>
- </span>
- <span v-if="data.zhoujie_device_type == '1'">
- <el-button type="text" size="mini" @click.stop="() => append(data)">{{ data.isPolling ? ' 删除轮巡' : '加入轮巡' }}</el-button>
- </span>
- </span>
- </el-tree>
- </view>
- </view>
- </view>
- <!-- 监控弹层 -->
- <view class="jk_show" v-show="showMonitor">
- <u-icon @click="showMonitor = false" name="close" size="40rpx" style="position: absolute; top: 5px; right: 5px"></u-icon>
- <view class="jk_title">
- <text>【{{ treeNode.name }}】</text>
- <text>【{{ jkName }}】</text>
- <el-badge :value="deviceList.power_supply">
- <el-button
- @click="
- showHandle = true;
- eventDclBtn();
- "
- size="small"
- >
- 待处理事件
- </el-button>
- </el-badge>
- </view>
- <!-- 监控视频展示容器 -->
- <view style="width: 50%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center">
- <view style="width: 90%; height: 90%; border-radius: 40rpx; margin-top: 200rpx; margin-bottom: 200rpx">
- <iframe
- border="0"
- :src="webViedoUrl"
- width="100%"
- height="100%"
- frameborder="no"
- marginwidth="0"
- marginheight="0"
- scrolling="no"
- allowtransparency="yes"
- ></iframe>
- </view>
- </view>
- <!-- 关联监控 -->
- <view class="show_box_bottom">
- <view class="">
- <h3 style="margin-bottom: 20rpx">关联监控</h3>
- <view @click="openVideo(item)" v-for="(item, index) in associatedDevices" class="gljk_item" :style="associationTab == item.name ? 'color:#3c9cff' : ''">
- {{ item.name }}
- </view>
- <el-empty style="height: 100rpx; margin-top: 80rpx" v-if="associatedDevices <= 0" description="暂无关联监控"></el-empty>
- </view>
- </view>
- <!-- 监控信息 -->
- <view class="" style="width: 50%; height: 100%">
- <view class="" style="width: 94%; height: 100rpx; margin: 40rpx auto">
- <h4>五防信息:</h4>
- <text>联系人:{{ deviceList.five_prevention_name }}</text>
- <text style="margin-left: 20rpx">电话:{{ deviceList.five_prevention_mobile }}</text>
- </view>
- <view class="box_left_top2">
- <view class="jianju">
- 文物负责人:
- <view class="jianju_item">{{ deviceList.director }}</view>
- </view>
- <view class="jianju">
- 文物地址:
- <view class="jianju_item">{{ deviceList.address }}</view>
- </view>
- <view class="jianju">
- 设备状态:
- <view class="jianju_item">{{ deviceList.status }}</view>
- </view>
- <view class="jianju">
- 在线状态:
- <view class="jianju_item">{{ deviceList.on_line }}</view>
- </view>
- <view class="jianju">
- 设备编号:
- <view class="jianju_item">{{ deviceList.device_code }}</view>
- </view>
- </view>
- <!-- 地图 -->
- <!-- 监控地图-->
- <view style="width: 850rpx; height: 480rpx; margin: 20rpx">
- <view id="allmap" class="map" style="width: 100%; height: 100%"></view>
- </view>
- </view>
- </view>
- <!-- 监控弹层end -->
- <!-- 监控待处理事件弹层 -->
- <view v-if="showHandle" class="jk_dcl_tc">
- <u-icon @click="showHandle = false" name="close" size="40rpx" style="position: absolute; top: 5px; right: 5px"></u-icon>
- <view class="jk_tc_box">
- <view class="jk_tc_box2">
- <view v-for="item in eventDclList" class="jk_tc_item">
- <img style="width: 400rpx; height: 200rpx" :src="item.image" />
- <view class="">文物名称:{{ item.name }}</view>
- <view class="">事件类型:{{ item.event_type_text }}</view>
- <view class="">报警原因:{{ item.reason }}</view>
- <view class="">事件类型:{{ item.event_level_text }}</view>
- <el-button type="text" @click="viewEventBtn(item)">查看事件</el-button>
- </view>
- </view>
- <el-empty v-if="eventDclList.length <= 0" description="暂无事件"></el-empty>
- </view>
- </view>
- <!-- 监控待处理事件弹层end -->
- <!-- 查看事件弹层 -->
- <view class="tanceng" v-show="showViewEvent">
- <view style="width: 1600rpx; height: 1280rpx">
- <view class="show_box">
- <!-- 右侧容器 -->
- <view class="show_box_left">
- <view class="" style="margin-left: 120rpx; margin-top: 50rpx">
- <view class="" style="width: 560rpx; height: 1000rpx; padding: 20rpx; border: 1px solid #dbdbdb">
- <view class="sjlx">
- 事件等级:
- <view class="jianju_item3">{{ itemList.event_level_text }}</view>
- </view>
- <view class="sjlx">
- 事件类型:
- <view class="jianju_item3">{{ itemList.event_type_text }}</view>
- </view>
- <view class="sjlx">
- 事件状态:
- <view class="jianju_item3">{{ itemList.status_text }}</view>
- </view>
- <view style="margin: 0 auto; margin-top: 130rpx; width: 600rpx; height: 420rpx">
- <h3 style="margin-bottom: 20rpx">事件处理报告</h3>
- <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model.trim="valueTxt" resize="none"></el-input>
- <view class="" style="display: flex; margin-top: 50rpx">
- <u-button @click="submitReport" type="primary" text="提交" customStyle="width:130rpx;"></u-button>
- <u-button text="误报" customStyle="width:130rpx;"></u-button>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 左侧容器 -->
- <view class="show_box_right">
- <u-icon @click="showViewEvent = false" name="close" size="40rpx" style="position: absolute; top: 5px; right: 5px"></u-icon>
- <!-- 处置体系 -->
- <view class="show_box_top">
- <h3 style="margin-bottom: 20rpx">处置体系</h3>
- <view class="">
- <view class="jianju">
- 联系人:
- <view class="jianju_item3">{{ deviceList.five_prevention_name }}</view>
- </view>
- <view class="jianju">
- 联系电话:
- <view class="jianju_item3">{{ deviceList.five_prevention_mobile }}</view>
- </view>
- </view>
- </view>
- <!-- 事件弹层地图 -->
- <view class="global" style="width: 650rpx; height: 460rpx; margin-top: 40rpx">
- <view id="allmap2" class="map" style="width: 100%; height: 100%"></view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 查看事件弹层end -->
- <!-- 倾角弹层 -->
- <u-popup :show="showDipAngle" mode="center" @close="close">
- <view class="qj_box" style="">
- <u-icon @click="showDipAngle = false" name="close" size="40rpx" style="position: absolute; top: 5px; right: 5px"></u-icon>
- <view style="display: flex; align-items: baseline">
- <h3 style="margin-bottom: 20rpx">【{{ treeNode.name }}】</h3>
- <el-badge :value="dipangleList.power_supply">
- <el-button size="mini">待处理事件</el-button>
- </el-badge>
- </view>
- <view class="" style="width: 1100rpx; height: 700rpx; border: 1px solid #dbdbdb">
- <view class="qj_jianju">
- <view class="jianju2">
- 文物负责人:
- <view class="jianju_item2">{{ dipangleList.director }}</view>
- </view>
- <view class="jianju2">
- 文物地址:
- <view class="jianju_item2">{{ dipangleList.address }}</view>
- </view>
- <view class="jianju2">
- 在线状态:
- <view class="jianju_item2">{{ dipangleList.on_line }}</view>
- </view>
- <view class="jianju2">
- 设备编号:
- <view class="jianju_item2">{{ dipangleList.device_code }}</view>
- </view>
- <view class="jianju2">
- 设备状态:
- <view class="jianju_item2">{{ dipangleList.status }}</view>
- </view>
- <view class="jianju2">
- 五防处理人员:
- <view class="jianju_item2">{{ dipangleList.five_prevention_name }}</view>
- </view>
- <view class="jianju2">
- 五防处理电话:
- <view class="jianju_item2">{{ dipangleList.five_prevention_mobile }}</view>
- </view>
- </view>
- </view>
- </view>
- </u-popup>
- <!-- 倾角弹层end -->
- <!-- 右侧文物列表容器 -->
- </view>
- <!-- 配置时间弹层 -->
- <view v-if="showTime" class="pzsj_tc">
- <u-icon @click="showTime = false" name="close" size="40rpx" style="position: absolute; top: 5px; right: 5px"></u-icon>
- <el-row justify="space-between" :gutter="20" style="position: sticky; bottom: 0; left: 100rpx">
- <el-col :span="10" style="display: flex">
- <view style="width: 280rpx; line-height: 80rpx">开放时间</view>
- <el-input v-model="startTime" customStyle="width:360rpx;" :placeholder="interval" border="surround"></el-input>
- </el-col>
- <el-col :span="10" style="display: flex">
- <view style="width: 280rpx; line-height: 80rpx">结束时间</view>
- <el-input v-model="endTime" customStyle="width:360rpx;" :placeholder="interval" border="surround"></el-input>
- </el-col>
- <el-col :span="3">
- <u-button @click="modifyTime" type="primary" text="修改" customStyle="width:130rpx;"></u-button>
- </el-col>
- </el-row>
- <view style="width: 80%">
- <view v-for="item in opennessTimeList" :key="item.index" class="" style="display: flex; width: 100%; margin-top: 10rpx">
- <view class="" style="width: 500rpx">用户昵称:{{ item.nickname }}</view>
- <view class="" style="width: 550rpx">手机号:{{ item.mobile }}</view>
- <view class="" style="width: 500rpx">开始时间:{{ item.start_time }}</view>
- <view class="" style="width: 500rpx">结束时间:{{ item.end_time }}</view>
- </view>
- </view>
- </view>
- <!-- 配置时间弹层end -->
- <!-- 事件警告弹层 -->
- <view class="sjjg_tc" v-if="showWarn">
- <u-icon
- @click="
- showWarn = false;
- isAutio = false;
- "
- name="close"
- size="40rpx"
- style="position: absolute; top: 5px; right: 5px"
- ></u-icon>
- <h3 class="">【{{ latestEvents.cr_name }}】</h3>
- <view class="sj_top_box">
- <view class="sj_box">
- <view class="" style="width: 180rpx">文物负责人:</view>
- <view class="sj_item">{{ latestEvents.director }}</view>
- </view>
- <view class="sj_box">
- <view class="" style="width: 180rpx">文物地址:</view>
- <view class="sj_item">{{ latestEvents.address }}</view>
- </view>
- <view class="sj_box">
- <view class="" style="width: 180rpx">设备状态:</view>
- <view class="sj_item">{{ latestEvents.device_status }}</view>
- </view>
- <view class="sj_box">
- <view class="" style="width: 180rpx">在线状态:</view>
- <view class="sj_item">{{ latestEvents.on_line }}</view>
- </view>
- <view class="sj_box">
- <view class="" style="width: 180rpx">事件发生时间:</view>
- <view class="sj_item">{{ latestEvents.created_at }}</view>
- </view>
- <view class="sj_box">
- <view class="" style="width: 180rpx">事件说明时间:</view>
- <view class="sj_item">{{ latestEvents.sillustrate_time }}</view>
- </view>
- <view class="sj_box">
- <view class="" style="width: 180rpx">事件报告时间:</view>
- <view class="sj_item">{{ latestEvents.illustrate_time }}</view>
- </view>
- <view class="sj_box">
- <view class="" style="width: 180rpx">五防处置人员:</view>
- <view class="sj_item">{{ latestEvents.five_prevention_name }}</view>
- </view>
- <view class="sj_box">
- <view class="" style="width: 180rpx">五防处置电话:</view>
- <view class="sj_item">{{ latestEvents.five_prevention_mobile }}</view>
- </view>
- </view>
- <el-row justify="space-between" :gutter="20" style="margin-left: 235rpx">
- <el-col :span="6">
- <el-select v-model="event_level_val" clearable placeholder="事件等级">
- <el-option v-for="item in event_level_list" :key="item.value" :label="item.label" :value="item.label"></el-option>
- </el-select>
- </el-col>
- <el-col :span="6">
- <el-select v-model="event_type_val" clearable placeholder="事件类型">
- <el-option v-for="item in event_type_list" :key="item.value" :label="item.label" :value="item.label"></el-option>
- </el-select>
- </el-col>
- <el-col :span="6">
- <el-select v-model="status_val" clearable placeholder="事件状态">
- <el-option v-for="item in status_list" :key="item.value" :label="item.label" :value="item.label"></el-option>
- </el-select>
- </el-col>
- <el-col :span="5">
- <!-- <el-input placeholder="请输入事件说明" v-model="descriptionVal"></el-input> -->
- <el-autocomplete
- class="inline-input"
- v-model="descriptionVal"
- :fetch-suggestions="querySearch"
- placeholder="请输入事件说明"
- @select="handleSelect"
- ></el-autocomplete>
- </el-col>
- </el-row>
- <view class="" style="margin-top: 50rpx; margin-left: 860rpx">
- <h3>事件处理报告</h3>
- <view class="" style="width: 700rpx">
- <el-input type="textarea" resize="none" :rows="5" placeholder="请输入报告内容" v-model.trim="valueTxt2"></el-input>
- </view>
- <view class="" style="margin-top: 50rpx; margin-left: 160rpx">
- <el-button @click="submitReportBtn" size="medium" type="primary">提交</el-button>
- <el-button @click="wubaoBtn" size="medium" type="success">误报</el-button>
- </view>
- </view>
- </view>
- <!-- 事件警告弹层end -->
- <iframe v-if="isAutio" src="../../static/img/tip.mp3" frameborder="0" wmode="transparent | window" style="display: none"></iframe>
- </view>
- </template>
- <script>
- import { data } from '../../uni_modules/uview-ui/libs/mixin/mixin';
- import { mymap } from '@/common/AMap.js';
- // let id = 1000;
- var md5 = require('@/GraceUI5/js/md5.js');
- function launchFullscreen(element) {
- if (element.requestFullscreen) {
- element.requestFullscreen();
- } else if (element.mozRequestFullScreen) {
- element.mozRequestFullScreen();
- } else if (element.msRequestFullscreen) {
- element.msRequestFullscreen();
- } else if (element.webkitRequestFullscreen) {
- element.webkitRequestFullScreen();
- }
- }
- function exitFullscreen() {
- if (document.exitFullscreen) {
- document.exitFullscreen();
- } else if (document.msExitFullscreen) {
- document.msExitFullscreen();
- } else if (document.mozCancelFullScreen) {
- document.mozCancelFullScreen();
- } else if (document.webkitExitFullscreen) {
- document.webkitExitFullscreen();
- }
- }
- const IS_MOVE_DEVICE = document.body.clientWidth < 992; // 是否移动设备
- const MSE_IS_SUPPORT = !!window.MediaSource; // 是否支持mse
- let that;
- export default {
- data() {
- return {
- isAutio: false /* 音频 */,
- timeId: '',
- eventId: '',
- ak: '83lYk9WITWwCmTrzmeX2qSxFMSs7znL4',
- maintabindex: 0,
- polloffset: 0,
- activeTitle: 0,
- activeTitle2: 1,
- activeVideo: 0,
- cr_id: 0 /* 文物id */,
- // culturalRelicName: '' /* 搜索到的文物名 */,
- showViewEvent: false /* 事件列表弹层*/,
- showMonitor: false /* 监控弹层*/,
- showDipAngle: false /* 倾角弹层 */,
- showHandle: false /* 待处理事件弹层 */,
- showViewEvent: false /* 查看事件弹层 */,
- showTime: false /* 文物配置时间弹层 */,
- showWarn: false /* 事件警告弹层 */,
- webViedoUrl: '' /* 每项监控链接 */,
- culturalValue: '' /* 文物名称 */,
- valueTxt: '' /* 文本域内容 */,
- valueTxt2: '' /* 文本域内容 */,
- startTime: '' /* 开始时间 */,
- endTime: '' /* 结束时间 */,
- opennessTimeList: [] /* 文物历史开放时间 */,
- occurTime: '' /* 事件发生时间 */,
- timer: null,
- treeData: [],
- treeNode: [] /* 取监控父节点信息 */,
- deviceCcode: '' /* 设备编号 */,
- dipangleList: [] /* 倾角 */,
- treeJk: [],
- jkName: '' /* 监控名字 */,
- deviceList: [] /* 设备详情 */,
- associatedDevices: [] /* 关联设备 */,
- associationTab: '' /* 关联监控Tab */,
- tableData: [] /* 获取事件列表* */,
- eventDclList: [] /* 文物待处理事件 */,
- itemList: [] /* 查看事件数据 */,
- qhBtn: false,
- turning: true,
- treeClickCnt: 0,
- treeClickTimeout: null,
- treeClickId: '',
- defaultProps: {
- children: 'children',
- label: 'name'
- },
- selectIndex: 0,
- monitors: [],
- turningList: [] /* 轮巡配置图文 */,
- interval: '' /* 轮巡时间 */,
- number: 4 /* 轮巡个数 */,
- numberList: [
- {
- value: 'id1',
- label: '4'
- },
- {
- value: 'id2',
- label: '9'
- },
- {
- value: 'id3',
- label: '16'
- }
- ] /*轮巡个数 */,
- isOpenPolling: true /* 轮巡按钮状态 */,
- total: 30, //总条数
- currentPage: 1, //当前页码
- pageSize: 12, //每页条数
- queryVal: '',
- /* 日期 */
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() > Date.now();
- },
- shortcuts: [
- {
- text: '今天',
- onClick(picker) {
- picker.$emit('pick', new Date());
- }
- },
- {
- text: '昨天',
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24);
- picker.$emit('pick', date);
- }
- },
- {
- text: '一周前',
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', date);
- }
- },
- {
- text: '一个月前',
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 31);
- picker.$emit('pick', date);
- }
- }
- ]
- },
- dateVal: '' /* 选中的日期 */,
- /* 下拉框状态 */
- options: [
- {
- id: '1',
- label: '误报'
- },
- {
- id: '2',
- label: '待处理'
- },
- {
- id: '3',
- label: '处理中'
- },
- {
- id: '4',
- label: '已处理'
- },
- {
- id: '5',
- label: '超时未处理'
- },
- {
- id: '6',
- label: '超时完成处理'
- }
- ],
- stateVal: '' /* 选择的状态 */,
- event_level_list: [
- {
- id: '1',
- label: '蓝色事件'
- },
- {
- id: '2',
- label: '黄色事件'
- },
- {
- id: '3',
- label: '橙色事件'
- },
- {
- id: '4',
- label: '红色事件'
- }
- ] /* 事件等级 */,
- event_level_val: '' /* 事件等级选中值 */,
- event_type_list: [
- {
- id: '1',
- label: '火灾'
- },
- {
- id: '2',
- label: '地震'
- },
- {
- id: '3',
- label: '越界报警'
- },
- {
- id: '4',
- label: '白蚂蚁'
- },
- {
- id: '5',
- label: '电量'
- },
- {
- id: '6',
- label: '掉线'
- }
- ] /*事件类型 */,
- event_type_val: '' /* 事件类型选中值 */,
- status_list: [
- {
- id: '1',
- label: '误报'
- },
- {
- id: '2',
- label: '待处理'
- },
- {
- id: '3',
- label: '处理中'
- },
- {
- id: '4',
- label: '已处理'
- },
- {
- id: '5',
- label: '超时未处理'
- },
- {
- id: '6',
- label: '超时完成处理'
- }
- ] /* 事件状态 */,
- status_val: '' /* 事件状态选中值 */,
- restaurants: [{ value: '意外事件' }, { value: '意料中事件' }] /* 事件说明推荐语 */,
- descriptionVal: '' /* 事件说明 */,
- latestEvents: null /* 最新事件 */,
- mindex: 0,
- mindex2: 0,
- eventlist: [],
- eventDetails: [],
- showedit: false,
- // zh_CN: locales.zh_CN,
- isMoveDevice: IS_MOVE_DEVICE,
- player: null,
- splitNum: 1,
- mseSupport: MSE_IS_SUPPORT,
- tabActive: MSE_IS_SUPPORT ? 'mse' : 'decoder',
- labelCol: { span: 7 },
- isfull: false,
- wrapperCol: { span: 10 },
- urls: {
- realplay: 'ws://10.19.147.22:559/EUrl/q2jQie4',
- talk: 'wss://10.41.163.126:6014/proxy/10.41.163.126:559/EUrl/6gFx47S',
- playback: 'wss://10.41.163.126:6014/proxy/10.41.163.126:559/EUrl/6gFx47S'
- },
- playback: {
- startTime: '2021-07-26T00:00:00',
- endTime: '2021-07-26T23:59:59',
- valueFormat: 'YYYY-MM-DDTHH:mm',
- seekStart: '2021-07-26T12:00:00',
- rate: ''
- },
- muted: true,
- volume: 50,
- volumeOnSvg: {
- template:
- '<svg t="1624453273744" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1421" width="200" height="200"><path d="M597.994667 138.005333q130.005333 28.010667 213.994667 132.992t84.010667 241.002667-84.010667 241.002667-213.994667 132.992l0-88q93.994667-28.010667 153.002667-106.005333t59.008-180.010667-59.008-180.010667-153.002667-106.005333l0-88zM704 512q0 120-106.005333 172.010667l0-344q106.005333 52.010667 106.005333 172.010667zM128 384l170.005333 0 213.994667-213.994667 0 684.010667-213.994667-213.994667-170.005333 0 0-256z" p-id="1422"></path></svg>'
- },
- volumeOffSvg: {
- template:
- '<svg t="1624453193279" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9147" width="200" height="200"><path d="M512 170.005333l0 180.010667-90.005333-90.005333zM181.994667 128l714.005333 714.005333-53.994667 53.994667-88-88q-74.005333 58.005333-156.010667 77.994667l0-88q50.005333-13.994667 96-50.005333l-181.994667-181.994667 0 288-213.994667-213.994667-170.005333 0 0-256 202.005333 0-202.005333-202.005333zM810.005333 512q0-101.994667-59.008-180.010667t-153.002667-106.005333l0-88q130.005333 28.010667 213.994667 132.992t84.010667 241.002667q0 96-44.010667 178.005333l-64-66.005333q21.994667-53.994667 21.994667-112zM704 512q0 18.005333-2.005333 26.005333l-104-104 0-93.994667q106.005333 52.010667 106.005333 172.010667z" p-id="9148"></path></svg>'
- }
- };
- },
- created() {},
- mounted() {
- that = this;
- this.getZhoujieDevice();
- window.that = this;
- this.$el.style.setProperty('display', 'block');
- this.init();
- this.createPlayer();
- this.getPollingConfig();
- /* 定时获取最新事件 */
- this.startTimer();
- /* 事件列表 */
- this.postEventList();
- // if (this.showvideo == 0) {
- // document.getElementById('videowindow').style.display = 'none';
- // }
- },
- computed: {
- mode: function () {
- return this.tabActive === 'mse' ? 0 : 1;
- }
- },
- watch: {
- culturalValue(val) {
- this.$refs.tree.filter(val);
- },
- latestEvents: {
- handler(newData) {
- if (newData && newData.address === undefined && this.showWarn) {
- this.showWarn = false;
- this.startTimer();
- }
- },
- deep: true
- }
- },
- beforeDestroy() {
- this.stopTimer();
- console.log('index.beforeDestroy.stopTimer');
- },
- onLoad(e) {
- console.log('index');
- },
- methods: {
- /* 搜索筛选树形结构数据 */
- filterNode(value, data) {
- if (!value) return true;
- return data.name.indexOf(value) !== -1;
- },
- /* 刷新了 */
- refreshBtn() {
- console.log('index.methods.refreshBtn');
- window.location.reload();
- },
- /*获取 树形数据 */
- getZhoujieDevice() {
- this.$api.getZhoujieDevice(
- {
- type: 'cr'
- },
- (res) => {
- this.treeData = res.data;
- }
- );
- },
- /* 切换数据 */
- qhGetZhoujieDevice() {
- this.qhBtn = !this.qhBtn;
- if (this.qhBtn) {
- this.$api.getZhoujieDevice(
- {
- type: 'area'
- },
- (res) => {
- this.treeData = res.data;
- }
- );
- } else {
- this.getZhoujieDevice();
- }
- },
- /* 获取文物历史开放时间 */
- timeBtn(data) {
- this.timeId = data.id;
- // console.log(data, 'data');
- this.showTime = true;
- this.$api.getCrOpenHoursHistoricalConfig({ cr_id: data.id }, function (res) {
- console.log(res, '时间配置');
- that.opennessTimeList = res.data;
- });
- },
- /* 修改时间 */
- modifyTime() {
- this.$api.setCrOpenHoursConfig(
- {
- cr_id: that.timeId,
- start_time: that.startTime,
- end_time: that.endTime
- },
- function (res) {
- console.log(res, '修改时间');
- if (res.code == 1) {
- that.$common.successToShow(res.msg);
- } else {
- that.$common.errorToShow(res.msg);
- }
- }
- );
- },
- /* 开启定时获取最新事件 */
- startTimer() {
- if (!this.timer) {
- console.log('getLatestEvent');
- this.timer = setInterval(() => {
- this.getLatestEvent();
- }, 5000);
- }
- },
- /* 关闭定时最新事件 */
- stopTimer() {
- clearInterval(this.timer);
- this.timer = null;
- },
- /* 定时获取最新事件 */
- getLatestEvent() {
- this.$api.getLatestEvent({}, (res) => {
- const newData = res.data;
- if (newData !== null) {
- this.latestEvents = newData;
- if (newData.address !== undefined) {
- if (!this.showWarn) {
- this.showWarn = true;
- this.isAutio = true;
- this.startTimer();
- }
- } else {
- if (this.showWarn) {
- this.showWarn = false;
- this.isAutio = false;
- this.startTimer();
- }
- }
- }
- // console.log(this.latestEvents, '最新事件');
- });
- },
- /* 定时获取最新事件 */
- // closePopup() {
- // this.showWarn = false;
- // this.startTimer();
- // },
- /* 加入轮巡 */
- append(data) {
- for (let i = 0; i < this.monitors.length; i++) {
- if (this.monitors[i].device_code == data.device_code) {
- window.editDeviceIndex = i;
- /* isPolling为true已经在轮巡 */
- if (data.isPolling) {
- //del删除轮巡
- this.$api.delPollingConfig({ device_id: data.device_id }, function (res) {
- that.monitors[window.editDeviceIndex].isPolling = 0;
- that.isOpenPolling = true;
- console.log('删除成功');
- that.$common.successToShow(res.msg);
- });
- } else {
- //add否则加入轮巡
- this.$api.addPollingConfig({ device_id: data.device_id }, function (res) {
- that.monitors[window.editDeviceIndex].isPolling = 1;
- console.log('加入成功');
- that.isOpenPolling = true;
- that.$common.successToShow(res.msg);
- });
- }
- break;
- }
- }
- },
- /* 关联监控点击事件 */
- openVideo(item, index) {
- this.associationTab = item.name;
- var t = Date.parse(new Date()) / 1000;
- var key = md5.md5(t + '@feichenghuli');
- /* 需要拼接该项文物监控链接 */
- this.webViedoUrl = 'https://feicheng.16fw.cn:1443/hik_monitor/center_monitor.html?t=' + t.toString() + '&key=' + key + '&index_code=' + item.device_code;
- },
- /* 树形组件点击事件 */
- handleNodeClick(data, node, obj) {
- that.cr_id = data.id;
- console.log(data, 111);
- console.log(node, 222);
- if (data.area !== undefined) {
- console.log('点击了文物', data);
- that.stopAllPlay();
- that.mindex = 0;
- /* 获取文物下的所有数据 */
- that.monitors = data.children;
- /* 调用获取监控编码 */
- that.toshow();
- }
- if (data.zhoujie_device_type == '1') {
- that.deviceCcode = data.device_code;
- console.log('点击了监控', this.deviceCcode);
- /* 获取监控父节点信息 */
- this.treeNode = node.parent.data;
- this.treeJk = node.parent.data.children;
- // console.log(this.treeNode, 11122288888);
- /* 点击的监控名字 */
- this.jkName = data.name;
- this.showMonitor = true;
- var t = Date.parse(new Date()) / 1000;
- var key = md5.md5(t + '@feichenghuli');
- this.webViedoUrl = 'https://feicheng.16fw.cn:1443/hik_monitor/center_monitor.html?t=' + t.toString() + '&key=' + key + '&index_code=' + data.device_code;
- /* 获取点击的监控文物及五防信息 */
- this.$api.getDeviceDetails({ device_id: data.device_id }, function (res) {
- // console.log(res, 1717171717);
- /* 设备信息 */
- that.deviceList = res.data;
- /* 关联监控 */
- that.associatedDevices = res.data.device_context_list;
- // console.log(that.associatedDevices, 888888888888);
- /* 地图 */
- mymap(that.ak)
- .then((mymap) => {
- var bmap = null;
- // 创建百度地图实例
- bmap = new BMapGL.Map('allmap');
- let point = new BMapGL.Point(res.data.longitude, res.data.latitude); /* 坐标点 */
- bmap.centerAndZoom(point, 15); //设置缩放级别
- bmap.enableScrollWheelZoom();
- // 添加标注点并设置自定义图标;
- const icon = new BMapGL.Icon('/static/img/company-green.png', new BMapGL.Size(26, 26));
- const marker = new BMapGL.Marker(point, { icon: icon });
- // // 将标注添加到地图
- bmap.addOverlay(marker);
- // 添加标注点上的文字
- const label = new BMapGL.Label(that.treeNode.name, {
- position: point, // 设置文本标注位置
- offset: new BMapGL.Size(20, -10) // 设置文本偏移量
- });
- label.setStyle({
- color: '#576171', // 文本颜色
- fontSize: '12px', // 文本字号
- fontWeight: 'bold' // 文本加粗
- });
- marker.setLabel(label); // 将标注点与文本标注关联
- })
- .catch((e) => {
- console.log(e);
- });
- /* 地图 */
- });
- }
- if (data.zhoujie_device_type == 2) {
- this.$api.getDeviceDetails({ device_id: data.device_id }, function (res) {
- console.log('白蚂蚁', res);
- that.showDipAngle = true;
- that.dipangleList = res.data;
- that.treeNode = node.parent.data;
- /* 白蚂蚁数据 */
- });
- }
- if (data.zhoujie_device_type == 3) {
- this.$api.getDeviceDetails({ device_id: data.device_id }, function (res) {
- console.log(res, '点击了倾角');
- /* 倾角数据 */
- that.showDipAngle = true;
- that.dipangleList = res.data;
- that.treeNode = node.parent.data;
- });
- }
- },
- /* 获取轮巡配置 */
- getPollingConfig() {
- this.$api.getPollingConfig({}, function (res) {
- // console.log(res, 888888888888);
- that.turningList = res.data.device;
- // console.log(that.turningList, 2323232323232323);
- that.interval = res.data.interval / 60;
- that.number = res.data.number;
- /* 控制监控画面展示个数 */
- that.splitNum = Math.sqrt(that.number);
- /* 控制监控画面展示个数 */
- that.arrangeWindow();
- that.getMonitorList();
- });
- },
- /* 修改轮巡配置 */
- modifyBtn() {
- this.$api.editPollingConfig({ interval: this.interval, number: this.number }, function (res) {
- // console.log(res, 99999999999);
- if (res.code == 1) {
- that.isOpenPolling = true;
- that.$common.successToShow(res.msg);
- } else {
- that.$common.errorToShow(res.msg);
- }
- });
- },
- /* 图文中删除轮巡按钮 */
- lunxunBtn(item, index) {
- this.$api.delPollingConfig({ device_id: item.device_id }, function (res) {
- console.log(res, '删除成功');
- that.getPollingConfig();
- that.$common.successToShow(res.msg);
- });
- },
- /* 待处理事件按钮 */
- eventDclBtn() {
- this.$api.postEventList(
- {
- device_code: this.deviceCcode,
- status: this.status_val
- },
- function (res) {
- console.log(res, '待处理事件');
- that.eventDclList = res.data.rows;
- console.log(that.tableData, '待处理事件2');
- }
- );
- },
- // 获取事件列表
- postEventList() {
- // console.log(that.deviceCode, '待核查');
- this.$api.postEventList(
- {
- page: this.currentPage,
- pageSize: this.pageSize
- // device_code: this.deviceCcode,
- // status: this.status_val
- },
- function (res) {
- // console.log(res, '页码');
- that.tableData = res.data.rows;
- // console.log(that.tableData, '页码2');
- that.total = res.data.total;
- }
- );
- },
- /* 事件列表误报按钮 */
- // falseAlarmBtn(item) {
- // // console.log(item, 'item');
- // this.$api.editEvent(
- // {
- // event_id: item.id,
- // event_level: item.event_level,
- // event_type: item.event_type,
- // status: item.status
- // },
- // function (res) {
- // if (res.code == 1) {
- // console.log(res, '误报');
- // that.postEventList();
- // that.$common.successToShow(res.msg);
- // } else {
- // that.$common.errorToShow(res.msg);
- // }
- // }
- // );
- // },
- /* 事件说明推荐语 */
- querySearch(queryString, cb) {
- var restaurants = this.restaurants;
- var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
- // 调用 callback 返回建议列表的数据
- cb(results);
- },
- createFilter(queryString) {
- return (restaurant) => {
- return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
- };
- },
- handleSelect(item) {
- console.log((this.descriptionVal = item.value));
- },
- /* 事件说明推荐语end */
- /* 事件警告弹层提交按钮 */
- submitReportBtn() {
- // console.log(this.latestEvents, '警告数据');
- this.$api.editEvent(
- {
- event_id: this.latestEvents.event_id,
- event_level: this.event_level_val,
- event_type: this.event_type_val,
- status: this.status_val,
- illustrate: this.descriptionVal,
- reports: this.valueTxt2
- },
- function (res) {
- console.log(res, '提交报告');
- if (res.code == 1) {
- that.$common.successToShow('提交成功');
- } else {
- that.$common.errorToShow('请选择事件详情');
- }
- // console.log(res, '提交报告');
- }
- );
- },
- // 事件警告弹层误报按钮
- wubaoBtn() {
- // console.log(this.latestEvents.event_id, 111111212335688);
- this.$api.editEvent(
- {
- vent_id: this.latestEvents.event_id,
- event_level: this.event_level_val,
- event_type: this.event_type_val,
- status: this.status_val,
- illustrate: this.descriptionVal,
- reports: this.valueTxt2
- },
- function (res) {
- that.$common.successToShow('提交成功');
- // console.log(res, '误报数据');
- // if (res.code == 1) {
- // that.$common.successToShow('提交成功');
- // } else {
- // that.$common.errorToShow(res.msg);
- // }
- }
- );
- },
- /* 每页条数改变 */
- handleSizeChange(size) {
- this.pageSize = size;
- this.postEventList();
- /* 页面改变在此调用接口方法 */
- // console.log(this.pageSize);
- },
- /* 页码改变 */
- handleCurrentChange(currentPage) {
- this.currentPage = currentPage;
- this.postEventList();
- /* 页面改变在此调用接口方法 */
- // console.log(this.currentPage); //点击第几页
- },
- /* 事件搜索按钮 */
- searchBtn() {
- if (this.dateVal != '' || this.stateVal != '' || this.queryVal != '') {
- this.$api.postEventList(
- {
- keywords: this.queryVal,
- status: this.stateVal,
- created_at: this.dateVal
- },
- function (res) {
- if (res.code == 1 && res.data.rows.length > 0) {
- that.tableData = res.data.rows;
- // console.log(that.tableData, '搜索事件2');
- } else {
- that.$common.errorToShow('暂无事件');
- }
- }
- );
- }
- },
- /* 查看事件 */
- viewEventBtn(item) {
- this.itemList = item;
- console.log(item, 'item');
- this.eventId = item.id;
- this.showViewEvent = true;
- // mymap(that.ak)
- // .then((mymap) => {
- // var bmap2 = null;
- // // 创建百度地图实例
- // bmap2 = new BMapGL.Map('allmap2');
- // let point = new BMapGL.Point(108.953364, 34.276184); /* 坐标点 */
- // bmap2.centerAndZoom(point, 10); //设置缩放级别
- // bmap2.enableScrollWheelZoom();
- // // 添加标注点并设置自定义图标;
- // const icon = new BMapGL.Icon('/static/img/company-green.png', new BMapGL.Size(26, 26));
- // const marker = new BMapGL.Marker(point, { icon: icon });
- // // // 将标注添加到地图
- // bmap2.addOverlay(marker);
- // // 添加标注点上的文字
- // const label = new BMapGL.Label('自定义', {
- // position: point, // 设置文本标注位置
- // offset: new BMapGL.Size(20, -10) // 设置文本偏移量
- // });
- // label.setStyle({
- // color: '#576171', // 文本颜色
- // fontSize: '12px', // 文本字号
- // fontWeight: 'bold' // 文本加粗
- // });
- // marker.setLabel(label); // 将标注点与文本标注关联
- // })
- // .catch((e) => {
- // console.log(e);
- // });
- /* 地图 */
- },
- /* 监控待处理弹层提交按钮事件 */
- submitReport() {
- // console.log(this.eventId, 'idididid');
- this.$api.editEvent(
- {
- event_id: this.eventId,
- reports: this.valueTxt
- },
- function (res) {
- console.log(res);
- }
- );
- },
- close() {
- // this.showViewEvent = false;
- this.monitorShow = false;
- },
- getMonitorList() {
- if (this.maintabindex == 0) {
- /* 获取轮询设备监控点 */
- // that.isOpenPolling = true;
- this.$api.getPollingDevicePreviewUrl({ offset: this.polloffset }, function (response) {
- // console.log(response, 1111);
- that.polloffset = response.data.offset;
- that.monitors = response.data.device;
- that.isOpenPolling = response.data.isOpenPolling;
- /* 轮巡 */
- if (response.data.isOpenPolling) {
- setTimeout('that.getMonitorList()', response.data.interval * 1000);
- }
- if (that.monitors.length > 0) {
- that.selectIndex = 0;
- that.mindex = 0;
- }
- that.toshow();
- });
- }
- },
- /* 请求监控链接 */
- getUrltoPlay(index) {
- if (parseInt(index) >= that.monitors.length) return;
- this.$api.getCameraPreviewUrl({ device_code: that.monitors[parseInt(index)].device_code }, function (response) {
- // console.log(response, 2222);
- var playURL = response.data;
- var mode = 0;
- that.player.JS_Play(playURL, { playURL, mode }, index).then(
- () => {
- console.log('realplay success');
- },
- (e) => {
- console.error(e);
- }
- );
- });
- },
- toshow() {
- for (var i = 0; i < this.monitors.length; i++) {
- setTimeout(function () {
- var index;
- index = that.mindex;
- that.getUrltoPlay(index);
- that.mindex++;
- }, (i + 1) * 2000);
- }
- },
- init() {
- // 设置播放容器的宽高并监听窗口大小变化
- window.addEventListener('resize', () => {
- this.player.JS_Resize();
- });
- },
- createPlayer() {
- this.player = new window.JSPlugin({
- szId: 'player',
- szBasePath: './',
- iMaxSplit: 4,
- iCurrentSplit: IS_MOVE_DEVICE ? 1 : 4,
- openDebug: true,
- oStyle: {
- borderSelect: IS_MOVE_DEVICE ? '#000' : '#FFCC00'
- }
- });
- // 事件回调绑定
- this.player.JS_SetWindowControlCallback({
- windowEventSelect: function (iWndIndex) {
- //插件选中窗口回调
- console.log('windowSelect callback: ', iWndIndex);
- if (iWndIndex < that.monitors.length) that.selectIndex = iWndIndex;
- },
- pluginErrorHandler: function (iWndIndex, iErrorCode, oError) {
- //插件错误回调
- console.log('pluginError callback: ', iWndIndex, iErrorCode, oError);
- //if (iErrorCode == 26214462 || oError.code == 1006 || oError.code == 1005) {
- let i = parseInt(iWndIndex);
- if (i < that.monitors.length) setTimeout('window.that.getUrltoPlay(' + i.toString() + ');', 3000);
- //}
- },
- windowEventOver: function (iWndIndex) {
- //鼠标移过回调
- //console.log(iWndIndex);
- },
- windowEventOut: function (iWndIndex) {
- //鼠标移出回调
- //console.log(iWndIndex);
- },
- windowEventUp: function (iWndIndex) {
- //鼠标mouseup事件回调
- //console.log(iWndIndex);
- },
- windowFullCcreenChange: function (bFull) {
- //全屏切换回调
- console.log('fullScreen callback: ', bFull);
- },
- firstFrameDisplay: function (iWndIndex, iWidth, iHeight) {
- //首帧显示回调
- console.log('firstFrame loaded callback: ', iWndIndex, iWidth, iHeight);
- },
- performanceLack: function () {
- //性能不足回调
- console.log('performanceLack callback: ');
- }
- });
- },
- /* 控制页面展示个数 */
- arrangeWindow() {
- let splitNum = this.splitNum;
- this.player.JS_ArrangeWindow(splitNum).then(
- () => {
- console.log(`arrangeWindow to ${splitNum}x${splitNum} success`);
- },
- (e) => {
- console.error(e);
- }
- );
- },
- wholeFullScreen() {
- this.player.JS_FullScreenDisplay(true).then(
- () => {
- console.log(`wholeFullScreen success`);
- },
- (e) => {
- console.error(e);
- }
- );
- },
- /* 预览&对讲 */
- realplay(index, playURL) {
- let mode = 0;
- this.player.JS_Play(playURL, { playURL, mode }, index).then(
- () => {
- console.log('realplay success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- stopPlay() {
- this.player.JS_Stop().then(
- () => {
- this.playback.rate = 0;
- console.log('stop realplay success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- talkStart() {
- let url = this.urls.talk;
- this.player.JS_SetConnectTimeOut(0, 1000);
- this.player.JS_StartTalk(url).then(
- () => {
- console.log('talkStart success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- talkStop() {
- this.player.JS_StopTalk().then(
- () => {
- console.log('talkStop success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- stopAllPlay() {
- this.player.JS_StopRealPlayAll().then(
- () => {
- this.playback.rate = 0;
- console.log('stopAllPlay success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- /* 回放 */
- playbackStart() {
- let { player, mode, urls, playback } = this,
- index = player.currentWindowIndex,
- playURL = urls.playback,
- { startTime, endTime } = playback;
- startTime += 'Z';
- endTime += 'Z';
- player.JS_Play(playURL, { playURL, mode }, index, startTime, endTime).then(
- () => {
- console.log('playbackStart success');
- this.playback.rate = 1;
- },
- (e) => {
- console.error(e);
- }
- );
- },
- playbackPause() {
- this.player.JS_Pause().then(
- () => {
- console.log('playbackPause success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- playbackResume() {
- this.player.JS_Resume().then(
- () => {
- console.log('playbackResume success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- seekTo() {
- let { seekStart, endTime } = this.playback;
- seekStart += 'Z';
- endTime += 'Z';
- this.player.JS_Seek(this.player.currentWindowIndex, seekStart, endTime).then(
- () => {
- console.log('seekTo success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- playbackSlow() {
- this.player.JS_Slow().then(
- (rate) => {
- this.playback.rate = rate;
- },
- (e) => {
- console.error(e);
- }
- );
- },
- playbackFast() {
- this.player.JS_Fast().then(
- (rate) => {
- this.playback.rate = rate;
- },
- (e) => {
- console.error(e);
- }
- );
- },
- frameForward() {
- this.player.JS_FrameForward(this.player.currentWindowIndex).then(
- () => {
- this.playback.rate = 1;
- console.log('frameForward success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- /* 声音、抓图、录像 */
- openSound() {
- this.player.JS_OpenSound().then(
- () => {
- console.log('openSound success');
- this.muted = false;
- },
- (e) => {
- console.error(e);
- }
- );
- },
- closeSound() {
- this.player.JS_CloseSound().then(
- () => {
- console.log('closeSound success');
- this.muted = true;
- },
- (e) => {
- console.error(e);
- }
- );
- },
- setVolume(value) {
- let player = this.player,
- index = player.currentWindowIndex;
- this.player.JS_SetVolume(index, value).then(
- () => {
- console.log('setVolume success', value);
- },
- (e) => {
- console.error(e);
- }
- );
- },
- /* 事件信息 */
- // getEventList() {
- // this.$api.getEventList({}, function (response) {
- // console.error(response, 6666);
- // that.eventlist = response.data;
- // });
- // axios.get('/api/culturalrelicplate/work_log/getEvent').then(function (response) {
- // that.eventlist = response.data.data;
- // });
- // },
- capture(imageType) {
- let player = this.player,
- index = player.currentWindowIndex;
- player.JS_CapturePicture(index, 'img', imageType).then(
- () => {
- console.log('capture success', imageType);
- },
- (e) => {
- console.error(e);
- }
- );
- },
- recordStart(type) {
- const codeMap = { MP4: 5, PS: 2 };
- let player = this.player,
- index = player.currentWindowIndex,
- fileName = `${moment().format('YYYYMMDDHHmm')}.mp4`;
- typeCode = codeMap[type];
- player.JS_StartSaveEx(index, fileName, typeCode).then(
- () => {
- console.log('record start ...');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- recordStop() {
- let player = this.player;
- index = player.currentWindowIndex;
- player.JS_StopSave(index).then(
- () => {
- console.log('record stoped, saving ...');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- /* 电子放大、智能信息 */
- enlarge() {
- let player = this.player,
- index = player.currentWindowIndex;
- player.JS_EnableZoom(index).then(
- () => {
- console.log('enlarge start..., select range...');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- enlargeClose() {
- let player = this.player,
- index = player.currentWindowIndex;
- player.JS_DisableZoom(index).then(
- () => {
- console.log('enlargeClose success');
- },
- (e) => {
- console.error(e);
- }
- );
- },
- intellectTrigger(openFlag) {
- let player = this.player,
- index = player.currentWindowIndex;
- let result = player.JS_RenderALLPrivateData(index, openFlag);
- console.log(`${openFlag ? 'open' : 'close'} intellect ${result === 1 ? 'success' : 'failed'}`);
- },
- getvideoInfo() {
- let player = this.player,
- index = player.currentWindowIndex;
- player.JS_GetVideoInfo(index).then(function (videoInfo) {
- console.log('videoInfo:', videoInfo);
- });
- },
- getOSDTime() {
- let player = this.player,
- index = player.currentWindowIndex;
- player.JS_GetOSDTime(index).then(function (time) {
- console.log('osdTime:', new Date(time));
- });
- },
- getUrlKey: function (name) {
- return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1].replace(/\+/g, '%20')) || null;
- }
- }
- };
- </script>
- <style>
- @media screen and (max-width: 991px) {
- #player {
- width: calc(100vw - 16px);
- height: calc((100vw - 16px) * 5 / 8);
- }
- }
- @media screen and (min-width: 992px) {
- #player {
- width: calc(80vw - 16px);
- height: calc((80vw - 16px) * 5 / 8);
- }
- }
- /deep/.anchorBL {
- display: none !important;
- }
- /deep/.BMapLabel {
- border: none !important;
- }
- /deep/.uni-forms-item__label {
- color: black !important;
- }
- /deep/.el-input__inner {
- border-color: #3c9cff !important;
- }
- /deep/.el-textarea__inner {
- width: 90%;
- border-color: #dcdfe6 !important;
- }
- /deep/.el-tree-node__content {
- &:hover {
- background-color: #d9ecff !important;
- }
- }
- /deep/.el-tree-node.is-current > .el-tree-node__content {
- background-color: #d9ecff !important;
- color: #333 !important;
- }
- /deep/.el-tree-node__expand-icon {
- font-size: 36rpx !important;
- }
- .custom-tree-node {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 14px;
- padding-right: 8px;
- }
- .body2 {
- padding: 20rpx;
- width: 100%;
- height: 1890rpx;
- background: url('@/static/img/wenhuazhan-bj.png') no-repeat center;
- background-size: 100% 100%;
- background-color: #f5f5f5;
- }
- .box {
- width: 100%;
- height: 95%;
- display: flex;
- }
- /* .hcqStyle7 {
- position: fixed;
- top: 16rpx;
- left: 30rpx;
- width: 200rpx;
- height: 100rpx;
- animation: rotate3D 10s linear infinite;
- font-family: cursive;
- text-shadow: 6px 2px 2px #626262;
- color: #3c9cff;
- }
- @keyframes rotate3D {
- 0% {
- transform: perspective(1000px) rotateY(0deg);
- }
- 100% {
- transform: perspective(1000px) rotateY(360deg);
- }
- } */
- .left_box {
- display: flex;
- flex-direction: column;
- width: 82%;
- margin-left: -20rpx;
- }
- .topTab {
- width: 100%;
- display: flex;
- margin-bottom: 50rpx;
- justify-content: space-around;
- }
- .btn {
- width: 230rpx;
- color: #3c9cff;
- border: 2px solid #3c9cff;
- font-size: 30rpx;
- cursor: pointer;
- }
- .activeBtn {
- color: aliceblue;
- border: none;
- background-color: #3c9cff;
- }
- .bh_title {
- height: 80rpx;
- line-height: 100rpx;
- margin-left: 10rpx;
- }
- .left_box_item {
- width: 740rpx;
- height: 460rpx;
- margin-left: -1px;
- margin-top: -1px;
- border: 1px solid #343434;
- }
- .right_box {
- width: 680rpx;
- height: 1800rpx;
- margin-right: 160rpx;
- overflow: scroll;
- background-color: #fff;
- }
- .right_box_item {
- margin-top: 20rpx;
- }
- .right_box_title {
- width: 140rpx;
- color: black;
- height: 60rpx;
- line-height: 60rpx;
- }
- .right_box_item_list {
- width: 100%;
- padding: 20rpx;
- font-size: 30rpx;
- box-sizing: border-box;
- background-color: #efefef;
- margin-left: 310rpx;
- }
- .item_list_item {
- height: 50rpx;
- line-height: 50rpx;
- margin-bottom: 10rpx;
- }
- .item_list_item:hover {
- background-color: #d9ecff;
- }
- .right_box_top {
- position: sticky;
- top: 0;
- z-index: 99;
- background-color: #efefef;
- margin-bottom: 10rpx;
- width: 100%;
- height: 60rpx;
- display: flex;
- justify-content: space-between;
- }
- .right_btm {
- width: 680rpx;
- height: 980rpx;
- overflow: scroll;
- background-color: #fff;
- }
- .jianju {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: -1px;
- }
- .gljk_item:hover {
- background-color: #d9ecff;
- }
- .jianju2 {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: -1px;
- }
- .jianju3 {
- display: flex;
- width: 600rpx;
- justify-content: space-between;
- align-items: center;
- margin-bottom: -1px;
- }
- .jianju_item {
- width: 600rpx;
- height: 70rpx;
- border: 1px solid #dbdbdb;
- border-radius: 5rpx;
- overflow: scroll;
- }
- .jianju_item2 {
- width: 920rpx;
- height: 90rpx;
- border: 1px solid #dbdbdb;
- border-radius: 5rpx;
- }
- .jianju_item3 {
- width: 360rpx;
- height: 70rpx;
- border: 1px solid #dbdbdb;
- border-radius: 5rpx;
- }
- .jianju_item4 {
- width: 360rpx;
- height: 70rpx;
- border: 1px solid #dbdbdb;
- border-radius: 5rpx;
- }
- .qj_box {
- display: flex;
- flex-direction: column;
- padding: 30rpx;
- box-sizing: border-box;
- width: 1800rpx;
- height: 1200rpx;
- border: 1px solid #dbdbdb;
- }
- .qj_jianju {
- margin-top: 20rpx;
- align-items: center;
- margin-bottom: -1px;
- }
- .gljk_item {
- margin-bottom: 10rpx;
- cursor: pointer;
- }
- .gljk_item:hover {
- background-color: #d9ecff;
- }
- .qj_jianju_item {
- display: flex;
- width: 300rpx;
- height: 70rpx;
- line-height: 70rpx;
- border: 1px solid #dbdbdb;
- border-radius: 5rpx;
- }
- .tanceng {
- position: absolute;
- z-index: 6;
- top: 10%;
- left: 20%;
- /* background: linear-gradient(#a38cdd, #ff8979, #868060, #826d67); */
- background-color: #f5f5f5;
- }
- .bottom_box_title {
- width: 100%;
- height: 60rpx;
- align-items: center;
- display: flex;
- position: sticky;
- top: 0;
- z-index: 99;
- background-color: #efefef;
- }
- .bottom_box_item {
- width: 100%;
- height: 100%;
- display: flex;
- flex-flow: row wrap;
- justify-content: space-around;
- }
- .bottom_box_content {
- width: 200rpx;
- height: 320rpx;
- margin-top: 10rpx;
- cursor: pointer;
- border: 1px solid #dbdbdb;
- }
- .show_box {
- width: 100%;
- height: 100%;
- background-color: #f2f2ec;
- display: flex;
- }
- .show_box_left {
- width: 60%;
- height: 100%;
- }
- .sjlx {
- display: flex;
- justify-content: space-around;
- line-height: 36px;
- }
- .box_left_top {
- width: 860rpx;
- height: 538rpx;
- color: black;
- padding: 30rpx;
- box-sizing: border-box;
- margin: 0 auto;
- margin-top: 50rpx;
- border: 1px solid #dbdbdb;
- }
- .box_left_top2 {
- width: 800rpx;
- height: 440rpx;
- color: black;
- padding: 30rpx;
- border: 1px solid #dbdbdb;
- margin: 0 auto;
- margin-top: 30rpx;
- }
- .show_box_right {
- width: 40%;
- height: 100%;
- margin-right: 120rpx;
- }
- .show_box_top {
- width: 100%;
- height: 43%;
- color: black;
- margin-top: 42rpx;
- box-sizing: border-box;
- padding: 30rpx;
- border: 1px solid #dbdbdb;
- }
- .show_box_bottom {
- width: 800rpx;
- position: absolute;
- left: 50rpx;
- bottom: 20rpx;
- height: 40%;
- padding: 30rpx;
- margin: auto;
- color: black;
- border: 1px solid #dbdbdb;
- box-sizing: border-box;
- overflow: scroll;
- }
- .box2 {
- width: 64%;
- margin: auto;
- margin-top: 60rpx;
- margin-left: 680rpx;
- background-color: #efefef;
- }
- .shijian_box {
- width: 2010rpx;
- display: flex;
- flex-flow: row wrap;
- align-item: flex-start;
- margin-top: 20rpx;
- background-color: #f2f2ec;
- }
- .shijian_item {
- width: 500rpx;
- height: 480rpx;
- border: 1px solid #dbdbdb;
- margin-left: -1px;
- margin-top: -1px;
- }
- .jk_title {
- width: 51%;
- height: 100rpx;
- position: absolute;
- padding: 20rpx;
- box-sizing: border-box;
- top: 30rpx;
- left: 0;
- }
- .lunxun_box {
- width: 67%;
- height: 1600rpx;
- background-color: #f2f2ec;
- margin-left: 680rpx;
- margin-top: 60rpx;
- }
- .lunxun_tw {
- width: 2400rpx;
- display: flex;
- flex-flow: row wrap;
- align-item: flex-start;
- margin-top: 20rpx;
- }
- .tw_item {
- width: 500rpx;
- height: 320rpx;
- padding: 10rpx;
- border: 1px solid #dbdbdb;
- margin-left: -1px;
- margin-top: -1px;
- }
- .jk_show {
- position: absolute;
- display: flex;
- justify-content: flex-start;
- width: 1800rpx;
- height: 1200rpx;
- background-color: aliceblue;
- top: 200rpx;
- left: 800rpx;
- border: 1px solid #dbdbdb;
- background-color: #f2f2ec;
- }
- .jk_dcl_tc {
- z-index: 5;
- position: absolute;
- top: 200rpx;
- left: 700rpx;
- width: 2060rpx;
- height: 1200rpx;
- padding: 20rpx;
- background-color: aliceblue;
- }
- .jk_tc_box {
- width: 100%;
- height: 100%;
- overflow: scroll;
- }
- .jk_tc_box2 {
- display: flex;
- flex-flow: row wrap;
- align-item: flex-start;
- width: 100%;
- }
- .jk_tc_item {
- padding: 10rpx;
- width: 480rpx;
- height: 420rpx;
- border: 1px solid #dbdbdb;
- }
- .pzsj_tc {
- width: 1300rpx;
- height: 600rpx;
- padding: 40rpx;
- position: absolute;
- overflow: scroll;
- top: 200rpx;
- left: 1000rpx;
- background-color: aliceblue;
- }
- .sjjg_tc {
- width: 2600rpx;
- height: 1400rpx;
- padding: 20rpx;
- position: absolute;
- top: 200rpx;
- left: 300rpx;
- background-color: aliceblue;
- }
- .sj_top_box {
- width: 2500rpx;
- height: 160rpx;
- display: flex;
- flex-flow: wrap;
- justify-content: space-around;
- margin-bottom: 180rpx;
- /* background-color: yellowgreen; */
- }
- .sj_box {
- display: flex;
- margin-top: 10rpx;
- }
- .sj_item {
- width: 500rpx;
- height: 70rpx;
- margin-bottom: 10rpx;
- border: 1px solid #dbdbdb;
- border-radius: 5rpx;
- overflow: scroll;
- }
- /deep/.u-navbar__content {
- width: 200rpx !important;
- }
- /deep/.btn-prev {
- border: none;
- }
- /deep/.btn-next {
- border: none;
- }
- /deep/.el-icon-arrow-left {
- line-height: 50rpx;
- }
- /deep/ .el-input .el-input__inner {
- border-color: #dcdfe6 !important;
- }
- </style>
|