Compare commits
10 Commits
89e43b7b12
...
e94204423b
| Author | SHA1 | Date | |
|---|---|---|---|
| e94204423b | |||
| bbc10ce359 | |||
| a63b01e6ec | |||
| e5dcbab2d1 | |||
| b57652aea4 | |||
| ef1c13dcd2 | |||
| 0c160fa12d | |||
| 19f81f3453 | |||
| 2ba918232f | |||
| 20b7fc2717 |
@@ -5,14 +5,14 @@ ENV = 'development'
|
||||
# 后端服务地址配置
|
||||
# 切换环境时,修改下面两个地址的 IP 即可
|
||||
# 当前环境: 192.168.3.11(本地开发地址)
|
||||
# 当前环境: 192.168.3.94(本地开发地址)王楠
|
||||
# 备用环境: 192.168.3.200(服务器地址)
|
||||
# 备用环境: 116.204.74.41(公网开发地址)
|
||||
# 备用环境: 172.20.10.7(张哥)
|
||||
# ============================================================
|
||||
|
||||
# 主服务地址(端口8808)
|
||||
# 用途: 系统管理、用户认证、权限控制、模块开通等原有功能
|
||||
VITE_API_URL = 'http://192.168.3.94:8808/'
|
||||
VITE_API_URL = 'http://192.168.3.11:8808/'
|
||||
# 新功能服务地址(端口8000)
|
||||
# 用途: 资产管理、分类、SKU、订单等新业务模块
|
||||
VITE_NEW_API_URL = 'http://192.168.3.94:8000/'
|
||||
VITE_NEW_API_URL = 'http://192.168.3.11:8000/'
|
||||
|
||||
@@ -12,11 +12,11 @@ export function getCategoryTree(query?: Object) {
|
||||
}
|
||||
|
||||
// 获取分类详情
|
||||
export function getCategory(id: string) {
|
||||
export function getCategory(id: number | string) {
|
||||
return newService({
|
||||
url: '/assets/category/getCategory',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
params: { id: id.toString() },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -56,19 +56,19 @@ export function updateCategory(data: object) {
|
||||
}
|
||||
|
||||
// 删除分类
|
||||
export function deleteCategory(id: string) {
|
||||
export function deleteCategory(id: number | string) {
|
||||
return newService({
|
||||
url: '/assets/category/deleteCategory',
|
||||
method: 'delete',
|
||||
params: { id },
|
||||
params: { id: id.toString() },
|
||||
});
|
||||
}
|
||||
|
||||
// 更新分类状态
|
||||
export function updateCategoryStatus(id: string, status: number) {
|
||||
export function updateCategoryStatus(id: number | string, status: number) {
|
||||
return newService({
|
||||
url: '/assets/category/updateCategoryStatus',
|
||||
method: 'put',
|
||||
data: { id, status },
|
||||
data: { id: id.toString(), status },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import request, { newService } from '/@/utils/request';
|
||||
//获取账号列表
|
||||
export function getaccountList(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/customer/service/account/list',
|
||||
url: '/customer-server/customer/service/account/list',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
@@ -12,7 +12,7 @@ export function getaccountList(data: object) {
|
||||
//添加客服账号
|
||||
export function addAccount(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/customer/service/account/add',
|
||||
url: '/customer-server/customer/service/account/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
@@ -21,7 +21,7 @@ export function addAccount(data: object) {
|
||||
//禁用账号
|
||||
export function updatestate(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/customer/service/account/toggleStatus',
|
||||
url: '/customer-server/customer/service/account/toggleStatus',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
@@ -30,7 +30,7 @@ export function updatestate(data: object) {
|
||||
//更新账号
|
||||
export function updateAccount(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/customer/service/account/update',
|
||||
url: '/customer-server/customer/service/account/update',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
@@ -39,7 +39,7 @@ export function updateAccount(data: object) {
|
||||
//获取RAGFlow配置(提示词)
|
||||
export function getRAGFlowConfig(params: object) {
|
||||
return newService({
|
||||
url: '/customerService/ragflow/config/get',
|
||||
url: '/customer-server/ragflow/config/get',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
@@ -48,7 +48,7 @@ export function getRAGFlowConfig(params: object) {
|
||||
//更新提示词
|
||||
export function updatePrompt(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/ragflow/config/updatePrompt',
|
||||
url: '/customer-server/ragflow/config/updatePrompt',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import request, { newService } from '/@/utils/request';
|
||||
//添加产品
|
||||
export function addProduct(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/product/add',
|
||||
url: '/customer-server/product/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
@@ -12,7 +12,7 @@ export function addProduct(data: object) {
|
||||
//删除产品
|
||||
export function deleteProduct(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/product/delete',
|
||||
url: '/customer-server/product/delete',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
@@ -21,7 +21,7 @@ export function deleteProduct(data: object) {
|
||||
//获取产品列表
|
||||
export function getList(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/product/list',
|
||||
url: '/customer-server/product/list',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
@@ -30,7 +30,7 @@ export function getList(data: object) {
|
||||
//更新产品
|
||||
export function updateProduct(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/product/update',
|
||||
url: '/customer-server/product/update',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
@@ -39,7 +39,7 @@ export function updateProduct(data: object) {
|
||||
// 导出产品
|
||||
export function exportProduct(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/product/export',
|
||||
url: '/customer-server/product/export',
|
||||
responseType: 'blob',
|
||||
method: 'get',
|
||||
params: data,
|
||||
@@ -49,7 +49,7 @@ export function exportProduct(data: object) {
|
||||
//导入产品
|
||||
export function importProduct(data: FormData) {
|
||||
return newService({
|
||||
url: '/customerService/product/import',
|
||||
url: '/customer-server/product/import',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -3,7 +3,7 @@ import request, { newService } from '/@/utils/request';
|
||||
//获取数据列表
|
||||
export function getDataList(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/data/statistics/list',
|
||||
url: '/customer-server/data/statistics/list',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
@@ -12,7 +12,7 @@ export function getDataList(data: object) {
|
||||
// 导出报表
|
||||
export function exportReport(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/data/statistics/export',
|
||||
url: '/customer-server/data/statistics/export',
|
||||
responseType: 'blob',
|
||||
method: 'get',
|
||||
params: data,
|
||||
|
||||
@@ -3,7 +3,7 @@ import request, { newService } from '/@/utils/request';
|
||||
//获取话术列表
|
||||
export function getscriptList(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/speechcraft/list',
|
||||
url: '/customer-server/speechcraft/list',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
@@ -12,7 +12,7 @@ export function getscriptList(data: object) {
|
||||
//增加话术
|
||||
export function addScript(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/speechcraft/add',
|
||||
url: '/customer-server/speechcraft/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
@@ -21,7 +21,7 @@ export function addScript(data: object) {
|
||||
//删除话术列表
|
||||
export function deleteScript(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/speechcraft/delete',
|
||||
url: '/customer-server/speechcraft/delete',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
@@ -30,7 +30,7 @@ export function deleteScript(data: object) {
|
||||
//更新话术列表
|
||||
export function updateScript(data: object) {
|
||||
return newService({
|
||||
url: '/customerService/speechcraft/update',
|
||||
url: '/customer-server/speechcraft/update',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ export function getConfigList(query:Object) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getConfig(id:number) {
|
||||
export function getConfig(id:string) {
|
||||
return request({
|
||||
url: '/api/v1/system/config/get',
|
||||
method: 'get',
|
||||
@@ -33,7 +33,7 @@ export function editConfig(data:any) {
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteConfig(ids:number[]) {
|
||||
export function deleteConfig(ids:string[]) {
|
||||
return request({
|
||||
url: '/api/v1/system/config/delete',
|
||||
method: 'delete',
|
||||
|
||||
@@ -9,7 +9,7 @@ export function listSysUserOnline(query:object) {
|
||||
})
|
||||
}
|
||||
|
||||
export function forceLogout(ids:number[]) {
|
||||
export function forceLogout(ids:string[]) {
|
||||
return request({
|
||||
url: '/api/v1/system/online/forceLogout',
|
||||
method: 'delete',
|
||||
|
||||
@@ -23,7 +23,7 @@ export function addRole(data:object) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getRole(id:number) {
|
||||
export function getRole(id:string) {
|
||||
return request({
|
||||
url: '/api/v1/system/role/get',
|
||||
method: 'get',
|
||||
@@ -41,7 +41,7 @@ export function editRole(data:object) {
|
||||
}
|
||||
|
||||
|
||||
export function deleteRole(id:number) {
|
||||
export function deleteRole(id:string) {
|
||||
return request({
|
||||
url: '/api/v1/system/role/delete',
|
||||
method: 'delete',
|
||||
@@ -59,7 +59,7 @@ export function dataScope(data:any) {
|
||||
|
||||
|
||||
// 根据角色ID查询部门树结构
|
||||
export function roleDeptTreeSelect(roleId:number) {
|
||||
export function roleDeptTreeSelect(roleId:string) {
|
||||
return request({
|
||||
url: '/api/v1/system/role/deptTreeSelect',
|
||||
method: 'get',
|
||||
|
||||
@@ -163,7 +163,7 @@ interface DictValue {
|
||||
}
|
||||
|
||||
interface RuleForm {
|
||||
id: string;
|
||||
id: string | '';
|
||||
parentId: string;
|
||||
name: string;
|
||||
sort: number;
|
||||
@@ -186,7 +186,7 @@ const dictLoading = ref(false);
|
||||
const categoryFormDiff = createFormDiff<Record<string, any>>();
|
||||
|
||||
const ruleForm = reactive<RuleForm>({
|
||||
id: '',
|
||||
id: '',
|
||||
parentId: '',
|
||||
name: '',
|
||||
sort: 0,
|
||||
@@ -324,7 +324,18 @@ const openDialog = (row?: CategoryRow | string, edit?: boolean) => {
|
||||
|
||||
// 获取分类树数据
|
||||
getCategoryTree().then((res: any) => {
|
||||
categoryData.value = res.data?.tree ?? [];
|
||||
const tree = res.data?.tree ?? [];
|
||||
|
||||
// 递归函数,将所有id字段转换为字符串
|
||||
const convertIdsToString = (items: any[]): any[] => {
|
||||
return items.map(item => ({
|
||||
...item,
|
||||
id: item.id?.toString(),
|
||||
children: item.children && item.children.length > 0 ? convertIdsToString(item.children) : []
|
||||
}));
|
||||
};
|
||||
|
||||
categoryData.value = convertIdsToString(tree);
|
||||
});
|
||||
|
||||
if (row && typeof row === 'object' && edit) {
|
||||
@@ -439,7 +450,10 @@ const buildSubmitData = () => {
|
||||
});
|
||||
|
||||
return {
|
||||
...ruleForm,
|
||||
id: ruleForm.id,
|
||||
parentId: ruleForm.parentId ?? '',
|
||||
name: ruleForm.name,
|
||||
sort: ruleForm.sort,
|
||||
attrs: processedAttrs,
|
||||
};
|
||||
};
|
||||
@@ -469,8 +483,9 @@ const onSubmit = () => {
|
||||
submitLoading.value = false;
|
||||
});
|
||||
} else {
|
||||
// 新增模式:传递所有字段
|
||||
addCategory(submitData)
|
||||
// 新增模式:不传id
|
||||
const { id, ...rest } = submitData;
|
||||
addCategory(rest)
|
||||
.then(() => {
|
||||
ElMessage.success('添加成功');
|
||||
closeDialog();
|
||||
|
||||
@@ -102,7 +102,18 @@ const getCategoryList = () => {
|
||||
.then((res: any) => {
|
||||
// 主类目不做展示,直接取主类目的children
|
||||
const tree = res.data?.tree ?? [];
|
||||
tableData.data = tree.length > 0 && tree[0].children ? tree[0].children : [];
|
||||
|
||||
// 递归函数,将所有id字段转换为字符串
|
||||
const convertIdsToString = (items: any[]): any[] => {
|
||||
return items.map(item => ({
|
||||
...item,
|
||||
id: item.id?.toString(),
|
||||
children: item.children && item.children.length > 0 ? convertIdsToString(item.children) : []
|
||||
}));
|
||||
};
|
||||
|
||||
const processedTree = convertIdsToString(tree);
|
||||
tableData.data = processedTree.length > 0 && processedTree[0].children ? processedTree[0].children : [];
|
||||
})
|
||||
.catch(() => {
|
||||
tableData.data = [];
|
||||
|
||||
@@ -321,4 +321,4 @@ onMounted(() => {
|
||||
.inventory-count-page {
|
||||
padding: 15px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -111,7 +111,7 @@ import { ref, reactive, onMounted } from 'vue';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
|
||||
interface VideoItem {
|
||||
id: number;
|
||||
id: string;
|
||||
name: string;
|
||||
thumbnail: string;
|
||||
videoType: string;
|
||||
@@ -141,7 +141,7 @@ const previewVideo = ref<VideoItem | null>(null);
|
||||
// 模拟数据
|
||||
const mockData: VideoItem[] = [
|
||||
{
|
||||
id: 1,
|
||||
id: '1',
|
||||
name: '商务男性数字人-产品介绍',
|
||||
thumbnail: 'https://picsum.photos/400/225?random=10',
|
||||
videoType: 'avatar',
|
||||
@@ -154,7 +154,7 @@ const mockData: VideoItem[] = [
|
||||
createdAt: '2024-01-15 10:30:00',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
id: '2',
|
||||
name: '甜美女性数字人-直播带货',
|
||||
thumbnail: 'https://picsum.photos/400/225?random=11',
|
||||
videoType: 'avatar',
|
||||
@@ -167,7 +167,7 @@ const mockData: VideoItem[] = [
|
||||
createdAt: '2024-01-14 14:20:00',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
id: '3',
|
||||
name: '科技感背景-蓝色粒子',
|
||||
thumbnail: 'https://picsum.photos/400/225?random=12',
|
||||
videoType: 'background',
|
||||
@@ -180,7 +180,7 @@ const mockData: VideoItem[] = [
|
||||
createdAt: '2024-01-13 09:15:00',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
id: '4',
|
||||
name: '办公室场景背景',
|
||||
thumbnail: 'https://picsum.photos/400/225?random=13',
|
||||
videoType: 'background',
|
||||
@@ -193,7 +193,7 @@ const mockData: VideoItem[] = [
|
||||
createdAt: '2024-01-12 16:45:00',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
id: '5',
|
||||
name: '转场特效-渐变',
|
||||
thumbnail: 'https://picsum.photos/400/225?random=14',
|
||||
videoType: 'material',
|
||||
@@ -206,7 +206,7 @@ const mockData: VideoItem[] = [
|
||||
createdAt: '2024-01-11 11:00:00',
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
id: '6',
|
||||
name: '知性女性数字人-新闻播报',
|
||||
thumbnail: 'https://picsum.photos/400/225?random=15',
|
||||
videoType: 'avatar',
|
||||
|
||||
@@ -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