diff --git a/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js b/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js index e3551bfd..4a44ad4a 100644 --- a/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js +++ b/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js @@ -31,7 +31,7 @@ export function uploadedFilesList(query) { export function add(data) { return request({ url: api + '/upload', - method: 'post', + method: 'get', data: data, headers: { 'Content-Type': 'multipart/form-data' diff --git a/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue b/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue index 8d9d07eb..bfb34f09 100644 --- a/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue @@ -233,8 +233,8 @@ export default { if (valid) { const formData = new FormData(); formData.append("source", this.form.source) - formData.append("description", this.form.description) - formData.append("file", this.form.file) + formData.append("id", this.form.id || '') + formData.append("file", this.form.file || this.form.filePath) diff --git a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue index f97ae395..ae42d508 100644 --- a/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue @@ -294,7 +294,8 @@ export default { }, methods: { findParamName(tableName) { - return this.byTableData.find(item => item.tableName == tableName).paramName + const item = this.byTableData.find(item => item.tableName == tableName); + return item ? item.paramName : ''; }, /** 查询设备列表 */ getList() { @@ -336,8 +337,13 @@ export default { this.getList() }, byTableDataChange(val) { - this.byTableItem = this.byTableData.find(item => item.columnName == val) - this.form.alertRule.tableName = findData.tableName + this.byTableItem = this.byTableData.find(item => item.columnName == val); + if (this.byTableItem && this.form) { + if (!this.form.alertRule) { + this.form.alertRule = {}; + } + this.form.alertRule.tableName = this.byTableItem.tableName; + } }, // byTableDataChange(val) { // let findData = this.waming_rules.find(item => item.columnName == val) diff --git a/ALOps_sys_fe/alops-ui/src/views/index.vue b/ALOps_sys_fe/alops-ui/src/views/index.vue index 1b5c83db..2b402ed3 100644 --- a/ALOps_sys_fe/alops-ui/src/views/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/index.vue @@ -152,7 +152,7 @@
设备类型: - {{ selectedDevice.type || '服务器' }} + {{ selectedDevice.type || '未知' }}
设备状态: