parent
d948aaca3d
commit
3f9738733b
4 changed files with 154 additions and 118 deletions
@ -1,96 +1,100 @@ |
|||||||
<template> |
<template> |
||||||
<div class="configuration-page"> |
<div class="configuration-page"> |
||||||
<el-form :model="form" label-width="auto" style="max-width: 600px"> |
<el-form :model="form" label-width="auto" style="max-width: 600px"> |
||||||
<el-form-item label="LOGO"> |
<el-form-item label="LOGO"> |
||||||
<my-update v-model="form.logo"></my-update> |
<my-update v-model="form.logo"></my-update> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="项目名称"> |
<el-form-item label="项目名称"> |
||||||
<el-input v-model="form.name" /> |
<el-input v-model="form.name" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="门户头部宣传大图"> |
<el-form-item label="门户头部宣传大图"> |
||||||
<my-update v-model="form.promotionalImages"></my-update> |
<my-update v-model="form.promotionalImages"></my-update> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="门户首页"> |
<el-form-item label="门户首页"> |
||||||
<el-input v-model="form.home" /> |
<el-input v-model="form.home" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="后台登陆首页地址"> |
<el-form-item label="后台登陆首页地址"> |
||||||
<el-input v-model="form.loginAddress" /> |
<el-input v-model="form.loginAddress" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="系统标题"> |
<el-form-item label="系统标题"> |
||||||
<el-input v-model="form.title" /> |
<el-input v-model="form.title" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="版权信息"> |
<el-form-item label="版权信息"> |
||||||
<el-input v-model="form.copyrightInformation" /> |
<el-input v-model="form.copyrightInformation" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="备案号"> |
<el-form-item label="备案号"> |
||||||
<el-input v-model="form.recordNumber" /> |
<el-input v-model="form.recordNumber" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="备案号信息"> |
<el-form-item label="备案号信息"> |
||||||
<el-input v-model="form.recordInformation" type="textarea" /> |
<el-input v-model="form.recordInformation" type="textarea" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="qq"> |
<el-form-item label="qq"> |
||||||
<el-input v-model="form.qqNumber" /> |
<el-input v-model="form.qqNumber" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="邮箱"> |
<el-form-item label="邮箱"> |
||||||
<el-input v-model="form.mailbox" /> |
<el-input v-model="form.mailbox" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="电话"> |
<el-form-item label="电话"> |
||||||
<el-input v-model="form.phone" /> |
<el-input v-model="form.phone" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="联系地址"> |
<el-form-item label="联系地址"> |
||||||
<el-input v-model="form.address" /> |
<el-input v-model="form.address" /> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item label="二维码"> |
<el-form-item label="二维码"> |
||||||
<my-update v-model="form.qrCode"></my-update> |
<my-update v-model="form.qrCode"></my-update> |
||||||
</el-form-item> |
</el-form-item> |
||||||
<el-form-item> |
<el-form-item> |
||||||
<el-button type="primary" @click="onSubmit">保存</el-button> |
<el-button type="primary" @click="onSubmit">保存</el-button> |
||||||
</el-form-item> |
</el-form-item> |
||||||
</el-form> |
</el-form> |
||||||
</div> |
</div> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script lang="ts" setup> |
<script lang="ts" setup> |
||||||
import { getSysSettingApi, proxPutSysSettingApi, uploadApi } from '@/api/configuration'; |
import { |
||||||
|
getSysSettingApi, |
||||||
|
proxPutSysSettingApi, |
||||||
|
uploadApi, |
||||||
|
} from '@/api/configuration' |
||||||
import { ref, reactive } from 'vue' |
import { ref, reactive } from 'vue' |
||||||
import MyUpdate from './MyUpdate.vue'; |
import MyUpdate from './MyUpdate.vue' |
||||||
import useUserStore from '@/store/modules/user'; |
import useUserStore from '@/store/modules/user' |
||||||
const userStore = useUserStore() |
const userStore = useUserStore() |
||||||
|
|
||||||
// do not use same name with ref |
// do not use same name with ref |
||||||
const form = reactive({ |
const form = reactive({ |
||||||
address: '', |
address: '', |
||||||
copyrightInformation: '', |
copyrightInformation: '', |
||||||
id: userStore.data.id, |
id: userStore.data.id, |
||||||
loginAddress: '', |
loginAddress: '', |
||||||
logo: '', |
logo: '', |
||||||
name: '', |
name: '', |
||||||
phone: '', |
phone: '', |
||||||
promotionalImages: '', |
promotionalImages: '', |
||||||
qqNumber: '', |
qqNumber: '', |
||||||
qrCode: '', |
qrCode: '', |
||||||
recordNumber: '', |
recordNumber: '', |
||||||
title: '', |
title: '', |
||||||
mailbox: '', |
mailbox: '', |
||||||
home: '', |
home: '', |
||||||
recordInformation: '' |
recordInformation: '', |
||||||
}) |
}) |
||||||
|
|
||||||
const ran = ref(false) |
const ran = ref(false) |
||||||
getSysSettingApi().then((res) => { |
getSysSettingApi().then((res) => { |
||||||
Object.assign(form, res.data) |
Object.assign(form, res.data) |
||||||
ran.value = true |
ran.value = true |
||||||
}) |
}) |
||||||
const onSubmit = async () => { |
const onSubmit = async () => { |
||||||
form.logo = await uploadApi(form.logo) |
form.logo = await uploadApi(form.logo) |
||||||
form.promotionalImages = await uploadApi(form.promotionalImages) |
form.promotionalImages = await uploadApi(form.promotionalImages) |
||||||
form.qrCode = await uploadApi(form.qrCode) |
form.qrCode = await uploadApi(form.qrCode) |
||||||
await proxPutSysSettingApi(form) |
await proxPutSysSettingApi(form) |
||||||
} |
} |
||||||
</script> |
</script> |
||||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||||
.configuration-page { |
.configuration-page { |
||||||
width: 600px; |
width: 600px; |
||||||
margin: auto; |
margin: auto; |
||||||
} |
} |
||||||
</style> |
</style> |
||||||
|
Loading…
Reference in new issue