fix: 多语言字段变更优化字典映射类型
This commit is contained in:
@@ -276,8 +276,8 @@ export default {
|
|||||||
sexPleace: "Please select the user's gender",
|
sexPleace: "Please select the user's gender",
|
||||||
email: "Email",
|
email: "Email",
|
||||||
emailPleace: "Please enter the correct e-mail address",
|
emailPleace: "Please enter the correct e-mail address",
|
||||||
phonenumber: "Phone",
|
phone: "Phone",
|
||||||
phonenumberPleace: "Please enter the correct cell phone number",
|
phonePleace: "Please enter the correct cell phone number",
|
||||||
nick: "NickName",
|
nick: "NickName",
|
||||||
nickPleace: "Please enter a user nickname",
|
nickPleace: "Please enter a user nickname",
|
||||||
nickTip: "Nicknames can only contain letters, numbers, Chinese characters and underscores, and no less than 2 digits",
|
nickTip: "Nicknames can only contain letters, numbers, Chinese characters and underscores, and no less than 2 digits",
|
||||||
@@ -338,13 +338,13 @@ export default {
|
|||||||
headerRenderActions: "Whether to display the top navigation bar",
|
headerRenderActions: "Whether to display the top navigation bar",
|
||||||
},
|
},
|
||||||
profile: {
|
profile: {
|
||||||
phonenumber: "Phone",
|
phone: "Phone",
|
||||||
email: "Email",
|
email: "Email",
|
||||||
deptName: "Department",
|
deptName: "Department",
|
||||||
postGroup: "Possession of posts",
|
postGroup: "Possession of posts",
|
||||||
roleGroup: "Ownership",
|
roleGroup: "Ownership",
|
||||||
loginIp: "Log in",
|
loginIp: "Log in",
|
||||||
loginDate: "Login Time",
|
loginTime: "Login Time",
|
||||||
list: "Lists",
|
list: "Lists",
|
||||||
empty: "Empty State",
|
empty: "Empty State",
|
||||||
description: "No data yet, try refreshing",
|
description: "No data yet, try refreshing",
|
||||||
@@ -1205,7 +1205,7 @@ export default {
|
|||||||
dirCd: "Enter Dir",
|
dirCd: "Enter Dir",
|
||||||
viewAs: 'View Action',
|
viewAs: 'View Action',
|
||||||
reload: "Reload",
|
reload: "Reload",
|
||||||
follow: 'Monitoring Content',
|
follow: 'Enable Instant Update',
|
||||||
tailChar: 'End Characters',
|
tailChar: 'End Characters',
|
||||||
tailLines: 'End Lines',
|
tailLines: 'End Lines',
|
||||||
},
|
},
|
||||||
@@ -1882,13 +1882,13 @@ export default {
|
|||||||
},
|
},
|
||||||
dictData: {
|
dictData: {
|
||||||
dictType: "Dictionary name",
|
dictType: "Dictionary name",
|
||||||
dictCode: "Data Code",
|
dataId: "Data Code",
|
||||||
dictLabel: "Data Key",
|
dataLabel: "Data Key",
|
||||||
dictLabelPleac: "Please enter the data key correctly",
|
dataLabelPleac: "Please enter the data key correctly",
|
||||||
dictValue: "Data Value",
|
dataValue: "Data Value",
|
||||||
dictValuePleac: "Please enter the data value correctly",
|
dataValuePleac: "Please enter the data value correctly",
|
||||||
dictSort: "Data Sort",
|
dataSort: "Data Sort",
|
||||||
status: "Status",
|
statusFlag: "Status",
|
||||||
createTime: "CreateTime",
|
createTime: "CreateTime",
|
||||||
tagType: "Tag Type",
|
tagType: "Tag Type",
|
||||||
tagTypeShow: "Tag Type Show",
|
tagTypeShow: "Tag Type Show",
|
||||||
|
|||||||
@@ -276,8 +276,8 @@ export default {
|
|||||||
sexPleace: "请选择用户性别",
|
sexPleace: "请选择用户性别",
|
||||||
email: "电子邮箱",
|
email: "电子邮箱",
|
||||||
emailPleace: "请输入正确的电子邮箱",
|
emailPleace: "请输入正确的电子邮箱",
|
||||||
phonenumber: "手机号码",
|
phone: "手机号码",
|
||||||
phonenumberPleace: "请输入正确的手机号码",
|
phonePleace: "请输入正确的手机号码",
|
||||||
nick: "用户昵称",
|
nick: "用户昵称",
|
||||||
nickPleace: "请输入用户昵称",
|
nickPleace: "请输入用户昵称",
|
||||||
nickTip: "昵称少于2位",
|
nickTip: "昵称少于2位",
|
||||||
@@ -338,13 +338,13 @@ export default {
|
|||||||
headerRenderActions: "是否显示顶部导航栏",
|
headerRenderActions: "是否显示顶部导航栏",
|
||||||
},
|
},
|
||||||
profile: {
|
profile: {
|
||||||
phonenumber: "手机号码",
|
phone: "手机号码",
|
||||||
email: "用户邮箱",
|
email: "用户邮箱",
|
||||||
deptName: "所属部门",
|
deptName: "所属部门",
|
||||||
postGroup: "拥有岗位",
|
postGroup: "拥有岗位",
|
||||||
roleGroup: "拥有角色",
|
roleGroup: "拥有角色",
|
||||||
loginIp: "登录地址",
|
loginIp: "登录地址",
|
||||||
loginDate: "登录时间",
|
loginTime: "登录时间",
|
||||||
list: "列表",
|
list: "列表",
|
||||||
empty: "空状态",
|
empty: "空状态",
|
||||||
description: "暂无数据,尝试刷新看看",
|
description: "暂无数据,尝试刷新看看",
|
||||||
@@ -1882,13 +1882,13 @@ export default {
|
|||||||
},
|
},
|
||||||
dictData: {
|
dictData: {
|
||||||
dictType: "字典名称",
|
dictType: "字典名称",
|
||||||
dictCode: "数据代码",
|
dataId: "数据代码",
|
||||||
dictLabel: "数据键名",
|
dataLabel: "数据键名",
|
||||||
dictLabelPleac: "请正确输入数据键名",
|
dataLabelPleac: "请正确输入数据键名",
|
||||||
dictValue: "数据键值",
|
dataValue: "数据键值",
|
||||||
dictValuePleac: "请正确输入数据键值",
|
dataValuePleac: "请正确输入数据键值",
|
||||||
dictSort: "数据排序",
|
dataSort: "数据排序",
|
||||||
status: "数据状态",
|
statusFlag: "数据状态",
|
||||||
createTime: "创建时间",
|
createTime: "创建时间",
|
||||||
tagType: "标签类型",
|
tagType: "标签类型",
|
||||||
tagTypeShow: "回显预览",
|
tagTypeShow: "回显预览",
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ const useDictStore = defineStore('dict', {
|
|||||||
parseDataDict(data: Record<string, any>) {
|
parseDataDict(data: Record<string, any>) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: data.dictLabel,
|
label: data.dataLabel,
|
||||||
value: data.dictValue,
|
value: data.dataValue,
|
||||||
tagType: data.tagType,
|
tagType: data.tagType,
|
||||||
tagClass: data.tagClass,
|
tagClass: data.tagClass,
|
||||||
},
|
},
|
||||||
@@ -43,10 +43,10 @@ const useDictStore = defineStore('dict', {
|
|||||||
let disct = this.dicts.get(key);
|
let disct = this.dicts.get(key);
|
||||||
if (disct === undefined || disct.length === 0) {
|
if (disct === undefined || disct.length === 0) {
|
||||||
const res = await getDictDataType(key);
|
const res = await getDictDataType(key);
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
const dictData: DictType[] = res.data.map(d => ({
|
const dictData: DictType[] = res.data.map((d:any) => ({
|
||||||
label: d.dictLabel,
|
label: d.dataLabel,
|
||||||
value: d.dictValue,
|
value: d.dataValue,
|
||||||
tagType: d.tagType,
|
tagType: d.tagType,
|
||||||
tagClass: d.tagClass,
|
tagClass: d.tagClass,
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const useNeInfoStore = defineStore('neinfo', {
|
|||||||
const res = await listAllNeInfo({
|
const res = await listAllNeInfo({
|
||||||
bandStatus: false,
|
bandStatus: false,
|
||||||
});
|
});
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
// 原始列表
|
// 原始列表
|
||||||
this.neList = JSON.parse(JSON.stringify(res.data));
|
this.neList = JSON.parse(JSON.stringify(res.data));
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ const useNeInfoStore = defineStore('neinfo', {
|
|||||||
return { code: 1, data: this.traceInterfaceList, msg: 'success' };
|
return { code: 1, data: this.traceInterfaceList, msg: 'success' };
|
||||||
}
|
}
|
||||||
const res = await getNeTraceInterfaceAll();
|
const res = await getNeTraceInterfaceAll();
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
this.traceInterfaceList = res.data;
|
this.traceInterfaceList = res.data;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@@ -104,7 +104,7 @@ const useNeInfoStore = defineStore('neinfo', {
|
|||||||
return { code: 1, data: this.perMeasurementList, msg: 'success' };
|
return { code: 1, data: this.perMeasurementList, msg: 'success' };
|
||||||
}
|
}
|
||||||
const res = await getNePerformanceList();
|
const res = await getNePerformanceList();
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
this.perMeasurementList = res.data;
|
this.perMeasurementList = res.data;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const useRouterStore = defineStore('router', {
|
|||||||
*/
|
*/
|
||||||
async generateRoutes() {
|
async generateRoutes() {
|
||||||
const res = await getRouters();
|
const res = await getRouters();
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
const buildRoutes = buildRouters(res.data.concat());
|
const buildRoutes = buildRouters(res.data.concat());
|
||||||
this.buildRouterData = buildRoutes;
|
this.buildRouterData = buildRoutes;
|
||||||
return buildRoutes;
|
return buildRoutes;
|
||||||
@@ -77,11 +77,7 @@ type RecordRaws = {
|
|||||||
*/
|
*/
|
||||||
function buildRouters(recordRaws: RecordRaws[]): RouteRecordRaw[] {
|
function buildRouters(recordRaws: RecordRaws[]): RouteRecordRaw[] {
|
||||||
const routers: RouteRecordRaw[] = [];
|
const routers: RouteRecordRaw[] = [];
|
||||||
for (const item of recordRaws) {
|
for (const item of recordRaws) {
|
||||||
// 过滤旧前端菜单 是layui的菜单跳过
|
|
||||||
if (['', '/page"'].includes(item.path)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// 路由页面组件
|
// 路由页面组件
|
||||||
let component: RouteComponent = {};
|
let component: RouteComponent = {};
|
||||||
if (item.component) {
|
if (item.component) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ type UserInfo = {
|
|||||||
/**用户昵称 */
|
/**用户昵称 */
|
||||||
nickName: string;
|
nickName: string;
|
||||||
/**用户手机号 */
|
/**用户手机号 */
|
||||||
phonenumber: string;
|
phone: string;
|
||||||
/**用户邮箱 */
|
/**用户邮箱 */
|
||||||
email: string;
|
email: string;
|
||||||
/**用户性别 */
|
/**用户性别 */
|
||||||
@@ -39,7 +39,7 @@ const useUserStore = defineStore('user', {
|
|||||||
permissions: [],
|
permissions: [],
|
||||||
avatar: '',
|
avatar: '',
|
||||||
nickName: '',
|
nickName: '',
|
||||||
phonenumber: '',
|
phone: '',
|
||||||
email: '',
|
email: '',
|
||||||
sex: undefined,
|
sex: undefined,
|
||||||
profile: {},
|
profile: {},
|
||||||
@@ -64,7 +64,7 @@ const useUserStore = defineStore('user', {
|
|||||||
getBaseInfo(state) {
|
getBaseInfo(state) {
|
||||||
return {
|
return {
|
||||||
nickName: state.nickName,
|
nickName: state.nickName,
|
||||||
phonenumber: state.phonenumber,
|
phone: state.phone,
|
||||||
email: state.email,
|
email: state.email,
|
||||||
sex: state.sex,
|
sex: state.sex,
|
||||||
};
|
};
|
||||||
@@ -77,7 +77,7 @@ const useUserStore = defineStore('user', {
|
|||||||
*/
|
*/
|
||||||
setBaseInfo(data: Record<string, any>) {
|
setBaseInfo(data: Record<string, any>) {
|
||||||
this.nickName = data.nickName;
|
this.nickName = data.nickName;
|
||||||
this.phonenumber = data.phonenumber;
|
this.phone = data.phone;
|
||||||
this.email = data.email;
|
this.email = data.email;
|
||||||
this.sex = data.sex;
|
this.sex = data.sex;
|
||||||
},
|
},
|
||||||
@@ -119,7 +119,7 @@ const useUserStore = defineStore('user', {
|
|||||||
this.avatar = user.avatar;
|
this.avatar = user.avatar;
|
||||||
// 基础信息
|
// 基础信息
|
||||||
this.nickName = user.nickName;
|
this.nickName = user.nickName;
|
||||||
this.phonenumber = user.phonenumber;
|
this.phone = user.phone;
|
||||||
this.email = user.email;
|
this.email = user.email;
|
||||||
this.sex = user.sex;
|
this.sex = user.sex;
|
||||||
|
|
||||||
@@ -134,8 +134,8 @@ const useUserStore = defineStore('user', {
|
|||||||
|
|
||||||
// 水印文字信息=用户昵称 手机号
|
// 水印文字信息=用户昵称 手机号
|
||||||
// let waterMarkContent = this.userName;
|
// let waterMarkContent = this.userName;
|
||||||
// if (this.phonenumber) {
|
// if (this.phone) {
|
||||||
// waterMarkContent = `${this.userName} ${this.phonenumber}`;
|
// waterMarkContent = `${this.userName} ${this.phone}`;
|
||||||
// }
|
// }
|
||||||
// useLayoutStore().changeWaterMark(waterMarkContent);
|
// useLayoutStore().changeWaterMark(waterMarkContent);
|
||||||
useLayoutStore().changeWaterMark('');
|
useLayoutStore().changeWaterMark('');
|
||||||
|
|||||||
7
src/typings/request.d.ts
vendored
7
src/typings/request.d.ts
vendored
@@ -1,7 +0,0 @@
|
|||||||
/**数据列表 */
|
|
||||||
type DataList = {
|
|
||||||
code: number;
|
|
||||||
msg: string;
|
|
||||||
total: number;
|
|
||||||
rows: Record<string, any>;
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user