更改id类型为string
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="system-edit-dic-container">
|
||||
<el-dialog :title="(ruleForm.configId!==0?'修改':'添加')+'参数'" v-model="isShowDialog" width="769px">
|
||||
<el-dialog :title="(ruleForm.configId!==''?'修改':'添加')+'参数'" v-model="isShowDialog" width="769px">
|
||||
<el-form :model="ruleForm" ref="formRef" :rules="rules" size="default" label-width="90px">
|
||||
<el-form-item label="参数名称" prop="configName">
|
||||
<el-input v-model="ruleForm.configName" placeholder="请输入参数名称" />
|
||||
@@ -27,7 +27,7 @@
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">取 消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default">{{ruleForm.configId!==0?'修 改':'添 加'}}</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default">{{ruleForm.configId!==''?'修 改':'添 加'}}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -39,7 +39,7 @@ import { reactive, toRefs, defineComponent,ref, unref } from 'vue';
|
||||
import {ElMessage} from "element-plus";
|
||||
import {addConfig, editConfig, getConfig} from "/@/api/system/config";
|
||||
interface RuleFormState {
|
||||
configId: number;
|
||||
configId: string;
|
||||
configName: string;
|
||||
configKey: string;
|
||||
configValue: string;
|
||||
@@ -65,7 +65,7 @@ export default defineComponent({
|
||||
const state = reactive<DicState>({
|
||||
isShowDialog: false,
|
||||
ruleForm: {
|
||||
configId: 0,
|
||||
configId: '',
|
||||
configName: '',
|
||||
configKey: '',
|
||||
configValue: '',
|
||||
@@ -99,7 +99,7 @@ export default defineComponent({
|
||||
};
|
||||
const resetForm = ()=>{
|
||||
state.ruleForm = {
|
||||
configId: 0,
|
||||
configId: '',
|
||||
configName: '',
|
||||
configKey: '',
|
||||
configValue: '',
|
||||
@@ -121,7 +121,7 @@ export default defineComponent({
|
||||
if (!formWrap) return;
|
||||
formWrap.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
if(state.ruleForm.configId!==0){
|
||||
if(state.ruleForm.configId!==''){
|
||||
//修改
|
||||
editConfig(state.ruleForm).then(()=>{
|
||||
ElMessage.success('参数修改成功');
|
||||
|
||||
@@ -111,7 +111,7 @@ import {deleteConfig, getConfigList} from "/@/api/system/config";
|
||||
|
||||
// 定义接口来定义对象的类型
|
||||
interface TableDataRow {
|
||||
configId: number;
|
||||
configId: string;
|
||||
configName: string;
|
||||
configKey: string;
|
||||
configValue: string,
|
||||
@@ -120,7 +120,7 @@ interface TableDataRow {
|
||||
createdAt: string,
|
||||
}
|
||||
interface TableDataState {
|
||||
ids:number[];
|
||||
ids:string[];
|
||||
tableData: {
|
||||
data: Array<TableDataRow>;
|
||||
total: number;
|
||||
@@ -182,9 +182,9 @@ export default defineComponent({
|
||||
// 删除参数(row 为空表示批量删除)
|
||||
const onRowDel = (row?: TableDataRow | null) => {
|
||||
let msg = '你确定要删除所选数据?';
|
||||
let ids:number[] = [] ;
|
||||
let ids:string[] = [] ;
|
||||
if(row){
|
||||
msg = `此操作将永久删除用户:“${row.configName}”,是否继续?`
|
||||
msg = `此操作将永久删除用户:"${row.configName}",是否继续?`
|
||||
ids = [row.configId]
|
||||
}else{
|
||||
ids = state.ids
|
||||
|
||||
@@ -70,13 +70,13 @@ import {ElMessage} from "element-plus";
|
||||
// 定义接口来定义对象的类型
|
||||
interface TableDataRow {
|
||||
deptName: string;
|
||||
id: number;
|
||||
parentId:number;
|
||||
id: string;
|
||||
parentId:string;
|
||||
children?: TableDataRow[];
|
||||
}
|
||||
interface RuleFormState {
|
||||
deptId:number;
|
||||
parentId: number;
|
||||
deptId:string;
|
||||
parentId: string;
|
||||
deptName: string;
|
||||
orderNum: number;
|
||||
leader: string;
|
||||
|
||||
@@ -63,7 +63,7 @@ import {ElMessageBox, ElMessage, FormInstance} from 'element-plus';
|
||||
import { forceLogout, listSysUserOnline} from "/@/api/system/monitor/userOnline";
|
||||
// 定义接口来定义对象的类型
|
||||
interface TableData {
|
||||
id: number;
|
||||
id: string;
|
||||
uuid: string;
|
||||
token: string;
|
||||
createTime: string;
|
||||
@@ -73,7 +73,7 @@ interface TableData {
|
||||
os: string;
|
||||
}
|
||||
interface TableDataState {
|
||||
ids:number[];
|
||||
ids:string[];
|
||||
tableData: {
|
||||
data: Array<TableData>;
|
||||
total: number;
|
||||
@@ -124,7 +124,7 @@ export default defineComponent({
|
||||
// 删除岗位
|
||||
const onRowDel = (row?: TableData | null) => {
|
||||
let msg = '你确定要强制退出用户登录?';
|
||||
let ids:number[] = [] ;
|
||||
let ids:string[] = [] ;
|
||||
if(row){
|
||||
msg = `将强制用户下线,是否继续?`
|
||||
ids = [row.id]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="system-edit-role-container">
|
||||
<el-dialog :title="(formData.id === 0 ? '添加' : '修改') + '角色'" v-model="isShowDialog" width="769px">
|
||||
<el-dialog :title="(formData.id === '' ? '添加' : '修改') + '角色'" v-model="isShowDialog" width="769px">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" size="default" label-width="90px">
|
||||
<el-row :gutter="35">
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
@@ -58,7 +58,7 @@
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">取 消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="loading">{{ formData.id === 0 ? '新 增' : '修 改' }}</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="loading">{{ formData.id === '' ? '新 增' : '修 改' }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -73,18 +73,18 @@ import { refreshBackEndControlRoutes } from '/@/router/backEnd';
|
||||
|
||||
// 定义接口来定义对象的类型
|
||||
interface MenuDataTree {
|
||||
id: number;
|
||||
pid: number;
|
||||
id: string;
|
||||
pid: string;
|
||||
title: string;
|
||||
children?: MenuDataTree[];
|
||||
}
|
||||
interface DialogRow {
|
||||
id: number;
|
||||
id: string;
|
||||
name: string;
|
||||
status: number;
|
||||
listOrder: number;
|
||||
remark: string;
|
||||
menuIds: Array<number>;
|
||||
menuIds: Array<string>;
|
||||
}
|
||||
interface RoleState {
|
||||
loading: boolean;
|
||||
@@ -111,7 +111,7 @@ export default defineComponent({
|
||||
loading: false,
|
||||
isShowDialog: false,
|
||||
formData: {
|
||||
id: 0,
|
||||
id: '',
|
||||
name: '',
|
||||
status: 1,
|
||||
listOrder: 0,
|
||||
@@ -161,7 +161,7 @@ export default defineComponent({
|
||||
if (valid) {
|
||||
state.loading = true;
|
||||
state.formData.menuIds = getMenuAllCheckedKeys();
|
||||
if (state.formData.id === 0) {
|
||||
if (state.formData.id === '') {
|
||||
//添加
|
||||
addRole(state.formData)
|
||||
.then(() => {
|
||||
@@ -200,7 +200,7 @@ export default defineComponent({
|
||||
state.menuExpand = false;
|
||||
state.menuNodeAll = false;
|
||||
state.formData = {
|
||||
id: 0,
|
||||
id: '',
|
||||
name: '',
|
||||
status: 1,
|
||||
listOrder: 0,
|
||||
|
||||
@@ -70,7 +70,7 @@ import EditRole from '/@/views/system/role/component/editRole.vue';
|
||||
import { deleteRole, getRoleList } from '/@/api/system/role';
|
||||
// 定义接口来定义对象的类型
|
||||
interface TableData {
|
||||
id: number;
|
||||
id: string;
|
||||
status: number;
|
||||
listOrder: number;
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user