From f5389299d31e2236d399e48cfc1b09e5dd16f4c1 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 20 三月 2023 10:01:39 +0800
Subject: [PATCH] 1.看板样式优化
---
src/views/kb/kbCommon.css | 4
src/views/scgl/gd.vue | 2
src/views/kb/cgdd.vue | 43 +++++++++++++-
src/views/scgl/sckbg.vue | 18 +++---
src/views/kb/ckgl.vue | 42 +++++++++++++-
src/views/kb/zhkb.vue | 40 +++++++++++++
6 files changed, 130 insertions(+), 19 deletions(-)
diff --git a/src/views/kb/cgdd.vue b/src/views/kb/cgdd.vue
index a74a2fc..dd03174 100644
--- a/src/views/kb/cgdd.vue
+++ b/src/views/kb/cgdd.vue
@@ -10,9 +10,14 @@
<div class="kb_header">
<div class="flex_c_c kb_header_text">
<div id="topBarLeft" style="width:600px;height:100%" />
- 閲囪喘璺熻釜鐪嬫澘
+ 閲囪喘璺熻釜鏁板瓧鍖栫湅鏉�
<div id="topBarRight" style="width:600px;height:100%;transform:rotate(180deg);" />
</div>
+
+ <div class="kb_headTime" style="left: 85px">
+ <span>娴欐睙鏂板嚡杩暟瀛楃鎶�鑲′唤鏈夐檺鍏徃</span>
+ </div>
+
<div class="kb_headTime">
<span>{{ headTime }}</span>
</div>
@@ -258,6 +263,8 @@
name: 'Index2',
data() {
return {
+ onLine: navigator.onLine, // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
+
headTime: '',
purchaseLeftTopData: {},
@@ -279,9 +286,14 @@
// 涓ゅ皬鏃剁湅鏉垮埛鏂颁竴娆�
setInterval(() => {
window.location.reload()
- }, 1000 * 60 * 120)
+ }, 1000 * 60 * 60 * 10)
},
mounted() {
+ // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
+ window.addEventListener('online', this.updateOnlineStatus)
+ window.addEventListener('offline', this.updateOnlineStatus)
+ this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
+
this.getTopBar()
this.getEcharts()
this.getPurchaseLeftBottom()
@@ -289,8 +301,33 @@
this.setStarsRef()
},
-
+ beforeDestroy() {
+ window.removeEventListener('online', this.updateOnlineStatus)
+ window.removeEventListener('offline', this.updateOnlineStatus)
+ },
methods: {
+ // 鏇存柊缃戠粶鐘舵��
+ updateOnlineStatus(e) {
+ if (e.isFirst) {
+ // console.log('x')
+ } else {
+ const loading = this.$loading({
+ lock: true,
+ text: '鏂綉浜嗭紝姝e湪鎷煎懡鑱旂綉涓紝璇锋鏌ョ綉缁滄槸鍚︽甯�...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ const { type } = e
+ this.onLine = type === 'online'
+ if (this.onLine) {
+ loading.close()
+ this.$message.success('缃戠粶杩炴帴鎴愬姛锛�')
+ } else {
+ this.$message.error('缃戠粶鎺夌嚎锛岃鍏虫敞缃戠粶鐘舵�侊紒')
+ }
+ }
+ },
setStarsRef() {
const starNodes = Array.from(this.$refs.starsRef.children)
starNodes.forEach(item => {
diff --git a/src/views/kb/ckgl.vue b/src/views/kb/ckgl.vue
index 47426c4..4166ec8 100644
--- a/src/views/kb/ckgl.vue
+++ b/src/views/kb/ckgl.vue
@@ -10,9 +10,14 @@
<div class="kb_header">
<div class="flex_c_c kb_header_text">
<div id="topBarLeft" style="width:600px;height:100%" />
- 浠撳簱绠$悊鐪嬫澘
+ 浠撳簱绠$悊鏁板瓧鍖栫湅鏉�
<div id="topBarRight" style="width:600px;height:100%;transform:rotate(180deg);" />
</div>
+
+ <div class="kb_headTime" style="left: 85px">
+ <span>娴欐睙鏂板嚡杩暟瀛楃鎶�鑲′唤鏈夐檺鍏徃</span>
+ </div>
+
<div class="kb_headTime">
<span>{{ headTime }}</span>
</div>
@@ -338,6 +343,7 @@
data() {
return {
+ onLine: navigator.onLine, // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
headTime: '',
tableDataTop: [],
@@ -363,9 +369,14 @@
// 涓ゅ皬鏃剁湅鏉垮埛鏂颁竴娆�
setInterval(() => {
window.location.reload()
- }, 1000 * 60 * 120)
+ }, 1000 * 60 * 60 * 10)
},
mounted() {
+ // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
+ window.addEventListener('online', this.updateOnlineStatus)
+ window.addEventListener('offline', this.updateOnlineStatus)
+ this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
+
this.getTopBar()
this.getWareHouseTopLeftData()
@@ -373,8 +384,33 @@
this.getEcharts()
this.setStarsRef()
},
-
+ beforeDestroy() {
+ window.removeEventListener('online', this.updateOnlineStatus)
+ window.removeEventListener('offline', this.updateOnlineStatus)
+ },
methods: {
+ // 鏇存柊缃戠粶鐘舵��
+ updateOnlineStatus(e) {
+ if (e.isFirst) {
+ // console.log('x')
+ } else {
+ const loading = this.$loading({
+ lock: true,
+ text: '鏂綉浜嗭紝姝e湪鎷煎懡鑱旂綉涓紝璇锋鏌ョ綉缁滄槸鍚︽甯�...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ const { type } = e
+ this.onLine = type === 'online'
+ if (this.onLine) {
+ loading.close()
+ this.$message.success('缃戠粶杩炴帴鎴愬姛锛�')
+ } else {
+ this.$message.error('缃戠粶鎺夌嚎锛岃鍏虫敞缃戠粶鐘舵�侊紒')
+ }
+ }
+ },
setStarsRef() {
const starNodes = Array.from(this.$refs.starsRef.children)
starNodes.forEach(item => {
diff --git a/src/views/kb/kbCommon.css b/src/views/kb/kbCommon.css
index c6b66c0..f7c4ad6 100644
--- a/src/views/kb/kbCommon.css
+++ b/src/views/kb/kbCommon.css
@@ -47,8 +47,8 @@
.kb_headTime {
position: absolute;
- right: 10px;
- width: 360px;
+ right: 85px;
+ /*width: 360px;*/
height: 50px;
z-index: 10;
top: -20px;
diff --git a/src/views/kb/zhkb.vue b/src/views/kb/zhkb.vue
index 68fbcf4..485bd1d 100644
--- a/src/views/kb/zhkb.vue
+++ b/src/views/kb/zhkb.vue
@@ -12,6 +12,11 @@
杞﹂棿缁煎悎鏁板瓧鍖栫湅鏉�
<div id="topBarRight" style="width:600px;height:100%;transform:rotate(180deg);" />
</div>
+
+ <div class="kb_headTime" style="left: 85px">
+ <span>娴欐睙鏂板嚡杩暟瀛楃鎶�鑲′唤鏈夐檺鍏徃</span>
+ </div>
+
<div class="kb_headTime">
<span>{{ headTime }}</span>
</div>
@@ -291,6 +296,8 @@
name: 'Cjsc',
data() {
return {
+ onLine: navigator.onLine, // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
+
headTime: '',
tableDataRightTop: [],
tableDataRightTopTemp: [],
@@ -310,15 +317,46 @@
// 涓ゅ皬鏃剁湅鏉垮埛鏂颁竴娆�
setInterval(() => {
window.location.reload()
- }, 1000 * 60 * 120)
+ }, 1000 * 60 * 60 * 10)
},
mounted() {
+ // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
+ window.addEventListener('online', this.updateOnlineStatus)
+ window.addEventListener('offline', this.updateOnlineStatus)
+ this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
+
this.getTopBar()
this.getShopSearch()
this.setStarsRef()
},
+ beforeDestroy() {
+ window.removeEventListener('online', this.updateOnlineStatus)
+ window.removeEventListener('offline', this.updateOnlineStatus)
+ },
methods: {
+ // 鏇存柊缃戠粶鐘舵��
+ updateOnlineStatus(e) {
+ if (e.isFirst) {
+ // console.log('x')
+ } else {
+ const loading = this.$loading({
+ lock: true,
+ text: '鏂綉浜嗭紝姝e湪鎷煎懡鑱旂綉涓紝璇锋鏌ョ綉缁滄槸鍚︽甯�...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ const { type } = e
+ this.onLine = type === 'online'
+ if (this.onLine) {
+ loading.close()
+ this.$message.success('缃戠粶杩炴帴鎴愬姛锛�')
+ } else {
+ this.$message.error('缃戠粶鎺夌嚎锛岃鍏虫敞缃戠粶鐘舵�侊紒')
+ }
+ }
+ },
setStarsRef() {
const starNodes = Array.from(this.$refs.starsRef.children)
starNodes.forEach(item => {
diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index febde36..20002ba 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -2001,7 +2001,7 @@
defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
projectTableData: [], // 璁惧鍒楄〃
tableDataDetail: [], // 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
- printSize: 2,
+ printSize: 0,
printSizeSelectArr: [// 瀹�*楂�
{ code: 0, name: '80*50' },
{ code: 1, name: '78*60' },
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index 3f2aeba..55477ca 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -2173,11 +2173,11 @@
if (res.code === '200') {
this.dialogVisible = false
this.$message.success('鏀舵枡鎴愬姛锛�')
- if (this.dialogForm.nextstepcode === '') {
- // this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username)
- this.WXprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username)
- this.dialogVisible2 = true
- }
+ // if (this.dialogForm.nextstepcode === '') {
+ // this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username)
+ this.WXprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username)
+ this.dialogVisible2 = true
+ // }
this.tabClick()
this.$store.state.app.buttonIsDisabled = false
} else {
@@ -2272,10 +2272,10 @@
if (res.code === '200') {
this.dialogVisible = false
this.$message.success('鎶ュ伐鎴愬姛锛�')
- if (this.dialogForm.nextstepcode === '') {
- this.ZZprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username)
- this.dialogVisible2 = true
- }
+ // if (this.dialogForm.nextstepcode === '') {
+ this.ZZprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username)
+ this.dialogVisible2 = true
+ // }
this.tabClick()
this.$store.state.app.buttonIsDisabled = false
} else {
--
Gitblit v1.9.3