Commit 828d5677 by wangql

修改代码

1 parent c22955f7
import {
GlAxios
} from 'glsx-vue-common'
const path = 'glsx.accounts.admin.merchant'
const __groupList = `${path}.group.dict`
const path = '/glsx.accounts.admin.merchant.group'
const __groupList = `${path}.dict`
const __create = `${path}.create`
const getMerchantGroupList = {
p: [__groupList],
req: params => GlAxios.get(__groupList, { params })
}
const createGroup = {
p: [__create],
req: params => GlAxios.get(__groupList, { params })
}
export {
getMerchantGroupList
getMerchantGroupList,
createGroup
}
......@@ -6,11 +6,13 @@ import {
saveMerchant
} from './bussinessListApi'
import {
getMerchantGroupList
getMerchantGroupList,
createGroup
} from './businessGroup'
export {
getBusinessList,
getList,
saveMerchant,
getMerchantGroupList
getMerchantGroupList,
createGroup
}
......@@ -100,7 +100,7 @@
<script>
// import Edit from './Edit'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
import { getMerchantGroupList } from '@/api'
import { getMerchantGroupList, createGroup } from '@/api'
// import { NoticeMixin } from '@/mixins'
// import Vue from 'vue'
export default {
......@@ -110,7 +110,9 @@ export default {
},
watch: {
dialogVisible(val) {
this.$refs['addParams'].resetFields()
if (!val) {
this.$refs['addParams'].resetFields()
}
}
},
// mixins: [NoticeMixin],
......@@ -165,12 +167,12 @@ export default {
},
{
label: '创建时间',
prop: 'createTime',
formatter: cellValue => {
if (cellValue.createTime) {
return new Date(cellValue.createTime).format('yyyy-MM-dd')
}
}
prop: 'createTime'
// formatter: cellValue => {
// if (cellValue.createTime) {
// return new Date(cellValue.createTime).format('yyyy-MM-dd')
// }
// }
}
],
// number: {
......@@ -221,9 +223,8 @@ export default {
getMerchantGroupList
.req({})
.then(res => {
console.log(res)
this.total = res.total
this.tableData.data = res.list
this.total = res.pagination.totalCount
this.tableData.data = res.groupDicts
this.tableLoading = false
})
.catch(err => {
......@@ -247,32 +248,27 @@ export default {
handleSubmit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!')
this.createGroup(this.addParams)
} else {
console.log('error submit!!')
return false
}
})
},
createGroup(params) {
createGroup
.req(params)
.then(res => {
console.log(res)
this.loadingGetList()
this.dialogVisible = !this.dialogVisible
})
.catch(err => console.log(err))
},
// 关闭新增分组弹出框
handleClose() {
this.dialogVisible = !this.dialogVisible
}
// updateDialogClose() {
// console.log('关闭')
// this.updateVisible = !this.updateVisible
// this.loadingGetList()
// },
// deleteExp(objId) {
// if (objId) {
// mergeExp
// .req({ id: objId, deletedFlag: 'D' })
// .then(res => {
// this.loadingGetList()
// })
// .catch(err => console.log(err))
// }
// }
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!