张同海 2 years ago
parent d034e52262
commit 6aaaff9be0

@ -40,6 +40,16 @@ export function DjyTenantConfigEdit(parameter) {
data: parameter
})
}
/**
* 新增编辑
*/
export function DjyTenantConfigSave(parameter) {
return axios({
url: '/DjyTenantConfig/Save',
method: 'post',
data: parameter
})
}
/**
* 删除
*/

@ -2,13 +2,13 @@
<div>
<a-card :bordered="false">
<a-row>
<a-col :span="3" :offset="21">
<a-col :span="2" :offset="22">
<a-button @click="handleSubmit" type="primary">
保存
</a-button>
<a-button @click="FnGetData" type="primary" :style="{ marginLeft: '10px' }">
<!-- <a-button @click="FnGetData" type="primary" :style="{ marginLeft: '10px' }">
重置
</a-button>
</a-button> -->
</a-col>
<a-col :span="24">
<a-checkbox-group v-model="WebData" :style="{ width: '100%', marginTop: '10px' }">
@ -27,13 +27,14 @@
</div>
</template>
<script>
import { DjyTenantConfigGet, DjyTenantConfigEdit } from '@/api/modular/main/TenantConfig'
import { DjyTenantConfigGet, DjyTenantConfigSave } from '@/api/modular/main/TenantConfig'
import Data from './Data.json'
export default {
data() {
return {
Data,
WebData: [],
id: '',
queryParam: {
Type: 'booking_form_col'
}
@ -51,8 +52,10 @@ export default {
FnGetData() {
DjyTenantConfigGet(this.queryParam).then(res => {
if (res.code == 200) {
this.WebData = JSON.parse(res.data.configJson)
this.id = res.data.id
if (res.data) {
this.WebData = JSON.parse(res.data.configJson)
this.id = res.data.id
}
} else {
this.WebData = []
this.$message.warning(res.message)
@ -60,7 +63,7 @@ export default {
})
},
handleSubmit() {
DjyTenantConfigEdit({ id: this.id, configJson: JSON.stringify(this.WebData), type: 'booking_form_col' }).then(
DjyTenantConfigSave({ id: this.id, configJson: JSON.stringify(this.WebData), type: 'booking_form_col' }).then(
res => {
if (res.success) {
this.$message.success('保存成功')

Loading…
Cancel
Save