Monitor.vue 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478
  1. <template>
  2. <div class="monitor-container" style="cursor: default">
  3. <el-breadcrumb separator-class="el-icon-arrow-right">
  4. <el-breadcrumb-item>监控系统</el-breadcrumb-item>
  5. <el-breadcrumb-item>监控</el-breadcrumb-item>
  6. </el-breadcrumb>
  7. <div class="basicsbox_text">
  8. <el-button size="mini" type="primary" @click="addEquip()" class="addequip"
  9. >添加设备</el-button
  10. >
  11. <el-button size="mini" @click="bindingSIM()" class="addequipA">绑定SIM卡</el-button>
  12. </div>
  13. <div class="monitor_hint" v-if="longtimetf">
  14. <div class="monitor_hint_text">
  15. <img src="../../../../static/images/monitor/laba.png" alt />
  16. <p>您已持续观看监控很久了,长时间观看监控会耗尽物联网卡流量,请您注意</p>
  17. </div>
  18. <i class="el-icon-close" @click="guanbilong"></i>
  19. </div>
  20. <div class="monitor-wrap">
  21. <div class="video-box">
  22. <div class="video-container" ref="videoContainerRef">
  23. <!-- 插件播放 -->
  24. <div class="x" v-if="playType == 1" v-html="html" style="width: 100%; height: 100%"></div>
  25. <!-- 非插件播放 ,默认非插件播放-->
  26. <div class="v" style="width: 100%; height: 100%" v-if="playType == 0">
  27. <div
  28. :class="{
  29. videoItem: true,
  30. a1: divNum == 1,
  31. a4: divNum == 4,
  32. a9: divNum == 9,
  33. selected: count == selected
  34. }"
  35. v-for="count in divNum"
  36. :key="divNum + count"
  37. @click.capture="selectVideo(count)"
  38. >
  39. <div style="width: 100%; height: 100%" :id="'my-video' + count"></div>
  40. </div>
  41. </div>
  42. </div>
  43. <div v-show="false" class="split-screen">
  44. <div>
  45. <span class="sp sp01" @click="splitView(1)"></span>
  46. <span class="sp sp02" @click="splitView(4)"></span>
  47. <span class="sp sp03" @click="splitView(9)"></span>
  48. </div>
  49. <el-radio-group
  50. v-model="videoType"
  51. size="mini"
  52. @input="changeVideoType"
  53. v-if="isShowType"
  54. >
  55. <el-radio-button label="sd">标清</el-radio-button>
  56. <el-radio-button label="hd">高清</el-radio-button>
  57. </el-radio-group>
  58. </div>
  59. </div>
  60. <div class="nav-box">
  61. <div class="view-box">
  62. <div class="search">
  63. <el-autocomplete
  64. style="width: 262px"
  65. size="mini"
  66. v-model="state"
  67. :fetch-suggestions="querySearchAsync"
  68. placeholder="请输入设备ID"
  69. @select="handleSelect"
  70. @input="axiosList"
  71. >
  72. </el-autocomplete>
  73. <el-button style="margin-left: 8px" @click="axiosList" type="primary" size="mini"
  74. >查询</el-button
  75. >
  76. </div>
  77. <ul class="viewLists">
  78. <li
  79. v-for="(item, index) in Idlist"
  80. :key="index"
  81. :class="{ active: activeIndex == index }"
  82. @click="selectEquip(item.device_id, item.jktype, index)"
  83. >
  84. <span :class="['status', item.status == 1 ? 'onLine' : 'outLine']">{{
  85. item.status == 1 ? '在线' : '离线'
  86. }}</span>
  87. <el-tooltip class="item" effect="dark">
  88. <div slot="content">
  89. 设备名称:{{ item.device_name }}<br /><br />设备id:{{ item.device_id }}
  90. </div>
  91. <div class="titleBox">
  92. <span class="device-name" :title="item.device_name">{{ item | formatName }}</span>
  93. <span class="device-id">ID:{{ item.device_id }}</span>
  94. </div>
  95. </el-tooltip>
  96. <!--查看图片 查看回放原来逻辑 -->
  97. <div class="viewPhoto" v-if="false">
  98. <i
  99. v-if="$QueryPermission(188)"
  100. class="el-icon-picture"
  101. @click.stop="viewPhoto(item.device_id)"
  102. ></i>
  103. <i
  104. class="el-icon-video-camera-solid"
  105. @click.stop="toplay(item.device_id, item.type_id, item.token, item.gb)"
  106. v-if="$QueryPermission(236) && item.camera_playback == 1"
  107. ></i>
  108. </div>
  109. <div class="more">
  110. <el-popover placement="top" popper-class="hoverpopover" :width="10" trigger="click">
  111. <div>
  112. <p class="cursor" @click="reName(item.device_id, item.device_name)">信息修改</p>
  113. <p class="cursor" style="color: #ff5951">删除设备</p>
  114. </div>
  115. <span slot="reference" class="yficonfont icon-gengduo"></span>
  116. </el-popover>
  117. </div>
  118. <!-- -->
  119. <!-- <span @click.stop="viewPhoto(item.device_id)" class="viewPhoto"
  120. >查看图片</span
  121. >-->
  122. </li>
  123. </ul>
  124. <div class="splitPage" onselectstart="return false">
  125. <el-pagination
  126. :small="true"
  127. background
  128. @current-change="handleCurrentChange"
  129. :current-page.sync="currPage"
  130. :page-size="8"
  131. :pager-count="5"
  132. layout="prev, pager, next"
  133. :total="totalPage"
  134. >
  135. </el-pagination>
  136. </div>
  137. </div>
  138. <div class="view-box" v-show="true">
  139. <div class="camera-control">
  140. <span
  141. class="zoom-in el-icon-minus"
  142. @mousedown="configCamera('move', 9)"
  143. @mouseup="stopConfigCamera()"
  144. ></span>
  145. <div class="control-ring">
  146. <div
  147. @mousedown="configCamera('move', 0, 'up')"
  148. @mouseup="stopConfigCamera()"
  149. class="div-opt upCtr el-icon-arrow-up"
  150. ></div>
  151. <div
  152. @mousedown="configCamera('move', 1, 'down')"
  153. @mouseup="stopConfigCamera()"
  154. class="div-opt downCtr el-icon-arrow-down"
  155. ></div>
  156. <div
  157. @mousedown="configCamera('move', 2, 'left')"
  158. @mouseup="stopConfigCamera()"
  159. class="div-opt leftCtr el-icon-arrow-left"
  160. ></div>
  161. <div
  162. @mousedown="configCamera('move', 3, 'right')"
  163. @mouseup="stopConfigCamera()"
  164. class="div-opt rightCtr el-icon-arrow-right"
  165. ></div>
  166. <div class="outer-ring">
  167. <div class="quarter-sector" :class="'opt-active-' + optActive"></div>
  168. </div>
  169. <div class="inner-circle">
  170. <i @click="photograph()" class="el-icon-camera-solid camera-icon"></i>
  171. </div>
  172. </div>
  173. <span
  174. class="zoom-out el-icon-plus"
  175. @mousedown="configCamera('move', 8)"
  176. @mouseup="stopConfigCamera()"
  177. ></span>
  178. </div>
  179. <div class="btnBox">
  180. <el-button size="small" @click.stop="viewPhoto()">查看图片</el-button>
  181. <el-button size="small" @click.stop="toplay()">查看回放</el-button>
  182. <!-- <div class="zoom">
  183. <span
  184. class="addCtr"
  185. @mousedown="configCamera('move', 8)"
  186. @mouseup="stopConfigCamera()"
  187. ></span>
  188. <span
  189. class="reduceCtr"
  190. @mousedown="configCamera('move', 9)"
  191. @mouseup="stopConfigCamera()"
  192. ></span>
  193. </div> -->
  194. <!-- <div
  195. v-show="jktype == 1"
  196. class="playBack"
  197. @click="playBackDialogVisible = true"
  198. id="playBack"
  199. ></div> -->
  200. <!-- <div @click="addEquip()" class="addequip"></div>
  201. <div @click="bindingSIM()" class="addequipA"></div> -->
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. <!-- 拍照 -->
  207. <el-dialog title="手动下载" :visible.sync="takePhotoDialogVisible" width="30%">
  208. <el-input type="textarea" id="picUrl" v-model="picUrl"></el-input>
  209. <span slot="footer" class="dialog-footer">
  210. <el-button @click="takePhotoDialogVisible = false">取 消</el-button>
  211. <el-button type="primary" @click="copyPicUrl">复制</el-button>
  212. </span>
  213. </el-dialog>
  214. <!-- 查看回放 -->
  215. <el-dialog
  216. title="查看回放"
  217. :visible.sync="playBackDialogVisible"
  218. width="600px"
  219. @close="palyBackClose"
  220. >
  221. <el-form ref="backFormRef" :model="backForm" :rules="backFormRules" label-width="80px">
  222. <el-form-item label="时间范围" prop="time">
  223. <el-date-picker
  224. v-model="backForm.time"
  225. type="datetimerange"
  226. range-separator="至"
  227. start-placeholder="开始日期"
  228. end-placeholder="结束日期"
  229. ></el-date-picker>
  230. </el-form-item>
  231. <!-- <el-form-item label="通道" prop="aisle">
  232. <el-select
  233. style="width: 400px"
  234. v-model="backForm.aisle"
  235. placeholder="请选择"
  236. >
  237. <el-option
  238. v-for="item in Number(jktype)"
  239. :key="item"
  240. :label="'通道' + item"
  241. :value="item"
  242. >
  243. </el-option>
  244. </el-select>
  245. </el-form-item>-->
  246. <el-form-item>
  247. <el-button type="default" @click="playBackDialogVisible = false">取消</el-button>
  248. <el-button type="primary" @click="playBackSubmit">确定</el-button>
  249. </el-form-item>
  250. </el-form>
  251. <div id="videoBack">
  252. <div id="playWind"></div>
  253. </div>
  254. </el-dialog>
  255. <!-- 测试添加设备 -->
  256. <el-dialog
  257. title="添加设备"
  258. :visible.sync="addEquipment"
  259. width="575px"
  260. :before-close="handleClose"
  261. :close-on-click-modal="false"
  262. :close-on-press-escape="false"
  263. >
  264. <!-- 测试 -->
  265. <div class="facility_box">
  266. <ul
  267. style="
  268. margin: -30px 0 0 -20px;
  269. width: 545px;
  270. display: flex;
  271. justify-content: space-around;
  272. "
  273. >
  274. <li
  275. v-for="(item, index) in tltArray"
  276. :key="index"
  277. :class="stepIndex == index ? 'addClass' : ''"
  278. @click="next(index)"
  279. style="padding: 10px 0 10px 0; width: 50%; text-align: center"
  280. >
  281. {{ item.name }}
  282. </li>
  283. </ul>
  284. <!-- 第一步 -->
  285. <div v-if="stepIndex == 0" class="facility_boxOne">
  286. <div style="display: flex; width: 80%; margin: 15px auto">
  287. <span style="width: 136px; text-align: right; line-height: 35px; margin: 0 15px 0 0">
  288. <span style="color: red">*</span> 账号:
  289. </span>
  290. <el-input placeholder="请输入账号" v-model="FluoriteClouduser" clearable></el-input>
  291. </div>
  292. <div style="display: flex; width: 80%; margin: 15px auto">
  293. <span style="width: 136px; text-align: right; line-height: 35px; margin: 0 15px 0 0">
  294. <span style="color: red">*</span> 业务员名称:
  295. </span>
  296. <el-input
  297. placeholder="请输入账号所相关的业务员名称"
  298. v-model="salesman"
  299. clearable
  300. ></el-input>
  301. </div>
  302. <!-- <div style="display: flex; width: 80%; margin: 15px auto">
  303. <span style="width: 136px; text-align: right; line-height: 35px; margin: 0 15px 0 0">
  304. <span style="color: red">*</span> token:
  305. </span>
  306. <el-input placeholder="请输入token" v-model="tokenData" clearable></el-input>
  307. </div> -->
  308. <div style="display: flex; width: 80%; margin: 15px auto">
  309. <span style="width: 136px; text-align: right; line-height: 35px; margin: 0 15px 0 0">
  310. <span style="color: red">*</span> appkey:
  311. </span>
  312. <el-input placeholder="请输入秘钥" v-model="secretKey" clearable></el-input>
  313. </div>
  314. <div style="display: flex; width: 80%; margin: 15px auto">
  315. <span style="width: 136px; text-align: right; line-height: 35px; margin: 0 15px 0 0">
  316. <span style="color: red">*</span> appSecret:
  317. </span>
  318. <el-input placeholder="请输入appSecret" v-model="furtiveData" clearable></el-input>
  319. </div>
  320. <div style="display: flex; width: 80%; margin: 15px auto">
  321. <span style="width: 100px; text-align: right; line-height: 35px; margin: 0 15px 0 0">
  322. <span style="color: red">*</span> 设备厂家:
  323. </span>
  324. <el-radio v-model="radio" label="0" style="margin-top: 10px">海康</el-radio>
  325. <el-radio v-model="radio" label="1" style="margin-top: 10px">大华</el-radio>
  326. </div>
  327. <span style="margin: 0 0 0 310px" slot="footer" class="dialog-footer">
  328. <el-button @click="addEquipment = false">取 消</el-button>
  329. <el-button type="primary" @click="FluoriteClouduserAdd()">确 定</el-button>
  330. </span>
  331. </div>
  332. <!-- 第二步 -->
  333. <el-form
  334. label-width="150px"
  335. class="facility_boxTwo"
  336. ref="addDeviceRef"
  337. v-else-if="stepIndex == 1"
  338. :model="addDevice"
  339. :rules="addDeviceRules"
  340. >
  341. <el-form-item label="萤石云账号id" prop="FluoriteClouduserID">
  342. <el-select
  343. v-model="addDevice.FluoriteClouduserID"
  344. placeholder="请选择萤石云账号id"
  345. clearable
  346. >
  347. <el-option
  348. v-for="item in userNameID"
  349. :key="item.value"
  350. :label="item.label"
  351. :value="item.value"
  352. ></el-option>
  353. </el-select>
  354. </el-form-item>
  355. <el-form-item label="设备id" prop="equipmentID">
  356. <el-input
  357. placeholder="请输入设备id"
  358. v-model="addDevice.equipmentID"
  359. clearable
  360. ></el-input>
  361. </el-form-item>
  362. <!-- <el-form-item label="国标id">
  363. <el-input placeholder="请输入国标id" v-model="addDevice.gb" clearable></el-input>
  364. </el-form-item> -->
  365. <el-form-item v-if="user_tag == 1" label="销售" prop="sale_uid">
  366. <el-select v-model="addDevice.sale_uid" placeholder="请选择销售" clearable>
  367. <el-option
  368. v-for="item in salesmanID"
  369. :key="item.uid"
  370. :label="item.username"
  371. :value="item.uid"
  372. ></el-option>
  373. </el-select>
  374. </el-form-item>
  375. <el-form-item v-if="user_tag == 1" label="任务单号" prop="task_num">
  376. <el-input
  377. placeholder="请输入任务单号"
  378. v-model="addDevice.task_num"
  379. clearable
  380. ></el-input>
  381. </el-form-item>
  382. <el-form-item label="sim卡号" prop="iccid">
  383. <el-input placeholder="请输入sim卡号" v-model="addDevice.iccid" clearable></el-input>
  384. </el-form-item>
  385. <el-form-item label="通道" prop="equipmentNumber">
  386. <el-select v-model="addDevice.equipmentNumber" placeholder="请选择设备通道号" clearable>
  387. <el-option
  388. v-for="item in equipmentChannel"
  389. :key="item.value"
  390. :label="item.label"
  391. :value="item.value"
  392. ></el-option>
  393. </el-select>
  394. </el-form-item>
  395. <el-form-item label="回放" prop="playback">
  396. <el-switch
  397. v-model="addDevice.playback"
  398. active-color="#13ce66"
  399. inactive-color="#ff4949"
  400. active-text="支持回放功能"
  401. inactive-text="不支持回放功能"
  402. ></el-switch>
  403. </el-form-item>
  404. <el-form-item>
  405. <el-button @click="addEquipment = false">取 消</el-button>
  406. <el-button type="primary" @click="addConfirm()">确 定</el-button>
  407. </el-form-item>
  408. </el-form>
  409. <!-- <div class="facility_boxTwo"> -->
  410. <!-- <div style="display: flex; width: 80%; margin: 15px auto">
  411. <span
  412. style="
  413. width: 130px;
  414. text-align: right;
  415. line-height: 35px;
  416. margin: 0 15px 0 0;
  417. "
  418. >
  419. <span style="color: red">*</span> 萤石云账号id
  420. </span>
  421. <el-select
  422. style="width: 412px"
  423. v-model="FluoriteClouduserID"
  424. placeholder="请选择萤石云账号id"
  425. clearable
  426. >
  427. <el-option
  428. v-for="item in userNameID"
  429. :key="item.value"
  430. :label="item.label"
  431. :value="item.value"
  432. ></el-option>
  433. </el-select>
  434. </div> -->
  435. <!-- <div style="display: flex; width: 80%; margin: 15px auto">
  436. <span
  437. style="
  438. width: 130px;
  439. text-align: right;
  440. line-height: 35px;
  441. margin: 0 15px 0 0;
  442. "
  443. >
  444. <span style="color: red">*</span> 设备id
  445. </span>
  446. <el-input placeholder="请输入设备id" v-model="equipmentID" clearable></el-input>
  447. </div> -->
  448. <!-- <div style="display: flex; width: 80%; margin: 15px auto">
  449. <span
  450. style="
  451. width: 130px;
  452. text-align: right;
  453. line-height: 35px;
  454. margin: 0 15px 0 0;
  455. "
  456. >
  457. <span style="color: red">*</span> 通道
  458. </span>
  459. <el-select
  460. style="width: 412px"
  461. v-model="equipmentNumber"
  462. placeholder="请选择设备通道号"
  463. clearable
  464. >
  465. <el-option
  466. v-for="item in equipmentChannel"
  467. :key="item.value"
  468. :label="item.label"
  469. :value="item.value"
  470. ></el-option>
  471. </el-select>
  472. </div> -->
  473. <!-- <div style="display: flex; width: 91%; margin: 15px auto">
  474. <span
  475. style="
  476. width: 130px;
  477. text-align: right;
  478. line-height: 24px;
  479. margin: 0 15px 0 0;
  480. "
  481. >
  482. <span style="color: red">*</span> 回放
  483. </span>
  484. <el-switch
  485. style="display: block"
  486. v-model="playback"
  487. active-color="#13ce66"
  488. inactive-color="#ff4949"
  489. active-text="支持回放功能"
  490. inactive-text="不支持回放功能"
  491. ></el-switch>
  492. </div> -->
  493. <!-- <span style="margin: 0 0 0 310px" slot="footer" class="dialog-footer">
  494. <el-button @click="addEquipment = false">取 消</el-button>
  495. <el-button type="primary" @click="addConfirm()">确 定</el-button>
  496. </span>
  497. </div> -->
  498. </div>
  499. <!-- 测试 -->
  500. </el-dialog>
  501. <!-- 绑定SIM弹框 -->
  502. <el-dialog title="绑定SIM" :visible.sync="addEquipmentA" width="30%">
  503. <div v-loading="simloading">
  504. <!-- <div style="display: flex; width: 80%; margin: 15px auto">
  505. <span
  506. style="
  507. width: 75px;
  508. text-align: right;
  509. line-height: 35px;
  510. margin: 0 15px 0 0;
  511. "
  512. ><span style="color: red">*</span>搜索id
  513. </span>
  514. <el-select
  515. v-model="query"
  516. filterable
  517. remote
  518. placeholder="请输入关键词"
  519. :remote-method="simsearch"
  520. :loading="false"
  521. @change="simidchangae"
  522. style="width: 412px"
  523. >
  524. <el-option
  525. v-for="item in equipmentIDlist"
  526. :key="item.value"
  527. :label="item.label"
  528. :value="item.value"
  529. >
  530. </el-option>
  531. </el-select>
  532. </div>-->
  533. <!-- <div style="display: flex; width: 80%; margin: 15px auto">
  534. <span
  535. style="
  536. width: 75px;
  537. text-align: right;
  538. line-height: 35px;
  539. margin: 0 15px 0 0;
  540. "
  541. >
  542. <span style="color: red">*</span>设备id
  543. </span>
  544. <el-select
  545. filterable
  546. style="width: 412px"
  547. v-model="equipmentID"
  548. placeholder="请选择设备id"
  549. @change="simidchangaeB"
  550. >
  551. <el-option
  552. v-for="item in equipmentOptions"
  553. :key="item.value"
  554. :label="item.label"
  555. :value="item.value"
  556. >
  557. </el-option>
  558. </el-select>-->
  559. <!-- <el-select
  560. v-model="bangDsimId"
  561. filterable
  562. remote
  563. reserve-keyword
  564. placeholder="请输入关键词"
  565. :remote-method="remoteMethod"
  566. :loading="loading"
  567. style="width: 412px"
  568. @change="bangDsimIdselect"
  569. >
  570. <el-option
  571. v-for="item in bangDsimoptions"
  572. :key="item.value"
  573. :label="item.label"
  574. :value="item.value"
  575. ></el-option>
  576. </el-select>
  577. </div> -->
  578. <div style="display: flex; width: 80%; margin: 15px auto">
  579. <span style="width: 75px; text-align: right; line-height: 35px; margin: 0 15px 0 0">
  580. <span style="color: red">*</span>ICCID
  581. </span>
  582. <el-input placeholder="请输入iccid" v-model="equipmentValue" clearable></el-input>
  583. </div>
  584. <div style="width: 50%; margin: 15px auto">
  585. <el-button type="primary" @click=";(addEquipment = false), addEquipmentBfirm()"
  586. >查 询</el-button
  587. >
  588. </div>
  589. <div style="width: 100%; display: flex; justify-content: flex-end">
  590. <div>
  591. <el-button @click=";(addEquipmentA = false), addCancel()">取 消</el-button>
  592. <el-button type="primary" @click=";(addEquipment = false), addConfirmSIM()"
  593. >确 定</el-button
  594. >
  595. </div>
  596. </div>
  597. </div>
  598. </el-dialog>
  599. <!-- 查询SIM卡弹框 -->
  600. <!-- <el-dialog
  601. title="查询SIM"
  602. :visible.sync="addEquipmentB"
  603. width="30%"
  604. >
  605. <div style="display: flex; width: 80%; margin: 15px auto" >
  606. <span
  607. style="
  608. width: 75px;
  609. text-align: right;
  610. line-height: 35px;
  611. margin: 0 15px 0 0;
  612. "
  613. ><span style="color: red">*</span> ICCID</span
  614. >
  615. <el-input placeholder="请输入iccid" v-model="equipmentICCID" clearable>
  616. </el-input>
  617. </div>
  618. <span slot="footer" class="dialog-footer">
  619. <el-button @click="(addEquipmentB = false), addEquipmentBCancel()"
  620. >取 消</el-button
  621. >
  622. <el-button
  623. type="primary"
  624. @click="(addEquipment = false), addEquipmentBfirm()"
  625. >确 定</el-button
  626. >
  627. </span>
  628. </el-dialog>-->
  629. <!-- SIM卡数据-->
  630. <el-dialog title="SIM卡" :visible.sync="simCodeVisible" width="30%">
  631. <div class="simCodeBox">
  632. <div>
  633. <span class="simCodeTitle">ICCID:</span>
  634. <div>{{ sim.iccid }}</div>
  635. </div>
  636. <div>
  637. <span class="simCodeTitle">厂家:</span>
  638. <div>{{ sim.company }}</div>
  639. </div>
  640. <div>
  641. <span class="simCodeTitle">状态:</span>
  642. <div>{{ sim.status }}</div>
  643. </div>
  644. <div>
  645. <span class="simCodeTitle">套餐:</span>
  646. <span>{{ sim.total }}MB</span>
  647. </div>
  648. <div>
  649. <span class="simCodeTitle">已用流量:</span>
  650. <span>{{ sim.used }}MB</span>
  651. </div>
  652. <div>
  653. <span class="simCodeTitle">到期时间:</span>
  654. <!-- <div>{{ (sim.expiry_date * 1000) | formatTime }}</div> -->
  655. <div>{{ sim.expire }}</div>
  656. </div>
  657. <div class="operateBtn">
  658. <el-button size="mini" @click="simCodeVisible = false">关闭</el-button>
  659. </div>
  660. </div>
  661. </el-dialog>
  662. </div>
  663. </template>
  664. <script>
  665. import videojs from 'video.js'
  666. import 'video.js/dist/video-js.css'
  667. import ymPlayer from '../comp/videoPlayer.vue'
  668. import HlsPlayer from '@ezuikit/player-hls'
  669. export default {
  670. comments: {
  671. ymPlayer
  672. },
  673. data() {
  674. return {
  675. user_tag: localStorage.getItem('user_tag'), // 用户类型
  676. videoType: 'sd', // hd高清 sd标清
  677. isShowType: true, // 视频类型是否显示
  678. currPage: 1, // 当前分页
  679. totalPage: 0, // 总分页
  680. id: '', // 右侧菜单选中的设备ID
  681. activeIndex: 0, // 控制设备列表选中状态
  682. jktype: '', // 为1有回放,否则无回放
  683. divNum: 1, // 默认分屏数量
  684. hlsHdSrc: '',
  685. rtmpHdSrc: '',
  686. takePhotoDialogVisible: false, // 拍照弹框
  687. Idlist: [], // 右侧设备列表
  688. divMainHeight: '', // 视频盒子高度
  689. selected: 1, // 默认选中第一个视频窗口
  690. playType: 0, // 0:直播 ; 1:插件
  691. html: '', // 插件播放内容
  692. picUrl: '', // 视频拍照地址
  693. playBackDialogVisible: false,
  694. mapTojkId: this.$route.query.id, // 四情基地监控设备id
  695. mapTojktype: this.$route.query.jktype, // 四情基地监控设备jktype
  696. newVideo: false,
  697. myVideo: {},
  698. backForm: {
  699. time: '',
  700. start: '',
  701. end: '',
  702. aisle: 1
  703. },
  704. backFormRules: {
  705. time: [{ required: true, message: '请选择时间范围', trigger: 'change' }],
  706. aisle: [{ required: true, message: '请选择通道', trigger: 'change' }]
  707. },
  708. accessToken: '',
  709. addEquipment: false, // 测试添加设备
  710. equipmentID: '', // 添加设备ID
  711. equipmentIDlist: [], // 搜索Id集合
  712. equipmentOptions: [
  713. // 设备id集合
  714. ],
  715. equipmentChannel: [
  716. {
  717. value: '0',
  718. label: '0'
  719. },
  720. {
  721. value: 1,
  722. label: 1
  723. },
  724. {
  725. value: 2,
  726. label: 2
  727. },
  728. {
  729. value: 3,
  730. label: 3
  731. },
  732. {
  733. value: 4,
  734. label: 4
  735. },
  736. {
  737. value: 5,
  738. label: 5
  739. },
  740. {
  741. value: 6,
  742. label: 6
  743. },
  744. {
  745. value: 7,
  746. label: 7
  747. },
  748. {
  749. value: 8,
  750. label: 8
  751. },
  752. {
  753. value: 9,
  754. label: 9
  755. },
  756. {
  757. value: 10,
  758. label: 10
  759. },
  760. {
  761. value: 11,
  762. label: 11
  763. },
  764. {
  765. value: 12,
  766. label: 12
  767. },
  768. {
  769. value: 13,
  770. label: 13
  771. },
  772. {
  773. value: 14,
  774. label: 14
  775. },
  776. {
  777. value: 15,
  778. label: 15
  779. },
  780. {
  781. value: 16,
  782. label: 16
  783. },
  784. {
  785. value: 17,
  786. label: 17
  787. },
  788. {
  789. value: 18,
  790. label: 18
  791. },
  792. {
  793. value: 19,
  794. label: 19
  795. },
  796. {
  797. value: 20,
  798. label: 20
  799. },
  800. {
  801. value: 21,
  802. label: 21
  803. },
  804. {
  805. value: 22,
  806. label: 22
  807. },
  808. {
  809. value: 23,
  810. label: 23
  811. },
  812. {
  813. value: 24,
  814. label: 24
  815. },
  816. {
  817. value: 25,
  818. label: 25
  819. },
  820. {
  821. value: 26,
  822. label: 26
  823. },
  824. {
  825. value: 27,
  826. label: 27
  827. },
  828. {
  829. value: 28,
  830. label: 28
  831. },
  832. {
  833. value: 29,
  834. label: 29
  835. },
  836. {
  837. value: 30,
  838. label: 30
  839. },
  840. {
  841. value: 31,
  842. label: 31
  843. }
  844. ],
  845. equipmentNumber: '', // 设备通道
  846. playback: false, // 是否添加回放功能
  847. // 搜索
  848. restaurants: [],
  849. state: '',
  850. timeout: null,
  851. idName: '',
  852. addEquipmentA: false, // 绑定SIM卡弹框
  853. addEquipmentB: false, // 查询SIM卡弹框
  854. equipmentICCID: '', // 查询SIM input
  855. // sim卡
  856. sim: {
  857. iccid: '',
  858. account_status: 0, // 卡状态 0-7 未知 测试期 沉默期 使用中 停机 停机保号 预销号 销号
  859. data_plan: 0, // 套餐大小
  860. data_usage: 0, // 当月用量
  861. data_balance: 0, // 剩余流量
  862. expiry_date: 0 // 到期日期
  863. },
  864. simCodeVisible: false,
  865. input3: '',
  866. value3: [],
  867. code: 0, // 设备型号,
  868. query: [],
  869. simloading: false,
  870. equipmentValue: '', // iccid
  871. // 添加设备
  872. FluoriteClouduser: '', // 萤石云账号
  873. salesman: '', // 萤石云账号所相关的业务员名称
  874. tokenData: '', // token
  875. secretKey: '', // appkey
  876. furtiveData: '', // appSecret
  877. addDevice: {
  878. FluoriteClouduserID: '', // 萤石云账号ID
  879. equipmentID: '', // 设备ID
  880. equipmentNumber: '', // 设备通道
  881. sale_uid: '', // 业务员ID
  882. task_num: '', // 任务ID
  883. playback: false, // 是否添加回放功能
  884. iccid: '', // sim卡
  885. gb: '' // 国标ID
  886. },
  887. salesmanID: [], // 业务员ID集合
  888. addDeviceRules: {
  889. FluoriteClouduserID: [{ required: true, message: '请选择萤石云账号id', trigger: 'change' }],
  890. equipmentID: [{ required: true, message: '请输入设备id', trigger: 'blur' }],
  891. equipmentNumber: [{ required: true, message: '请选择设备通道号', trigger: 'change' }]
  892. },
  893. // FluoriteClouduserID: '', // 萤石云账号ID
  894. stepIndex: 0, // 步骤下标
  895. tltArray: [
  896. {
  897. name: '添加账号'
  898. },
  899. {
  900. name: '添加监控设备'
  901. }
  902. ],
  903. userNameID: [
  904. // {
  905. // value: 1,
  906. // label: 1,
  907. // },
  908. ],
  909. bangDsimoptions: [], // 绑定sim设备id集合
  910. bangDsimId: null, // 当前设备ID
  911. VideoList: [], // 视频直播列表
  912. longtimetf: false,
  913. monthitortime: null,
  914. radio: '0',
  915. optActive: '',
  916. stopTimer: 0
  917. }
  918. },
  919. filters: {
  920. formatName: function (value) {
  921. // 设备名字
  922. // if (!value) return "";
  923. // if (value.equip_name) {
  924. // if (value.equip_name.length > 5) {
  925. // return value.equip_name.slice(0, 5) + "...";
  926. // }
  927. // return value.equip_name;
  928. // } else {
  929. // if (value.device_id.length > 5) {
  930. // return value.device_id.slice(0, 5) + "...";
  931. // }
  932. // return value.device_id;
  933. // }
  934. // -----------------------------------------------------------
  935. let name = ''
  936. if (!value.device_name) {
  937. name = '暂无名称'
  938. } else if (value.device_name.length > 7) {
  939. name = value.device_name.slice(0, 7) + '...'
  940. } else {
  941. name = value.device_name
  942. }
  943. return name
  944. }
  945. },
  946. computed: {
  947. notifyStyle() {
  948. if (this.$store.state.homeNotify) {
  949. return {
  950. top: '72px'
  951. }
  952. } else {
  953. return {
  954. top: '60px'
  955. }
  956. }
  957. }
  958. },
  959. mounted() {
  960. if (this.$route.query.id !== undefined) {
  961. this.idName = this.$route.query.id
  962. }
  963. this.getJkList()
  964. this.$store.dispatch('getSaleUserList')
  965. // this.restaurants = this.loadAll(); // 搜索数据
  966. },
  967. created() {},
  968. beforeDestroy() {
  969. for (let item in this.myVideo) {
  970. if ('destroy' in this.myVideo[item]) {
  971. this.myVideo[item].destroy()
  972. }
  973. }
  974. },
  975. destroyed() {
  976. // this.player.dispose()
  977. // console.log(this.VideoList);
  978. // this.VideoList.forEach(item => {
  979. // if (item.hasOwnProperty('stop')) {
  980. // item.stop();
  981. // } else {
  982. // if(item) {
  983. // item.dispose();
  984. // }
  985. // }
  986. // })
  987. },
  988. methods: {
  989. reName(id, device_name) {
  990. var that = this
  991. let value = device_name
  992. this.$prompt('', '修改名字', {
  993. confirmButtonText: '确定',
  994. cancelButtonText: '取消',
  995. inputValidator: function (value) {
  996. if (value.length > 16) {
  997. return '设备名称不能超过16个字符'
  998. }
  999. },
  1000. inputPlaceholder: device_name
  1001. })
  1002. .then(({ value }) => {
  1003. if (value) {
  1004. this.$axios({
  1005. method: 'POST',
  1006. url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
  1007. data: this.qs.stringify({
  1008. device_id: id,
  1009. device_name: value
  1010. })
  1011. }).then((res) => {
  1012. if (res.data.message == '') {
  1013. this.getJkList()
  1014. this.$message({
  1015. type: 'success',
  1016. message: '修改成功'
  1017. })
  1018. }
  1019. })
  1020. } else {
  1021. this.$message({
  1022. type: 'info',
  1023. message: '内容不能为空'
  1024. })
  1025. }
  1026. })
  1027. .catch(() => {
  1028. this.$message({
  1029. type: 'info',
  1030. message: '取消输入'
  1031. })
  1032. })
  1033. },
  1034. /**
  1035. * 更改视频清晰度
  1036. *
  1037. * @param type 视频清晰度 hd高清, sd标清
  1038. * @returns 无返回值
  1039. */
  1040. changeVideoType(type) {
  1041. let newUrl = ''
  1042. if (type === 'hd') {
  1043. let newUrlList = this.myVideo[`myPlayer${this.selected}`].url.split('live')
  1044. newUrl = `${newUrlList[0]}hd.live`
  1045. } else if (type === 'sd') {
  1046. let newUrlList = this.myVideo[`myPlayer${this.selected}`].url.split('hd')
  1047. newUrl = `${newUrlList[0]}live`
  1048. }
  1049. console.log(newUrl)
  1050. this.myVideo[`myPlayer${this.selected}`].changePlayUrl({
  1051. url: newUrl
  1052. })
  1053. },
  1054. viewPhoto(id, gbId) {
  1055. this.$router.push('/index/photoViewDgp/' + this.Idlist[this.activeIndex].device_id)
  1056. },
  1057. // 获取视频列表
  1058. getJkList() {
  1059. this.$axios({
  1060. method: 'POST',
  1061. url: '/api/api_gateway?method=camera.camera_manage.list_camera',
  1062. data: this.qs.stringify({
  1063. page: this.currPage,
  1064. page_size: 8,
  1065. device_id: this.idName,
  1066. device_type_id: 44 // 多光谱设备
  1067. })
  1068. }).then((res) => {
  1069. if (res.data.message == '') {
  1070. this.Idlist = res.data.data.data
  1071. this.accessToken = res.data.data.accessToken
  1072. this.totalPage = res.data.data.counts
  1073. if (this.mapTojkId && this.mapTojktype) {
  1074. // 基地展示跳转过来
  1075. this.selectEquip(this.mapTojkId, this.mapTojktype, 99999)
  1076. } else {
  1077. this.selectEquip(this.Idlist[0].device_id, this.Idlist[0].jktype, 0)
  1078. }
  1079. }
  1080. // console.log(this.Idlist);
  1081. for (var i = 0; i < this.Idlist.length; i++) {
  1082. var obj = {
  1083. value: i,
  1084. label: this.Idlist[i].device_id
  1085. }
  1086. this.equipmentOptions.push(obj)
  1087. }
  1088. this.restaurants = this.loadAll() // 搜索数据
  1089. })
  1090. },
  1091. // 视频分页
  1092. splitPage(str) {
  1093. if (str == 'jian') {
  1094. if (this.currPage > 1) {
  1095. this.currPage--
  1096. this.getJkList()
  1097. }
  1098. } else {
  1099. if (this.currPage < this.totalPage) {
  1100. this.currPage++
  1101. this.getJkList()
  1102. }
  1103. }
  1104. },
  1105. handleCurrentChange(page) {
  1106. this.currPage = page
  1107. this.getJkList()
  1108. },
  1109. // 关闭方向
  1110. stopConfigCamera() {
  1111. if (this.stopTimer) clearTimeout(this.stopTimer)
  1112. this.stopTimer = setTimeout(() => {
  1113. this.$axios({
  1114. method: 'POST',
  1115. url: '/api/api_gateway?method=camera.camera_manage.mulit_stop_move',
  1116. data: this.qs.stringify({
  1117. device_id: this.id
  1118. })
  1119. })
  1120. }, 3000)
  1121. },
  1122. // 上下左右
  1123. configCamera(ctrl, movenum, action) {
  1124. this.optActive = action
  1125. if (ctrl == 'takephoto') {
  1126. this.$axios({
  1127. method: 'POST',
  1128. url: '/api/api_gateway?method=camera.camera_manage.multi_camera_takephoto',
  1129. data: this.qs.stringify({
  1130. device_id: this.id
  1131. })
  1132. }).then((res) => {
  1133. let data = JSON.parse(res.data.data)
  1134. if (data.code == 200) {
  1135. this.picUrl = data.data.picUrl
  1136. this.takePhotoDialogVisible = true
  1137. } else {
  1138. this.$message.error(data.msg)
  1139. }
  1140. })
  1141. } else {
  1142. // 上下左右、放大、缩小
  1143. this.$axios({
  1144. method: 'POST',
  1145. url: '/api/api_gateway?method=camera.camera_manage.multi_ctrl_camera',
  1146. data: this.qs.stringify({
  1147. device_id: this.id,
  1148. ctrl: movenum
  1149. })
  1150. }).then((res) => {
  1151. // if (res.data.message == '') {
  1152. // this.$message.success('指令下发成功')
  1153. // // this.stopConfigCamera() //关闭方向
  1154. // }
  1155. })
  1156. }
  1157. },
  1158. // 拍照
  1159. photograph() {
  1160. this.$axios({
  1161. method: 'POST',
  1162. url: '/api/api_gateway?method=camera.camera_manage.multi_camera_takephoto',
  1163. data: this.qs.stringify({
  1164. device_id: this.id
  1165. })
  1166. })
  1167. .then((res) => {
  1168. if (res.data.data == 'true') {
  1169. this.picUrl = res.data.data.addr
  1170. // this.takePhotoDialogVisible = true;
  1171. this.$message({
  1172. message: '拍照成功',
  1173. type: 'success'
  1174. })
  1175. } else {
  1176. this.$message({
  1177. message: '拍照失败',
  1178. type: 'warning',
  1179. duration: 1500
  1180. })
  1181. }
  1182. })
  1183. .catch((err) => {
  1184. // console.log(err);
  1185. })
  1186. },
  1187. // 选中右侧菜单设备
  1188. selectEquip(device_id, jktype, index, isStop, num) {
  1189. this.jktype = jktype
  1190. this.activeIndex = index // 菜单选中状态
  1191. this.id = device_id // 保存选中的设备id
  1192. this.$axios({
  1193. url: '/api/api_gateway?method=camera.camera_manage.multi_addr_camera',
  1194. method: 'POST',
  1195. data: this.qs.stringify({ device_id: device_id })
  1196. }).then((res) => {
  1197. if (res.data.message == '') {
  1198. var data = res.data.data
  1199. console.log(data, 'data')
  1200. let rtmpHdSrc = data.rtmp
  1201. if (this.playType == 1) {
  1202. // 插件
  1203. this.html = `<div id="player" autoplay muted poster='' controls playsInline webkit-playsinline src="${rtmpHdSrc}" style="width:100%; height:100%;"></div>`
  1204. setTimeout(() => {
  1205. this.myVideo['xPlayer'] = new EZUIKit.EZUIKitPlayer({
  1206. id: 'player',
  1207. url: rtmpHdSrc
  1208. })
  1209. // this.myVideo['xPlayer'].play();
  1210. }, 1000)
  1211. } else if (this.playType == 0) {
  1212. // 固定走非插件
  1213. if (data.type_id == -1) {
  1214. // 分屏的时候不销毁
  1215. if (isStop != true) {
  1216. if (this.myVideo[`myPlayer${this.selected}`] && this.newVideo) {
  1217. if ('dispose' in this.myVideo[`myPlayer${this.selected}`]) {
  1218. this.myVideo[`myPlayer${this.selected}`].dispose()
  1219. }
  1220. if ('stop' in this.myVideo[`myPlayer${this.selected}`]) {
  1221. this.myVideo[`myPlayer${this.selected}`].stop()
  1222. }
  1223. }
  1224. }
  1225. this.myVideo[`myPlayer${this.selected}`] = null
  1226. document.getElementById('my-video' + this.selected).innerHTML = ''
  1227. let playHtml = `<video id="myPlayer${this.selected}" muted autoplay poster='' controls playsInline webkit-playsinline src="${hlsHdSrc}" style="width:100%; height:100%;"></video>`
  1228. document.getElementById('my-video' + this.selected).innerHTML = playHtml
  1229. // 非插件
  1230. this.$nextTick(() => {
  1231. console.log(rtmpHdSrc, '---rtmpHdSrc')
  1232. this.myVideo[`myPlayer${this.selected}`] = videojs(
  1233. `myPlayer${this.selected}`,
  1234. {
  1235. controls: false,
  1236. autoplay: false,
  1237. sources: [
  1238. {
  1239. type: 'application/x-mpegURL',
  1240. src: rtmpHdSrc
  1241. }
  1242. ]
  1243. },
  1244. () => {
  1245. this.myVideo[`myPlayer${this.selected}`].play()
  1246. this.VideoList.push(this.myVideo[`myPlayer${this.selected}`])
  1247. }
  1248. )
  1249. })
  1250. } else {
  1251. if (isStop != true) {
  1252. if (this.myVideo[`myPlayer${this.selected}`] && this.newVideo) {
  1253. if ('dispose' in this.myVideo[`myPlayer${this.selected}`]) {
  1254. this.myVideo[`myPlayer${this.selected}`].dispose()
  1255. }
  1256. if ('stop' in this.myVideo[`myPlayer${this.selected}`]) {
  1257. this.myVideo[`myPlayer${this.selected}`].stop()
  1258. }
  1259. }
  1260. }
  1261. let playHtml = `<div id="myPlayer${this.selected}" muted autoplay poster='' controls playsInline webkit-playsinline src="${rtmpHdSrc}" style="width:100%; height:100%;"></div>`
  1262. document.getElementById('my-video' + this.selected).innerHTML = playHtml
  1263. // 非插件
  1264. // this.$nextTick(() => {
  1265. // console.log(data, '走到播放了')
  1266. // this.myVideo[`myPlayer${this.selected}`] = new EZUIKit.EZUIKitPlayer({
  1267. // id: `myPlayer${this.selected}`,
  1268. // url: data.rtmp,
  1269. // accessToken: this.accessToken,
  1270. // handleError: (err) => {
  1271. // console.log('监控播放失败了!!!', err)
  1272. // this.myVideo[`myPlayer${this.selected}`].play()
  1273. // }
  1274. // })
  1275. // this.VideoList.push(this.myVideo[`myPlayer${this.selected}`])
  1276. // })
  1277. this.$nextTick(() => {
  1278. const container = this.$refs.videoContainerRef
  1279. console.log('视频宽度,高度::', container.clientWidth, container.clientHeight)
  1280. this.myVideo[`myPlayer${this.selected}`] = new HlsPlayer({
  1281. id: `myPlayer${this.selected}`, // 目标 dom 容器节点的 id
  1282. url: data.rtmp, // hls 取流地址
  1283. staticPath: '/static/hls/', // decoder静态资源文件夹 默认根目录
  1284. width: container.clientWidth, // 播放器宽度
  1285. height: container.clientHeight
  1286. })
  1287. })
  1288. // this.$nextTick(() => {
  1289. // console.log(rtmpHdSrc, '---rtmpHdSrc')
  1290. // this.myVideo[`myPlayer${this.selected}`] = videojs(
  1291. // `myPlayer${this.selected}`,
  1292. // {
  1293. // controls: false,
  1294. // autoplay: false,
  1295. // sources: [
  1296. // {
  1297. // type: 'application/x-mpegURL',
  1298. // src: rtmpHdSrc
  1299. // }
  1300. // ]
  1301. // },
  1302. // () => {
  1303. // this.myVideo[`myPlayer${this.selected}`].play()
  1304. // this.VideoList.push(this.myVideo[`myPlayer${this.selected}`])
  1305. // }
  1306. // )
  1307. // })
  1308. }
  1309. }
  1310. this.newVideo = true
  1311. this.guanbilong()
  1312. } else {
  1313. this.$message.error(res.data.message)
  1314. }
  1315. })
  1316. },
  1317. // 点击分屏
  1318. splitView(num) {
  1319. for (let item in this.myVideo) {
  1320. if ('stop' in this.myVideo[item]) {
  1321. this.myVideo[item].stop()
  1322. } else if ('dispose' in this.myVideo[item]) {
  1323. this.myVideo[item].dispose()
  1324. }
  1325. }
  1326. this.divNum = num
  1327. this.selected = 1
  1328. this.selectEquip(this.id, this.jktype, this.activeIndex, true, num)
  1329. },
  1330. // 点击视频
  1331. selectVideo(i) {
  1332. // console.log(i);
  1333. this.selected = i
  1334. },
  1335. // 播放模式切换,插件/视频直播
  1336. checkPlayType(i) {
  1337. this.playType = i
  1338. for (let item in this.myVideo) {
  1339. this.myVideo[item].stop()
  1340. }
  1341. // console.log(this.myVideo);
  1342. this.selectEquip(this.id, this.jktype, this.activeIndex)
  1343. },
  1344. // 复制拍照地址
  1345. copyPicUrl() {
  1346. document.getElementById('picUrl').select()
  1347. this.$message({
  1348. showClose: true,
  1349. message: '手动复制,在浏览器打开,另存为'
  1350. })
  1351. },
  1352. // 添加设备
  1353. addConfirm() {
  1354. this.$refs.addDeviceRef.validate((valid) => {
  1355. if (!valid) {
  1356. return false
  1357. }
  1358. this.$axios({
  1359. method: 'POST',
  1360. url: '/api/api_gateway?method=camera.camera_manage.multi_add_camera',
  1361. data: this.qs.stringify({
  1362. device_id: this.addDevice.equipmentID,
  1363. camera_channel: this.addDevice.equipmentNumber,
  1364. camera_playback: this.addDevice.playback == true ? 1 : 0,
  1365. account_id: this.addDevice.FluoriteClouduserID,
  1366. sale_uid: this.addDevice.sale_uid,
  1367. task_num: this.addDevice.task_num,
  1368. iccid: this.addDevice.iccid
  1369. // gb: this.addDevice.gb
  1370. })
  1371. }).then((res) => {
  1372. if (res.data.message == '') {
  1373. // console.log(456);
  1374. this.$message({
  1375. message: '添加成功',
  1376. type: 'success',
  1377. duration: 1500
  1378. })
  1379. this.$refs.addDeviceRef.resetFields()
  1380. // this.equipmentID = '';
  1381. // this.equipmentNumber = '';
  1382. // this.playback = false;
  1383. this.addEquipment = false
  1384. this.getJkList()
  1385. } else {
  1386. this.$message({
  1387. message: res.data.message,
  1388. type: 'warning',
  1389. duration: 1500
  1390. })
  1391. }
  1392. })
  1393. })
  1394. // console.log(this.equipmentNumber);
  1395. // if (this.equipmentID == '') {
  1396. // this.$message({
  1397. // message: '设备ID不能为空',
  1398. // type: 'warning',
  1399. // duration: 1500,
  1400. // });
  1401. // } else if (this.equipmentNumber == '') {
  1402. // this.$message({
  1403. // message: '通道号不能为空',
  1404. // type: 'warning',
  1405. // duration: 1500,
  1406. // });
  1407. // } else if (this.FluoriteClouduserID == '') {
  1408. // this.$message({
  1409. // message: '萤石云账号ID不能为空',
  1410. // type: 'warning',
  1411. // duration: 1500,
  1412. // });
  1413. // } else if (this.equipmentID !== '' && this.equipmentNumber !== '') {
  1414. // this.$axios({
  1415. // method: 'POST',
  1416. // url: '/api/api_gateway?method=camera.camera_manage.add_camera',
  1417. // data: this.qs.stringify({
  1418. // device_id: this.equipmentID,
  1419. // camera_channel: this.equipmentNumber,
  1420. // camera_playback: this.playback == true ? 1 : 0,
  1421. // account_id: this.FluoriteClouduserID,
  1422. // }),
  1423. // }).then((res) => {
  1424. // if (res.data.message == '') {
  1425. // // console.log(456);
  1426. // this.$message({
  1427. // message: '添加成功',
  1428. // type: 'success',
  1429. // duration: 1500,
  1430. // });
  1431. // this.equipmentID = '';
  1432. // this.equipmentNumber = '';
  1433. // this.playback = false;
  1434. // this.addEquipment = false;
  1435. // this.getJkList();
  1436. // }
  1437. // });
  1438. // }
  1439. },
  1440. // addEquip() {
  1441. // this.$prompt("添加设备id", "提示", {
  1442. // confirmButtonText: "确定",
  1443. // cancelButtonText: "取消",
  1444. // })
  1445. // .then(({ value }) => {
  1446. // this.$axios({
  1447. // method: "POST",
  1448. // url: "/api/api_gateway?method=camera.camera_manage.add_camera",
  1449. // data: this.qs.stringify({ device_id: value }),
  1450. // }).then((res) => {
  1451. // if (res.data.message == "") {
  1452. // //console.log(456);
  1453. // this.getJkList();
  1454. // }
  1455. // });
  1456. // })
  1457. // .catch(() => {
  1458. // this.$message({
  1459. // type: "info",
  1460. // message: "取消添加",
  1461. // });
  1462. // });
  1463. // },
  1464. addEquip() {
  1465. this.addEquipment = true
  1466. this.salesmanID = this.$store.state.saleUserList
  1467. this.addDevice = {
  1468. FluoriteClouduserID: '', // 萤石云账号ID
  1469. equipmentID: '', // 设备ID
  1470. equipmentNumber: '', // 设备通道
  1471. sale_uid: '', // 业务员ID
  1472. task_num: '', // 任务ID
  1473. playback: false, // 是否添加回放功能
  1474. iccid: '' // sim卡
  1475. }
  1476. // console.log(this.$store.state.saleUserList);
  1477. },
  1478. handleClose() {
  1479. this.addEquipment = false
  1480. },
  1481. // 确定添加
  1482. addConfirmSIM() {
  1483. // console.log(this.bangDsimId);
  1484. // console.log(this.bangDsimoptions);
  1485. // if (this.bangDsimId == null) {
  1486. // this.$message({
  1487. // message: '设备ID不能为空',
  1488. // type: 'warning',
  1489. // duration: 1500,
  1490. // });
  1491. // } else
  1492. if (this.equipmentValue == '') {
  1493. this.$message({
  1494. message: 'iccid不能为空',
  1495. type: 'warning',
  1496. duration: 1500
  1497. })
  1498. } else if (this.equipmentValue !== '') {
  1499. this.$axios({
  1500. method: 'POST',
  1501. url: '/api/api_gateway?method=camera.camera_manage.add_camera_sim',
  1502. data: this.qs.stringify({
  1503. device_id: this.id, // 设备id
  1504. iccid: this.equipmentValue
  1505. })
  1506. })
  1507. .then((res) => {
  1508. // console.log(res);
  1509. if (res.data.data == true) {
  1510. this.$message({
  1511. type: 'success',
  1512. message: 'sim卡绑定成功',
  1513. duration: 1500
  1514. })
  1515. this.bangDsimId = ''
  1516. this.equipmentValue = ''
  1517. this.playback = false
  1518. this.addEquipmentA = false
  1519. } else {
  1520. this.$message({
  1521. type: 'error',
  1522. message: res.data.message,
  1523. duration: 1500
  1524. })
  1525. }
  1526. })
  1527. .catch((err) => {
  1528. // console.log(err);
  1529. this.$message({
  1530. type: 'error',
  1531. message: 'sim卡绑定失败',
  1532. duration: 1500
  1533. })
  1534. })
  1535. }
  1536. // console.log(this.equipmentID + '设备ID');
  1537. // console.log(this.equipmentValue + '设备通道');
  1538. // console.log(this.playback + '是否支持回放功能');
  1539. },
  1540. // 取消添加
  1541. addCancel() {
  1542. this.equipmentID = ''
  1543. this.equipmentValue = ''
  1544. this.playback = false
  1545. this.$message({
  1546. type: 'info',
  1547. message: '取消添加'
  1548. })
  1549. this.input3 = ''
  1550. },
  1551. // 测试添加设备
  1552. // 回放
  1553. playBackSubmit() {
  1554. this.$refs.backFormRef.validate((valid) => {
  1555. if (!valid) {
  1556. return false
  1557. }
  1558. let start = new Date(this.backForm.time[0])
  1559. let end = new Date(this.backForm.time[1])
  1560. let beginVal = ''
  1561. let endVal = ''
  1562. function checked(num) {
  1563. if (num < 10) {
  1564. num = '0' + num
  1565. }
  1566. return num
  1567. }
  1568. beginVal =
  1569. beginVal +
  1570. start.getFullYear() +
  1571. checked(start.getMonth() + 1) +
  1572. checked(start.getDate()) +
  1573. checked(start.getHours()) +
  1574. checked(start.getMinutes()) +
  1575. checked(start.getSeconds())
  1576. endVal =
  1577. endVal +
  1578. end.getFullYear() +
  1579. checked(end.getMonth() + 1) +
  1580. checked(end.getDate()) +
  1581. checked(end.getHours()) +
  1582. checked(end.getMinutes()) +
  1583. checked(end.getSeconds())
  1584. if (!document.getElementById('playWind')) {
  1585. document.getElementById('videoBack').innerHTML = '<div id="playWind"></div>'
  1586. }
  1587. let url = `ezopen://open.ys7.com/${this.id}/${this.backForm.aisle}.local.rec?begin=${beginVal}&end=${endVal}`
  1588. this.playback = new EZUIKit.EZUIKitPlayer({
  1589. id: 'playWind',
  1590. autoplay: true,
  1591. url: url,
  1592. accessToken: this.accessToken,
  1593. decoderPath: 'static/js/',
  1594. width: 560,
  1595. height: 460
  1596. })
  1597. })
  1598. },
  1599. palyBackClose() {
  1600. this.$refs.backFormRef.resetFields()
  1601. this.playback.stop()
  1602. document.getElementById('videoBack').innerHTML = ''
  1603. },
  1604. // 搜索
  1605. loadAll() {
  1606. var list = this.Idlist
  1607. var arr = []
  1608. for (var i = 0; i < list.length; i++) {
  1609. var obj = {}
  1610. obj['value'] = list[i].device_id
  1611. obj['name'] = list[i].device_name == '' ? '暂无设备名称' : list[i].device_name
  1612. arr.push(obj)
  1613. }
  1614. return arr
  1615. },
  1616. querySearchAsync(queryString, cb) {
  1617. var restaurants = this.restaurants
  1618. var results = queryString
  1619. ? restaurants.filter(this.createStateFilter(queryString))
  1620. : restaurants
  1621. clearTimeout(this.timeout)
  1622. this.timeout = setTimeout(() => {
  1623. cb(results)
  1624. }, 3000 * Math.random())
  1625. },
  1626. createStateFilter(queryString) {
  1627. return (state) => {
  1628. return state.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
  1629. }
  1630. },
  1631. // 搜索事件
  1632. handleSelect(item) {
  1633. this.idName = item.value
  1634. this.currPage = 1
  1635. this.getJkList()
  1636. },
  1637. axiosList() {
  1638. this.idName = this.state
  1639. this.currPage = 1
  1640. this.getJkList()
  1641. },
  1642. // 绑定SIM
  1643. bindingSIM() {
  1644. this.addEquipmentA = true
  1645. this.equipmentValue = this.Idlist[this.activeIndex].sim
  1646. },
  1647. // sim卡id查询
  1648. simsearch(query) {
  1649. this.equipmentIDlist = []
  1650. // console.log(query);
  1651. if (query != '') {
  1652. this.$axios({
  1653. method: 'POST',
  1654. url: '/api/api_gateway?method=camera.camera_manage.list_camera',
  1655. data: this.qs.stringify({
  1656. device_id: query,
  1657. device_type_id: 44
  1658. })
  1659. }).then((res) => {
  1660. // this.equipmentID = res.data.data.data
  1661. var list = res.data.data.data
  1662. // console.log(list);
  1663. // this.equipmentValue = list[0].sim
  1664. for (var i = 0; i < list.length; i++) {
  1665. var obj = {
  1666. label: list[i].device_id,
  1667. value: i
  1668. }
  1669. this.equipmentIDlist.push(obj)
  1670. }
  1671. })
  1672. }
  1673. },
  1674. simsearchB(simid) {
  1675. this.$axios({
  1676. method: 'POST',
  1677. url: '/api/api_gateway?method=camera.camera_manage.list_camera',
  1678. data: this.qs.stringify({
  1679. device_id: simid,
  1680. device_type_id: 44
  1681. })
  1682. }).then((res) => {
  1683. var list = res.data.data.data
  1684. // console.log(list[0].sim);
  1685. this.equipmentValue = list[0].sim
  1686. })
  1687. },
  1688. simidchangae(value) {
  1689. // 点击选择id
  1690. // console.log(value);
  1691. this.equipmentID = this.equipmentIDlist[value].label
  1692. this.simsearchB(this.equipmentIDlist[value].label)
  1693. },
  1694. simidchangaeB(value) {
  1695. // //console.log(this.equipmentOptions[value].label); //equipmentOptions
  1696. // console.log(value, this.equipmentOptions);
  1697. this.equipmentID = this.equipmentOptions[value].label
  1698. this.simsearchB(this.equipmentOptions[value].label)
  1699. },
  1700. // 查询SIM
  1701. inquireSIM() {
  1702. this.addEquipmentB = true
  1703. },
  1704. // 确定
  1705. addEquipmentBfirm() {
  1706. if (this.equipmentValue == '') {
  1707. this.$message({
  1708. type: 'info',
  1709. message: '请输入正确的iccid'
  1710. })
  1711. } else {
  1712. var postData = this.qs.stringify({
  1713. iccid: this.equipmentValue
  1714. })
  1715. this.simloading = true
  1716. this.$axios({
  1717. method: 'POST',
  1718. url: '/api/api_gateway?method=forecast.send_control.sim_query_new',
  1719. data: postData
  1720. })
  1721. .then((res) => {
  1722. this.simloading = false
  1723. // console.log(res.data);
  1724. if (!res.data.data.code) {
  1725. this.sim = res.data.data
  1726. this.simCodeVisible = true
  1727. } else {
  1728. this.$message({
  1729. type: 'info',
  1730. message: res.data.data.msg
  1731. })
  1732. }
  1733. // if (res.data.message == "") {
  1734. // let data = eval("(" + res.data.data.data + ")");
  1735. // // let cardInfo = data.data.card_list[0]
  1736. // let cardInfo = data.data;
  1737. // this.sim = cardInfo;
  1738. // }
  1739. })
  1740. .catch((err) => {
  1741. // console.log(err);
  1742. })
  1743. }
  1744. },
  1745. // 取消
  1746. addEquipmentBCancel() {},
  1747. // 添加设备-下一步
  1748. next(index) {
  1749. if (index == 1) {
  1750. this.FluoriteClouduserUserID() // 请求获取萤石云账号ID接口
  1751. }
  1752. this.stepIndex = index
  1753. },
  1754. // 萤石云账号添加
  1755. FluoriteClouduserAdd() {
  1756. if (this.FluoriteClouduser == '') {
  1757. this.$message({
  1758. message: '账号不能为空,请填写!',
  1759. type: 'warning',
  1760. duration: 1500
  1761. })
  1762. } else if (this.salesman == '') {
  1763. this.$message({
  1764. message: '业务员不能为空,请填写!',
  1765. type: 'warning',
  1766. duration: 1500
  1767. })
  1768. } else if (this.secretKey == '') {
  1769. this.$message({
  1770. message: 'appkey不能为空,请填写!',
  1771. type: 'warning',
  1772. duration: 1500
  1773. })
  1774. } else if (this.furtiveData == '') {
  1775. this.$message({
  1776. message: 'appSecret不能为空,请填写!',
  1777. type: 'warning',
  1778. duration: 1500
  1779. })
  1780. } else {
  1781. var postData = this.qs.stringify({
  1782. account: this.FluoriteClouduser, // 萤石云账号
  1783. salesman: this.salesman, // 萤石云账号所相关的业务员名称
  1784. // app_token: this.tokenData, // 萤石云账号 token
  1785. app_key: this.secretKey, // 萤石云账号 appkey
  1786. app_secret: this.furtiveData, // 萤石云账号 appSecret
  1787. account_type: this.radio
  1788. })
  1789. this.$axios({
  1790. method: 'POST',
  1791. url: '/api/api_gateway?method=camera.camera_manage.multi_add_camera_account',
  1792. data: postData
  1793. })
  1794. .then((res) => {
  1795. // console.log(res);
  1796. if (res.data.data == true) {
  1797. this.$message({
  1798. message: '添加萤石云账号成功!',
  1799. type: 'success',
  1800. duration: 1500
  1801. })
  1802. this.addEquipment = false
  1803. } else {
  1804. this.$message({
  1805. message: '添加萤石云账号失败',
  1806. type: 'warning',
  1807. duration: 1500
  1808. })
  1809. }
  1810. })
  1811. .catch((err) => {
  1812. // console.log(err);
  1813. this.$message({
  1814. message: '添加萤石云账号失败',
  1815. type: 'warning',
  1816. duration: 1500
  1817. })
  1818. })
  1819. }
  1820. },
  1821. // 萤石云账号ID接口
  1822. FluoriteClouduserUserID() {
  1823. var postData = this.qs.stringify({
  1824. account: '', // 按萤石云账号名字搜索
  1825. salesman: '' // 按业务员名称搜索
  1826. })
  1827. this.$axios({
  1828. method: 'POST',
  1829. url: '/api/api_gateway?method=camera.camera_manage.see_camera_account',
  1830. data: postData
  1831. })
  1832. .then((res) => {
  1833. // console.log(res.data.data);
  1834. if (res.data.data.length !== 0) {
  1835. var data = res.data.data
  1836. var arr = []
  1837. for (var i = 0; i < data.length; i++) {
  1838. var obj = {}
  1839. obj['value'] = data[i].id
  1840. obj['label'] = data[i].account
  1841. arr.push(obj)
  1842. }
  1843. this.userNameID = arr
  1844. }
  1845. })
  1846. .catch((err) => {
  1847. // console.log(err);
  1848. })
  1849. },
  1850. remoteMethod(e) {
  1851. // sim卡绑定 设备id查询
  1852. this.$axios({
  1853. url: '/api/api_gateway?method=camera.camera_manage.list_camera',
  1854. method: 'POST',
  1855. data: this.qs.stringify({ device_id: e, device_type_id: 44 })
  1856. }).then((res) => {
  1857. // console.log(res.data.data.data);
  1858. this.bangDsimoptions = []
  1859. var datas = res.data.data.data
  1860. for (var i = 0; i < datas.length; i++) {
  1861. this.bangDsimoptions.push({
  1862. value: i,
  1863. label: datas[i].device_id,
  1864. iccid: datas[i].sim
  1865. })
  1866. }
  1867. })
  1868. },
  1869. bangDsimIdselect(e) {
  1870. // SIM卡绑定 设备id切换
  1871. this.equipmentValue = this.bangDsimoptions[e].iccid
  1872. if (this.bangDsimoptions[e].iccid == '') {
  1873. this.$message({
  1874. message: '该设备尚未绑定sim卡!',
  1875. type: 'warning'
  1876. })
  1877. }
  1878. },
  1879. guanbilong() {
  1880. this.longtimetf = false
  1881. if (this.monthitortime) {
  1882. clearTimeout(this.monthitortime)
  1883. }
  1884. this.monthitortime = setTimeout(() => {
  1885. this.longtimetf = true
  1886. }, 1800000)
  1887. },
  1888. toplay() {
  1889. let { device_id: id, type_id: type, token, gb: gbId } = this.Idlist[this.activeIndex]
  1890. // 新国标协议兼容,25.7.24
  1891. if (gbId) {
  1892. id = gbId + '-1'
  1893. }
  1894. this.$router.push(
  1895. `/index/${type == 0 ? 'playbackDgp' : 'playbackDgp'}?id=${id}&accessKey=${token}`
  1896. )
  1897. }
  1898. },
  1899. watch: {
  1900. // 添加设备弹框
  1901. addEquipment(val) {
  1902. if (val == false) {
  1903. // 第二步
  1904. this.equipmentID = '' // 设备ID
  1905. this.equipmentValue = '' // iccid
  1906. this.playback = false // 回放
  1907. this.equipmentNumber = '' // 通道号
  1908. this.FluoriteClouduserID = '' // 萤石云账号ID
  1909. // 第一步
  1910. this.FluoriteClouduser = '' // 萤石云账号
  1911. this.salesman = '' // 萤石云账号所相关的业务员名称
  1912. this.tokenData = '' // token
  1913. this.secretKey = '' // appKey
  1914. this.furtiveData = '' // appSecret
  1915. this.stepIndex = 0 // 步骤下标
  1916. }
  1917. }
  1918. }
  1919. }
  1920. </script>
  1921. <style lang="less" scoped>
  1922. .facility_boxTwo {
  1923. margin-top: 15px;
  1924. width: 405px;
  1925. }
  1926. .monitor-container {
  1927. position: relative;
  1928. display: flex;
  1929. flex-direction: column;
  1930. height: 100%;
  1931. position: relative;
  1932. /deep/.el-breadcrumb {
  1933. margin-bottom: 12px;
  1934. }
  1935. .el-select {
  1936. width: 100%;
  1937. }
  1938. .monitor_hint {
  1939. position: fixed;
  1940. top: 105px;
  1941. left: 200px;
  1942. height: 30px;
  1943. line-height: 30px;
  1944. color: #eb6767;
  1945. width: 89%;
  1946. background-color: #fff;
  1947. padding: 0 20px;
  1948. display: flex;
  1949. box-sizing: border-box;
  1950. justify-content: space-between;
  1951. z-index: 1999999;
  1952. .monitor_hint_text {
  1953. height: 25px;
  1954. display: flex;
  1955. img {
  1956. width: 20px;
  1957. height: 20px;
  1958. margin-right: 10px;
  1959. margin-top: 5px;
  1960. }
  1961. }
  1962. .el-icon-close {
  1963. line-height: 30px;
  1964. }
  1965. }
  1966. .monitor-wrap {
  1967. display: flex;
  1968. justify-content: space-between;
  1969. // background: #323a47;
  1970. flex: 1;
  1971. .video-box {
  1972. position: relative;
  1973. flex: 1;
  1974. padding-right: 10px;
  1975. .video-container {
  1976. width: 100%;
  1977. height: calc(100% - 16px);
  1978. background: rgb(97, 93, 93);
  1979. & > div {
  1980. display: flex;
  1981. flex-wrap: wrap;
  1982. .videoItem {
  1983. border: 1px solid #000;
  1984. box-sizing: border-box;
  1985. }
  1986. .videoItem:hover {
  1987. border-color: aquamarine;
  1988. }
  1989. .selected {
  1990. border: 1px solid aquamarine;
  1991. }
  1992. .a1 {
  1993. width: 100%;
  1994. height: 100%;
  1995. }
  1996. .a4 {
  1997. width: 50%;
  1998. height: 50%;
  1999. }
  2000. .a9 {
  2001. width: 33.3%;
  2002. height: 33.3%;
  2003. }
  2004. }
  2005. }
  2006. .split-screen {
  2007. display: flex;
  2008. justify-content: space-between;
  2009. padding: 15px 24px;
  2010. align-items: center;
  2011. width: calc(100% - 12px);
  2012. background: rgba(0, 0, 0, 0.5);
  2013. position: absolute;
  2014. bottom: 17px;
  2015. left: 1px;
  2016. box-sizing: border-box;
  2017. .sp {
  2018. width: 17px;
  2019. height: 17px;
  2020. display: inline-block;
  2021. margin-right: 10px;
  2022. cursor: pointer;
  2023. }
  2024. .sp01 {
  2025. background: url(../../../assets/images/forecasting/monitor/sp1.png);
  2026. }
  2027. .sp02 {
  2028. background: url(../../../assets/images/forecasting/monitor/sp2.png);
  2029. }
  2030. .sp03 {
  2031. background: url(../../../assets/images/forecasting/monitor/sp3.png);
  2032. }
  2033. .sp01:hover {
  2034. background: url(../../../assets/images/forecasting/monitor/sp1-active.png);
  2035. }
  2036. .sp02:hover {
  2037. background: url(../../../assets/images/forecasting/monitor/sp2-active.png);
  2038. }
  2039. .sp03:hover {
  2040. background: url(../../../assets/images/forecasting/monitor/sp3-active.png);
  2041. }
  2042. }
  2043. }
  2044. .nav-box {
  2045. .view-box {
  2046. width: 364px;
  2047. background: #fff;
  2048. color: #333;
  2049. font-size: 14px;
  2050. padding: 16px;
  2051. box-sizing: border-box;
  2052. border-radius: 4px;
  2053. height: 550px;
  2054. // height: calc(100% - 16px);
  2055. }
  2056. .view-box:last-child {
  2057. margin-top: 16px;
  2058. height: calc(100% - 583px);
  2059. overflow-y: hidden;
  2060. padding: 10px 26px 26px 26px;
  2061. }
  2062. .search {
  2063. padding: 8px;
  2064. border-radius: 4px;
  2065. margin-bottom: 8px;
  2066. background: #f5f7fa;
  2067. }
  2068. .viewLists {
  2069. // height: 50%;
  2070. height: calc(100% - 94px);
  2071. overflow: auto;
  2072. padding: 0;
  2073. li {
  2074. display: flex;
  2075. align-items: center;
  2076. padding: 0 15px;
  2077. cursor: pointer;
  2078. overflow: hidden;
  2079. height: 53px;
  2080. background: #f5f7fa;
  2081. border-radius: 4px;
  2082. margin-bottom: 8px;
  2083. .titleBox {
  2084. display: inline-block;
  2085. text-overflow: ellipsis;
  2086. overflow: hidden;
  2087. white-space: nowrap;
  2088. max-width: 210px;
  2089. // height: 30px;
  2090. // line-height: 30px;
  2091. .device-id {
  2092. color: #999;
  2093. font-size: 12px;
  2094. margin-left: 8px;
  2095. }
  2096. }
  2097. .viewPhoto {
  2098. color: #eba219;
  2099. float: right;
  2100. font-size: 18px;
  2101. cursor: pointer;
  2102. margin: 0 0 0 10px;
  2103. }
  2104. // .viewPhoto:hover {
  2105. // text-decoration: underline;
  2106. // }
  2107. .more {
  2108. margin-left: auto;
  2109. display: none;
  2110. }
  2111. .status {
  2112. font-size: 12px;
  2113. border-radius: 4px;
  2114. padding: 2px 8px;
  2115. margin-right: 16px;
  2116. }
  2117. .onLine {
  2118. color: rgba(20, 164, 120, 1);
  2119. background: rgba(20, 164, 120, 0.1);
  2120. }
  2121. .outLine {
  2122. color: rgba(255, 89, 81, 1);
  2123. background: rgba(255, 89, 81, 0.15);
  2124. }
  2125. }
  2126. li.active {
  2127. background: linear-gradient(90deg, rgba(20, 164, 120, 0.08) 64%, #f5f7fa);
  2128. .more {
  2129. display: block;
  2130. }
  2131. }
  2132. li:hover {
  2133. background: linear-gradient(90deg, rgba(20, 164, 120, 0.08) 64%, #f5f7fa);
  2134. }
  2135. li:last-child {
  2136. margin-bottom: 0;
  2137. }
  2138. }
  2139. .splitPage {
  2140. height: 3%;
  2141. margin-top: 2%;
  2142. text-align: center;
  2143. color: #15bb88;
  2144. -webkit-user-select: none;
  2145. -moz-user-select: none;
  2146. -ms-user-select: none;
  2147. .arrow {
  2148. font-size: 20px;
  2149. cursor: pointer;
  2150. }
  2151. }
  2152. .camera-control {
  2153. display: flex;
  2154. justify-content: space-between;
  2155. align-items: center;
  2156. .zoom-in,
  2157. .zoom-out {
  2158. display: inline-block;
  2159. width: 40px;
  2160. height: 40px;
  2161. line-height: 40px;
  2162. cursor: pointer;
  2163. background: #f5f7fa;
  2164. box-shadow: 6px 8px 14px 0 #00000014;
  2165. border-radius: 4px;
  2166. text-align: center;
  2167. font-size: 22px;
  2168. color: #666;
  2169. font-weight: 600;
  2170. }
  2171. }
  2172. .control-ring {
  2173. position: relative;
  2174. width: 180px;
  2175. height: 180px;
  2176. .div-opt {
  2177. position: absolute;
  2178. width: 42px;
  2179. height: 42px;
  2180. line-height: 42px;
  2181. cursor: pointer;
  2182. font-size: 24px;
  2183. text-align: center;
  2184. z-index: 100;
  2185. color: #666;
  2186. font-weight: 600;
  2187. }
  2188. .upCtr {
  2189. top: 0px;
  2190. left: 50%;
  2191. margin-left: -21px;
  2192. }
  2193. .downCtr {
  2194. bottom: 0px;
  2195. left: 50%;
  2196. margin-left: -21px;
  2197. }
  2198. .leftCtr {
  2199. top: 50%;
  2200. left: 0px;
  2201. margin-top: -21px;
  2202. }
  2203. .rightCtr {
  2204. top: 50%;
  2205. right: 0px;
  2206. margin-top: -21px;
  2207. }
  2208. }
  2209. .outer-ring {
  2210. position: absolute;
  2211. width: 100%;
  2212. height: 100%;
  2213. border-radius: 50%;
  2214. background: linear-gradient(132deg, #e7edf0 15.24%, #f9fbfc 85.9%);
  2215. box-shadow: -9px -5px 18.6px 0 rgba(255, 255, 255, 0.97),
  2216. 13px 19px 34.5px -18px rgba(0, 0, 0, 0.15);
  2217. }
  2218. .quarter-sector {
  2219. position: absolute;
  2220. width: 100%;
  2221. height: 100%;
  2222. border-radius: 50%;
  2223. }
  2224. .inner-circle {
  2225. position: absolute;
  2226. width: 96px;
  2227. height: 96px;
  2228. background: white;
  2229. border-radius: 50%;
  2230. top: 50%;
  2231. left: 50%;
  2232. transform: translate(-50%, -50%);
  2233. box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06), inset 0 0 10px rgba(0, 0, 0, 0.03);
  2234. display: flex;
  2235. justify-content: center;
  2236. align-items: center;
  2237. }
  2238. .camera-icon {
  2239. font-size: 33px;
  2240. color: #666;
  2241. }
  2242. // .upCtr:hover ~ .outer-ring .quarter-sector {
  2243. // background: conic-gradient(
  2244. // from 0deg at center,
  2245. // #cfdce6 0deg,
  2246. // #dfe4e8 90deg,
  2247. // transparent 0% 100%
  2248. // );
  2249. // transform: rotate(-45deg);
  2250. // }
  2251. // .downCtr:hover ~ .outer-ring .quarter-sector {
  2252. // background: conic-gradient(
  2253. // from 0deg at center,
  2254. // #cfdce6 0deg,
  2255. // #dfe4e8 90deg,
  2256. // transparent 0% 100%
  2257. // );
  2258. // transform: rotate(135deg);
  2259. // }
  2260. // .leftCtr:hover ~ .outer-ring .quarter-sector {
  2261. // background: conic-gradient(
  2262. // from 0deg at center,
  2263. // #cfdce6 0deg,
  2264. // #dfe4e8 90deg,
  2265. // transparent 0% 100%
  2266. // );
  2267. // transform: rotate(-135deg);
  2268. // }
  2269. // .rightCtr:hover ~ .outer-ring .quarter-sector {
  2270. // background: conic-gradient(
  2271. // from 0deg at center,
  2272. // #cfdce6 0deg,
  2273. // #dfe4e8 90deg,
  2274. // transparent 0% 100%
  2275. // );
  2276. // transform: rotate(45deg);
  2277. // }
  2278. .opt-active-up {
  2279. background: conic-gradient(
  2280. from 0deg at center,
  2281. #cfdce6 0deg,
  2282. #dfe4e8 90deg,
  2283. transparent 0% 100%
  2284. );
  2285. transform: rotate(-45deg);
  2286. }
  2287. .opt-active-down {
  2288. background: conic-gradient(
  2289. from 0deg at center,
  2290. #cfdce6 0deg,
  2291. #dfe4e8 90deg,
  2292. transparent 0% 100%
  2293. );
  2294. transform: rotate(135deg);
  2295. }
  2296. .opt-active-left {
  2297. background: conic-gradient(
  2298. from 0deg at center,
  2299. #cfdce6 0deg,
  2300. #dfe4e8 90deg,
  2301. transparent 0% 100%
  2302. );
  2303. transform: rotate(-135deg);
  2304. }
  2305. .opt-active-right {
  2306. background: conic-gradient(
  2307. from 0deg at center,
  2308. #cfdce6 0deg,
  2309. #dfe4e8 90deg,
  2310. transparent 0% 100%
  2311. );
  2312. transform: rotate(45deg);
  2313. }
  2314. .direc {
  2315. text-align: center;
  2316. width: 100%;
  2317. height: 100%;
  2318. // margin: 5% 0 5% 0;
  2319. position: relative;
  2320. background: url(../../../assets/images/forecasting/monitor/direction-btn.png) no-repeat
  2321. center;
  2322. background-size: contain;
  2323. & > div {
  2324. position: absolute;
  2325. width: 50px;
  2326. height: 50px;
  2327. cursor: pointer;
  2328. }
  2329. .upCtr {
  2330. top: 10px;
  2331. left: 50%;
  2332. margin-left: -25px;
  2333. }
  2334. .downCtr {
  2335. bottom: 10px;
  2336. left: 50%;
  2337. margin-left: -25px;
  2338. }
  2339. .leftCtr {
  2340. top: 50%;
  2341. left: 28px;
  2342. margin-top: -25px;
  2343. }
  2344. .rightCtr {
  2345. top: 50%;
  2346. right: 28px;
  2347. margin-top: -25px;
  2348. }
  2349. .cameraCtr {
  2350. top: 0;
  2351. bottom: 0;
  2352. left: 0;
  2353. right: 0;
  2354. margin: auto;
  2355. }
  2356. }
  2357. .btnBox {
  2358. margin-top: 16px;
  2359. display: flex;
  2360. justify-content: space-between;
  2361. gap: 16px;
  2362. .el-button {
  2363. width: 50%;
  2364. }
  2365. }
  2366. }
  2367. }
  2368. }
  2369. // SIM
  2370. .simCodeBox {
  2371. > div {
  2372. line-height: 40px;
  2373. display: flex;
  2374. align-content: center;
  2375. .simCodeTitle {
  2376. width: 100px;
  2377. text-align: right;
  2378. font-size: 14px;
  2379. color: #333;
  2380. }
  2381. > div {
  2382. flex: 1;
  2383. .el-progress {
  2384. margin-top: 17px;
  2385. }
  2386. }
  2387. span {
  2388. width: 85px;
  2389. font-size: 12px;
  2390. padding-left: 3px;
  2391. color: #909090;
  2392. }
  2393. .el-input {
  2394. width: 60%;
  2395. }
  2396. }
  2397. .operateBtn {
  2398. display: block;
  2399. text-align: right;
  2400. }
  2401. }
  2402. .siminput {
  2403. position: relative;
  2404. height: 36px;
  2405. .simgather {
  2406. position: absolute;
  2407. top: 36px;
  2408. width: 100%;
  2409. height: 50px;
  2410. background-color: #fff;
  2411. z-index: 9999;
  2412. }
  2413. }
  2414. .addClass {
  2415. // background: rgb(122, 121, 121);
  2416. background: #c1bfbf;
  2417. color: #fff;
  2418. }
  2419. .custom-ffffff .el-pagination {
  2420. text-align: right;
  2421. margin-top: 16px;
  2422. }
  2423. .basicsbox_text {
  2424. display: flex;
  2425. // margin-top: 30px;
  2426. position: absolute;
  2427. top: -4px;
  2428. // height: 44px;
  2429. padding: 15px 10px;
  2430. z-index: 1110;
  2431. right: 24px;
  2432. span {
  2433. margin-right: 25px;
  2434. font-size: 14px;
  2435. line-height: 1;
  2436. color: #909399;
  2437. }
  2438. }
  2439. </style>