n20-common-lib 2.1.35 → 2.2.1

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": "2.1.35",
3
+ "version": "2.2.1",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -52,7 +52,14 @@
52
52
  />
53
53
  </el-form-item>
54
54
  <template v-if="taskId && showBtn">
55
- <show-app-opi class="flex-1 m-l-s" :task-id="taskId" :message.sync="messageC" style="width: 20%" />
55
+ <show-app-opi
56
+ v-if="opiAndUser || authList.includes('showAppOpi')"
57
+ class="flex-1 m-l-s"
58
+ :task-id="taskId"
59
+ :message.sync="messageC"
60
+ :and-user="opiAndUser"
61
+ style="width: 20%"
62
+ />
56
63
  <show-other-att
57
64
  v-if="authList.includes('showOtherAtt')"
58
65
  class="flex-1 m-l"
@@ -122,6 +129,11 @@ import CarboncopyProp from './setCarboncopyProp.vue'
122
129
  import RejectToProp from './setRejectToProp.vue'
123
130
  import ShowAppOpi from './showAppOpi.vue'
124
131
  import ShowOtherAtt from './showOtherAttr.vue'
132
+ // window._approvalExtend = { 'addtask.chdUserInfo.extend': {}, 'appOpi.queryAppOpiAndUser.exist': undefined, 'card.countermand.suggestion': false }
133
+ if (!window._approvalExtend) window._approvalExtend = {}
134
+ if (!window._approvalExtend['addtask.chdUserInfo.extend']) {
135
+ window._approvalExtend['addtask.chdUserInfo.extend'] = window._isAddtask_get_userlist_extend_data_ || {}
136
+ }
125
137
 
126
138
  export default {
127
139
  name: 'ApprovalButtons',
@@ -190,6 +202,7 @@ export default {
190
202
  rejectToV: false,
191
203
  approvalToV: false,
192
204
  showApprovalTo: false,
205
+ opiAndUser: false,
193
206
  otherAtt: {}
194
207
  }
195
208
  },
@@ -208,19 +221,11 @@ export default {
208
221
  }
209
222
  },
210
223
  created() {
211
- this.taskId = this.$route.query.taskId
224
+ this.taskId = this.$route.query.taskId || this.$route.params.taskId
212
225
  this.showBtn = this.$route.query.habtn !== 'true'
213
226
  this.getBtns()
214
- if (this.showBtn && this.$route.query.state === '2') {
215
- axios
216
- .get(`/bems/activiti/sample/getTaskMoveVos/${this.$route.query.taskId}/1`, null, {
217
- loading: false,
218
- noMsg: true
219
- })
220
- .then(() => {
221
- this.showApprovalTo = true
222
- })
223
- }
227
+ this.getShowApprovalTo()
228
+ this.getHasQueryAppOpiAndUser()
224
229
  },
225
230
  methods: {
226
231
  // 换回到发起页
@@ -255,6 +260,34 @@ export default {
255
260
  this.authList = this.btnList
256
261
  })
257
262
  },
263
+ // 获取是否显示驳回至按钮
264
+ getShowApprovalTo() {
265
+ if (this.showBtn && this.$route.query.state === '2') {
266
+ axios
267
+ .get(`/bems/activiti/sample/getTaskMoveVos/${this.$route.query.taskId}/1`, null, {
268
+ loading: false,
269
+ noMsg: true
270
+ })
271
+ .then(() => {
272
+ this.showApprovalTo = true
273
+ })
274
+ }
275
+ },
276
+ // 刺探审批意见接口是否存在
277
+ getHasQueryAppOpiAndUser() {
278
+ if (this.showBtn && window._approvalExtend['appOpi.queryAppOpiAndUser.exist'] === undefined) {
279
+ axios
280
+ .post('/bems/activiti/actAppOpi/queryAppOpiAndUser', null, { loading: false, noMsg: true })
281
+ .then(() => {
282
+ this.opiAndUser = window._approvalExtend['appOpi.queryAppOpiAndUser.exist'] = true
283
+ })
284
+ .catch(() => {
285
+ window._approvalExtend['appOpi.queryAppOpiAndUser.exist'] = false
286
+ })
287
+ } else {
288
+ this.opiAndUser = window._approvalExtend['appOpi.queryAppOpiAndUser.exist']
289
+ }
290
+ },
258
291
  // 获取提交参数
