n20-common-lib 2.4.5 → 2.4.7
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/README.md +1 -1
- package/nstc-g6/components/Calendar/index.js +5 -5
- package/nstc-g6/components/Calendar/src/basic/month-table.vue +12 -20
- package/nstc-g6/components/Calendar/src/basic/year-table.vue +18 -22
- package/nstc-g6/components/Calendar/src/main.vue +1 -5
- package/nstc-g6/components/DialogForm/index.js +5 -5
- package/nstc-g6/components/DialogForm/src/demo/index.vue +18 -27
- package/nstc-g6/components/DialogForm/src/main.vue +15 -21
- package/nstc-g6/components/Form/A_DEMO/component/originalForm.vue +35 -50
- package/nstc-g6/components/Form/A_DEMO/config/config_3.js +1115 -1110
- package/nstc-g6/components/Form/A_DEMO/index.vue +7 -29
- package/nstc-g6/components/Form/AutocompleteCustom/index.vue +3 -5
- package/nstc-g6/components/Form/BusinessSpecific/InputMultiple.vue +60 -62
- package/nstc-g6/components/Form/BusinessSpecific/InputWithUnit.vue +12 -35
- package/nstc-g6/components/Form/BusinessSpecific/SelectTreeDialog.vue +77 -77
- package/nstc-g6/components/Form/CascaderCustom/index.vue +4 -4
- package/nstc-g6/components/Form/CheckboxCustom/index.vue +5 -11
- package/nstc-g6/components/Form/Component.vue +56 -78
- package/nstc-g6/components/Form/ComponentSecond.vue +55 -77
- package/nstc-g6/components/Form/InputAndDialog/index.js +5 -5
- package/nstc-g6/components/Form/InputAndDialog/src/main.vue +130 -153
- package/nstc-g6/components/Form/InputCustom/demo/index.vue +4 -12
- package/nstc-g6/components/Form/InputCustom/index.vue +51 -54
- package/nstc-g6/components/Form/IntervalinputCustom/demo/index.vue +1 -3
- package/nstc-g6/components/Form/IntervalinputCustom/index.vue +19 -41
- package/nstc-g6/components/Form/Item.vue +15 -30
- package/nstc-g6/components/Form/ItemSecond.vue +7 -22
- package/nstc-g6/components/Form/List.vue +12 -28
- package/nstc-g6/components/Form/ListSecond.vue +11 -27
- package/nstc-g6/components/Form/RadioCustom/index.vue +5 -23
- package/nstc-g6/components/Form/SelectAccount/index.js +5 -5
- package/nstc-g6/components/Form/SelectAccount/src/demo/index.vue +34 -28
- package/nstc-g6/components/Form/SelectAccount/src/main.vue +112 -83
- package/nstc-g6/components/Form/SelectAndDialog/index.js +5 -5
- package/nstc-g6/components/Form/SelectAndDialog/src/main.vue +126 -149
- package/nstc-g6/components/Form/SelectCashFlow/index.js +5 -5
- package/nstc-g6/components/Form/SelectCashFlow/src/demo/index.vue +18 -19
- package/nstc-g6/components/Form/SelectCashFlow/src/main.vue +52 -41
- package/nstc-g6/components/Form/SelectCustom/demo/index.vue +14 -16
- package/nstc-g6/components/Form/SelectCustom/index.vue +129 -139
- package/nstc-g6/components/Form/SelectSubject/index.js +5 -5
- package/nstc-g6/components/Form/SelectSubject/src/demo/index.vue +42 -48
- package/nstc-g6/components/Form/SelectSubject/src/main.vue +83 -86
- package/nstc-g6/components/Form/SelectindialogCustom/demo/index.vue +34 -35
- package/nstc-g6/components/Form/SelectindialogCustom/index.vue +133 -148
- package/nstc-g6/components/Form/SelectindialogCustom/install.js +3 -3
- package/nstc-g6/components/Form/TableRadioCustom/demo/index.vue +1 -7
- package/nstc-g6/components/Form/TableRadioCustom/index.vue +17 -26
- package/nstc-g6/components/Form/TextCustom/index.vue +2 -2
- package/nstc-g6/components/Form/UploadCustom/demo/index.vue +1 -3
- package/nstc-g6/components/Form/UploadCustom/index.vue +143 -173
- package/nstc-g6/components/Form/configs.js +3 -14
- package/nstc-g6/components/Form/configsSecond.js +3 -16
- package/nstc-g6/components/Form/index.js +1 -1
- package/nstc-g6/components/Form/payeePersonSelect/index.js +5 -5
- package/nstc-g6/components/Form/payeePersonSelect/src/demo/index.vue +50 -44
- package/nstc-g6/components/Form/payeePersonSelect/src/main.vue +73 -82
- package/nstc-g6/components/FormGroup/index.js +5 -5
- package/nstc-g6/components/FormGroup/src/demo/config.js +18 -19
- package/nstc-g6/components/FormGroup/src/demo/index.vue +14 -22
- package/nstc-g6/components/FormGroup/src/main.vue +122 -141
- package/nstc-g6/components/FormGroup/src/validate.js +11 -13
- package/nstc-g6/components/InputTag/InputTag.vue +78 -111
- package/nstc-g6/components/NstcBackToTop/NstcBackToTop.vue +24 -24
- package/nstc-g6/components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +4 -13
- package/nstc-g6/components/NstcCharts/NstcCharts.vue +9 -18
- package/nstc-g6/components/NstcCharts/define.js +1 -6
- package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +6 -21
- package/nstc-g6/components/NstcConfirm/index.js +21 -19
- package/nstc-g6/components/NstcDialog/NstcDialog.vue +34 -38
- package/nstc-g6/components/NstcDialogForm/NstcDialogForm.vue +17 -21
- package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +4 -17
- package/nstc-g6/components/NstcDropdown/NstcDropdown.vue +2 -12
- package/nstc-g6/components/NstcDropdownTree/NstcDropdownTree.vue +3 -13
- package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +18 -78
- package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +121 -147
- package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +9 -31
- package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +10 -33
- package/nstc-g6/components/NstcExpandCollapse/NstcExpandCollapse.vue +12 -16
- package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +19 -75
- package/nstc-g6/components/NstcForm/A_DEMO/component/originalForm.vue +35 -50
- package/nstc-g6/components/NstcForm/A_DEMO/config/config_3.js +1115 -1110
- package/nstc-g6/components/NstcForm/A_DEMO/index.vue +340 -354
- package/nstc-g6/components/NstcForm/AutocompleteCustom/index.vue +2 -2
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputWithUnit.vue +11 -34
- package/nstc-g6/components/NstcForm/BusinessSpecific/SelectTreeDialog.vue +77 -77
- package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +5 -11
- package/nstc-g6/components/NstcForm/Component.vue +17 -62
- package/nstc-g6/components/NstcForm/ComponentSecond.vue +55 -77
- package/nstc-g6/components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +6 -24
- package/nstc-g6/components/NstcForm/InputCustom/index.vue +2 -8
- package/nstc-g6/components/NstcForm/IntervalInputCustom/index.vue +4 -21
- package/nstc-g6/components/NstcForm/Item.vue +3 -15
- package/nstc-g6/components/NstcForm/ItemSecond.vue +7 -22
- package/nstc-g6/components/NstcForm/List.vue +12 -28
- package/nstc-g6/components/NstcForm/ListSecond.vue +11 -27
- package/nstc-g6/components/NstcForm/RadioCustom/index.vue +5 -23
- package/nstc-g6/components/NstcForm/SelectAccount/NstcSelectAccount.vue +4 -24
- package/nstc-g6/components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +7 -30
- package/nstc-g6/components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue +50 -38
- package/nstc-g6/components/NstcForm/SelectCustom/index.vue +6 -16
- package/nstc-g6/components/NstcForm/SelectSubject/NstcSelectSubject.vue +72 -82
- package/nstc-g6/components/NstcForm/SelectindialogCustom/index.vue +6 -20
- package/nstc-g6/components/NstcForm/TableRadioCustom/index.vue +17 -26
- package/nstc-g6/components/NstcForm/TextCustom/index.vue +2 -2
- package/nstc-g6/components/NstcForm/UploadCustom/index.vue +13 -60
- package/nstc-g6/components/NstcForm/configs.js +3 -14
- package/nstc-g6/components/NstcForm/configsSecond.js +3 -16
- package/nstc-g6/components/NstcForm/index.js +1 -1
- package/nstc-g6/components/NstcForm/payeePersonSelect/NstcPayeePerson.vue +57 -73
- package/nstc-g6/components/NstcPagination/NstcPagination.vue +2 -12
- package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +2 -3
- package/nstc-g6/components/NstcSelectTree/NstcSelectTree.vue +4 -15
- package/nstc-g6/components/NstcSelectTreeList/NstcSelectTreeList.vue +5 -20
- package/nstc-g6/components/NstcSticky/NstcSticky.vue +10 -4
- package/nstc-g6/components/NstcSvgIcon/NstcSvgIcon.vue +1 -7
- package/nstc-g6/components/NstcTab/NstcTab.vue +8 -20
- package/nstc-g6/components/NstcTabWithBadge/NstcTabWithBadge.vue +7 -7
- package/nstc-g6/components/NstcTable/ElTableColumnCustom/index.vue +88 -126
- package/nstc-g6/components/NstcTable/NstcTable.vue +4 -17
- package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +27 -72
- package/nstc-g6/components/NstcThemePicker/NstcThemePicker.vue +13 -14
- package/nstc-g6/components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue +3 -13
- package/nstc-g6/components/NstcUploadExcel/NstcUploadExcel.vue +21 -22
- package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +4 -17
- package/nstc-g6/components/Search/NstcSearch.vue +12 -47
- package/nstc-g6/components/Search/src/demo/index copy.vue +28 -28
- package/nstc-g6/components/Search/src/demo/index.vue +36 -36
- package/nstc-g6/components/Search/src/main copy.vue +169 -204
- package/nstc-g6/components/approvelTwo/main.vue +2 -6
- package/nstc-g6/components/approvelTwo/progress.vue +7 -29
- package/nstc-g6/directives/VCopy/index.js +52 -54
- package/nstc-g6/directives/VNstcNumber/index.js +1 -1
- package/nstc-g6/directives/VNstcNumber/temp.js +357 -362
- package/nstc-g6/utils/mapper_aims.js +774 -775
- package/nstc-g6/utils/parseTime.js +38 -36
- package/nstc-g6/utils/validate/index.js +2 -2
- package/nstc-g6/utils/vendor/Export2Excel.js +110 -111
- package/nstc-g6/utils/vendor/Export2Zip.js +12 -7
- package/nstc-g6/utils/vue-bus.js +1 -1
- package/package.json +1 -1
- package/src/assets/iconFont/demo_index.html +1 -1
- package/src/assets/iconFont/iconfont.js +66 -1
- package/src/assets/iconFont2/demo_index.html +277 -286
- package/src/assets/iconFont2/iconfont.js +66 -1
- package/src/components/Button/button-group.vue +1 -1
- package/src/components/Layout/HeaderWrap/indexN.vue +1 -1
- package/src/components/Layout/indexN.vue +1 -2
- package/src/components/LoginTemporary/indexN.vue +12 -2
- package/src/components/TableOperateColumn/index.vue +1 -1
- package/src/plugins/Print/print-js/README.md +5 -5
- package/src/plugins/Print/print-js/package.json +2 -2
- package/src/plugins/Print/print-js/src/index.d.ts +36 -36
- package/src/plugins/Print/print-js/src/js/browser.js +3 -1
- package/src/plugins/Print/print-js/src/js/functions.js +16 -10
- package/src/plugins/Print/print-js/src/js/html.js +2 -2
- package/src/plugins/Print/print-js/src/js/image.js +1 -1
- package/src/plugins/Print/print-js/src/js/init.js +15 -7
- package/src/plugins/Print/print-js/src/js/json.js +14 -4
- package/src/plugins/Print/print-js/src/js/modal.js +16 -15
- package/src/plugins/Print/print-js/src/js/pdf.js +1 -1
- package/src/plugins/Print/print-js/src/js/print.js +6 -6
- package/src/plugins/Sign/NetSM3/InfosecNetSignCNGAgent.min.js +1825 -1592
- package/src/plugins/Sign/cfca/index.js +525 -520
- package/src/plugins/Sign/sign.js +128 -128
- package/style/index.css +1 -1
- package/style/index.css.map +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
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<div
|
|
38
38
|
:class="{
|
|
39
39
|
placeholder: true,
|
|
40
|
-
'placeholder-has-file': placeholderHasFile
|
|
40
|
+
'placeholder-has-file': placeholderHasFile
|
|
41
41
|
}"
|
|
42
42
|
>
|
|
43
43
|
{{ placeholderText || '请选择' }}
|
|
@@ -48,16 +48,10 @@
|
|
|
48
48
|
type="primary"
|
|
49
49
|
class="nstc-g6-common-btn-1 nstc-g6-common-btn-size-s"
|
|
50
50
|
@click="handleConfirmImportExcel"
|
|
51
|
-
:disabled="
|
|
52
|
-
excelData.tableData.length === 0 || confirmDisabledFlag
|
|
53
|
-
"
|
|
51
|
+
:disabled="excelData.tableData.length === 0 || confirmDisabledFlag"
|
|
54
52
|
>导入</el-button
|
|
55
53
|
>
|
|
56
|
-
<el-button
|
|
57
|
-
type="text"
|
|
58
|
-
style="margin-left: 20px"
|
|
59
|
-
@click="downloadTemplate"
|
|
60
|
-
:disabled="!templateUrl"
|
|
54
|
+
<el-button type="text" style="margin-left: 20px" @click="downloadTemplate" :disabled="!templateUrl"
|
|
61
55
|
>导入模板下载</el-button
|
|
62
56
|
>
|
|
63
57
|
</el-form-item>
|
|
@@ -70,9 +64,7 @@
|
|
|
70
64
|
<span>其中有效数据记录{{ validateResult.successNum }} 条, </span>
|
|
71
65
|
<span
|
|
72
66
|
>其中无效数据记录
|
|
73
|
-
<span class="nstc-import-error-num">{{
|
|
74
|
-
validateResult.errorList.length
|
|
75
|
-
}}</span>
|
|
67
|
+
<span class="nstc-import-error-num">{{ validateResult.errorList.length }}</span>
|
|
76
68
|
条。</span
|
|
77
69
|
>
|
|
78
70
|
</div>
|
|
@@ -97,61 +89,59 @@
|
|
|
97
89
|
></NstcTable>
|
|
98
90
|
</div>
|
|
99
91
|
|
|
100
|
-
<div v-show="hasErrorFlag" class="end-tips">
|
|
101
|
-
上述数据输入有误,请修改导入文件中相关信息!
|
|
102
|
-
</div>
|
|
92
|
+
<div v-show="hasErrorFlag" class="end-tips">上述数据输入有误,请修改导入文件中相关信息!</div>
|
|
103
93
|
</div>
|
|
104
94
|
</NstcDialog>
|
|
105
95
|
</div>
|
|
106
96
|
</template>
|
|
107
97
|
|
|
108
98
|
<script>
|
|
109
|
-
import NstcUploadCustomExcel from
|
|
110
|
-
import NstcDialog from
|
|
111
|
-
import NstcTable from
|
|
112
|
-
import uploadImg from
|
|
99
|
+
import NstcUploadCustomExcel from '../NstcUploadCustomExcel/NstcUploadCustomExcel'
|
|
100
|
+
import NstcDialog from '../NstcDialog/NstcDialog'
|
|
101
|
+
import NstcTable from '../NstcTable/NstcTable'
|
|
102
|
+
import uploadImg from './img/upload@2x.png'
|
|
113
103
|
export default {
|
|
114
|
-
name:
|
|
104
|
+
name: 'NstcExcelCustomImport',
|
|
115
105
|
|
|
116
106
|
components: {
|
|
117
107
|
NstcUploadCustomExcel,
|
|
118
108
|
NstcDialog,
|
|
119
|
-
NstcTable
|
|
109
|
+
NstcTable
|
|
120
110
|
},
|
|
121
111
|
props: {
|
|
122
112
|
//弹框是否显示 默认:false
|
|
123
113
|
value: {
|
|
124
114
|
type: Boolean,
|
|
125
|
-
default: false
|
|
115
|
+
default: false
|
|
126
116
|
},
|
|
127
117
|
//导入说明文本
|
|
128
118
|
tips: {
|
|
129
119
|
type: Array,
|
|
130
120
|
default: () => {
|
|
131
|
-
return []
|
|
132
|
-
}
|
|
121
|
+
return []
|
|
122
|
+
}
|
|
133
123
|
},
|
|
134
124
|
//表单域标签的宽度
|
|
135
125
|
labelWidth: {
|
|
136
126
|
type: String,
|
|
137
|
-
default:
|
|
127
|
+
default: ''
|
|
138
128
|
},
|
|
139
129
|
//文件下载的模板url
|
|
140
130
|
templateUrl: {
|
|
141
131
|
type: String,
|
|
142
|
-
default:
|
|
132
|
+
default: ''
|
|
143
133
|
},
|
|
144
134
|
//操作框的主标题
|
|
145
135
|
title: {
|
|
146
136
|
type: String,
|
|
147
137
|
default: function () {
|
|
148
|
-
return
|
|
149
|
-
}
|
|
138
|
+
return '导入'
|
|
139
|
+
}
|
|
150
140
|
},
|
|
151
141
|
//是否重置
|
|
152
142
|
reset: {
|
|
153
143
|
type: Boolean,
|
|
154
|
-
default: false
|
|
144
|
+
default: false
|
|
155
145
|
},
|
|
156
146
|
//底部按钮信息
|
|
157
147
|
footerHandlers: {
|
|
@@ -164,18 +154,18 @@ export default {
|
|
|
164
154
|
// confirm: {
|
|
165
155
|
// text: '导入'
|
|
166
156
|
// }
|
|
167
|
-
}
|
|
168
|
-
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
169
159
|
},
|
|
170
160
|
//账户明细自定义导入标识
|
|
171
161
|
flag: {
|
|
172
162
|
type: Boolean,
|
|
173
|
-
default: false
|
|
163
|
+
default: false
|
|
174
164
|
},
|
|
175
165
|
// 自动上传校验
|
|
176
166
|
callback: {
|
|
177
167
|
type: Function,
|
|
178
|
-
default: () => {}
|
|
168
|
+
default: () => {}
|
|
179
169
|
},
|
|
180
170
|
// mapper: {
|
|
181
171
|
// type: Object,
|
|
@@ -184,7 +174,7 @@ export default {
|
|
|
184
174
|
//导入请求
|
|
185
175
|
handleConfirm: {
|
|
186
176
|
type: Function,
|
|
187
|
-
default: () => {}
|
|
177
|
+
default: () => {}
|
|
188
178
|
},
|
|
189
179
|
|
|
190
180
|
// 校验结果
|
|
@@ -195,41 +185,41 @@ export default {
|
|
|
195
185
|
totalNum: 0,
|
|
196
186
|
successNum: 0,
|
|
197
187
|
columnsList: [],
|
|
198
|
-
errorList: []
|
|
199
|
-
}
|
|
200
|
-
}
|
|
188
|
+
errorList: []
|
|
189
|
+
}
|
|
190
|
+
}
|
|
201
191
|
},
|
|
202
|
-
width:{
|
|
203
|
-
type:[String,Number],
|
|
204
|
-
default:'1200px'
|
|
192
|
+
width: {
|
|
193
|
+
type: [String, Number],
|
|
194
|
+
default: '1200px'
|
|
205
195
|
}
|
|
206
196
|
},
|
|
207
197
|
mounted() {
|
|
208
|
-
this.placeholderText= ''
|
|
198
|
+
this.placeholderText = ''
|
|
209
199
|
// chrome and ie
|
|
210
|
-
window.addEventListener(
|
|
200
|
+
window.addEventListener('mousewheel', this.handleScroll(), false)
|
|
211
201
|
// firefox
|
|
212
|
-
window.addEventListener(
|
|
202
|
+
window.addEventListener('DOMMouseScroll', this.handleScroll(), false)
|
|
213
203
|
},
|
|
214
204
|
data() {
|
|
215
205
|
return {
|
|
216
206
|
uploadImg,
|
|
217
207
|
excelData: {
|
|
218
208
|
// tableHeader: [],
|
|
219
|
-
tableData: []
|
|
209
|
+
tableData: []
|
|
220
210
|
},
|
|
221
211
|
placeholderHasFile: false,
|
|
222
|
-
progressStatus:
|
|
212
|
+
progressStatus: '',
|
|
223
213
|
percentage: 0,
|
|
224
214
|
percentageFlag: false,
|
|
225
|
-
fileName:
|
|
215
|
+
fileName: '',
|
|
226
216
|
drawerFlag: false,
|
|
227
217
|
dialogVisible: false,
|
|
228
|
-
tipsText:
|
|
218
|
+
tipsText: '导入说明',
|
|
229
219
|
totalNum: 0,
|
|
230
220
|
successNum: 0,
|
|
231
221
|
failNum: 0,
|
|
232
|
-
placeholderText:
|
|
222
|
+
placeholderText: '',
|
|
233
223
|
columnsFailResult: [],
|
|
234
224
|
tableDataFailResult: [],
|
|
235
225
|
columnsListTemp: [],
|
|
@@ -237,12 +227,12 @@ export default {
|
|
|
237
227
|
successFlag: false,
|
|
238
228
|
statisticsFlag: false,
|
|
239
229
|
confirmDisabledFlag: true,
|
|
240
|
-
isShow: false
|
|
241
|
-
}
|
|
230
|
+
isShow: false
|
|
231
|
+
}
|
|
242
232
|
},
|
|
243
233
|
watch: {
|
|
244
|
-
value:{
|
|
245
|
-
handler(newValue){
|
|
234
|
+
value: {
|
|
235
|
+
handler(newValue) {
|
|
246
236
|
if (!newValue) {
|
|
247
237
|
this.resetAction()
|
|
248
238
|
}
|
|
@@ -251,22 +241,22 @@ export default {
|
|
|
251
241
|
validateResult: {
|
|
252
242
|
handler(newValue, oldValue) {
|
|
253
243
|
// console.log("值更新了", newValue, oldValue);
|
|
254
|
-
oldValue.columnsList.length && (this.statisticsFlag = true)
|
|
244
|
+
oldValue.columnsList.length && (this.statisticsFlag = true)
|
|
255
245
|
|
|
256
246
|
// 获取每行字符的最大长度
|
|
257
|
-
const lengthObj = {}
|
|
247
|
+
const lengthObj = {}
|
|
258
248
|
newValue.errorList.map((item) => {
|
|
259
249
|
// console.log("keys", Object.keys(item));
|
|
260
250
|
const keys = oldValue.columnsList.map((i) => {
|
|
261
|
-
return i[
|
|
262
|
-
})
|
|
251
|
+
return i['prop']
|
|
252
|
+
})
|
|
263
253
|
keys.map((k, i) => {
|
|
264
254
|
// console.log("计算的长度", item[k]);
|
|
265
255
|
if (item[k] && (!lengthObj[i] || lengthObj[i] < item[k].length)) {
|
|
266
|
-
lengthObj[i] = item[k].length
|
|
256
|
+
lengthObj[i] = item[k].length
|
|
267
257
|
}
|
|
268
|
-
})
|
|
269
|
-
})
|
|
258
|
+
})
|
|
259
|
+
})
|
|
270
260
|
|
|
271
261
|
// 更新column
|
|
272
262
|
this.columnsListTemp = oldValue.columnsList.map((i, index) => {
|
|
@@ -275,104 +265,90 @@ export default {
|
|
|
275
265
|
...i,
|
|
276
266
|
width: 16 * lengthObj[index] + 40,
|
|
277
267
|
component: {
|
|
278
|
-
template: `<div v-html="scope.row['${i.prop}']"></div
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
})
|
|
282
|
-
|
|
268
|
+
template: `<div v-html="scope.row['${i.prop}']"></div>`
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
})
|
|
283
272
|
|
|
284
273
|
// 更新errorList的tableData
|
|
285
|
-
this.errorListTemp.length = 0
|
|
274
|
+
this.errorListTemp.length = 0
|
|
286
275
|
newValue.errorList.map((i) => {
|
|
287
|
-
const temp = {}
|
|
276
|
+
const temp = {}
|
|
288
277
|
Object.keys(i).map((k) => {
|
|
289
278
|
if (i.errorList && i.errorList.includes(k)) {
|
|
290
|
-
temp[
|
|
291
|
-
k
|
|
292
|
-
] = `<div class="nstc-g6-common-color-danger">${i[k]}</div>`;
|
|
279
|
+
temp[k] = `<div class="nstc-g6-common-color-danger">${i[k]}</div>`
|
|
293
280
|
} else {
|
|
294
|
-
temp[k] = i[k]
|
|
281
|
+
temp[k] = i[k]
|
|
295
282
|
}
|
|
296
|
-
})
|
|
297
|
-
this.errorListTemp.push(temp)
|
|
283
|
+
})
|
|
284
|
+
this.errorListTemp.push(temp)
|
|
298
285
|
// console.log("表格数据", this.errorListTemp);
|
|
299
|
-
})
|
|
286
|
+
})
|
|
300
287
|
|
|
301
288
|
this.successFlag =
|
|
302
|
-
this.validateResult.successNum !== 0 &&
|
|
303
|
-
this.validateResult.successNum === this.validateResult.totalNum;
|
|
289
|
+
this.validateResult.successNum !== 0 && this.validateResult.successNum === this.validateResult.totalNum
|
|
304
290
|
|
|
305
291
|
// this.footerHandlers.confirm.disabled = !this.successFlag
|
|
306
|
-
this.confirmDisabledFlag = !this.successFlag
|
|
292
|
+
this.confirmDisabledFlag = !this.successFlag
|
|
307
293
|
|
|
308
294
|
// nstc-g6-common-color-danger
|
|
309
295
|
// this.columnsList && this.columnsList.map(i => {
|
|
310
296
|
// console.log(i)
|
|
311
297
|
// })
|
|
312
298
|
},
|
|
313
|
-
deep: true
|
|
299
|
+
deep: true
|
|
314
300
|
},
|
|
315
301
|
columnsList: {
|
|
316
302
|
handler(newValue, oldValue) {
|
|
317
|
-
console.log(
|
|
303
|
+
console.log('值更新了', newValue, oldValue)
|
|
318
304
|
|
|
319
305
|
// console.log("123123123", this.columnsListTemp);
|
|
320
|
-
}
|
|
306
|
+
}
|
|
321
307
|
},
|
|
322
308
|
reset(val) {
|
|
323
|
-
val && this.resetAction()
|
|
324
|
-
}
|
|
309
|
+
val && this.resetAction()
|
|
310
|
+
}
|
|
325
311
|
},
|
|
326
312
|
computed: {
|
|
327
313
|
_value: {
|
|
328
314
|
get() {
|
|
329
|
-
return this.value
|
|
315
|
+
return this.value
|
|
330
316
|
},
|
|
331
317
|
set(val) {
|
|
332
|
-
this.$emit(
|
|
333
|
-
}
|
|
318
|
+
this.$emit('input', val)
|
|
319
|
+
}
|
|
334
320
|
},
|
|
335
321
|
hasErrorFlag() {
|
|
336
|
-
return
|
|
337
|
-
|
|
338
|
-
this.validateResult.errorList.length > 0
|
|
339
|
-
);
|
|
340
|
-
},
|
|
322
|
+
return this.validateResult.errorList && this.validateResult.errorList.length > 0
|
|
323
|
+
}
|
|
341
324
|
},
|
|
342
325
|
created() {
|
|
343
|
-
console.log(
|
|
344
|
-
"批量导入的国际化",
|
|
345
|
-
"上述数据输入有误,请修改导入文件中相关信息!"
|
|
346
|
-
);
|
|
326
|
+
console.log('批量导入的国际化', '上述数据输入有误,请修改导入文件中相关信息!')
|
|
347
327
|
},
|
|
348
328
|
methods: {
|
|
349
329
|
beforeUpload(file) {
|
|
350
|
-
this.percentage = 0
|
|
351
|
-
this.progressStatus =
|
|
352
|
-
this.percentageFlag = true
|
|
353
|
-
this.fileName = file.name
|
|
354
|
-
this.placeholderText = this.fileName
|
|
355
|
-
this.placeholderHasFile = true
|
|
356
|
-
return true
|
|
330
|
+
this.percentage = 0
|
|
331
|
+
this.progressStatus = ''
|
|
332
|
+
this.percentageFlag = true
|
|
333
|
+
this.fileName = file.name
|
|
334
|
+
this.placeholderText = this.fileName
|
|
335
|
+
this.placeholderHasFile = true
|
|
336
|
+
return true
|
|
357
337
|
},
|
|
358
338
|
// header
|
|
359
|
-
handleSuccess(results,tableList) {
|
|
360
|
-
this.percentage = 100
|
|
361
|
-
this.progressStatus =
|
|
339
|
+
handleSuccess(results, tableList) {
|
|
340
|
+
this.percentage = 100
|
|
341
|
+
this.progressStatus = 'success'
|
|
362
342
|
this.validateResult.columnsList = tableList
|
|
363
343
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
this.excelData.tableData = results;
|
|
344
|
+
this.excelData.tableData = results
|
|
367
345
|
|
|
368
346
|
// 自动上传校验or模板上传
|
|
369
|
-
this.flag ? this.callback(results) : this.callback(this.excelData)
|
|
347
|
+
this.flag ? this.callback(results) : this.callback(this.excelData)
|
|
370
348
|
},
|
|
371
349
|
|
|
372
350
|
async handleConfirmImportExcel() {
|
|
373
|
-
(await this.flag)
|
|
374
|
-
? this.handleConfirm()
|
|
375
|
-
: this.handleConfirm(this.excelData);
|
|
351
|
+
;(await this.flag) ? this.handleConfirm() : this.handleConfirm(this.excelData)
|
|
376
352
|
// try {
|
|
377
353
|
// await this.callback(this.excelData)
|
|
378
354
|
// } catch (err) {
|
|
@@ -382,70 +358,69 @@ export default {
|
|
|
382
358
|
|
|
383
359
|
// 下载文件
|
|
384
360
|
downloadTemplate() {
|
|
385
|
-
const aEl = document.createElement(
|
|
386
|
-
aEl.setAttribute(
|
|
387
|
-
aEl.target =
|
|
361
|
+
const aEl = document.createElement('a')
|
|
362
|
+
aEl.setAttribute('href', this.templateUrl)
|
|
363
|
+
aEl.target = '_blank'
|
|
388
364
|
// aEl.download = this.templateUrl
|
|
389
|
-
aEl.click()
|
|
365
|
+
aEl.click()
|
|
390
366
|
},
|
|
391
367
|
|
|
392
368
|
resetAction(flag) {
|
|
393
369
|
// 文件
|
|
394
370
|
this.excelData = {
|
|
395
371
|
// tableHeader: [],
|
|
396
|
-
tableData: []
|
|
397
|
-
}
|
|
372
|
+
tableData: []
|
|
373
|
+
}
|
|
398
374
|
// 不改变原来数据结构
|
|
399
|
-
this.validateResult.totalNum = null
|
|
400
|
-
this.validateResult.successNum = null
|
|
401
|
-
this.validateResult.columnsList = []
|
|
402
|
-
this.validateResult.errorList = []
|
|
375
|
+
this.validateResult.totalNum = null
|
|
376
|
+
this.validateResult.successNum = null
|
|
377
|
+
this.validateResult.columnsList = []
|
|
378
|
+
this.validateResult.errorList = []
|
|
403
379
|
|
|
404
|
-
this.successFlag = false
|
|
380
|
+
this.successFlag = false
|
|
405
381
|
// this.footerHandlers.confirm.disabled = true
|
|
406
|
-
this.confirmDisabledFlag = true
|
|
407
|
-
this.percentageFlag = false
|
|
408
|
-
this.fileName =
|
|
409
|
-
this.percentage = 0
|
|
410
|
-
this.reset = false
|
|
411
|
-
this.statisticsFlag = false
|
|
412
|
-
this.placeholderHasFile = false
|
|
413
|
-
this.placeholderText = '请选择'
|
|
414
|
-
console.log(
|
|
415
|
-
![`delete`].includes(flag) && (this._value = false)
|
|
382
|
+
this.confirmDisabledFlag = true
|
|
383
|
+
this.percentageFlag = false
|
|
384
|
+
this.fileName = ''
|
|
385
|
+
this.percentage = 0
|
|
386
|
+
this.reset = false
|
|
387
|
+
this.statisticsFlag = false
|
|
388
|
+
this.placeholderHasFile = false
|
|
389
|
+
this.placeholderText = '请选择'
|
|
390
|
+
console.log('执行了弹框关闭事件')
|
|
391
|
+
![`delete`].includes(flag) && (this._value = false)
|
|
416
392
|
this.$nextTick(() => {
|
|
417
|
-
this.$forceUpdate()
|
|
418
|
-
})
|
|
393
|
+
this.$forceUpdate()
|
|
394
|
+
})
|
|
419
395
|
},
|
|
420
396
|
|
|
421
397
|
/**
|
|
422
398
|
* 选择文件
|
|
423
399
|
*/
|
|
424
400
|
uploadChooseFile() {
|
|
425
|
-
this.$refs[`nstc-unload-excel-box`].handleUpload()
|
|
401
|
+
this.$refs[`nstc-unload-excel-box`].handleUpload()
|
|
426
402
|
},
|
|
427
403
|
handleScroll(e) {
|
|
428
|
-
let direction = e ? (e.deltaY > 0 ?
|
|
429
|
-
if (document.getElementsByTagName(
|
|
404
|
+
let direction = e ? (e.deltaY > 0 ? 'down' : 'up') : '' // 该语句可以用来判断滚轮是向上滑动还是向下
|
|
405
|
+
if (document.getElementsByTagName('li').length == 1) {
|
|
430
406
|
//此处决定无论一次滚轮滚动的距离是多少,此事件
|
|
431
407
|
//都得等上次滚动结束,才会执行本次
|
|
432
|
-
this.isShow = false
|
|
408
|
+
this.isShow = false
|
|
433
409
|
setTimeout(() => {
|
|
434
|
-
this.isShow = true
|
|
435
|
-
++this.nowIndex
|
|
410
|
+
this.isShow = true
|
|
411
|
+
++this.nowIndex
|
|
436
412
|
if (this.nowIndex == 3) {
|
|
437
|
-
this.nowIndex = 0
|
|
413
|
+
this.nowIndex = 0
|
|
438
414
|
}
|
|
439
|
-
}, 10)
|
|
415
|
+
}, 10)
|
|
440
416
|
}
|
|
441
|
-
console.log(direction)
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
}
|
|
417
|
+
console.log(direction)
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
445
421
|
</script>
|
|
446
422
|
|
|
447
423
|
<style lang="scss">
|
|
448
|
-
|
|
449
424
|
.nstc-import-error-num {
|
|
450
425
|
color: #fb5555;
|
|
451
426
|
}
|
|
@@ -472,4 +447,3 @@ export default {
|
|
|
472
447
|
// left: 380px;
|
|
473
448
|
// }
|
|
474
449
|
</style>
|
|
475
|
-
|
|
@@ -48,9 +48,7 @@
|
|
|
48
48
|
<el-button
|
|
49
49
|
type="primary"
|
|
50
50
|
class="nstc-g6-common-btn-1 nstc-g6-common-btn-size-s"
|
|
51
|
-
:disabled="
|
|
52
|
-
excelData.tableData.length === 0 || confirmDisabledFlag
|
|
53
|
-
"
|
|
51
|
+
:disabled="excelData.tableData.length === 0 || confirmDisabledFlag"
|
|
54
52
|
@click="handleConfirmImportExcel"
|
|
55
53
|
>导入</el-button
|
|
56
54
|
>
|
|
@@ -72,9 +70,7 @@
|
|
|
72
70
|
<span>其中有效数据记录{{ validateResult.successNum }} 条, </span>
|
|
73
71
|
<span
|
|
74
72
|
>其中无效数据记录
|
|
75
|
-
<span class="nstc-import-error-num">{{
|
|
76
|
-
validateResult.errorList.length
|
|
77
|
-
}}</span>
|
|
73
|
+
<span class="nstc-import-error-num">{{ validateResult.errorList.length }}</span>
|
|
78
74
|
条。</span
|
|
79
75
|
>
|
|
80
76
|
</div>
|
|
@@ -90,11 +86,7 @@
|
|
|
90
86
|
|
|
91
87
|
<div v-show="hasErrorFlag" class="fail-excel-import-box">
|
|
92
88
|
<div class="fail-excel-import-box-title">无效数据情况统计</div>
|
|
93
|
-
<el-table
|
|
94
|
-
:data="errorListTemp"
|
|
95
|
-
:height="tableHeight"
|
|
96
|
-
style="width: 100%; height: 500px"
|
|
97
|
-
>
|
|
89
|
+
<el-table :data="errorListTemp" :height="tableHeight" style="width: 100%; height: 500px">
|
|
98
90
|
<el-table-column
|
|
99
91
|
v-for="column in columnsListTemp"
|
|
100
92
|
:key="column.prop"
|
|
@@ -254,10 +246,7 @@ export default {
|
|
|
254
246
|
}
|
|
255
247
|
},
|
|
256
248
|
hasErrorFlag() {
|
|
257
|
-
return
|
|
258
|
-
this.validateResult.errorList &&
|
|
259
|
-
this.validateResult.errorList.length > 0
|
|
260
|
-
)
|
|
249
|
+
return this.validateResult.errorList && this.validateResult.errorList.length > 0
|
|
261
250
|
}
|
|
262
251
|
},
|
|
263
252
|
watch: {
|
|
@@ -291,10 +280,7 @@ export default {
|
|
|
291
280
|
console.log('iiiiiii', i, i.errorList)
|
|
292
281
|
return {
|
|
293
282
|
...i,
|
|
294
|
-
width:
|
|
295
|
-
16 * lengthObj[index] + 40 >= 100
|
|
296
|
-
? 16 * lengthObj[index] + 40
|
|
297
|
-
: 100,
|
|
283
|
+
width: 16 * lengthObj[index] + 40 >= 100 ? 16 * lengthObj[index] + 40 : 100,
|
|
298
284
|
component: {
|
|
299
285
|
template: `<div v-html="scope.row['${i.prop}']"></div>`
|
|
300
286
|
}
|
|
@@ -318,8 +304,7 @@ export default {
|
|
|
318
304
|
console.log(this.errorListTemp, this.columnsListTemp)
|
|
319
305
|
|
|
320
306
|
this.successFlag =
|
|
321
|
-
this.validateResult.successNum !== 0 &&
|
|
322
|
-
this.validateResult.successNum === this.validateResult.totalNum
|
|
307
|
+
this.validateResult.successNum !== 0 && this.validateResult.successNum === this.validateResult.totalNum
|
|
323
308
|
|
|
324
309
|
if (this.footerHandlers.confirm) {
|
|
325
310
|
this.footerHandlers.confirm.disabled = !this.successFlag
|
|
@@ -794,12 +779,8 @@ export default {
|
|
|
794
779
|
}
|
|
795
780
|
|
|
796
781
|
.el-radio__inner:hover,
|
|
797
|
-
.el-input-number__decrease:hover:not(.is-disabled)
|
|
798
|
-
|
|
799
|
-
.el-input__inner:not(.is-disabled),
|
|
800
|
-
.el-input-number__increase:hover:not(.is-disabled)
|
|
801
|
-
~ .el-input
|
|
802
|
-
.el-input__inner:not(.is-disabled),
|
|
782
|
+
.el-input-number__decrease:hover:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled),
|
|
783
|
+
.el-input-number__increase:hover:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled),
|
|
803
784
|
.el-cascader .el-input.is-focus .el-input__inner {
|
|
804
785
|
border-color: #007aff;
|
|
805
786
|
}
|
|
@@ -1005,9 +986,7 @@ export default {
|
|
|
1005
986
|
.el-select-dropdown.is-multiple .el-select-dropdown__item:hover {
|
|
1006
987
|
background-color: rgba(0, 122, 255, 0.1);
|
|
1007
988
|
}
|
|
1008
|
-
.el-select-dropdown.is-multiple
|
|
1009
|
-
.el-scrollbar__view
|
|
1010
|
-
.el-select-dropdown__item.selected.hover {
|
|
989
|
+
.el-select-dropdown.is-multiple .el-scrollbar__view .el-select-dropdown__item.selected.hover {
|
|
1011
990
|
background-color: rgba(0, 122, 255, 0.1);
|
|
1012
991
|
}
|
|
1013
992
|
|
|
@@ -1071,4 +1050,3 @@ export default {
|
|
|
1071
1050
|
// left: 380px;
|
|
1072
1051
|
// }
|
|
1073
1052
|
</style>
|
|
1074
|
-
|