From 352e9e459e3c865a8509ccebfe6a3d580a65165c Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 10 十月 2023 13:48:29 +0800
Subject: [PATCH] 搜索公共组件、新建选择客户名称等公共组件、新建弹窗及跟进记录页面批量删除改为单条删除
---
src/views/backgroundConfig/rolePermssion/AddRolePermssionDialog.vue | 65 ++++++++++++++++++++++++++++----
1 files changed, 56 insertions(+), 9 deletions(-)
diff --git a/src/views/backgroundConfig/rolePermssion/AddRolePermssionDialog.vue b/src/views/backgroundConfig/rolePermssion/AddRolePermssionDialog.vue
index c0e7418..fae0389 100644
--- a/src/views/backgroundConfig/rolePermssion/AddRolePermssionDialog.vue
+++ b/src/views/backgroundConfig/rolePermssion/AddRolePermssionDialog.vue
@@ -21,8 +21,8 @@
<div class="basic-info-view">
<el-row>
<el-col :span="12">
- <el-form-item label="鏉冮檺鍚嶇О" prop="owner">
- <el-input v-model="editConfig.infomation.owner"></el-input>
+ <el-form-item label="鏉冮檺鍚嶇О" prop="authorityName">
+ <el-input v-model="editConfig.infomation.authorityName"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -90,7 +90,7 @@
</div>
</div>
<div class="btn">
- <el-button type="primary" size="small" @click="editConfig.visible = false">淇� 瀛�</el-button>
+ <el-button type="primary" size="small" @click="saveClick('form')">淇� 瀛�</el-button>
<el-button size="small" @click="editConfig.visible = false">鍙� 娑�</el-button>
</div>
</div>
@@ -99,6 +99,7 @@
</template>
<script>
+import { addAuthority } from "@/api/backgroundConfig/rolePermssion" // setMenuAuthority
export default {
name: "AddRolePermissionDialog",
props: {
@@ -108,10 +109,7 @@
return {
visible: false,
title: "鏂板缓",
- infomation: {
- owner: "",
- notes: ""
- }
+ infomation: {}
}
}
}
@@ -141,7 +139,7 @@
dialogWidth: "60%",
editConfig: this.editCommonConfig,
rules: {
- owner: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }]
+ authorityName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }]
},
moduleSelTitle: "鍏ㄩ儴",
tableData: [],
@@ -159,6 +157,52 @@
methods: {
handleClose() {
this.editConfig.visible = false
+ },
+ saveClick(formName) {
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ console.log(this.editConfig.infomation)
+ if (this.editConfig.title === "鏂板缓") {
+ addAuthority({
+ authorityName: this.editConfig.infomation.authorityName,
+ casbinInfos: []
+ })
+ .then((res) => {
+ console.log(res)
+ this.editConfig.visible = false
+ if (res.code === 200) {
+ this.$message({
+ message: "娣诲姞鎴愬姛",
+ type: "success"
+ })
+ this.$parent.getData()
+ }
+ })
+ .catch((err) => {
+ console.log(err)
+ })
+ } else {
+ // getUpdateClient(params)
+ // .then((res) => {
+ // console.log(res)
+ // this.editConfig.visible = false
+ // if (res.code === 200) {
+ // this.$message({
+ // message: "缂栬緫鎴愬姛",
+ // type: "success"
+ // })
+ // this.$parent.getData()
+ // }
+ // })
+ // .catch((err) => {
+ // console.log(err)
+ // })
+ }
+ } else {
+ console.log("error submit")
+ return false
+ }
+ })
},
// 妯″潡閫夋嫨
moduleSelectClick(value) {
@@ -207,7 +251,7 @@
this.tableData = []
}
},
- // 妯″潡鍏ㄩ��
+ // 妯″潡鍏ㄩ�� / 鍙栨秷鍏ㄩ��
selAllChange(row) {
if (row.checked) {
let arr = []
@@ -215,6 +259,8 @@
arr.push(ele.name)
})
row.checkedList = arr
+ } else {
+ row.checkedList = []
}
},
handleCheckedChange(value, row) {
@@ -254,6 +300,7 @@
.common-select-btn {
margin-left: 5px;
font-size: 16px;
+ cursor: pointer;
}
}
}
--
Gitblit v1.8.0