n20-common-lib 3.1.13 → 3.1.15

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.
Files changed (34) hide show
  1. package/package.json +1 -2
  2. package/src/assets/css/_coreLib.scss +3 -0
  3. package/src/assets/css/element-variables.scss +4 -1
  4. package/src/assets/css/v3/footer.scss +22 -0
  5. package/src/assets/css/v3/header.scss +46 -0
  6. package/src/assets/css/v3/radioCard.scss +48 -0
  7. package/src/assets/css/v3/table.scss +8 -13
  8. package/src/components/v3/Footer/index.vue +37 -0
  9. package/src/components/v3/Header/index.vue +54 -0
  10. package/src/components/v3/RadioCard/components/Card.vue +48 -0
  11. package/src/components/v3/RadioCard/index.vue +42 -0
  12. package/src/components/v3/TablePro/index.vue +24 -2
  13. package/src/components/v3/UploadList/assets/37.svg +29 -0
  14. package/src/components/v3/UploadList/assets/46.svg +29 -0
  15. package/src/components/v3/UploadList/assets/60.svg +29 -0
  16. package/src/components/v3/UploadList/assets/Png.svg +34 -0
  17. package/src/components/v3/UploadList/assets/Txt.svg +29 -0
  18. package/src/components/v3/UploadList/assets/Zip.svg +21 -0
  19. package/src/components/v3/UploadList/assets/jytg.svg +6 -0
  20. package/src/components/v3/UploadList/assets/not.svg +29 -0
  21. package/src/components/v3/UploadList/assets/wsc.svg +3 -0
  22. package/src/components/v3/UploadList/assets/ysc.svg +3 -0
  23. package/src/components/v3/UploadList/components/aiCheckDialog.vue +141 -0
  24. package/src/components/{FileUploadTable/FileUploadTableV3.vue → v3/UploadList/index.vue} +53 -37
  25. package/src/index.js +11 -2
  26. package/style/index.css +1 -1
  27. package/theme/blue.css +1 -1
  28. package/theme/cctcRed.css +1 -1
  29. package/theme/green.css +1 -1
  30. package/theme/lightBlue.css +1 -1
  31. package/theme/orange.css +1 -1
  32. package/theme/purple.css +1 -1
  33. package/theme/red.css +1 -1
  34. package/theme/yellow.css +1 -1
