index.vue 54 KB

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