代码调整
This commit is contained in:
parent
91c804b2ff
commit
3ae2b5acd5
@ -1,7 +1,30 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="500px" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<el-form ref="ruleForm" :model="formModel" :rules="rules" label-width="130px">
|
||||
{{}}
|
||||
<el-form-item label="项目名称:" prop="title">
|
||||
<el-input v-model="formModel.title" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="左上角名称:" prop="loginTitle">
|
||||
<el-input v-model="formModel.loginTitle" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="页签名称:" prop="browserTitle">
|
||||
<el-input v-model="formModel.browserTitle" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关于系统:" prop="aboutSystem">
|
||||
<el-input v-model="formModel.aboutSystem" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="基于系统开发:" prop="baseDevelopment">
|
||||
<el-switch v-model="formModel.baseDevelopment" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示背景图片:" prop="showBackPic">
|
||||
<el-switch v-model="formModel.showBackPic" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信登录:" prop="wechatLogin">
|
||||
<el-switch v-model="formModel.wechatLogin" />
|
||||
</el-form-item>
|
||||
<el-form-item label="导航栏名称:" prop="homeTitle">
|
||||
<el-input v-model="formModel.homeTitle" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<!-- -->
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@ -17,27 +40,65 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
row:null,
|
||||
loading: false,
|
||||
formModel:{
|
||||
title:'',
|
||||
loginPath:''
|
||||
|
||||
title:'', // 登录页项目名称
|
||||
loginTitle:'', // 登录页左上角名称
|
||||
browserTitle:'', // 浏览器页签名称
|
||||
baseDevelopment:false, // 是否显示基于系统开发
|
||||
showBackPic:true, // 是否显示背景图片
|
||||
aboutSystem:'', // 右下角关于系统
|
||||
wechatLogin:true, // 是否可以微信登录
|
||||
homeTitle:'' // 导航栏名称
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
rules() {
|
||||
const crules = {
|
||||
title: [
|
||||
{ required: true, message: '请输入项目名称', trigger: 'blur' }
|
||||
],
|
||||
browserTitle: [
|
||||
{ required: true, message: '请输入页签名称', trigger: 'blur' }
|
||||
],
|
||||
homeTitle: [
|
||||
{ required: true, message: '请输入导航栏名称', trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
return '修改前端配置';
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow(row) {
|
||||
this.dialogVisible = true;
|
||||
if (row) {
|
||||
// this.formModel.title = row.id;
|
||||
// this.formModel.markKey = row.markKey;
|
||||
// this.formModel.project = row.project;
|
||||
this.row = row;
|
||||
const viewSetting = JSON.parse(row.viewSetting);
|
||||
this.formModel.title = viewSetting.title || '';
|
||||
this.formModel.loginTitle = viewSetting.loginTitle || '';
|
||||
this.formModel.browserTitle = viewSetting.browserTitle || '';
|
||||
this.formModel.aboutSystem = viewSetting.aboutSystem || '';
|
||||
this.formModel.homeTitle = viewSetting.homeTitle || '';
|
||||
this.formModel.baseDevelopment = viewSetting.baseDevelopment || false;
|
||||
this.formModel.showBackPic = viewSetting.showBackPic || true;
|
||||
this.formModel.wechatLogin = viewSetting.wechatLogin || true;
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
this.formModel = {
|
||||
title:'',
|
||||
loginPath:''
|
||||
title:'', // 登录页项目名称
|
||||
loginTitle:'', // 登录页左上角名称
|
||||
browserTitle:'', // 浏览器页签名称
|
||||
baseDevelopment:false, // 是否显示基于系统开发
|
||||
showBackPic:true, // 是否显示背景图片
|
||||
aboutSystem:'', // 右下角关于系统
|
||||
wechatLogin:true, // 是否可以微信登录
|
||||
homeTitle:'' // 导航栏名称
|
||||
};
|
||||
this.$refs.ruleForm.resetFields();
|
||||
this.dialogVisible = false;
|
||||
@ -47,7 +108,17 @@ export default {
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
const data = Object.assign({}, this.formModel);
|
||||
const row = JSON.parse(JSON.stringify(this.row));
|
||||
row.viewSetting = JSON.stringify(this.formModel);
|
||||
// 更新前端项目配置
|
||||
updateFrontProjectConfig(row).then(resp => {
|
||||
this.$message.success('修改前端配置成功!');
|
||||
this.handleClose();
|
||||
this.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
this.$message.error(error.message);
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<add-project-config ref="addProjectConfig" @reloadTable="reloadTable" />
|
||||
<front-project-config ref="frontProjectConfig" />
|
||||
<front-project-config ref="frontProjectConfig" @reloadTable="reloadTable" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user