Browse Source

字段翻译接口联调

pull/3/head
wangxy 3 years ago
parent
commit
3aa9773ca9
2 changed files with 14 additions and 5 deletions
  1. +9
    -0
      src/main.js
  2. +5
    -5
      src/views/Field.vue

+ 9
- 0
src/main.js View File

@ -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')

+ 5
- 5
src/views/Field.vue View File

@ -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)


Loading…
Cancel
Save