|
@@ -3,18 +3,51 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
|
|
|
<el-col :span="24" class="one"> 系统设置 </el-col>
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="系统名称">
|
|
|
+ <el-input v-model="config.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="logo">
|
|
|
+ <custom-upload
|
|
|
+ v-model="config.logo"
|
|
|
+ url="/ts/frame/api/files/test/upload"
|
|
|
+ ></custom-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" style="text-align: center">
|
|
|
+ <el-button type="primary" @click="toSave">保存</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+const $checkRes = inject('$checkRes')
|
|
|
+import { get } from 'lodash'
|
|
|
+import { ConfigStore } from '@/store/api/system/config'
|
|
|
+const configStore = ConfigStore()
|
|
|
// 加载中
|
|
|
const loading = ref(false)
|
|
|
// 请求
|
|
|
onMounted(async () => {
|
|
|
loading.value = true
|
|
|
loading.value = false
|
|
|
+ await getConfig()
|
|
|
})
|
|
|
+const config = ref({})
|
|
|
+const getConfig = async () => {
|
|
|
+ const res = await configStore.query()
|
|
|
+ if ($checkRes(res)) {
|
|
|
+ config.value = get(res, 'data', {})
|
|
|
+ }
|
|
|
+}
|
|
|
+const toSave = async () => {
|
|
|
+ console.log(config)
|
|
|
+ const res = await configStore.update(config.value)
|
|
|
+ $checkRes(res, '操作成功', res.errmsg)
|
|
|
+}
|
|
|
</script>
|
|
|
<style scoped lang="scss"></style>
|