@@ -0,0 +1,29 @@
1
+ <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_4435_91993)">
3
+ <path d="M17.5 5H71.3365L92.5 26.3423V85C92.5 90.5229 88.0229 95 82.5 95H17.5C11.9772 95 7.5 90.5229 7.5 85V15C7.5 9.47715 11.9772 5 17.5 5Z" fill="#D1D5DB"/>
4
+ <mask id="mask0_4435_91993" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="7" y="5" width="86" height="90">
5
+ <path d="M17.5 5H71.3365L92.5 26.3423V85C92.5 90.5229 88.0229 95 82.5 95H17.5C11.9772 95 7.5 90.5229 7.5 85V15C7.5 9.47715 11.9772 5 17.5 5Z" fill="white"/>
6
+ </mask>
7
+ <g mask="url(#mask0_4435_91993)">
8
+ <g filter="url(#filter0_d_4435_91993)">
9
+ <path d="M71.2602 16.3363L71.2602 4.9999L92.5001 26.3363L81.2602 26.3363C75.7374 26.3363 71.2602 21.8592 71.2602 16.3363Z" fill="black"/>
10
+ </g>
11
+ <path d="M71.2602 16.3363L71.2602 4.9999L92.5001 26.3363L81.2602 26.3363C75.7374 26.3363 71.2602 21.8592 71.2602 16.3363Z" fill="white" fill-opacity="0.92"/>
12
+ </g>
13
+ </g>
14
+ <defs>
15
+ <filter id="filter0_d_4435_91993" x="53.2603" y="-16" width="57.2397" height="57.3359" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
16
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
17
+ <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
18
+ <feOffset dy="-3"/>
19
+ <feGaussianBlur stdDeviation="9"/>
20
+ <feComposite in2="hardAlpha" operator="out"/>
21
+ <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"/>
22
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4435_91993"/>
23
+ <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4435_91993" result="shape"/>
24
+ </filter>
25
+ <clipPath id="clip0_4435_91993">
26
+ <rect width="100" height="100" fill="white"/>
27
+ </clipPath>
28
+ </defs>
29
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="design-iconfont">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M1.33334 7.99998C1.33334 4.31808 4.31811 1.33331 8.00001 1.33331C11.6819 1.33331 14.6667 4.31808 14.6667 7.99998C14.6667 11.6819 11.6819 14.6666 8.00001 14.6666C4.31811 14.6666 1.33334 11.6819 1.33334 7.99998ZM7.33335 10.6095L11.6381 6.30473L10.6953 5.36192L7.33335 8.72385L5.47142 6.86192L4.52862 7.80473L7.33335 10.6095Z" fill="#CCC"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="design-iconfont">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M1.33334 8.00004C1.33334 4.31814 4.31811 1.33337 8.00001 1.33337C11.6819 1.33337 14.6667 4.31814 14.6667 8.00004C14.6667 11.6819 11.6819 14.6667 8.00001 14.6667C4.31811 14.6667 1.33334 11.6819 1.33334 8.00004ZM7.33335 10.6095L11.6381 6.30479L10.6953 5.36198L7.33335 8.72391L5.47142 6.86198L4.52862 7.80479L7.33335 10.6095Z" fill="#48D2A0"/>
3
+ </svg>
@@ -0,0 +1,141 @@
1
+ <template>
2
+ <Dialog
3
+ v-drag
4
+ class="aiCheckDialog"
5
+ :title="'AI校验结果' | $lc"
6
+ :visible.sync="visibleP"
7
+ width="60%"
8
+ :close-on-click-modal="false"
9
+ @close="closeSee"
10
+ >
11
+ <Table :data="tableData" :columns="checkColumns" height="400px" :show-setsize="true" :cell-default="true">
12
+ <el-table-column slot="checkStatus" slot-scope="{ column }" v-bind="column">
13
+ <template slot-scope="{ row }">
14
+ <el-tag v-if="row.checkStatus === '0'" effect="dark" type="warning" size="mini">不通过</el-tag>
15
+ <el-tag v-if="row.checkStatus === '1'" effect="dark" type="success" size="mini">通过</el-tag>
16
+ </template>
17
+ </el-table-column>
18
+ <el-table-column slot="remark" slot-scope="{ column }" v-bind="column">
19
+ <template slot-scope="{ row }">
20
+ <el-input
21
+ v-model="row.remark"
22
+ placeholder="请输入"
23
+ size="normal"
24
+ clearable
25
+ :disabled="readonly || row.status === '1'"
26
+ />
27
+ </template>
28
+ </el-table-column>
29
+ </Table>
30
+ <div slot="footer" class="flex-box flex-c flex-v p-t-m" style="border-top: 1px solid var(--border-2, #e5e6eb)">
31
+ <el-button plain @click="cancel">取消</el-button>
32
+ <el-button v-if="!readonly" type="primary" @click="save">确定</el-button>
33
+ </div>
34
+ </Dialog>
35
+ </template>
36
+
37
+ <script>
38
+ import axios from '../../../../utils/axios.js'
39
+ import Dialog from '../../../Dialog/index.vue'
40
+ import Table from '../../../Table/index.vue'
41
+
42
+ export default {
43
+ name: 'AiCheckDialog',
44
+ components: { Dialog, Table },
45
+ props: {
46
+ apiPrefix: {
47
+ type: String,
48
+ default: undefined
49
+ },
50
+ readonly: {
51
+ type: Boolean,
52
+ default: false
53
+ }
54
+ },
55
+ data() {
56
+ return {
57
+ visibleP: false,
58
+ checkColumns: [
59
+ {
60
+ type: 'index',
61
+ label: '序号',
62
+ width: '56',
63
+ align: 'center',
64
+ static: 'pre'
65
+ },
66
+ {
67
+ label: '提示词',
68
+ prop: 'prompt',
69
+ align: 'center',
70
+ minWidth: '120',
71
+ checked: true, // 默认选择的,不能在设置"显示列"中取消的列
72
+ 'show-overflow-tooltip': true
73
+ },
74
+ {
75
+ label: 'AI识别结果',
76
+ prop: 'aiResult',
77
+ align: 'center',
78
+ minWidth: '120',
79
+ checked: true, // 默认选择的,不能在设置"显示列"中取消的列
80
+ 'show-overflow-tooltip': true
81
+ },
82
+ {
83
+ label: '校验结果',
84
+ prop: 'checkStatus',
85
+ slotName: 'checkStatus',
86
+ align: 'center',
87
+ minWidth: '120',
88
+ checked: true, // 默认选择的,不能在设置"显示列"中取消的列
89
+ 'show-overflow-tooltip': true
90
+ },
91
+ {
92
+ label: '说明',
93
+ prop: 'remark',
94
+ slotName: 'remark',
95
+ align: 'center',
96
+ minWidth: '120',
97
+ checked: true, // 默认选择的,不能在设置"显示列"中取消的列
98
+ 'show-overflow-tooltip': false
99
+ }
100
+ ],
101
+ tableData: [],
102
+ beid: ''
103
+ }
104
+ },
105
+ computed: {},
106
+ watch: {},
107
+ created() {},
108
+ mounted() {},
109
+ methods: {
110
+ cancel() {
111
+ this.visibleP = false
112
+ this.tableData = []
113
+ this.$emit('cancel', this.beid)
114
+ },
115
+ /** 通过 ref 外部调用 */
116
+ setView(list, beid) {
117
+ this.visibleP = true
118
+ this.tableData = list
119
+ this.beid = beid
120
+ },
121
+ async save() {
122
+ const list = this.tableData.map((item) => {
123
+ item.beid = this.beid
124
+ item.status = '1'
125
+ return item
126
+ })
127
+ const { code } = await axios.post(
128
+ this.apiPrefix ? `${this.apiPrefix}/neams/ai/saveAiBussResult` : `/neams/ai/saveAiBussResult`,
129
+ list
130
+ )
131
+ if (code === 200) {
132
+ this.$message.success('保存成功')
133
+ this.visibleP = false
134
+ }
135
+ },
136
+ closeSee() {
137
+ this.tableData = []
138
+ }
139
+ }
140
+ }
141
+ </script>
@@ -7,7 +7,7 @@
7
7
  <span>{{ uploadedCount }} 个附件</span>
