index.vue 28 KB

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