Commit 8d65d5bb by yuwei

项目初始化

parent 60e1527c
......@@ -20,7 +20,7 @@ public class ModelDataController extends BaseController {
private ModelDataService modelDataService;
@GetMapping("/{id}")
public R getModelDataById(@PathVariable String id, @RequestBody ModelDataEntity modelDataEntity) {
public R getModelDataById(@PathVariable String id, ModelDataEntity modelDataEntity) {
Map<String, Object> data = modelDataService.getModelDataById(modelDataEntity);
return R.ok().setData(data);
}
......
......@@ -113,24 +113,21 @@ export default {
},
created() {
console.log('data:' + this.data)
getFormParam(this.data.modelId).then(response => {
if (response.success) {
const { data } = response
this.tableName = data.tableName
this.columnList = data.columnList.filter(item => item.isDetail === '1')
}
})
},
mounted() {
this.getData(this.data.id)
this.getFormData()
},
methods: {
showCard() {
this.$emit('showCard', this.showOptions)
},
/** 获取详情 */
getData: function(id) {
getData({ id: id, tableName: this.tableName }).then(response => {
async getFormData() {
const data = await getFormParam(this.data.modelId).then(response => {
if (response.success) {
return response.data
}
})
this.tableName = data.tableName
this.columnList = data.columnList.filter(item => item.isDetail === '1')
await getData({ id: this.data.id, tableName: this.tableName }).then(response => {
if (response.success) {
this.form = response.data
}
......
......@@ -120,24 +120,21 @@ export default {
},
created() {
console.log('data:' + this.data)
getFormParam(this.data.modelId).then(response => {
if (response.success) {
const { data } = response
this.tableName = data.tableName
this.columnList = data.columnList.filter(item => item.isEdit === '1')
}
})
},
mounted() {
this.getData(this.data.id)
this.getFormData()
},
methods: {
showCard() {
this.$emit('showCard', this.showOptions)
},
/** 获取详情 */
getData: function(id) {
getData({ id: id, tableName: this.tableName }).then(response => {
async getFormData() {
const data = await getFormParam(this.data.modelId).then(response => {
if (response.success) {
return response.data
}
})
this.tableName = data.tableName
this.columnList = data.columnList.filter(item => item.isDetail === '1')
await getData({ id: this.data.id, tableName: this.tableName }).then(response => {
if (response.success) {
this.form = response.data
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment