add: 权限配置

pull/5/head
dearlin 2023-11-29 11:03:41 +08:00
parent 0776f090ed
commit 44687ab203
6 changed files with 100 additions and 24 deletions

View File

@ -68,8 +68,8 @@
</el-table> </el-table>
<div class="page-btn-group"> <div class="page-btn-group">
<div> <div>
<el-button icon="el-icon-check" type="success" @click="preExchange"></el-button> <el-button v-show="edit" icon="el-icon-check" type="success" @click="preExchange"></el-button>
<el-button icon="el-icon-check" type="success" @click="updateStage('RELEASE')"></el-button> <el-button v-show="edit" icon="el-icon-check" type="success" @click="updateStage('RELEASE')"></el-button>
</div> </div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div> </div>
@ -87,7 +87,7 @@
</el-table> </el-table>
<!-- <el-button icon="el-icon-plus" @click="updateStage('EXCHANGE')"></el-button>--> <!-- <el-button icon="el-icon-plus" @click="updateStage('EXCHANGE')"></el-button>-->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button icon="el-icon-plus" @click="updateStageEXCHANGE('EXCHANGE')"></el-button> <el-button v-show="edit" icon="el-icon-plus" @click="updateStageEXCHANGE('EXCHANGE')"></el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -123,6 +123,9 @@ export default {
// //
dialogTableVisible: false, // dialogTableVisible: false, //
listLoading: false, // listLoading: false, //
add: false, //
del: false, //
edit: false, //
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20 limit: 20
@ -170,6 +173,21 @@ export default {
this.listLoading = false this.listLoading = false
}) })
}, },
hasButton: function() {
var keys = 'reviewevaluate:add,reviewevaluate:del,reviewevaluate:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.reviewevaluatefhadminadd //
this.del = data.reviewevaluatefhadmindel //
this.edit = data.reviewevaluatefhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
// //
getParam() { getParam() {
this.listLoading = true this.listLoading = true

View File

@ -43,16 +43,16 @@
<el-table-column label="操作" align="center" width="420"> <el-table-column label="操作" align="center" width="420">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button type="success" icon="el-icon-view" size="mini" @click="goView(row.PROMISE_ID)"></el-button> <el-button type="success" icon="el-icon-view" size="mini" @click="goView(row.PROMISE_ID)"></el-button>
<el-button v-if="row.ISDELETE === 1" type="success" icon="el-icon-check" size="mini" @click="goEnableOrDisable(0,row.PROMISE_ID)"></el-button> <el-button v-if="edit && row.ISDELETE === 1" type="success" icon="el-icon-check" size="mini" @click="goEnableOrDisable(0,row.PROMISE_ID)"></el-button>
<el-button v-if="row.ISDELETE === 0" type="danger" icon="el-icon-close" size="mini" @click="goEnableOrDisable(1,row.PROMISE_ID)"></el-button> <el-button v-if="edit && row.ISDELETE === 0" type="danger" icon="el-icon-close" size="mini" @click="goEnableOrDisable(1,row.PROMISE_ID)"></el-button>
<el-button type="danger" icon="el-icon-delete" plain @click="handleDelete(row.PROMISE_ID)"></el-button> <el-button v-if="del" type="danger" icon="el-icon-delete" plain @click="handleDelete(row.PROMISE_ID)"></el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="goAddOrEdit(row.PROMISE_ID)"></el-button> <el-button v-if="edit" type="primary" icon="el-icon-edit" size="mini" @click="goAddOrEdit(row.PROMISE_ID)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page-btn-group"> <div class="page-btn-group">
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="goAddOrEdit('')"></el-button> <el-button v-if="add" type="primary" icon="el-icon-plus" @click="goAddOrEdit('')"></el-button>
</div> </div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div> </div>
@ -77,6 +77,9 @@ export default {
}, },
total: 0, total: 0,
KEYWORDS: '', KEYWORDS: '',
add: false, //
del: false, //
edit: false, //
varList: [], varList: [],
dialog: { dialog: {
visible: false, visible: false,
@ -86,6 +89,7 @@ export default {
}, },
created() { created() {
this.getList() this.getList()
this.hasButton()
}, },
methods: { methods: {
// //
@ -149,6 +153,21 @@ export default {
this.dialog.visible = true this.dialog.visible = true
}) })
}, },
hasButton: function() {
var keys = 'promise:add,promise:del,promise:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.promisefhadminadd //
this.del = data.promisefhadmindel //
this.edit = data.promisefhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
handleDelete(id) { handleDelete(id) {
this.$confirm('确定要删除吗?', { this.$confirm('确定要删除吗?', {
confirmButtonText: '确定', confirmButtonText: '确定',

View File

@ -87,17 +87,17 @@
<el-table-column label="操作" align="center" width="500"> <el-table-column label="操作" align="center" width="500">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button icon="el-icon-view" size="mini" @click="goSee(row.PROMISE_ID)"></el-button> <el-button icon="el-icon-view" size="mini" @click="goSee(row.PROMISE_ID)"></el-button>
<el-button v-if="row.STATE === '1'" type="success" icon="el-icon-check" size="mini" @click="goEnableOrDisable('0',row.PROMISE_ID)"></el-button> <el-button v-if="edit && row.STATE === '1'" type="success" icon="el-icon-check" size="mini" @click="goEnableOrDisable('0',row.PROMISE_ID)"></el-button>
<el-button v-if="row.STATE === '0'" type="danger" icon="el-icon-close" size="mini" @click="goEnableOrDisable('1',row.PROMISE_ID)"></el-button> <el-button v-if="edit && row.STATE === '0'" type="danger" icon="el-icon-close" size="mini" @click="goEnableOrDisable('1',row.PROMISE_ID)"></el-button>
<el-button :disabled="row.ISSIGN !== 0" type="primary" icon="el-icon-edit" size="mini" @click="goAddOrEdit(row.PROMISE_ID)"></el-button> <el-button v-if="edit" :disabled="row.ISSIGN !== 0" type="primary" icon="el-icon-edit" size="mini" @click="goAddOrEdit(row.PROMISE_ID)"></el-button>
<el-button icon="el-icon-view" size="mini" @click="goDetails(row.PROMISE_ID)"></el-button> <el-button icon="el-icon-view" size="mini" @click="goDetails(row.PROMISE_ID)"></el-button>
<el-button v-if="ISMAIN ==='1'" icon="el-icon-close" type="danger" size="mini" @click="goDelete(row.PROMISE_ID)"></el-button> <el-button v-if="del && ISMAIN ==='1'" icon="el-icon-close" type="danger" size="mini" @click="goDelete(row.PROMISE_ID)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page-btn-group"> <div class="page-btn-group">
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="goAddOrEdit('')"></el-button> <el-button v-if="add" type="primary" icon="el-icon-plus" @click="goAddOrEdit('')"></el-button>
</div> </div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div> </div>
@ -118,6 +118,9 @@ export default {
page: 1, page: 1,
limit: 20 limit: 20
}, },
add: false, //
del: false, //
edit: false, //
total: 0, total: 0,
KEYWORDS: '', KEYWORDS: '',
LEVEL: '', LEVEL: '',
@ -138,6 +141,7 @@ export default {
this.getTreeData() this.getTreeData()
this.getLevel() this.getLevel()
this.getEditMyInfo() this.getEditMyInfo()
this.hasButton()
}, },
methods: { methods: {
@ -207,6 +211,21 @@ export default {
this.listLoading = false this.listLoading = false
}) })
}, },
hasButton: function() {
var keys = 'promisebook:add,promisebook:del,promisebook:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.promisebookfhadminadd //
this.del = data.promisebookfhadmindel //
this.edit = data.promisebookfhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
goEnableOrDisable(STATE, PROMISE_ID) { goEnableOrDisable(STATE, PROMISE_ID) {
this.$confirm(`确定要${STATE === '1' ? '禁用' : '启用'}当前承诺书吗?`, { this.$confirm(`确定要${STATE === '1' ? '禁用' : '启用'}当前承诺书吗?`, {
type: 'warning' type: 'warning'

View File

@ -108,7 +108,7 @@
<el-table-column label="操作" align="center" width="200px"> <el-table-column label="操作" align="center" width="200px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" size="mini" @click="goView(row.CORPINFO_ID)"></el-button> <el-button type="primary" icon="el-icon-view" size="mini" @click="goView(row.CORPINFO_ID)"></el-button>
<el-button v-if="row.STATE == '1'" type="primary" icon="el-icon-s-check" size="mini" @click="handleAudit(row.CORPINFO_ID)"></el-button> <el-button v-if="edit && row.STATE == '1'" type="primary" icon="el-icon-s-check" size="mini" @click="handleAudit(row.CORPINFO_ID)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -392,16 +392,16 @@ export default {
// //
hasButton: function() { hasButton: function() {
var keys = 'units:add,units:del,units:edit,toExcel' var keys = 'xgfaudit:add,xgfaudit:del,xgfaudit:edit,toExcel'
requestFN( requestFN(
'/head/hasButton', '/head/hasButton',
{ {
keys: keys keys: keys
} }
).then((data) => { ).then((data) => {
this.add = data.unitsfhadminadd // this.add = data.xgfauditfhadminadd //
this.del = data.unitsfhadmindel // this.del = data.xgfauditfhadmindel //
this.edit = data.unitsfhadminedit // this.edit = data.xgfauditfhadminedit //
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })

View File

@ -65,7 +65,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button v-if="(row.AUDIT_STATUS === 1 || row.AUDIT_STATUS === 0 ) && (row.MANAGER_USER_ID == USER_ID && row.managerCount != row.USER_COUNT ) || (row.TERRITORIALITY_USER_ID == USER_ID && row.territorialityCount != row.USER_COUNT ) " type="success" icon="el-icon-edit" size="mini" @click="handleAudit(row.TRAININGBATCH_ID)"></el-button> <el-button v-if="edit && (row.AUDIT_STATUS === 1 || row.AUDIT_STATUS === 0 ) && (row.MANAGER_USER_ID == USER_ID && row.managerCount != row.USER_COUNT ) || (row.TERRITORIALITY_USER_ID == USER_ID && row.territorialityCount != row.USER_COUNT ) " type="success" icon="el-icon-edit" size="mini" @click="handleAudit(row.TRAININGBATCH_ID)"></el-button>
<el-button v-else type="primary" icon="el-icon-edit" size="mini" @click="handleShow(row.TRAININGBATCH_ID)"></el-button> <el-button v-else type="primary" icon="el-icon-edit" size="mini" @click="handleShow(row.TRAININGBATCH_ID)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -100,6 +100,9 @@ export default {
}, },
total: 0, total: 0,
varList: [], varList: [],
add: false,
del: false,
edit: false,
XGF_NAME: '', XGF_NAME: '',
dates: [], dates: [],
statusList: [{ value: 0, label: '股份公司待审核' }, { value: 1, label: '分公司待审核' }, { value: 2, label: '培训中' }, { value: 3, label: '培训完成' }, { value: -1, label: '股份公司审核未通过' }, { value: -2, label: '分公司审核未通过' }], statusList: [{ value: 0, label: '股份公司待审核' }, { value: 1, label: '分公司待审核' }, { value: 2, label: '培训中' }, { value: 3, label: '培训完成' }, { value: -1, label: '股份公司审核未通过' }, { value: -2, label: '分公司审核未通过' }],
@ -108,6 +111,7 @@ export default {
}, },
created() { created() {
this.getList() this.getList()
this.hasButton()
}, },
methods: { methods: {
getQuery() { getQuery() {
@ -124,6 +128,21 @@ export default {
this.AUDIT_STATUS = '' this.AUDIT_STATUS = ''
this.getQuery() this.getQuery()
}, },
hasButton: function() {
var keys = 'flowaudit:add,flowaudit:del,flowaudit:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.flowauditfhadminadd //
this.del = data.flowauditfhadmindel //
this.edit = data.flowauditfhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
getList() { getList() {
this.listLoading = true this.listLoading = true
requestFN( requestFN(

View File

@ -98,7 +98,7 @@
<el-table-column :formatter="(row) => formatStateLabel(row)" prop="STATE" label="状态" /> <el-table-column :formatter="(row) => formatStateLabel(row)" prop="STATE" label="状态" />
<el-table-column label="操作" align="center" width="120"> <el-table-column label="操作" align="center" width="120">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button type="warning" icon="el-icon-refresh" size="mini" @click="resetPassword(row)"></el-button> <el-button v-show="edit" type="warning" icon="el-icon-refresh" size="mini" @click="resetPassword(row)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -198,6 +198,7 @@ export default {
this.getList() this.getList()
this.getDict() this.getDict()
this.getTreeList() this.getTreeList()
this.hasButton()
}, },
methods: { methods: {
onChange(value) { onChange(value) {
@ -299,16 +300,16 @@ export default {
}, },
// //
hasButton: function() { hasButton: function() {
var keys = 'relevantunits:add,relevantunits:del,relevantunits:edit,toExcel' var keys = 'xgfinsert:add,xgfinsert:del,xgfinsert:edit,toExcel'
requestFN( requestFN(
'/head/hasButton', '/head/hasButton',
{ {
keys: keys keys: keys
} }
).then((data) => { ).then((data) => {
this.add = data.corpinfofhadminadd // this.add = data.xgfinsertfhadminadd //
this.del = data.corpinfofhadmindel // this.del = data.xgfinsertfhadmindel //
this.edit = data.corpinfofhadminedit // this.edit = data.xgfinsertfhadminedit //
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })