index2.vue 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536
  1. <template>
  2. <!-- 全局大容器 -->
  3. <view class="body2">
  4. <view class="box">
  5. <!-- 左侧监控容器 -->
  6. <view class="left_box">
  7. <view class="topTab">
  8. <view class="" style="display: flex">
  9. <image style="width: 100rpx; height: 100rpx" src="../../static/img/wlt.png" mode="widthFix"></image>
  10. <h3 class="bh_title">湖里区不可移动文物数字化监管平台</h3>
  11. </view>
  12. <el-button
  13. icon="el-icon-view"
  14. class="btn"
  15. @click="
  16. maintabindex = 0;
  17. refreshBtn();
  18. "
  19. :class="{ activeBtn: maintabindex == 0 }"
  20. >
  21. 预览
  22. </el-button>
  23. <el-button
  24. icon="el-icon-document"
  25. class="btn"
  26. @click="
  27. maintabindex = 2;
  28. hideWndBtn();
  29. postEventList();
  30. "
  31. :class="{ activeBtn: maintabindex == 2 }"
  32. >
  33. 事件
  34. </el-button>
  35. <el-button
  36. class="btn"
  37. icon="el-icon-setting"
  38. @click="
  39. maintabindex = 3;
  40. hideWndBtn();
  41. getPollingConfig();
  42. "
  43. :class="{ activeBtn: maintabindex == 3 }"
  44. >
  45. 轮巡配置
  46. </el-button>
  47. <el-button
  48. icon="el-icon-loading"
  49. style="width: 230rpx; font-size: 30rpx"
  50. v-if="maintabindex == 0"
  51. @click="
  52. maintabindex = 0;
  53. refreshBtn();
  54. "
  55. type="success"
  56. >
  57. 刷新
  58. </el-button>
  59. </view>
  60. <!-- 监控视频容器 -->
  61. <!-- <view id="player" v-show="maintabindex == 0"></view> -->
  62. <!-- 事件 -->
  63. <view v-if="maintabindex == 2">
  64. <view class="box2">
  65. <view>
  66. <el-row justify="space-between" :gutter="20">
  67. <el-col :span="6">
  68. <el-input v-model.trim="queryVal" customStyle="width:360rpx;" placeholder="输入信息查询" border="surround"></el-input>
  69. </el-col>
  70. <el-col :span="6">
  71. <el-date-picker v-model="dateVal" align="right" type="date" placeholder="选择日期" :picker-options="pickerOptions"></el-date-picker>
  72. </el-col>
  73. <el-col :span="5">
  74. <el-select v-model="stateVal" clearable placeholder="按状态查询">
  75. <el-option v-for="item in options" :key="item.id" :label="item.label" :value="item.label"></el-option>
  76. </el-select>
  77. </el-col>
  78. <el-col :span="3">
  79. <u-button @click="searchBtn" type="primary" text="搜索" customStyle="width:130rpx;"></u-button>
  80. </el-col>
  81. <el-col :span="4">
  82. <u-button v-print="'#printDiv'" type="primary" text="打印" customStyle="width:130rpx;"></u-button>
  83. </el-col>
  84. </el-row>
  85. </view>
  86. <view class="shijian_box" id="printDiv">
  87. <view class="shijian_item" v-for="(item, index) in tableData">
  88. <img :src="item.image" style="width: 300rpx; height: 250rpx" />
  89. <view class="">{{ item.name }}</view>
  90. <view class="">报警原因:{{ item.reason }}</view>
  91. <view class="">报警类型:{{ item.event_type_text }}</view>
  92. <view class="">事件等级:{{ item.event_level_text }}</view>
  93. <!-- <el-button @click="falseAlarmBtn(item)" type="text">误报</el-button> -->
  94. </view>
  95. <el-empty style="margin: auto" v-if="tableData.length <= 0" description="暂无事件"></el-empty>
  96. </view>
  97. <el-pagination
  98. style="text-align: right; margin-top: 30rpx"
  99. @size-change="handleSizeChange"
  100. @current-change="handleCurrentChange"
  101. :current-page="currentPage"
  102. background
  103. :page-sizes="[8, 12, 16]"
  104. :page-size="pageSize"
  105. layout="total, sizes, prev, pager, next, jumper"
  106. :total="total"
  107. ></el-pagination>
  108. </view>
  109. </view>
  110. <!-- 事件end -->
  111. <!-- 轮巡设置 -->
  112. <view v-if="maintabindex == 3">
  113. <view class="lunxun_box">
  114. <view>
  115. <el-row justify="space-between" :gutter="20">
  116. <el-col :span="8" style="display: flex">
  117. <view style="width: 280rpx; line-height: 80rpx">轮巡时间/分钟</view>
  118. <el-input v-model.trim="interval" customStyle="width:360rpx;" :placeholder="interval" border="surround"></el-input>
  119. </el-col>
  120. <el-col :span="8" style="display: flex">
  121. <view style="width: 160rpx; line-height: 80rpx">轮巡个数</view>
  122. <el-select v-model="number" placeholder="请选择">
  123. <el-option v-for="item in numberList" :key="item.value" :label="item.label" :value="item.label"></el-option>
  124. </el-select>
  125. </el-col>
  126. <el-col :span="3">
  127. <u-button @click="modifyBtn" type="primary" text="修改" customStyle="width:130rpx;"></u-button>
  128. </el-col>
  129. </el-row>
  130. </view>
  131. <!-- 图文列表 -->
  132. <view class="lunxun_tw" v-if="turningList.length > 0">
  133. <view class="" v-for="(item, index) in turningList">
  134. <view class="tw_item">
  135. <img style="width: 400rpx; height: 200rpx" :src="item.image" alt="" />
  136. <view>{{ item.name }}</view>
  137. <view>{{ item.position }}</view>
  138. <el-button @click="lunxunBtn(item, index)" type="text">删除轮巡</el-button>
  139. </view>
  140. </view>
  141. </view>
  142. <el-empty v-else description="暂无配置"></el-empty>
  143. </view>
  144. </view>
  145. <!-- 轮巡设置end -->
  146. </view>
  147. <!-- 左侧监控容器end -->
  148. <!-- 右侧文物列表容器 -->
  149. <view v-if="maintabindex == 0 || maintabindex == 1">
  150. <view class="right_box">
  151. <view class="right_box_top">
  152. <h3 class="right_box_title">文物列表</h3>
  153. <u-button @click="qhGetZhoujieDevice" type="primary" size="mini" customStyle="width:160rpx; height: 53rpx;">
  154. <i style="line-height: 10rpx; margin-right: 5rpx" :class="qhBtn ? 'el-icon-guide ' : 'el-icon-office-building'"></i>
  155. {{ qhBtn ? '显示文物 ' : '显示城区' }}
  156. </u-button>
  157. <view style="display: flex">
  158. <el-input
  159. v-model="culturalValue"
  160. clearable
  161. style="width: 360rpx"
  162. size="mini"
  163. placeholder="输入文物关键字进行筛选"
  164. suffix-icon="el-icon-search"
  165. ></el-input>
  166. <!-- <u-button @click="SearchCultural" icon="search" type= "primary" text="搜索" size="mini" customStyle="width:80rpx; height: 55rpx;"></u-button> -->
  167. </view>
  168. </view>
  169. <view class="right_box_item">
  170. <el-tree ref="tree" :filter-node-method="filterNode" :data="treeData" :props="defaultProps" @node-click="handleNodeClick">
  171. <span class="custom-tree-node" slot-scope="{ node, data }">
  172. <span v-if="data.zhoujie_device_type != '1'">{{ node.label }}</span>
  173. <span v-if="data.zhoujie_device_type == '1'" :style="oData.cameraIndexCode == data.device_code ? 'color:#3c9cff' : 'color:black'">
  174. {{ node.label }}
  175. </span>
  176. <span v-if="data.area != undefined">
  177. <el-button
  178. @click.stop="
  179. timeBtn(data);
  180. hideWndBtn();
  181. "
  182. type="text"
  183. size="mini"
  184. >
  185. 文物开放时间
  186. </el-button>
  187. </span>
  188. <span v-if="data.zhoujie_device_type == '1'">
  189. <el-button type="text" size="mini" @click.stop="() => append(data)">{{ data.isPolling ? ' 删除轮巡' : '加入轮巡' }}</el-button>
  190. </span>
  191. </span>
  192. </el-tree>
  193. </view>
  194. </view>
  195. </view>
  196. <!-- 监控弹层 -->
  197. <view class="jk_show" v-show="showMonitor">
  198. <u-icon
  199. @click="
  200. showMonitor = false;
  201. showWndBtn();
  202. "
  203. name="close"
  204. size="40rpx"
  205. style="position: absolute; top: 5px; right: 5px"
  206. ></u-icon>
  207. <view class="jk_title">
  208. <text>【{{ treeNode.name }}】</text>
  209. <text>【{{ jkName }}】</text>
  210. <el-badge :value="deviceList.power_supply">
  211. <el-button
  212. @click="
  213. showHandle = true;
  214. eventDclBtn();
  215. "
  216. size="small"
  217. >
  218. 待处理事件
  219. </el-button>
  220. </el-badge>
  221. </view>
  222. <!-- 监控视频展示容器 -->
  223. <view style="width: 50%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center">
  224. <view style="width: 90%; height: 90%; border-radius: 40rpx; margin-top: 200rpx; margin-bottom: 200rpx">
  225. <iframe
  226. border="0"
  227. :src="webViedoUrl"
  228. width="100%"
  229. height="100%"
  230. frameborder="no"
  231. marginwidth="0"
  232. marginheight="0"
  233. scrolling="no"
  234. allowtransparency="yes"
  235. ></iframe>
  236. </view>
  237. </view>
  238. <!-- 关联监控 -->
  239. <view class="show_box_bottom">
  240. <view class="">
  241. <h3 style="margin-bottom: 20rpx">关联监控</h3>
  242. <view @click="openVideo(item)" v-for="(item, index) in associatedDevices" class="gljk_item" :style="associationTab == item.name ? 'color:#3c9cff' : ''">
  243. {{ item.name }}
  244. </view>
  245. <el-empty style="height: 100rpx; margin-top: 80rpx" v-if="associatedDevices <= 0" description="暂无关联监控"></el-empty>
  246. </view>
  247. </view>
  248. <!-- 监控信息 -->
  249. <view class="" style="width: 50%; height: 100%">
  250. <view class="" style="width: 94%; height: 100rpx; margin: 40rpx auto">
  251. <h4>五防信息:</h4>
  252. <text>联系人:{{ deviceList.five_prevention_name }}</text>
  253. <text style="margin-left: 20rpx">电话:{{ deviceList.five_prevention_mobile }}</text>
  254. </view>
  255. <view class="box_left_top2">
  256. <view class="jianju">
  257. 文物负责人:
  258. <view class="jianju_item">{{ deviceList.director }}</view>
  259. </view>
  260. <view class="jianju">
  261. 文物地址:
  262. <view class="jianju_item">{{ deviceList.address }}</view>
  263. </view>
  264. <view class="jianju">
  265. 设备状态:
  266. <view class="jianju_item">{{ deviceList.status }}</view>
  267. </view>
  268. <view class="jianju">
  269. 在线状态:
  270. <view class="jianju_item">{{ deviceList.on_line }}</view>
  271. </view>
  272. <view class="jianju">
  273. 设备编号:
  274. <view class="jianju_item">{{ deviceList.device_code }}</view>
  275. </view>
  276. </view>
  277. <!-- 地图 -->
  278. <!-- 监控地图-->
  279. <view style="width: 850rpx; height: 480rpx; margin: 20rpx">
  280. <view id="allmap" class="map" style="width: 100%; height: 100%"></view>
  281. </view>
  282. </view>
  283. </view>
  284. <!-- 监控弹层end -->
  285. <!-- 监控待处理事件弹层 -->
  286. <view v-if="showHandle" class="jk_dcl_tc">
  287. <u-icon @click="showHandle = false" name="close" size="40rpx" style="position: absolute; top: 5px; right: 5px"></u-icon>
  288. <view class="jk_tc_box">
  289. <view class="jk_tc_box2">
  290. <view v-for="item in eventDclList" class="jk_tc_item">
  291. <img style="width: 400rpx; height: 200rpx" :src="item.image" />
  292. <view class="">文物名称:{{ item.name }}</view>
  293. <view class="">事件类型:{{ item.event_type_text }}</view>
  294. <view class="">报警原因:{{ item.reason }}</view>
  295. <view class="">事件类型:{{ item.event_level_text }}</view>
  296. <el-button type="text" @click="viewEventBtn(item)">查看事件</el-button>
  297. </view>
  298. </view>
  299. <el-empty v-if="eventDclList.length <= 0" description="暂无事件"></el-empty>
  300. </view>
  301. </view>
  302. <!-- 监控待处理事件弹层end -->
  303. <!-- 查看事件弹层 -->
  304. <view class="tanceng" v-show="showViewEvent">
  305. <view style="width: 1600rpx; height: 1280rpx">
  306. <view class="show_box">
  307. <!-- 右侧容器 -->
  308. <view class="show_box_left">
  309. <view class="" style="margin-left: 120rpx; margin-top: 50rpx">
  310. <view class="" style="width: 560rpx; height: 1000rpx; padding: 20rpx; border: 1px solid #dbdbdb">
  311. <view class="sjlx">
  312. 事件等级:
  313. <view class="jianju_item3">{{ itemList.event_level_text }}</view>
  314. </view>
  315. <view class="sjlx">
  316. 事件类型:
  317. <view class="jianju_item3">{{ itemList.event_type_text }}</view>
  318. </view>
  319. <view class="sjlx">
  320. 事件状态:
  321. <view class="jianju_item3">{{ itemList.status_text }}</view>
  322. </view>
  323. <view style="margin: 0 auto; margin-top: 130rpx; width: 600rpx; height: 420rpx">
  324. <h3 style="margin-bottom: 20rpx">事件处理报告</h3>
  325. <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model.trim="valueTxt" resize="none"></el-input>
  326. <view class="" style="display: flex; margin-top: 50rpx">
  327. <u-button @click="submitReport" type="primary" text="提交" customStyle="width:130rpx;"></u-button>
  328. <u-button text="误报" customStyle="width:130rpx;"></u-button>
  329. </view>
  330. </view>
  331. </view>
  332. </view>
  333. </view>
  334. <!-- 左侧容器 -->
  335. <view class="show_box_right">
  336. <u-icon @click="showViewEvent = false" name="close" size="40rpx" style="position: absolute; top: 5px; right: 5px"></u-icon>
  337. <!-- 处置体系 -->
  338. <view class="show_box_top">
  339. <h3 style="margin-bottom: 20rpx">处置体系</h3>
  340. <view class="">
  341. <view class="jianju">
  342. 联系人:
  343. <view class="jianju_item3">{{ deviceList.five_prevention_name }}</view>
  344. </view>
  345. <view class="jianju">
  346. 联系电话:
  347. <view class="jianju_item3">{{ deviceList.five_prevention_mobile }}</view>
  348. </view>
  349. </view>
  350. </view>
  351. <!-- 事件弹层地图 -->
  352. <view class="global" style="width: 650rpx; height: 460rpx; margin-top: 40rpx">
  353. <view id="allmap2" class="map" style="width: 100%; height: 100%"></view>
  354. </view>
  355. </view>
  356. </view>
  357. </view>
  358. </view>
  359. <!-- 查看事件弹层end -->
  360. <!-- 倾角弹层 -->
  361. <view v-show="showDipAngle" class="jk_show">
  362. <view class="qj_box" style="">
  363. <u-icon
  364. @click="
  365. showDipAngle = false;
  366. showWndBtn();
  367. "
  368. name="close"
  369. size="40rpx"
  370. style="position: absolute; top: 5px; right: 5px"
  371. ></u-icon>
  372. <view style="display: flex; align-items: baseline">
  373. <h3 style="margin-bottom: 20rpx">【{{ treeNode.name }}】</h3>
  374. <el-badge :value="dipangleList.power_supply">
  375. <el-button size="mini">待处理事件</el-button>
  376. </el-badge>
  377. </view>
  378. <view class="" style="width: 1100rpx; height: 700rpx; border: 1px solid #dbdbdb">
  379. <view class="qj_jianju">
  380. <view class="jianju2">
  381. 文物负责人:
  382. <view class="jianju_item2">{{ dipangleList.director }}</view>
  383. </view>
  384. <view class="jianju2">
  385. 文物地址:
  386. <view class="jianju_item2">{{ dipangleList.address }}</view>
  387. </view>
  388. <view class="jianju2">
  389. 在线状态:
  390. <view class="jianju_item2">{{ dipangleList.on_line }}</view>
  391. </view>
  392. <view class="jianju2">
  393. 设备编号:
  394. <view class="jianju_item2">{{ dipangleList.device_code }}</view>
  395. </view>
  396. <view class="jianju2">
  397. 设备状态:
  398. <view class="jianju_item2">{{ dipangleList.status }}</view>
  399. </view>
  400. <view class="jianju2">
  401. 五防处理人员:
  402. <view class="jianju_item2">{{ dipangleList.five_prevention_name }}</view>
  403. </view>
  404. <view class="jianju2">
  405. 五防处理电话:
  406. <view class="jianju_item2">{{ dipangleList.five_prevention_mobile }}</view>
  407. </view>
  408. </view>
  409. </view>
  410. </view>
  411. </view>
  412. <!-- 倾角弹层end -->
  413. <!-- 右侧文物列表容器 -->
  414. </view>
  415. <!-- 配置时间弹层 -->
  416. <view v-if="showTime" class="pzsj_tc">
  417. <u-icon
  418. @click="
  419. showTime = false;
  420. showWndBtn();
  421. "
  422. name="close"
  423. size="40rpx"
  424. style="position: absolute; top: 5px; right: 5px"
  425. ></u-icon>
  426. <el-row justify="space-between" :gutter="20" style="position: sticky; bottom: 0; left: 100rpx">
  427. <el-col :span="10" style="display: flex">
  428. <view style="width: 280rpx; line-height: 80rpx">开放时间</view>
  429. <el-input v-model="startTime" customStyle="width:360rpx;" :placeholder="interval" border="surround"></el-input>
  430. </el-col>
  431. <el-col :span="10" style="display: flex">
  432. <view style="width: 280rpx; line-height: 80rpx">结束时间</view>
  433. <el-input v-model="endTime" customStyle="width:360rpx;" :placeholder="interval" border="surround"></el-input>
  434. </el-col>
  435. <el-col :span="3">
  436. <u-button @click="modifyTime" type="primary" text="修改" customStyle="width:130rpx;"></u-button>
  437. </el-col>
  438. </el-row>
  439. <view style="width: 80%">
  440. <view v-for="item in opennessTimeList" :key="item.index" class="" style="display: flex; width: 100%; margin-top: 10rpx">
  441. <view class="" style="width: 500rpx">用户昵称:{{ item.nickname }}</view>
  442. <view class="" style="width: 550rpx">手机号:{{ item.mobile }}</view>
  443. <view class="" style="width: 500rpx">开始时间:{{ item.start_time }}</view>
  444. <view class="" style="width: 500rpx">结束时间:{{ item.end_time }}</view>
  445. </view>
  446. </view>
  447. </view>
  448. <!-- 配置时间弹层end -->
  449. <!-- 事件警告弹层 -->
  450. <view class="sjjg_tc" v-if="showWarn">
  451. <u-icon
  452. @click="
  453. showWarn = false;
  454. isAutio = false;
  455. "
  456. name="close"
  457. size="40rpx"
  458. style="position: absolute; top: 5px; right: 5px"
  459. ></u-icon>
  460. <h3 class="">【{{ latestEvents.cr_name }}】</h3>
  461. <view class="sj_top_box">
  462. <view class="sj_box">
  463. <view class="" style="width: 180rpx">文物负责人:</view>
  464. <view class="sj_item">{{ latestEvents.director }}</view>
  465. </view>
  466. <view class="sj_box">
  467. <view class="" style="width: 180rpx">文物地址:</view>
  468. <view class="sj_item">{{ latestEvents.address }}</view>
  469. </view>
  470. <view class="sj_box">
  471. <view class="" style="width: 180rpx">设备状态:</view>
  472. <view class="sj_item">{{ latestEvents.device_status }}</view>
  473. </view>
  474. <view class="sj_box">
  475. <view class="" style="width: 180rpx">在线状态:</view>
  476. <view class="sj_item">{{ latestEvents.on_line }}</view>
  477. </view>
  478. <view class="sj_box">
  479. <view class="" style="width: 180rpx">事件发生时间:</view>
  480. <view class="sj_item">{{ latestEvents.created_at }}</view>
  481. </view>
  482. <view class="sj_box">
  483. <view class="" style="width: 180rpx">事件说明时间:</view>
  484. <view class="sj_item">{{ latestEvents.sillustrate_time }}</view>
  485. </view>
  486. <view class="sj_box">
  487. <view class="" style="width: 180rpx">事件报告时间:</view>
  488. <view class="sj_item">{{ latestEvents.illustrate_time }}</view>
  489. </view>
  490. <view class="sj_box">
  491. <view class="" style="width: 180rpx">五防处置人员:</view>
  492. <view class="sj_item">{{ latestEvents.five_prevention_name }}</view>
  493. </view>
  494. <view class="sj_box">
  495. <view class="" style="width: 180rpx">五防处置电话:</view>
  496. <view class="sj_item">{{ latestEvents.five_prevention_mobile }}</view>
  497. </view>
  498. </view>
  499. <el-row justify="space-between" :gutter="20" style="margin-left: 235rpx">
  500. <el-col :span="6">
  501. <el-select v-model="event_level_val" clearable placeholder="事件等级">
  502. <el-option v-for="item in event_level_list" :key="item.value" :label="item.label" :value="item.label"></el-option>
  503. </el-select>
  504. </el-col>
  505. <el-col :span="6">
  506. <el-select v-model="event_type_val" clearable placeholder="事件类型">
  507. <el-option v-for="item in event_type_list" :key="item.value" :label="item.label" :value="item.label"></el-option>
  508. </el-select>
  509. </el-col>
  510. <el-col :span="6">
  511. <el-select v-model="status_val" clearable placeholder="事件状态">
  512. <el-option v-for="item in status_list" :key="item.value" :label="item.label" :value="item.label"></el-option>
  513. </el-select>
  514. </el-col>
  515. <el-col :span="5">
  516. <!-- <el-input placeholder="请输入事件说明" v-model="descriptionVal"></el-input> -->
  517. <el-autocomplete
  518. class="inline-input"
  519. v-model="descriptionVal"
  520. :fetch-suggestions="querySearch"
  521. placeholder="请输入事件说明"
  522. @select="handleSelect"
  523. ></el-autocomplete>
  524. </el-col>
  525. </el-row>
  526. <view class="" style="margin-top: 50rpx; margin-left: 860rpx">
  527. <h3>事件处理报告</h3>
  528. <view class="" style="width: 700rpx">
  529. <el-input type="textarea" resize="none" :rows="5" placeholder="请输入报告内容" v-model.trim="valueTxt2"></el-input>
  530. </view>
  531. <view class="" style="margin-top: 50rpx; margin-left: 160rpx">
  532. <el-button @click="submitReportBtn" size="medium" type="primary">提交</el-button>
  533. <el-button @click="wubaoBtn" size="medium" type="success">误报</el-button>
  534. </view>
  535. </view>
  536. </view>
  537. <!-- 事件警告弹层end -->
  538. <iframe v-if="isAutio" src="../../static/img/tip.mp3" frameborder="0" wmode="transparent | window" style="display: none"></iframe>
  539. <view id="playWnd" style="position: absolute; top: 80px; left: 0"></view>
  540. </view>
  541. </template>
  542. <script>
  543. import { data } from '../../uni_modules/uview-ui/libs/mixin/mixin';
  544. import { mymap } from '@/common/AMap.js';
  545. // let id = 1000;
  546. var md5 = require('@/GraceUI5/js/md5.js');
  547. function launchFullscreen(element) {
  548. if (element.requestFullscreen) {
  549. element.requestFullscreen();
  550. } else if (element.mozRequestFullScreen) {
  551. element.mozRequestFullScreen();
  552. } else if (element.msRequestFullscreen) {
  553. element.msRequestFullscreen();
  554. } else if (element.webkitRequestFullscreen) {
  555. element.webkitRequestFullScreen();
  556. }
  557. }
  558. function exitFullscreen() {
  559. if (document.exitFullscreen) {
  560. document.exitFullscreen();
  561. } else if (document.msExitFullscreen) {
  562. document.msExitFullscreen();
  563. } else if (document.mozCancelFullScreen) {
  564. document.mozCancelFullScreen();
  565. } else if (document.webkitExitFullscreen) {
  566. document.webkitExitFullscreen();
  567. }
  568. }
  569. /* 插件 */
  570. //页面加载时创建播放实例初始化
  571. //声明公用变量
  572. let oWebControl = null;
  573. var initCount = 0;
  574. var pubKey = '';
  575. // 创建播放实例
  576. function initPlugin() {
  577. oWebControl = new WebControl({
  578. szPluginContainer: 'playWnd', // 指定容器id
  579. iServicePortStart: 15900, // 指定起止端口号,建议使用该值
  580. iServicePortEnd: 15909,
  581. szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11', // 用于IE10使用ActiveX的clsid
  582. cbConnectSuccess: function () {
  583. // 创建WebControl实例成功
  584. oWebControl
  585. .JS_StartService('window', {
  586. // WebControl实例创建成功后需要启动服务
  587. dllPath: './VideoPluginConnect.dll' // 值"./VideoPluginConnect.dll"写死
  588. })
  589. .then(
  590. function () {
  591. console.log('启动成功');
  592. // 启动插件服务成功
  593. oWebControl.JS_SetWindowControlCallback({
  594. // 设置消息回调
  595. cbIntegrationCallBack: cbIntegrationCallBack
  596. });
  597. oWebControl.JS_CreateWnd('playWnd', 1500, 850).then(function () {
  598. //JS_CreateWnd创建视频播放窗口,宽高可设定
  599. inits(); // 创建播放实例成功后初始化
  600. });
  601. },
  602. function () {
  603. // 启动插件服务失败
  604. }
  605. );
  606. },
  607. cbConnectError: function () {
  608. // 创建WebControl实例失败
  609. oWebControl = null;
  610. $('#playWnd').html('插件未启动,正在尝试启动,请稍候...');
  611. WebControl.JS_WakeUp('VideoWebPlugin://'); // 程序未启动时执行error函数,采用wakeup来启动程序
  612. initCount++;
  613. if (initCount < 3) {
  614. setTimeout(function () {
  615. initPlugin();
  616. }, 3000);
  617. } else {
  618. $('#playWnd').html('插件启动失败,请检查插件是否安装!');
  619. }
  620. },
  621. cbConnectClose: function (bNormalClose) {
  622. // 异常断开:bNormalClose = false
  623. // JS_Disconnect正常断开:bNormalClose = true
  624. console.log('cbConnectClose');
  625. oWebControl = null;
  626. }
  627. });
  628. }
  629. // 设置窗口控制回调
  630. function setCallbacks() {
  631. oWebControl.JS_SetWindowControlCallback({
  632. cbIntegrationCallBack: cbIntegrationCallBack
  633. });
  634. }
  635. // 推送消息
  636. function cbIntegrationCallBack(oData) {
  637. that.oData = oData.responseMsg.msg;
  638. // console.log(JSON.stringify(oData.responseMsg));
  639. }
  640. //初始化
  641. function inits() {
  642. getPubKey(function () {
  643. ////////////////////////////////// 请自行修改以下变量值 ////////////////////////////////////
  644. var appkey = '26175856'; //综合安防管理平台提供的appkey,必填
  645. var secret = setEncrypt('or5AShxv6aRLgzwNQ31W'); //综合安防管理平台提供的secret,必填
  646. var ip = '192.168.10.10'; //综合安防管理平台IP地址,必填
  647. var playMode = 0; //初始播放模式:0-预览,1-回放
  648. var port = 10443; //综合安防管理平台端口,若启用HTTPS协议,默认443
  649. var snapDir = '/map/SnapDir'; //抓图存储路径
  650. var videoDir = '/map/VideoDir'; //紧急录像或录像剪辑存储路径
  651. var layout = '3x3'; //playMode指定模式的布局
  652. var enableHTTPS = 1; //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
  653. var encryptedFields = 'secret'; //加密字段,默认加密领域为secret
  654. var showToolbar = 1; //是否显示工具栏,0-不显示,非0-显示
  655. var showSmart = 1; //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
  656. var buttonIDs = '0,16,256,257,258,259,260,512,513,514,515,516,517,768,769'; //自定义工具条按钮
  657. ////////////////////////////////// 请自行修改以上变量值 ////////////////////////////////////
  658. oWebControl
  659. .JS_RequestInterface({
  660. funcName: 'init',
  661. argument: JSON.stringify({
  662. appkey: appkey, //API网关提供的appkey
  663. secret: secret, //API网关提供的secret
  664. ip: ip, //API网关IP地址
  665. playMode: playMode, //播放模式(决定显示预览还是回放界面)
  666. port: port, //端口
  667. snapDir: snapDir, //抓图存储路径
  668. videoDir: videoDir, //紧急录像或录像剪辑存储路径
  669. layout: layout, //布局
  670. enableHTTPS: enableHTTPS, //是否启用HTTPS协议
  671. encryptedFields: encryptedFields, //加密字段
  672. showToolbar: showToolbar, //是否显示工具栏
  673. showSmart: showSmart, //是否显示智能信息
  674. buttonIDs: buttonIDs //自定义工具条按钮
  675. })
  676. })
  677. .then(function (oData) {
  678. console.log('init ok');
  679. oWebControl.JS_Resize(1500, 850); // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
  680. that.getPollingConfig();
  681. });
  682. });
  683. }
  684. //获取公钥
  685. function getPubKey(callback) {
  686. oWebControl
  687. .JS_RequestInterface({
  688. funcName: 'getRSAPubKey',
  689. argument: JSON.stringify({
  690. keyLength: 1024
  691. })
  692. })
  693. .then(function (oData) {
  694. console.log(oData);
  695. if (oData.responseMsg.data) {
  696. pubKey = oData.responseMsg.data;
  697. callback();
  698. }
  699. });
  700. }
  701. //RSA加密
  702. function setEncrypt(value) {
  703. var encrypt = new JSEncrypt();
  704. encrypt.setPublicKey(pubKey);
  705. return encrypt.encrypt(value);
  706. }
  707. // 监听resize事件,使插件窗口尺寸跟随DIV窗口变化
  708. $(window).resize(function () {
  709. if (oWebControl != null) {
  710. oWebControl.JS_Resize(1500, 850);
  711. setWndCover();
  712. }
  713. });
  714. // 监听滚动条scroll事件,使插件窗口跟随浏览器滚动而移动
  715. $(window).scroll(function () {
  716. if (oWebControl != null) {
  717. oWebControl.JS_Resize(1500, 850);
  718. setWndCover();
  719. }
  720. });
  721. // 设置窗口裁剪,当因滚动条滚动导致窗口需要被遮住的情况下需要JS_CuttingPartWindow部分窗口
  722. function setWndCover() {
  723. var iWidth = $(window).width();
  724. var iHeight = $(window).height();
  725. var oDivRect = $('#playWnd').get(0).getBoundingClientRect();
  726. var iCoverLeft = oDivRect.left < 0 ? Math.abs(oDivRect.left) : 0;
  727. var iCoverTop = oDivRect.top < 0 ? Math.abs(oDivRect.top) : 0;
  728. var iCoverRight = oDivRect.right - iWidth > 0 ? Math.round(oDivRect.right - iWidth) : 0;
  729. var iCoverBottom = oDivRect.bottom - iHeight > 0 ? Math.round(oDivRect.bottom - iHeight) : 0;
  730. iCoverLeft = iCoverLeft > 1000 ? 1000 : iCoverLeft;
  731. iCoverTop = iCoverTop > 600 ? 600 : iCoverTop;
  732. iCoverRight = iCoverRight > 1000 ? 1000 : iCoverRight;
  733. iCoverBottom = iCoverBottom > 600 ? 600 : iCoverBottom;
  734. oWebControl.JS_RepairPartWindow(0, 0, 1001, 600); // 多1个像素点防止还原后边界缺失一个像素条
  735. if (iCoverLeft != 0) {
  736. oWebControl.JS_CuttingPartWindow(0, 0, iCoverLeft, 600);
  737. }
  738. if (iCoverTop != 0) {
  739. oWebControl.JS_CuttingPartWindow(0, 0, 1001, iCoverTop); // 多剪掉一个像素条,防止出现剪掉一部分窗口后出现一个像素条
  740. }
  741. if (iCoverRight != 0) {
  742. oWebControl.JS_CuttingPartWindow(1000 - iCoverRight, 0, iCoverRight, 600);
  743. }
  744. if (iCoverBottom != 0) {
  745. oWebControl.JS_CuttingPartWindow(0, 600 - iCoverBottom, 1000, iCoverBottom);
  746. }
  747. }
  748. //视频预览功能
  749. function startvideo(winid, indexcode) {
  750. var cameraIndexCode = indexcode; //获取输入的监控点编号值,必填
  751. var streamMode = 0; //主子码流标识:0-主码流,1-子码流
  752. var transMode = 1; //传输协议:0-UDP,1-TCP
  753. var gpuMode = 0; //是否启用GPU硬解,0-不启用,1-启用
  754. var wndId = winid + 1; //播放窗口序号(在2x2以上布局下可指定播放窗口)
  755. cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, '');
  756. cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, '');
  757. oWebControl.JS_RequestInterface({
  758. funcName: 'startPreview',
  759. argument: JSON.stringify({
  760. cameraIndexCode: cameraIndexCode, //监控点编号
  761. streamMode: streamMode, //主子码流标识
  762. transMode: transMode, //传输协议
  763. gpuMode: gpuMode, //是否开启GPU硬解
  764. wndId: wndId //可指定播放窗口
  765. })
  766. });
  767. }
  768. //停止全部预览
  769. $('#stopAllPreview').click(function () {
  770. oWebControl.JS_RequestInterface({
  771. funcName: 'stopAllPreview'
  772. });
  773. });
  774. // 标签关闭
  775. $(window).unload(function () {
  776. if (oWebControl != null) {
  777. oWebControl.JS_HideWnd(); // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
  778. oWebControl.JS_Disconnect().then(
  779. function () {
  780. // 断开与插件服务连接成功
  781. },
  782. function () {
  783. // 断开与插件服务连接失败
  784. }
  785. );
  786. }
  787. });
  788. /* 插件 */
  789. const IS_MOVE_DEVICE = document.body.clientWidth < 992; // 是否移动设备
  790. const MSE_IS_SUPPORT = !!window.MediaSource; // 是否支持mse
  791. let that;
  792. export default {
  793. data() {
  794. return {
  795. isAutio: false /* 音频 */,
  796. timeId: '',
  797. eventId: '',
  798. ak: '83lYk9WITWwCmTrzmeX2qSxFMSs7znL4',
  799. maintabindex: 0,
  800. polloffset: 0,
  801. activeTitle: 0,
  802. itemList: [] /* 查看事件数据 */,
  803. activeVideo: 0,
  804. cr_id: 0 /* 文物id */,
  805. // culturalRelicName: '' /* 搜索到的文物名 */,
  806. showViewEvent: false /* 事件列表弹层*/,
  807. showMonitor: false /* 监控弹层*/,
  808. showDipAngle: false /* 倾角弹层 */,
  809. showHandle: false /* 待处理事件弹层 */,
  810. showViewEvent: false /* 查看事件弹层 */,
  811. showTime: false /* 文物配置时间弹层 */,
  812. showWarn: false /* 事件警告弹层 */,
  813. webViedoUrl: '' /* 每项监控链接 */,
  814. culturalValue: '' /* 文物名称 */,
  815. valueTxt: '' /* 文本域内容 */,
  816. valueTxt2: '' /* 文本域内容 */,
  817. startTime: '' /* 开始时间 */,
  818. endTime: '' /* 结束时间 */,
  819. opennessTimeList: [] /* 文物历史开放时间 */,
  820. occurTime: '' /* 事件发生时间 */,
  821. timer: null,
  822. treeData: [],
  823. treeNode: [] /* 取监控父节点信息 */,
  824. deviceCcode: '' /* 设备编号 */,
  825. dipangleList: [] /* 倾角 */,
  826. treeJk: [],
  827. jkName: '' /* 监控名字 */,
  828. deviceList: [] /* 设备详情 */,
  829. associatedDevices: [] /* 关联设备 */,
  830. associationTab: '' /* 关联监控Tab */,
  831. tableData: [] /* 获取事件列表* */,
  832. eventDclList: [] /* 文物待处理事件 */,
  833. qhBtn: false,
  834. turning: true,
  835. treeClickCnt: 0,
  836. treeClickTimeout: null,
  837. treeClickId: '',
  838. defaultProps: {
  839. children: 'children',
  840. label: 'name'
  841. },
  842. selectIndex: 0,
  843. oData: {},
  844. monitors: [],
  845. turningList: [] /* 轮巡配置图文 */,
  846. interval: '' /* 轮巡时间 */,
  847. number: 4 /* 轮巡个数 */,
  848. numberList: [
  849. {
  850. value: 'id1',
  851. label: '4'
  852. },
  853. {
  854. value: 'id2',
  855. label: '9'
  856. },
  857. {
  858. value: 'id3',
  859. label: '16'
  860. }
  861. ] /*轮巡个数 */,
  862. isOpenPolling: true /* 轮巡按钮状态 */,
  863. total: 30, //总条数
  864. currentPage: 1, //当前页码
  865. pageSize: 12, //每页条数
  866. queryVal: '',
  867. /* 日期 */
  868. pickerOptions: {
  869. disabledDate(time) {
  870. return time.getTime() > Date.now();
  871. },
  872. shortcuts: [
  873. {
  874. text: '今天',
  875. onClick(picker) {
  876. picker.$emit('pick', new Date());
  877. }
  878. },
  879. {
  880. text: '昨天',
  881. onClick(picker) {
  882. const date = new Date();
  883. date.setTime(date.getTime() - 3600 * 1000 * 24);
  884. picker.$emit('pick', date);
  885. }
  886. },
  887. {
  888. text: '一周前',
  889. onClick(picker) {
  890. const date = new Date();
  891. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  892. picker.$emit('pick', date);
  893. }
  894. },
  895. {
  896. text: '一个月前',
  897. onClick(picker) {
  898. const date = new Date();
  899. date.setTime(date.getTime() - 3600 * 1000 * 24 * 31);
  900. picker.$emit('pick', date);
  901. }
  902. }
  903. ]
  904. },
  905. dateVal: '' /* 选中的日期 */,
  906. /* 下拉框状态 */
  907. options: [
  908. {
  909. id: '1',
  910. label: '误报'
  911. },
  912. {
  913. id: '2',
  914. label: '待处理'
  915. },
  916. {
  917. id: '3',
  918. label: '处理中'
  919. },
  920. {
  921. id: '4',
  922. label: '已处理'
  923. },
  924. {
  925. id: '5',
  926. label: '超时未处理'
  927. },
  928. {
  929. id: '6',
  930. label: '超时完成处理'
  931. }
  932. ],
  933. stateVal: '' /* 选择的状态 */,
  934. event_level_list: [
  935. {
  936. id: '1',
  937. label: '蓝色事件'
  938. },
  939. {
  940. id: '2',
  941. label: '黄色事件'
  942. },
  943. {
  944. id: '3',
  945. label: '橙色事件'
  946. },
  947. {
  948. id: '4',
  949. label: '红色事件'
  950. }
  951. ] /* 事件等级 */,
  952. event_level_val: '' /* 事件等级选中值 */,
  953. event_type_list: [
  954. {
  955. id: '1',
  956. label: '火灾'
  957. },
  958. {
  959. id: '2',
  960. label: '地震'
  961. },
  962. {
  963. id: '3',
  964. label: '越界报警'
  965. },
  966. {
  967. id: '4',
  968. label: '白蚂蚁'
  969. },
  970. {
  971. id: '5',
  972. label: '电量'
  973. },
  974. {
  975. id: '6',
  976. label: '掉线'
  977. }
  978. ] /*事件类型 */,
  979. event_type_val: '' /* 事件类型选中值 */,
  980. status_list: [
  981. {
  982. id: '1',
  983. label: '误报'
  984. },
  985. {
  986. id: '2',
  987. label: '待处理'
  988. },
  989. {
  990. id: '3',
  991. label: '处理中'
  992. },
  993. {
  994. id: '4',
  995. label: '已处理'
  996. },
  997. {
  998. id: '5',
  999. label: '超时未处理'
  1000. },
  1001. {
  1002. id: '6',
  1003. label: '超时完成处理'
  1004. }
  1005. ] /* 事件状态 */,
  1006. status_val: '' /* 事件状态选中值 */,
  1007. restaurants: [{ value: '意外事件' }, { value: '意料中事件' }] /* 事件说明推荐语 */,
  1008. descriptionVal: '' /* 事件说明 */,
  1009. latestEvents: null /* 最新事件 */,
  1010. mindex: 0,
  1011. mindex2: 0,
  1012. eventlist: [],
  1013. eventDetails: [],
  1014. showedit: false,
  1015. // zh_CN: locales.zh_CN,
  1016. isMoveDevice: IS_MOVE_DEVICE,
  1017. player: null,
  1018. splitNum: 1,
  1019. mseSupport: MSE_IS_SUPPORT,
  1020. tabActive: MSE_IS_SUPPORT ? 'mse' : 'decoder',
  1021. labelCol: { span: 7 },
  1022. isfull: false,
  1023. wrapperCol: { span: 10 },
  1024. urls: {
  1025. realplay: 'ws://10.19.147.22:559/EUrl/q2jQie4',
  1026. talk: 'wss://10.41.163.126:6014/proxy/10.41.163.126:559/EUrl/6gFx47S',
  1027. playback: 'wss://10.41.163.126:6014/proxy/10.41.163.126:559/EUrl/6gFx47S'
  1028. },
  1029. playback: {
  1030. startTime: '2021-07-26T00:00:00',
  1031. endTime: '2021-07-26T23:59:59',
  1032. valueFormat: 'YYYY-MM-DDTHH:mm',
  1033. seekStart: '2021-07-26T12:00:00',
  1034. rate: ''
  1035. },
  1036. muted: true,
  1037. volume: 50,
  1038. volumeOnSvg: {
  1039. template:
  1040. '<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>'
  1041. },
  1042. volumeOffSvg: {
  1043. template:
  1044. '<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>'
  1045. }
  1046. };
  1047. },
  1048. created() {},
  1049. mounted() {
  1050. that = this;
  1051. this.getZhoujieDevice();
  1052. window.that = this;
  1053. this.$el.style.setProperty('display', 'block');
  1054. // this.init();
  1055. // this.createPlayer();
  1056. /* 定时获取最新事件 */
  1057. this.startTimer();
  1058. /* 事件列表 */
  1059. this.postEventList();
  1060. initPlugin();
  1061. },
  1062. computed: {
  1063. mode: function () {
  1064. return this.tabActive === 'mse' ? 0 : 1;
  1065. }
  1066. },
  1067. watch: {
  1068. culturalValue(val) {
  1069. this.$refs.tree.filter(val);
  1070. },
  1071. latestEvents: {
  1072. handler(newData) {
  1073. if (newData && newData.address === undefined && this.showWarn) {
  1074. this.showWarn = false;
  1075. this.startTimer();
  1076. }
  1077. },
  1078. deep: true
  1079. }
  1080. },
  1081. beforeDestroy() {
  1082. this.stopTimer();
  1083. },
  1084. methods: {
  1085. /* 隐藏插件 */
  1086. hideWndBtn() {
  1087. oWebControl.JS_HideWnd();
  1088. },
  1089. /* 显示插件 */
  1090. showWndBtn() {
  1091. oWebControl.JS_ShowWnd();
  1092. },
  1093. /* 搜索筛选树形结构数据 */
  1094. filterNode(value, data) {
  1095. if (!value) return true;
  1096. return data.name.indexOf(value) !== -1;
  1097. },
  1098. /* 刷新了 */
  1099. refreshBtn() {
  1100. window.location.reload();
  1101. },
  1102. /*获取 树形数据 */
  1103. getZhoujieDevice() {
  1104. this.$api.getZhoujieDevice(
  1105. {
  1106. type: 'cr'
  1107. },
  1108. (res) => {
  1109. this.treeData = res.data;
  1110. }
  1111. );
  1112. },
  1113. /* 切换数据 */
  1114. qhGetZhoujieDevice() {
  1115. this.qhBtn = !this.qhBtn;
  1116. if (this.qhBtn) {
  1117. this.$api.getZhoujieDevice(
  1118. {
  1119. type: 'area'
  1120. },
  1121. (res) => {
  1122. this.treeData = res.data;
  1123. }
  1124. );
  1125. } else {
  1126. this.getZhoujieDevice();
  1127. }
  1128. },
  1129. /* 获取文物历史开放时间 */
  1130. timeBtn(data) {
  1131. this.timeId = data.id;
  1132. // console.log(data, 'data');
  1133. this.showTime = true;
  1134. this.$api.getCrOpenHoursHistoricalConfig({ cr_id: data.id }, function (res) {
  1135. console.log(res, '时间配置');
  1136. that.opennessTimeList = res.data;
  1137. });
  1138. },
  1139. /* 修改时间 */
  1140. modifyTime() {
  1141. this.$api.setCrOpenHoursConfig(
  1142. {
  1143. cr_id: that.timeId,
  1144. start_time: that.startTime,
  1145. end_time: that.endTime
  1146. },
  1147. function (res) {
  1148. console.log(res, '修改时间');
  1149. if (res.code == 1) {
  1150. that.$common.successToShow(res.msg);
  1151. } else {
  1152. that.$common.errorToShow(res.msg);
  1153. }
  1154. }
  1155. );
  1156. },
  1157. /* 开启定时获取最新事件 */
  1158. startTimer() {
  1159. if (!this.timer) {
  1160. this.timer = setInterval(() => {
  1161. this.getLatestEvent();
  1162. }, 5000);
  1163. }
  1164. },
  1165. /* 关闭定时最新事件 */
  1166. stopTimer() {
  1167. clearInterval(this.timer);
  1168. this.timer = null;
  1169. },
  1170. /* 定时获取最新事件 */
  1171. getLatestEvent() {
  1172. this.$api.getLatestEvent({}, (res) => {
  1173. const newData = res.data;
  1174. if (newData !== null) {
  1175. if (newData.address !== undefined) {
  1176. if (!this.showWarn) {
  1177. this.showWarn = true;
  1178. this.isAutio = true;
  1179. this.startTimer();
  1180. }
  1181. } else {
  1182. if (this.showWarn) {
  1183. this.showWarn = false;
  1184. this.isAutio = false;
  1185. this.startTimer();
  1186. }
  1187. }
  1188. }
  1189. if (newData !== null) {
  1190. this.latestEvents = newData;
  1191. }
  1192. // console.log(this.latestEvents, '最新事件');
  1193. });
  1194. },
  1195. /* 定时获取最新事件 */
  1196. // closePopup() {
  1197. // this.showWarn = false;
  1198. // this.startTimer();
  1199. // },
  1200. /* 加入轮巡 */
  1201. append(data) {
  1202. for (let i = 0; i < this.monitors.length; i++) {
  1203. if (this.monitors[i].device_code == data.device_code) {
  1204. window.editDeviceIndex = i;
  1205. /* isPolling为true已经在轮巡 */
  1206. if (data.isPolling) {
  1207. //del删除轮巡
  1208. this.$api.delPollingConfig({ device_id: data.device_id }, function (res) {
  1209. that.monitors[window.editDeviceIndex].isPolling = 0;
  1210. that.isOpenPolling = true;
  1211. console.log('删除成功');
  1212. that.$message.error('删除成功');
  1213. });
  1214. } else {
  1215. //add否则加入轮巡
  1216. this.$api.addPollingConfig({ device_id: data.device_id }, function (res) {
  1217. that.monitors[window.editDeviceIndex].isPolling = 1;
  1218. // startvideo();
  1219. console.log('加入成功');
  1220. that.isOpenPolling = true;
  1221. that.$message.success('加入成功');
  1222. });
  1223. }
  1224. break;
  1225. }
  1226. }
  1227. },
  1228. /* 关联监控点击事件 */
  1229. openVideo(item, index) {
  1230. this.associationTab = item.name;
  1231. var t = Date.parse(new Date()) / 1000;
  1232. var key = md5.md5(t + '@feichenghuli');
  1233. /* 需要拼接该项文物监控链接 */
  1234. this.webViedoUrl = 'https://feicheng.16fw.cn:1443/hik_monitor/center_monitor.html?t=' + t.toString() + '&key=' + key + '&index_code=' + item.device_code;
  1235. },
  1236. /* 树形组件点击事件 */
  1237. handleNodeClick(data, node, obj) {
  1238. that.cr_id = data.id;
  1239. console.log(data, 111);
  1240. console.log(node, 222);
  1241. if (data.area !== undefined) {
  1242. console.log('点击了文物', data);
  1243. // 覆盖画面
  1244. oWebControl.JS_RequestInterface({
  1245. funcName: 'stopAllPreview',
  1246. argument: JSON.stringify({})
  1247. });
  1248. that.mindex = 0;
  1249. /* 获取文物下的所有数据 */
  1250. that.monitors = data.children;
  1251. /* 调用获取监控编码 */
  1252. that.toshow();
  1253. }
  1254. if (data.zhoujie_device_type == '1') {
  1255. that.deviceCcode = data.device_code;
  1256. console.log('点击了监控', this.deviceCcode);
  1257. /* 获取监控父节点信息 */
  1258. this.treeNode = node.parent.data;
  1259. this.treeJk = node.parent.data.children;
  1260. // console.log(this.treeNode, 11122288888);
  1261. /* 点击的监控名字 */
  1262. this.jkName = data.name;
  1263. this.hideWndBtn();
  1264. this.showMonitor = true;
  1265. var t = Date.parse(new Date()) / 1000;
  1266. var key = md5.md5(t + '@feichenghuli');
  1267. this.webViedoUrl = 'https://feicheng.16fw.cn:1443/hik_monitor/center_monitor.html?t=' + t.toString() + '&key=' + key + '&index_code=' + data.device_code;
  1268. /* 获取点击的监控文物及五防信息 */
  1269. this.$api.getDeviceDetails({ device_id: data.device_id }, function (res) {
  1270. // console.log(res, 1717171717);
  1271. /* 设备信息 */
  1272. that.deviceList = res.data;
  1273. /* 关联监控 */
  1274. that.associatedDevices = res.data.device_context_list;
  1275. // console.log(that.associatedDevices, 888888888888);
  1276. /* 地图 */
  1277. mymap(that.ak)
  1278. .then((mymap) => {
  1279. var bmap = null;
  1280. // 创建百度地图实例
  1281. bmap = new BMapGL.Map('allmap');
  1282. let point = new BMapGL.Point(res.data.longitude, res.data.latitude); /* 坐标点 */
  1283. bmap.centerAndZoom(point, 15); //设置缩放级别
  1284. bmap.enableScrollWheelZoom();
  1285. // 添加标注点并设置自定义图标;
  1286. const icon = new BMapGL.Icon('/static/img/company-green.png', new BMapGL.Size(26, 26));
  1287. const marker = new BMapGL.Marker(point, { icon: icon });
  1288. // // 将标注添加到地图
  1289. bmap.addOverlay(marker);
  1290. // 添加标注点上的文字
  1291. const label = new BMapGL.Label(that.treeNode.name, {
  1292. position: point, // 设置文本标注位置
  1293. offset: new BMapGL.Size(20, -10) // 设置文本偏移量
  1294. });
  1295. label.setStyle({
  1296. color: '#576171', // 文本颜色
  1297. fontSize: '12px', // 文本字号
  1298. fontWeight: 'bold' // 文本加粗
  1299. });
  1300. marker.setLabel(label); // 将标注点与文本标注关联
  1301. })
  1302. .catch((e) => {
  1303. console.log(e);
  1304. });
  1305. /* 地图 */
  1306. });
  1307. }
  1308. if (data.zhoujie_device_type == 2) {
  1309. this.$api.getDeviceDetails({ device_id: data.device_id }, function (res) {
  1310. console.log('白蚂蚁', res);
  1311. that.hideWndBtn();
  1312. that.showDipAngle = true;
  1313. that.dipangleList = res.data;
  1314. that.treeNode = node.parent.data;
  1315. /* 白蚂蚁数据 */
  1316. });
  1317. }
  1318. if (data.zhoujie_device_type == 3) {
  1319. this.$api.getDeviceDetails({ device_id: data.device_id }, function (res) {
  1320. console.log(res, '点击了倾角');
  1321. /* 倾角数据 */
  1322. that.hideWndBtn();
  1323. that.showDipAngle = true;
  1324. that.dipangleList = res.data;
  1325. that.treeNode = node.parent.data;
  1326. });
  1327. }
  1328. },
  1329. /* 获取轮巡配置 */
  1330. getPollingConfig() {
  1331. this.$api.getPollingConfig({}, function (res) {
  1332. // console.log(res, 888888888888);
  1333. that.turningList = res.data.device;
  1334. // console.log(that.turningList, 2323232323232323);
  1335. that.interval = res.data.interval / 60;
  1336. that.number = res.data.number;
  1337. /* 控制监控画面展示个数 */
  1338. that.splitNum = Math.sqrt(that.number);
  1339. /* 控制监控画面展示个数 */
  1340. that.arrangeWindow();
  1341. that.getMonitorList();
  1342. });
  1343. },
  1344. /* 修改轮巡配置 */
  1345. modifyBtn() {
  1346. this.$api.editPollingConfig({ interval: this.interval, number: this.number }, function (res) {
  1347. // console.log(res, 99999999999);
  1348. if (res.code == 1) {
  1349. that.isOpenPolling = true;
  1350. that.$common.successToShow(res.msg);
  1351. } else {
  1352. that.$common.errorToShow(res.msg);
  1353. }
  1354. });
  1355. },
  1356. /* 图文中删除轮巡按钮 */
  1357. lunxunBtn(item, index) {
  1358. this.$api.delPollingConfig({ device_id: item.device_id }, function (res) {
  1359. console.log(res, '删除成功');
  1360. that.getPollingConfig();
  1361. that.$common.successToShow(res.msg);
  1362. });
  1363. },
  1364. /* 待处理事件按钮 */
  1365. eventDclBtn() {
  1366. this.$api.postEventList(
  1367. {
  1368. device_code: this.deviceCcode,
  1369. status: this.status_val
  1370. },
  1371. function (res) {
  1372. // console.log(res, '待处理事件');
  1373. that.eventDclList = res.data.rows;
  1374. console.log(that.eventDclList, 'eventDclList2');
  1375. }
  1376. );
  1377. },
  1378. // 获取事件列表
  1379. postEventList() {
  1380. // console.log(that.deviceCode, '待核查');
  1381. this.$api.postEventList(
  1382. {
  1383. page: this.currentPage,
  1384. pageSize: this.pageSize
  1385. // device_code: this.deviceCcode,
  1386. // status: this.status_val
  1387. },
  1388. function (res) {
  1389. // console.log(res, '页码');
  1390. that.tableData = res.data.rows;
  1391. // console.log(that.tableData, '页码2');
  1392. that.total = res.data.total;
  1393. }
  1394. );
  1395. },
  1396. /* 事件列表误报按钮 */
  1397. // falseAlarmBtn(item) {
  1398. // // console.log(item, 'item');
  1399. // this.$api.editEvent(
  1400. // {
  1401. // event_id: item.id,
  1402. // event_level: item.event_level,
  1403. // event_type: item.event_type,
  1404. // status: item.status
  1405. // },
  1406. // function (res) {
  1407. // if (res.code == 1) {
  1408. // console.log(res, '误报');
  1409. // that.postEventList();
  1410. // that.$common.successToShow(res.msg);
  1411. // } else {
  1412. // that.$common.errorToShow(res.msg);
  1413. // }
  1414. // }
  1415. // );
  1416. // },
  1417. /* 事件说明推荐语 */
  1418. querySearch(queryString, cb) {
  1419. var restaurants = this.restaurants;
  1420. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
  1421. // 调用 callback 返回建议列表的数据
  1422. cb(results);
  1423. },
  1424. createFilter(queryString) {
  1425. return (restaurant) => {
  1426. return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
  1427. };
  1428. },
  1429. handleSelect(item) {
  1430. console.log((this.descriptionVal = item.value));
  1431. },
  1432. /* 事件说明推荐语end */
  1433. /* 事件警告弹层提交按钮 */
  1434. submitReportBtn() {
  1435. // console.log(this.latestEvents, '警告数据');
  1436. this.$api.editEvent(
  1437. {
  1438. event_id: this.latestEvents.event_id,
  1439. event_level: this.event_level_val,
  1440. event_type: this.event_type_val,
  1441. status: this.status_val,
  1442. illustrate: this.descriptionVal,
  1443. reports: this.valueTxt2
  1444. },
  1445. function (res) {
  1446. console.log(res, '提交报告');
  1447. if (res.code == 1) {
  1448. that.$common.successToShow('提交成功');
  1449. } else {
  1450. that.$common.errorToShow('请选择事件详情');
  1451. }
  1452. // console.log(res, '提交报告');
  1453. }
  1454. );
  1455. },
  1456. // 事件警告弹层误报按钮
  1457. wubaoBtn() {
  1458. // console.log(this.latestEvents.event_id, 111111212335688);
  1459. this.$api.editEvent(
  1460. {
  1461. vent_id: this.latestEvents.event_id,
  1462. event_level: this.event_level_val,
  1463. event_type: this.event_type_val,
  1464. status: this.status_val,
  1465. illustrate: this.descriptionVal,
  1466. reports: this.valueTxt2
  1467. },
  1468. function (res) {
  1469. that.$common.successToShow('提交成功');
  1470. // console.log(res, '误报数据');
  1471. // if (res.code == 1) {
  1472. // that.$common.successToShow('提交成功');
  1473. // } else {
  1474. // that.$common.errorToShow(res.msg);
  1475. // }
  1476. }
  1477. );
  1478. },
  1479. /* 每页条数改变 */
  1480. handleSizeChange(size) {
  1481. this.pageSize = size;
  1482. this.postEventList();
  1483. /* 页面改变在此调用接口方法 */
  1484. // console.log(this.pageSize);
  1485. },
  1486. /* 页码改变 */
  1487. handleCurrentChange(currentPage) {
  1488. this.currentPage = currentPage;
  1489. this.postEventList();
  1490. /* 页面改变在此调用接口方法 */
  1491. // console.log(this.currentPage); //点击第几页
  1492. },
  1493. /* 事件搜索按钮 */
  1494. searchBtn() {
  1495. if (this.dateVal != '' || this.stateVal != '' || this.queryVal != '') {
  1496. this.$api.postEventList(
  1497. {
  1498. keywords: this.queryVal,
  1499. status: this.stateVal,
  1500. created_at: this.dateVal
  1501. },
  1502. function (res) {
  1503. if (res.code == 1 && res.data.rows.length > 0) {
  1504. that.tableData = res.data.rows;
  1505. // console.log(that.tableData, '搜索事件2');
  1506. } else {
  1507. that.$common.errorToShow('暂无事件');
  1508. }
  1509. }
  1510. );
  1511. }
  1512. },
  1513. /* 查看事件 */
  1514. viewEventBtn(item) {
  1515. console.log(item, 'item');
  1516. this.itemList = item;
  1517. this.eventId = item.id;
  1518. this.showViewEvent = true;
  1519. // mymap(that.ak)
  1520. // .then((mymap) => {
  1521. // var bmap2 = null;
  1522. // // 创建百度地图实例
  1523. // bmap2 = new BMapGL.Map('allmap2');
  1524. // let point = new BMapGL.Point(108.953364, 34.276184); /* 坐标点 */
  1525. // bmap2.centerAndZoom(point, 10); //设置缩放级别
  1526. // bmap2.enableScrollWheelZoom();
  1527. // // 添加标注点并设置自定义图标;
  1528. // const icon = new BMapGL.Icon('/static/img/company-green.png', new BMapGL.Size(26, 26));
  1529. // const marker = new BMapGL.Marker(point, { icon: icon });
  1530. // // // 将标注添加到地图
  1531. // bmap2.addOverlay(marker);
  1532. // // 添加标注点上的文字
  1533. // const label = new BMapGL.Label('自定义', {
  1534. // position: point, // 设置文本标注位置
  1535. // offset: new BMapGL.Size(20, -10) // 设置文本偏移量
  1536. // });
  1537. // label.setStyle({
  1538. // color: '#576171', // 文本颜色
  1539. // fontSize: '12px', // 文本字号
  1540. // fontWeight: 'bold' // 文本加粗
  1541. // });
  1542. // marker.setLabel(label); // 将标注点与文本标注关联
  1543. // })
  1544. // .catch((e) => {
  1545. // console.log(e);
  1546. // });
  1547. /* 地图 */
  1548. },
  1549. /* 监控待处理弹层提交按钮事件 */
  1550. submitReport() {
  1551. // console.log(this.eventId, 'idididid');
  1552. this.$api.editEvent(
  1553. {
  1554. event_id: this.eventId,
  1555. reports: this.valueTxt
  1556. },
  1557. function (res) {
  1558. console.log(res);
  1559. }
  1560. );
  1561. },
  1562. close() {
  1563. // this.showViewEvent = false;
  1564. this.monitorShow = false;
  1565. },
  1566. getMonitorList() {
  1567. if (this.maintabindex == 0) {
  1568. /* 获取轮询设备监控点 */
  1569. // that.isOpenPolling = true;
  1570. this.$api.getPollingDevicePreviewUrl({ offset: this.polloffset }, function (response) {
  1571. // console.log(response, 1111);
  1572. that.polloffset = response.data.offset;
  1573. that.monitors = response.data.device;
  1574. that.isOpenPolling = response.data.isOpenPolling;
  1575. /* 轮巡 */
  1576. if (response.data.isOpenPolling) {
  1577. setTimeout('that.getMonitorList()', response.data.interval * 1000);
  1578. }
  1579. if (that.monitors.length > 0) {
  1580. that.selectIndex = 0;
  1581. that.mindex = 0;
  1582. }
  1583. that.toshow();
  1584. });
  1585. }
  1586. },
  1587. /* 请求监控链接 */
  1588. getUrltoPlay(index) {
  1589. if (parseInt(index) >= that.monitors.length) return;
  1590. startvideo(index, that.monitors[parseInt(index)].device_code);
  1591. },
  1592. toshow() {
  1593. for (var i = 0; i < this.monitors.length; i++) {
  1594. // console.log(this.monitors);
  1595. setTimeout(function () {
  1596. var index;
  1597. index = that.mindex;
  1598. that.getUrltoPlay(index);
  1599. that.mindex++;
  1600. }, i + 1 * 2000);
  1601. }
  1602. },
  1603. init() {
  1604. // 设置播放容器的宽高并监听窗口大小变化
  1605. window.addEventListener('resize', () => {
  1606. this.player.JS_Resize();
  1607. });
  1608. },
  1609. createPlayer() {
  1610. this.player = new window.JSPlugin({
  1611. szId: 'player',
  1612. szBasePath: './',
  1613. iMaxSplit: 4,
  1614. iCurrentSplit: IS_MOVE_DEVICE ? 1 : 4,
  1615. openDebug: true,
  1616. oStyle: {
  1617. borderSelect: IS_MOVE_DEVICE ? '#000' : '#FFCC00'
  1618. }
  1619. });
  1620. // 事件回调绑定
  1621. this.player.JS_SetWindowControlCallback({
  1622. windowEventSelect: function (iWndIndex) {
  1623. //插件选中窗口回调
  1624. console.log('windowSelect callback: ', iWndIndex);
  1625. if (iWndIndex < that.monitors.length) that.selectIndex = iWndIndex;
  1626. },
  1627. pluginErrorHandler: function (iWndIndex, iErrorCode, oError) {
  1628. //插件错误回调
  1629. console.log('pluginError callback: ', iWndIndex, iErrorCode, oError);
  1630. //if (iErrorCode == 26214462 || oError.code == 1006 || oError.code == 1005) {
  1631. let i = parseInt(iWndIndex);
  1632. if (i < that.monitors.length) setTimeout('window.that.getUrltoPlay(' + i.toString() + ');', 3000);
  1633. //}
  1634. },
  1635. windowEventOver: function (iWndIndex) {
  1636. //鼠标移过回调
  1637. //console.log(iWndIndex);
  1638. },
  1639. windowEventOut: function (iWndIndex) {
  1640. //鼠标移出回调
  1641. //console.log(iWndIndex);
  1642. },
  1643. windowEventUp: function (iWndIndex) {
  1644. //鼠标mouseup事件回调
  1645. //console.log(iWndIndex);
  1646. },
  1647. windowFullCcreenChange: function (bFull) {
  1648. //全屏切换回调
  1649. console.log('fullScreen callback: ', bFull);
  1650. },
  1651. firstFrameDisplay: function (iWndIndex, iWidth, iHeight) {
  1652. //首帧显示回调
  1653. console.log('firstFrame loaded callback: ', iWndIndex, iWidth, iHeight);
  1654. },
  1655. performanceLack: function () {
  1656. //性能不足回调
  1657. console.log('performanceLack callback: ');
  1658. }
  1659. });
  1660. },
  1661. /* 控制页面展示个数 */
  1662. arrangeWindow() {
  1663. let splitNum = this.splitNum + 1;
  1664. let format = splitNum.toString() + 'x' + splitNum.toString();
  1665. oWebControl.JS_RequestInterface({
  1666. funcName: 'startPreview',
  1667. argument: JSON.stringify({
  1668. layout: format
  1669. })
  1670. });
  1671. },
  1672. wholeFullScreen() {
  1673. this.player.JS_FullScreenDisplay(true).then(
  1674. () => {
  1675. console.log(`wholeFullScreen success`);
  1676. },
  1677. (e) => {
  1678. console.error(e);
  1679. }
  1680. );
  1681. },
  1682. /* 预览&对讲 */
  1683. realplay(index, playURL) {
  1684. let mode = 0;
  1685. this.player.JS_Play(playURL, { playURL, mode }, index).then(
  1686. () => {
  1687. console.log('realplay success');
  1688. },
  1689. (e) => {
  1690. console.error(e);
  1691. }
  1692. );
  1693. },
  1694. stopPlay() {
  1695. this.player.JS_Stop().then(
  1696. () => {
  1697. this.playback.rate = 0;
  1698. console.log('stop realplay success');
  1699. },
  1700. (e) => {
  1701. console.error(e);
  1702. }
  1703. );
  1704. },
  1705. talkStart() {
  1706. let url = this.urls.talk;
  1707. this.player.JS_SetConnectTimeOut(0, 1000);
  1708. this.player.JS_StartTalk(url).then(
  1709. () => {
  1710. console.log('talkStart success');
  1711. },
  1712. (e) => {
  1713. console.error(e);
  1714. }
  1715. );
  1716. },
  1717. talkStop() {
  1718. this.player.JS_StopTalk().then(
  1719. () => {
  1720. console.log('talkStop success');
  1721. },
  1722. (e) => {
  1723. console.error(e);
  1724. }
  1725. );
  1726. },
  1727. stopAllPlay() {
  1728. this.player.JS_StopRealPlayAll().then(
  1729. () => {
  1730. this.playback.rate = 0;
  1731. console.log('stopAllPlay success');
  1732. },
  1733. (e) => {
  1734. console.error(e);
  1735. }
  1736. );
  1737. },
  1738. /* 回放 */
  1739. playbackStart() {
  1740. let { player, mode, urls, playback } = this,
  1741. index = player.currentWindowIndex,
  1742. playURL = urls.playback,
  1743. { startTime, endTime } = playback;
  1744. startTime += 'Z';
  1745. endTime += 'Z';
  1746. player.JS_Play(playURL, { playURL, mode }, index, startTime, endTime).then(
  1747. () => {
  1748. console.log('playbackStart success');
  1749. this.playback.rate = 1;
  1750. },
  1751. (e) => {
  1752. console.error(e);
  1753. }
  1754. );
  1755. },
  1756. playbackPause() {
  1757. this.player.JS_Pause().then(
  1758. () => {
  1759. console.log('playbackPause success');
  1760. },
  1761. (e) => {
  1762. console.error(e);
  1763. }
  1764. );
  1765. },
  1766. playbackResume() {
  1767. this.player.JS_Resume().then(
  1768. () => {
  1769. console.log('playbackResume success');
  1770. },
  1771. (e) => {
  1772. console.error(e);
  1773. }
  1774. );
  1775. },
  1776. seekTo() {
  1777. let { seekStart, endTime } = this.playback;
  1778. seekStart += 'Z';
  1779. endTime += 'Z';
  1780. this.player.JS_Seek(this.player.currentWindowIndex, seekStart, endTime).then(
  1781. () => {
  1782. console.log('seekTo success');
  1783. },
  1784. (e) => {
  1785. console.error(e);
  1786. }
  1787. );
  1788. },
  1789. playbackSlow() {
  1790. this.player.JS_Slow().then(
  1791. (rate) => {
  1792. this.playback.rate = rate;
  1793. },
  1794. (e) => {
  1795. console.error(e);
  1796. }
  1797. );
  1798. },
  1799. playbackFast() {
  1800. this.player.JS_Fast().then(
  1801. (rate) => {
  1802. this.playback.rate = rate;
  1803. },
  1804. (e) => {
  1805. console.error(e);
  1806. }
  1807. );
  1808. },
  1809. frameForward() {
  1810. this.player.JS_FrameForward(this.player.currentWindowIndex).then(
  1811. () => {
  1812. this.playback.rate = 1;
  1813. console.log('frameForward success');
  1814. },
  1815. (e) => {
  1816. console.error(e);
  1817. }
  1818. );
  1819. },
  1820. /* 声音、抓图、录像 */
  1821. openSound() {
  1822. this.player.JS_OpenSound().then(
  1823. () => {
  1824. console.log('openSound success');
  1825. this.muted = false;
  1826. },
  1827. (e) => {
  1828. console.error(e);
  1829. }
  1830. );
  1831. },
  1832. closeSound() {
  1833. this.player.JS_CloseSound().then(
  1834. () => {
  1835. console.log('closeSound success');
  1836. this.muted = true;
  1837. },
  1838. (e) => {
  1839. console.error(e);
  1840. }
  1841. );
  1842. },
  1843. setVolume(value) {
  1844. let player = this.player,
  1845. index = player.currentWindowIndex;
  1846. this.player.JS_SetVolume(index, value).then(
  1847. () => {
  1848. console.log('setVolume success', value);
  1849. },
  1850. (e) => {
  1851. console.error(e);
  1852. }
  1853. );
  1854. },
  1855. capture(imageType) {
  1856. let player = this.player,
  1857. index = player.currentWindowIndex;
  1858. player.JS_CapturePicture(index, 'img', imageType).then(
  1859. () => {
  1860. console.log('capture success', imageType);
  1861. },
  1862. (e) => {
  1863. console.error(e);
  1864. }
  1865. );
  1866. },
  1867. recordStart(type) {
  1868. const codeMap = { MP4: 5, PS: 2 };
  1869. let player = this.player,
  1870. index = player.currentWindowIndex,
  1871. fileName = `${moment().format('YYYYMMDDHHmm')}.mp4`;
  1872. typeCode = codeMap[type];
  1873. player.JS_StartSaveEx(index, fileName, typeCode).then(
  1874. () => {
  1875. console.log('record start ...');
  1876. },
  1877. (e) => {
  1878. console.error(e);
  1879. }
  1880. );
  1881. },
  1882. recordStop() {
  1883. let player = this.player;
  1884. index = player.currentWindowIndex;
  1885. player.JS_StopSave(index).then(
  1886. () => {
  1887. console.log('record stoped, saving ...');
  1888. },
  1889. (e) => {
  1890. console.error(e);
  1891. }
  1892. );
  1893. },
  1894. /* 电子放大、智能信息 */
  1895. enlarge() {
  1896. let player = this.player,
  1897. index = player.currentWindowIndex;
  1898. player.JS_EnableZoom(index).then(
  1899. () => {
  1900. console.log('enlarge start..., select range...');
  1901. },
  1902. (e) => {
  1903. console.error(e);
  1904. }
  1905. );
  1906. },
  1907. enlargeClose() {
  1908. let player = this.player,
  1909. index = player.currentWindowIndex;
  1910. player.JS_DisableZoom(index).then(
  1911. () => {
  1912. console.log('enlargeClose success');
  1913. },
  1914. (e) => {
  1915. console.error(e);
  1916. }
  1917. );
  1918. },
  1919. intellectTrigger(openFlag) {
  1920. let player = this.player,
  1921. index = player.currentWindowIndex;
  1922. let result = player.JS_RenderALLPrivateData(index, openFlag);
  1923. console.log(`${openFlag ? 'open' : 'close'} intellect ${result === 1 ? 'success' : 'failed'}`);
  1924. },
  1925. getvideoInfo() {
  1926. let player = this.player,
  1927. index = player.currentWindowIndex;
  1928. player.JS_GetVideoInfo(index).then(function (videoInfo) {
  1929. console.log('videoInfo:', videoInfo);
  1930. });
  1931. },
  1932. getOSDTime() {
  1933. let player = this.player,
  1934. index = player.currentWindowIndex;
  1935. player.JS_GetOSDTime(index).then(function (time) {
  1936. console.log('osdTime:', new Date(time));
  1937. });
  1938. },
  1939. getUrlKey: function (name) {
  1940. return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1].replace(/\+/g, '%20')) || null;
  1941. }
  1942. }
  1943. };
  1944. </script>
  1945. <style>
  1946. @media screen and (max-width: 991px) {
  1947. #player {
  1948. width: calc(100vw - 16px);
  1949. height: calc((100vw - 16px) * 5 / 8);
  1950. }
  1951. }
  1952. @media screen and (min-width: 992px) {
  1953. #player {
  1954. width: calc(80vw - 16px);
  1955. height: calc((80vw - 16px) * 5 / 8);
  1956. }
  1957. }
  1958. /deep/.anchorBL {
  1959. display: none !important;
  1960. }
  1961. /deep/.BMapLabel {
  1962. border: none !important;
  1963. }
  1964. /deep/.uni-forms-item__label {
  1965. color: black !important;
  1966. }
  1967. /deep/.el-input__inner {
  1968. border-color: #3c9cff !important;
  1969. }
  1970. /deep/.el-textarea__inner {
  1971. width: 90%;
  1972. border-color: #dcdfe6 !important;
  1973. }
  1974. /deep/.el-tree-node__content {
  1975. &:hover {
  1976. background-color: #d9ecff !important;
  1977. }
  1978. }
  1979. /deep/.el-tree-node.is-current > .el-tree-node__content {
  1980. background-color: #d9ecff !important;
  1981. color: #333 !important;
  1982. }
  1983. /deep/.el-tree-node__expand-icon {
  1984. font-size: 36rpx !important;
  1985. }
  1986. .custom-tree-node {
  1987. flex: 1;
  1988. display: flex;
  1989. align-items: center;
  1990. justify-content: space-between;
  1991. font-size: 14px;
  1992. padding-right: 8px;
  1993. }
  1994. .body2 {
  1995. padding: 20rpx;
  1996. width: 100%;
  1997. height: 1890rpx;
  1998. background: url('@/static/img/wenhuazhan-bj.png') no-repeat center;
  1999. background-size: 100% 100%;
  2000. background-color: #f5f5f5;
  2001. }
  2002. .box {
  2003. width: 100%;
  2004. height: 100%;
  2005. display: flex;
  2006. }
  2007. .bh_title {
  2008. /* width: 500rpx; */
  2009. height: 80rpx;
  2010. line-height: 100rpx;
  2011. margin-left: 10rpx;
  2012. }
  2013. /* .hcqStyle7 {
  2014. position: fixed;
  2015. top: 16rpx;
  2016. left: 30rpx;
  2017. width: 200rpx;
  2018. height: 100rpx;
  2019. animation: rotate3D 10s linear infinite;
  2020. font-family: cursive;
  2021. text-shadow: 6px 2px 2px #626262;
  2022. color: #3c9cff;
  2023. }
  2024. @keyframes rotate3D {
  2025. 0% {
  2026. transform: perspective(1000px) rotateY(0deg);
  2027. }
  2028. 100% {
  2029. transform: perspective(1000px) rotateY(360deg);
  2030. }
  2031. } */
  2032. .left_box {
  2033. display: flex;
  2034. flex-direction: column;
  2035. width: 82%;
  2036. }
  2037. .topTab {
  2038. width: 100%;
  2039. display: flex;
  2040. justify-content: space-around;
  2041. }
  2042. .btn {
  2043. width: 230rpx;
  2044. color: #3c9cff;
  2045. border: 2px solid #3c9cff;
  2046. font-size: 30rpx;
  2047. cursor: pointer;
  2048. }
  2049. .activeBtn {
  2050. color: aliceblue;
  2051. border: none;
  2052. background-color: #3c9cff;
  2053. }
  2054. .left_box_item {
  2055. width: 740rpx;
  2056. height: 460rpx;
  2057. margin-left: -1px;
  2058. margin-top: -1px;
  2059. border: 1px solid #343434;
  2060. }
  2061. .right_box {
  2062. width: 680rpx;
  2063. height: 1840rpx;
  2064. margin-right: 160rpx;
  2065. overflow: scroll;
  2066. background-color: #fff;
  2067. }
  2068. .right_box_item {
  2069. margin-top: 20rpx;
  2070. }
  2071. .right_box_title {
  2072. color: black;
  2073. height: 60rpx;
  2074. line-height: 60rpx;
  2075. }
  2076. .right_box_item_list {
  2077. width: 100%;
  2078. padding: 20rpx;
  2079. font-size: 30rpx;
  2080. box-sizing: border-box;
  2081. background-color: #efefef;
  2082. margin-left: 310rpx;
  2083. }
  2084. .item_list_item {
  2085. height: 50rpx;
  2086. line-height: 50rpx;
  2087. margin-bottom: 10rpx;
  2088. }
  2089. .item_list_item:hover {
  2090. background-color: #d9ecff;
  2091. }
  2092. .right_box_top {
  2093. position: sticky;
  2094. top: 0;
  2095. z-index: 99;
  2096. background-color: #efefef;
  2097. margin-bottom: 10rpx;
  2098. width: 100%;
  2099. height: 60rpx;
  2100. display: flex;
  2101. justify-content: space-between;
  2102. }
  2103. .right_btm {
  2104. width: 680rpx;
  2105. height: 980rpx;
  2106. overflow: scroll;
  2107. background-color: #fff;
  2108. }
  2109. .jianju {
  2110. display: flex;
  2111. justify-content: space-between;
  2112. align-items: center;
  2113. margin-bottom: -1px;
  2114. }
  2115. .gljk_item:hover {
  2116. background-color: #d9ecff;
  2117. }
  2118. .jianju2 {
  2119. display: flex;
  2120. justify-content: space-between;
  2121. align-items: center;
  2122. margin-bottom: -1px;
  2123. }
  2124. .jianju3 {
  2125. display: flex;
  2126. width: 600rpx;
  2127. justify-content: space-between;
  2128. align-items: center;
  2129. margin-bottom: -1px;
  2130. }
  2131. .jianju_item {
  2132. width: 600rpx;
  2133. height: 70rpx;
  2134. border: 1px solid #dbdbdb;
  2135. border-radius: 5rpx;
  2136. overflow: scroll;
  2137. }
  2138. .jianju_item2 {
  2139. width: 920rpx;
  2140. height: 90rpx;
  2141. border: 1px solid #dbdbdb;
  2142. border-radius: 5rpx;
  2143. }
  2144. .jianju_item3 {
  2145. width: 360rpx;
  2146. height: 70rpx;
  2147. border: 1px solid #dbdbdb;
  2148. border-radius: 5rpx;
  2149. }
  2150. .jianju_item4 {
  2151. width: 360rpx;
  2152. height: 70rpx;
  2153. border: 1px solid #dbdbdb;
  2154. border-radius: 5rpx;
  2155. }
  2156. .qj_box {
  2157. display: flex;
  2158. flex-direction: column;
  2159. padding: 30rpx;
  2160. box-sizing: border-box;
  2161. width: 1800rpx;
  2162. height: 1200rpx;
  2163. border: 1px solid #dbdbdb;
  2164. }
  2165. .qj_jianju {
  2166. margin-top: 20rpx;
  2167. align-items: center;
  2168. margin-bottom: -1px;
  2169. }
  2170. .gljk_item {
  2171. margin-bottom: 10rpx;
  2172. cursor: pointer;
  2173. }
  2174. .gljk_item:hover {
  2175. background-color: #d9ecff;
  2176. }
  2177. .qj_jianju_item {
  2178. display: flex;
  2179. width: 300rpx;
  2180. height: 70rpx;
  2181. line-height: 70rpx;
  2182. border: 1px solid #dbdbdb;
  2183. border-radius: 5rpx;
  2184. }
  2185. .tanceng {
  2186. position: absolute;
  2187. z-index: 6;
  2188. top: 10%;
  2189. left: 20%;
  2190. /* background: linear-gradient(#a38cdd, #ff8979, #868060, #826d67); */
  2191. background-color: #f5f5f5;
  2192. }
  2193. .bottom_box_title {
  2194. width: 100%;
  2195. height: 60rpx;
  2196. align-items: center;
  2197. display: flex;
  2198. position: sticky;
  2199. top: 0;
  2200. z-index: 99;
  2201. background-color: #efefef;
  2202. }
  2203. .bottom_box_item {
  2204. width: 100%;
  2205. height: 100%;
  2206. display: flex;
  2207. flex-flow: row wrap;
  2208. justify-content: space-around;
  2209. }
  2210. .bottom_box_content {
  2211. width: 200rpx;
  2212. height: 320rpx;
  2213. margin-top: 10rpx;
  2214. cursor: pointer;
  2215. border: 1px solid #dbdbdb;
  2216. }
  2217. .show_box {
  2218. width: 100%;
  2219. height: 100%;
  2220. background-color: #f2f2ec;
  2221. display: flex;
  2222. }
  2223. .show_box_left {
  2224. width: 60%;
  2225. height: 100%;
  2226. }
  2227. .sjlx {
  2228. display: flex;
  2229. justify-content: space-around;
  2230. line-height: 36px;
  2231. }
  2232. .box_left_top {
  2233. width: 860rpx;
  2234. height: 538rpx;
  2235. color: black;
  2236. padding: 30rpx;
  2237. box-sizing: border-box;
  2238. margin: 0 auto;
  2239. margin-top: 50rpx;
  2240. border: 1px solid #dbdbdb;
  2241. }
  2242. .box_left_top2 {
  2243. width: 800rpx;
  2244. height: 440rpx;
  2245. color: black;
  2246. padding: 30rpx;
  2247. border: 1px solid #dbdbdb;
  2248. margin: 0 auto;
  2249. margin-top: 30rpx;
  2250. }
  2251. .show_box_right {
  2252. width: 40%;
  2253. height: 100%;
  2254. margin-right: 120rpx;
  2255. }
  2256. .show_box_top {
  2257. width: 100%;
  2258. height: 43%;
  2259. color: black;
  2260. margin-top: 42rpx;
  2261. box-sizing: border-box;
  2262. padding: 30rpx;
  2263. border: 1px solid #dbdbdb;
  2264. }
  2265. .show_box_bottom {
  2266. width: 800rpx;
  2267. position: absolute;
  2268. left: 50rpx;
  2269. bottom: 20rpx;
  2270. height: 40%;
  2271. padding: 30rpx;
  2272. margin: auto;
  2273. color: black;
  2274. border: 1px solid #dbdbdb;
  2275. box-sizing: border-box;
  2276. overflow: scroll;
  2277. }
  2278. .box2 {
  2279. width: 64%;
  2280. /* margin: auto; */
  2281. margin-top: 60rpx;
  2282. margin-left: 680rpx;
  2283. /* height: 1500rpx; */
  2284. background-color: #efefef;
  2285. }
  2286. .shijian_box {
  2287. width: 2010rpx;
  2288. display: flex;
  2289. flex-flow: row wrap;
  2290. align-item: flex-start;
  2291. margin-top: 20rpx;
  2292. background-color: #f2f2ec;
  2293. }
  2294. .shijian_item {
  2295. width: 500rpx;
  2296. height: 480rpx;
  2297. border: 1px solid #dbdbdb;
  2298. margin-left: -1px;
  2299. margin-top: -1px;
  2300. }
  2301. .jk_title {
  2302. width: 51%;
  2303. height: 100rpx;
  2304. position: absolute;
  2305. padding: 20rpx;
  2306. box-sizing: border-box;
  2307. top: 30rpx;
  2308. left: 0;
  2309. }
  2310. .lunxun_box {
  2311. width: 67%;
  2312. height: 1600rpx;
  2313. background-color: #f2f2ec;
  2314. margin-left: 680rpx;
  2315. margin-top: 60rpx;
  2316. }
  2317. .lunxun_tw {
  2318. width: 2400rpx;
  2319. display: flex;
  2320. flex-flow: row wrap;
  2321. align-item: flex-start;
  2322. margin-top: 20rpx;
  2323. }
  2324. .tw_item {
  2325. width: 500rpx;
  2326. height: 320rpx;
  2327. padding: 10rpx;
  2328. border: 1px solid #dbdbdb;
  2329. margin-left: -1px;
  2330. margin-top: -1px;
  2331. }
  2332. .jk_show {
  2333. position: absolute;
  2334. display: flex;
  2335. justify-content: flex-start;
  2336. width: 1800rpx;
  2337. height: 1200rpx;
  2338. background-color: aliceblue;
  2339. top: 200rpx;
  2340. left: 800rpx;
  2341. border: 1px solid #dbdbdb;
  2342. background-color: #f2f2ec;
  2343. }
  2344. .jk_dcl_tc {
  2345. z-index: 5;
  2346. position: absolute;
  2347. top: 200rpx;
  2348. left: 700rpx;
  2349. width: 2060rpx;
  2350. height: 1200rpx;
  2351. padding: 20rpx;
  2352. background-color: aliceblue;
  2353. }
  2354. .jk_tc_box {
  2355. width: 100%;
  2356. height: 100%;
  2357. overflow: scroll;
  2358. }
  2359. .jk_tc_box2 {
  2360. display: flex;
  2361. flex-flow: row wrap;
  2362. align-item: flex-start;
  2363. width: 100%;
  2364. }
  2365. .jk_tc_item {
  2366. padding: 10rpx;
  2367. width: 480rpx;
  2368. height: 420rpx;
  2369. border: 1px solid #dbdbdb;
  2370. }
  2371. .pzsj_tc {
  2372. width: 1300rpx;
  2373. height: 600rpx;
  2374. padding: 40rpx;
  2375. position: absolute;
  2376. overflow: scroll;
  2377. top: 200rpx;
  2378. left: 1000rpx;
  2379. background-color: aliceblue;
  2380. }
  2381. .sjjg_tc {
  2382. width: 2600rpx;
  2383. height: 1400rpx;
  2384. padding: 20rpx;
  2385. position: absolute;
  2386. top: 200rpx;
  2387. left: 300rpx;
  2388. background-color: aliceblue;
  2389. }
  2390. .sj_top_box {
  2391. width: 2500rpx;
  2392. height: 160rpx;
  2393. display: flex;
  2394. flex-flow: wrap;
  2395. justify-content: space-around;
  2396. margin-bottom: 180rpx;
  2397. /* background-color: yellowgreen; */
  2398. }
  2399. .sj_box {
  2400. display: flex;
  2401. margin-top: 10rpx;
  2402. }
  2403. .sj_item {
  2404. width: 500rpx;
  2405. height: 70rpx;
  2406. margin-bottom: 10rpx;
  2407. border: 1px solid #dbdbdb;
  2408. border-radius: 5rpx;
  2409. overflow: scroll;
  2410. }
  2411. /deep/.u-navbar__content {
  2412. width: 200rpx !important;
  2413. }
  2414. /deep/.btn-prev {
  2415. border: none;
  2416. }
  2417. /deep/.btn-next {
  2418. border: none;
  2419. }
  2420. /deep/.el-icon-arrow-left {
  2421. line-height: 50rpx;
  2422. }
  2423. /deep/ .el-input .el-input__inner {
  2424. border-color: #dcdfe6 !important;
  2425. }
  2426. </style>