n20-common-lib 3.0.85 → 3.0.87
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 +1 -1
- package/src/assets/css/table.scss +11 -0
- package/src/assets/css/v3/table.scss +19 -0
- package/src/components/ApprovalButtons/index.vue +42 -23
- package/src/components/ApprovalButtons/selectSpr.vue +15 -0
- package/src/components/ApprovalButtons/showAppOpi.vue +5 -1
- package/src/components/ApprovalButtons/showOtherAttrNew.vue +40 -41
- package/src/components/ApprovalCard/index.vue +21 -5
- package/src/components/ApprovalRecord/approvalImgPro/index.vue +23 -3
- package/src/components/ApprovalRecord/index.vue +7 -2
- package/src/components/FileUploadTable/index.vue +4 -3
- package/src/components/HandlingAdvice/index.vue +97 -70
- package/src/components/InputNumber/README.md +112 -0
- package/src/components/TablePro/index.vue +12 -1
- package/src/components/TableProOperateColumn/OperateBtns.vue +25 -5
- package/src/components/TableProOperateColumn/childrenOperateBtn.vue +83 -25
- package/src/components/Tabs/index.vue +3 -3
- package/src/components/TertiaryTab/index.vue +2 -2
- package/src/components/Upload/uploadMsg.vue +2 -0
- package/src/components/v3/SecondaryTab/index.vue +3 -3
- package/src/components/v3/TablePro/index.js +14 -46
- package/src/components/v3/TablePro/index.vue +43 -8
- package/src/index.js +3 -0
- package/src/plugins/Sign/signV3/InfosecNetSignCNGAgent.min.js +4112 -1
- package/src/plugins/Sign/signV3/sign.js +23 -11
- package/style/index.css +1 -1
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
- package/src/assets/css/table copy.scss +0 -234
|
@@ -25,24 +25,23 @@ function flattenObject(obj, prefix = '', result = {}) {
|
|
|
25
25
|
return result
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
vxeTable.setConfig({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})
|
|
28
|
+
// vxeTable.setConfig({
|
|
29
|
+
// size: 'small',
|
|
30
|
+
// table: {
|
|
31
|
+
// align: 'center',
|
|
32
|
+
// columnConfig: {
|
|
33
|
+
// resizable: true
|
|
34
|
+
// }
|
|
35
|
+
// },
|
|
36
|
+
// // 对组件内置的提示语进行国际化翻译
|
|
37
|
+
// i18n: (key, args) => {
|
|
38
|
+
// return $lc(flattenObject(zhCN) && flattenObject(zhCN)[key])
|
|
39
|
+
// }
|
|
40
|
+
// })
|
|
41
41
|
// 创建一个简单的输入框筛选
|
|
42
42
|
vxeTable.renderer.add('FilterInput', {
|
|
43
43
|
// 筛选模板
|
|
44
44
|
renderFilter(h, renderOpts, params) {
|
|
45
|
-
console.log(h, renderOpts, params, 123)
|
|
46
45
|
return <filterContent params={params}></filterContent>
|
|
47
46
|
},
|
|
48
47
|
// 不显示底部按钮,使用自定义的按钮
|
|
@@ -67,11 +66,6 @@ vxeTable.renderer.add('FilterInput', {
|
|
|
67
66
|
return false
|
|
68
67
|
}
|
|
69
68
|
})
|
|
70
|
-
vxeTable.renderer.add('customHeader', {
|
|
71
|
-
renderTableHeader(renderOpts, params) {
|
|
72
|
-
console.log(renderOpts, params, 123)
|
|
73
|
-
}
|
|
74
|
-
})
|
|
75
69
|
|
|
76
70
|
// 自定义全局的格式化处理函数
|
|
77
71
|
vxeTable.formats.mixin({
|
|
@@ -127,33 +121,7 @@ vxeTable.formats.mixin({
|
|
|
127
121
|
}
|
|
128
122
|
}
|
|
129
123
|
})
|
|
130
|
-
|
|
131
|
-
/* vxeTable.renderer.add('FilterInput', {
|
|
132
|
-
// 筛选模板
|
|
133
|
-
renderFilter(h, renderOpts, params) {
|
|
134
|
-
const { data } = params
|
|
135
|
-
return <el-input v-model='data' placeholder='' size='mini'></el-input>
|
|
136
|
-
},
|
|
137
|
-
// 重置数据方法
|
|
138
|
-
filterResetMethod({ options }) {
|
|
139
|
-
options.forEach((option) => {
|
|
140
|
-
option.data = ''
|
|
141
|
-
})
|
|
142
|
-
},
|
|
143
|
-
// 重置筛选复原方法(当未点击确认时,该选项将被恢复为默认值)
|
|
144
|
-
filterRecoverMethod({ option }) {
|
|
145
|
-
option.data = ''
|
|
146
|
-
},
|
|
147
|
-
// 筛选方法
|
|
148
|
-
filterMethod({ option, row, column }) {
|
|
149
|
-
const { data } = option
|
|
150
|
-
const cellValue = row[column.property]
|
|
151
|
-
if (cellValue) {
|
|
152
|
-
return cellValue.indexOf(data) > -1
|
|
153
|
-
}
|
|
154
|
-
return false
|
|
155
|
-
}
|
|
156
|
-
}) */
|
|
124
|
+
|
|
157
125
|
function install(Vue) {
|
|
158
126
|
Vue.use(vxeTable)
|
|
159
127
|
}
|
|
@@ -252,14 +252,16 @@
|
|
|
252
252
|
</div>
|
|
253
253
|
</template>
|
|
254
254
|
<!-- 处理旧格式 formatter 和 render -->
|
|
255
|
-
<template #default="{ row, column }">
|
|
255
|
+
<template v-if="item.type !== 'seq'" #default="{ row, column }">
|
|
256
256
|
<!-- 纯对象字段 -->
|
|
257
257
|
<template
|
|
258
258
|
v-if="row[column.property] && typeof row[column.property] === 'object' && row[column.property].name"
|
|
259
259
|
>
|
|
260
260
|
{{ row[column.property].name }}
|
|
261
261
|
</template>
|
|
262
|
-
<slot v-else :name="`cell_${item.prop}`" :row="row">{{
|
|
262
|
+
<slot v-else :name="`cell_${item.prop}`" :row="row">{{
|
|
263
|
+
row[column.property] || row[column.property] === 0 ? row[column.property] : '--'
|
|
264
|
+
}}</slot>
|
|
263
265
|
</template>
|
|
264
266
|
</vxe-column>
|
|
265
267
|
</template>
|
|
@@ -318,11 +320,19 @@
|
|
|
318
320
|
:type="btn.type || 'primary'"
|
|
319
321
|
:size="btn.size || 'mini'"
|
|
320
322
|
:icon="btn.icon"
|
|
321
|
-
:disabled="btn
|
|
323
|
+
:disabled="resolveDisabled(btn)"
|
|
322
324
|
:class="[btn.class]"
|
|
323
325
|
@click.stop="handleHoverBtnClick(btn, $event)"
|
|
324
326
|
>
|
|
325
|
-
|
|
327
|
+
<el-badge
|
|
328
|
+
v-if="resolveBadge(btn)"
|
|
329
|
+
:value="resolveBadge(btn)"
|
|
330
|
+
:max="btn.badgeMax || 99"
|
|
331
|
+
class="hover-btn-badge"
|
|
332
|
+
>
|
|
333
|
+
{{ btn.label }}
|
|
334
|
+
</el-badge>
|
|
335
|
+
<template v-else>{{ btn.label }}</template>
|
|
326
336
|
</el-button>
|
|
327
337
|
<!-- 更多按钮下拉菜单 -->
|
|
328
338
|
<el-dropdown
|
|
@@ -339,9 +349,14 @@
|
|
|
339
349
|
v-for="(btn, idx) in moreHoverBtns"
|
|
340
350
|
:key="'more-' + idx"
|
|
341
351
|
:command="btn"
|
|
342
|
-
:disabled="btn
|
|
352
|
+
:disabled="resolveDisabled(btn)"
|
|
343
353
|
>
|
|
344
|
-
<
|
|
354
|
+
<el-badge v-if="resolveBadge(btn)" :value="resolveBadge(btn)" :max="btn.badgeMax || 99">
|
|
355
|
+
<span :class="btn.type === 'danger' ? 'color-danger' : ''">
|
|
356
|
+
{{ btn.label }}
|
|
357
|
+
</span>
|
|
358
|
+
</el-badge>
|
|
359
|
+
<span v-else :class="btn.type === 'danger' ? 'color-danger' : ''">
|
|
345
360
|
{{ btn.label }}
|
|
346
361
|
</span>
|
|
347
362
|
</el-dropdown-item>
|
|
@@ -771,6 +786,26 @@ export default {
|
|
|
771
786
|
return isHas(row)
|
|
772
787
|
}
|
|
773
788
|
},
|
|
789
|
+
// 解析 badge 值,支持 number、string、function
|
|
790
|
+
resolveBadge(btn) {
|
|
791
|
+
if (!btn.badge) return null
|
|
792
|
+
if (typeof btn.badge === 'function') {
|
|
793
|
+
const val = btn.badge(this.hoverRowData)
|
|
794
|
+
return val || val === 0 ? val : null
|
|
795
|
+
}
|
|
796
|
+
return btn.badge
|
|
797
|
+
},
|
|
798
|
+
// 解析 disabled 值,支持 boolean 和 function
|
|
799
|
+
resolveDisabled(btn) {
|
|
800
|
+
if (btn.disabled === undefined || btn.disabled === null) {
|
|
801
|
+
return false
|
|
802
|
+
} else if (typeof btn.disabled === 'boolean') {
|
|
803
|
+
return btn.disabled
|
|
804
|
+
} else if (typeof btn.disabled === 'function') {
|
|
805
|
+
return btn.disabled(this.hoverRowData)
|
|
806
|
+
}
|
|
807
|
+
return false
|
|
808
|
+
},
|
|
774
809
|
// 全选/反选
|
|
775
810
|
toggleAllSelection() {
|
|
776
811
|
if (!this.$refs.vxeTable) return
|
|
@@ -1156,7 +1191,7 @@ export default {
|
|
|
1156
1191
|
},
|
|
1157
1192
|
// 处理悬浮按钮点击
|
|
1158
1193
|
handleHoverBtnClick(btn, $event) {
|
|
1159
|
-
if (btn
|
|
1194
|
+
if (this.resolveDisabled(btn)) return
|
|
1160
1195
|
|
|
1161
1196
|
if (typeof btn.command === 'function') {
|
|
1162
1197
|
btn.command(this.hoverRowData, this.hoverRowIndex, $event)
|
|
@@ -1173,7 +1208,7 @@ export default {
|
|
|
1173
1208
|
},
|
|
1174
1209
|
// 处理"更多"下拉菜单命令
|
|
1175
1210
|
handleMoreBtnCommand(btn) {
|
|
1176
|
-
if (!btn || btn
|
|
1211
|
+
if (!btn || this.resolveDisabled(btn)) return
|
|
1177
1212
|
this.handleHoverBtnClick(btn, null)
|
|
1178
1213
|
},
|
|
1179
1214
|
// 表格滚动时隐藏按钮组
|
package/src/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import ProFilterView from './components/ProFilterView/index.vue'
|
|
|
6
6
|
import AnchorItem from './components/Anchor/AnchorItem.vue'
|
|
7
7
|
import Anchor from './components/Anchor/index.vue'
|
|
8
8
|
import ApprovalButtons from './components/ApprovalButtons/index.vue'
|
|
9
|
+
import ShowAppOpi from './components/ApprovalButtons/showAppOpi.vue'
|
|
9
10
|
import ApproveCard from './components/ApprovalCard/ApproveCard.vue'
|
|
10
11
|
import ApprovalCard from './components/ApprovalCard/index.vue'
|
|
11
12
|
import ApprovalImg from './components/ApprovalRecord/approvalImg.vue'
|
|
@@ -190,6 +191,7 @@ const components = [
|
|
|
190
191
|
ApproveCard,
|
|
191
192
|
ApprovalRecord,
|
|
192
193
|
ApprovalButtons,
|
|
194
|
+
ShowAppOpi,
|
|
193
195
|
Expandable,
|
|
194
196
|
ExpandablePane,
|
|
195
197
|
Empty,
|
|
@@ -315,6 +317,7 @@ export {
|
|
|
315
317
|
Anchor,
|
|
316
318
|
AnchorItem,
|
|
317
319
|
ApprovalButtons,
|
|
320
|
+
ShowAppOpi,
|
|
318
321
|
ApprovalCard,
|
|
319
322
|
/* 中建科 */
|
|
320
323
|
ApprovalCardZjk,
|