代码调整

This commit is contained in:
joylink_cuiweidong 2022-10-08 13:29:10 +08:00
parent 3ae2b5acd5
commit 89e5543aae

View File

@ -1,31 +1,42 @@
<template> <template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="500px" :before-close="handleClose" center :close-on-click-modal="false"> <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 ref="ruleForm" :model="formModel" :rules="rules" label-width="130px">
<el-form-item label="项目名称:" prop="title"> <el-form-item label="项目名称:" prop="loginProtitle">
<el-input v-model="formModel.title" style="width: 260px;" /> <el-input v-model="formModel.loginProtitle" style="width: 260px;" />
</el-form-item> </el-form-item>
<el-form-item label="左上角名称:" prop="loginTitle"> <el-form-item label="机构名称:" prop="loginOrgTitle">
<el-input v-model="formModel.loginTitle" style="width: 260px;" /> <el-input v-model="formModel.loginOrgTitle" 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>
<el-form-item label="基于系统开发:" prop="baseDevelopment"> <el-form-item label="基于系统开发:" prop="baseDevelopment">
<el-switch v-model="formModel.baseDevelopment" /> <el-switch v-model="formModel.baseDevelopment" />
</el-form-item> </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="showBackPic"> <el-form-item label="显示背景图片:" prop="showBackPic">
<el-switch v-model="formModel.showBackPic" /> <el-switch v-model="formModel.showBackPic" />
</el-form-item> </el-form-item>
<el-form-item label="微信登录:" prop="wechatLogin"> <el-form-item label="微信登录:" prop="wechatLogin">
<el-switch v-model="formModel.wechatLogin" /> <el-switch v-model="formModel.wechatLogin" />
</el-form-item> </el-form-item>
<el-form-item label="联系方式:" prop="loginContectInformation">
<el-switch v-model="formModel.loginContectInformation" />
</el-form-item>
<!-- loginProLogo:'', // logo
loginProLogoWidth:'', // logo
loginProLogoHeight:'', // logo -->
<el-form-item label="页签名称:" prop="browserTitle">
<el-input v-model="formModel.browserTitle" style="width: 260px;" />
</el-form-item>
<el-form-item label="导航栏名称:" prop="homeTitle"> <el-form-item label="导航栏名称:" prop="homeTitle">
<el-input v-model="formModel.homeTitle" style="width: 260px;" /> <el-input v-model="formModel.homeTitle" style="width: 260px;" />
</el-form-item> </el-form-item>
<!-- --> <el-form-item label="案例展示:" prop="caseShow">
<el-switch v-model="formModel.caseShow" />
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button> <el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
@ -43,14 +54,21 @@ export default {
row:null, row:null,
loading: false, loading: false,
formModel:{ formModel:{
title:'', // loginProtitle:'', //
loginTitle:'', // loginOrgTitle:'', //
browserTitle:'', //
baseDevelopment:false, // baseDevelopment:false, //
showBackPic:true, // aboutSystem:'', //
aboutSystem:'', // showBackPic:true, //
wechatLogin:true, // wechatLogin:true, //
homeTitle:'' // loginContectInformation:false, //
loginProLogo:'', // logo
loginProLogoWidth:'', // logo
loginProLogoHeight:'', // logo
browserTitle:'', //
homeTitle:'', //
caseShow:true //
} }
}; };
}, },
@ -79,26 +97,43 @@ export default {
if (row) { if (row) {
this.row = row; this.row = row;
const viewSetting = JSON.parse(row.viewSetting); const viewSetting = JSON.parse(row.viewSetting);
this.formModel.title = viewSetting.title || ''; // this.formModel = Object.assign({}, viewSetting);
this.formModel.loginTitle = viewSetting.loginTitle || '';
this.formModel.browserTitle = viewSetting.browserTitle || ''; this.formModel.loginProtitle = viewSetting.loginProtitle || '';
this.formModel.aboutSystem = viewSetting.aboutSystem || ''; this.formModel.loginOrgTitle = viewSetting.loginOrgTitle || '';
this.formModel.homeTitle = viewSetting.homeTitle || '';
this.formModel.baseDevelopment = viewSetting.baseDevelopment || false; this.formModel.baseDevelopment = viewSetting.baseDevelopment || false;
this.formModel.aboutSystem = viewSetting.aboutSystem || '';
this.formModel.showBackPic = viewSetting.showBackPic || true; this.formModel.showBackPic = viewSetting.showBackPic || true;
this.formModel.wechatLogin = viewSetting.wechatLogin || true; this.formModel.wechatLogin = viewSetting.wechatLogin || true;
this.formModel.loginContectInformation = viewSetting.loginContectInformation || false;
this.formModel.loginProLogo = viewSetting.loginProLogo || '';
this.formModel.loginProLogoWidth = viewSetting.loginProLogoWidth || '';
this.formModel.loginProLogoHeight = viewSetting.loginProLogoHeight || '';
this.formModel.browserTitle = viewSetting.browserTitle || '';
this.formModel.homeTitle = viewSetting.homeTitle || '';
this.formModel.caseShow = viewSetting.caseShow || true;
} }
}, },
handleClose() { handleClose() {
this.formModel = { this.formModel = {
title:'', // loginProtitle:'', //
loginTitle:'', // loginOrgTitle:'', //
browserTitle:'', //
baseDevelopment:false, // baseDevelopment:false, //
showBackPic:true, // aboutSystem:'', //
aboutSystem:'', // showBackPic:true, //
wechatLogin:true, // wechatLogin:true, //
homeTitle:'' // loginContectInformation:false, //
loginProLogo:'', // logo
loginProLogoWidth:'', // logo
loginProLogoHeight:'', // logo
browserTitle:'', //
homeTitle:'', //
caseShow:true //
}; };
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
this.dialogVisible = false; this.dialogVisible = false;