fixed bug
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div/>
|
<div/>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-divider content-position="right"></el-divider>
|
<el-divider content-position="right"/>
|
||||||
<!--<div class="sudoku_item " :class="curSelect==sudoku.id?'opacity':''" v-for="(sudoku,index) in sudokus" :key="index" @touchstart="touchstart(index)" @touchend="touchend">-->
|
<!--<div class="sudoku_item " :class="curSelect==sudoku.id?'opacity':''" v-for="(sudoku,index) in sudokus" :key="index" @touchstart="touchstart(index)" @touchend="touchend">-->
|
||||||
<!--<!–<img :src="sudoku.img_src" width="40" height="40" >–>-->
|
<!--<!–<img :src="sudoku.img_src" width="40" height="40" >–>-->
|
||||||
<!---->
|
<!---->
|
||||||
@@ -46,7 +46,10 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getFileList()
|
this.getFileList()
|
||||||
// this.timer = setInterval(this.getFileList(), 2 * 1000) // ANDON看板 5 分钟一刷新
|
this.timer = setInterval(this.getFileList, 60 * 60 * 1000) // 60 分钟一刷新
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
clearInterval(this.timer)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getFileList() {
|
async getFileList() {
|
||||||
@@ -59,12 +62,9 @@ export default {
|
|||||||
param: '角色编号=' + this.token
|
param: '角色编号=' + this.token
|
||||||
}
|
}
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
console.log(data, 1)
|
|
||||||
for (let i = 0; i < data.data.length; i++) {
|
for (let i = 0; i < data.data.length; i++) {
|
||||||
console.log(i, 99999)
|
|
||||||
this.getMessageNum(data.data[i].消息通知来源, data.data[i].通知条件, data, i)
|
this.getMessageNum(data.data[i].消息通知来源, data.data[i].通知条件, data, i)
|
||||||
}
|
}
|
||||||
console.log(this.sudokus, 998)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getMessageNum(tableName, condition, rawData, i) {
|
async getMessageNum(tableName, condition, rawData, i) {
|
||||||
@@ -76,6 +76,7 @@ export default {
|
|||||||
name: `select count(*) from ${tableName} where ${condition}`
|
name: `select count(*) from ${tableName} where ${condition}`
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.sudokus = []
|
||||||
this.sudokus.push({
|
this.sudokus.push({
|
||||||
id: rawData.data[i].主模块编号,
|
id: rawData.data[i].主模块编号,
|
||||||
name: rawData.data[i].标题,
|
name: rawData.data[i].标题,
|
||||||
|
|||||||
Reference in New Issue
Block a user