Commit 0702252d authored by wangjiankun's avatar wangjiankun

fix:权限 容积率、成交总价 权限

parent 0c46101d
......@@ -48,7 +48,10 @@ export function addUser(username, password, roleList, groupList, detailInfo) {
detailInfo
})
}
export function modifyPwd(data) {
return xhr.put('/sys/sys-user/modifyPwd', data)
}
export function editUser(id, username, password, roleList, groupList) {
return xhr.put('/sys/sys-user/withRoleAndGroup/' + id, {
username,
......
<template>
<div class="app-wrapper">
<el-container>
<el-aside :width="isCollapse ? 'auto' : '200px'">
<el-aside class="transitionAnimation" :width="isCollapse ? 'auto' : '200px'">
<div class="logo-title-sign">
<!-- <img src="@assets/img/tenio-logo.png" width="21" height="21">-->
<!-- <b>户型地图大数据</b>-->
<img src="@assets/img/logo.png" alt="">
<img v-if="!isCollapse" src="@assets/img/logo.png" alt="">
</div>
<transition name="fade">
<el-menu
......@@ -32,7 +32,7 @@
class="hamburger-container"
/>
<breadcrumb />
<div style="width: 100%">
<div style="width: 100%;">
<async-search class="main-search"></async-search>
</div>
<el-dropdown class="avatar-container" trigger="click">
......@@ -49,9 +49,7 @@
</el-dropdown-item>
</router-link>
<el-dropdown-item divided>
<span style="display:block;" @click="modifyDialog = true"
>修改密码</span
>
<span style="display:block;" @click="passwordUpdateFlag = true">修改密码</span>
</el-dropdown-item>
<el-dropdown-item divided>
<span style="display:block;" @click="toLogout">登出</span>
......@@ -66,47 +64,52 @@
</el-container>
<el-dialog
title="修改密码"
:visible.sync="modifyDialog"
width="30%"
:visible.sync="passwordUpdateFlag"
custom-class="customDialogStyle"
:close-on-click-modal="false"
>
<el-form
:model="ruleForm"
:rules="rules"
style="width: 80%;min-width: 200px"
:model="passwordUpdateForm"
:rules="passwordUpdateRules"
ref="ruleForm"
label-width="100px"
>
<el-form-item label="旧密码" prop="oldPassword">
<el-form-item label="原密码" prop="originPassword">
<el-input
type="password"
v-model="ruleForm.oldPassword"
show-password
placeholder="请输入原密码"
v-model="passwordUpdateForm.originPassword"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="新密码" prop="pass">
<el-form-item label="新密码" prop="newPassword">
<el-input
type="password"
v-model="ruleForm.pass"
show-password
placeholder="请输入新密码"
v-model="passwordUpdateForm.newPassword"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="确认密码" prop="checkPass">
<el-form-item label="确认密码" prop="confirmNewPassword">
<el-input
type="password"
v-model="ruleForm.checkPass"
show-password
placeholder="再次输入新密码"
v-model="passwordUpdateForm.confirmNewPassword"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
v-loading.fullscreen.lock="fullscreenLoading"
@click="submitForm('ruleForm')"
>确认修改</el-button
>
<el-button @click="closeDialog('ruleForm')">取消</el-button>
</el-form-item>
</el-form>
<div slot="footer">
<el-button
type="primary"
:disabled="passwordUpdateBtnLoading"
v-loading="passwordUpdateBtnLoading"
@click="updatePassword('ruleForm')"
>确认修改</el-button
>
<el-button @click="closeDialog('ruleForm')">取消</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -132,53 +135,48 @@ export default {
},
props: {},
data() {
var validateOldPass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入旧密码"));
} else {
callback();
}
};
var validatePass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入新密码"));
} else if (value.length < 5) {
callback(new Error('密码不能小于5位'))
} else {
if (this.ruleForm.checkPass !== "") {
this.$refs.ruleForm.validateField("checkPass");
if (this.passwordUpdateForm.confirmNewPassword !== "") {
this.$refs.ruleForm.validateField("confirmNewPassword");
}
callback();
}
};
}
var validatePass2 = (rule, value, callback) => {
if (value === "") {
callback(new Error("请再次输入密码"));
} else if (value !== this.ruleForm.pass) {
if (value !== this.passwordUpdateForm.newPassword) {
callback(new Error("两次输入密码不一致!"));
} else {
callback();
}
};
}
return {
modifyDialog: false,
isCollapse: false,
menuStyle,
systemName: "天友-户型查询",
avatar: null,
userName:'',
access:'',
ruleForm: {
pass: "",
checkPass: "",
oldPassword: "",
},
rules: {
oldPassword: [{ validator: validateOldPass, trigger: "blur" }],
pass: [{ validator: validatePass, trigger: "blur" }],
checkPass: [{ validator: validatePass2, trigger: "blur" }],
},
fullscreenLoading: false,
userId: '',
passwordUpdateFlag: false, // 修改密码 弹出框控制变量
passwordUpdateForm: {
originPassword: '', // 原密码
newPassword: '', // 新密码
confirmNewPassword: '' // 确认密码
}, // 修改密码 表单
passwordUpdateBtnLoading: false,
passwordUpdateRules: {
originPassword: [
{ required: true, message: '请输入原密码', trigger: "blur" }
],
newPassword: [
{ required: true, message: '请输入新密码', trigger: "blur" },
{ min: 5, max: 50, message: '请设置5-50位字符的密码' },
{ validator: validatePass, trigger: "blur" }
],
confirmNewPassword: [
{ required: true, message: '请再次输入密码' ,trigger: "blur" },
{ validator: validatePass2, trigger: "blur" }
],
} // 验证规则
};
},
created() {
......@@ -186,41 +184,18 @@ export default {
},
mounted() {},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.fullscreenLoading = true;
modifyPwd(
this.userId,
this.ruleForm.oldPassword,
this.ruleForm.pass,
this.ruleForm.checkPass
).then((res) => {
if (res.code === "200") {
this.$message.success("密码修改成功");
this.closeDialog();
}
this.fullscreenLoading = false;
}).catch(() => {
this.fullscreenLoading = false;
});
} else {
return false;
}
});
},
closeDialog(formName) {
this.modifyDialog = false;
this.$refs[formName].resetFields();
closeDialog(form) {
this.$refs[form].resetFields()
this.passwordUpdateFlag = false
},
searchByUserInfo() {
getUserInfo().then((res) => {
console.log(res);
if(res.code === '200'){
this.avatar = res.data.headImg;
this.userId = res.data.userId ? res.data.userId : res.data.businessId
this.userName = res.data.realName;
this.access = res.data.access;
this.userId = res.data.userId || res.data.businessId;
sessionStorage.setItem('access',(this.access === undefined || this.access === null) ? '' : this.access);
}
......@@ -231,10 +206,41 @@ export default {
this.isCollapse = !this.isCollapse;
},
toLogout() {
this.$store.dispatch("FedLogOut").then(() => {
location.reload(); // 为了重新实例化vue-router对象 避免bug
});
this.$confirm('您确定要退出登录吗?', '退出登录', {
confirmButtonText: '退出',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch("FedLogOut").then(() => {
location.reload(); // 为了重新实例化vue-router对象 避免bug
});
})
},
updatePassword(form) {
this.$refs[form].validate(vaild => {
if(vaild) {
this.passwordUpdateBtnLoading = true
modifyPwd({
userId: this.userId,
oldPwd: this.passwordUpdateForm.originPassword,
newPwd: this.passwordUpdateForm.newPassword,
confirmPwd: this.passwordUpdateForm.confirmNewPassword
}).then((res) => {
if (res.code == "200") {
this.$message.success("密码修改成功");
this.passwordUpdateBtnLoading = false
this.closeDialog('ruleForm')
} else {
this.passwordUpdateBtnLoading = false
}
}).catch(() => {
this.passwordUpdateBtnLoading = false
});
} else {
return false
}
})
}
},
computed: {
routes() {
......@@ -274,6 +280,7 @@ export default {
display flex
flex-direction column
background:linear-gradient(180deg,rgba(40,102,144,1) 0%,rgba(16,34,68,1) 100%) !important;
transition all .5s;
.logo-title-sign{
width 100%;
display flex
......@@ -351,6 +358,37 @@ export default {
}
}
}
.customDialogStyle {
width 30%
min-width 300px
border-radius: 8px;
.el-dialog__header {
display: flex;
align-items: center;
justify-content: center;
width:100%;
height:50px;
padding: 0;
background:rgba(237,240,245,1);
border-radius:8px 8px 0px 0px;
}
.el-dialog__body {
min-height: 60px;
overflow-y: auto;
max-height: 60vh;
position: relative;
border-bottom: 1px solid rgba(231, 231, 231, 1);
padding: 30px 25px;
.el-form {
.el-form-item:last-child {
margin-bottom: 0;
}
}
}
.el-dialog__footer {
height: 62px;
}
}
}
.user-dropdown {
.inline-block {
......
......@@ -629,6 +629,7 @@
computed: {
haveAuth() {
return (accessName) => {
if(accessName) { return false }
const auth = sessionStorage.getItem('access')
if (auth === 'master') {
return true
......
......@@ -153,12 +153,12 @@
<p><b>行政分区:</b>{{dataType.plateRegion.plateInfo.adminRegionName || '--'}}</p>
<p><b>板块: </b>{{dataType.plateRegion.plateInfo.name || '--'}}</p>
<p><b>土地面积:</b>{{item.landArea || '--'}}m<sup>2</sup></p>
<p><b>容积率:</b>{{item.plotRatio || '--'}}%</p>
<p><b>容积率:</b>{{item.plotRatio || '--'}}</p>
<p><b>建筑面积:</b>{{item.builtArea || '--'}}m<sup>2</sup></p>
<p><b>建筑密度:</b>{{item.builtDensity || '--'}}%</p>
<p><b>楼面价:</b>{{item.floorPrice || '--'}}元/m<sup>2</sup></p>
<p><b>成交日期:</b>{{item.dealDate || '--'}}</p>
<p><b>成交价:</b>{{item.dealPrice || '--'}}元</p>
<p><b>成交价:</b>{{item.dealPrice || '--'}}</p>
<p><b>溢价率:</b>{{item.premium || '--'}}%</p>
<p><b>受让方:</b>{{item.assignee || '--'}}</p>
</el-collapse-item>
......
......@@ -67,7 +67,7 @@
<td v-for="(item,index) in value.data" :key="index">{{item}}</td>
</tr>
</table>
<div class="tips red">注:供求比=供应数量/销售数量,供应比越小,销售越好</div>
<div class="tips red">注:供销比=供应数量/销售数量,供销比越小,销售越好</div>
</div>
</div >
<div v-else style="height: 500px;display: flex;align-items: center">
......@@ -111,7 +111,7 @@
chartSettings2: {
labelMap: {
areaRange: '面积区间',
rate: '供比'
rate: '供比'
}
},
regionVal: '', // 区域选择
......@@ -133,17 +133,17 @@
name: '成交数量',
data: []
}
}, // 表格供数量的数据
}, // 表格供销比数量的数据
supplyRateData:{
areaRange: {
name: '面积区间',
data: []
},
Rate: {
name: '供比',
name: '供比',
data: []
},
}, // 表格供比的数据
}, // 表格供比的数据
colorArr: colors,
// 区域名称对应
plateMap: {
......@@ -184,7 +184,7 @@
formatter: (params) => {
if(params.data == 0) { return '' }
return `<div>${params.name}区间</br>
比:${params.data ? (1/ params.data).toFixed(1) : ''}
比:${params.data ? (1/ params.data).toFixed(1) : ''}
</div>`
}
},
......@@ -198,11 +198,11 @@
exportSupplyDataForeExcel () {
this.exportLoading = true
exportSupplyData({
title: `${this.regionVal}${this.plateVal}板块${this.timeVal}年份供信息`,
title: `${this.regionVal}${this.plateVal}板块${this.timeVal}年份供信息`,
dataJson: this.exportSaveStatus
}).then(res => {
if(res) {
const title = `${this.regionVal}-${this.plateVal}-${this.timeVal}年份供信息`
const title = `${this.regionVal}-${this.plateVal}-${this.timeVal}年份供信息`
downloadFile(res, title, 'application/vnd.ms-excel;charset=utf-8').then(() => {
this.$message({
type: 'success',
......@@ -221,14 +221,14 @@
this.exportLoading = false
})
},
// 根据区域-板块名-年份获取供信息
// 根据区域-板块名-年份获取供销比信息
getSupplyData () {
getSupplyNumData(this.regionVal,this.plateVal,this.timeVal).then(res => {
if(res.data) {
let exportList = []
let supplyChartsData = [] // 供百分比 图表数据
let supplyDealRate = [] //供比图表数据
let rate = [] // 供
let supplyChartsData = [] // 供销比百分比 图表数据
let supplyDealRate = [] //供销比比图表数据
let rate = [] // 供
let supplyNumber = [] // 供应套数
let dealNumber = [] // 成交套数
let areaRange = [] // 面积区间
......@@ -288,6 +288,7 @@
computed: {
haveAuth() {
return (accessName) => {
if(accessName) { return false }
const auth = sessionStorage.getItem('access')
if (auth === 'master') {
return true
......
......@@ -155,7 +155,7 @@
</table>
</el-col>
<el-col :span="24">
<!-- 供比数据分析-->
<!-- 供比数据分析-->
<ve-histogram
:data="supplyRateCharts"
:tooltip="rateTooltipResize"
......@@ -164,15 +164,15 @@
:extend="rateExtend"
:colors="colorArr"
:settings="supplyDemandRatioSettings"></ve-histogram>
<!-- 供比表格信息-->
<!-- 供比表格信息-->
<table cellspacing="0" cellpadding="0" class="table" >
<tr v-for="(value, key) in supplyRateTable" :key="key">
<th>{{value.name}}</th>
<td v-for="(item,index) in value.data" :key="index">{{item}}</td>
</tr>
</table>
<!-- 供比提示信息-->
<div class="tips" style="color: red;text-align: end">注:供求比=供应数量/销售数量,供应比越小,销售越好</div>
<!-- 供比提示信息-->
<div class="tips" style="color: red;text-align: end">注:供销比=供应数量/销售数量,供销比越小,销售越好</div>
</el-col>
</div>
</el-row>
......@@ -252,18 +252,21 @@
</div>
</div>
</main>
<el-dialog :close-on-click-modal="false" title="下载技术资料" :visible.sync="downloadDataFlag" custom-class="customDialogStyle">
<div >
<file-list v-for="(item,index) in propertyData.fileList"
:file-name="item.fileName"
:key="index"
:process="downloadDataProcessArray[index]"
:type-src="item.fileName.split('.')[item.fileName.split('.').length -1]"
@downLoadSingleFile="downloadsingleFile(item, index)">
</file-list>
</div>
<div slot="footer">
<el-button @click="downloadDataFlag = false">关闭</el-button>
</div>
</el-dialog>
</section>
<el-dialog :close-on-click-modal="false" title="下载技术资料" :visible.sync="downloadDataFlag" custom-class="customDialogStyle">
<div >
<file-list v-for="(item,index) in propertyData.fileList"
:file-name="item.fileName"
:key="index"
:process="downloadDataProcessArray[index]"
:type-src="item.fileName.split('.')[item.fileName.split('.').length -1]"
@downLoadSingleFile="downloadsingleFile(item, index)">
</file-list>
</div>
</el-dialog>
</el-card>
</template>
......@@ -315,26 +318,26 @@
data: []
}
}, // 供应比例、套数 表格数据
// 供比 图表设置
// 供比 图表设置
supplyDemandRatioSettings: {
labelMap: {
areaRange: '面积区间',
rate: '供比'
rate: '供比'
}
},
// 供比 图表数据
// 供比 图表数据
supplyRateCharts: {
columns: ['areaRange', 'rate'],
rows: []
},
// 供比 表格数据
// 供比 表格数据
supplyRateTable:{
areaRange: {
name: '面积区间',
data: []
},
rate: {
name: '供比',
name: '供比',
data: []
},
},
......@@ -447,7 +450,7 @@
formatter: (params) => {
if(params.data == 0) { return '' }
return `<div>${params.name}区间</br>
比:${params.data ? (1/ params.data).toFixed(1) : ''}
比:${params.data ? (1/ params.data).toFixed(1) : ''}
</div>`
}
},
......@@ -697,13 +700,13 @@
this.propertyLoading = false
})
},
// 供数据 图表加表格数据
// 供销比数据 图表加表格数据
getPropertySupplyData () {
queryPropertySupplyData(this.propertyId).then(res => {
if(res.data) {
let supplyChartsData = [] // 供百分比 图表数据
let supplyDealRate = [] //供比图表数据
let rate = [] // 供
let supplyChartsData = [] // 供销比百分比 图表数据
let supplyDealRate = [] //供比图表数据
let rate = [] // 供
let supplyNumber = [] // 供应套数
let dealNumber = [] // 成交套数
let areaRange = [] // 面积区间
......@@ -750,7 +753,7 @@
}).catch(e => {
this.$message({
type: 'error',
message: '查询供比数据失败'
message: '查询供比数据失败'
})
this.supplyNoDataFlag = true
return e
......@@ -1143,34 +1146,34 @@
}
}
}
}
.customDialogStyle {
width 40%
border-radius: 8px;
.el-dialog__header {
display: flex;
align-items: center;
justify-content: center;
width:100%;
height:50px;
padding: 0;
background:rgba(237,240,245,1);
border-radius:10px 10px 0px 0px;
}
.el-dialog {
border-radius: 10px 10px 10px 10px;
}
.el-dialog__body {
min-height: 120px;
max-height: 60vh;
position: relative;
padding: 35px 35px 30px 25px;
.fileList {
margin 0 auto
.customDialogStyle {
width 40%
border-radius: 8px;
.el-dialog__header {
display: flex;
align-items: center;
justify-content: center;
width:100%;
height:50px;
padding: 0;
background:rgba(237,240,245,1);
border-radius:10px 10px 0px 0px;
}
.el-dialog {
border-radius: 10px 10px 10px 10px;
}
.fileList:nth-child(2n) {
margin 8px auto
.el-dialog__body {
min-height: 120px;
max-height: 60vh;
position: relative;
padding: 35px 35px 30px 25px;
.fileList {
margin 0 auto
}
.fileList:nth-child(2n) {
margin 8px auto
}
}
}
}
......
......@@ -32,7 +32,7 @@ export const columData = [
label: '成交日期'
},{
prop: 'dealPrice',
label: '成交总价(元)'
label: '成交总价(元)'
},{
prop: 'premium',
label: '溢价'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment