n20-common-lib 1.3.85 → 1.3.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "1.3.85",
3
+ "version": "1.3.86",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,7 @@
1
+ <script>
2
+ import ApprovalCard from './index-zjk.vue'
3
+ export default {
4
+ name: 'ApproveCardZjk',
5
+ extends: ApprovalCard
6
+ }
7
+ </script>
@@ -0,0 +1,132 @@
1
+ /* 审批进度 */
2
+ <template>
3
+ <div class="n20-approve-wrap">
4
+ <el-timeline :reverse="true">
5
+ <el-timeline-item v-for="(item, i) in approvalData" :key="i" :type="item | typeF(status)" :hide-timestamp="true">
6
+ <div class="n20-time">
7
+ <div>{{ item.endTime | dataF }}</div>
8
+ <div>{{ item.endTime | timeF }}</div>
9
+ </div>
10
+ <div>
11
+ <div class="flex-box flex-v">
12
+ <div class="n20-worker p-r-s" style="width: 300px">{{ item.memberName }}</div>
13
+ <div class="n20-worker p-r-s" style="width: 150px">{{ item.roleName }}</div>
14
+ <div class="n20-worker p-r-s text-c" style="width: 80px">{{ item.assignee }}</div>
15
+ <div class="n20-worker p-r-s text-c" style="width: 150px">
16
+ <span :class="item | typeF(status, 'color-')">{{ item.resultName | $lc }}</span>
17
+ </div>
18
+ <div class="flex-item">{{ item.suggestion }}</div>
19
+ </div>
20
+ <div v-if="item.ccUserName" class="n20-description-c m-t">抄送人:{{ item.ccUserName }}</div>
21
+ </div>
22
+ </el-timeline-item>
23
+ </el-timeline>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import { $lc } from '../../utils/i18n/index'
29
+ import axios from '../../utils/axios'
30
+ export default {
31
+ name: 'ApprovalCardZjk',
32
+ filters: {
33
+ typeF(item, status, prefix = '') {
34
+ let result = item.result
35
+ switch (result) {
36
+ case status.submit:
37
+ return prefix + 'primary'
38
+ case status.approval:
39
+ return prefix + 'primary'
40
+ case status.reject:
41
+ return prefix + 'danger'
42
+ case status.invalid:
43
+ return prefix + 'danger'
44
+ case status.end:
45
+ return prefix + 'primary'
46
+ default:
47
+ return undefined
48
+ }
49
+ },
50
+ dataF(_t) {
51
+ let t = _t || ''
52
+ let ts = t.split(' ') || ['', '']
53
+ return ts[0]
54
+ },
55
+ timeF(_t) {
56
+ let t = _t || ''
57
+ let ts = t.split(' ') || ['', '']
58
+ return ts[1]
59
+ }
60
+ },
61
+ props: {
62
+ close: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ status: {
67
+ type: Object,
68
+ default: () => ({
69
+ waiting: 0,
70
+ submit: 1,
71
+ approval: 2,
72
+ reject: 3,
73
+ invalid: 4,
74
+ end: 5
75
+ })
76
+ },
77
+ approvalData: {
78
+ type: Array,
79
+ default: () => []
80
+ },
81
+ procInstId: {
82
+ type: String,
83
+ default: undefined
84
+ }
85
+ },
86
+ created() {
87
+ if (this.procInstId) {
88
+ axios
89
+ .get('/bems/activiti/sample/Q003', {
90
+ procInstId: this.procInstId
91
+ })
92
+ .then(({ data = [] }) => {
93
+ let approvalData = []
94
+ data.forEach((item) => {
95
+ let _item = {
96
+ endTime: item.endTime || '',
97
+ assignee: item.assignee,
98
+ suggestion: item.suggestion,
99
+ ccUserName: item.ccUserName, // 抄送人
100
+ memberName: item.memberName // 审批人单位
101
+ }
102
+ let resultName = item.optResult || ''
103
+ resultName = resultName.split('-')
104
+ resultName = resultName[resultName.length - 1]
105
+ _item.resultName = resultName
106
+
107
+ if (item.taskName === $lc('开始')) {
108
+ _item.result = 1
109
+ } else if (_item.resultName === $lc('加签推进')) {
110
+ _item.result = 2
111
+ } else if (_item.resultName === $lc('作废')) {
112
+ _item.result = 4
113
+ } else if (item.taskName === $lc('结束')) {
114
+ _item.result = 5
115
+ } else if ('approvalState' in item) {
116
+ _item.result = item.approvalState
117
+ } else if (!item.endTime) {
118
+ _item.result = 0
119
+ } else if (item.rejectFlag === 1) {
120
+ _item.result = 3
121
+ } else {
122
+ _item.result = 2
123
+ }
124
+
125
+ approvalData.push(_item)
126
+ })
127
+ this.approvalData.push(...approvalData)
128
+ })
129
+ }
130
+ }
131
+ }
132
+ </script>
@@ -10,7 +10,7 @@
10
10
  <div>
