合并调整完成
This commit is contained in:
parent
cbe6c15c28
commit
8b0b7d608c
@ -2,4 +2,5 @@ VITE_BASE_URL=/
|
|||||||
|
|
||||||
# backend service base url, test environment
|
# backend service base url, test environment
|
||||||
# VITE_SERVICE_BASE_URL=http://localhost:8080/snail-job
|
# VITE_SERVICE_BASE_URL=http://localhost:8080/snail-job
|
||||||
VITE_SERVICE_BASE_URL=http://10.18.190.195:8080/snail-job
|
# VITE_SERVICE_BASE_URL=http://10.18.190.195:8080/snail-job
|
||||||
|
VITE_SERVICE_BASE_URL=http://10.21.21.29:8080/snail-job
|
||||||
|
@ -330,6 +330,7 @@ const local: App.I18n.Schema = {
|
|||||||
dictionary: 'Dictionary',
|
dictionary: 'Dictionary',
|
||||||
pods: 'Online Machine',
|
pods: 'Online Machine',
|
||||||
namespace: 'Namespace',
|
namespace: 'Namespace',
|
||||||
|
group: 'Group Config',
|
||||||
notify: 'Notify',
|
notify: 'Notify',
|
||||||
notify_recipient: 'Notify Recipient',
|
notify_recipient: 'Notify Recipient',
|
||||||
notify_config: 'Notify Config',
|
notify_config: 'Notify Config',
|
||||||
@ -352,7 +353,8 @@ const local: App.I18n.Schema = {
|
|||||||
job: 'Schedule Task Management',
|
job: 'Schedule Task Management',
|
||||||
job_task: 'Schedule Task List',
|
job_task: 'Schedule Task List',
|
||||||
job_batch: 'Schedule Task Batch List',
|
job_batch: 'Schedule Task Batch List',
|
||||||
group: 'Group Config'
|
dictionary_data: 'Dictionary Data',
|
||||||
|
dictionary_type: 'Dictionary Type',
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
common: {
|
common: {
|
||||||
@ -517,6 +519,43 @@ const local: App.I18n.Schema = {
|
|||||||
addDictionary: 'Add Dictionary',
|
addDictionary: 'Add Dictionary',
|
||||||
editDictionary: 'Edit Dictionary'
|
editDictionary: 'Edit Dictionary'
|
||||||
},
|
},
|
||||||
|
dictionaryType: {
|
||||||
|
title: 'Dictionary Management',
|
||||||
|
detail: 'Dictionary Details',
|
||||||
|
dictionaryId: 'Dictionary ID',
|
||||||
|
dictionaryName: 'Dictionary Name',
|
||||||
|
dictionaryType: 'Dictionary Type',
|
||||||
|
dictionaryStatus: 'Status',
|
||||||
|
remark: 'Remark',
|
||||||
|
createTime: 'Create Time',
|
||||||
|
form: {
|
||||||
|
dictionaryNamePlaceHolder: 'Please enter dictionary name',
|
||||||
|
dictionaryName: 'Dictionary Name',
|
||||||
|
dictionaryTypePlaceHolder: 'Please enter dictionary type',
|
||||||
|
dictionaryType: 'Dictionary Type',
|
||||||
|
dictionaryStatusPlaceHolder: 'Please enter status',
|
||||||
|
dictionaryStatus: 'Status',
|
||||||
|
createTime: 'Create Time'
|
||||||
|
},
|
||||||
|
addDictionary: 'Add Dictionary',
|
||||||
|
editDictionary: 'Edit Dictionary'
|
||||||
|
},
|
||||||
|
dictionaryData: {
|
||||||
|
title: 'Dictionary Data',
|
||||||
|
detail: 'Dictionary Data Details',
|
||||||
|
dictionaryCode: 'Dictionary Code',
|
||||||
|
dictionaryLabel: 'Dictionary Label',
|
||||||
|
dictionaryValue: 'Dictionary Value',
|
||||||
|
createTime: 'Create Time',
|
||||||
|
dictionaryType: 'Dictionary Type',
|
||||||
|
form: {
|
||||||
|
dictLabel: 'Dictionary Label',
|
||||||
|
dictValue: 'Dictionary Value',
|
||||||
|
dictType: 'Dictionary Type'
|
||||||
|
},
|
||||||
|
addDictionary: 'Add Dictionary Entry',
|
||||||
|
editDictionary: 'Edit Dictionary Entry'
|
||||||
|
},
|
||||||
namespace: {
|
namespace: {
|
||||||
title: 'Namespace',
|
title: 'Namespace',
|
||||||
name: 'Name',
|
name: 'Name',
|
||||||
|
@ -353,8 +353,8 @@ const local: App.I18n.Schema = {
|
|||||||
job: '数采任务',
|
job: '数采任务',
|
||||||
job_task: '任务管理',
|
job_task: '任务管理',
|
||||||
job_batch: '执行批次',
|
job_batch: '执行批次',
|
||||||
dictionary_type: '字典管理',
|
dictionary_data: '字典数据',
|
||||||
dictionary_data: '字典数据'
|
dictionary_type: '字典类型',
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
common: {
|
common: {
|
||||||
@ -509,6 +509,26 @@ const local: App.I18n.Schema = {
|
|||||||
addCategory: '新增分类',
|
addCategory: '新增分类',
|
||||||
editCategory: '编辑分类'
|
editCategory: '编辑分类'
|
||||||
},
|
},
|
||||||
|
dictionary: {
|
||||||
|
title: '字典管理',
|
||||||
|
dictionId: '字典ID',
|
||||||
|
dictionaryName: '字典名称',
|
||||||
|
dictionaryType: '字典类型',
|
||||||
|
dictionaryStatus: '字典状态',
|
||||||
|
remark: '备注',
|
||||||
|
createTime: '创建时间',
|
||||||
|
form: {
|
||||||
|
dictionaryNamePlaceHolder: '请输入字典名称',
|
||||||
|
dictionaryName: '字典名称',
|
||||||
|
dictionaryTypePlaceHolder: '请选择字典类型',
|
||||||
|
dictionaryType: '字典类型',
|
||||||
|
dictionaryStatusPlaceHolder: '请选择字典状态',
|
||||||
|
dictionaryStatus: '字典状态',
|
||||||
|
createTime: '创建时间'
|
||||||
|
},
|
||||||
|
addDictionary: '添加字典',
|
||||||
|
editDictionary: '编辑字典'
|
||||||
|
},
|
||||||
dictionaryType: {
|
dictionaryType: {
|
||||||
title: '字典管理',
|
title: '字典管理',
|
||||||
detail: '字典详情',
|
detail: '字典详情',
|
||||||
|
59
src/typings/app.d.ts
vendored
59
src/typings/app.d.ts
vendored
@ -670,6 +670,24 @@ declare namespace App {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
pods: {
|
||||||
|
title: string;
|
||||||
|
nodeType: string;
|
||||||
|
groupName: string;
|
||||||
|
hostId: string;
|
||||||
|
hostIp: string;
|
||||||
|
hostPort: string;
|
||||||
|
consumerBuckets: string;
|
||||||
|
updateDt: string;
|
||||||
|
contextPath: string;
|
||||||
|
form: {
|
||||||
|
groupName: string;
|
||||||
|
};
|
||||||
|
type: {
|
||||||
|
client: string;
|
||||||
|
server: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
category: {
|
category: {
|
||||||
title: string;
|
title: string;
|
||||||
form: {
|
form: {
|
||||||
@ -679,14 +697,14 @@ declare namespace App {
|
|||||||
categoryParentName: string;
|
categoryParentName: string;
|
||||||
categoryType: string;
|
categoryType: string;
|
||||||
createTime: string;
|
createTime: string;
|
||||||
};
|
},
|
||||||
type: {
|
type: {
|
||||||
website: string;
|
website: string;
|
||||||
literature: string;
|
literature: string;
|
||||||
};
|
},
|
||||||
addCategory: string;
|
addCategory: string;
|
||||||
editCategory: string;
|
editCategory: string;
|
||||||
};
|
},
|
||||||
dictionaryType: {
|
dictionaryType: {
|
||||||
title: string;
|
title: string;
|
||||||
detail: string;
|
detail: string;
|
||||||
@ -724,41 +742,6 @@ declare namespace App {
|
|||||||
addDictionary: string;
|
addDictionary: string;
|
||||||
editDictionary: string;
|
editDictionary: string;
|
||||||
};
|
};
|
||||||
pods: {
|
|
||||||
title: string;
|
|
||||||
nodeType: string;
|
|
||||||
groupName: string;
|
|
||||||
hostId: string;
|
|
||||||
hostIp: string;
|
|
||||||
hostPort: string;
|
|
||||||
consumerBuckets: string;
|
|
||||||
updateDt: string;
|
|
||||||
contextPath: string;
|
|
||||||
form: {
|
|
||||||
groupName: string;
|
|
||||||
};
|
|
||||||
type: {
|
|
||||||
client: string;
|
|
||||||
server: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
category: {
|
|
||||||
title: string;
|
|
||||||
form: {
|
|
||||||
name: string;
|
|
||||||
categoryName: string;
|
|
||||||
categoryStatus: string;
|
|
||||||
categoryParentName: string;
|
|
||||||
categoryType: string;
|
|
||||||
createTime: string;
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
website: string;
|
|
||||||
literature: string;
|
|
||||||
},
|
|
||||||
addCategory: string;
|
|
||||||
editCategory: string;
|
|
||||||
},
|
|
||||||
dictionary: {
|
dictionary: {
|
||||||
title: string;
|
title: string;
|
||||||
dictionId: string;
|
dictionId: string;
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
import { fetchGetDictionaryDataList, fetchGetDictionaryTypeList } from '@/service/api';
|
import { fetchGetDictionaryDataList, fetchGetDictionaryTypeList } from '@/service/api';
|
||||||
// export dict
|
|
||||||
// {
|
|
||||||
// type:{
|
|
||||||
// sys_sex:[
|
|
||||||
// {label:"男",
|
|
||||||
// value: "1"},
|
|
||||||
// {label:"女",
|
|
||||||
// value: "2"}
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
type indexAbleDictData = {
|
type indexAbleDictData = {
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
@ -24,26 +13,6 @@ type indexAbleDict = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
// const dictTypeList = reactive<Api.DictionaryType.DictionaryType[]>([]);
|
|
||||||
// const dict: indexAbleDict = {
|
|
||||||
// type: {
|
|
||||||
// fruits: [
|
|
||||||
// { label: '苹果', value: 'apple' },
|
|
||||||
// { label: '香蕉', value: 'banana' },
|
|
||||||
// { label: '橙子', value: 'orange' }
|
|
||||||
// ],
|
|
||||||
// colors: [
|
|
||||||
// { label: '红色', value: 'red' },
|
|
||||||
// { label: '绿色', value: 'green' },
|
|
||||||
// { label: '蓝色', value: 'blue' }
|
|
||||||
// ],
|
|
||||||
// animals: [
|
|
||||||
// { label: '狗', value: 'dog' },
|
|
||||||
// { label: '猫', value: 'cat' },
|
|
||||||
// { label: '鸟', value: 'bird' }
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
const typeList: string[] = (await fetchGetDictionaryTypeList()).data?.data.map(item => item.dictType) || [];
|
const typeList: string[] = (await fetchGetDictionaryTypeList()).data?.data.map(item => item.dictType) || [];
|
||||||
const dataList: any[] =
|
const dataList: any[] =
|
||||||
(await fetchGetDictionaryDataList()).data?.data.map(item => ({
|
(await fetchGetDictionaryDataList()).data?.data.map(item => ({
|
||||||
@ -65,6 +34,6 @@ async function init() {
|
|||||||
};
|
};
|
||||||
return dict;
|
return dict;
|
||||||
}
|
}
|
||||||
const dict = init();
|
const dict = await init();
|
||||||
|
|
||||||
export default dict;
|
export default dict;
|
||||||
|
@ -95,7 +95,6 @@ const Delete = async (id: number) => {
|
|||||||
if (res.error) return;
|
if (res.error) return;
|
||||||
onDeleted();
|
onDeleted();
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -9,6 +9,7 @@ import { useAuthStore } from '@/store/modules/auth';
|
|||||||
import { translateOptions } from '@/utils/common';
|
import { translateOptions } from '@/utils/common';
|
||||||
import { fetchAddCategory, fetchEditCategory } from '@/service/api'
|
import { fetchAddCategory, fetchEditCategory } from '@/service/api'
|
||||||
// import { categoryTypeOptions } from '@/constants/business';
|
// import { categoryTypeOptions } from '@/constants/business';
|
||||||
|
import dict from '@/utils/dict';
|
||||||
|
|
||||||
// 定义组件选项
|
// 定义组件选项
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@ -28,6 +29,8 @@ interface Emits {
|
|||||||
(e: 'submitted'): void;
|
(e: 'submitted'): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let key = "字典类型";
|
||||||
|
|
||||||
const categoryTypeOptions = ref([
|
const categoryTypeOptions = ref([
|
||||||
{ value: '1', label: '网站' },
|
{ value: '1', label: '网站' },
|
||||||
{ value: '2', label: '文献' }
|
{ value: '2', label: '文献' }
|
||||||
@ -96,10 +99,8 @@ function handleUpdateModelWhenEdit() {
|
|||||||
}
|
}
|
||||||
// 监听抽屉的可见性,当抽屉打开时,更新字典
|
// 监听抽屉的可见性,当抽屉打开时,更新字典
|
||||||
function handleUpdateDictWhenEdit() {
|
function handleUpdateDictWhenEdit() {
|
||||||
categoryTypeOptions.value = [
|
console.log(dict.type);
|
||||||
{ value: '1', label: '网站' },
|
categoryTypeOptions.value = dict.type[key];
|
||||||
{ value: '2', label: '文献666' }
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭抽屉
|
// 关闭抽屉
|
||||||
|
Loading…
Reference in New Issue
Block a user