Commit 700502a1 by lichengming
parents 5ec9eaaa b9cc8dfa
......@@ -3,6 +3,7 @@
*/
import http from '../http'
import { https } from '../https'
export default {
// page
......@@ -12,7 +13,10 @@ export default {
deleteById: data =>
http.delete('meter/v1/aptitude/?ids=' + data).then(res => res),
// 保存
save: data => http.post('meter/v1/aptitude/', data).then(res => res),
save: data =>
https
.post('meter/v1/aptitude/add_aptitude', JSON.stringify(data))
.then(res => res),
// 编辑
edit: data =>
http.put('meter/v1/aptitude/' + data.id, data.obj).then(res => res)
......
......@@ -283,7 +283,10 @@ export default {
const data = this.$serialize('edit-form')
if (this.$string(this.id).isEmpty()) {
// 添加
this._save(data)
this._save({
aptitude: data,
aptitudeItemList: this.getPage.records
})
} else {
// 编辑
this._edit({ id: this.formObj.id, obj: 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