index.vue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882
  1. <!-- 首页模块 首页面 -->
  2. <template>
  3. <div class="home">
  4. <div class="body-middle" :class="{ 'body-middle-height': blockList[0].flag }">
  5. <div class="body-middle-left">
  6. <!-- 任务、消息、提醒、超期 -->
  7. <!-- <Panel :data-list="panelList" @click="gotoNewRw"></Panel> -->
  8. <div class="header">
  9. <div class="left">
  10. <img src="../../../public/img/8b2c7255e9b19c71d68b33a08f20f74.png" alt="">
  11. </div>
  12. <div class="right">
  13. <div class="top">
  14. {{ nowDate }}
  15. </div>
  16. <div class="bottom">
  17. {{ nowTime }}
  18. </div>
  19. </div>
  20. </div>
  21. <div v-show="false">
  22. <el-input v-model="param" />
  23. <el-button @click="openPort()">openPort</el-button>
  24. <el-button @click="closePort()">closePort</el-button>
  25. <div>{{text}}</div>
  26. </div>
  27. <div class="content2">
  28. <el-row class="content2-aside">
  29. <h3 class="title">采购合同完成进度</h3>
  30. <el-col :span="12" class="chart-card">
  31. <div style="font-weight: bold;" class="">
  32. <div ref="myEchart1" style="height: 288px;" class="roseChart"></div>
  33. <div class="bottom-tip">统计单位:吨</div>
  34. </div>
  35. </el-col>
  36. <el-col :span="12" class="chart-card">
  37. <div style="font-weight: bold;">
  38. <div ref="myEchart2" style="height: 288px;" class="roseChart"></div>
  39. <div class="bottom-tip">统计单位:元</div>
  40. </div>
  41. </el-col>
  42. <el-col :span="12" class="chart-card">
  43. <div style="font-weight: bold;">
  44. <div ref="myEchart3" style="height: 288px;" class="roseChart"></div>
  45. <div class="bottom-tip">统计单位:元</div>
  46. </div>
  47. </el-col>
  48. </el-row>
  49. <div class="content2-middle">
  50. <el-row class="left">
  51. <el-col :span="12">
  52. <h3>在途信息统计</h3>
  53. <div class="left-card">
  54. <div class="item">
  55. <p>在途车辆</p>
  56. <p><span class="number">{{carCount1}}</span><span class="number-text">台</span></p>
  57. </div>
  58. <div class="item">
  59. <p>装货车辆</p>
  60. <p><span class="number" style="color:#ffa523">{{carCount2}}</span><span class="number-text">台</span></p>
  61. </div>
  62. <div class="item">
  63. <p>卸货车辆</p>
  64. <p><span class="number" style="color:#2483ff">{{carCount3}}</span><span class="number-text">台</span></p>
  65. </div>
  66. </div>
  67. </el-col>
  68. <el-col :span="12">
  69. <h3>粮食总储量</h3>
  70. <div ref="myEchart7" style="height: 208px;"></div>
  71. </el-col>
  72. </el-row>
  73. <el-row>
  74. <h3 class="content2-map">库点流向分布</h3>
  75. <div class="center-map">
  76. <map-drag></map-drag>
  77. </div>
  78. </el-row>
  79. <el-row>
  80. <h3>库存成本</h3>
  81. <div class="content3">
  82. <div class="left">
  83. <img src="../../../public/img/1637204557176-s4AMbBA8.png" alt="">
  84. <span>总库存量</span>
  85. <span class="content3-number blue">{{inventoryCost}}</span>
  86. <span style="margin-top: 10px;">吨</span>
  87. </div>
  88. <div class="right">
  89. <img src="../../../public/img/1637204768818-70JRjz0H.png" alt="">
  90. <span>库存价值</span>
  91. <span class="content3-number yellow">{{inventoryValue}}</span>
  92. <span style="margin-top: 10px;">元</span>
  93. </div>
  94. </div>
  95. </el-row>
  96. </div>
  97. <el-row class="content2-aside">
  98. <h3 class="left-title">采购合同完成进度</h3>
  99. <el-col :span="12" class="chart-card">
  100. <div style="font-weight: bold;">
  101. <div ref="myEchart4" style="height: 288px;" class="roseChart"></div>
  102. <div class="bottom-tip">统计单位:吨</div>
  103. </div>
  104. </el-col>
  105. <el-col :span="12" class="chart-card">
  106. <div style="font-weight: bold;">
  107. <div ref="myEchart5" style="height: 288px;" class="roseChart"></div>
  108. <div class="bottom-tip">统计单位:元</div>
  109. </div>
  110. </el-col>
  111. <el-col :span="12" class="chart-card">
  112. <div style="font-weight: bold;">
  113. <div ref="myEchart6" style="height: 288px;" class="roseChart"></div>
  114. <div class="bottom-tip">统计单位:元</div>
  115. </div>
  116. </el-col>
  117. </el-row>
  118. </div>
  119. <el-dialog :append-to-body="true" :show-close='false' :visible.sync="dialogVisible" width="30%"
  120. :before-close="handleClose">
  121. <span>这是一段信息</span>
  122. <span slot="footer" class="dialog-footer">
  123. <el-button @click="dialogVisible = false">取 消</el-button>
  124. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  125. </span>
  126. </el-dialog>
  127. <!-- <img style='width:100%;margin-top:10px;' src="../../../public/img/tmt.gif" alt=""> -->
  128. </div>
  129. </div>
  130. <div id="mapXY"></div>
  131. <!-- </ws-dialog> -->
  132. <!-- 第一次登陆的租户 -->
  133. <successfulDialog v-if="successfulDialog" :phone="phone" :successfulDialog="successfulDialog"
  134. @close="successfulDialogClose">
  135. </successfulDialog>
  136. <!-- 试用租户 -->
  137. <trialNotExpired v-if="trialNotExpired" :day="day" :phone="phone" :trialNotExpired="trialNotExpired"
  138. @close="trialNotExpiredClose">
  139. </trialNotExpired>
  140. </div>
  141. </template>
  142. <script>
  143. // import serialport from 'serialport'
  144. // 统计图start
  145. import maintenance from './components/maintenance'
  146. import shipCertificate from './components/shipCertificate'
  147. import sparePartsMaterial from './components/sparePartsMaterial'
  148. import procurement from './components/procurement'
  149. import mapDrag from '@/components/mapdrag/indexMap'
  150. // 统计图end
  151. // 正式租户
  152. import successfulDialog from './components/successfulDialog'
  153. // 试用租户
  154. import trialNotExpired from './components/trialNotExpired'
  155. // 新 api
  156. import {
  157. noticeNumber,
  158. queryCircularManagementReceiveList,
  159. getStaffHomeShowList,
  160. gChartsData
  161. } from '@/model/home/index'
  162. import {
  163. getUserVesselList,
  164. findHottestRouting
  165. } from '@/model/indexRx'
  166. import News from './components/News'
  167. import ShipMap from './components/ShipMap'
  168. import {
  169. getCnCity,
  170. getCnWea
  171. } from './city'
  172. import {
  173. getLanguage
  174. } from '@/lang'
  175. import Panel from './components/Panel'
  176. import {
  177. getChangeLoginFlag
  178. } from '@/model/indexRx'
  179. import {
  180. zipDown
  181. } from '@/utils/batchDown'
  182. import {
  183. EventBus
  184. } from 'base-core-lib'
  185. import {
  186. mapActions,
  187. mapGetters,
  188. mapState
  189. } from 'vuex';
  190. import axios from 'axios'
  191. export default {
  192. name: 'index',
  193. components: {
  194. mapDrag,
  195. axios,
  196. News,
  197. ShipMap,
  198. Panel,
  199. successfulDialog,
  200. trialNotExpired,
  201. //统计图start
  202. maintenance,
  203. shipCertificate,
  204. sparePartsMaterial,
  205. procurement
  206. //统计图end
  207. },
  208. data() {
  209. return {
  210. totalReserves:'',
  211. inventoryCost:'',
  212. inventoryValue:'',
  213. carCount1:'',
  214. carCount2:'',
  215. carCount3:'',
  216. chartsData: [],
  217. nowDate: null, //存放年月日变量
  218. nowTime: null, //存放时分秒变量
  219. timer: '', //定义一个定时器的变量
  220. currentTime: new Date(), // 获取当前时间
  221. timer: '',
  222. dialogVisible: false,
  223. showEchart: false,
  224. phone: '', // 正式租户电话号码
  225. day: '', //试用租户剩余天数
  226. trialNotExpired: false, //试用租户 剩余天数
  227. successfulDialog: false, //第一次登陆的弹窗
  228. mapXY: undefined,
  229. shipService: undefined,
  230. blockList: [{
  231. name: this.$t('home.shortcutEntrance'),
  232. flag: true
  233. },
  234. {
  235. name: this.$t('home.shipMap'),
  236. flag: true
  237. }
  238. ],
  239. newList: [],
  240. noticeList: [],
  241. routeList: [],
  242. showBlockList: [],
  243. shipList: [],
  244. setFlag: false,
  245. todoCount: '-',
  246. msgCount: '-',
  247. weather: undefined,
  248. ships: [],
  249. selectShip: undefined,
  250. isFullScreen: false,
  251. number: {
  252. task: 0,
  253. remind: 0,
  254. overdue: 0,
  255. news: 0
  256. },
  257. vesselBankFlag: localStorage.getItem('ws-pf_vesselBankFlag'),
  258. shezhiVal: '',
  259. text: '数据',
  260. reader: null,
  261. param: 9600
  262. }
  263. },
  264. computed: {
  265. ...mapState({
  266. showVesslBankFlag: state => state.commonStore.showVesslBankFlag
  267. }),
  268. ...mapGetters(['userSetting']),
  269. /** 计算属性计算属性节点 */
  270. panelList() {
  271. return [{
  272. type: '0',
  273. task: this.$t('homeIndex.task'),
  274. url: require('@/assets/newhome/rw01.png'),
  275. number: this.number.task,
  276. background: require('@/assets/newhome/rw.png'),
  277. remark: '任务'
  278. },
  279. {
  280. type: 'message',
  281. task: this.$t('homeIndex.message'),
  282. url: require('@/assets/newhome/xx01.png'),
  283. number: this.number.news,
  284. background: require('@/assets/newhome/xx.png'),
  285. remark: '消息'
  286. },
  287. {
  288. type: '1',
  289. task: this.$t('homeIndex.remind'),
  290. url: require('@/assets/newhome/tx01.png'),
  291. number: this.number.remind,
  292. background: require('@/assets/newhome/tx.png'),
  293. remark: '提醒'
  294. },
  295. {
  296. type: '2',
  297. task: this.$t('homeIndex.beyond'),
  298. url: require('@/assets/newhome/cq01.png'),
  299. number: this.number.overdue,
  300. background: require('@/assets/newhome/cq.png'),
  301. remark: '超期'
  302. }
  303. ]
  304. },
  305. optionSingleHeightTime() {
  306. return {
  307. openWatch: true,
  308. limitMoveNum: -1, //启动无缝滚动最小数据量 this.dataList.length
  309. direction: 2,
  310. switchDelay: 1000
  311. }
  312. },
  313. getLanguage() {
  314. return this.$store.getters.language
  315. },
  316. isShowShipList() {
  317. return this.userSetting['shipMap'][0].showFlag && this.vesselBankFlag !== 'V' && this.permissionIf(
  318. 'map.mapManagement.view')
  319. },
  320. },
  321. async created() {
  322. //获取快捷路口列表
  323. this.getRouteList()
  324. // this.checkUserInfoDialog()
  325. // {
  326. this.timer = setInterval(this.getTime, 1000);
  327. // }
  328. },
  329. beforeDestroy() {
  330. clearInterval(this.timer);
  331. if (this.timer) {
  332. clearInterval(this.timer); // 在Vue实例销毁前,清除定时器
  333. }
  334. },
  335. async mounted() {
  336. let that = this
  337. this.getChartsData()
  338. // this.timer = setInterval(function(){
  339. // // that.getRouteList()
  340. // axios.get('https://live.eliangeyun.com/api/v1/device/channellist')
  341. // .then(resp =>{
  342. // 图表重置 myChart.setOption
  343. // that.aa = resp.data.ChannelList
  344. // for(var i=0;i<that.dataList.length;i++){
  345. // console.log('ssss',that.dataList[i].Status);
  346. // }
  347. // }).catch(err =>{
  348. // console.log(err);
  349. // });
  350. // }, 2000);
  351. //获取新闻列表
  352. // this.getNewList()
  353. gChartsData().toPromise().then(res => {
  354. console.log(res)
  355. this.chartsData = res
  356. this.carCount1 = res[6].biViewInfoList[0].count
  357. this.carCount2 = res[6].biViewInfoList[1].count
  358. this.carCount3 = res[6].biViewInfoList[2].count
  359. this.inventoryCost = res[7].biViewInfoList[0].count
  360. this.inventoryValue = res[7].biViewInfoList[1].count
  361. this.totalReserves = res[8].biViewInfoList
  362. this.initCharts()
  363. })
  364. // if (this.vesselBankFlag !== 'V') {
  365. // EventBus.$emit('addShipScript', () => {
  366. // this.initShipMap()
  367. // })
  368. // }
  369. // setTimeout(() => {
  370. // this.showEchart = true
  371. // }, 900)
  372. // this.showBlockList = []
  373. // if (this.vesselBankFlag === 'V') {
  374. // this.$refs.noticeList.style.width = 'calc(50% - 7px)'
  375. // this.$refs.newsList.style.width = 'calc(50% - 7px)'
  376. // } else {
  377. // this.showBlockList = []
  378. // this.blockList[1].flag = false
  379. // this.$refs.noticeList.style.width = 'calc(50% - 7px)'
  380. // this.$refs.newsList.style.width = 'calc(50% - 7px)'
  381. // if (this.userSetting['shipMap'] && this.userSetting['shipMap'][0].showFlag) {
  382. // this.showBlockList.push('船舶动态')
  383. // this.blockList[1].flag = true
  384. // }
  385. // }
  386. },
  387. watch: {
  388. // getLanguage: function () {
  389. // this.getShipList()
  390. // }
  391. },
  392. methods: {
  393. ...mapActions('user', ['toSetShow', 'changeVesslBank']),
  394. getChartsData() {
  395. noticeNumber().toPromise().then(res => {
  396. const {
  397. task = 0, remind = 0, overdue = 0, news = 0
  398. } = res
  399. this.number.task = task
  400. this.number.remind = remind
  401. this.number.overdue = overdue
  402. this.number.news = news
  403. })
  404. },
  405. getTime() {
  406. const date = new Date();
  407. const year = date.getFullYear();
  408. const month = date.getMonth() + 1;
  409. const day = date.getDate();
  410. const hour = date.getHours();
  411. const minute = date.getMinutes();
  412. const second = date.getSeconds();
  413. this.month = check(month);
  414. this.day = check(day);
  415. this.hour = check(hour);
  416. this.minute = check(minute);
  417. this.second = check(second);
  418. function check(i) {
  419. const num = (i < 10) ? ('0' + i) : i;
  420. return num;
  421. }
  422. this.nowDate = year + '-' + this.month + '-' + this.day;
  423. this.nowTime = this.hour + ':' + this.minute + ':' + this.second;
  424. },
  425. initCharts() {
  426. let app = this;
  427. var roseCharts = document.getElementsByClassName('roseChart');
  428. for (let i = 0; i < roseCharts.length; i++) {
  429. let myChart = app.$echarts.init(roseCharts[i]);
  430. let color = []
  431. let data = []
  432. let text = ''
  433. let formatter = ''
  434. let graphicText = ''
  435. switch (i) {
  436. case 0:
  437. // 圆环图各环节的颜色
  438. color = ['#75d1f4', '#3a3b40'];
  439. // 圆环图各环节的名称和值(系列中各数据项的名称和值)
  440. data = [{
  441. name: '已完成量',
  442. value: this.chartsData[i].biViewInfoList[0].count
  443. }, {
  444. name: '待完成量',
  445. value: this.chartsData[i].biViewInfoList[1].count
  446. }]
  447. text = '合同总量'
  448. formatter = '{b}{c}吨 </br> 占比{d}%'
  449. graphicText = ' \n\n总量合计\n\n' +Number(this.chartsData[i].total).toFixed(2)
  450. break;
  451. case 1:
  452. // 圆环图各环节的颜色
  453. color = ['#247ef4', '#3a3b40'];
  454. // 圆环图各环节的名称和值(系列中各数据项的名称和值)
  455. data = [{
  456. name: '已开票',
  457. value: this.chartsData[i].biViewInfoList[0].count
  458. }, {
  459. name: '待开票',
  460. value: this.chartsData[i].biViewInfoList[1].count
  461. }]
  462. text = '合同总额'
  463. formatter = '{b}{c}元 </br> 占比{d}%'
  464. graphicText = ' \n\n开票合计\n\n' + Number(this.chartsData[i].total).toFixed(2)
  465. break;
  466. case 2:
  467. // 圆环图各环节的颜色
  468. color = ['#f49f23', '#3a3b40'];
  469. // 圆环图各环节的名称和值(系列中各数据项的名称和值)
  470. data = [{
  471. name: '已付款',
  472. value: this.chartsData[i].biViewInfoList[0].count
  473. }, {
  474. name: '待付款',
  475. value: this.chartsData[i].biViewInfoList[1].count
  476. }]
  477. text = '合同总额'
  478. formatter = '{b}{c}元 </br> 占比{d}%'
  479. graphicText = ' \n\n付款合计\n\n' + Number(this.chartsData[i].total).toFixed(2)
  480. break;
  481. case 3:
  482. // 圆环图各环节的颜色
  483. color = ['#75d1f4', '#3a3b40'];
  484. // 圆环图各环节的名称和值(系列中各数据项的名称和值)
  485. data = [{
  486. name: '已完成量',
  487. value: this.chartsData[i].biViewInfoList[0].count
  488. }, {
  489. name: '待完成量',
  490. value: this.chartsData[i].biViewInfoList[1].count
  491. }]
  492. text = '合同总量'
  493. formatter = '{b}{c}吨 </br> 占比{d}%'
  494. graphicText = ' \n\n总量合计\n\n' + Number(this.chartsData[i].total).toFixed(2)
  495. case 4:
  496. // 圆环图各环节的颜色
  497. color = ['#247ef4', '#3a3b40'];
  498. // 圆环图各环节的名称和值(系列中各数据项的名称和值)
  499. data = [{
  500. name: '已开票',
  501. value: this.chartsData[i].biViewInfoList[0].count
  502. }, {
  503. name: '待开票',
  504. value: this.chartsData[i].biViewInfoList[1].count
  505. }]
  506. text = '合同总额'
  507. formatter = '{b}{c}元 </br> 占比{d}%'
  508. graphicText = ' \n\n开票合计\n\n' + Number(this.chartsData[i].total).toFixed(2)
  509. break;
  510. case 5:
  511. // 圆环图各环节的颜色
  512. color = ['#f49f23', '#3a3b40'];
  513. // 圆环图各环节的名称和值(系列中各数据项的名称和值)
  514. data = [{
  515. name: '已付款',
  516. value: this.chartsData[i].biViewInfoList[0].count
  517. }, {
  518. name: '待付款',
  519. value: this.chartsData[i].biViewInfoList[1].count
  520. }]
  521. text = '合同总额'
  522. formatter = '{b}{c}元 </br> 占比{d}%'
  523. graphicText = ' \n\n付款合计\n\n' + Number(this.chartsData[i].total).toFixed(2)
  524. break;
  525. }
  526. myChart.setOption({
  527. title: [{
  528. text: text,
  529. top: '2%',
  530. left: '3%',
  531. textStyle: {
  532. color: '#f4f4f4',
  533. fontSize: 18,
  534. }
  535. }],
  536. // 图例
  537. legend: [{
  538. selectedMode: true, // 图例选择的模式,控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 false 关闭。
  539. top: '10%',
  540. left: 'center',
  541. con: 'circle',
  542. itemWidth: 10, // 设置宽度
  543. itemHeight: 10, // 设置高度
  544. itemGap: 40, // 设置间距
  545. textStyle: { // 图例的公用文本样式。
  546. fontSize: 14,
  547. color: '#fff'
  548. },
  549. data: data
  550. }],
  551. // 提示框
  552. tooltip: {
  553. show: true, // 是否显示提示框
  554. formatter: formatter // 提示框显示内容,此处{b}表示各数据项名称,此项配置为默认显示项,{c}表示数据项的值,默认不显示,({d}%)表示数据项项占比,默认不显示。
  555. },
  556. // graphic 是原生图形元素组件。可以支持的图形元素包括:image, text, circle, sector, ring, polygon, polyline, rect, line, bezierCurve, arc, group,
  557. graphic: {
  558. type: 'text', // [ default: image ]用 setOption 首次设定图形元素时必须指定。image, text, circle, sector, ring, polygon, polyline, rect, line, bezierCurve, arc, group,
  559. top: 'center', // 描述怎么根据父元素进行定位。top 和 bottom 只有一个可以生效。如果指定 top 或 bottom,则 shape 里的 y、cy 等定位属性不再生效。『父元素』是指:如果是顶层元素,父元素是 echarts 图表容器。如果是 group 的子元素,父元素就是 group 元素。
  560. left: 'center', // 同上
  561. style: {
  562. text: graphicText, // 文本块文字。可以使用 \n 来换行。[ default: '' ]
  563. fill: '#fff', // 填充色。
  564. fontSize: 16, // 字体大小
  565. fontWeight: 'bold' // 文字字体的粗细,可选'normal','bold','bolder','lighter'
  566. }
  567. },
  568. // 系列列表
  569. series: [{
  570. name: '', // 系列名称
  571. type: 'pie', // 系列类型
  572. center: ['50%', '55%'], // 饼图的中心(圆心)坐标,数组的第一项是横坐标,第二项是纵坐标。[ default: ['50%', '50%'] ]
  573. radius: ['45%', '55%'], // 饼图的半径,数组的第一项是内半径,第二项是外半径。[ default: [0, '75%'] ]
  574. hoverAnimation: true, // 是否开启 hover 在扇区上的放大动画效果。[ default: true ]
  575. color: color, // 圆环图的颜色
  576. label: { // 饼图图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等.
  577. normal: {
  578. show: true, // 是否显示标签[ default: false ]
  579. position: 'outside', // 标签的位置。'outside'饼图扇区外侧,通过视觉引导线连到相应的扇区。'inside','inner' 同 'inside',饼图扇区内部。'center'在饼图中心位置。
  580. formatter: '{c}', // 标签内容
  581. color: '#d5d5d6',
  582. fontSize: 16,
  583. }
  584. },
  585. labelLine: { // 标签的视觉引导线样式,在 label 位置 设置为'outside'的时候会显示视觉引导线。
  586. normal: {
  587. show: true, // 是否显示视觉引导线。
  588. length: 15, // 在 label 位置 设置为'outside'的时候会显示视觉引导线。
  589. length2: 10, // 视觉引导项第二段的长度。
  590. lineStyle: { // 视觉引导线的样式
  591. //color: '#000',
  592. //width: 1
  593. }
  594. }
  595. },
  596. data: data // 系列中的数据内容数组。
  597. }]
  598. })
  599. myChart.off('click');
  600. myChart.on('click', function(params) {
  601. // var a = params.dataIndex
  602. console.log(params, '我被点击了');
  603. app.dialogVisible = true
  604. })
  605. }
  606. debugger
  607. console.log(this.totalReserves)
  608. let _x = []
  609. let _y = []
  610. for(let i = 0;i<this.totalReserves.length;i++){
  611. _x.push(this.totalReserves[i].name)
  612. _y.push(this.totalReserves[i].count)
  613. }
  614. // 柱状图
  615. let myChart7 = app.$echarts.init(this.$refs.myEchart7);
  616. var zoption = {
  617. grid: {
  618. left: '0',
  619. right: '0',
  620. bottom: '0',
  621. top: '30',
  622. containLabel: true
  623. },
  624. // --- 提示框 ----
  625. tooltip: {
  626. show: true, // 是否显示提示框,默认为true
  627. trigger: 'item', // 数据项图形触发
  628. axisPointer: { // 指示样式
  629. type: 'shadow',
  630. axis: 'auto'
  631. },
  632. padding: 5,
  633. textStyle: { // 提示框内容的样式
  634. color: '#fff'
  635. }
  636. },
  637. // ------ X轴 ------
  638. xAxis: {
  639. axisLabel: { // 坐标轴标签
  640. show: true, // 是否显示
  641. inside: false, // 是否朝内
  642. rotate: 0, // 旋转角度
  643. margin: 10, // 刻度标签与轴线之间的距离
  644. color: '#666', // 默认取轴线的颜色
  645. interval: 0,
  646. rotate: 40
  647. },
  648. splitArea: { // 网格区域
  649. show: false // 是否显示,默认为false
  650. },
  651. data: _x
  652. },
  653. // ------ y轴 ----------
  654. yAxis: {
  655. axisLine: { // 坐标轴 轴线
  656. show: false, // 是否显示
  657. },
  658. axisLabel: { // 坐标轴的标签
  659. show: true, // 是否显示
  660. inside: false, // 是否朝内
  661. rotate: 0, // 旋转角度
  662. margin: 8, // 刻度标签与轴线之间的距离
  663. color: '#666', // 默认轴线的颜色
  664. },
  665. splitLine: { // gird 区域中的分割线
  666. show: true, // 是否显示
  667. lineStyle: {
  668. color: '#666',
  669. width: 1,
  670. type: 'dashed'
  671. }
  672. }
  673. },
  674. // ------- 内容数据 -------
  675. series: [{
  676. name: '储量', // 序列名称
  677. type: 'bar', // 类型
  678. legendHoverLink: true, // 是否启用图列 hover 时的联动高亮
  679. // label: { // 图形上的文本标签
  680. // show: false,
  681. // position: 'insideTop', // 相对位置
  682. // rotate: 0, // 旋转角度
  683. // color: '#eee'
  684. // },
  685. itemStyle: { // 图形的形状
  686. color: '#3779fd'
  687. // barBorderRadius: [18, 18, 0 ,0]
  688. },
  689. barWidth: 20, // 柱形的宽度
  690. barCategoryGap: '20%', // 柱形的间距
  691. label: {
  692. show: true,
  693. position: 'top',
  694. color: '#b0b1b3'
  695. },
  696. data: _y
  697. }]
  698. };
  699. myChart7.setOption(zoption)
  700. },
  701. handleClose(done) {
  702. this.$confirm('确认关闭?')
  703. .then(_ => {
  704. done();
  705. })
  706. .catch(_ => {});
  707. },
  708. // 下载通知通函
  709. downloadNotification(item) {
  710. zipDown({
  711. appendixIds: item.attachmentPath,
  712. baseUrl: this.$store.getters.baseInfo.fileUrl,
  713. zipName: item.theme
  714. })
  715. },
  716. /**
  717. * 校验各种弹框问题
  718. * @Desc 不是本人原意, 请不要骂我 谢谢. 请联系 "后台开发人员" 梳理逻辑
  719. */
  720. async checkUserInfoDialog() {
  721. const {
  722. statusFlag,
  723. loginInfo: {
  724. loginFlag = 0
  725. },
  726. daysRemaining,
  727. customerServiceStaffPhone
  728. } = JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser'))
  729. if (statusFlag * 1 === 3) {
  730. // 判断后台返回的是空 还是 0 是空还是 0 的时候请求后台接口 不懂啥意思 为啥要这么弄
  731. if (!loginFlag && !localStorage.getItem('isShowTryUserDialog') * 1) {
  732. let newId = JSON.parse(localStorage.getItem('ws_login_accountId'))
  733. this.phone = customerServiceStaffPhone
  734. this.successfulDialog = true
  735. localStorage.setItem('isShowTryUserDialog', '1')
  736. await getChangeLoginFlag({
  737. accountId: newId
  738. }).toPromise()
  739. }
  740. }
  741. // 试用租户
  742. const dayDialog = [30, 15, 7, 5, 3, 2, 1, 0]
  743. if (statusFlag * 1 === 2 && dayDialog.indexOf(daysRemaining) > -1 && !localStorage.getItem(
  744. 'isShowTryUserDialog') * 1) {
  745. this.day = daysRemaining
  746. this.phone = customerServiceStaffPhone
  747. this.trialNotExpired = true
  748. localStorage.setItem('isShowTryUserDialog', '1')
  749. }
  750. },
  751. trialNotExpiredClose() {
  752. this.trialNotExpired = false
  753. },
  754. //第一次登陆的弹窗
  755. successfulDialogClose() {
  756. this.successfulDialog = false
  757. },
  758. initShipMap() {
  759. var options = {
  760. ak: '57df9eaa033b44809d4bdaf919af457e',
  761. // 初始中心点坐标
  762. centerPoint: [30.171, 121.27],
  763. zoom: 3,
  764. minZoom: 2,
  765. maxZoom: 18,
  766. defaultMapType: 'MT_SEA', //默认海图
  767. // 公司版权信息( 支持html ),默认Elane Inc.
  768. attribution: {
  769. isShow: false,
  770. emptyString: '&copy;2019 <a class="shipxy_small"></a>&nbsp;<a>WinSea Inc.</a>'
  771. },
  772. measureCtrl: {
  773. isShow: false
  774. },
  775. mousePostionCtrl: {
  776. isShow: false
  777. },
  778. zoomControlElane: {
  779. isShow: true,
  780. position: 'bottomright'
  781. },
  782. zoomviewControl: {
  783. isShow: false,
  784. position: 'bottomright'
  785. },
  786. basemapsControl: {
  787. isShow: false,
  788. position: 'topright'
  789. },
  790. scaleCtrl: {
  791. isShow: true,
  792. position: 'bottomleft'
  793. }
  794. }
  795. // 创建地图示例
  796. // eslint-disable-next-line no-undef
  797. this.mapXY = new ShipxyAPI.Map('mapXY', options)
  798. // eslint-disable-next-line no-undef
  799. this.shipService = ShipxyAPI.ShipService(this.mapXY, {
  800. enableAreaShip: false,
  801. enableFleetShip: false,
  802. isAutoUpdateSrvtime: false,
  803. // delayTime: 5000,
  804. lableFont: ['500 12px Arial', '500 12px 宋体'], // 船舶名称,文字字体,默认值:["600 12px Arial", "500 12px Arial"]
  805. lableTxtColor: ['#fff', '#fff'], // 船舶名称,文字颜色,默认值:["#000","#fff"]
  806. lableLineColor: ['rgba(1, 30, 62, 0)', 'rgba(1, 30, 62, 0)'], // 边框颜色,默认值:["#000","#000"]
  807. lableLinefillColor: ['rgba(0, 0, 0, 0.6)', 'rgba(0, 0, 0, 0.6)'], // 框内填充颜色,默认值:[null,null]
  808. obliqueLineColor: ['#000', '#000'], // 船舶名称,斜线颜色,默认值:[null,null]
  809. dShipColor: '#FF6437', // D+船颜色,默认:#ff6347
  810. zoomLevel_data: 1,
  811. zoomLevel_base: 1,
  812. getAreaShipsCallBack: (call) => {
  813. // console.info(call, 'getAreaShipsCallBack')
  814. },
  815. drawShipsEndCallBack: (call) => {
  816. // console.info(call, 'drawShipsEndCallBack')
  817. }
  818. })
  819. this.shipService.setPointerEvents(true)
  820. window.shipService = this.shipService
  821. //获取船舶列表
  822. this.getShipList()
  823. },
  824. toRoute(url) {
  825. this.$router.push(url)
  826. },
  827. toSetShow() {
  828. this.showBlockList = []
  829. this.setFlag = true
  830. // getStaffHomeShowList({
  831. // staffId: localStorage.getItem('ws-pf_userId')
  832. // }).toPromise().then(data => {
  833. // for (let i = 0; i < data.length; i++) {
  834. // if (data[i].typeId === 'shipMap' && data[i].showFlag) {
  835. // this.showBlockList.push('船舶动态')
  836. // } else {
  837. // this.showBlockList = []
  838. // }
  839. // }
  840. // })
  841. },
  842. toMap() {
  843. this.$router.push('/map/trajectory_child')
  844. },
  845. goNews() {
  846. this.$router.push('/news/noticeType')
  847. },
  848. goNewsDetail(id) {
  849. this.$router.push('/news/noticeDetails?id=' + id)
  850. },
  851. goNotice(data) {
  852. this.$router.push({
  853. name: 'notificationItDetail',
  854. query: {
  855. id: data.id
  856. }
  857. })
  858. },
  859. goNoticeMore() {
  860. this.$router.push('/notice/notificationCircularReleasedIt_child')
  861. },
  862. toHide(index) {
  863. this.changeVesslBank([{
  864. id: this.userSetting['shipMap'][0].id,
  865. staffId: localStorage.getItem('ws-pf_userId'),
  866. typeId: 'shipMap',
  867. showFlag: false
  868. }])
  869. },
  870. getRouteList() {
  871. let data = {
  872. accountId: localStorage.getItem('ws-pf_userId'),
  873. pageSize: 30
  874. }
  875. findHottestRouting(data).toPromise().then(res => {
  876. this.routeList = res
  877. if (res.length == 0) {
  878. this.blockList[0].flag = false
  879. }
  880. })
  881. },
  882. //获取新闻
  883. getNewList() {
  884. let data = {
  885. currentPage: 1,
  886. pageSize: 2,
  887. loginUserId: localStorage.getItem('ws-pf_userId'),
  888. compId: localStorage.getItem('ws-pf_compId'),
  889. releaseFlag: 0
  890. }
  891. // queryHomePage(data).toPromise().then(resNewList => {
  892. // for (let i of resNewList) {
  893. // i.content = '<p>' + i.content.replace(/<[^>]+>/g, '') + '</p>'
  894. // }
  895. // this.newList = resNewList
  896. // for (let i of this.newList) {
  897. // if (i.ossCoverUrl && i.ossCoverUrl.length > 0) {
  898. // } else {
  899. // this.$set(
  900. // i,
  901. // 'imgUrl',
  902. // require('@/assets/images/page/home/noImg.png')
  903. // )
  904. // }
  905. // }
  906. // })
  907. },
  908. //获取通知通函
  909. // getNoticeList () {
  910. // let pagesize = Math.floor((this.$refs.noticeList.clientHeight - 44) / 80)
  911. // let data = {
  912. // currentPage: 1,
  913. // pageSize: pagesize || 3,
  914. // vesselDeptId:
  915. // localStorage.getItem('ws-pf_vesselBankFlag') === 'V'
  916. // ? localStorage.getItem('ws-pf_vesselId')
  917. // : localStorage.getItem('ws-pf_deptId'),
  918. // compId: localStorage.getItem('ws-pf_compId')
  919. // }
  920. // // TODO: 【此处有问题】接口变更的不对
  921. // queryCircularManagementReceiveList(data)
  922. // .toPromise()
  923. // .then(response => {
  924. // this.noticeList = response.records
  925. // })
  926. // },
  927. // 获取船舶状态
  928. getNaviStatusStr(t) {
  929. var array = [
  930. this.$t('home.navistatus0'),
  931. this.$t('home.navistatus1'),
  932. this.$t('home.navistatus2'),
  933. this.$t('home.navistatus3'),
  934. this.$t('home.navistatus4'),
  935. this.$t('home.navistatus5'),
  936. this.$t('home.navistatus6'),
  937. this.$t('home.navistatus7'),
  938. this.$t('home.navistatus8')
  939. ]
  940. if (t >= 0 && t <= 8) {
  941. return array[t]
  942. }
  943. return ''
  944. },
  945. // 获取船舶状态
  946. getNaviStatusBg(t) {
  947. var array = [
  948. 'bg0',
  949. 'bg1',
  950. 'bg2',
  951. 'bg3',
  952. 'bg4',
  953. 'bg5',
  954. 'bg6',
  955. 'bg7',
  956. 'bg8'
  957. ]
  958. if (t >= 0 && t <= 8) {
  959. return array[t]
  960. }
  961. return ''
  962. },
  963. getShipList() {
  964. getUserVesselList({
  965. vesselStatus: 'UNDER_CONTROL'
  966. }).toPromise().then(res => {
  967. this.shipList = []
  968. let num = res.length > 10 ? 10 : res.length
  969. let obj = {}
  970. for (let i = 0; i < num; i++) {
  971. if (res[i].mmsiCode && res[i].mmsiCode.length > 0) {
  972. obj = this.shipService.getShipByMmsi(res[i].mmsiCode) ?
  973. this.shipService.getShipByMmsi(res[i].mmsiCode) : {}
  974. obj.vesselName = res[i].vesselName
  975. this.shipList.push(obj)
  976. }
  977. }
  978. //我想不出还有什么招了:临时解决办法
  979. const oldList = this.shipList
  980. for (let i = 1; i < 5; i++) {
  981. oldList.forEach(item => {
  982. this.shipList.push(item)
  983. })
  984. }
  985. })
  986. },
  987. onTodoClick() {
  988. this.$router.push({
  989. name: 'workNotification'
  990. })
  991. },
  992. onMsgClick() {
  993. this.$router.push({
  994. name: 'message'
  995. })
  996. },
  997. onChange(list) {},
  998. onShipMenuItemClick(ship) {
  999. this.selectShip = ship
  1000. if (ship) {
  1001. this.$refs.shipMap.selectShip(ship.id)
  1002. } else {
  1003. this.$refs.shipMap.unSelectShip()
  1004. }
  1005. },
  1006. onFullScreen() {
  1007. this.isFullScreen = !this.isFullScreen
  1008. },
  1009. onNoticeMoreBtnClick() {
  1010. this.$router.push({
  1011. name: 'notice'
  1012. })
  1013. },
  1014. onShipSelectEvent(shipid) {
  1015. this.selectShip = this.ships.find(item => {
  1016. return item.id == shipid
  1017. })
  1018. },
  1019. getCityName(encity) {
  1020. if (getLanguage() === 'zh') {
  1021. return getCnCity(encity)
  1022. }
  1023. return encity
  1024. },
  1025. getWeaName(enwea) {
  1026. if (getLanguage() === 'zh') {
  1027. return getCnWea(enwea)
  1028. }
  1029. return enwea
  1030. },
  1031. gotoNewRw(data) {
  1032. if (data === 'message') {
  1033. this.$router.push({
  1034. name: 'message',
  1035. query: {
  1036. types: data
  1037. }
  1038. })
  1039. } else {
  1040. this.$router.push({
  1041. name: 'workNotification',
  1042. query: {
  1043. types: data
  1044. }
  1045. })
  1046. }
  1047. },
  1048. test() {
  1049. console.log('testtesttesttest');
  1050. },
  1051. async test1() {
  1052. console.log('testtesttesttest111111');
  1053. },
  1054. async openPort() {
  1055. console.log('openPort', navigator);
  1056. if ('serial' in navigator) {
  1057. // The Web Serial API is supported.
  1058. console.log('the Web Serial API is supported.');
  1059. console.log(this.param);
  1060. const port = await navigator.serial.requestPort();
  1061. await port.open({
  1062. baudRate: this.param
  1063. }); // set baud rate
  1064. this.reader = port.readable.getReader();
  1065. // 监听来自串行设备的数据
  1066. while (true) {
  1067. const {
  1068. value,
  1069. done
  1070. } = await this.reader.read();
  1071. if (done) {
  1072. // 允许稍后关闭串口。
  1073. this.reader.releaseLock();
  1074. break;
  1075. }
  1076. console.log('value:', value);
  1077. var result = '';
  1078. var flag = false;
  1079. for (var i = value.length - 1; i >= 0; i--) {
  1080. var tmp = String.fromCharCode(value[i])
  1081. if (tmp == '=') {
  1082. flag = true
  1083. }
  1084. if (flag && result.length < 9 && tmp != '=') {
  1085. result += tmp
  1086. }
  1087. }
  1088. // setTimeout(1000)
  1089. if (parseInt(result)) {
  1090. console.log('result:', result);
  1091. this.text = parseInt(result)
  1092. }
  1093. console.log('this.text:', this.text);
  1094. // value 是一个 Uint8Array
  1095. }
  1096. await port.close();
  1097. } else {
  1098. console.log('the Web Serial API is not supported.', navigator);
  1099. }
  1100. },
  1101. async closePort() {
  1102. console.log('closePort');
  1103. this.reader.cancel()
  1104. }
  1105. }
  1106. }
  1107. </script>
  1108. <style lang="scss" scoped>
  1109. .home {
  1110. padding: 10px;
  1111. overflow-y: auto;
  1112. // background-color: #eee;
  1113. width: 100%;
  1114. height: calc(100vh - 60px);
  1115. .set-img {
  1116. width: 25px;
  1117. height: 25px;
  1118. position: fixed;
  1119. right: 0;
  1120. bottom: 99px;
  1121. z-index: 1000;
  1122. }
  1123. .shortcut-entrance {
  1124. width: 100%;
  1125. height: 60px;
  1126. background: #fff;
  1127. margin-bottom: 10px;
  1128. padding: 0 20px;
  1129. line-height: 60px;
  1130. display: flex;
  1131. justify-content: space-between;
  1132. align-items: center;
  1133. .shortcut-entrance-left {
  1134. font-size: 16px;
  1135. font-weight: bold;
  1136. color: #333333;
  1137. width: 50%;
  1138. overflow: hidden;
  1139. height: 100%;
  1140. }
  1141. .shortcut-entrance-right {
  1142. width: 14px;
  1143. height: 14px;
  1144. }
  1145. }
  1146. .body-middle {
  1147. display: flex;
  1148. width: 100%;
  1149. height: calc(100vh - 60px);
  1150. .body-middle-left {
  1151. width: 100%;
  1152. // margin-right: 10px;
  1153. .panel-list {
  1154. display: flex;
  1155. color: #ffffff;
  1156. text-shadow: 0px 1px 1px rgba(111, 52, 0, 0.55);
  1157. }
  1158. .ship-list-body {
  1159. position: relative;
  1160. width: 300px;
  1161. margin-top: 10px;
  1162. .shipList-box {
  1163. width: 85%;
  1164. margin: 0 auto;
  1165. .shipList-icon {
  1166. position: absolute;
  1167. top: 6px;
  1168. left: 0px;
  1169. }
  1170. .shipList-name {
  1171. cursor: context-menu;
  1172. font-size: 16px;
  1173. font-weight: bold;
  1174. line-height: 26px;
  1175. color: #333333;
  1176. max-width: 100px;
  1177. white-space: nowrap;
  1178. overflow: hidden;
  1179. text-overflow: ellipsis;
  1180. }
  1181. .shipList-address {
  1182. cursor: context-menu;
  1183. font-size: 14px;
  1184. color: #666666;
  1185. line-height: 35px;
  1186. }
  1187. .shipList-time {
  1188. cursor: context-menu;
  1189. font-size: 14px;
  1190. color: #666666;
  1191. line-height: 20px;
  1192. }
  1193. .ship-list-status {
  1194. cursor: context-menu;
  1195. margin-left: 20px;
  1196. padding: 5px 10px;
  1197. border-radius: 20px;
  1198. color: #fff;
  1199. max-width: 90px;
  1200. white-space: nowrap;
  1201. overflow: hidden;
  1202. text-overflow: ellipsis;
  1203. }
  1204. .bg0 {
  1205. background: #7ed321;
  1206. }
  1207. .bg1 {
  1208. background: #ff8f00;
  1209. }
  1210. .bg2 {
  1211. background: #495b61;
  1212. }
  1213. .bg3 {
  1214. background: #4fc3f7;
  1215. }
  1216. .bg4 {
  1217. background: #26a69a;
  1218. }
  1219. .bg5 {
  1220. background: #9c7fee;
  1221. }
  1222. .bg6 {
  1223. background: #ff5722;
  1224. }
  1225. .bg7 {
  1226. background: #8d6e63;
  1227. }
  1228. .bg8 {
  1229. background: #fadd60;
  1230. }
  1231. }
  1232. }
  1233. .notice-list {
  1234. width: calc(50% - 7px);
  1235. background: #fff;
  1236. margin-top: 10px;
  1237. // height: calc(100% - 180px);
  1238. // min-height: 460px;
  1239. border-radius: 4px;
  1240. // float: left;
  1241. }
  1242. .news-list {
  1243. width: calc(50% - 7px);
  1244. // float: left;
  1245. background: #fff;
  1246. margin-top: 10px;
  1247. // height: calc(100% - 180px);
  1248. height: 285px;
  1249. overflow: hidden;
  1250. // min-height: 460px;
  1251. border-radius: 4px;
  1252. // margin-right: 10px;
  1253. .new-list-box {
  1254. padding: 0 10px;
  1255. .new-list-body:first-child {
  1256. padding-bottom: 20px;
  1257. border-bottom: 1px solid #eeeeee;
  1258. }
  1259. .new-list-body:last-child {
  1260. padding-top: 20px;
  1261. }
  1262. }
  1263. .new-list-body {
  1264. width: 100%;
  1265. padding: 10px 0;
  1266. display: flex;
  1267. border-bottom: 1px solid #eeeeee;
  1268. // height: 50%;
  1269. overflow: hidden;
  1270. // padding: 10px;
  1271. // display: flex;
  1272. .new-list-img {
  1273. // height: 100%;
  1274. width: 160px;
  1275. height: 100px;
  1276. position: relative;
  1277. // margin-right: 20px;
  1278. .newsTJ {
  1279. position: absolute;
  1280. width: 54px;
  1281. height: 50px;
  1282. left: 0;
  1283. top: 0;
  1284. }
  1285. img {
  1286. width: 100%;
  1287. height: 100%;
  1288. display: block;
  1289. }
  1290. }
  1291. .new-list-title {
  1292. color: #343434;
  1293. line-height: 30px;
  1294. font-size: 14px;
  1295. font-weight: bold;
  1296. overflow: hidden;
  1297. text-overflow: ellipsis;
  1298. white-space: nowrap;
  1299. span {
  1300. cursor: pointer;
  1301. display: block;
  1302. }
  1303. }
  1304. .new-list-content {
  1305. color: #666666;
  1306. font-size: 12px;
  1307. line-height: 16px;
  1308. display: -webkit-box;
  1309. -webkit-box-orient: vertical;
  1310. -webkit-line-clamp: 3;
  1311. overflow: hidden;
  1312. height: 48px;
  1313. span {
  1314. cursor: pointer;
  1315. display: block;
  1316. }
  1317. }
  1318. .new-list-date {
  1319. color: #999999;
  1320. font-size: 12px;
  1321. text-align: right;
  1322. line-height: 22px;
  1323. span {
  1324. cursor: pointer;
  1325. display: block;
  1326. }
  1327. }
  1328. }
  1329. // .new-list-body:hover {
  1330. // background: #e2edfa;
  1331. // cursor: pointer;
  1332. // }
  1333. .no-line {
  1334. border-bottom: 0px solid #eeeeee;
  1335. }
  1336. }
  1337. .v-width {
  1338. width: calc(50% - 7px);
  1339. }
  1340. }
  1341. .body-middle-right {
  1342. width: calc(30% - 10px);
  1343. .notice-list {
  1344. height: 50%;
  1345. background: #fff;
  1346. width: 100%;
  1347. min-height: 300px;
  1348. border-radius: 4px;
  1349. .notice-list-body {
  1350. border-bottom: 1px solid #eeeeee;
  1351. padding: 20px 10px;
  1352. .notice-list-title {
  1353. color: #333333;
  1354. font-size: 14px;
  1355. font-weight: bold;
  1356. line-height: 18px;
  1357. overflow: hidden;
  1358. text-overflow: ellipsis;
  1359. white-space: nowrap;
  1360. }
  1361. .notice-list-type {
  1362. margin: 9px 0 12px 0;
  1363. color: #666666;
  1364. }
  1365. .notice-list-person {
  1366. color: #666666;
  1367. font-size: 12px;
  1368. }
  1369. .notice-list-date {
  1370. color: #666666;
  1371. font-size: 12px;
  1372. margin-top: 10px;
  1373. }
  1374. }
  1375. .notice-list-body:hover {
  1376. background: #e2edfa;
  1377. cursor: pointer;
  1378. }
  1379. .notice-body-height {
  1380. height: 50%;
  1381. }
  1382. .notice-body-height1 {
  1383. height: 20%;
  1384. }
  1385. }
  1386. .notice-list-height {
  1387. height: 100%;
  1388. min-height: 638px;
  1389. }
  1390. .ship-list {
  1391. height: calc(50% - 10px);
  1392. margin-top: 10px;
  1393. background: #fff;
  1394. width: 100%;
  1395. min-height: 327px;
  1396. border-radius: 4px;
  1397. .ship-list-body {
  1398. padding: 20px 0;
  1399. border-bottom: 1px solid #eeeeee;
  1400. .ship-list-head {
  1401. display: flex;
  1402. img {
  1403. width: 14px;
  1404. height: 14px;
  1405. }
  1406. .ship-list-name {
  1407. margin: 0 20px;
  1408. font-weight: bold;
  1409. }
  1410. .ship-list-status {
  1411. border-radius: 10px;
  1412. padding: 4px 8px;
  1413. color: #ffffff;
  1414. }
  1415. .bg0 {
  1416. background: #7ed321;
  1417. }
  1418. .bg1 {
  1419. background: #ff8f00;
  1420. }
  1421. .bg2 {
  1422. background: #495b61;
  1423. }
  1424. .bg3 {
  1425. background: #4fc3f7;
  1426. }
  1427. .bg4 {
  1428. background: #26a69a;
  1429. }
  1430. .bg5 {
  1431. background: #9c7fee;
  1432. }
  1433. .bg6 {
  1434. background: #ff5722;
  1435. }
  1436. .bg7 {
  1437. background: #8d6e63;
  1438. }
  1439. .bg8 {
  1440. background: #fadd60;
  1441. }
  1442. }
  1443. .ship-list-address {
  1444. margin: 10px 0 10px 34px;
  1445. color: #666666;
  1446. }
  1447. .ship-list-date {
  1448. color: #666666;
  1449. margin-left: 34px;
  1450. }
  1451. }
  1452. /*.ship-list-body:hover{*/
  1453. /* background: #e2edfa;*/
  1454. /*}*/
  1455. }
  1456. }
  1457. }
  1458. .body-middle-height {
  1459. height: calc(100vh - 80px);
  1460. }
  1461. .list-title {
  1462. width: 100%;
  1463. // background: #f3f9fe;
  1464. background: url('~@/assets/newhome/titilebg.png') no-repeat;
  1465. background-size: 100% 100%;
  1466. height: 44px;
  1467. padding: 0 20px;
  1468. display: flex;
  1469. line-height: 44px;
  1470. justify-content: space-between;
  1471. border-radius: 4px 4px 0 0;
  1472. .list-title-name {
  1473. font-size: 16px;
  1474. font-weight: bold;
  1475. color: #333333;
  1476. }
  1477. .list-title-more {
  1478. font-size: 14px;
  1479. color: #666666;
  1480. cursor: pointer;
  1481. display: flex;
  1482. }
  1483. }
  1484. }
  1485. .el-dropdown-menu {
  1486. margin-top: -20px !important;
  1487. /*left: 1872px !important;*/
  1488. }
  1489. .seamless-warp {
  1490. // width: 100%;
  1491. width: 100%;
  1492. overflow: hidden;
  1493. margin-top: 10px;
  1494. }
  1495. .home-tzthList:nth-of-type(3) {
  1496. border: none;
  1497. }
  1498. .home-tzthList {
  1499. display: flex;
  1500. padding: 10px;
  1501. border-bottom: 1px solid #eeeeee;
  1502. .home-tzthList-type {
  1503. width: 100%;
  1504. display: flex;
  1505. font-size: 14px;
  1506. line-height: 28px;
  1507. font-weight: bold;
  1508. .home-tzthList-type-title {
  1509. color: #343434;
  1510. margin: 0;
  1511. span {
  1512. cursor: pointer;
  1513. }
  1514. }
  1515. .home-tzthList-type-theme {
  1516. color: #666666;
  1517. margin: 0;
  1518. width: 80%;
  1519. overflow: hidden;
  1520. white-space: nowrap;
  1521. text-overflow: ellipsis;
  1522. span {
  1523. cursor: pointer;
  1524. }
  1525. }
  1526. }
  1527. .home-tzthList-people {
  1528. display: flex;
  1529. justify-content: space-between;
  1530. line-height: 22px;
  1531. .home-tzthList-Personnel,
  1532. .home-tzthList-timer {
  1533. font-size: 12px;
  1534. color: #666666;
  1535. span {
  1536. cursor: pointer;
  1537. }
  1538. }
  1539. }
  1540. }
  1541. .noMore {
  1542. position: absolute;
  1543. margin: auto;
  1544. top: 0;
  1545. bottom: 0;
  1546. left: 0;
  1547. right: 0;
  1548. }
  1549. .ship-list {
  1550. width: 100%;
  1551. border-radius: 4px;
  1552. background-color: #fff;
  1553. }
  1554. //新增的图表的样式
  1555. .chart {
  1556. display: flex;
  1557. flex-wrap: wrap;
  1558. justify-content: space-between;
  1559. margin-bottom: 10px;
  1560. }
  1561. .home-tzthList-timer-left {
  1562. width: 10%;
  1563. display: flex;
  1564. align-items: center;
  1565. img {
  1566. cursor: pointer;
  1567. width: 24px;
  1568. height: 24px;
  1569. display: block;
  1570. align-items: center;
  1571. margin: 0 auto;
  1572. }
  1573. }
  1574. .header {
  1575. // background: rgb(36, 38, 45);
  1576. background: #2a2a2a;
  1577. padding: 20px;
  1578. box-sizing: border-box;
  1579. display: flex;
  1580. justify-content: space-between;
  1581. align-items: center;
  1582. .right {
  1583. color: white;
  1584. font-weight: 700;
  1585. text-align: center;
  1586. .top {
  1587. font-size: 14px;
  1588. }
  1589. .bottom {
  1590. font-size: 26px;
  1591. }
  1592. }
  1593. }
  1594. .chart-card {
  1595. // background: rgb(36, 38, 45);
  1596. position: relative;
  1597. background: #2a2a2a;
  1598. width: 350px;
  1599. margin-top: 10px;
  1600. height: 288px;
  1601. // height: 288px;
  1602. }
  1603. .title2 {
  1604. pointer-events: auto;
  1605. display: flex;
  1606. align-items: center;
  1607. justify-content: flex-start;
  1608. color: rgb(255, 255, 255);
  1609. font-weight: bold;
  1610. font-family: "Microsoft Yahei", Arial, "sans-serif";
  1611. font-size: 15px;
  1612. writing-mode: horizontal-tb;
  1613. letter-spacing: 0px;
  1614. text-overflow: ellipsis;
  1615. white-space: nowrap;
  1616. overflow: hidden;
  1617. padding: 10px;
  1618. box-sizing: border-box;
  1619. }
  1620. .content2 {
  1621. // background-color: rgb(27, 28, 30);
  1622. display: flex;
  1623. margin-top: 10px;
  1624. height: calc(100% - 170px);
  1625. h3 {
  1626. pointer-events: auto;
  1627. display: flex;
  1628. align-items: center;
  1629. justify-content: flex-start;
  1630. color: rgb(204, 204, 204);
  1631. font-weight: bold;
  1632. font-family: "Microsoft Yahei", Arial, "sans-serif";
  1633. font-size: 24px;
  1634. writing-mode: horizontal-tb;
  1635. letter-spacing: 0px;
  1636. text-overflow: ellipsis;
  1637. white-space: nowrap;
  1638. overflow: hidden;
  1639. }
  1640. .center-map {
  1641. // background: yellow;
  1642. }
  1643. .content2-aside {
  1644. width: 360px;
  1645. // height: 288px;
  1646. // background: red;
  1647. }
  1648. .content2-middle {
  1649. width: calc(100% - 720px);
  1650. margin: 0 20px 0 15px;
  1651. .left-card {
  1652. display: flex;
  1653. // background: green;
  1654. justify-content: space-evenly;
  1655. .item {
  1656. background: #2a2a2a;
  1657. width: 28%;
  1658. height: 208px;
  1659. position: relative;
  1660. padding-left: 20px;
  1661. p:nth-of-type(1) {
  1662. color: #d5d5d5;
  1663. position: absolute;
  1664. bottom: 70px;
  1665. font-size: 16px;
  1666. }
  1667. p:nth-of-type(2) {
  1668. position: absolute;
  1669. bottom: 0px;
  1670. .number {
  1671. color: #50cad4;
  1672. font-size: 53px;
  1673. font-weight: 700;
  1674. }
  1675. .number-text {
  1676. color: #d5d5d5;
  1677. }
  1678. }
  1679. }
  1680. }
  1681. }
  1682. }
  1683. .home {
  1684. background: rgb(27, 28, 30);
  1685. padding-bottom: 20px
  1686. }
  1687. .home .body-middle-height {
  1688. height: auto;
  1689. }
  1690. .content2-map {
  1691. margin: 0;
  1692. }
  1693. .content3 {
  1694. display: flex;
  1695. justify-content: space-between;
  1696. align-items: center;
  1697. background: #2a2a2a;
  1698. padding: 10px 60px;
  1699. .content3-number {
  1700. margin-left: 40px;
  1701. }
  1702. .blue {
  1703. font-size: 30px;
  1704. color: #50cad4;
  1705. font-weight: 600;
  1706. }
  1707. .yellow {
  1708. font-size: 30px;
  1709. color: #ffa523;
  1710. font-weight: 600;
  1711. }
  1712. .left,
  1713. .right {
  1714. display: flex;
  1715. align-items: center;
  1716. color: #d5d5d5;
  1717. }
  1718. img {
  1719. display: inline-block;
  1720. width: 35px;
  1721. height: 35px;
  1722. }
  1723. }
  1724. .bottom-tip{
  1725. position: absolute;
  1726. z-index: 11;
  1727. color: #8c8c8d;
  1728. right: 10px;
  1729. bottom: 10px;
  1730. }
  1731. </style>