From fe816585f0d15d6c740bb3e34a30f1cff8aa9272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=80=AA?= <690927457@qq.com> Date: Sun, 10 Dec 2023 23:28:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=AE=E6=92=AD=E5=9B=BE?= =?UTF-8?q?=E6=97=A0=E9=99=90=E5=88=B6=E8=AE=BF=E9=97=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/view/lbtManage/index.vue | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.env.development b/.env.development index 09a2b67..15aa236 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ ENV = 'development' VITE_CLI_PORT = 8088 VITE_SERVER_PORT = 8888 VITE_BASE_API = /api -VITE_BASE_PATH = http://e07b2b5.r9.cpolar.top +VITE_BASE_PATH = https://api.jimingyiliao.com/ VITE_EDITOR = vscode // VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm // 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP diff --git a/src/view/lbtManage/index.vue b/src/view/lbtManage/index.vue index b9298ce..1242e2c 100644 --- a/src/view/lbtManage/index.vue +++ b/src/view/lbtManage/index.vue @@ -175,9 +175,27 @@ function handleSizeChange(val) { getLbtList() } const state_loading = ref(false) -async function changeStateFunc(row) { // 改变状态 +async function changeStateFunc(event, row) { // 改变状态 + // console.log('changeStateFunc is ====', row, event) + // state_loading.value = true + // const res = await api.editLbtState({ status: row.status }) + // state_loading.value = false + // // eslint-disable-next-line no-empty + // if (res.code === 0) { + // ElMessage({ + // type: 'success', + // message: '修改成功!' + // }) + // return true + // } else { + // return false + // } +} +async function beforeChangeFunc(index, row) { + // console.log(row, index) + // return false state_loading.value = true - const res = await api.editLbtState({ status: row.status }) + const res = await api.editLbtState({ ID: row.ID, status: row.status == 1 ? 2 : 1 }) state_loading.value = false // eslint-disable-next-line no-empty if (res.code === 0) { @@ -222,7 +240,7 @@ async function changeStateFunc(row) { // 改变状态