8
8
  <el-button type="text" class="summary-action v3-icon-download" @click="downRows">全部下载</el-button>
9
9
  </div>
10
- <el-button type="text" class="toggle-btn" @click="toggleCollapse">
10
+ <el-button v-if="!readonly" type="text" class="toggle-btn" @click="toggleCollapse">
11
11
  {{ showAllTypes ? '收起未传类型' : '展开全部' }}
12
12
  <i :class="['el-icon-arrow-down', { 'is-reverse': showAllTypes }]"></i>
13
13
  </el-button>
@@ -15,14 +15,25 @@
15
15
 
16
16
  <div class="type-list">
17
17
  <div v-for="(group, index) in displayTypeGroups" :key="group.typeValue || index" class="type-item">
18
- <div class="type-row" :class="[{ 'type-row__is-success': getTypeStatus(group.typeValue) === 'success' }]">
18
+ <div
19
+ class="type-row"
20
+ :class="[{ 'type-row__is-success': getTypeStatus(group.typeValue) === 'success' && !readonly }]"
21
+ >
19
22
  <div class="type-meta">
20
23
  <span v-if="isRequiredType(group.item)" class="required">*</span>
21
- <span class="type-index">{{ index + 1 }}、</span>
24
+ <span class="type-index">{{ readonly ? index + 1 : group.item.no }}、</span>
22
25
  <span class="type-name">{{ group.item[typeMap.label] }}</span>
23
- <img v-if="getTypeStatus(group.typeValue) === 'success'" src="./ysc.svg" class="status-icon" />
24
- <img v-else-if="getTypeStatus(group.typeValue) === 'warning'" src="./jytg.svg" class="status-icon" />
25
- <img v-else src="./wsc.svg" class="status-icon" />
26
+ <img
27
+ v-if="!readonly && getTypeStatus(group.typeValue) === 'success'"
28
+ src="./assets/ysc.svg"
29
+ class="status-icon"
30
+ />
31
+ <img
32
+ v-else-if="getTypeStatus(group.typeValue) === 'warning'"
33
+ src="./assets/jytg.svg"
34
+ class="status-icon"
35
+ />
36
+ <img v-else-if="!readonly" src="./assets/wsc.svg" class="status-icon" />
26
37
  </div>
27
38
 
28
39
  <Upload
@@ -53,32 +64,36 @@
53
64
  <div v-if="group.rows.length" class="file-cards">
54
65
  <div v-for="(row, rowIndex) in group.rows" :key="`${group.typeValue}-${rowIndex}`" class="file-card">
55
66
  <div class="file-info">
