diff --git a/nezha-fronted/src/components/common/js/validate.js b/nezha-fronted/src/components/common/js/validate.js
index 7c97e78f6..08991ae90 100644
--- a/nezha-fronted/src/components/common/js/validate.js
+++ b/nezha-fronted/src/components/common/js/validate.js
@@ -198,6 +198,16 @@ export function arrLength (rule, value, callback) { // 校验数组
}
}
+export function sysObjectIdInput (rule, value, callback) {
+ const sysId = /^(\d+\.)+\d${color}/
+ setTimeout(() => {
+ if (sysId.test(value)) {
+ callback()
+ } else {
+ callback(new Error(vm.$t('validate.sysId')))
+ }
+ }, 100)
+}
export function longAndLat (rule, value, callback) { // 校验经纬度
}
diff --git a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue
index 46a4f3e34..a51298a78 100644
--- a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue
@@ -15,10 +15,16 @@
-
+
+
+
+
+
+
+
{editModel.chartIds = data.map(d => d.id).join(',')}"
:result-format="resultFormat"
- >
+ >
+
+
+
+
@@ -62,6 +72,7 @@
// import { host, port } from '@/components/common/js/validate'
import selectWalk from '../../popBox/selectWalk'
import editRigthBox from '../../mixin/editRigthBox'
+import { sysObjectIdInput } from '@/components/common/js/validate'
export default {
name: 'modelBox',
@@ -87,6 +98,7 @@ export default {
editModel: {},
brandList: [], // brand 列表数据
editModule: {},
+ typeList: [],
chartlList: [], // chart 列表数据
ChartSearchShowFields: [ // ChartSearch 下拉搜索表头
{ title: 'ID', data: 'id' },
@@ -104,6 +116,12 @@ export default {
],
brandId: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
+ ],
+ typeId: [
+ { required: true, message: this.$t('validate.required'), trigger: 'change' }
+ ],
+ sysObjectId: [
+ { validator: sysObjectIdInput, trigger: 'blur' }
]
}
}
diff --git a/nezha-fronted/src/components/common/table/settings/modelTable.vue b/nezha-fronted/src/components/common/table/settings/modelTable.vue
index 8f8952b1c..9c070d887 100644
--- a/nezha-fronted/src/components/common/table/settings/modelTable.vue
+++ b/nezha-fronted/src/components/common/table/settings/modelTable.vue
@@ -123,6 +123,16 @@ export default {
show: true,
width: 120,
sortable: 'custom'
+ }, {
+ label: this.$t('overall.type'),
+ prop: 'type',
+ minWidth: 200,
+ show: true
+ }, {
+ label: this.$t('config.model.sysObjectId'),
+ prop: 'sysObjectId',
+ minWidth: 200,
+ show: false
}, {
label: this.$t('overall.remark'),
prop: 'remark',
diff --git a/nezha-fronted/src/components/page/config/model.vue b/nezha-fronted/src/components/page/config/model.vue
index 79020bbda..2e0231b14 100644
--- a/nezha-fronted/src/components/page/config/model.vue
+++ b/nezha-fronted/src/components/page/config/model.vue
@@ -90,6 +90,8 @@ export default {
id: '',
name: '',
chartIds: '',
+ sysObjectId: '',
+ type: { id: '', name: '' },
remark: ''
},
tableId: 'modelTable',