|
|
@@ -128,21 +128,6 @@ module.exports = app => {
|
|
|
|
|
|
get adminPermission () {
|
|
|
return {
|
|
|
- budget_permission: [this.PermissionConst.budget.view],
|
|
|
- file_permission: [this.PermissionConst.file.view],
|
|
|
- manage_permission: [this.PermissionConst.manage.view],
|
|
|
- filing_type: 'all',
|
|
|
- info_permission: [this.PermissionConst.info.view],
|
|
|
- datacollect_permission: [this.PermissionConst.datacollect.view],
|
|
|
- contract_permission: [this.PermissionConst.contract.view],
|
|
|
- fund_pay_permission: [this.PermissionConst.fund_pay.view],
|
|
|
- fund_trans_permission: [this.PermissionConst.fund_trans.view],
|
|
|
- payment_permission: [this.PermissionConst.payment.view],
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- get touristPermission () {
|
|
|
- return {
|
|
|
budget_permission: this.ctx.helper.mapAllSubField(this.PermissionConst.budget, 'value'),
|
|
|
file_permission: this.ctx.helper.mapAllSubField(this.PermissionConst.file, 'value'),
|
|
|
manage_permission: this.ctx.helper.mapAllSubField(this.PermissionConst.manage, 'value'),
|
|
|
@@ -156,6 +141,21 @@ module.exports = app => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ get touristPermission () {
|
|
|
+ return {
|
|
|
+ budget_permission: [this.PermissionConst.budget.view.value],
|
|
|
+ file_permission: [this.PermissionConst.file.view.value],
|
|
|
+ manage_permission: [this.PermissionConst.manage.view.value],
|
|
|
+ filing_type: 'all',
|
|
|
+ info_permission: [this.PermissionConst.info.view.value],
|
|
|
+ datacollect_permission: [this.PermissionConst.datacollect.view.value],
|
|
|
+ contract_permission: [this.PermissionConst.contract.view.value],
|
|
|
+ fund_pay_permission: [this.PermissionConst.fund_pay.view.value],
|
|
|
+ fund_trans_permission: [this.PermissionConst.fund_trans.view.value],
|
|
|
+ payment_permission: [this.PermissionConst.payment.view.value],
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
async showSubTab(uid, type, spid = '') {
|
|
|
const spidSql = spid ? ` AND spid = "${spid}"` : '';
|
|
|
const sql = `SELECT count(*) as count FROM ${this.tableName} WHERE ${type}_permission <> '' AND uid = ?` + spidSql;
|
|
|
@@ -440,6 +440,7 @@ module.exports = app => {
|
|
|
} else {
|
|
|
const viewPermission = permissionBlock.permission.find(x => { return x.key === 'view'; });
|
|
|
if (!viewPermission) return true;
|
|
|
+ console.log(viewPermission, ctx.subProject.permission);
|
|
|
return ctx.subProject.permission[permissionBlock.field].indexOf(viewPermission.value) >= 0;
|
|
|
}
|
|
|
};
|