|
@@ -3,7 +3,7 @@
|
|
|
<div class="search flex justify-between bg-white rounded-md">
|
|
|
<el-form :inline="true" class="demo-form-inline" size="default">
|
|
|
<el-form-item>
|
|
|
- <el-input
|
|
|
+ <el-input
|
|
|
v-model="form_query.ue_jbxx_ju_sydw"
|
|
|
placeholder="请输入事业单位"
|
|
|
class="w-40"
|
|
@@ -26,18 +26,36 @@
|
|
|
<import-button url="/txwx/user_role" @success="initData">
|
|
|
<template #text>批量导入</template>
|
|
|
</import-button>
|
|
|
- <el-button type="primary" @click="addPermission()">新增自定义角色</el-button>
|
|
|
- <el-button type="danger" @click="handleMulDelete" :disabled="multipleSelection.length == 0">删除</el-button>
|
|
|
+ <el-button type="primary" @click="addPermission()"
|
|
|
+ >新增自定义角色</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ @click="handleMulDelete"
|
|
|
+ :disabled="multipleSelection.length == 0"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="flex content-center">
|
|
|
- <el-input v-model="form_query.keyword" class="w-40 mx-2" size="small" placeholder="请输搜索关键词" :suffix-icon="Search"
|
|
|
- clearable/>
|
|
|
+ <el-input
|
|
|
+ v-model="form_query.keyword"
|
|
|
+ class="w-40 mx-2"
|
|
|
+ size="small"
|
|
|
+ placeholder="请输搜索关键词"
|
|
|
+ :suffix-icon="Search"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
<el-button type="primary" @click="initData">搜索</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table :data="tableData" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
- <el-table-column prop="tur_role_name" label="角色名" width="500" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="tur_role_name"
|
|
|
+ label="角色名"
|
|
|
+ width="500"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column prop="user_grade_num" label="注册时间">
|
|
|
<template #default="scope">
|
|
|
{{ scope.row.ex.create_dateline }}
|
|
@@ -45,21 +63,43 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="245">
|
|
|
<template #default="scope">
|
|
|
- <el-button type="text" @click="Staffing(scope.row)">配置人员 |</el-button>
|
|
|
- <el-button type="text" @click="editPermission(scope.row.tur_id)">编辑 |</el-button>
|
|
|
- <el-button type="text" @click="handleDelete(scope.row.tur_id)">删除
|
|
|
+ <el-button type="text" @click="Staffing(scope.row)"
|
|
|
+ >配置人员 |</el-button
|
|
|
+ >
|
|
|
+ <el-button type="text" @click="editPermission(scope.row.tur_id)"
|
|
|
+ >编辑 |</el-button
|
|
|
+ >
|
|
|
+ <el-button type="text" @click="handleDelete(scope.row.tur_id)"
|
|
|
+ >删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="flex justify-end my-10">
|
|
|
- <el-pagination v-model:current-page="form_query.page" v-model:page-size="form_query.limit" layout="total,sizes, prev, pager, next, jumper" :total="total" :background="true" @current-change="initData" :hide-on-single-page="false" />
|
|
|
+ <el-pagination
|
|
|
+ v-model:current-page="form_query.page"
|
|
|
+ v-model:page-size="form_query.limit"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ :background="true"
|
|
|
+ @current-change="initData"
|
|
|
+ :hide-on-single-page="false"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog v-model="setRoleDialogVisible" width="565" destroy-on-close :title="title">
|
|
|
+ <el-dialog
|
|
|
+ v-model="setRoleDialogVisible"
|
|
|
+ width="565"
|
|
|
+ destroy-on-close
|
|
|
+ :title="title"
|
|
|
+ >
|
|
|
<el-form ref="ruleFormRef" :model="roleData" :rules="roleRules">
|
|
|
<el-form-item label="角色名:" prop="tur_role_name" class="w-270px">
|
|
|
- <el-input size="small" v-model="roleData.tur_role_name" type="text" />
|
|
|
+ <el-input
|
|
|
+ size="small"
|
|
|
+ v-model="roleData.tur_role_name"
|
|
|
+ type="text"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="" prop="tur_role_menu">
|
|
|
<div class="w-full">设置权限:</div>
|
|
@@ -68,8 +108,14 @@
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<span class="flex_center space-x-12">
|
|
|
- <el-button size="large" @click="setRoleDialogVisible = false">取消</el-button>
|
|
|
- <el-button size="large" type="primary" @click="PermissionSubmit(ruleFormRef)">
|
|
|
+ <el-button size="large" @click="setRoleDialogVisible = false"
|
|
|
+ >取消</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="large"
|
|
|
+ type="primary"
|
|
|
+ @click="PermissionSubmit(ruleFormRef)"
|
|
|
+ >
|
|
|
确定
|
|
|
</el-button>
|
|
|
</span>
|
|
@@ -77,21 +123,42 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 配置人员对话框 -->
|
|
|
- <el-dialog v-model="StaffingDialogVisible" class="_" width="565" title="配置人员">
|
|
|
- <el-form ref="ruleFormRef" :model="userForm" label-position="right" label-width="90px">
|
|
|
+ <el-dialog
|
|
|
+ v-model="StaffingDialogVisible"
|
|
|
+ class="_"
|
|
|
+ width="565"
|
|
|
+ title="配置人员"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ ref="ruleFormRef"
|
|
|
+ :model="userForm"
|
|
|
+ label-position="right"
|
|
|
+ label-width="90px"
|
|
|
+ >
|
|
|
<el-form-item label="角色名:" prop="tur_role_name" class="w-295px">
|
|
|
{{ roleName }}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="配置人员:">
|
|
|
<el-select v-model="userForm.user_id" multiple>
|
|
|
- <el-option v-for="item in userData" :key="item.user_id" :label="item.user_realname" :value="item.user_id" />
|
|
|
+ <el-option
|
|
|
+ v-for="item in userData"
|
|
|
+ :key="item.user_id"
|
|
|
+ :label="item.user_realname"
|
|
|
+ :value="item.user_id"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<span class="flex_center space-x-12">
|
|
|
- <el-button size="large" @click="StaffingDialogVisible = false">取消</el-button>
|
|
|
- <el-button size="large" type="primary" @click="handleSubmit(ruleFormRef)">
|
|
|
+ <el-button size="large" @click="StaffingDialogVisible = false"
|
|
|
+ >取消</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="large"
|
|
|
+ type="primary"
|
|
|
+ @click="handleSubmit(ruleFormRef)"
|
|
|
+ >
|
|
|
确定
|
|
|
</el-button>
|
|
|
</span>
|
|
@@ -194,15 +261,10 @@ function handleMulDelete() {
|
|
|
type: "success",
|
|
|
});
|
|
|
initData();
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
- .catch(() => { });
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
//单个删除
|
|
|
function handleDelete(id) {
|
|
@@ -220,15 +282,10 @@ function handleDelete(id) {
|
|
|
type: "success",
|
|
|
});
|
|
|
initData();
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- }
|
|
|
+ }
|
|
|
});
|
|
|
})
|
|
|
- .catch(() => { });
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
|
|
|
let roleData = $ref({
|
|
@@ -236,9 +293,11 @@ let roleData = $ref({
|
|
|
tur_role_menu: "",
|
|
|
});
|
|
|
const roleRules = ref({
|
|
|
- tur_role_name: [{ required: true, message: "请输入角色名", trigger: "submit" }],
|
|
|
+ tur_role_name: [
|
|
|
+ { required: true, message: "请输入角色名", trigger: "submit" },
|
|
|
+ ],
|
|
|
tur_role_menu: [{ required: true, message: "请选择菜单", trigger: "submit" }],
|
|
|
-})
|
|
|
+});
|
|
|
|
|
|
//添加额外权限
|
|
|
let setRoleDialogVisible = $ref(false);
|