From 791b74ab7761d1a937321d234de095d12e78cd32 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 19 Dec 2023 13:50:51 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=80=9A=E8=BF=87=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E6=90=9C=E7=B4=A2=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=81=9A=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=9A=84=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/update.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/apis/update.js b/src/apis/update.js index 698bdc2..cc89431 100644 --- a/src/apis/update.js +++ b/src/apis/update.js @@ -9,9 +9,14 @@ export const cinema_list = () => { } export const cinema_search = (params) => { + const req_params = { + search: params['version'], + ip: params['ip'] + } + console.log(req_params) return request({ - url: '/update/cinema/search', + url: '/update/cinema/', method: 'get', - params: params + params: req_params }) } From 5ccde9c6c37ac61728b532051685beb3c506633d Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 19 Dec 2023 13:57:52 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E6=8F=90=E7=A4=BA=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/update/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/update/index.vue b/src/views/update/index.vue index ed657cc..9486cd9 100644 --- a/src/views/update/index.vue +++ b/src/views/update/index.vue @@ -116,7 +116,7 @@ onMounted( - + From 67a5a5c4a1dff3910db04400e266bbefd7d5fd58 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 19 Dec 2023 16:29:20 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 ++-- src/apis/update.js | 2 +- src/views/update/index.vue | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 8388c4b..4daef50 100644 --- a/index.html +++ b/index.html @@ -1,10 +1,10 @@ - + - Vite + Vue + 鼎新工具集
diff --git a/src/apis/update.js b/src/apis/update.js index cc89431..bec1c4a 100644 --- a/src/apis/update.js +++ b/src/apis/update.js @@ -3,7 +3,7 @@ import request from "@/request/index.js"; export const cinema_list = () => { // console.log('cinema_list') return request({ - url: '/update/cinema/', + url: '/update/cinema/refresh', method: 'get' }) } diff --git a/src/views/update/index.vue b/src/views/update/index.vue index 9486cd9..e1b90b7 100644 --- a/src/views/update/index.vue +++ b/src/views/update/index.vue @@ -33,7 +33,7 @@ const submitSearch = async (formEl) => { console.log('至少执行了') console.log(cinemaSearch.ip) const {ip, version} = unref(cinemaSearch) - + tableData.value = [] await cinema_search({ip, version}).then( res => { if (Array.isArray(res)) { @@ -75,6 +75,7 @@ const resetSearch = (formEl) => { const tableData = ref([]) async function get_table_data() { + tableData.value = [] await cinema_list().then(res => { if (Array.isArray(res)) { tableData.value = [...res] @@ -134,7 +135,7 @@ onMounted( - + From 45aaecc3ec4ef4f70fe18169b12a1f8e01614ea1 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 19 Dec 2023 16:48:09 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=88=B7=E6=96=B0=E6=8C=89=E9=94=AE?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=82=B9=E5=87=BB=E5=90=8E=E7=BD=AE=E7=81=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/update/index.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/views/update/index.vue b/src/views/update/index.vue index e1b90b7..bc6c19c 100644 --- a/src/views/update/index.vue +++ b/src/views/update/index.vue @@ -11,6 +11,12 @@ const cinemaSearch = reactive({ const cinemaSearchRef = ref() +// 定义表格数据 +const tableData = ref([]) + +let refresh_disable = ref(false) +let refresh_loading = ref(false) + // 数据校验部分 const ip_validate = (rule, value, callback) => { const regex = new RegExp('((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})(\\.((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}'); @@ -70,9 +76,18 @@ const resetSearch = (formEl) => { formEl.resetFields() } +const refresh = () => { + refresh_disable.value = true; + refresh_loading.value = true; + get_table_data() + setTimeout(()=>{ + refresh_disable.value = false; + refresh_loading.value = false; + }, 5000) +} // 表格部分 -const tableData = ref([]) + async function get_table_data() { tableData.value = [] @@ -128,7 +143,7 @@ onMounted( 重置 - 刷新 + 刷新
From 2c482d279661ca0d188b0b068dfc8cfb0187f850 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Wed, 20 Dec 2023 18:26:26 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/update.js | 3 ++- src/views/update/index.vue | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/apis/update.js b/src/apis/update.js index bec1c4a..014592f 100644 --- a/src/apis/update.js +++ b/src/apis/update.js @@ -3,13 +3,14 @@ import request from "@/request/index.js"; export const cinema_list = () => { // console.log('cinema_list') return request({ - url: '/update/cinema/refresh', + url: '/update/cinema/refresh/?ordering=ip', method: 'get' }) } export const cinema_search = (params) => { const req_params = { + ordering: 'ip', search: params['version'], ip: params['ip'] } diff --git a/src/views/update/index.vue b/src/views/update/index.vue index bc6c19c..e6adfe7 100644 --- a/src/views/update/index.vue +++ b/src/views/update/index.vue @@ -76,7 +76,8 @@ const resetSearch = (formEl) => { formEl.resetFields() } -const refresh = () => { +const refresh = (formEL) => { + formEL.resetFields() refresh_disable.value = true; refresh_loading.value = true; get_table_data() @@ -143,7 +144,7 @@ onMounted( 重置 - 刷新 + 刷新