修改界面

master
夜笙歌 5 months ago
parent 4b9026168d
commit c53c26f2f2

@ -2,11 +2,11 @@
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<transition name="sidebarLogoFade"> <transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" /> <!-- <img v-if="logo" :src="logo" class="sidebar-logo" />-->
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1> <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
</router-link> </router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/"> <router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" /> <!-- <img v-if="logo" :src="logo" class="sidebar-logo" />-->
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1> <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
</router-link> </router-link>
</transition> </transition>

@ -1145,7 +1145,7 @@ export default {
.realMapButton { .realMapButton {
position: absolute; position: absolute;
bottom: 2%; bottom: 2%;
left: 52%; left: 53%;
/*transform: translateX(-100%);*/ /*transform: translateX(-100%);*/
background-image: url("~@/assets/board/index/rightButtonBg.png"); background-image: url("~@/assets/board/index/rightButtonBg.png");
background-repeat: no-repeat; background-repeat: no-repeat;

@ -219,6 +219,38 @@
<el-input v-model="form.contactAddress" placeholder="请输入联系人地址"/> <el-input v-model="form.contactAddress" placeholder="请输入联系人地址"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="12">
<el-form-item label="监控平台显示" prop="contactAddress">
<el-select v-model="form.tenantField" placeholder="请选择">
<el-option
label="图片"
value="1">
</el-option>
<el-option
label="地图"
value="2">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col span="12" v-if="form.tenantField === '2'">
<el-form-item label="地图省份编码" prop="tenantMapCode">
<el-input-number v-model="form.tenantMapCode" controls-position="right"></el-input-number>
</el-form-item>
</el-col>
<el-col span="12" v-if="form.tenantField === '1'">
<el-form-item label="首页图片" prop="tenantBoardPic">
<el-upload
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.tenantBoardPic" :src="form.tenantBoardPic" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-form-item label="描述" prop="remark"> <el-form-item label="描述" prop="remark">
@ -430,9 +462,48 @@ export default {
tenantTypeChange(tenantType) { tenantTypeChange(tenantType) {
this.industryVisible = tenantType === this.TENANT_TYPE_ENTERPRISE; this.industryVisible = tenantType === this.TENANT_TYPE_ENTERPRISE;
},
handleAvatarSuccess(res, file) {
this.form.tenantBoardPic = URL.createObjectURL(file.raw);
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg';
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return isJPG && isLt2M;
} }
} }
}; };
</script> </script>
<style>
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 178px;
height: 178px;
display: block;
}
</style>

Loading…
Cancel
Save