From 1ed37897d56b622f229ce90e8e937f89e8c3bc90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= Date: Fri, 6 Jan 2023 11:42:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E9=83=A8=E9=97=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yi-sqlsugar-dev.db | Bin 286720 -> 286720 bytes Yi.Vue3.X.RuoYi/src/api/system/dept.js | 10 +- .../src/views/system/dept/index.vue | 629 ++++++++---------- .../src/views/system/role/index.vue | 2 +- .../src/views/system/user/index.vue | 2 +- .../src/views/bbs/article/index.vue | 14 +- 6 files changed, 289 insertions(+), 368 deletions(-) diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db index a24a9d3746e8d27700846bb682778d0c8eec8d95..548aad63e31684c2392868af1aa03b74e93a8cd9 100644 GIT binary patch delta 525 zcmZ9IPfHt76vf|rCNCpa?u?@8kW>?68i*+KW~|t>t6EU#!hV2Ivvrk^kkKMpNQeqC z3q`01h5ivWBx85dtY_oOf^Gttl7+iKpcU+$Ohxf=ckkTaIro@nig~7NglK#-JV)az znQDd}WF-bk0wqXR6nO-mE;E@ciP2zmg3J;3NyF*qzou8q-*faWh?Fs#5-+A+PV0tY z=;cz5W-VWYwIJY%WWw_8BDLB@CcoztE(u&B_8i8?Xn>QDs*>S!;_C+#>Y8q7nrLn9 zJD+OJ!pG*?dd;MNV8HwCM`s471g_u|3EyBL#`-vsBvqwUQjlWrAm!nDa7Y(XdM|RV z?437{L{DlFb`8(Gb=KFzd+%hfB?X&+jfQnF1nuP{X7n=&D@fSopZ`N+a!m*~|D+}+ zg@}lml&0aZPWJ-Y(|Wi%fjZ)T!0T5oZg4{N2SbQ6_YsHp|E_F1d%Mkp&ra#cDI7Z1 zadWpq!e6TOiqH*jbYb1*=wI-6x2)Tx9>0v`HV8BjeE}n3$~jR~6}g)oY~|g&S7<9= VXyuFDP~7`Dk$tA+lYKXf{{S9nplJXA delta 76 zcmV-S0JHyqz!8AJ5s(`JAdwtH0U&{3wO|3HZw3Jml>iTwvk?%B50{mH0dKbi@B;P^ ihx(5JxB8C)3Q)5I5dD9*0bm0I5TgVTptl4N1pH6){~DtJ diff --git a/Yi.Vue3.X.RuoYi/src/api/system/dept.js b/Yi.Vue3.X.RuoYi/src/api/system/dept.js index a504f725..cf28c932 100644 --- a/Yi.Vue3.X.RuoYi/src/api/system/dept.js +++ b/Yi.Vue3.X.RuoYi/src/api/system/dept.js @@ -1,7 +1,7 @@ import request from '@/utils/request' // 查询部门列表 -export function listData(query) { +export function listDept(query) { return request({ url: '/dept/SelctGetList', method: 'get', @@ -18,7 +18,7 @@ export function listData(query) { // } // 查询部门详细 -export function getData(deptId) { +export function getDept(deptId) { return request({ url: '/dept/getById/' + deptId, method: 'get' @@ -26,7 +26,7 @@ export function getData(deptId) { } // 新增部门 -export function addData(data) { +export function addDept(data) { return request({ url: '/dept/add', method: 'post', @@ -35,7 +35,7 @@ export function addData(data) { } // 修改部门 -export function updateData(data) { +export function updateDept(data) { return request({ url: '/dept/update', method: 'put', @@ -44,7 +44,7 @@ export function updateData(data) { } // 删除部门 -export function delData(deptId) { +export function delDept(deptId) { if("string"==typeof(deptId)) { deptId=[deptId]; diff --git a/Yi.Vue3.X.RuoYi/src/views/system/dept/index.vue b/Yi.Vue3.X.RuoYi/src/views/system/dept/index.vue index 75dbdf55..ca4fbc60 100644 --- a/Yi.Vue3.X.RuoYi/src/views/system/dept/index.vue +++ b/Yi.Vue3.X.RuoYi/src/views/system/dept/index.vue @@ -1,376 +1,297 @@ - + \ No newline at end of file + deptOptions.value = proxy.handleTree(response.data.filter(i=>i.id!=row.id), "id"); + }); + + getDept(row.id).then(response => { + form.value = response.data; + open.value = true; + title.value = "修改部门"; + }); +}) +} +/** 提交按钮 */ +function submitForm() { + proxy.$refs["deptRef"].validate(valid => { + if (valid) { + if (form.value.id != undefined) { + updateDept(form.value).then(response => { + proxy.$modal.msgSuccess("修改成功"); + open.value = false; + getList(); + }); + } else { + addDept(form.value).then(response => { + proxy.$modal.msgSuccess("新增成功"); + open.value = false; + getList(); + }); + } + } + }); +} +/** 删除按钮操作 */ +function handleDelete(row) { + proxy.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?').then(function() { + return delDept(row.id); + }).then(() => { + getList(); + proxy.$modal.msgSuccess("删除成功"); + }).catch(() => {}); +} + +getList(); + diff --git a/Yi.Vue3.X.RuoYi/src/views/system/role/index.vue b/Yi.Vue3.X.RuoYi/src/views/system/role/index.vue index ecdff1c5..3650904e 100644 --- a/Yi.Vue3.X.RuoYi/src/views/system/role/index.vue +++ b/Yi.Vue3.X.RuoYi/src/views/system/role/index.vue @@ -379,7 +379,7 @@ import { treeselect as menuTreeselect, listMenu, } from "@/api/system/menu"; -import { listData as listDept, roleDeptTreeselect } from "@/api/system/dept"; +import { listDept, roleDeptTreeselect } from "@/api/system/dept"; const router = useRouter(); const { proxy } = getCurrentInstance(); const { sys_normal_disable } = proxy.useDict("sys_normal_disable"); diff --git a/Yi.Vue3.X.RuoYi/src/views/system/user/index.vue b/Yi.Vue3.X.RuoYi/src/views/system/user/index.vue index 427006df..5946e12a 100644 --- a/Yi.Vue3.X.RuoYi/src/views/system/user/index.vue +++ b/Yi.Vue3.X.RuoYi/src/views/system/user/index.vue @@ -239,7 +239,7 @@ import { getToken } from "@/utils/auth"; import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser, addUser } from "@/api/system/user"; import { roleOptionselect } from "@/api/system/role"; import { postOptionselect } from "@/api/system/post"; -import { listData as listDept } from "@/api/system/dept"; +import { listDept } from "@/api/system/dept"; const router = useRouter(); diff --git a/Yi.Vue3.x.RuoYi/src/views/bbs/article/index.vue b/Yi.Vue3.x.RuoYi/src/views/bbs/article/index.vue index ecdbca44..79065cb0 100644 --- a/Yi.Vue3.x.RuoYi/src/views/bbs/article/index.vue +++ b/Yi.Vue3.x.RuoYi/src/views/bbs/article/index.vue @@ -58,7 +58,7 @@ plain icon="Plus" @click="handleAdd" - v-hasPermi="['business:article:add']" + v-hasPermi="['bbs:article:add']" >新增 @@ -69,7 +69,7 @@ icon="Edit" :disabled="single" @click="handleUpdate" - v-hasPermi="['business:article:edit']" + v-hasPermi="['bbs:article:edit']" >修改 @@ -80,7 +80,7 @@ icon="Delete" :disabled="multiple" @click="handleDelete" - v-hasPermi="['business:article:remove']" + v-hasPermi="['bbs:article:remove']" >删除 @@ -90,7 +90,7 @@ plain icon="Download" @click="handleExport" - v-hasPermi="['business:article:export']" + v-hasPermi="['bbs:article:export']" >导出 @@ -172,14 +172,14 @@ type="text" icon="Edit" @click="handleUpdate(scope.row)" - v-hasPermi="['business:article:edit']" + v-hasPermi="['bbs:article:edit']" >修改 删除 @@ -241,7 +241,7 @@ import { delData, addData, updateData, -} from "@/api/business/articleApi"; +} from "@/api/bbs/articleApi"; import { ref } from "@vue/reactivity"; import { computed } from "@vue/runtime-core";