index.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  1. <!-- 首页模块 首页面 -->
  2. <template>
  3. <div class="home">
  4. <div class="body-middle"
  5. :class="{ 'body-middle-height': blockList[0].flag }">
  6. <div class="body-middle-left">
  7. <!-- 任务、消息、提醒、超期 -->
  8. <Panel :data-list="panelList"
  9. @click="gotoNewRw"></Panel>
  10. <div v-show="false">
  11. <el-input v-model="param"/>
  12. <el-button @click="openPort()">openPort</el-button>
  13. <el-button @click="closePort()">closePort</el-button>
  14. <div>{{text}}</div>
  15. </div>
  16. <img style='width:100%;margin-top:10px;' src="../../../public/img/tmt.gif" alt="">
  17. </div>
  18. </div>
  19. <div id="mapXY"></div>
  20. <!-- </ws-dialog> -->
  21. <!-- 第一次登陆的租户 -->
  22. <successfulDialog v-if="successfulDialog"
  23. :phone="phone"
  24. :successfulDialog="successfulDialog"
  25. @close="successfulDialogClose">
  26. </successfulDialog>
  27. <!-- 试用租户 -->
  28. <trialNotExpired v-if="trialNotExpired"
  29. :day="day"
  30. :phone="phone"
  31. :trialNotExpired="trialNotExpired"
  32. @close="trialNotExpiredClose">
  33. </trialNotExpired>
  34. </div>
  35. </template>
  36. <script>
  37. // import serialport from 'serialport'
  38. // 统计图start
  39. import maintenance from './components/maintenance'
  40. import shipCertificate from './components/shipCertificate'
  41. import sparePartsMaterial from './components/sparePartsMaterial'
  42. import procurement from './components/procurement'
  43. // 统计图end
  44. // 正式租户
  45. import successfulDialog from './components/successfulDialog'
  46. // 试用租户
  47. import trialNotExpired from './components/trialNotExpired'
  48. // 新 api
  49. import { noticeNumber, queryCircularManagementReceiveList, getStaffHomeShowList } from '@/model/home/index'
  50. import {
  51. getUserVesselList,
  52. findHottestRouting
  53. } from '@/model/indexRx'
  54. import News from './components/News'
  55. import ShipMap from './components/ShipMap'
  56. import { getCnCity, getCnWea } from './city'
  57. import { getLanguage } from '@/lang'
  58. import Panel from './components/Panel'
  59. import { getChangeLoginFlag } from '@/model/indexRx'
  60. import { zipDown } from '@/utils/batchDown'
  61. import { EventBus } from 'base-core-lib'
  62. import { mapActions, mapGetters, mapState } from 'vuex';
  63. export default {
  64. name: 'index',
  65. components: {
  66. News,
  67. ShipMap,
  68. Panel,
  69. successfulDialog,
  70. trialNotExpired,
  71. //统计图start
  72. maintenance,
  73. shipCertificate,
  74. sparePartsMaterial,
  75. procurement
  76. //统计图end
  77. },
  78. data () {
  79. return {
  80. showEchart: false,
  81. phone: '', // 正式租户电话号码
  82. day: '', //试用租户剩余天数
  83. trialNotExpired: false, //试用租户 剩余天数
  84. successfulDialog: false, //第一次登陆的弹窗
  85. mapXY: undefined,
  86. shipService: undefined,
  87. blockList: [
  88. {
  89. name: this.$t('home.shortcutEntrance'),
  90. flag: true
  91. },
  92. {
  93. name: this.$t('home.shipMap'),
  94. flag: true
  95. }
  96. ],
  97. newList: [],
  98. noticeList: [],
  99. routeList: [],
  100. showBlockList: [],
  101. shipList: [],
  102. setFlag: false,
  103. todoCount: '-',
  104. msgCount: '-',
  105. weather: undefined,
  106. ships: [],
  107. selectShip: undefined,
  108. isFullScreen: false,
  109. number: {
  110. task: 0,
  111. remind: 0,
  112. overdue: 0,
  113. news: 0
  114. },
  115. vesselBankFlag: localStorage.getItem('ws-pf_vesselBankFlag'),
  116. shezhiVal: '',
  117. text:'数据',
  118. reader:null,
  119. param:9600
  120. }
  121. },
  122. computed: {
  123. ...mapState({
  124. showVesslBankFlag: state => state.commonStore.showVesslBankFlag
  125. }),
  126. ...mapGetters(['userSetting']),
  127. /** 计算属性计算属性节点 */
  128. panelList () {
  129. return [
  130. {
  131. type: '0',
  132. task: this.$t('homeIndex.task'),
  133. url: require('@/assets/newhome/rw01.png'),
  134. number: this.number.task,
  135. background: require('@/assets/newhome/rw.png'),
  136. remark: '任务'
  137. },
  138. {
  139. type: 'message',
  140. task: this.$t('homeIndex.message'),
  141. url: require('@/assets/newhome/xx01.png'),
  142. number: this.number.news,
  143. background: require('@/assets/newhome/xx.png'),
  144. remark: '消息'
  145. },
  146. {
  147. type: '1',
  148. task: this.$t('homeIndex.remind'),
  149. url: require('@/assets/newhome/tx01.png'),
  150. number: this.number.remind,
  151. background: require('@/assets/newhome/tx.png'),
  152. remark: '提醒'
  153. },
  154. {
  155. type: '2',
  156. task: this.$t('homeIndex.beyond'),
  157. url: require('@/assets/newhome/cq01.png'),
  158. number: this.number.overdue,
  159. background: require('@/assets/newhome/cq.png'),
  160. remark: '超期'
  161. }
  162. ]
  163. },
  164. optionSingleHeightTime () {
  165. return {
  166. openWatch: true,
  167. limitMoveNum: -1, //启动无缝滚动最小数据量 this.dataList.length
  168. direction: 2,
  169. switchDelay: 1000
  170. }
  171. },
  172. getLanguage () {
  173. return this.$store.getters.language
  174. },
  175. isShowShipList () {
  176. return this.userSetting['shipMap'][0].showFlag && this.vesselBankFlag !== 'V' && this.permissionIf('map.mapManagement.view')
  177. },
  178. },
  179. async created () {
  180. //获取快捷路口列表
  181. this.getRouteList()
  182. // this.checkUserInfoDialog()
  183. },
  184. async mounted () {
  185. //获取新闻列表
  186. // this.getNewList()
  187. noticeNumber().toPromise().then(res => {
  188. const { task = 0, remind = 0, overdue = 0, news = 0 } = res
  189. this.number.task = task
  190. this.number.remind = remind
  191. this.number.overdue = overdue
  192. this.number.news = news
  193. })
  194. // if (this.vesselBankFlag !== 'V') {
  195. // EventBus.$emit('addShipScript', () => {
  196. // this.initShipMap()
  197. // })
  198. // }
  199. // setTimeout(() => {
  200. // this.showEchart = true
  201. // }, 900)
  202. // this.showBlockList = []
  203. // if (this.vesselBankFlag === 'V') {
  204. // this.$refs.noticeList.style.width = 'calc(50% - 7px)'
  205. // this.$refs.newsList.style.width = 'calc(50% - 7px)'
  206. // } else {
  207. // this.showBlockList = []
  208. // this.blockList[1].flag = false
  209. // this.$refs.noticeList.style.width = 'calc(50% - 7px)'
  210. // this.$refs.newsList.style.width = 'calc(50% - 7px)'
  211. // if (this.userSetting['shipMap'] && this.userSetting['shipMap'][0].showFlag) {
  212. // this.showBlockList.push('船舶动态')
  213. // this.blockList[1].flag = true
  214. // }
  215. // }
  216. },
  217. watch: {
  218. // getLanguage: function () {
  219. // this.getShipList()
  220. // }
  221. },
  222. methods: {
  223. ...mapActions('user', ['toSetShow', 'changeVesslBank']),
  224. // 下载通知通函
  225. downloadNotification (item) {
  226. zipDown({
  227. appendixIds: item.attachmentPath,
  228. baseUrl: this.$store.getters.baseInfo.fileUrl,
  229. zipName: item.theme
  230. })
  231. },
  232. /**
  233. * 校验各种弹框问题
  234. * @Desc 不是本人原意, 请不要骂我 谢谢. 请联系 "后台开发人员" 梳理逻辑
  235. */
  236. async checkUserInfoDialog () {
  237. const {
  238. statusFlag,
  239. loginInfo: { loginFlag = 0 },
  240. daysRemaining,
  241. customerServiceStaffPhone
  242. } = JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser'))
  243. if (statusFlag * 1 === 3) {
  244. // 判断后台返回的是空 还是 0 是空还是 0 的时候请求后台接口 不懂啥意思 为啥要这么弄
  245. if (!loginFlag && !localStorage.getItem('isShowTryUserDialog') * 1) {
  246. let newId = JSON.parse(localStorage.getItem('ws_login_accountId'))
  247. this.phone = customerServiceStaffPhone
  248. this.successfulDialog = true
  249. localStorage.setItem('isShowTryUserDialog', '1')
  250. await getChangeLoginFlag({ accountId: newId }).toPromise()
  251. }
  252. }
  253. // 试用租户
  254. const dayDialog = [30, 15, 7, 5, 3, 2, 1, 0]
  255. if (statusFlag * 1 === 2 && dayDialog.indexOf(daysRemaining) > -1 && !localStorage.getItem('isShowTryUserDialog') * 1) {
  256. this.day = daysRemaining
  257. this.phone = customerServiceStaffPhone
  258. this.trialNotExpired = true
  259. localStorage.setItem('isShowTryUserDialog', '1')
  260. }
  261. },
  262. trialNotExpiredClose () {
  263. this.trialNotExpired = false
  264. },
  265. //第一次登陆的弹窗
  266. successfulDialogClose () {
  267. this.successfulDialog = false
  268. },
  269. initShipMap () {
  270. var options = {
  271. ak: '57df9eaa033b44809d4bdaf919af457e',
  272. // 初始中心点坐标
  273. centerPoint: [30.171, 121.27],
  274. zoom: 3,
  275. minZoom: 2,
  276. maxZoom: 18,
  277. defaultMapType: 'MT_SEA', //默认海图
  278. // 公司版权信息( 支持html ),默认Elane Inc.
  279. attribution: {
  280. isShow: false,
  281. emptyString:
  282. '&copy;2019 <a class="shipxy_small"></a>&nbsp;<a>WinSea Inc.</a>'
  283. },
  284. measureCtrl: { isShow: false },
  285. mousePostionCtrl: { isShow: false },
  286. zoomControlElane: { isShow: true, position: 'bottomright' },
  287. zoomviewControl: { isShow: false, position: 'bottomright' },
  288. basemapsControl: { isShow: false, position: 'topright' },
  289. scaleCtrl: { isShow: true, position: 'bottomleft' }
  290. }
  291. // 创建地图示例
  292. // eslint-disable-next-line no-undef
  293. this.mapXY = new ShipxyAPI.Map('mapXY', options)
  294. // eslint-disable-next-line no-undef
  295. this.shipService = ShipxyAPI.ShipService(this.mapXY, {
  296. enableAreaShip: false,
  297. enableFleetShip: false,
  298. isAutoUpdateSrvtime: false,
  299. // delayTime: 5000,
  300. lableFont: ['500 12px Arial', '500 12px 宋体'], // 船舶名称,文字字体,默认值:["600 12px Arial", "500 12px Arial"]
  301. lableTxtColor: ['#fff', '#fff'], // 船舶名称,文字颜色,默认值:["#000","#fff"]
  302. lableLineColor: ['rgba(1, 30, 62, 0)', 'rgba(1, 30, 62, 0)'], // 边框颜色,默认值:["#000","#000"]
  303. lableLinefillColor: ['rgba(0, 0, 0, 0.6)', 'rgba(0, 0, 0, 0.6)'], // 框内填充颜色,默认值:[null,null]
  304. obliqueLineColor: ['#000', '#000'], // 船舶名称,斜线颜色,默认值:[null,null]
  305. dShipColor: '#FF6437', // D+船颜色,默认:#ff6347
  306. zoomLevel_data: 1,
  307. zoomLevel_base: 1,
  308. getAreaShipsCallBack: (call) => {
  309. // console.info(call, 'getAreaShipsCallBack')
  310. },
  311. drawShipsEndCallBack: (call) => {
  312. // console.info(call, 'drawShipsEndCallBack')
  313. }
  314. })
  315. this.shipService.setPointerEvents(true)
  316. window.shipService = this.shipService
  317. //获取船舶列表
  318. this.getShipList()
  319. },
  320. toRoute (url) {
  321. this.$router.push(url)
  322. },
  323. toSetShow () {
  324. this.showBlockList = []
  325. this.setFlag = true
  326. // getStaffHomeShowList({
  327. // staffId: localStorage.getItem('ws-pf_userId')
  328. // }).toPromise().then(data => {
  329. // for (let i = 0; i < data.length; i++) {
  330. // if (data[i].typeId === 'shipMap' && data[i].showFlag) {
  331. // this.showBlockList.push('船舶动态')
  332. // } else {
  333. // this.showBlockList = []
  334. // }
  335. // }
  336. // })
  337. },
  338. toMap () {
  339. this.$router.push('/map/trajectory_child')
  340. },
  341. goNews () {
  342. this.$router.push('/news/noticeType')
  343. },
  344. goNewsDetail (id) {
  345. this.$router.push('/news/noticeDetails?id=' + id)
  346. },
  347. goNotice (data) {
  348. this.$router.push({
  349. name: 'notificationItDetail',
  350. query: { id: data.id }
  351. })
  352. },
  353. goNoticeMore () {
  354. this.$router.push('/notice/notificationCircularReleasedIt_child')
  355. },
  356. toHide (index) {
  357. this.changeVesslBank([{
  358. id: this.userSetting['shipMap'][0].id,
  359. staffId: localStorage.getItem('ws-pf_userId'),
  360. typeId: 'shipMap',
  361. showFlag: false
  362. }])
  363. },
  364. getRouteList () {
  365. let data = {
  366. accountId: localStorage.getItem('ws-pf_userId'),
  367. pageSize: 30
  368. }
  369. findHottestRouting(data).toPromise().then(res => {
  370. this.routeList = res
  371. if (res.length == 0) {
  372. this.blockList[0].flag = false
  373. }
  374. })
  375. },
  376. //获取新闻
  377. getNewList () {
  378. let data = {
  379. currentPage: 1,
  380. pageSize: 2,
  381. loginUserId: localStorage.getItem('ws-pf_userId'),
  382. compId: localStorage.getItem('ws-pf_compId'),
  383. releaseFlag: 0
  384. }
  385. // queryHomePage(data).toPromise().then(resNewList => {
  386. // for (let i of resNewList) {
  387. // i.content = '<p>' + i.content.replace(/<[^>]+>/g, '') + '</p>'
  388. // }
  389. // this.newList = resNewList
  390. // for (let i of this.newList) {
  391. // if (i.ossCoverUrl && i.ossCoverUrl.length > 0) {
  392. // } else {
  393. // this.$set(
  394. // i,
  395. // 'imgUrl',
  396. // require('@/assets/images/page/home/noImg.png')
  397. // )
  398. // }
  399. // }
  400. // })
  401. },
  402. //获取通知通函
  403. // getNoticeList () {
  404. // let pagesize = Math.floor((this.$refs.noticeList.clientHeight - 44) / 80)
  405. // let data = {
  406. // currentPage: 1,
  407. // pageSize: pagesize || 3,
  408. // vesselDeptId:
  409. // localStorage.getItem('ws-pf_vesselBankFlag') === 'V'
  410. // ? localStorage.getItem('ws-pf_vesselId')
  411. // : localStorage.getItem('ws-pf_deptId'),
  412. // compId: localStorage.getItem('ws-pf_compId')
  413. // }
  414. // // TODO: 【此处有问题】接口变更的不对
  415. // queryCircularManagementReceiveList(data)
  416. // .toPromise()
  417. // .then(response => {
  418. // this.noticeList = response.records
  419. // })
  420. // },
  421. // 获取船舶状态
  422. getNaviStatusStr (t) {
  423. var array = [
  424. this.$t('home.navistatus0'),
  425. this.$t('home.navistatus1'),
  426. this.$t('home.navistatus2'),
  427. this.$t('home.navistatus3'),
  428. this.$t('home.navistatus4'),
  429. this.$t('home.navistatus5'),
  430. this.$t('home.navistatus6'),
  431. this.$t('home.navistatus7'),
  432. this.$t('home.navistatus8')
  433. ]
  434. if (t >= 0 && t <= 8) {
  435. return array[t]
  436. }
  437. return ''
  438. },
  439. // 获取船舶状态
  440. getNaviStatusBg (t) {
  441. var array = [
  442. 'bg0',
  443. 'bg1',
  444. 'bg2',
  445. 'bg3',
  446. 'bg4',
  447. 'bg5',
  448. 'bg6',
  449. 'bg7',
  450. 'bg8'
  451. ]
  452. if (t >= 0 && t <= 8) {
  453. return array[t]
  454. }
  455. return ''
  456. },
  457. getShipList () {
  458. getUserVesselList({ vesselStatus: 'UNDER_CONTROL' }).toPromise().then(res => {
  459. this.shipList = []
  460. let num = res.length > 10 ? 10 : res.length
  461. let obj = {}
  462. for (let i = 0; i < num; i++) {
  463. if (res[i].mmsiCode && res[i].mmsiCode.length > 0) {
  464. obj = this.shipService.getShipByMmsi(res[i].mmsiCode)
  465. ? this.shipService.getShipByMmsi(res[i].mmsiCode)
  466. : {}
  467. obj.vesselName = res[i].vesselName
  468. this.shipList.push(obj)
  469. }
  470. }
  471. //我想不出还有什么招了:临时解决办法
  472. const oldList = this.shipList
  473. for (let i = 1; i < 5; i++) {
  474. oldList.forEach(item => {
  475. this.shipList.push(item)
  476. })
  477. }
  478. })
  479. },
  480. onTodoClick () {
  481. this.$router.push({ name: 'workNotification' })
  482. },
  483. onMsgClick () {
  484. this.$router.push({ name: 'message' })
  485. },
  486. onChange (list) { },
  487. onShipMenuItemClick (ship) {
  488. this.selectShip = ship
  489. if (ship) {
  490. this.$refs.shipMap.selectShip(ship.id)
  491. } else {
  492. this.$refs.shipMap.unSelectShip()
  493. }
  494. },
  495. onFullScreen () {
  496. this.isFullScreen = !this.isFullScreen
  497. },
  498. onNoticeMoreBtnClick () {
  499. this.$router.push({
  500. name: 'notice'
  501. })
  502. },
  503. onShipSelectEvent (shipid) {
  504. this.selectShip = this.ships.find(item => {
  505. return item.id == shipid
  506. })
  507. },
  508. getCityName (encity) {
  509. if (getLanguage() === 'zh') {
  510. return getCnCity(encity)
  511. }
  512. return encity
  513. },
  514. getWeaName (enwea) {
  515. if (getLanguage() === 'zh') {
  516. return getCnWea(enwea)
  517. }
  518. return enwea
  519. },
  520. gotoNewRw (data) {
  521. if (data === 'message') {
  522. this.$router.push({ name: 'message', query: { types: data } })
  523. } else {
  524. this.$router.push({ name: 'workNotification', query: { types: data } })
  525. }
  526. },
  527. test(){
  528. console.log('testtesttesttest');
  529. },
  530. async test1(){
  531. console.log('testtesttesttest111111');
  532. },
  533. async openPort(){
  534. console.log('openPort',navigator);
  535. if ('serial' in navigator) {
  536. // The Web Serial API is supported.
  537. console.log('the Web Serial API is supported.');
  538. console.log(this.param);
  539. const port = await navigator.serial.requestPort();
  540. await port.open({ baudRate: this.param }); // set baud rate
  541. this.reader = port.readable.getReader();
  542. // 监听来自串行设备的数据
  543. while (true) {
  544. const { value, done } = await this.reader.read();
  545. if (done) {
  546. // 允许稍后关闭串口。
  547. this.reader.releaseLock();
  548. break;
  549. }
  550. console.log('value:',value);
  551. var result='';
  552. var flag = false;
  553. for (var i = value.length - 1; i >= 0; i--) {
  554. var tmp = String.fromCharCode(value[i])
  555. if (tmp == '=') {
  556. flag = true
  557. }
  558. if (flag && result.length < 9 && tmp != '=') {
  559. result += tmp
  560. }
  561. }
  562. setTimeout(1000)
  563. if(parseInt(result)){
  564. console.log('result:',result);
  565. this.text = parseInt(result)
  566. }
  567. console.log('this.text:',this.text);
  568. // value 是一个 Uint8Array
  569. }
  570. await port.close();
  571. }
  572. else{
  573. console.log('the Web Serial API is not supported.',navigator);
  574. }
  575. },
  576. async closePort(){
  577. console.log('closePort');
  578. this.reader.cancel()
  579. }
  580. }
  581. }
  582. </script>
  583. <style lang="scss" scoped>
  584. .home {
  585. padding: 10px;
  586. overflow-y: auto;
  587. // background-color: #eee;
  588. width: 100%;
  589. height: calc(100vh - 60px);
  590. .set-img {
  591. width: 25px;
  592. height: 25px;
  593. position: fixed;
  594. right: 0;
  595. bottom: 99px;
  596. z-index: 1000;
  597. }
  598. .shortcut-entrance {
  599. width: 100%;
  600. height: 60px;
  601. background: #fff;
  602. margin-bottom: 10px;
  603. padding: 0 20px;
  604. line-height: 60px;
  605. display: flex;
  606. justify-content: space-between;
  607. align-items: center;
  608. .shortcut-entrance-left {
  609. font-size: 16px;
  610. font-weight: bold;
  611. color: #333333;
  612. width: 50%;
  613. overflow: hidden;
  614. height: 100%;
  615. }
  616. .shortcut-entrance-right {
  617. width: 14px;
  618. height: 14px;
  619. }
  620. }
  621. .body-middle {
  622. display: flex;
  623. width: 100%;
  624. height: calc(100vh - 60px);
  625. .body-middle-left {
  626. width: 100%;
  627. // margin-right: 10px;
  628. .panel-list {
  629. display: flex;
  630. color: #ffffff;
  631. text-shadow: 0px 1px 1px rgba(111, 52, 0, 0.55);
  632. }
  633. .ship-list-body {
  634. position: relative;
  635. width: 300px;
  636. margin-top: 10px;
  637. .shipList-box {
  638. width: 85%;
  639. margin: 0 auto;
  640. .shipList-icon {
  641. position: absolute;
  642. top: 6px;
  643. left: 0px;
  644. }
  645. .shipList-name {
  646. cursor: context-menu;
  647. font-size: 16px;
  648. font-weight: bold;
  649. line-height: 26px;
  650. color: #333333;
  651. max-width: 100px;
  652. white-space: nowrap;
  653. overflow: hidden;
  654. text-overflow: ellipsis;
  655. }
  656. .shipList-address {
  657. cursor: context-menu;
  658. font-size: 14px;
  659. color: #666666;
  660. line-height: 35px;
  661. }
  662. .shipList-time {
  663. cursor: context-menu;
  664. font-size: 14px;
  665. color: #666666;
  666. line-height: 20px;
  667. }
  668. .ship-list-status {
  669. cursor: context-menu;
  670. margin-left: 20px;
  671. padding: 5px 10px;
  672. border-radius: 20px;
  673. color: #fff;
  674. max-width: 90px;
  675. white-space: nowrap;
  676. overflow: hidden;
  677. text-overflow: ellipsis;
  678. }
  679. .bg0 {
  680. background: #7ed321;
  681. }
  682. .bg1 {
  683. background: #ff8f00;
  684. }
  685. .bg2 {
  686. background: #495b61;
  687. }
  688. .bg3 {
  689. background: #4fc3f7;
  690. }
  691. .bg4 {
  692. background: #26a69a;
  693. }
  694. .bg5 {
  695. background: #9c7fee;
  696. }
  697. .bg6 {
  698. background: #ff5722;
  699. }
  700. .bg7 {
  701. background: #8d6e63;
  702. }
  703. .bg8 {
  704. background: #fadd60;
  705. }
  706. }
  707. }
  708. .notice-list {
  709. width: calc(50% - 7px);
  710. background: #fff;
  711. margin-top: 10px;
  712. // height: calc(100% - 180px);
  713. // min-height: 460px;
  714. border-radius: 4px;
  715. // float: left;
  716. }
  717. .news-list {
  718. width: calc(50% - 7px);
  719. // float: left;
  720. background: #fff;
  721. margin-top: 10px;
  722. // height: calc(100% - 180px);
  723. height: 285px;
  724. overflow: hidden;
  725. // min-height: 460px;
  726. border-radius: 4px;
  727. // margin-right: 10px;
  728. .new-list-box {
  729. padding: 0 10px;
  730. .new-list-body:first-child {
  731. padding-bottom: 20px;
  732. border-bottom: 1px solid #eeeeee;
  733. }
  734. .new-list-body:last-child {
  735. padding-top: 20px;
  736. }
  737. }
  738. .new-list-body {
  739. width: 100%;
  740. padding: 10px 0;
  741. display: flex;
  742. border-bottom: 1px solid #eeeeee;
  743. // height: 50%;
  744. overflow: hidden;
  745. // padding: 10px;
  746. // display: flex;
  747. .new-list-img {
  748. // height: 100%;
  749. width: 160px;
  750. height: 100px;
  751. position: relative;
  752. // margin-right: 20px;
  753. .newsTJ {
  754. position: absolute;
  755. width: 54px;
  756. height: 50px;
  757. left: 0;
  758. top: 0;
  759. }
  760. img {
  761. width: 100%;
  762. height: 100%;
  763. display: block;
  764. }
  765. }
  766. .new-list-title {
  767. color: #343434;
  768. line-height: 30px;
  769. font-size: 14px;
  770. font-weight: bold;
  771. overflow: hidden;
  772. text-overflow: ellipsis;
  773. white-space: nowrap;
  774. span {
  775. cursor: pointer;
  776. display: block;
  777. }
  778. }
  779. .new-list-content {
  780. color: #666666;
  781. font-size: 12px;
  782. line-height: 16px;
  783. display: -webkit-box;
  784. -webkit-box-orient: vertical;
  785. -webkit-line-clamp: 3;
  786. overflow: hidden;
  787. height: 48px;
  788. span {
  789. cursor: pointer;
  790. display: block;
  791. }
  792. }
  793. .new-list-date {
  794. color: #999999;
  795. font-size: 12px;
  796. text-align: right;
  797. line-height: 22px;
  798. span {
  799. cursor: pointer;
  800. display: block;
  801. }
  802. }
  803. }
  804. // .new-list-body:hover {
  805. // background: #e2edfa;
  806. // cursor: pointer;
  807. // }
  808. .no-line {
  809. border-bottom: 0px solid #eeeeee;
  810. }
  811. }
  812. .v-width {
  813. width: calc(50% - 7px);
  814. }
  815. }
  816. .body-middle-right {
  817. width: calc(30% - 10px);
  818. .notice-list {
  819. height: 50%;
  820. background: #fff;
  821. width: 100%;
  822. min-height: 300px;
  823. border-radius: 4px;
  824. .notice-list-body {
  825. border-bottom: 1px solid #eeeeee;
  826. padding: 20px 10px;
  827. .notice-list-title {
  828. color: #333333;
  829. font-size: 14px;
  830. font-weight: bold;
  831. line-height: 18px;
  832. overflow: hidden;
  833. text-overflow: ellipsis;
  834. white-space: nowrap;
  835. }
  836. .notice-list-type {
  837. margin: 9px 0 12px 0;
  838. color: #666666;
  839. }
  840. .notice-list-person {
  841. color: #666666;
  842. font-size: 12px;
  843. }
  844. .notice-list-date {
  845. color: #666666;
  846. font-size: 12px;
  847. margin-top: 10px;
  848. }
  849. }
  850. .notice-list-body:hover {
  851. background: #e2edfa;
  852. cursor: pointer;
  853. }
  854. .notice-body-height {
  855. height: 50%;
  856. }
  857. .notice-body-height1 {
  858. height: 20%;
  859. }
  860. }
  861. .notice-list-height {
  862. height: 100%;
  863. min-height: 638px;
  864. }
  865. .ship-list {
  866. height: calc(50% - 10px);
  867. margin-top: 10px;
  868. background: #fff;
  869. width: 100%;
  870. min-height: 327px;
  871. border-radius: 4px;
  872. .ship-list-body {
  873. padding: 20px 0;
  874. border-bottom: 1px solid #eeeeee;
  875. .ship-list-head {
  876. display: flex;
  877. img {
  878. width: 14px;
  879. height: 14px;
  880. }
  881. .ship-list-name {
  882. margin: 0 20px;
  883. font-weight: bold;
  884. }
  885. .ship-list-status {
  886. border-radius: 10px;
  887. padding: 4px 8px;
  888. color: #ffffff;
  889. }
  890. .bg0 {
  891. background: #7ed321;
  892. }
  893. .bg1 {
  894. background: #ff8f00;
  895. }
  896. .bg2 {
  897. background: #495b61;
  898. }
  899. .bg3 {
  900. background: #4fc3f7;
  901. }
  902. .bg4 {
  903. background: #26a69a;
  904. }
  905. .bg5 {
  906. background: #9c7fee;
  907. }
  908. .bg6 {
  909. background: #ff5722;
  910. }
  911. .bg7 {
  912. background: #8d6e63;
  913. }
  914. .bg8 {
  915. background: #fadd60;
  916. }
  917. }
  918. .ship-list-address {
  919. margin: 10px 0 10px 34px;
  920. color: #666666;
  921. }
  922. .ship-list-date {
  923. color: #666666;
  924. margin-left: 34px;
  925. }
  926. }
  927. /*.ship-list-body:hover{*/
  928. /* background: #e2edfa;*/
  929. /*}*/
  930. }
  931. }
  932. }
  933. .body-middle-height {
  934. height: calc(100vh - 70px);
  935. }
  936. .list-title {
  937. width: 100%;
  938. // background: #f3f9fe;
  939. background: url('~@/assets/newhome/titilebg.png') no-repeat;
  940. background-size: 100% 100%;
  941. height: 44px;
  942. padding: 0 20px;
  943. display: flex;
  944. line-height: 44px;
  945. justify-content: space-between;
  946. border-radius: 4px 4px 0 0;
  947. .list-title-name {
  948. font-size: 16px;
  949. font-weight: bold;
  950. color: #333333;
  951. }
  952. .list-title-more {
  953. font-size: 14px;
  954. color: #666666;
  955. cursor: pointer;
  956. display: flex;
  957. }
  958. }
  959. }
  960. .el-dropdown-menu {
  961. margin-top: -20px !important;
  962. /*left: 1872px !important;*/
  963. }
  964. .seamless-warp {
  965. // width: 100%;
  966. width: 100%;
  967. overflow: hidden;
  968. margin-top: 10px;
  969. }
  970. .home-tzthList:nth-of-type(3) {
  971. border: none;
  972. }
  973. .home-tzthList {
  974. display: flex;
  975. padding: 10px;
  976. border-bottom: 1px solid #eeeeee;
  977. .home-tzthList-type {
  978. width: 100%;
  979. display: flex;
  980. font-size: 14px;
  981. line-height: 28px;
  982. font-weight: bold;
  983. .home-tzthList-type-title {
  984. color: #343434;
  985. margin: 0;
  986. span {
  987. cursor: pointer;
  988. }
  989. }
  990. .home-tzthList-type-theme {
  991. color: #666666;
  992. margin: 0;
  993. width: 80%;
  994. overflow: hidden;
  995. white-space: nowrap;
  996. text-overflow: ellipsis;
  997. span {
  998. cursor: pointer;
  999. }
  1000. }
  1001. }
  1002. .home-tzthList-people {
  1003. display: flex;
  1004. justify-content: space-between;
  1005. line-height: 22px;
  1006. .home-tzthList-Personnel,
  1007. .home-tzthList-timer {
  1008. font-size: 12px;
  1009. color: #666666;
  1010. span {
  1011. cursor: pointer;
  1012. }
  1013. }
  1014. }
  1015. }
  1016. .noMore {
  1017. position: absolute;
  1018. margin: auto;
  1019. top: 0;
  1020. bottom: 0;
  1021. left: 0;
  1022. right: 0;
  1023. }
  1024. .ship-list {
  1025. width: 100%;
  1026. border-radius: 4px;
  1027. background-color: #fff;
  1028. }
  1029. //新增的图表的样式
  1030. .chart {
  1031. display: flex;
  1032. flex-wrap: wrap;
  1033. justify-content: space-between;
  1034. margin-bottom: 10px;
  1035. }
  1036. .home-tzthList-timer-left {
  1037. width: 10%;
  1038. display: flex;
  1039. align-items: center;
  1040. img {
  1041. cursor: pointer;
  1042. width: 24px;
  1043. height: 24px;
  1044. display: block;
  1045. align-items: center;
  1046. margin: 0 auto;
  1047. }
  1048. }
  1049. </style>