11
11
  <div class="flex-box">
12
12
  <div v-title="item.assignee" class="n20-worker flex-item m-r-s text-ellipsis" :show-overflow-tooltip="true">
13
- <span class="worker-icon cl-icon-user"></span>
13
+ <span class="worker-icon n20-icon-user"></span>
14
14
  <span>{{ item.assignee }}</span>
15
15
  </div>
16
16
  <div class="n20-approval m-r-s">
@@ -0,0 +1,41 @@
1
+ /* 审批记录 */
2
+ <template>
3
+ <div>
4
+ <expandableWrap :title="'审批记录' | $lc" :show-expand="false">
5
+ <template slot="tips">
6
+ <el-button plain size="mini" :disabled="false" @click="cardV = true">{{ '审批进度查看' | $lc }}</el-button>
7
+ <el-button plain size="mini" :disabled="false" @click="imgV = true">{{ '流程图查看' | $lc }}</el-button>
8
+ </template>
9
+ </expandableWrap>
10
+ <el-dialog :title="'审批记录' | $lc" :visible.sync="cardV" width="1100px" class="p-a-0" append-to-body top="10vh">
11
+ <approvalCard class="p-a" :proc-inst-id="$route.query.processInstanceId" style="height: 70vh; overflow: auto" />
12
+ </el-dialog>
13
+ <el-dialog :title="'查看流程' | $lc" :visible.sync="imgV" width="1100px" class="p-a-0" append-to-body top="10vh">
14
+ <approvalImg
15
+ class="text-c p-a"
16
+ :proc-inst-id="$route.query.processInstanceId"
17
+ style="height: 70vh; overflow: auto"
18
+ />
19
+ </el-dialog>
20
+ </div>
21
+ </template>
22
+
23
+ <script>
24
+ import expandableWrap from '../Expandable/main.vue'
25
+ import approvalCard from '../ApprovalCard/index-zjk.vue'
26
+ import approvalImg from './approvalImg.vue'
27
+ export default {
28
+ name: 'ApprovalRecordZjk',
29
+ components: {
30
+ expandableWrap,
31
+ approvalCard,
32
+ approvalImg
33
+ },
34
+ data() {
35
+ return {
36
+ cardV: false,
37
+ imgV: false
38
+ }
39
+ }
40
+ }
41
+ </script>
@@ -7,10 +7,10 @@
7
7
  <el-button plain size="mini" :disabled="false" @click="imgV = true">{{ '流程图查看' | $lc }}</el-button>
8
8
  </template>
9
9
  </expandableWrap>
10
- <el-dialog :title="'审批记录' | $lc" :visible.sync="cardV" width="700" class="p-a-0" append-to-body top="10vh">
10
+ <el-dialog :title="'审批记录' | $lc" :visible.sync="cardV" width="700px" class="p-a-0" append-to-body top="10vh">
11
11
  <approvalCard class="p-a" :proc-inst-id="$route.query.processInstanceId" style="height: 70vh; overflow: auto" />
12
12
  </el-dialog>
13
- <el-dialog :title="'查看流程' | $lc" :visible.sync="imgV" width="65%" class="p-a-0" append-to-body top="10vh">
13
+ <el-dialog :title="'查看流程' | $lc" :visible.sync="imgV" width="80%" class="p-a-0" append-to-body top="10vh">
14
14
  <approvalImg
15
15
  class="text-c p-a"
16
16
  :proc-inst-id="$route.query.processInstanceId"
package/src/index.js CHANGED
@@ -62,6 +62,10 @@ import Diff from './components/Diff/index.vue'
62
62
  import TableO from './components/Table/indexO.vue'
63
63
  import FiltersO from './components/Filters/indexO.vue'
64
64
  import DialogO from './components/Dialog/indexO.vue'
65
+ /* 中建科 */
66
+ import ApprovalCardZjk from './components/ApprovalCard/index-zjk.vue'
67
+ import ApproveCardZjk from './components/ApprovalCard/ApproveCard-zjk.vue'
68
+ import ApprovalRecordZjk from './components/ApprovalRecord/index-zjk.vue'
65
69
 
66
70
  /** 第三方组件 */
67
71
 
@@ -155,7 +159,11 @@ const components = [
155
159
  /* old */
156
160
  TableO,
157
161
  FiltersO,
158
- DialogO
162
+ DialogO,
163
+ /* 中建科 */
164
+ ApprovalCardZjk,
165
+ ApproveCardZjk,
166
+ ApprovalRecordZjk
159
167
  ]
160
168
 
161
169
  const install = function (Vue, opts = { prefix: 'Cl', i18nConfig: {} }) {
@@ -268,5 +276,9 @@ export {
268
276
  EventBubble,
269
277
  ApprovalImg,
270
278
  Stamp,
271
- Diff
279
+ Diff,
280
+ /* 中建科 */
281
+ ApprovalCardZjk,
282
+ ApproveCardZjk,
283
+ ApprovalRecordZjk
272
284
  }