sp_page_show.js 6.1 KB

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