56
- <img v-if="matchFileExtension(row[keys.name], ['word', 'doc', 'docx'])" src="./46.svg" class="m-r-s" />
67
+ <img
68
+ v-if="matchFileExtension(row[keys.name], ['word', 'doc', 'docx'])"
69
+ src="./assets/46.svg"
70
+ class="m-r-s"
71
+ />
57
72
  <img
58
73
  v-else-if="matchFileExtension(row[keys.name], ['xlsx', 'xls', 'csv'])"
59
- src="./60.svg"
74
+ src="./assets/60.svg"
60
75
  class="m-r-s"
61
76
  />
62
- <img v-else-if="matchFileExtension(row[keys.name], ['pdf'])" src="./37.svg" class="m-r-s" />
77
+ <img v-else-if="matchFileExtension(row[keys.name], ['pdf'])" src="./assets/37.svg" class="m-r-s" />
63
78
  <img
64
- style="width: 36px; height: 36px"
65
79
  v-else-if="matchFileExtension(row[keys.name], ['png', 'jpg', 'jpeg', 'gif'])"
66
- src="./Png.svg"
80
+ style="width: 36px; height: 36px"
81
+ src="./assets/Png.svg"
67
82
  class="m-r-s"
68
83
  />
69
84
  <img
70
- style="width: 36px; height: 36px"
71
85
  v-else-if="matchFileExtension(row[keys.name], ['zip', 'rar'])"
72
- src="./Zip.svg"
86
+ style="width: 36px; height: 36px"
87
+ src="./assets/Zip.svg"
73
88
  class="m-r-s"
74
89
  />
75
90
  <img
76
- style="width: 36px; height: 36px"
77
91
  v-else-if="matchFileExtension(row[keys.name], ['txt', 'md', 'log'])"
78
- src="./Txt.svg"
92
+ style="width: 36px; height: 36px"
93
+ src="./assets/Txt.svg"
79
94
  class="m-r-s"
80
95
  />
81
- <img style="width: 36px; height: 36px" v-else src="./not.svg" class="m-r-s" />
96
+ <img v-else style="width: 36px; height: 36px" src="./assets/not.svg" class="m-r-s" />
82
97
  <div>
83
98
  <div class="file-name" :title="row[keys.name]">{{ row[keys.name] }}</div>
84
99
  <div class="file-meta">
@@ -88,8 +103,8 @@
88
103
  </div>
89
104
  </div>
90
105
  <div class="flex-box">
91
- <div class="file-ai__card" v-if="AICheck && !readonly" @click="AiCheck(row)">
92
- <img class="file-ai_icon" src="./jytg.svg" alt="" />
106
+ <div v-if="AICheck && !readonly" class="file-ai__card" @click="AiCheck(row)">
107
+ <img class="file-ai_icon" src="./assets/jytg.svg" alt="" />
93
108
  <span class="file-ai_check">{{ $lc('AI 校验') }}</span>
94
109
  </div>
95
110
  <div class="file-actions">
@@ -132,7 +147,7 @@
132
147
  >
133
148
  <div class="flex-column flex-c flex-v" style="height: 100%">
134
149
  <i class="el-icon-s-release" style="font-size: 60px; color: #999"></i>
135
- <span style="margin-top: 16px">
150
+ <span style="margin-top: 16px; display: flex">
136
151
  {{ '不支持在线预览,请' | $lc
137
152
  }}<el-link type="primary" class="color-primary" @click="downFile(seeRow)">{{ '下载' | $lc }}</el-link>
138
153
  {{ '到本地查看' | $lc }}
@@ -148,16 +163,17 @@
148
163
  <script>
149
164
  import _axios from 'axios'
150
165
  import dayjs from 'dayjs'
166
+ import 'viewerjs/dist/viewer.css'
151
167
  import XEUtils from 'xe-utils'
152
- import auth from '../../utils/auth.js'
153
- import axios from '../../utils/axios.js'
154
- import { $lc } from '../../utils/i18n/index'
155
- import importG from '../../utils/importGlobal.js'
156
- import Dialog from '../Dialog/index.vue'
157
- import Upload from '../Upload/index.vue'
158
- import aiCheckDialog from './aiCheckDialog.vue'
159
168
 
