Commit 8929c586 authored by feifei's avatar feifei

权限

parent 43f6cf52
......@@ -45,7 +45,7 @@
<el-table-column prop="userStatus" label="状态" :formatter="userStatusFormat"></el-table-column>
<el-table-column label="操作">
<template scope="scope">
<el-button type="primary" size="small" v-if="scope.row.userStatus == 'REAL_NAME'" @click="cancellation(scope.row)">注销</el-button>
<el-button type="primary" size="small" v-if="$permissionUtils.rolePermission('customBoss') && scope.row.userStatus == 'REAL_NAME' " @click="cancellation(scope.row)">注销</el-button>
</template>
</el-table-column>
<el-table-column label="查看详情">
......@@ -148,6 +148,7 @@
loanList(){
console.log("角色" + this.$permissionUtils.rolePermission('admin'));
/** 加载数据 */
this.$$post('/customer/selectClientInfo', this.buildParam()).then(res => {
if (res.data.code != 200) {
......
......@@ -6,7 +6,7 @@
<el-form-item label="编号:">
<el-input placeholder="请输入客户编号" v-model="searchInfo.feedNo"></el-input>
</el-form-item>
<el-form-item label="手机号:">
<el-input placeholder="请输入手机号" v-model="searchInfo.clientCell"></el-input>
</el-form-item>
......@@ -26,7 +26,7 @@
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="反馈时间:">
<el-date-picker v-model="searchInfo.gmtCreated" type="daterange" range-separator="至"
start-placeholder="开始日期"
......@@ -46,7 +46,7 @@
</el-form>
</div>
<div class="system-list">
<el-table :data="tablePlanRemindData" style="width: 100%" :default-sort="{prop: 'date', order: 'descending'}" :highlight-current-row="true" >
<el-table :data="tablePlanRemindData" style="width: 100%" :default-sort="{prop: 'date', order: 'descending'}" :highlight-current-row="true" >
<el-table-column prop="feedNo" label="编号" ></el-table-column>
<!-- <el-table-column prop="feedContent" label="反馈内容" :formatter="filterFun" ></el-table-column> -->
<el-table-column
......@@ -72,7 +72,7 @@
<template slot-scope="scope">
<div v-if="scope.row.feedStatus =='NO' ">
<el-button type="text" size="big" @click="deleteRaise(scope.row)" >解决</el-button>
</div>
</div>
<div v-else >
<el-button type="text" size="small" disabled >已解决</el-button>
</div>
......@@ -92,8 +92,8 @@
</el-pagination>
</div>
</div>
</template>
......@@ -129,10 +129,10 @@
}
},
mounted: function () {
this.tablePlanRemindData = this.remindData();
},
filters: {
......@@ -147,14 +147,14 @@
methods: {
formatter (row, column) {
return row.address;
},
selected: function(gameName) {
this.activeName = gameName
},
/** 加载数据 */
remindData (params) {
var listsData = [];
......@@ -166,7 +166,7 @@
listsData = res.data.result.data;
this.tablePlanRemindData = listsData;
this.page.total = res.data.result.total;
}).catch(error => {
this.$Message.error(error || '系统异常');
});
......@@ -209,20 +209,20 @@
// 修改成功后再次加载数据
this.$message({message: '操作成功', type: 'success'});
this.tablePlanRemindData = this.remindData();
}).catch(error => {
this.$Message.error(error || '系统异常');
});
}).catch(() => {
this.$message({
type: 'info',
message: '取消处理'
});
});
});
},
//产品名称
......@@ -230,7 +230,7 @@
var status = row['productName'];
return this.$enumUtils.toMsg('BusinessType', status);
},
//参数
buildParam () {
var return_hash = {
......@@ -257,7 +257,7 @@
if (this.searchInfo.productName != '') {
return_hash['productName'] = this.searchInfo.productName
}
if (this.searchInfo.gmtCreated != null && this.searchInfo.gmtCreated.length>0) {
var  end = new Date(this.searchInfo.gmtCreated[1])
......@@ -267,7 +267,7 @@
          return_hash['gmtCreated'] = this.searchInfo.gmtCreated[0];
          return_hash['gmtTimeEnd'] = end
}
}
return return_hash;
},
......
......@@ -97,9 +97,13 @@
.then(res => {
if (res.data.code == 200) {
localStorage.setItem('userName', res.data.result.userName)
localStorage.setItem('userName', res.data.result.userName);
localStorage.setItem('agentNo', res.data.result.extensionNumber);
localStorage.setItem('loginName', res.data.result.loginName)
localStorage.setItem('loginName', res.data.result.loginName);
var userRolePermission = this.userRolelistToStringUtils(res.data.result.userRole);
localStorage.setItem('userRole', userRolePermission);
var btnPermission = this.listToStringUtils(res.data.result.buttonList);
localStorage.setItem('btnPermission', btnPermission)
......@@ -210,6 +214,18 @@
return returnStr;
},
userRolelistToStringUtils(list) {
var returnStr = ''
for (var num in list) {
if (num == list.length - 1) {
returnStr = returnStr + list[num].roleCode
} else {
returnStr = returnStr + list[num].roleCode + ","
}
}
return returnStr;
},
showErrorAlert(err) {
this.$message.error(err.msg === undefined ? '404' : err.msg)
this.ui.loginLoading = false
......
......@@ -11,6 +11,7 @@ const cacheManage = {
localStorage.setItem('userName', "")
localStorage.setItem('loginName', "")
localStorage.setItem('userRole', "")
localStorage.setItem('btnPermission', "")
localStorage.setItem('menuPermission', "")
localStorage.setItem('myRaisCardName', "")
......
......@@ -6,6 +6,7 @@
const permissionUtils = {
install: function (Vue) {
Vue.prototype.$permissionUtils = {
btnPermission(code) {
if (localStorage.getItem('btnPermission') == null || localStorage.getItem('btnPermission') == '') {
return false
......@@ -30,6 +31,20 @@ const permissionUtils = {
}
}
return false
},
rolePermission(code) {
if (localStorage.getItem('userRole') == null || localStorage.getItem('userRole') == '') {
return false
}
var rolePerList = localStorage.getItem('userRole').split(",");
for (var num in rolePerList) {
if (code == rolePerList[num]) {
return true
}
}
return false
}
......
{
"name": "versiony",
"version": "5.6.2"
"version": "5.6.4"
}
\ No newline at end of file
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