diff --git a/src/main.js b/src/main.js index eb6c7d1..2974916 100644 --- a/src/main.js +++ b/src/main.js @@ -17,4 +17,13 @@ app.use(ElementPlus, { locale }) app.component('Pagination', Pagination) app.config.globalProperties.getColumnName = getColumnName app.config.globalProperties.parseTime = parseTime +app.config.globalProperties.msgSuccess = function (msg) { + this.$message({ showClose: true, message: msg, type: 'success' }) +} +app.config.globalProperties.msgError = function (msg) { + this.$message({ showClose: true, message: msg, type: 'error' }) +} +app.config.globalProperties.msgInfo = function (msg) { + this.$message.info(msg) +} app.mount('#app') diff --git a/src/views/Field.vue b/src/views/Field.vue index fc1b17b..d01d543 100644 --- a/src/views/Field.vue +++ b/src/views/Field.vue @@ -149,7 +149,7 @@ 'TabColName-LongLabel', 'TabColName-ValFormat', 'TabColName-LastModify', - 'TabColName-LastUser', + // 'TabColName-LastUser', 'TabColName-CreateTime' ] this.loading = false @@ -196,7 +196,7 @@ handleUpdate(row) { this.reset() this.isAdd = false - get(`/admin/etl/tabcolname/query/${row['TabColName-TabName']}/${row['TabColName-ColName']}`).then(response => { + get(`/admin/etl/tabcolname/get/${row['TabColName-TabName']}/${row['TabColName-ColName']}`).then(response => { this.form = response.data this.open = true this.title = '修改' @@ -208,7 +208,7 @@ this.form["Uom-ConvertRatio"] = parseInt(this.form["Uom-ConvertRatio"]) if (valid) { if (!this.isAdd) { - put("/admin/etl/tabcolname/query", this.form).then(response => { + put("/admin/etl/tabcolname/updateone", this.form).then(response => { if (response.code === 200) { this.msgSuccess('修改成功') this.open = false @@ -218,7 +218,7 @@ } }) } else { - post("/admin/etl/tabcolname/query", this.form).then(response => { + post("/admin/etl/tabcolname/insertone", this.form).then(response => { if (response.code === 200) { this.msgSuccess('新增成功') this.open = false @@ -238,7 +238,7 @@ cancelButtonText: '取消', type: 'warning' }).then(function() { - return deleteData(`/admin/etl/tabcolname/query/${row['TabColName-TabName']}/${row['TabColName-ColName']}`) + return deleteData(`/admin/etl/tabcolname/deleteone/${row['TabColName-TabName']}/${row['TabColName-ColName']}`) }).then(() => { this.msgSuccess('删除成功') const totalPage = Math.ceil((this.total -1) / this.pagination.pageSize)