160
- import 'viewerjs/dist/viewer.css'
169
+ import aiCheckDialog from './components/aiCheckDialog.vue'
170
+
171
+ import auth from '../../../utils/auth.js'
172
+ import axios from '../../../utils/axios.js'
173
+ import { $lc } from '../../../utils/i18n/index'
174
+ import importG from '../../../utils/importGlobal.js'
175
+ import Dialog from '../../Dialog/index.vue'
176
+ import Upload from '../../Upload/index.vue'
161
177
 
162
178
  const ViewerImg = async function () {
163
179
  let { component } = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
@@ -174,7 +190,7 @@ const keysDefault = {
174
190
  }
175
191
 
176
192
  export default {
177
- name: 'FileUploadTableV3',
193
+ name: 'UploadList',
178
194
  components: {
179
195
  Upload,
180
196
  Dialog,
@@ -286,7 +302,7 @@ export default {
286
302
  return this.dataProp.fileData || undefined
287
303
  },
288
304
  typeOptions() {
289
- return this.dataProp.typeOptions
305
+ return this.dataProp.typeOptions.map((item, index) => ({ no: index + 1, ...item })) ?? []
290
306
  },
291
307
  keys() {
292
308
  return this.dataProp.keys || keysDefault
@@ -311,15 +327,15 @@ export default {
311
327
  })
312
328
  return map
313
329
  },
314
- displayTypeOptions() {
315
- if (this.showAllTypes) return this.typeOptions
316
- return (this.typeOptions || []).filter((item) => {
317
- const typeValue = item[this.typeMap.value]
318
- return (this.typeRowsMap[typeValue] || []).length > 0
319
- })
320
- },
321
330
  displayTypeGroups() {
322
- return (this.displayTypeOptions || []).map((item) => {
331
+ const options =
332
+ this.showAllTypes && !this.readonly
333
+ ? this.typeOptions
334
+ : this.typeOptions.filter((item) => {
335
+ const typeValue = item[this.typeMap.value]
336
+ return (this.typeRowsMap[typeValue] || []).length > 0
337
+ })
338
+ return options.map((item) => {
323
339
  const typeValue = item[this.typeMap.value]
324
340
  return {
325
341
  item,
package/src/index.js CHANGED
@@ -74,7 +74,6 @@ import Expandable from './components/Expandable/index.vue'
74
74
  import ExpandablePane from './components/Expandable/main.vue'
75
75
  import FileExportAsync from './components/FileExportAsync/index.vue'
76
76
  import FileImport from './components/FileImport/index.vue'
77
- import FileUploadTableV3 from './components/FileUploadTable/FileUploadTableV3.vue'
78
77
  import FileUploadTable from './components/FileUploadTable/index.vue'
79
78
  import Filters from './components/Filters/index.vue'
80
79
  import FiltersO from './components/Filters/indexO.vue'
@@ -125,10 +124,14 @@ import TimePicker from './components/TimePicker/index.vue'
125
124
  import Tree from './components/Tree/index.vue'
126
125
  import Upload from './components/Upload/index.vue'
127
126
  import UploadMsg from './components/Upload/uploadMsg.vue'
127
+ import Footer from './components/v3/Footer/index.vue'
128
+ import Header from './components/v3/Header/index.vue'
129
+ import RadioCard from './components/v3/RadioCard/index.vue'
128
130
  import SecondaryTabV3 from './components/v3/SecondaryTab/index.vue'
129
131
 
130
132
  /* v3组件*/
131
133
  import tableProV3 from './components/v3/TablePro/index.vue'
134
+ import FileUploadTableV3 from './components/v3/UploadList/index.vue'
132
135
  import ViewToggle from './components/ViewToggle/index.vue'
133
136
  import WorkCard from './components/WorkCard/index.vue'
134
137
  import WornPagination from './components/WornPagination/index.vue'
@@ -281,7 +284,10 @@ const components = [
281
284
  operatingStatus,
282
285
  /* v3组件*/
283
286
  tableProV3,
284
- SecondaryTabV3
287
+ SecondaryTabV3,
288
+ Header,
289
+ Footer,
290
+ RadioCard
285
291
  ]
286
292
 
287
293
  const install = function (Vue, opts = { prefix: 'Cl', i18nConfig: {} }) {
@@ -428,6 +434,9 @@ export {
428
434
  /* v3组件*/
429
435
  tableProV3,
430
436
  SecondaryTabV3,
437
+ Header,
438
+ Footer,
439
+ RadioCard,
431
440
  asyncGetRelaNos,
432
441
  // 方法
433
442
  auth,