diff --git a/nezha-fronted/src/components/common/js/validate.js b/nezha-fronted/src/components/common/js/validate.js index 08991ae90..6369d3593 100644 --- a/nezha-fronted/src/components/common/js/validate.js +++ b/nezha-fronted/src/components/common/js/validate.js @@ -199,8 +199,9 @@ export function arrLength (rule, value, callback) { // 校验数组 } export function sysObjectIdInput (rule, value, callback) { - const sysId = /^(\d+\.)+\d${color}/ + const sysId = /^(\d{1,9}\.){0,}[\d]+$/ setTimeout(() => { + if (value == '') return callback() if (sysId.test(value)) { callback() } else { diff --git a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue index a51298a78..53e07745e 100644 --- a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue +++ b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue @@ -21,8 +21,8 @@ - - + + @@ -98,7 +98,7 @@ export default { editModel: {}, brandList: [], // brand 列表数据 editModule: {}, - typeList: [], + typeDataList: [], chartlList: [], // chart 列表数据 ChartSearchShowFields: [ // ChartSearch 下拉搜索表头 { title: 'ID', data: 'id' }, @@ -131,6 +131,9 @@ export default { deep: true, immediate: true, handler (n) { + if (n.id) { + this.editModel.typeId = n.type.name + } this.isEdit = true this.editModel = JSON.parse(JSON.stringify(n)) } @@ -138,6 +141,7 @@ export default { }, created () { this.getBrandList() + this.modelTypeList() this.ChartTemplateList() }, methods: { @@ -227,6 +231,11 @@ export default { this.$get('visual/panel/chart', { pageSize: -1, varType: 1, panelId: 0, groupId: 0 }).then(res => { this.chartlList = res.data.list }) + }, + modelTypeList () { + this.$get('asset/model', { pageSize: -1, pageNo: 1 }).then(res => { + this.typeDataList = res.data.list + }) } } } diff --git a/nezha-fronted/src/components/common/table/settings/modelTable.vue b/nezha-fronted/src/components/common/table/settings/modelTable.vue index 9c070d887..93da2bb15 100644 --- a/nezha-fronted/src/components/common/table/settings/modelTable.vue +++ b/nezha-fronted/src/components/common/table/settings/modelTable.vue @@ -42,7 +42,10 @@ + {{utcTimeToTimezoneStr(scope.row[item.prop])}}