sp_page_show.js 5.6 KB

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