From 7de94e2ea37803216e5afe9d40e7121c87a5344e Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期四, 24 四月 2025 14:21:14 +0800
Subject: [PATCH] 富文本复制粘贴图片上传至url
---
src/views/system/role/index.vue | 59 ++++++++++++++++++++++++++++++++---------------------------
1 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 1f83a11..5bdb7e7 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -116,36 +116,16 @@
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="淇敼" placement="top" v-if="scope.row.roleId !== 1">
- <el-button
- type="text"
- icon="Edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['system:role:edit']"
- ></el-button>
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:role:edit']"></el-button>
</el-tooltip>
<el-tooltip content="鍒犻櫎" placement="top" v-if="scope.row.roleId !== 1">
- <el-button
- type="text"
- icon="Delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['system:role:remove']"
- ></el-button>
+ <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']"></el-button>
</el-tooltip>
<el-tooltip content="鏁版嵁鏉冮檺" placement="top" v-if="scope.row.roleId !== 1">
- <el-button
- type="text"
- icon="CircleCheck"
- @click="handleDataScope(scope.row)"
- v-hasPermi="['system:role:edit']"
- ></el-button>
+ <el-button link type="primary" icon="CircleCheck" @click="handleDataScope(scope.row)" v-hasPermi="['system:role:edit']"></el-button>
</el-tooltip>
<el-tooltip content="鍒嗛厤鐢ㄦ埛" placement="top" v-if="scope.row.roleId !== 1">
- <el-button
- type="text"
- icon="User"
- @click="handleAuthUser(scope.row)"
- v-hasPermi="['system:role:edit']"
- ></el-button>
+ <el-button link type="primary" icon="User" @click="handleAuthUser(scope.row)" v-hasPermi="['system:role:edit']"></el-button>
</el-tooltip>
</template>
</el-table-column>
@@ -184,7 +164,7 @@
<el-radio
v-for="dict in sys_normal_disable"
:key="dict.value"
- :label="dict.value"
+ :value="dict.value"
>{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
@@ -325,17 +305,20 @@
loading.value = false;
});
}
+
/** 鎼滅储鎸夐挳鎿嶄綔 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
+
/** 閲嶇疆鎸夐挳鎿嶄綔 */
function resetQuery() {
dateRange.value = [];
proxy.resetForm("queryRef");
handleQuery();
}
+
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
function handleDelete(row) {
const roleIds = row.roleId || ids.value;
@@ -346,18 +329,21 @@
proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
}).catch(() => {});
}
+
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
function handleExport() {
proxy.download("system/role/export", {
...queryParams.value,
}, `role_${new Date().getTime()}.xlsx`);
}
+
/** 澶氶�夋閫変腑鏁版嵁 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.roleId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
+
/** 瑙掕壊鐘舵�佷慨鏀� */
function handleStatusChange(row) {
let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
@@ -369,6 +355,7 @@
row.status = row.status === "0" ? "1" : "0";
});
}
+
/** 鏇村鎿嶄綔 */
function handleCommand(command, row) {
switch (command) {
@@ -382,16 +369,19 @@
break;
}
}
+
/** 鍒嗛厤鐢ㄦ埛 */
function handleAuthUser(row) {
router.push("/system/role-auth/user/" + row.roleId);
}
+
/** 鏌ヨ鑿滃崟鏍戠粨鏋� */
function getMenuTreeselect() {
menuTreeselect().then(response => {
menuOptions.value = response.data;
});
}
+
/** 鎵�鏈夐儴闂ㄨ妭鐐规暟鎹� */
function getDeptAllCheckedKeys() {
// 鐩墠琚�変腑鐨勯儴闂ㄨ妭鐐�
@@ -401,6 +391,7 @@
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
}
+
/** 閲嶇疆鏂板鐨勮〃鍗曚互鍙婂叾浠栨暟鎹� */
function reset() {
if (menuRef.value != undefined) {
@@ -424,6 +415,7 @@
};
proxy.resetForm("roleRef");
}
+
/** 娣诲姞瑙掕壊 */
function handleAdd() {
reset();
@@ -431,6 +423,7 @@
open.value = true;
title.value = "娣诲姞瑙掕壊";
}
+
/** 淇敼瑙掕壊 */
function handleUpdate(row) {
reset();
@@ -450,9 +443,10 @@
});
});
});
- title.value = "淇敼瑙掕壊";
});
+ title.value = "淇敼瑙掕壊";
}
+
/** 鏍规嵁瑙掕壊ID鏌ヨ鑿滃崟鏍戠粨鏋� */
function getRoleMenuTreeselect(roleId) {
return roleMenuTreeselect(roleId).then(response => {
@@ -460,6 +454,7 @@
return response;
});
}
+
/** 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戠粨鏋� */
function getDeptTree(roleId) {
return deptTreeSelect(roleId).then(response => {
@@ -467,6 +462,7 @@
return response;
});
}
+
/** 鏍戞潈闄愶紙灞曞紑/鎶樺彔锛�*/
function handleCheckedTreeExpand(value, type) {
if (type == "menu") {
@@ -481,6 +477,7 @@
}
}
}
+
/** 鏍戞潈闄愶紙鍏ㄩ��/鍏ㄤ笉閫夛級 */
function handleCheckedTreeNodeAll(value, type) {
if (type == "menu") {
@@ -489,6 +486,7 @@
deptRef.value.setCheckedNodes(value ? deptOptions.value : []);
}
}
+
/** 鏍戞潈闄愶紙鐖跺瓙鑱斿姩锛� */
function handleCheckedTreeConnect(value, type) {
if (type == "menu") {
@@ -497,6 +495,7 @@
form.value.deptCheckStrictly = value ? true : false;
}
}
+
/** 鎵�鏈夎彍鍗曡妭鐐规暟鎹� */
function getMenuAllCheckedKeys() {
// 鐩墠琚�変腑鐨勮彍鍗曡妭鐐�
@@ -506,6 +505,7 @@
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
}
+
/** 鎻愪氦鎸夐挳 */
function submitForm() {
proxy.$refs["roleRef"].validate(valid => {
@@ -528,17 +528,20 @@
}
});
}
+
/** 鍙栨秷鎸夐挳 */
function cancel() {
open.value = false;
reset();
}
+
/** 閫夋嫨瑙掕壊鏉冮檺鑼冨洿瑙﹀彂 */
function dataScopeSelectChange(value) {
if (value !== "2") {
deptRef.value.setCheckedKeys([]);
}
}
+
/** 鍒嗛厤鏁版嵁鏉冮檺鎿嶄綔 */
function handleDataScope(row) {
reset();
@@ -555,9 +558,10 @@
});
});
});
- title.value = "鍒嗛厤鏁版嵁鏉冮檺";
});
+ title.value = "鍒嗛厤鏁版嵁鏉冮檺";
}
+
/** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */
function submitDataScope() {
if (form.value.roleId != undefined) {
@@ -569,6 +573,7 @@
});
}
}
+
/** 鍙栨秷鎸夐挳锛堟暟鎹潈闄愶級*/
function cancelDataScope() {
openDataScope.value = false;
--
Gitblit v1.9.3