修改前端分页i18n配置以及添加chief管理员的修改功能-liyuchen
This commit is contained in:
parent
47701783c3
commit
ea416a68fc
|
@ -32,7 +32,24 @@ export const addAdmin = (data) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新chief管理员用户
|
||||||
|
* @param data
|
||||||
|
* @returns {Promise<AxiosResponse<any>>}
|
||||||
|
*/
|
||||||
|
export const updateAdmin = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/' + moduleName + '/ui/administrator/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除chief管理员用户
|
||||||
|
* @param ids
|
||||||
|
* @returns {Promise<AxiosResponse<any>>}
|
||||||
|
*/
|
||||||
export const remove = (ids) => {
|
export const remove = (ids) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/' + moduleName + '/ui/administrator/delete',
|
url: '/api/' + moduleName + '/ui/administrator/delete',
|
||||||
|
|
|
@ -73,10 +73,6 @@ const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
name: '', //标样名称
|
|
||||||
code: '',//标样编号
|
|
||||||
states: '',//标样状态
|
|
||||||
tableData: [],
|
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//字典值
|
//字典值
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
label="Operate"
|
label="Operate"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary" @click="del(scope.row)">delete</el-button>
|
<el-button size="small" text type="primary" @click="del(scope.row)">Delete</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog title="upload" v-model="state.isShowDialog" width="700px" close-on-click-modal="false">
|
<el-dialog title="edit picture" v-model="state.isShowDialog" width="700px" close-on-click-modal="false">
|
||||||
<el-form :model="state.ruleForm" size="default" label-width="150px" :rules="rules" ref="adminAddFormRef">
|
<el-form :model="state.ruleForm" size="default" label-width="150px" :rules="rules" ref="adminAddFormRef">
|
||||||
<el-form-item label="upload picture" prop="img">
|
<el-form-item label="upload picture" prop="img">
|
||||||
<el-upload
|
<el-upload
|
||||||
|
|
|
@ -103,8 +103,8 @@
|
||||||
label="Operate"
|
label="Operate"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary" @click="editData(scope.row)">edit</el-button>
|
<el-button size="small" text type="primary" @click="editData(scope.row)">Edit</el-button>
|
||||||
<el-button size="small" text type="primary" @click="del(scope.row)">delete</el-button>
|
<el-button size="small" text type="primary" @click="del(scope.row)">Delete</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog title="upload" v-model="state.isShowDialog" width="700px">
|
<el-dialog title="edit hotspot" v-model="state.isShowDialog" width="700px">
|
||||||
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef">
|
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef">
|
||||||
<el-form-item label="area cn" prop="areaCn">
|
<el-form-item label="area cn" prop="areaCn">
|
||||||
<el-input v-model="state.ruleForm.areaCn" placeholder="please enter area cn" style="width: 300px"/>
|
<el-input v-model="state.ruleForm.areaCn" placeholder="please enter area cn" style="width: 300px"/>
|
||||||
|
@ -45,10 +45,6 @@ const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
name: '', //标样名称
|
|
||||||
code: '',//标样编号
|
|
||||||
states: '',//标样状态
|
|
||||||
tableData: [],
|
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//字典值
|
//字典值
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog title="upload" v-model="state.isShowDialog" width="700px">
|
<el-dialog title="edit wordclouds" v-model="state.isShowDialog" width="700px">
|
||||||
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef">
|
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef">
|
||||||
<el-form-item label="time" prop="time">
|
<el-form-item label="time" prop="time">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
@ -51,10 +51,6 @@ const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
name: '', //标样名称
|
|
||||||
code: '',//标样编号
|
|
||||||
states: '',//标样状态
|
|
||||||
tableData: [],
|
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//字典值
|
//字典值
|
||||||
|
|
|
@ -45,10 +45,6 @@ const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
name: '', //标样名称
|
|
||||||
code: '',//标样编号
|
|
||||||
states: '',//标样状态
|
|
||||||
tableData: [],
|
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//字典值
|
//字典值
|
||||||
|
|
|
@ -51,10 +51,6 @@ const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
name: '', //标样名称
|
|
||||||
code: '',//标样编号
|
|
||||||
states: '',//标样状态
|
|
||||||
tableData: [],
|
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//字典值
|
//字典值
|
||||||
|
|
|
@ -82,8 +82,8 @@
|
||||||
label="Operate"
|
label="Operate"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary" @click="editWordCloud(scope.row)">edit</el-button>
|
<el-button size="small" text type="primary" @click="editWordCloud(scope.row)">Edit</el-button>
|
||||||
<el-button size="small" text type="primary" @click="delWordCloud(scope.row)">delete</el-button>
|
<el-button size="small" text type="primary" @click="delWordCloud(scope.row)">Delete</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -121,8 +121,8 @@
|
||||||
label="Operate"
|
label="Operate"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary" @click="editHotspot(scope.row)">edit</el-button>
|
<el-button size="small" text type="primary" @click="editHotspot(scope.row)">Edit</el-button>
|
||||||
<el-button size="small" text type="primary" @click="delHotspot(scope.row)">delete</el-button>
|
<el-button size="small" text type="primary" @click="delHotspot(scope.row)">Delete</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
@ -28,10 +28,6 @@ const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
name: '', //标样名称
|
|
||||||
code: '',//标样编号
|
|
||||||
states: '',//标样状态
|
|
||||||
tableData: [],
|
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//字典值
|
//字典值
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="system-role-container layout-padding">
|
<div class="system-role-container layout-padding">
|
||||||
|
<el-config-provider :locale="en">
|
||||||
<el-row :gutter="22">
|
<el-row :gutter="22">
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
|
@ -93,6 +94,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</el-config-provider>
|
||||||
<RoleDialog ref="roleDialogRef"
|
<RoleDialog ref="roleDialogRef"
|
||||||
@refresh="getTableData()" />
|
@refresh="getTableData()" />
|
||||||
<Audit ref="auditRef" @callback="getTableData"/>
|
<Audit ref="auditRef" @callback="getTableData"/>
|
||||||
|
@ -100,6 +102,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="systemRole">
|
<script lang="ts" setup name="systemRole">
|
||||||
|
import en from 'element-plus/dist/locale/en.mjs'
|
||||||
import type { TabsPaneContext } from 'element-plus';
|
import type { TabsPaneContext } from 'element-plus';
|
||||||
import {getDataUploadPage,getDisasterPage} from '/@/api/response/dataUpload.js'
|
import {getDataUploadPage,getDisasterPage} from '/@/api/response/dataUpload.js'
|
||||||
const activeName = ref('first');
|
const activeName = ref('first');
|
||||||
|
|
|
@ -28,10 +28,6 @@ const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
name: '', //标样名称
|
|
||||||
code: '',//标样编号
|
|
||||||
states: '',//标样状态
|
|
||||||
tableData: [],
|
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//字典值
|
//字典值
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="system-role-container layout-padding">
|
<div class="system-role-container layout-padding">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
|
<el-config-provider :locale="en">
|
||||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||||
<el-input size="default" placeholder="please enter manager name" style="max-width: 200px" v-model="state.searchName"
|
<el-input size="default" placeholder="please enter manager name" style="max-width: 200px" v-model="state.searchName"
|
||||||
clearable></el-input>
|
clearable></el-input>
|
||||||
|
@ -66,6 +67,7 @@
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="state.tableData.total">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
|
</el-config-provider>
|
||||||
</div>
|
</div>
|
||||||
<RoleDialog ref="roleDialogRef"
|
<RoleDialog ref="roleDialogRef"
|
||||||
@refresh="getTableData()" />
|
@refresh="getTableData()" />
|
||||||
|
@ -74,6 +76,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="systemRole">
|
<script lang="ts" setup name="systemRole">
|
||||||
|
import en from 'element-plus/dist/locale/en.mjs'
|
||||||
import type { TabsPaneContext } from 'element-plus';
|
import type { TabsPaneContext } from 'element-plus';
|
||||||
import {getAdminManagerPage,auditData} from '/@/api/response/adminManager.js';
|
import {getAdminManagerPage,auditData} from '/@/api/response/adminManager.js';
|
||||||
import Audit from './component/audit.vue';
|
import Audit from './component/audit.vue';
|
||||||
|
|
|
@ -31,14 +31,11 @@ import {reactive, ref} from "vue";
|
||||||
import {addAdmin} from '/@/api/response/administrator.js';
|
import {addAdmin} from '/@/api/response/administrator.js';
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
const adminAddFormRef = ref();
|
const adminAddFormRef = ref();
|
||||||
|
const emit = defineEmits(['callback']);
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
name: '', //标样名称
|
|
||||||
code: '',//标样编号
|
|
||||||
states: '',//标样状态
|
|
||||||
tableData: [],
|
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//字典值
|
//字典值
|
||||||
|
|
|
@ -0,0 +1,144 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog title="edit administrator" v-model="state.isShowDialog" width="700px">
|
||||||
|
<el-form :model="state.ruleForm" size="default" label-width="90px" :rules="rules" ref="adminAddFormRef">
|
||||||
|
<el-form-item label="name" prop="name">
|
||||||
|
<el-input v-model="state.ruleForm.name" placeholder="please enter name" clearable style="width: 300px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="email" prop="email">
|
||||||
|
<el-input v-model="state.ruleForm.email" placeholder="please enter email" clearable style="width: 300px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="account" prop="account">
|
||||||
|
<el-input v-model="state.ruleForm.account" placeholder="please enter account" clearable style="width: 300px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="phone" prop="phone">
|
||||||
|
<el-input v-model="state.ruleForm.phone" placeholder="please enter phone" clearable style="width: 300px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="organization" prop="organization">
|
||||||
|
<el-input v-model="state.ruleForm.organization" placeholder="please enter organization" clearable style="width: 300px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit" size="default" :loading="state.isLoading">edit</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {reactive, ref} from "vue";
|
||||||
|
import {updateAdmin} from '/@/api/response/administrator.js';
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
const adminAddFormRef = ref();
|
||||||
|
const emit = defineEmits(['callback']);
|
||||||
|
const state = reactive({
|
||||||
|
isShowDialog: false,
|
||||||
|
isLoading:false,
|
||||||
|
ruleForm: {
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
//字典值
|
||||||
|
dictData: [],
|
||||||
|
unitData:[],
|
||||||
|
standardId: '',
|
||||||
|
detectionData: []
|
||||||
|
})
|
||||||
|
//自定义校验邮箱
|
||||||
|
let validateEmail = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
return callback(new Error("please enter email!"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const reg= /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/
|
||||||
|
if(reg.test(value)){
|
||||||
|
callback();
|
||||||
|
}else {
|
||||||
|
return callback(new Error("The mailbox format is incorrect!"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//自定义校验手机号
|
||||||
|
let checkPhone = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
return callback(new Error('please enter phone'));
|
||||||
|
} else {
|
||||||
|
//验证手机号
|
||||||
|
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
|
||||||
|
//验证区号
|
||||||
|
const phoneReg = /^\d{3}-\d{8}|\d{4}-\d{7}$/
|
||||||
|
if (reg.test(value)||phoneReg.test(value)) {
|
||||||
|
callback();
|
||||||
|
} else {
|
||||||
|
return callback(new Error('Please enter the correct contact number'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//校验规则
|
||||||
|
const rules = reactive({
|
||||||
|
name: [
|
||||||
|
{required: true, message: 'please enter name', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
email: [
|
||||||
|
/* {required: true, trigger: 'blur',validator:validateEmail}*/
|
||||||
|
{required: true, trigger: 'blur',type:'email'}
|
||||||
|
],
|
||||||
|
account: [
|
||||||
|
{required: true, message: 'please enter account', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
phone: [
|
||||||
|
{required: true, trigger: 'blur',validator:checkPhone}
|
||||||
|
],
|
||||||
|
organization: [
|
||||||
|
{required: true, message: 'please enter organization', trigger: 'blur'}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
//重置表单
|
||||||
|
const resetField = () => {
|
||||||
|
adminAddFormRef.value.resetFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开弹窗
|
||||||
|
const openDialog = (row) => {
|
||||||
|
state.isShowDialog = true;
|
||||||
|
Object.assign(state.ruleForm,row)
|
||||||
|
};
|
||||||
|
// 关闭弹窗
|
||||||
|
const closeDialog = () => {
|
||||||
|
state.isShowDialog = false;
|
||||||
|
//重置表格数据
|
||||||
|
state.ruleForm.tableData = [];
|
||||||
|
resetField();
|
||||||
|
};
|
||||||
|
// 取消
|
||||||
|
const onCancel = () => {
|
||||||
|
closeDialog();
|
||||||
|
};
|
||||||
|
// 新增
|
||||||
|
const onSubmit = () => {
|
||||||
|
adminAddFormRef.value.validate((valid, fields) => {
|
||||||
|
if (valid) {
|
||||||
|
state.isLoading = true;
|
||||||
|
updateAdmin(state.ruleForm).then(res => {
|
||||||
|
ElMessage.success("edit successfully");
|
||||||
|
emit('callback');
|
||||||
|
}).catch(err => {
|
||||||
|
//ElMessage.error("Add failure");
|
||||||
|
}).finally(()=>{
|
||||||
|
state.isLoading = false;
|
||||||
|
})
|
||||||
|
closeDialog();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 暴露变量
|
||||||
|
defineExpose({
|
||||||
|
openDialog,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="system-role-container layout-padding">
|
<div class="system-role-container layout-padding">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||||
|
<el-config-provider :locale="en">
|
||||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||||
<el-input size="default" placeholder="please enter username" style="max-width: 180px" v-model="state.searchName"
|
<el-input size="default" placeholder="please enter username" style="max-width: 180px" v-model="state.searchName"
|
||||||
clearable></el-input>
|
clearable></el-input>
|
||||||
|
@ -34,6 +35,9 @@
|
||||||
<el-table-column prop="name"
|
<el-table-column prop="name"
|
||||||
label="User name"
|
label="User name"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="account"
|
||||||
|
label="account"
|
||||||
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="email"
|
<el-table-column prop="email"
|
||||||
label="Email"
|
label="Email"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
|
@ -43,23 +47,11 @@
|
||||||
<el-table-column prop="phone"
|
<el-table-column prop="phone"
|
||||||
label="Contact details"
|
label="Contact details"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<!-- <el-table-column prop="vordmId"
|
|
||||||
label="VoRDM ID"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column prop="disasterType"
|
|
||||||
label="Disaster type"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column prop="applicationTime"
|
|
||||||
label="Application time"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column prop="Remark"
|
|
||||||
label="Remark"
|
|
||||||
show-overflow-tooltip></el-table-column>-->
|
|
||||||
<el-table-column prop="Operate"
|
<el-table-column prop="Operate"
|
||||||
label="Operate"
|
label="Operate"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <el-button link type="primary" size="small" @click="handleClick">Detail</el-button>-->
|
<el-button link type="primary" size="small" @click="editUser(scope.row)">Edit</el-button>
|
||||||
<el-button link type="primary" size="small" @click="deleteUser(scope.row)">Delete</el-button>
|
<el-button link type="primary" size="small" @click="deleteUser(scope.row)">Delete</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -75,19 +67,24 @@
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="state.tableData.total">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
|
</el-config-provider>
|
||||||
</div>
|
</div>
|
||||||
<AddAdministrator ref="administratorRef" @callback="getTableData"/>
|
<AddAdministrator ref="administratorRef" @callback="getTableData"/>
|
||||||
|
<EditAdministrator ref="editAdministratorRef" @callback="getTableData"/>
|
||||||
<RoleDialog ref="roleDialogRef"
|
<RoleDialog ref="roleDialogRef"
|
||||||
@refresh="getTableData()" />
|
@refresh="getTableData()" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="systemRole">
|
<script lang="ts" setup name="systemRole">
|
||||||
|
import en from 'element-plus/dist/locale/en.mjs'
|
||||||
import type { TabsPaneContext } from 'element-plus';
|
import type { TabsPaneContext } from 'element-plus';
|
||||||
import AddAdministrator from './component/addAdministrator.vue';
|
import AddAdministrator from './component/addAdministrator.vue';
|
||||||
|
import EditAdministrator from './component/editAdministrator.vue';
|
||||||
import {getAdminPage,remove} from '/@/api/response/administrator.js';
|
import {getAdminPage,remove} from '/@/api/response/administrator.js';
|
||||||
const activeName = ref('first');
|
const activeName = ref('first');
|
||||||
const administratorRef = ref();
|
const administratorRef = ref();
|
||||||
|
const editAdministratorRef = ref();
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||||
console.log(tab, event);
|
console.log(tab, event);
|
||||||
};
|
};
|
||||||
|
@ -134,9 +131,9 @@ const getTableData = () => {
|
||||||
const addUser = () => {
|
const addUser = () => {
|
||||||
administratorRef.value.openDialog();
|
administratorRef.value.openDialog();
|
||||||
};
|
};
|
||||||
// 打开修改角色弹窗
|
// 打开修改chief弹窗
|
||||||
const onOpenEditRole = (type, row) => {
|
const editUser = (row) => {
|
||||||
roleDialogRef.value.openDialog(type, row);
|
editAdministratorRef.value.openDialog(row);
|
||||||
};
|
};
|
||||||
//批量删除chief管理员数据
|
//批量删除chief管理员数据
|
||||||
const batchDel = () => {
|
const batchDel = () => {
|
||||||
|
|
Loading…
Reference in New Issue