|
@@ -237,7 +237,7 @@
|
|
|
nowTime: null, //存放时分秒变量
|
|
|
timer: '', //定义一个定时器的变量
|
|
|
currentTime: new Date(), // 获取当前时间
|
|
|
- timer: '',
|
|
|
+ timer1: '',
|
|
|
dialogVisible: false,
|
|
|
showEchart: false,
|
|
|
phone: '', // 正式租户电话号码
|
|
@@ -360,6 +360,7 @@
|
|
|
// this.checkUserInfoDialog()
|
|
|
// {
|
|
|
this.timer = setInterval(this.getTime, 1000);
|
|
|
+ this.timer1 = setInterval(this.flushData, 120000);
|
|
|
// }
|
|
|
},
|
|
|
beforeDestroy() {
|
|
@@ -367,6 +368,10 @@
|
|
|
if (this.timer) {
|
|
|
clearInterval(this.timer); // 在Vue实例销毁前,清除定时器
|
|
|
}
|
|
|
+ clearInterval(this.timer1);
|
|
|
+ if (this.timer1) {
|
|
|
+ clearInterval(this.timer1); // 在Vue实例销毁前,清除定时器
|
|
|
+ }
|
|
|
},
|
|
|
async mounted() {
|
|
|
var staffId = JSON.parse(localStorage.getItem('winseaview-userInfo')).content.staffId
|
|
@@ -406,6 +411,7 @@
|
|
|
// this.getNewList()
|
|
|
gChartsData({
|
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ loadingstatus: 1,
|
|
|
seachMoth: '2022'
|
|
|
}).toPromise().then(res => {
|
|
|
console.log('··············', res)
|
|
@@ -453,6 +459,27 @@
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions('user', ['toSetShow', 'changeVesslBank']),
|
|
|
+ flushData(){
|
|
|
+ gChartsData({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ loadingstatus: 1,
|
|
|
+ seachMoth: '2022'
|
|
|
+ }).toPromise().then(res => {
|
|
|
+ console.log('··············', res)
|
|
|
+ this.chartsData = res
|
|
|
+ this.carCount1 = res[6].biViewInfoList[0].count
|
|
|
+ this.carCount2 = res[6].biViewInfoList[1].count
|
|
|
+ this.carCount3 = res[6].biViewInfoList[2].count
|
|
|
+ this.physicalInventory = Number(res[7].biViewInfoList[0].count).toFixed(2)
|
|
|
+ this.procurementPending= Number(res[7].biViewInfoList[1].count).toFixed(2)
|
|
|
+ this.salesPending = Number(res[7].biViewInfoList[2].count).toFixed(2)
|
|
|
+ this.position = Number(Number(this.physicalInventory)+Number(this.procurementPending) - Number(this.salesPending)).toFixed(2)
|
|
|
+ this.totalReserves = res[8].biViewInfoList
|
|
|
+ this.mapInfo = res[9]
|
|
|
+ console.log(res)
|
|
|
+ this.initCharts()
|
|
|
+ })
|
|
|
+ },
|
|
|
getChartsData() {
|
|
|
noticeNumber().toPromise().then(res => {
|
|
|
const {
|