index.vue 54 KB

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