main.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  1. <template>
  2. <div class="main-data data-engineering">
  3. <div class="left">
  4. <div class="left-cont" v-if="leftShow">
  5. <div class="left-top"
  6. @click="showDialog(1)"
  7. @mouseover="showDialog(1)">
  8. <div class="cont-title-area">
  9. <img
  10. class="cont-title-bg"
  11. src="@/assets/images/main/cont_title_bg.png"
  12. alt=""
  13. />
  14. <div class="cont-title">生产辅助基建项目情况</div>
  15. </div>
  16. <div class="components-item bg2">
  17. <unit-access :key="appOrg"></unit-access>
  18. </div>
  19. <!-- <monitoring v-if="menu === 1"></monitoring>
  20. <monitoring-video v-if="menu === 2"></monitoring-video> -->
  21. </div>
  22. <div class="left-top">
  23. <div class="cont-title-area">
  24. <img
  25. class="cont-title-bg"
  26. src="@/assets/images/main/cont_title_bg.png"
  27. alt=""
  28. />
  29. <div class="cont-title">现场监控接入情况</div>
  30. </div>
  31. <div class="components-item">
  32. <unit-access-to @chooseUnit="onChooseUnit" :key="appOrg"></unit-access-to>
  33. </div>
  34. <!-- <monitoring v-if="menu === 1"></monitoring>
  35. <monitoring-video v-if="menu === 2"></monitoring-video> -->
  36. </div>
  37. </div>
  38. </div>
  39. <div class="middle flex-column">
  40. <!-- <div class="menu-area flex-row align-items-center space-between">
  41. <div v-for="(item, index) in dataList" :key="index" class="rate-area">
  42. <img src="@/assets/images/main/rate_bg.png" class="icon" alt="" />
  43. <div class="rate">
  44. <div class="rate-data">
  45. <div class="data">{{ item.num }}</div>
  46. <div class="unit">{{ item.unit }}</div>
  47. </div>
  48. </div>
  49. <div class="desc">{{ item.name }}</div>
  50. </div>
  51. </div> -->
  52. <div
  53. v-if="showLocal"
  54. class="img-area flex-row align-items-center flex-center"
  55. >
  56. <img class="build" src="@/assets/images/build.png" alt="" />
  57. </div>
  58. <!-- 返回按钮 -->
  59. <div class="bottom-area flex-row align-items-center space-between">
  60. <div class="bottom-left flex-row align-items-center">
  61. <div class="left-item">
  62. <el-cascader
  63. v-model="curCompany"
  64. :options="company"
  65. @change="handleCompanyChange"
  66. placeholder="单位"
  67. :show-all-levels="false"
  68. >
  69. <template slot-scope="{ node, data }">
  70. <div style="display: flex; align-items: center">
  71. <img
  72. v-if="data.label == '山西省公司(本部)'"
  73. src="../../../assets/images/main/tiaozhuanlouyu.png"
  74. style="width: 15px; margin-right: 10px"
  75. />
  76. <span
  77. v-else-if="data.value == '1A001' || data.value == '1A002' || data.value == '1A004' || data.value == '1A005'"
  78. style="
  79. display: inline-block;
  80. width: 10px;
  81. height: 10px;
  82. border-radius: 50%;
  83. margin-right: 10px;
  84. background: rgb(255, 180, 74);
  85. "
  86. ></span>
  87. <span
  88. v-else-if="data.value.length == 5 && data.value != '10001'"
  89. style="
  90. display: inline-block;
  91. width: 10px;
  92. height: 10px;
  93. border-radius: 50%;
  94. margin-right: 10px;
  95. background: rgb(74, 194, 29);
  96. "
  97. ></span>
  98. <span
  99. v-else-if="data.value.length == 7"
  100. style="
  101. display: inline-block;
  102. width: 10px;
  103. height: 10px;
  104. border-radius: 50%;
  105. margin-right: 10px;
  106. background: rgb(99, 235, 255);
  107. "
  108. ></span>
  109. <span>{{ data.label }}</span>
  110. </div>
  111. <!-- <div
  112. v-if="data.level == 2"
  113. style="width: 1.5vh;height: 1.5vh;background-color: red;border-radius: 60%;margin-top:10px;margin-left:10px;float:right"
  114. ></div> -->
  115. </template>
  116. </el-cascader>
  117. </div>
  118. <div class="office" disabled>办公区</div>
  119. </div>
  120. <div class="bottom-right">
  121. <img
  122. v-if="showBack"
  123. @click="onBack"
  124. src="@/assets/images/main/back.png"
  125. class="back"
  126. />
  127. </div>
  128. </div>
  129. </div>
  130. <div class="right">
  131. <div class="right-cont">
  132. <div class="right-top">
  133. <div class="cont-title-area">
  134. <img
  135. class="cont-title-bg"
  136. src="@/assets/images/main/cont_title_bg.png"
  137. alt=""
  138. />
  139. <div class="cont-title">现场远程检查情况</div>
  140. </div>
  141. <div class="components-item">
  142. <current-area @chooseMonitor="onChooseMonitor" @choose="onChooseIssueList" :monitorName="monitorName" :key="appOrg"></current-area>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. <!-- 监控区域 -->
  148. <div v-if="showCenter" class="dialog-2">
  149. <div class="dialog-center">
  150. <monitor-live
  151. v-if="showType === 1"
  152. @closeMonitor="onCloseMonitor"
  153. @chooseAllMonitor="onChooseAllMonitor"
  154. :monitorInfo="this.monitorInfo"
  155. ></monitor-live>
  156. <monitor-live-list
  157. v-if="showType === 2"
  158. @closeMonitor="onCloseMonitor"
  159. @chooseMonitor="onChooseMonitor"
  160. :monitorInfo="this.monitorInfo"
  161. :monitorName="monitorName"
  162. ></monitor-live-list>
  163. </div>
  164. </div>
  165. <!-- 监控区域 -->
  166. <div v-if="showC" class="dialog-2">
  167. <div class="dialog-center">
  168. <unit-project-dia
  169. v-if="showProject === 1"
  170. @close="onCloseProject"
  171. @choose="onChooseProject"
  172. ></unit-project-dia>
  173. <project-camera-dia
  174. v-if="showCamera === 1"
  175. @close="onCloseCamera"
  176. @choose="onChooseCamera"
  177. ></project-camera-dia>
  178. <camera-screen
  179. v-if="showCameraScreen === 1"
  180. @leave="onCloseCameraScreen"
  181. @issue="onChooseIssue">
  182. </camera-screen>
  183. <issue-list-dia
  184. v-if="showIssue === 1"
  185. @close="onCloseIssue"
  186. @subIssue="onSubIssue"
  187. :monitorInfo="this.monitorInfo">
  188. </issue-list-dia>
  189. <issue-sub-dia
  190. v-if="showIssueSub === 1"
  191. @close="onCloseIssueSub"
  192. :monitorInfo="this.monitorInfo">
  193. </issue-sub-dia>
  194. </div>
  195. </div>
  196. <!-- 弹出层-->
  197. <div
  198. :class="dialogType < 3 ? 'dialog' : 'dialog-r'"
  199. v-if="dialogShow"
  200. @click="closeDialog"
  201. >
  202. <unit-access-dialog
  203. v-if="dialogType === 1"
  204. @choose="chooseRes"
  205. @chooseH="chooseHealth"
  206. @closeDialog="closeDialog"
  207. ></unit-access-dialog>
  208. </div>
  209. </div>
  210. </template>
  211. <script>
  212. import IssueSubDia from './issueSubDia.vue'
  213. import CameraScreen from './cameraScreen.vue'
  214. import IssueListDia from "./issueListDia.vue"
  215. import ProjectCameraDia from "./projectCameraDia.vue";
  216. import UnitProjectDia from "./unitProjectDia.vue";
  217. import Province from "../map/province.vue";
  218. import UnitAccess from "./unitAccess.vue";
  219. import UnitAccessTo from "./unitAccessto.vue";
  220. import CameraOnline from "./cameraOnline.vue";
  221. import CurrentArea from "./currentArea.vue";
  222. import Monitoring from "./monitoring.vue";
  223. import VideoList from "./videoList.vue";
  224. import MonitoringStatus from "./monitoringStatus.vue";
  225. import MonitoringVideo from "./monitoringVideo.vue";
  226. import MonitorLive from "./monitorLive.vue";
  227. import MonitorLiveList from "./monitorLiveList.vue";
  228. import company from "../data/company.json";
  229. import TerminalDataDialog from "@/views/screen/official/terminalDataDialog.vue";
  230. import CarWarningDialog from "@/views/screen/official/carWarningDialog.vue";
  231. import CarStockDialog from "@/views/screen/logistics/car/carStockDialog.vue";
  232. import unitAccessDialog from "@/views/screen/engineering/unitAccessDialog.vue";
  233. import CarCost from "@/views/screen/official/carCost.vue";
  234. import ResourceList from "@/views/screen/official/resourceList.vue";
  235. import CarHealth from "@/views/screen/official/carHealth.vue";
  236. export default {
  237. name: "EngineeringMain",
  238. components: {
  239. CarHealth, ResourceList, CarCost,
  240. CarStockDialog, CarWarningDialog, TerminalDataDialog,
  241. IssueSubDia,
  242. CameraScreen,
  243. IssueListDia,
  244. ProjectCameraDia,
  245. UnitProjectDia,
  246. Province,
  247. UnitAccess,
  248. UnitAccessTo,
  249. CameraOnline,
  250. CurrentArea,
  251. Monitoring,
  252. VideoList,
  253. MonitoringStatus,
  254. MonitoringVideo,
  255. MonitorLive,
  256. MonitorLiveList,
  257. unitAccessDialog,
  258. },
  259. props: {},
  260. data() {
  261. return {
  262. showRes:0,
  263. showC:false,
  264. showIssue:0,
  265. showIssueSub:0,
  266. showCameraScreen:0,
  267. showCamera:0,
  268. showProject:0,
  269. menu: 0,
  270. showCost:0,
  271. showHealth:0,
  272. leftShow: true,
  273. rightShow: true,
  274. dialogShow: false,
  275. dialogType: 0,
  276. showCenter: false,
  277. showType: 0, //实时监控
  278. curDeep: 1,
  279. showBack: false,
  280. showMap: true,
  281. showLocal: false,
  282. appOrg: "0000",
  283. dataList: [
  284. {
  285. name: "接入单位数量",
  286. num: "56",
  287. unit: "个",
  288. },
  289. {
  290. name: "应接入项目数量",
  291. num: "56",
  292. unit: "个",
  293. },
  294. {
  295. name: "已接入项目数量",
  296. num: "56",
  297. unit: "个",
  298. },
  299. {
  300. name: "接入摄像头数量",
  301. num: "56",
  302. unit: "个",
  303. },
  304. {
  305. name: "接入摄像头在线率",
  306. num: "56",
  307. unit: "%",
  308. },
  309. ],
  310. monitorInfo: {},
  311. monitorName: '',
  312. curCompany: [],
  313. company: company,
  314. };
  315. },
  316. created() {},
  317. destroyed() {},
  318. beforeDestroy() {},
  319. mounted() {},
  320. methods: {
  321. chooseRes(){
  322. this.closeDialog()
  323. this.showC = true
  324. this.showRes = 1
  325. },
  326. chooseHealth(){
  327. this.closeDialog()
  328. this.showC = true
  329. this.showHealth = 1
  330. },
  331. onChooseUnit(){
  332. this.showCenter = true;
  333. this.showType = 2;
  334. },
  335. onCloseRes(){
  336. this.showC = false
  337. this.showRes = 0
  338. },
  339. onCloseCost(){
  340. this.showC = false
  341. this.showCost = 0
  342. },
  343. onCloseHealth(){
  344. this.showC = false
  345. this.showHealth = 0
  346. },
  347. onChooseProject(){
  348. this.showCamera = 1;
  349. this.showProject = 0;
  350. },
  351. onCloseProject(){
  352. this.showC = false;
  353. this.showProject = 0;
  354. },
  355. onChooseCamera(){
  356. this.showCameraScreen = 1;
  357. this.showCamera = 0;
  358. },
  359. onCloseCamera(){
  360. this.showProject = 1;
  361. this.showCamera = 0;
  362. },
  363. onCloseCameraScreen(){
  364. this.showCameraScreen = 0;
  365. this.showCamera = 1;
  366. },
  367. //入口
  368. onChooseIssue(){
  369. this.flag = 1
  370. this.showCameraScreen = 0;
  371. this.showIssueSub = 1;
  372. },
  373. onChooseIssueList(){
  374. this.showC = true
  375. this.showIssue = 1
  376. },
  377. onCloseIssue(){
  378. this.showC = false
  379. this.showIssue = 0
  380. },
  381. //入口
  382. onSubIssue(){
  383. this.flag = 2
  384. this.showIssueSub = 1
  385. this.showIssue = 0
  386. },
  387. onCloseIssueSub(){
  388. this.showIssueSub = 0
  389. if (this.flag === 1){
  390. this.showCameraScreen = 1
  391. }
  392. else if (this.flag === 2){
  393. this.showIssue = 1
  394. }
  395. else {
  396. }
  397. this.flag = 0
  398. },
  399. showDialog(type) {
  400. if (type < 4) {
  401. this.leftShow = false;
  402. this.rightShow = true;
  403. } else {
  404. this.rightShow = false;
  405. this.leftShow = true;
  406. }
  407. this.dialogShow = true;
  408. this.dialogType = type;
  409. },
  410. closeDialog() {
  411. this.leftShow = true;
  412. this.rightShow = true;
  413. this.dialogShow = false;
  414. },
  415. //关闭监控视频
  416. onCloseMonitor() {
  417. this.showCenter = false;
  418. this.showType = 0;
  419. },
  420. //显示列表
  421. onChooseAllMonitor() {
  422. this.showType = 2;
  423. },
  424. //选择视频列表
  425. onChooseMonitor(data) {
  426. this.showCenter = true;
  427. this.showType = 1;
  428. this.monitorInfo = data;
  429. },
  430. //点击地图事件
  431. onMapClick(e) {
  432. this.curDeep = e.deep;
  433. if (e.deep > 1) {
  434. this.showBack = true;
  435. } else {
  436. this.showBack = false;
  437. }
  438. //点击山西省本部
  439. if (e.name == "山西省公司(本部)") {
  440. this.showMap = false;
  441. this.showLocal = true;
  442. this.curCompany = ["10001", "10001"];
  443. this.appOrg = "10001";
  444. } else {
  445. this.showMap = true;
  446. this.showLocal = false;
  447. this.curCompany = e.curCompany;
  448. }
  449. //判断是否点击了子单位
  450. if (e.curCompany && e.curCompany.length > 0) {
  451. let appOrg = e.curCompany[e.curCompany.length - 1];
  452. this.appOrg = appOrg;
  453. }
  454. },
  455. //返回操作
  456. onBack() {
  457. this.curDeep = 1;
  458. if (this.curDeep <= 1) {
  459. this.showBack = false;
  460. this.showMap = true;
  461. this.showLocal = false;
  462. this.curCompany = [];
  463. }
  464. this.appOrg = "0000";
  465. this.$refs.province.reloadMap(this.curDeep);
  466. },
  467. //选择公司
  468. handleCompanyChange(e) {
  469. console.log(e);
  470. if (e && e.length > 0) {
  471. if (e[1] == "10001") {
  472. this.showMap = false;
  473. this.showLocal = true;
  474. this.showBack = true;
  475. } else {
  476. this.showMap = true;
  477. this.showLocal = false;
  478. }
  479. let appOrg = e[e.length - 1];
  480. this.appOrg = appOrg;
  481. }
  482. if(e[1] == "1A001" || e[1] == "1A002" || e[1] == "1A004" || e[1] == "1A005"){
  483. this.showMap = true;
  484. this.showLocal = false;
  485. this.showBack = true;
  486. // return;
  487. }
  488. this.$refs.province.chooseUnit(e);
  489. },
  490. },
  491. };
  492. </script>
  493. <style lang="scss">
  494. .data-engineering {
  495. width: 100%;
  496. height: 100%;
  497. margin: 0 auto;
  498. // background-image: url("../../../assets/images/engineering/bg.jpg");
  499. // background-size: cover;
  500. display: flex;
  501. flex-direction: row;
  502. justify-content: space-between;
  503. .left {
  504. margin: 125px 0 0 40px;
  505. width: 580px;
  506. .left-cont {
  507. width: 100%;
  508. height: 920px;
  509. padding-top: 19px;
  510. background: url("../../../assets/images/main/main_bg.png") no-repeat;
  511. background-size: cover;
  512. }
  513. .components-item {
  514. width: 550px;
  515. height: 389px;
  516. background: url("../../../assets/images/main/components_mid_bg.png")
  517. no-repeat;
  518. background-size: cover;
  519. margin-bottom: 28px;
  520. margin-left: 15px;
  521. overflow: hidden;
  522. }
  523. .left-top {
  524. // width: 550px;
  525. // height: 915px;
  526. // background: url("../../../assets/images/main/right_top_new.png") no-repeat;
  527. // background-size: cover;
  528. // margin-bottom: 21px;
  529. }
  530. }
  531. .middle {
  532. background: url('../../../assets/camera/project_map.png') no-repeat center;
  533. display: flex;
  534. flex: 1;
  535. align-items: center;
  536. justify-content: center;
  537. padding: 125px 0 0 0px;
  538. position: relative;
  539. .bottom-area {
  540. position: absolute;
  541. right: 50px;
  542. left: 50px;
  543. bottom: 50px;
  544. .bottom-left {
  545. .left-item {
  546. width: 180px;
  547. height: 30px;
  548. background: url("../../../assets/images/main/choose_bg_long.png")
  549. no-repeat;
  550. background-size: cover;
  551. input {
  552. background: rgba(255, 255, 255, 0);
  553. border: none;
  554. color: #00ffff;
  555. }
  556. .el-input__icon {
  557. color: #00ffff;
  558. }
  559. }
  560. .office {
  561. margin-left: 10px;
  562. width: 180px;
  563. height: 30px;
  564. line-height: 30px;
  565. padding-left: 15px;
  566. color: #898989;
  567. background: url("../../../assets/images/main/choose_bg_long.png")
  568. no-repeat;
  569. background-size: cover;
  570. font-size: 14px;
  571. }
  572. }
  573. .bottom-right {
  574. .back {
  575. width: 34px;
  576. height: 30px;
  577. cursor: pointer;
  578. }
  579. }
  580. }
  581. .menu-area {
  582. padding: 0 30px;
  583. .rate-area {
  584. width: 20%;
  585. position: relative;
  586. cursor: pointer;
  587. img {
  588. width: 100%;
  589. }
  590. .rate {
  591. display: flex;
  592. flex-direction: column;
  593. align-items: center;
  594. justify-content: center;
  595. width: 100%;
  596. position: absolute;
  597. top: 5px;
  598. left: 0;
  599. color: #fff;
  600. .rate-data {
  601. display: flex;
  602. flex-direction: row;
  603. align-items: baseline;
  604. color: #00ffff;
  605. .data {
  606. font-size: 30px;
  607. font-family: "electronicFont";
  608. }
  609. .unit {
  610. font-size: 12px;
  611. }
  612. }
  613. }
  614. .desc {
  615. font-size: 12px;
  616. text-align: center;
  617. color: #00ffff;
  618. }
  619. }
  620. }
  621. }
  622. .right {
  623. margin: 125px 40px 0 0px;
  624. width: 580px;
  625. .right-cont {
  626. width: 100%;
  627. height: 920px;
  628. padding-top: 19px;
  629. background: url("../../../assets/images/main/main_bg.png") no-repeat;
  630. background-size: cover;
  631. }
  632. .components-item {
  633. width: 550px;
  634. height: 849px;
  635. background: url("../../../assets/images/main/components_long_bg.png")
  636. no-repeat;
  637. background-size: cover;
  638. margin-left: 15px;
  639. overflow: hidden;
  640. }
  641. .right-top {
  642. // width: 553px;
  643. // height: 915px;
  644. // background: url("../../../assets/images/main/right_top_new.png") no-repeat;
  645. // background-size: cover;
  646. // margin-bottom: 21px;
  647. }
  648. .right-bottom {
  649. // width: 553px;
  650. // height: 556px;
  651. // background: url("../../../assets/images/main/right_top_m.png") no-repeat;
  652. // background-size: cover;
  653. // margin-bottom: 21px;
  654. }
  655. }
  656. .dialog {
  657. position: fixed;
  658. top: 125px;
  659. left: 40px;
  660. z-index: 10;
  661. width: 100%;
  662. }
  663. .dialog-r {
  664. position: fixed;
  665. top: 125px;
  666. right: 40px;
  667. z-index: 10;
  668. width: 100%;
  669. display: flex;
  670. justify-content: flex-end;
  671. }
  672. .dialog-2 {
  673. position: fixed;
  674. left: 0;
  675. top: 0;
  676. right: 0;
  677. bottom: 0;
  678. z-index: 9999;
  679. display: flex;
  680. flex-direction: row;
  681. align-items: center;
  682. justify-content: center;
  683. background: rgba(0, 0, 0, 0.7);
  684. }
  685. .img-area {
  686. height: 850px;
  687. .build {
  688. margin: 0 auto;
  689. width: 90%;
  690. height: auto;
  691. object-fit: contain;
  692. }
  693. }
  694. .cont-title-area {
  695. display: flex;
  696. flex-direction: row;
  697. align-items: center;
  698. justify-content: center;
  699. position: relative;
  700. margin-bottom: 10px;
  701. img {
  702. width: 331px;
  703. height: 32px;
  704. }
  705. .cont-title {
  706. font-size: 20px;
  707. font-weight: 900;
  708. font-family: "PingFangSC";
  709. width: 100%;
  710. position: absolute;
  711. display: flex;
  712. align-items: center;
  713. justify-content: center;
  714. top: -5px;
  715. color: #fff;
  716. }
  717. }
  718. ::-webkit-scrollbar {
  719. width: 3px;
  720. height: 3px;
  721. }
  722. ::-webkit-scrollbar-thumb {
  723. //滑块部分
  724. // border-radius: 5px;
  725. background-color: #58cbbb;
  726. }
  727. ::-webkit-scrollbar-track {
  728. //轨道部分
  729. // box-shadow: inset 0 0 5px #ddd;
  730. background: #ddd;
  731. // border-radius: 5px;
  732. }
  733. }
  734. </style>