From ca82a0a74be7a4b328b04e0e63fae80cb0ccf160 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Fri, 6 Sep 2024 19:21:57 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 4 +++- src/i18n/locales/zh-CN.ts | 6 +++++- src/views/logManage/exportFile/index.vue | 21 +++++++++++++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 9d40bcd2..d5678efc 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1051,6 +1051,7 @@ export default { }, customTarget:{ kpiId:' Custom Indicator', + kpiIdTip:'This Ne has no custom indicators', period:' Granularity', title:' Custom Indicator Title', objectType:' Object type', @@ -1067,6 +1068,7 @@ export default { inactive:'Inactive', symbol:'Symbol', element:'Element', + granularity:'Granularity', } }, traceManage: { @@ -1284,7 +1286,7 @@ export default { tailLines: 'End Lines', }, exportFile:{ - fileName:'File Name', + fileName:'File Source', downTip: "Confirm the download file name is [{fileName}] File?", downTipErr: "Failed to get file", deleteTip: "Confirm the delete file name is [{fileName}] File?", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 7062158a..fe59d903 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -1,3 +1,5 @@ +import { title } from "process"; + export default { // 语言 i18n: '中文', @@ -1051,6 +1053,7 @@ export default { }, customTarget:{ kpiId:'自定义指标项', + kpiIdTip:'该网元没有自定义指标', period:'颗粒度', title:'自定义指标项标题', objectType:'对象类型', @@ -1067,6 +1070,7 @@ export default { inactive:'停用', symbol:"符号", element:'元素', + granularity:'颗粒度', } }, traceManage: { @@ -1284,7 +1288,7 @@ export default { tailLines: '末尾行数', }, exportFile:{ - fileName:'文件名', + fileName:'文件来源', downTip: "确认下载文件名为 【{fileName}】 文件?", downTipErr: "文件获取失败", deleteTip: "确认删除文件名为 【{fileName}】 文件?", diff --git a/src/views/logManage/exportFile/index.vue b/src/views/logManage/exportFile/index.vue index ca97ce8d..9e9db183 100644 --- a/src/views/logManage/exportFile/index.vue +++ b/src/views/logManage/exportFile/index.vue @@ -139,7 +139,9 @@ function fnDownloadFile(row: Record) { if (downLoading.value) return; Modal.confirm({ title: t('common.tipTitle'), - content: t('views.logManage.exportFile.downTip', { fileName: row.fileName }), + content: t('views.logManage.exportFile.downTip', { + fileName: row.fileName, + }), onOk() { downLoading.value = true; const hide = message.loading(t('common.loading'), 0); @@ -175,7 +177,9 @@ function fnRecordDelete(row: Record) { if (delLoading.value) return; Modal.confirm({ title: t('common.tipTitle'), - content: t('views.logManage.exportFile.deleteTip', { fileName: row.fileName }), + content: t('views.logManage.exportFile.deleteTip', { + fileName: row.fileName, + }), onOk() { const key = 'delFile'; delLoading.value = true; @@ -288,6 +292,19 @@ onMounted(() => { /> + + + + + {{ queryParams.path }} + + + + From 9ac352487749202517b17cc3cd8124679ba7cf7b Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Fri, 6 Sep 2024 19:22:25 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8C=87?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/perfManage/customTarget.ts | 151 ++++---- src/views/perfManage/customTarget/index.vue | 376 ++++++++++---------- 2 files changed, 262 insertions(+), 265 deletions(-) diff --git a/src/api/perfManage/customTarget.ts b/src/api/perfManage/customTarget.ts index 4134a0fd..ac3b9ab6 100644 --- a/src/api/perfManage/customTarget.ts +++ b/src/api/perfManage/customTarget.ts @@ -8,57 +8,72 @@ import { parseDateToStr } from '@/utils/date-utils'; * @param query 查询参数 * @returns object */ -export async function listCustom(query: Record) { - let totalSQL = 'select count(*) as total from pm_custom_title where 1=1 '; - let rowsSQL = 'select * from pm_custom_title where 1=1 '; +// export async function listCustom(query: Record) { +// let totalSQL = 'select count(*) as total from pm_custom_title where 1=1 '; +// let rowsSQL = 'select * from pm_custom_title where 1=1 '; - // 查询 - let querySQL = ''; - if (query.neType) { - querySQL += ` and ne_type like '%${query.neType}%' `; - } +// // 查询 +// let querySQL = ''; +// if (query.neType) { +// querySQL += ` and ne_type like '%${query.neType}%' `; +// } - // 排序 - let sortSql = ' order by update_time '; - if (query.sortOrder === 'asc') { - sortSql += ' asc '; - } else { - sortSql += ' desc '; - } - // 分页 - const pageNum = (query.pageNum - 1) * query.pageSize; - const limtSql = ` limit ${pageNum},${query.pageSize} `; +// // 排序 +// let sortSql = ' order by update_time '; +// if (query.sortOrder === 'asc') { +// sortSql += ' asc '; +// } else { +// sortSql += ' desc '; +// } +// // 分页 +// const pageNum = (query.pageNum - 1) * query.pageSize; +// const limtSql = ` limit ${pageNum},${query.pageSize} `; +// // 发起请求 +// const result = await request({ +// url: `/api/rest/databaseManagement/v1/select/omc_db/pm_custom_title`, +// method: 'get', +// params: { +// totalSQL: totalSQL + querySQL, +// rowsSQL: rowsSQL + querySQL + sortSql + limtSql, +// }, +// }); + +// // 解析数据 +// if (result.code === RESULT_CODE_SUCCESS) { +// const data: DataList = { +// total: 0, +// rows: [], +// code: result.code, +// msg: result.msg, +// }; +// result.data.data.forEach((item: any) => { +// const itemData = item['pm_custom_title']; +// if (Array.isArray(itemData)) { +// if (itemData.length === 1 && itemData[0]['total'] >= 0) { +// data.total = itemData[0]['total']; +// } else { +// data.rows = itemData.map(v => parseObjLineToHump(v)); +// } +// } +// }); +// return data; +// } +// return result; +// } + +/** + * 新 查询自定义指标 + * @param query 查询参数 + * @returns object + */ +export async function listCustom(query?: Record) { // 发起请求 const result = await request({ - url: `/api/rest/databaseManagement/v1/select/omc_db/pm_custom_title`, + url: `/pm/kpiC/title/totalList`, method: 'get', - params: { - totalSQL: totalSQL + querySQL, - rowsSQL: rowsSQL + querySQL + sortSql + limtSql, - }, + params: query, }); - - // 解析数据 - if (result.code === RESULT_CODE_SUCCESS) { - const data: DataList = { - total: 0, - rows: [], - code: result.code, - msg: result.msg, - }; - result.data.data.forEach((item: any) => { - const itemData = item['pm_custom_title']; - if (Array.isArray(itemData)) { - if (itemData.length === 1 && itemData[0]['total'] >= 0) { - data.total = itemData[0]['total']; - } else { - data.rows = itemData.map(v => parseObjLineToHump(v)); - } - } - }); - return data; - } return result; } @@ -68,22 +83,10 @@ export async function listCustom(query: Record) { * @returns object */ export async function getCustom(id: string | number) { - // 发起请求 - const result = await request({ - url: `/api/rest/databaseManagement/v1/select/omc_db/pm_custom_title`, + return request({ + url: `/pm/kpiC/title/${id}`, method: 'get', - params: { - SQL: `select * from pm_custom_title where id = ${id}`, - }, }); - // 解析数据 - if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) { - let data = result.data.data[0]; - return Object.assign(result, { - data: parseObjLineToHump(data['pm_custom_title'][0]), - }); - } - return result; } /** @@ -92,21 +95,10 @@ export async function getCustom(id: string | number) { * @returns object */ export function addCustom(data: Record) { - let obj: any = { - title: data.title, - ne_type: data.neType, - kpi_id: data.kpiId, - object_type: data.objectType, - expression: data.expression, - period: data.period, - description: data.description, - kpi_set: data.kpiSet, - }; - return request({ - url: `/api/rest/databaseManagement/v1/omc_db/pm_custom_title`, + url: `/pm/kpiC/title`, method: 'post', - data: { 'data': [obj] }, + data: data, }); } @@ -116,20 +108,10 @@ export function addCustom(data: Record) { * @returns object */ export function updateCustom(data: Record) { - let obj: any = { - title: data.title, - ne_type: data.neType, - kpi_id: data.kpiId, - object_type: data.objectType, - expression: data.expression, - period: data.period, - description: data.description, - kpi_set: data.kpiSet, - }; return request({ - url: `/api/rest/databaseManagement/v1/omc_db/pm_custom_title?WHERE=id=${data.id}`, + url: `/pm/kpiC/title/${data.id}`, method: 'put', - data: { data: obj }, + data: data, }); } @@ -139,8 +121,7 @@ export function updateCustom(data: Record) { */ export async function delCustom(data: Record) { return request({ - url: `/api/rest/databaseManagement/v1/omc_db/pm_custom_title?WHERE=id=${data.id}`, + url: `/pm/kpiC/title/${data.id}`, method: 'delete', }); } - diff --git a/src/views/perfManage/customTarget/index.vue b/src/views/perfManage/customTarget/index.vue index 2c5b78f3..21ec15dd 100644 --- a/src/views/perfManage/customTarget/index.vue +++ b/src/views/perfManage/customTarget/index.vue @@ -7,8 +7,8 @@ import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface'; import { ColumnsType } from 'ant-design-vue/lib/table'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import useI18n from '@/hooks/useI18n'; -import useDictStore from '@/store/modules/dict'; import useNeInfoStore from '@/store/modules/neinfo'; +import { parseObjLineToHump } from '@/utils/parse-utils'; import { addCustom, delCustom, @@ -16,15 +16,17 @@ import { listCustom, updateCustom, } from '@/api/perfManage/customTarget'; -const { getDict } = useDictStore(); +import { getKPITitle } from '@/api/perfManage/goldTarget'; +import useDictStore from '@/store/modules/dict'; const { t, currentLocale } = useI18n(); +const { getDict } = useDictStore(); /**字典数据 */ let dict: { - /**原始严重程度 */ - activeAlarmSeverity: DictType[]; + /**状态 */ + sysNormalDisable: DictType[]; } = reactive({ - activeAlarmSeverity: [], + sysNormalDisable: [], }); /**查询参数 */ @@ -85,15 +87,22 @@ let tableColumns: ColumnsType = [ align: 'center', }, { - title: t('views.perfManage.customTarget.kpiSet'), - dataIndex: 'kpiSet', + title: t('views.perfManage.customTarget.title'), + dataIndex: 'title', align: 'center', }, { - title: t('views.perfManage.customTarget.period'), - dataIndex: 'threshold', + title: t('views.perfManage.customTarget.description'), + dataIndex: 'description', align: 'center', }, + { + title: t('views.perfManage.customTarget.status'), + dataIndex: 'status', + key: 'status', + align: 'left', + width: 100, + }, { title: t('common.operate'), key: 'id', @@ -175,13 +184,14 @@ function fnGetList(pageNum?: number) { queryParams.pageNum = pageNum; } listCustom(toRaw(queryParams)).then(res => { - if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { // 取消勾选 if (tableState.selectedRowKeys.length > 0) { tableState.selectedRowKeys = []; } tablePagination.total = res.total; - tableState.data = res.rows; + tableState.data = res.data; + if ( tablePagination.total <= (queryParams.pageNum - 1) * tablePagination.pageSize && @@ -207,8 +217,6 @@ type ModalStateType = { neType: string[]; /**网元类型性能测量集 */ neTypPerformance: Record[]; - /**网元类型对象类型集 */ - objectTypeArr: Record[]; /**已选择性能测量项 */ selectedPre: string[]; /**表单数据 */ @@ -224,21 +232,32 @@ let modalState: ModalStateType = reactive({ title: '', neType: [], neTypPerformance: [], - objectTypeArr: [], selectedPre: [], from: { - id: '', - neType: '', - objectType: '', - expression: '', - kpiSet: '', - title: '', + id: undefined, + neType: 'UDM', kpiId: '', - period: 900, + title: '', + expression: '', + status: 'Active', + unit: '', + description: '', }, confirmLoading: false, }); +/**表单中多选的OPTION */ +const modalStateFromOption = reactive({ + symbolJson: [ + { label: '(', value: '(' }, + { label: ')', value: ')' }, + { label: '+', value: '+' }, + { label: '-', value: '-' }, + { label: '*', value: '*' }, + { label: '/', value: '/' }, + ], +}); + /**对话框内表单属性和校验规则 */ const modalStateFrom = Form.useForm( modalState.from, @@ -249,14 +268,6 @@ const modalStateFrom = Form.useForm( message: t('views.traceManage.task.neTypePlease'), }, ], - objectType: [ - { - required: true, - message: - t('views.perfManage.customTarget.objectType') + - t('common.unableNull'), - }, - ], expression: [ { required: true, @@ -279,60 +290,33 @@ const modalStateFrom = Form.useForm( t('views.perfManage.customTarget.title') + t('common.unableNull'), }, ], - period: [ - { - required: true, - message: - t('views.perfManage.customTarget.period') + t('common.unableNull'), - }, - ], }) ); -/**性能测量数据集选择初始 */ +/**性能测量数据集选择初始 value:neType*/ function fnSelectPerformanceInit(value: any) { - const performance = useNeInfoStore().perMeasurementList.filter( - i => i.neType === value - ); - if (modalState.from.objectType) modalState.from.objectType = ''; - if (modalState.selectedPre.length > 0) modalState.selectedPre = []; - modalState.from.expression = ''; - const arrSet = new Set(); - performance.forEach((data: any) => { - arrSet.add(data.objectType); - }); - // 组装对象类型options - modalState.objectTypeArr = Array.from(arrSet).map((value: any) => ({ - label: value, - value: value, - })); - - //进行分组选择 - const groupedData = performance.reduce((groups: any, item: any) => { - const { kpiCode, ...rest } = item; - if (!groups[kpiCode]) { - groups[kpiCode] = []; + modalState.neTypPerformance = [{value:'granularity',label:t('views.perfManage.customTarget.granularity')}]; + // 当前语言 + var language = currentLocale.value.split('_')[0]; + if (language === 'zh') language = 'cn'; + // 获取表头文字 + getKPITitle(value).then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + for (const item of res.data) { + const kpiDisplay = item[`${language}Title`]; + const kpiValue = item[`kpiId`]; + modalState.neTypPerformance.push({ + value: kpiValue, + label: kpiDisplay, + }); + } + } else { + message.warning({ + content: t('common.getInfoFail'), + duration: 2, + }); } - groups[kpiCode].push(rest); - return groups; - }, {}); - - //渲染出性能测量集的选择项 - modalState.neTypPerformance = Object.keys(groupedData).map(kpiCode => { - return { - label: kpiCode, - options: groupedData[kpiCode].map((item: any) => { - return { - value: item.kpiId, - label: - currentLocale.value === 'zh_CN' - ? JSON.parse(item.titleJson).cn - : JSON.parse(item.titleJson).en, - kpiCode: kpiCode, - }; - }), - }; }); } @@ -340,30 +324,17 @@ function fnSelectPerformanceInit(value: any) { * 对话框弹出显示为 新增或者修改 * @param noticeId 网元id, 不传为新增 */ -function fnModalVisibleByEdit(id?: string) { +function fnModalVisibleByEdit(row?: any, id?: any) { if (!id) { modalStateFrom.resetFields(); modalState.title = t('views.perfManage.customTarget.addCustom'); modalState.visibleByEdit = true; + fnSelectPerformanceInit(modalState.from.neType); } else { - if (modalState.confirmLoading) return; - const hide = message.loading(t('common.loading'), 0); - modalState.confirmLoading = true; - getCustom(id).then(res => { - modalState.confirmLoading = false; - hide(); - if (res.code === RESULT_CODE_SUCCESS && res.data) { - fnSelectPerformanceInit(res.data.neType); - modalState.selectedPre = res.data.kpiSet - ? res.data.kpiSet.split(',') - : []; - modalState.from = Object.assign(modalState.from, res.data); - modalState.title = t('views.perfManage.customTarget.editCustom'); - modalState.visibleByEdit = true; - } else { - message.error(t('views.perfManage.customTarget.errorCustomInfo'), 3); - } - }); + fnSelectPerformanceInit(row.neType); + modalState.from = Object.assign(modalState.from, row); + modalState.title = t('views.perfManage.customTarget.editCustom'); + modalState.visibleByEdit = true; } } @@ -375,13 +346,6 @@ function fnModalOk() { modalStateFrom .validate() .then(e => { - // if (modalState.selectedPre.length === 0) { - // message.error({ - // content: `${res.msg}`, - // duration: 3, - // }); - // } - modalState.from.kpiSet = modalState.selectedPre.join(','); const from = toRaw(modalState.from); //return false; modalState.confirmLoading = true; @@ -424,46 +388,57 @@ function fnModalCancel() { modalStateFrom.resetFields(); modalState.neType = []; modalState.neTypPerformance = []; - modalState.selectedPre = []; } /** * 选择性能指标,填充进当前计算公式的值 */ function fnSelectPer(s: any, option: any) { + modalState.from.expression += `'${s}'`; +} + +function fnSelectSymbol(s: any) { modalState.from.expression += s; } - -/** - * 多选框取消性能指标 表达式的变化 - */ -function fnDelPer(s: any, option: any) { - modalState.from.expression = modalState.from.expression.replace(s, ''); -} - -// function checkText(e:any){ -// console.log(e); -// const reg = /^[*+-/]*$/; - -// } - +/**网元参数 */ +let neCascaderOptions = ref[]>([]); onMounted(() => { - // 初始字典数据 - Promise.allSettled([getDict('active_alarm_severity')]).then(resArr => { - if (resArr[0].status === 'fulfilled') { - dict.activeAlarmSeverity = resArr[0].value; - } - }); - Promise.allSettled([ // 获取网元网元列表 + getDict('sys_normal_disable'), useNeInfoStore().fnNelist(), - // 获取性能测量集列表 - useNeInfoStore().fnNeTaskPerformance(), - ]).finally(() => { - // 获取列表数据 - fnGetList(); - }); + ]) + .then(resArr => { + if (resArr[0].status === 'fulfilled') { + dict.sysNormalDisable = resArr[0].value; + } + + if ( + resArr[1].status === 'fulfilled' && + Array.isArray(resArr[1].value.data) + ) { + if (resArr[1].value.data.length > 0) { + // 过滤不可用的网元 + neCascaderOptions.value = + useNeInfoStore().getNeCascaderOptions.filter((item: any) => { + return !['OMC', 'NSSF', 'NEF', 'NRF', 'LMF', 'N3IWF'].includes( + item.value + ); + }); + if (neCascaderOptions.value.length === 0) { + message.warning({ + content: t('common.noData'), + duration: 2, + }); + return; + } + } + } + }) + .finally(() => { + // 获取列表数据 + fnGetList(); + }); }); @@ -484,7 +459,7 @@ onMounted(() => { > @@ -580,7 +555,7 @@ onMounted(() => { @@ -593,6 +568,24 @@ onMounted(() => { + + @@ -610,7 +603,12 @@ onMounted(() => { @ok="fnModalOk" @cancel="fnModalCancel" > - + { > { - + @@ -646,6 +649,16 @@ onMounted(() => { + + + + + + { - - - - - - - - - - + + + - - + + + + + + + @@ -714,6 +729,7 @@ onMounted(() => { Date: Mon, 9 Sep 2024 15:01:04 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8C=87?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/perfManage/customData.ts | 19 + src/views/perfManage/kpiCReport/index.vue | 834 ++++++++++++++++++++++ 2 files changed, 853 insertions(+) create mode 100644 src/api/perfManage/customData.ts create mode 100644 src/views/perfManage/kpiCReport/index.vue diff --git a/src/api/perfManage/customData.ts b/src/api/perfManage/customData.ts new file mode 100644 index 00000000..237b0a65 --- /dev/null +++ b/src/api/perfManage/customData.ts @@ -0,0 +1,19 @@ +import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; +import { request } from '@/plugins/http-fetch'; +import { parseObjLineToHump } from '@/utils/parse-utils'; +import { parseDateToStr } from '@/utils/date-utils'; + +/** + * 新 查询自定义指标数据 + * @param query 查询参数 + * @returns object + */ +export async function listCustomData(query: Record) { + // 发起请求 + const result = await request({ + url: `/pm/kpiC/report`, + method: 'get', + params: query, + }); + return result; +} diff --git a/src/views/perfManage/kpiCReport/index.vue b/src/views/perfManage/kpiCReport/index.vue new file mode 100644 index 00000000..d3bf8af3 --- /dev/null +++ b/src/views/perfManage/kpiCReport/index.vue @@ -0,0 +1,834 @@ + + + + + From 7dcdfabce209e8009d41d13ed93f44947fd71b73 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Mon, 9 Sep 2024 16:23:18 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/perfManage/kpiCReport/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/perfManage/kpiCReport/index.vue b/src/views/perfManage/kpiCReport/index.vue index d3bf8af3..1f07224c 100644 --- a/src/views/perfManage/kpiCReport/index.vue +++ b/src/views/perfManage/kpiCReport/index.vue @@ -266,7 +266,7 @@ function fnGetListTitle() { tableColumns.value = []; const columns: ColumnsType = []; for (const item of res.data) { - const kpiDisplay = item[`title`] + `(${item['unit']})`; + const kpiDisplay = item[`unit`]? item[`title`]+ `(${item['unit']})`:item[`title`]; const kpiValue = item[`kpiId`]; columns.push({ title: kpiDisplay, From 71338670f0002b383a77e965ebd3dec88efa1e13 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Mon, 9 Sep 2024 18:12:23 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8E=92=E7=89=88?= =?UTF-8?q?=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 1 + src/i18n/locales/zh-CN.ts | 1 + src/views/perfManage/customTarget/index.vue | 81 +++++++++++++-------- 3 files changed, 53 insertions(+), 30 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index d5678efc..c1737b86 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1069,6 +1069,7 @@ export default { symbol:'Symbol', element:'Element', granularity:'Granularity', + unit:'Unit', } }, traceManage: { diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index fe59d903..b235130f 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -1071,6 +1071,7 @@ export default { symbol:"符号", element:'元素', granularity:'颗粒度', + unit:'单位', } }, traceManage: { diff --git a/src/views/perfManage/customTarget/index.vue b/src/views/perfManage/customTarget/index.vue index 21ec15dd..de384b03 100644 --- a/src/views/perfManage/customTarget/index.vue +++ b/src/views/perfManage/customTarget/index.vue @@ -290,13 +290,25 @@ const modalStateFrom = Form.useForm( t('views.perfManage.customTarget.title') + t('common.unableNull'), }, ], + unit: [ + { + required: true, + message: + t('views.perfManage.customTarget.unit') + t('common.unableNull'), + }, + ], }) ); /**性能测量数据集选择初始 value:neType*/ function fnSelectPerformanceInit(value: any) { modalState.from.expression = ''; - modalState.neTypPerformance = [{value:'granularity',label:t('views.perfManage.customTarget.granularity')}]; + modalState.neTypPerformance = [ + { + value: 'granularity', + label: t('views.perfManage.customTarget.granularity'), + }, + ]; // 当前语言 var language = currentLocale.value.split('_')[0]; if (language === 'zh') language = 'cn'; @@ -627,7 +639,10 @@ onMounted(() => { - + { - - - - - - + + + + + + + + + + + + + Date: Mon, 9 Sep 2024 19:06:53 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8E=92=E7=89=88?= =?UTF-8?q?=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/perfManage/customTarget/index.vue | 70 ++++++++++----------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/views/perfManage/customTarget/index.vue b/src/views/perfManage/customTarget/index.vue index de384b03..b7e44405 100644 --- a/src/views/perfManage/customTarget/index.vue +++ b/src/views/perfManage/customTarget/index.vue @@ -638,29 +638,6 @@ onMounted(() => { - - - - - - @@ -686,19 +663,18 @@ onMounted(() => { + + + + + - - - - - - - + { > + + + + + + @@ -733,6 +732,7 @@ onMounted(() => { > +