From 68b082132a7327626c5a1d79ee44fb43ad02c4ed Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Fri, 19 Sep 2025 16:19:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +- pages/General/operation.vue | 89 +++++++-------------- pages/General/ops-mgmt.vue | 155 ++++++++++++++++++++++-------------- utils/getData2.js | 31 +++++--- 4 files changed, 146 insertions(+), 134 deletions(-) diff --git a/README.md b/README.md index 98e1947..2adfff6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # 注意事项 + 原生APP云打包使用自有证书 + 证书别名:testalias -+ 接口在线地址:(https://apifox.com/apidoc/shared-e9d4798e-2db1-493d-a0cb-7a0e881c4bd6/api-160097540) -+ app图标为lms -+ 接口在线地址:http://47.98.105.245:8001/project/21/interface/api/cat_122 \ No newline at end of file ++ 接口在线地址:(http://47.111.78.178:8014/) ++ app图标为lms \ No newline at end of file diff --git a/pages/General/operation.vue b/pages/General/operation.vue index bae061e..e06c4c5 100644 --- a/pages/General/operation.vue +++ b/pages/General/operation.vue @@ -1,6 +1,6 @@ @@ -71,7 +73,7 @@ import NavBar from '@/components/NavBar.vue' import SearchBox from '@/components/SearchBox.vue' import {getDate} from '@/utils/utils.js' - import {groupMaterList} from '@/utils/getData2.js' + import {queryHistoryTask} from '@/utils/getData2.js' export default { components: { NavBar, @@ -86,19 +88,7 @@ keyword: null, date1: currentDate, date2: currentDate, - dataList: [], - pkId: '', - pkObj: {}, - reload: false, - status: 'more', - contentText: { - contentdown: '查看更多', - contentrefresh: '加载中', - contentnomore: '没有更多' - }, - totalCount: 0, - pageNum: 1, - pageSize: 10 + dataList: [] }; }, computed: { @@ -111,6 +101,7 @@ }, onLoad (options) { this.title = options.title + this._queryHistoryTask() }, methods: { handleFocus () { @@ -122,48 +113,24 @@ bindDateChange2: function(e) { this.date2 = e.detail.value }, - searchList () { - this.dataList = [] - this.pageNum = 1 - this._groupMaterList() - }, - async _groupMaterList () { - let res = await groupMaterList(this.pageNum + '', this.pageSize + '', this.val1) - if (res.code === '200') { - this.totalCount = res.totalElements - if (res.totalElements > 0) { - const dataMap = res.content - this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap) - this.reload = false + async _queryHistoryTask () { + try { + let res = await queryHistoryTask(this.keyword, this.date1, this.date2) + if (res && res.data) { + this.dataList = [...res.data] } else { this.dataList = [] + uni.showToast({ + title: res.message, + icon: 'none' + }) } - if (this.totalCount == this.dataList.length) { - this.reload = false - this.status = 'noMore' - } + } catch (e) { + this.dataList = [] } }, - onReachBottom () { - if (this.totalCount > this.dataList.length) { - this.status = 'loading' - setTimeout(() => { - this.pageNum++ - this._groupMaterList() - }, 1000) - } else { //停止加载 - this.status = 'noMore' - } - }, - toCheck (e) { - this.pkId = this.pkId === e.material_id ? '' : e.material_id - this.pkObj = this.pkId === e.material_id ? e : {} - }, toSure () { - if (this.pkId) { - this.$store.dispatch('setPublicObj', this.pkObj) - uni.navigateBack() - } + uni.navigateBack() } } } diff --git a/pages/General/ops-mgmt.vue b/pages/General/ops-mgmt.vue index 583239f..ee75cd4 100644 --- a/pages/General/ops-mgmt.vue +++ b/pages/General/ops-mgmt.vue @@ -1,32 +1,44 @@