From 0f17abcbb472fa318d002ed2dd9611b5a9ec6b1e Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 18 Apr 2023 14:20:04 +0800 Subject: [PATCH] optimize --- .../property/newOaWorkflow/newOaWorkflow.html | 17 +++++------- .../property/newOaWorkflow/newOaWorkflow.js | 27 +++++++++++-------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/public/pages/property/newOaWorkflow/newOaWorkflow.html b/public/pages/property/newOaWorkflow/newOaWorkflow.html index b94891fcc..a9ceefc0f 100644 --- a/public/pages/property/newOaWorkflow/newOaWorkflow.html +++ b/public/pages/property/newOaWorkflow/newOaWorkflow.html @@ -1,19 +1,16 @@ -
+
    -
  • +
  • +
  • -
  • +
  • 起草流程
  • -
  • +
  • -
  • +
  • 流程已办
@@ -33,4 +30,4 @@
-
+ \ No newline at end of file diff --git a/public/pages/property/newOaWorkflow/newOaWorkflow.js b/public/pages/property/newOaWorkflow/newOaWorkflow.js index 13d7e8539..e8f09b028 100644 --- a/public/pages/property/newOaWorkflow/newOaWorkflow.js +++ b/public/pages/property/newOaWorkflow/newOaWorkflow.js @@ -1,7 +1,7 @@ /** 入驻小区 **/ -(function (vc) { +(function(vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 100; vc.extends({ @@ -10,28 +10,33 @@ switchValue: '', } }, - _initMethod: function () { + _initMethod: function() { //$that.newOaWorkflowInfo.switchValue = vc.getParam('switchValue'); let _switchValue = vc.getParam('switchValue'); - + if (_switchValue) { $that.swatch(_switchValue); return; } - $that.swatch('newOaWorkflowPool'); + if (vc.hasPrivilege('502023041839740294')) { + $that.swatch('newOaWorkflowPool'); + } else { + $that.swatch('newOaWorkflowForm'); + } + }, - _initEvent: function () { - vc.on('newOaWorkflow', 'listNewOaWorkflow', function (_param) { + _initEvent: function() { + vc.on('newOaWorkflow', 'listNewOaWorkflow', function(_param) { vc.component._listNewOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS); }); - vc.on('newOaWorkflow', 'switch', function (_switchValue) { + vc.on('newOaWorkflow', 'switch', function(_switchValue) { $that.swatch(_switchValue); }) }, methods: { - swatch: function (_value) { - if($that.newOaWorkflowInfo.switchValue == _value){ - return ; + swatch: function(_value) { + if ($that.newOaWorkflowInfo.switchValue == _value) { + return; } $that.newOaWorkflowInfo.switchValue = _value; vc.emit(_value, 'witch', { @@ -40,4 +45,4 @@ } } }); -})(window.vc); +})(window.vc); \ No newline at end of file