diff --git a/src/assets/img/school.png b/src/assets/img/school.png new file mode 100644 index 0000000..fdd4ae9 Binary files /dev/null and b/src/assets/img/school.png differ diff --git a/src/layouts/footer/index.vue b/src/layouts/footer/index.vue index 316b4f8..f7203a3 100644 --- a/src/layouts/footer/index.vue +++ b/src/layouts/footer/index.vue @@ -1,6 +1,8 @@ - + + 粤ICP备20072679号 + \ No newline at end of file diff --git a/src/pages/data/list/index.vue b/src/pages/data/list/index.vue index da5c024..476de05 100644 --- a/src/pages/data/list/index.vue +++ b/src/pages/data/list/index.vue @@ -1,11 +1,5 @@ - - - - - - @@ -81,14 +75,19 @@ - - + + + + {{scope.row.startTime}}-{{scope.row.endTime}} + + + {{scope.row.dataSize}}M - - + + 预览 下载 @@ -148,6 +147,7 @@ import { mapState } from 'vuex' import axios from 'axios' import util from '@/libs/util' import Setting from '@/setting' +import bus from '@/libs/bus' let startTimeLimit = '' let endTimeLimit = '' @@ -156,13 +156,12 @@ export default { return { that: this, token: util.local.get(Setting.tokenKey), - keyword: '', - searchTimer: null, typeId: this.$route.query.typeId, typeList: [], defaultType: '', defaultOpenType: [], introduce: '', + keyword: '', listData: [], listDataAll: [], searchListData: [], @@ -215,15 +214,12 @@ export default { 'schoolId' ]), }, - watch: { - keyword: function(val) { - clearTimeout(this.searchTimer) - this.searchTimer = setTimeout(() => { - this.initData() - },500) - } - }, mounted() { + bus.$on('initData',keyword => { + this.keyword = keyword + this.initData() + }) + this.getType() if(this.$route.query.download){ this.download({ @@ -290,6 +286,7 @@ export default { this.$post(`${this.api.getIdQueryTable}?categoryId=${this.defaultType}&showName=${this.keyword}&pageNum=${this.page}&pageSize=${this.pageSize}&updateTime=`).then(res => { this.listData = res.pageList.records this.total = res.pageList.total + this.listData.length && this.preview(this.listData[0],1) }).catch(res => {}) }, initData(){ @@ -326,25 +323,30 @@ export default { this.previewData = [] this.initData() }, + findId(data,id){ + let result = '' + data.forEach(n => { + if(n.id == id){ + if(n.children[0].children.length){ + return result = n.children[0].children[0].id + }else{ + return result = n.children[0].id + } + }else{ + this.findId(n.children,id) + } + }) + return result + }, openType(index,indexPath){ - let typeList = this.typeList - let firstChild = typeList.find(n => n.id == index) - let id = '' - if(firstChild){ - id = firstChild.children[0].id - }else{ - typeList.map(n => { - n.children.map(n => { - if(n.id == index) id = n.children[0].id - }) - }) - } + console.log(11,this.typeList) + let id = this.findId(this.typeList,index) this.selectType(id,indexPath) }, previewCurrentChange(val){ this.currentRow = val }, - preview(row){ + preview(row,isDefault){ this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => { this.$post(this.api.saveRecord,{ tableId: row.id, @@ -365,7 +367,7 @@ export default { } }) this.previewData = data - this.$nextTick(() => { + isDefault || this.$nextTick(() => { document.querySelector('#previewTable').scrollIntoView() }) @@ -492,41 +494,6 @@ export default {