From f186542b558eef86e47e5959e7548d4c9a8f718d Mon Sep 17 00:00:00 2001 From: zx <604444282@qq.com> Date: Fri, 17 Feb 2023 15:08:25 +0800 Subject: [PATCH] zx --- src/router/index.js | 9 --- src/views/BasicSetting/_dicSetting/index.vue | 58 +++++++++++++++++++- 2 files changed, 55 insertions(+), 12 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 4ba59ee..19ea553 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -86,15 +86,6 @@ const routes = [ }, ] }, - { - path: '/starwayInfo', - name: "StarwayInfo", - component: () => import("@/views/StarwayInfo/index.vue"), - meta: { - title: '星途动态', - keepAlive: true - } - }, { path: '/actRelease', name: "ActRelease", diff --git a/src/views/BasicSetting/_dicSetting/index.vue b/src/views/BasicSetting/_dicSetting/index.vue index 31d8569..2065144 100644 --- a/src/views/BasicSetting/_dicSetting/index.vue +++ b/src/views/BasicSetting/_dicSetting/index.vue @@ -3,6 +3,7 @@ +
@@ -11,10 +12,11 @@ + 确定 - 取消 + 取消 + + + + + + + + + {}); - } + } else if (this.index == 3) { + let obj = Object.assign({pageNum: this.pagination.current,pageSize: this.pagination.pageSize}) + this.proxy.$post("/commonWords/list", obj).then(res => { + if(res.code == 200) { + const data = res.data + this.tableData.data = data.records; + this.pagination.total = data.total + } else { + this.$message.error(res.msg) + } + }).catch(() => {}); + } }, //切换状态 statusChange(index) { @@ -166,6 +197,13 @@ export default defineComponent({ this.visible = false; this.$message.success(res.data) }).catch(() => {}); + } else if (this.index == 3) { + this.proxy.$post("/commonWords/add", this.reasonForm).then(res => { + this.getData(); + this.reasonForm.title = ''; + this.visible = false; + this.$message.success(res.data) + }).catch(() => {}); } }, //删除 @@ -185,6 +223,11 @@ export default defineComponent({ this.getData(); this.$message.success(res.data) }).catch(() => {}); + } else if (this.index == 3) { + this.proxy.$post("/commonWords/del", {id: id}).then(res => { + this.getData(); + this.$message.success(res.data) + }).catch(() => {}); } }).catch(() => {}) }, @@ -215,6 +258,15 @@ export default defineComponent({ this.sortValue = undefined; this.$message.success(res.data) }).catch(() => {}); + } else if (this.index == 3) { + let obj = {id: this.activeId,sortWeight: this.sortValue*1} + this.proxy.$post("/commonWords/updSort", obj).then(res => { + this.getData(); + this.isEditing = false; + this.activeId = undefined; + this.sortValue = undefined; + this.$message.success(res.data) + }).catch(() => {}); } } }