Commit c95b737f authored by super_liu's avatar super_liu

Merge remote-tracking branch 'origin/develop' into develop

parents 78adffdf 732c2034
......@@ -361,3 +361,10 @@
background-color: #3974CA!important;
border-color: #3974CA!important;
}
.el-button.is-disabled {
color: #C0C4CC!important;
cursor: not-allowed!important;
background-image: none!important;
background-color: #FFF!important;
border-color: #EBEEF5!important;
}
......@@ -3,8 +3,9 @@
<el-container>
<el-aside :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/tenio-logo.png" width="21" height="21">-->
<!-- <b>户型地图大数据</b>-->
<img src="@assets/img/logo.png" alt="">
</div>
<transition name="fade">
<el-menu
......@@ -98,7 +99,6 @@ export default {
searchByUserInfo() {
getUserInfo().then((res) => {
console.log(res);
if(res.code === '200'){
this.avatar = res.data.headImg;
this.userName = res.data.realName;
......
......@@ -42,8 +42,12 @@ const user = {
setToken(data.Authentication)
commit('SET_TOKEN', data.Authentication)
commit('SET_AUTH', data.authorities)
sessionStorage.setItem('auth', data.authorities.split(','))
sessionStorage.setItem('userName', username)
if(username === 'admin') {
sessionStorage.setItem('access', 'master')
} else {
sessionStorage.setItem('access', data.authorities)
console.log(sessionStorage.getItem('access'))
}
resolve()
}).catch(error => {
reject(error)
......
This diff is collapsed.
......@@ -33,7 +33,13 @@
</el-select>
</div>
<div style="width: 100%; text-align: right" >
<el-button type="primary" :loading="exportLoading" :disabled="exportLoading" size="small" @click="exportSupplyDataForeExcel">导出数据</el-button>
<el-button
:title="!haveAuth('supplyDemandExport') ? '无权限' : ''"
type="primary"
:loading="exportLoading"
:disabled="!haveAuth('supplyDemandExport')"
size="small"
@click="exportSupplyDataForeExcel">导出数据</el-button>
</div>
</div>
<el-card :body-style="{ padding: '0' }">
......@@ -279,8 +285,23 @@
}
}
},
computed: {
haveAuth() {
return (accessName) => {
const auth = sessionStorage.getItem('access')
if (auth === 'master') {
return true
}
if (!auth) {
return false
} else {
return auth.split(',').includes(accessName)
}
}
}
},
mounted() {
for(let i = new Date().getFullYear(); i>= 1980; i--) {
for(let i = new Date().getFullYear(); i>= 2014; i--) {
this.timeOptions.push({
value: i,
label: i + '年'
......
......@@ -11,9 +11,8 @@
</div>
<div class="bannerOptions">
<el-button type="danger"
v-if="haveAuth"
:title="propertyData.fileList.length === 0 ? '未查询到技术资料' : ''"
:disabled="propertyData.fileList.length === 0" @click="downloadDataFlag = true" >下载技术资料</el-button>
:title="!haveAuth('downloadFile') ? '无权限' : (propertyData.fileList.length === 0 ? '未查询到技术资料' : '')"
:disabled="propertyData.fileList.length === 0 || !haveAuth('downloadFile')" @click="downloadDataFlag = true" >下载技术资料</el-button>
<el-radio-group v-model="bannerType" @change="scorllTop">
<el-radio-button :label="0">总图</el-radio-button>
<el-radio-button :label="1">立面</el-radio-button>
......@@ -123,7 +122,12 @@
<div class="salesInfomation" v-if="bannerType !== 2">
<div class="title" style="padding-left: 20px">销售信息</div>
<div style="text-align: right;padding-right: 20px">
<el-button type="primary" :disabled="propertyExportLoading" :loading="propertyExportLoading" @click="propertySaleInfoExport">导出数据</el-button>
<el-button
:title="!haveAuth('propertyDetails') ? '无权限' : ''"
:disabled="!haveAuth('propertyDetails')"
:loading="propertyExportLoading"
type="primary"
@click="propertySaleInfoExport">导出数据</el-button>
</div>
<div ref="imgExport" class="container">
<el-row class="firstRow supplyDataDetail">
......@@ -841,15 +845,14 @@
},
computed: {
haveAuth() {
const userName = sessionStorage.getItem('userName')
if(userName === 'admin') {
return true
}
const auth = sessionStorage.getItem('auth')
if(!auth) {
return false
} else {
return auth.split(',').includes('downloadFile')
return (accessName) => {
const auth = sessionStorage.getItem('access')
if(auth === 'master') { return true }
if(!auth) {
return false
} else {
return auth.split(',').includes(accessName)
}
}
},
colum () {
......
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