n20-common-lib 2.4.41 → 2.4.43

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.4.41",
3
+ "version": "2.4.43",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -482,7 +482,9 @@ export default {
482
482
  // 审批
483
483
  approvalFn() {
484
484
  if (this.required && !this.messageC) {
485
- return this.errMsgFn($lc('批准'))
485
+ return this.errMsgFn(
486
+ this.authList.includes('byAddTask') && this.addTaskList.length > 0 ? $lc('加签') : $lc('批准')
487
+ )
486
488
  }
487
489
  if (this.addTaskList.length > 0 && !this.addTaskType) {
488
490
  return this.addErrFn()
@@ -490,7 +492,10 @@ export default {
490
492
 
491
493
  this.beforeFn(this.beforeRatify, () => {
492
494
  axios.post('/bems/activiti/admin/todo/advance', this.getParam()).then(({ data }) => {
493
- this.thenMsg(data, $lc('批准'))
495
+ this.thenMsg(
496
+ data,
497
+ this.authList.includes('byAddTask') && this.addTaskList.length > 0 ? $lc('加签') : $lc('批准')
498
+ )
494
499
  })
495
500
  })
496
501
  },
@@ -87,6 +87,7 @@
87
87
  :msg-type="null"
88
88
  :show-clear="false"
89
89
  :action="action"
90
+ :multiple="multiple"
90
91
  :headers="headers"
91
92
  :disabled="!row[keys.type] || row._typeDisabled"
92
93
  :accept="row[keys.type] | acceptFilter(typeOptions, fileAccept)"
@@ -94,7 +95,12 @@
94
95
  :http-request="uploadHttpRequest ? (options) => uploadHttpRequest(options, row) : undefined"
95
96
  :before-upload="(file) => beforeUploadFn(file, row)"
96
97
  :on-progress="(event) => onProgressFn(event, row)"
97
- :on-success="(response, file, fileList) => onSuccessFn(response, file, fileList, row)"
98
+ :on-success="
99
+ (response, file, fileList) =>
100
+ multiple
101
+ ? MultipleSUccessFn(response, file, fileList, row)
102
+ : onSuccessFn(response, file, fileList, row)
103
+ "
98
104
  :on-error="(err, file, fileList) => errorFn(err, file, fileList, row, $index)"
99
105
  />
100
106
  </slot>
@@ -243,7 +249,7 @@ import dayjs from 'dayjs'
243
249
  import axios from '../../utils/axios'
244
250
  import Upload from '../Upload/index.vue'
245
251
  import Dialog from '../Dialog/index.vue'
246
-
252
+ import cloneDeep from 'lodash/cloneDeep'
247
253
  import 'viewerjs/dist/viewer.css'
248
254
  import importG from '../../utils/importGlobal.js'
249
255
 
@@ -381,6 +387,9 @@ export default {
381
387
  },
382
388
  keys() {
383
389
  return this.dataPorp.keys || keysD
390
+ },
391
+ multiple() {
392
+ return this.dataPorp.multiple || false
384
393
  }
385
394
  },
386
395
  methods: {
@@ -532,7 +541,6 @@ export default {
532
541
  onSuccessFn(response, file, fileList, row) {
533
542
  this.$set(row, '_name', file.name)
534
543
  this.$set(row, '_percent', 100)
535
-
536
544
  row[this.keys.time] = dayjs().format('YYYY-MM-DD HH:mm:ss')
537
545
 
538
546
  row[this.keys.url] = response.data
@@ -542,6 +550,26 @@ export default {
542
550
 
543
551
  this.$emit('on-success', file, row)
544
552
  },
553
+ MultipleSUccessFn(response, file, fileList, row) {
554
+ if (fileList.length > 1) {
555
+ let deepRow = cloneDeep(row)
556
+ this.tableData.shift()
557
+ setTimeout(() => {
558
+ this.tableData.splice(0, 0, {
559
+ _name: file.name,
560
+ _percent: 100,
561
+ [this.keys.time]: dayjs().format('YYYY-MM-DD HH:mm:ss'),
562
+ [this.keys.url]: response.data,
563
+ [this.keys.name]: file.name,
564
+ _status: 'success',
565
+ [this.keys.user]: deepRow[this.keys.user],
566
+ [this.keys.type]: deepRow[this.keys.type]
567
+ })
568
+ }, 100)
569
+ } else {
570
+ this.onSuccessFn(response, file, fileList, row)
571
+ }
572
+ },
545
573
  errorFn(err, file, fileList, row, $index) {
546
574
  this.$set(row, '_status', 'exception')
547
575
 
@@ -187,8 +187,8 @@
187
187
  <i class="el-icon-caret-right m-l-auto m-r-0"></i>
188
188
  </div>
189
189
  <el-dropdown-menu slot="dropdown">
190
- <el-dropdown-item v-for="item in systemList" :key="item.id" @click.native="clickSystem(item)">
191
- <span>{{ item.systemName }}</span>
190
+ <el-dropdown-item v-for="(item, i) in systemList" :key="i" @click.native="clickSystem(item)">
191
+ <span>{{ item.NAME }}</span>
192
192
  </el-dropdown-item>
193
193
  </el-dropdown-menu>
194
194
  </el-dropdown>
@@ -404,14 +404,13 @@ export default {
404
404
  /**
405
405
  * 获取系统列表
406
406
  */
407
- async getSystemList() {
408
- const { data } = await axios.post(`/bems/portal/portalWidgetSystem/getAll`)
409
- this.systemList = data
407
+ getSystemList() {
408
+ this.systemList = JSON.parse(localStorage.getItem('SYSTEM_LIST'))
410
409
  },
411
410
  async getTreeList(item) {
412
411
  let { data } = await axios.get(`/bems/1.0/menuTree/tree?t=${Date.now()}`, {
413
412
  resType: 1,
414
- systemNo: item.systemCode
413
+ systemNo: item.NO
415
414
  })
416
415
  let layoutMenus = siteTree2menus(data || [])
417
416
  sessionStorage.setItem('menuTree', JSON.stringify(layoutMenus))
@@ -419,7 +418,7 @@ export default {
419
418
  async clickSystem(item) {
420
419
  await this.getTreeList(item)
421
420
  localStorage.setItem('pageInType', 'toFront')
422
- window.localStorage.setItem('pageInSystemNo', item.systemCode)
421
+ window.localStorage.setItem('pageInSystemNo', item.NO)
423
422
  let { base = '/' } = this.$router.options
424
423
  if (!/\/$/.test(base)) base += '/'
425
424
 
@@ -468,9 +468,13 @@ export default {
468
468
  }
469
469
  )
470
470
  .then((res) => {
471
+ this.loadingSub()
471
472
  this.loginAfter(res.data)
472
473
  })
473
- .catch(this.getImgCode)
474
+ .catch(() => {
475
+ this.loadingSub()
476
+ this.getImgCode()
477
+ })
474
478
 
475
479
  return
476
480
  }
@@ -487,6 +487,7 @@ export default {
487
487
  }
488
488
  })
489
489
  .finally(() => {
490
+ localStorage.setItem('SYSTEM_LIST', JSON.stringify(this.form.SYSTEM_LIST.filter((item) => item.OPEN)))
490
491
  resolve()
491
492
  })
492
493
  })
@@ -117,7 +117,7 @@ export default {
117
117
  let _this = this
118
118
  return {
119
119
  colsKey: 0,
120
- sizeC: _this.size,
120
+ sizeC: localStorage.getItem('table-size') || _this.size,
121
121
  sizeBind: undefined,
122
122
  key: 0
123
123
  }
@@ -64,6 +64,12 @@ export default {
64
64
  .work-card ::v-deep .el-badge__content {
65
65
  line-height: 14px;
66
66
  }
67
+ .work-card .el-badge__content.is-fixed {
68
+ position: absolute;
69
+ top: 0;
70
+ right: -1px;
71
+ transform: scale(0.7) translateY(-50%) translateX(100%);
72
+ }
67
73
 
68
74
  .work-card--empty-title {
69
75
  color: #cacaca;