diff --git a/config.js b/config.js index 173ec12..87431d7 100644 --- a/config.js +++ b/config.js @@ -2,7 +2,7 @@ module.exports = { // baseUrl: 'https://www.nuoyunr.com/admin-api', baseUrl: 'http://127.0.0.1:48080/admin-api', - // baseUrl: 'http://i3472v.natappfree.cc/admin-api', + // baseUrl: 'http://xp5ane.natappfree.cc/admin-api', imagesUrl: 'http://www.nuoyunr.com/lananRsc', baseImageUrl: 'https://www.nuoyunr.com/minio', wsUrl: 'ws://127.0.0.1:48080', diff --git a/pages/index/TodayTable.vue b/pages/index/TodayTable.vue index ca01f8c..7b9c43b 100644 --- a/pages/index/TodayTable.vue +++ b/pages/index/TodayTable.vue @@ -17,6 +17,11 @@ 搜索 重置 + + + {{key}}: {{value}} + + 序号 @@ -75,13 +80,13 @@ export default { value: "3", }, ], - countMap: [] + countMap:[] }; }, onReady() { this.setLandscape(); - this.getTableData(); this.getCountMap() + this.getTableData(); this.getDictData() }, onUnload() { @@ -105,7 +110,7 @@ export default { method: 'get', params: this.queryParams }).then(res => { - console.log(res) + this.countMap = Object.entries(res.data) }) }, handleShow(id) { @@ -140,16 +145,16 @@ export default { chooseStatus: "1" }; this.tableData = []; // 重置时清空数据 - this.getTableData(); this.getCountMap() + this.getTableData(); }, handleSearch() { this.queryParams.pageNum = 1 if (this.queryParams.queryTime) { this.queryParams.startTime = this.queryParams.queryTime[0]; this.queryParams.endTime = this.queryParams.queryTime[1]; - this.getTableData(); this.getCountMap() + this.getTableData(); } }, getTableData(isLoadMore = false) { diff --git a/pages/index/index.vue b/pages/index/index.vue index e4daf96..ea94715 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -28,24 +28,24 @@ --> - - - - 合规合格 - {{threenum.hgNum}} + + + + + - - - 当日订单 - {{threenum.todayOrderNum}} + + + + - - - 双燃料合格 - {{threenum.srlNum}} + + + + - - + + @@ -110,6 +110,16 @@ 上门取车 + + + + {{appAndPick.pickNum }} + + + + + 使用说明 + @@ -173,24 +183,59 @@ appAndPick: { appointNum: 0, pickNum: 0 - } - + }, + present: {}, } }, onLoad() { this.baseUrl = this.$baseUrl this.startScrolling(); + this.getPresent() }, onShow() { this.getindex() this.getAppointAndPickNum() this.getbottom() - }, components: { tabBar, }, methods: { + goPresent(){ + if (!this.present){ + uni.showToast({ + title: '暂无使用说明', + icon: 'none' + }) + return + } + let old = this.present.filePath + if (old[0] !== '/'){ + old = "/" + old + } + uni.downloadFile({ + url: this.$baseImageUrl+old, + success: function (res) { + var filePath = res.tempFilePath; + uni.openDocument({ + filePath: filePath, + showMenu: true, + success: function (res) { + } + }); + } + }); + }, + getPresent(){ + request({ + url: '/inspectionFile/inspectionFile/getPresent', + method: 'get' + }).then(res => { + if (res.data){ + this.present = res.data + } + }) + }, async getAppointAndPickNum() { let res = await request({ url: '/partnerOwn/partner/getAppointAndPickNum', diff --git a/static/detection/present.png b/static/detection/present.png new file mode 100644 index 0000000..74aac02 Binary files /dev/null and b/static/detection/present.png differ