|
|
|
@ -25,6 +25,11 @@ |
|
|
|
@click="projectModel()" |
|
|
|
> {{ buttons.projectAuthorization || '项目授权' }} |
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-button v-if="isAuth('sys:user:save')" :disabled="this.showButton" type="primary" |
|
|
|
@click="FieldListModel()" |
|
|
|
> {{ buttons.fieldAuthorization || '字段授权' }} |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
@ -195,7 +200,70 @@ |
|
|
|
|
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!-- 功能清单 --> |
|
|
|
<el-dialog |
|
|
|
width="600px" |
|
|
|
title="功能清单" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="functionFlag"> |
|
|
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
|
用户: <el-input v-model="selectUser.username" style="width: 130px" readonly></el-input> |
|
|
|
名称: <el-input v-model="selectUser.userDisplay" style="width: 130px" readonly></el-input> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
height="300" |
|
|
|
:data="functionList" |
|
|
|
border |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column |
|
|
|
prop="functionName" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="80" |
|
|
|
label="功能名称"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="functionGroup" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="100" |
|
|
|
label="功能分组"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="60" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope" class="foo_container"> |
|
|
|
<a type="text" size="small" @click="accessModel(scope.row)">授权</a> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="modelFlag = false">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!-- 字段授权 --> |
|
|
|
<el-dialog |
|
|
|
style="font-size: 12px" |
|
|
|
v-drag |
|
|
|
:title="'字段授权'" |
|
|
|
:visible.sync="fieldFlag" |
|
|
|
width="518px" |
|
|
|
:append-to-body="true"> |
|
|
|
<el-transfer v-model="selectFieldList" class="rq" filterable :props="{ |
|
|
|
key: 'fieldId', |
|
|
|
label: 'fieldDesc' |
|
|
|
}" :data="fieldList" :titles="['未选择', '已选择']"></el-transfer> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="saveAccessFieldListByUser()">确定</el-button> |
|
|
|
<el-button @click="fieldFlag = false" type="primary">取消</el-button> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
width="600px" |
|
|
|
@ -293,7 +361,9 @@ |
|
|
|
import {getUserAccessSiteList, saveUserAccessSiteList} from '@/api/factory/accessSite.js' |
|
|
|
import {getSiteList} from '@/api/factory/site.js' |
|
|
|
import {searchAccessBuList,saveAccessBU,searchAccessProjectForUser,saveAccessProject} from '@/api/base/site.js' |
|
|
|
|
|
|
|
import { |
|
|
|
searchFieldFunctionList,searchAccessFieldListByUser,saveAccessFieldListByUser |
|
|
|
} from "@/api/base/field.js" |
|
|
|
import AddOrUpdate from './user-add-or-update' |
|
|
|
import {getUserBusinessRoleList, saveUserBusinessRole,} from '@/api/auditManagement/auditType.js' |
|
|
|
|
|
|
|
@ -407,7 +477,8 @@ export default { |
|
|
|
normal: '正常', |
|
|
|
auth: '审核', |
|
|
|
allAuth: '所有权限', |
|
|
|
currentAuth: '当前权限' |
|
|
|
currentAuth: '当前权限', |
|
|
|
fieldAuthorization:'字段授权', |
|
|
|
}, |
|
|
|
dataList: [], |
|
|
|
securityList: [], |
|
|
|
@ -420,7 +491,13 @@ export default { |
|
|
|
totalPage: 0, |
|
|
|
dataListLoading: false, |
|
|
|
dataListSelections: [], |
|
|
|
addOrUpdateVisible: false |
|
|
|
addOrUpdateVisible: false, |
|
|
|
functionFlag:false, |
|
|
|
functionList:[], |
|
|
|
rowFunctionId:'', |
|
|
|
selectFieldList:[], |
|
|
|
fieldList:[], |
|
|
|
fieldFlag:false, |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -791,7 +868,46 @@ export default { |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
FieldListModel(){ |
|
|
|
searchFieldFunctionList().then(({data}) => { |
|
|
|
this.functionList=data.rows |
|
|
|
}); |
|
|
|
this.functionFlag=true; |
|
|
|
}, |
|
|
|
accessModel(row){ |
|
|
|
this.rowFunctionId=row.functionId; |
|
|
|
searchAccessFieldListByUser({functionId:row.functionId, |
|
|
|
username: this.selectUser.username, |
|
|
|
}).then(({data}) => { |
|
|
|
this.selectFieldList = data.accessFieldList |
|
|
|
this.fieldList=data.fieldList |
|
|
|
}) |
|
|
|
this.fieldFlag=true; |
|
|
|
}, |
|
|
|
saveAccessFieldListByUser(){ |
|
|
|
let inList=[]; |
|
|
|
for (let i = 0; i < this.selectFieldList.length; i++) { |
|
|
|
let inData={ |
|
|
|
username: this.selectUser.username, |
|
|
|
fieldId:this.selectFieldList[i] |
|
|
|
} |
|
|
|
inList.push(inData) |
|
|
|
} |
|
|
|
let saveData={ |
|
|
|
username: this.selectUser.username, |
|
|
|
functionId:this.rowFunctionId, |
|
|
|
accessFieldList:inList, |
|
|
|
} |
|
|
|
saveAccessFieldListByUser(saveData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
this.fieldFlag = false |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getFunctionButtonList() |
|
|
|
|