sp_page_show.js 5.7 KB

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