n20-common-lib 2.14.17 → 2.14.19

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.14.17",
3
+ "version": "2.14.19",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -176,7 +176,7 @@
176
176
  <div v-if="row.resultName !== '撤回' || showCtdMsg">
177
177
  <div v-if="row.suggestion" class="n20-description-c n20-description-bgc m-t p-a-s">
178
178
  <span v-if="row.result !== status.waiting">{{ '审批意见:' | $lc }}</span>
179
- <span>{{ row.suggestion }} </span>
179
+ <span style="line-height: 22px">{{ row.suggestion }} </span>
180
180
  </div>
181
181
  <div
182
182
  v-if="row.flowHistoryCfgs && row.flowHistoryCfgs.length"
@@ -202,7 +202,7 @@
202
202
  </div>
203
203
  <div v-if="!item.subProcInitId && item.suggestion" class="n20-description-c n20-description-bgc m-t p-a-s">
204
204
  <span v-if="item.result !== status.waiting">{{ '审批意见:' | $lc }}</span>
205
- <span>{{ item.suggestion }} </span>
205
+ <span style="line-height: 22px">{{ item.suggestion }} </span>
206
206
  </div>
207
207
  <div v-if="item.flowHistoryCfgs && item.flowHistoryCfgs.length" class="n20-description-c m-t p-a-s">
208
208
  <span
@@ -49,22 +49,24 @@
49
49
  <slot slot="header" slot-scope="scope" name="type-header" :column="scope.column">{{ '附件类型' | $lc }}</slot>
50
50
  <slot slot-scope="{ row }" name="type" :row="row">
51
51
  <span v-if="readonly">{{ row[keys.type] | typeFiter(typeOptions) }}</span>
52
- <el-select
53
- v-else
54
- v-model="row[keys.type]"
55
- :disabled="row._typeDisabled"
56
- :placeholder="'请选择' | $lc"
57
- style="width: 100%"
58
- @change="$emit('typeChange', row[keys.type])"
59
- >
60
- <el-option
61
- v-for="item in typeOptions"
62
- :key="item.type"
63
- :disabled="item.disabled"
64
- :value="item.type"
65
- :label="item.label"
66
- />
67
- </el-select>
52
+ <div v-else class="flex-box flex-v">
53
+ <span v-if="requiredTypes.includes(row[keys.type])" style="color: red" class="m-r-s">*</span>
54
+ <el-select
55
+ v-model="row[keys.type]"
56
+ :disabled="row._typeDisabled"
57
+ :placeholder="'请选择' | $lc"
58
+ style="width: calc(100% - 16px)"
59
+ @change="$emit('typeChange', row[keys.type])"
60
+ >
61
+ <el-option
62
+ v-for="item in typeOptions"
63
+ :key="item.type"
64
+ :disabled="item.disabled"
65
+ :value="item.type"
66
+ :label="item.label"
67
+ />
68
+ </el-select>
69
+ </div>
68
70
  </slot>
69
71
  </el-table-column>
70
72
  <el-table-column :label="'附件名称' | $lc" :prop="keys.name">
@@ -434,6 +436,10 @@ export default {
434
436
  }
435
437
 
436
438
  return {
439
+ // 是否仅平铺必选附件
440
+ fileRequired: true,
441
+ // 必传附件
442
+ requiredTypes: [],
437
443
  fileText: '',
438
444
  bathType: '',
439
445
  indexK: '$index',
@@ -473,6 +479,25 @@ export default {
473
479
  return this.dataPorp.multiple ?? true
474
480
  }
475
481
  },
482
+ watch: {
483
+ dataPorp: {
484
+ handler() {
485
+ this.requiredTypes = this.dataPorp.typeOptions
486
+ .filter((item) => {
487
+ return item.required === 1
488
+ })
489
+ .map((item) => {
490
+ return item.attno
491
+ })
492
+ if (this.dataPorp.typeOptions.length === 0) {
493
+ return false
494
+ }
495
+ this.setTableData()
496
+ },
497
+ immediate: true,
498
+ deep: true
499
+ }
500
+ },
476
501
  mounted() {
477
502
  this.getConfiguration()
478
503
  },
@@ -495,13 +520,41 @@ export default {
495
520
  this.$emit('aiFn', data)
496
521
  }
497
522
  },
523
+ // 平铺附件
524
+ setTableData() {
525
+ if (this.tableData.length === 0) {
526
+ this.dataPorp.typeOptions
527
+ .filter((item) => {
528
+ if (this.fileRequired) {
529
+ return item.required === 1
530
+ } else {
531
+ return item.required === 1 || item.required === 0
532
+ }
533
+ })
534
+ .forEach((item) => {
535
+ let obj
536
+ obj = {
537
+ id: 'n' + Math.random(),
538
+ name: ''
539
+ }
540
+ obj[this.keys.type] = item.attno
541
+ obj[this.keys.time] = ''
542
+ obj[this.keys.user] = JSON.parse(sessionStorage.getItem('userInfo')).uname
543
+
544
+ console.log(obj)
545
+ this.tableData.push(obj)
546
+ })
547
+ }
548
+ },
498
549
  getConfiguration() {
499
550
  getJsonc('portal/server-config.jsonc', null, true)
500
551
  .then(({ loginConf }) => {
501
552
  this.fileText = loginConf?.sLogan?.fileText
553
+ this.fileRequired = loginConf?.fileRequired
502
554
  })
503
555
  .catch(() => {
504
556
  this.fileText = ''
557
+ this.fileRequired = true
505
558
  })
506
559
  },
507
560
  async getOfficeStatus() {