sp_page_show.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. 'use strict';
  2. /**
  3. * 前台页面展示相关
  4. *
  5. * @author Ellisran
  6. * @date
  7. * @version
  8. */
  9. // { title: '打开项目管理系统', name: 'openManagement', value: pageStatus.show, type: 'checkbox' },
  10. const pageStatus = {
  11. show: 1,
  12. hide: 0,
  13. };
  14. // 模块管理开关
  15. const managerPageControl = [
  16. { title: '决策大屏', name: 'openDataCollect', value: pageStatus.show, type: 'checkbox', tip: '开启后,前台配置用户权限后方可显示' },
  17. { title: '合同管理', name: 'openContract', value: pageStatus.show, type: 'checkbox' },
  18. { title: '资料归集', name: 'openFile', value: pageStatus.show, type: 'checkbox' },
  19. { title: '动态投资', name: 'openBudget', value: pageStatus.show, type: 'checkbox', tip: '开启后,前台配置用户权限后方可显示' },
  20. { title: '支付审批', name: 'openPayment', value: pageStatus.show, type: 'checkbox', tip: '开启后,前台配置用户权限后方可显示' },
  21. { title: '资金监管', name: 'openFinancial', value: pageStatus.show, type: 'checkbox' },
  22. ];
  23. // 标段功能开关
  24. const tenderPageControl = [
  25. { title: '部位台帐', name: 'bwtz', value: pageStatus.show, type: 'checkbox', tip: '「部位台帐」显示在「0号台帐」以及「各期计量」侧栏菜单中', tipClass: '' },
  26. { title: '其他台账', name: 'stageExtra', value: pageStatus.show, type: 'checkbox' },
  27. { title: '合同支付独立审批', name: 'phasePay', value: pageStatus.show, type: 'checkbox' },
  28. { title: '投资进度', name: 'xxjd', value: pageStatus.show, type: 'checkbox' },
  29. { title: '材料调差', name: 'openMaterial', value: pageStatus.show, type: 'checkbox' },
  30. { title: '过程结算', name: 'openSettle', value: pageStatus.show, type: 'checkbox' },
  31. { title: '施工日志', name: 'openConstruction', value: pageStatus.show, type: 'checkbox' },
  32. { title: '合同管理', name: 'openTenderContract', value: pageStatus.show, type: 'checkbox' },
  33. ];
  34. // 报表相关开关
  35. const reportPageControl = [
  36. { title: '关闭报表「导出PDF」', name: 'closeExportPdf', value: pageStatus.show, type: 'checkbox' },
  37. { title: '关闭报表「导出Excel」', name: 'closeExportExcel', value: pageStatus.show, type: 'checkbox' },
  38. { title: '关闭报表「水印」', name: 'closeWatermark', value: pageStatus.show, type: 'checkbox', tip: '审批未通过的计量期,报表将显示水印「审批未通过」', tipClass: '' },
  39. { title: '关闭「定制报表」默认加载报表功能', name: 'closeShowAllCustomized', value: pageStatus.show, type: 'checkbox', tip: '关闭后,定制报表将默认不显示(用户定制选择除外)', tipClass: '' },
  40. { title: '开启报表「跨标段批量签名」', name: 'openSign', value: pageStatus.show, type: 'checkbox' },
  41. { title: '开启个人「签字」功能', name: 'individualSign', value: pageStatus.show, type: 'checkbox', tip: '签字仅可选择当前人账号,管理员账号可选择所有人', tipClass: '' },
  42. { title: '开启签名「网证通电子签名」', name: 'openNetCaSign', value: pageStatus.show, type: 'checkbox' },
  43. { title: '开启文本「签字」', name: 'isTextSignature', value: pageStatus.show, type: 'checkbox', tip: '开启后,所有签名将以文字代替图片', tipClass: '' },
  44. { title: '开启「报表数据预设」', name: 'isPreset', value: pageStatus.show, type: 'checkbox', tip: '', tipClass: '' },
  45. { title: '开启「审批完成过滤」', name: 'isOnlyChecked', value: pageStatus.show, type: 'checkbox', tip: '关闭后,「工程变更」将包含未上报、审批中等全部状态的数据,影响 开启「报表数据预设」', tipClass: '' },
  46. { title: '开启「归档时不生成签字和签章」', name: 'closeArchiveSignature', value: pageStatus.show, type: 'checkbox', tip: '开启后,归档时所有报表的签名(名、章、文本等)都不显示', tipClass: '' },
  47. ];
  48. // 功能设置页name名列表,功能设置需要设置的name必须添加到这个列表中,否则有可能清空数据
  49. const settingNameArray = (function(controlArr){
  50. const result = [];
  51. controlArr.forEach(control => {
  52. const key = control.map(x => { return x.name; });
  53. result.push(...key);
  54. });
  55. })([managerPageControl, tenderPageControl]);
  56. // 设置默认值,同步前台的const/page_show.js文件
  57. const defaultSetting = {
  58. bwtz: 0,
  59. xxjd: 0,
  60. openMaterial: 1,
  61. stageExtra: 1,
  62. phasePay: 0,
  63. closeExportPdf: 0,
  64. closeExportExcel: 0,
  65. closeWatermark: 0,
  66. closeShowAllCustomized: 0,
  67. openSign: 0,
  68. individualSign: 0,
  69. openNetCaSign: 0,
  70. isTextSignature: 0,
  71. openChangeRevise: 1,
  72. openMaterialTax: 0,
  73. addDataCollect: 1,
  74. closeWapYfSf: 0,
  75. close1stStageCheckDealParam: 0,
  76. openManagement: 0,
  77. isPreset: 0,
  78. isOnlyChecked: 1,
  79. closeArchiveSignature: 0,
  80. openSettle: 0,
  81. openContractExpr: 0,
  82. openMultiStageCalc: 0,
  83. maxMultiStageCount: 5,
  84. openDataCollect: 1,
  85. openFile: 1,
  86. openBudget: 1,
  87. openPayment: 1,
  88. openConstruction: 1,
  89. openMaterialStageRepeat: 0,
  90. openContract: 1,
  91. openFinancial: 1,
  92. openTenderContract: 1,
  93. openStageAudit: 0,
  94. stageAuditEarly: 3,
  95. stageAuditWorry: 8,
  96. };
  97. module.exports = {
  98. pageStatus,
  99. managerPageControl,
  100. tenderPageControl,
  101. defaultSetting,
  102. settingNameArray,
  103. };