259
292
  getParam() {
260
293
  let { typeCode, taskId, groupNo, isAgentcy } = this.$route.query
@@ -118,8 +118,8 @@ export default {
118
118
  },
119
119
  methods: {
120
120
  getList() {
121
- if (this.type === 'addtask' && window._isAddtask_get_userlist_extend_data_) {
122
- this.searchObj = Object.assign(this.searchObj, window._isAddtask_get_userlist_extend_data_)
121
+ if (this.type === 'addtask') {
122
+ this.searchObj = Object.assign(this.searchObj, window._approvalExtend['addtask.chdUserInfo.extend'])
123
123
  }
124
124
  axios
125
125
  .post('/bems/activiti/online/chdUserInfo', {
@@ -26,6 +26,10 @@ export default {
26
26
  message: {
27
27
  type: String,
28
28
  default: ''
29
+ },
30
+ andUser: {
31
+ type: Boolean,
32
+ default: false
29
33
  }
30
34
  },
31
35
  data() {
@@ -39,9 +43,15 @@ export default {
39
43
  },
40
44
  methods: {
41
45
  getData() {
42
- axios.post('/bems/activiti/actAppOpi/queryAppOpiAndUser').then(({ data }) => {
43
- this.approveMsgList = data || []
44
- })
46
+ if (this.andUser) {
47
+ axios.post('/bems/activiti/actAppOpi/queryAppOpiAndUser').then(({ data }) => {
48
+ this.approveMsgList = data || []
49
+ })
50
+ } else {
51
+ axios.post('/bems/activiti/actAppOpi/queryAppOpi').then(({ data }) => {
52
+ this.approveMsgList = data.list || []
53
+ })
54
+ }
45
55
  },
46
56
  changeFn() {
47
57
  // if (this.approveMsgSlt?.length) {
@@ -45,7 +45,7 @@ export default {
45
45
  console.warn(other.otherattjson, '配置的不对')
46
46
  }
47
47
  if (!Array.isArray(this.otherattjson)) {
48
- this.otherattjson = [{ name: 'aa', value: '01' }]
48
+ this.otherattjson = []
49
49
  }
50
50
  }
51
51
  })
@@ -50,10 +50,12 @@
50
50
  <div v-if="item.addTaskName" class="n20-description-c m-t">
51
51
  {{ '加签审批人:' | $lc }}{{ item.addTaskName }}
52
52
  </div>
53
- <div v-if="item.suggestion" class="n20-description-c n20-description-bgc m-t p-a-s">
54
- <span v-if="item.result !== status.waiting">{{ '审批意见:' | $lc }}</span>
55
- <span v-if="item.suggestion">{{ item.suggestion }}</span>
56
- </div>
53
+ <template v-if="item.resultName !== '撤回' || showCtdMsg">
54
+ <div v-if="item.suggestion" class="n20-description-c n20-description-bgc m-t p-a-s">
55
+ <span v-if="item.result !== status.waiting">{{ '审批意见:' | $lc }}</span>
56
+ <span>{{ item.suggestion }}</span>
57
+ </div>
58
+ </template>
57
59
  </div>
58
60
  </el-timeline-item>
59
61
  </el-timeline>
@@ -63,6 +65,8 @@
63
65
  <script>
64
66
  import { $lc } from '../../utils/i18n/index'
65
67
  import axios from '../../utils/axios'
68
+ if (!window._approvalExtend) window._approvalExtend = {}
69
+
66
70
  export default {
67
71
  name: 'ApprovalCard',
68
72
  filters: {
@@ -119,6 +123,12 @@ export default {
119
123
  default: undefined
120
124
  }
121
125
  },
126
+ data() {
127
+ return {
128
+ // 显示撤回意见,默认不显示
129
+ showCtdMsg: window._approvalExtend['card.countermand.suggestion'] === true
130
+ }
131
+ },
122
132
  created() {
123
133
  if (this.procInstId) {
124
134
  axios
@@ -141,7 +151,6 @@ export default {
141
151
  resultName = resultName.split('-')
142
152
  resultName = resultName[resultName.length - 1]
143
153
  _item.resultName = resultName === $lc('推进') ? $lc('批准') : resultName
144
- console.log(item, 99)
145
154
  if (item.taskName === $lc('开始')) {
146
155
  _item.result = 1
147
156
  } else if (_item.resultName === $lc('加签推进')) {
@@ -1,16 +1,32 @@
1
1
  /* 审批记录 */
2
2
  <template>
3
3
  <div>
4
- <expandableWrap :title="'审批记录' | $lc" :show-expand="false">
4
+ <expandableWrap :title="'审批记录' | $lc" :show-expand="false" :icon="false">
5
5
  <template slot="tips">
6
6
  <el-button plain size="mini" :disabled="false" @click="cardV = true">{{ '审批进度查看' | $lc }}</el-button>
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="1100px" class="p-a-0" append-to-body top="10vh">
10
+ <el-dialog
11
+ v-drag
12
+ :title="'审批记录' | $lc"
13
+ :visible.sync="cardV"
14
+ width="1100px"
15
+ class="p-a-0"
16
+ append-to-body
17
+ top="10vh"
18
+ >
11
19
  <approvalCard class="p-a" :proc-inst-id="$route.query.processInstanceId" style="height: 70vh; overflow: auto" />
12
20
  </el-dialog>
13
- <el-dialog :title="'查看流程' | $lc" :visible.sync="imgV" width="1100px" class="p-a-0" append-to-body top="10vh">
21
+ <el-dialog
22
+ v-drag
23
+ :title="'查看流程' | $lc"
24
+ :visible.sync="imgV"
25
+ width="1100px"
26
+ class="p-a-0"
27
+ append-to-body
28
+ top="10vh"
29
+ >
14
30
  <approvalImg
15
31
  class="text-c p-a"
16
32
  :proc-inst-id="$route.query.processInstanceId"
@@ -1,16 +1,32 @@
1
1
  /* 审批记录 */
2
2
  <template>
3
3
  <div>
4
- <expandableWrap :title="'审批记录' | $lc" :show-expand="false">
4
+ <expandableWrap :title="'审批记录' | $lc" :show-expand="false" :icon="false">
5
5
  <template slot="tips">
6
6
  <el-button plain size="mini" :disabled="false" @click="cardV = true">{{ '审批进度查看' | $lc }}</el-button>
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="80%" class="p-a-0" append-to-body top="10vh">
10
+ <el-dialog
11
+ v-drag
12
+ :title="'审批记录' | $lc"
13
+ :visible.sync="cardV"
14
+ width="80%"
15
+ class="p-a-0"
16
+ append-to-body
17
+ top="10vh"
18
+ >
11
19
  <approvalCard class="p-a" :proc-inst-id="$route.query.processInstanceId" style="height: 70vh; overflow: auto" />
12
20
  </el-dialog>
13
- <el-dialog :title="'查看流程' | $lc" :visible.sync="imgV" width="80%" class="p-a-0" append-to-body top="10vh">
21
+ <el-dialog
22
+ v-drag
23
+ :title="'查看流程' | $lc"
24
+ :visible.sync="imgV"
25
+ width="80%"
26
+ class="p-a-0"
27
+ append-to-body
28
+ top="10vh"
29
+ >
14
30
  <approvalImg
15
31
  class="text-c p-a"
16
32
  :proc-inst-id="$route.query.processInstanceId"
@@ -25,7 +25,7 @@
25
25
  <slot name="header-ectad">
26
26
  <sapn v-if="ectad" class="f-s-s">
27
27
  <span class="m-r-ss">
28
- {{ '用户' | $lc }}: <span class="color-666">{{ userInfo.userName }}</span>
28
+ {{ '用户' | $lc }}: <span class="color-666">{{ userInfo.userName || userNo }}</span>
29
29
  </span>
30
30
  <span class="m-r-ss b-center">
31
31
  {{ '角色' | $lc }}:
@@ -82,7 +82,7 @@
82
82
 
83
83
  <el-dropdown-menu slot="dropdown">
84
84
  <div class="user-info-name flex-box p-l p-r p-t-s p-b-s" style="max-width: 300px">
85
- <span :class="{ pointer: customOpt.userMd }" @click="goMdmUser">{{ userInfo.userName }}</span>
85
+ <span :class="{ pointer: customOpt.userMd }" @click="goMdmUser">{{ userInfo.userName || userNo }}</span>
86
86
  <div class="flex-column flex-l">
87
87
  <span
88
88
  v-title="userInfo.companyName"
@@ -171,13 +171,16 @@ function verifyDn(dnList, dn) {
171
171
  let checkRes = ''
172
172
  let userDnAttrsArr = dn.split(',').map((c) => c.trim())
173
173
 
174
+ let isIn = false
174
175
  dnList.find((C) => {
175
176
  let dnAttrsArr = C.certDN.split(',').map((c) => c.trim())
176
- if (!dnAttrsArr.every((dnAttr) => userDnAttrsArr.includes(dnAttr))) {
177
- checkRes = 'checkRes'
178
- return true
177
+ if (dnAttrsArr.every((dnAttr) => userDnAttrsArr.includes(dnAttr))) {
178
+ return (isIn = true)
179
179
  }
180
180
  })
181
+ if (!isIn) {
182
+ checkRes = 'checkRes'
183
+ }
181
184
 
182
185
  return checkRes
183
186
  }
@@ -171,13 +171,16 @@ function verifyDn(dnList, dn) {
171
171
  let checkRes = ''
172
172
  let userDnAttrsArr = dn.split(',').map((c) => c.trim())
173
173
 
174
+ let isIn = false
174
175
  dnList.find((C) => {
175
176
  let dnAttrsArr = C.certDN.split(',').map((c) => c.trim())
176
- if (!dnAttrsArr.every((dnAttr) => userDnAttrsArr.includes(dnAttr))) {
177
- checkRes = 'checkRes'
178
- return true
177
+ if (dnAttrsArr.every((dnAttr) => userDnAttrsArr.includes(dnAttr))) {
178
+ return (isIn = true)
179
179
  }
180
180
  })
181
+ if (!isIn) {
182
+ checkRes = 'checkRes'
183
+ }
181
184
 
182
185
  return checkRes
183
186
  }
@@ -126,14 +126,16 @@ function verifyDn(dnList, dn) {
126
126
  let checkRes = ''
127
127
  let userDnAttrsArr = dn.split(',').map((c) => c.trim())
128
128
 
129
+ let isIn = false
129
130
  dnList.find((C) => {
130
131
  let dnAttrsArr = C.certDN.split(',').map((c) => c.trim())
131
-
132
- if (!dnAttrsArr.every((dnAttr) => userDnAttrsArr.includes(dnAttr))) {
133
- checkRes = 'checkRes'
134
- return true
132
+ if (dnAttrsArr.every((dnAttr) => userDnAttrsArr.includes(dnAttr))) {
133
+ return (isIn = true)
135
134
  }
136
135
  })
136
+ if (!isIn) {
137
+ checkRes = 'checkRes'
138
+ }
137
139
 
138
140
  return checkRes
139
141
  }