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.
Files changed (175) hide show
  1. package/README.md +1 -1
  2. package/nstc-g6/components/Calendar/index.js +5 -5
  3. package/nstc-g6/components/Calendar/src/basic/month-table.vue +12 -20
  4. package/nstc-g6/components/Calendar/src/basic/year-table.vue +18 -22
  5. package/nstc-g6/components/Calendar/src/main.vue +1 -5
  6. package/nstc-g6/components/DialogForm/index.js +5 -5
  7. package/nstc-g6/components/DialogForm/src/demo/index.vue +18 -27
  8. package/nstc-g6/components/DialogForm/src/main.vue +15 -21
  9. package/nstc-g6/components/Form/A_DEMO/component/originalForm.vue +35 -50
  10. package/nstc-g6/components/Form/A_DEMO/config/config_3.js +1115 -1110
  11. package/nstc-g6/components/Form/A_DEMO/index.vue +7 -29
  12. package/nstc-g6/components/Form/AutocompleteCustom/index.vue +3 -5
  13. package/nstc-g6/components/Form/BusinessSpecific/InputMultiple.vue +60 -62
  14. package/nstc-g6/components/Form/BusinessSpecific/InputWithUnit.vue +12 -35
  15. package/nstc-g6/components/Form/BusinessSpecific/SelectTreeDialog.vue +77 -77
  16. package/nstc-g6/components/Form/CascaderCustom/index.vue +4 -4
  17. package/nstc-g6/components/Form/CheckboxCustom/index.vue +5 -11
  18. package/nstc-g6/components/Form/Component.vue +56 -78
  19. package/nstc-g6/components/Form/ComponentSecond.vue +55 -77
  20. package/nstc-g6/components/Form/InputAndDialog/index.js +5 -5
  21. package/nstc-g6/components/Form/InputAndDialog/src/main.vue +130 -153
  22. package/nstc-g6/components/Form/InputCustom/demo/index.vue +4 -12
  23. package/nstc-g6/components/Form/InputCustom/index.vue +51 -54
  24. package/nstc-g6/components/Form/IntervalinputCustom/demo/index.vue +1 -3
  25. package/nstc-g6/components/Form/IntervalinputCustom/index.vue +19 -41
  26. package/nstc-g6/components/Form/Item.vue +15 -30
  27. package/nstc-g6/components/Form/ItemSecond.vue +7 -22
  28. package/nstc-g6/components/Form/List.vue +12 -28
  29. package/nstc-g6/components/Form/ListSecond.vue +11 -27
  30. package/nstc-g6/components/Form/RadioCustom/index.vue +5 -23
  31. package/nstc-g6/components/Form/SelectAccount/index.js +5 -5
  32. package/nstc-g6/components/Form/SelectAccount/src/demo/index.vue +34 -28
  33. package/nstc-g6/components/Form/SelectAccount/src/main.vue +112 -83
  34. package/nstc-g6/components/Form/SelectAndDialog/index.js +5 -5
  35. package/nstc-g6/components/Form/SelectAndDialog/src/main.vue +126 -149
  36. package/nstc-g6/components/Form/SelectCashFlow/index.js +5 -5
  37. package/nstc-g6/components/Form/SelectCashFlow/src/demo/index.vue +18 -19
  38. package/nstc-g6/components/Form/SelectCashFlow/src/main.vue +52 -41
  39. package/nstc-g6/components/Form/SelectCustom/demo/index.vue +14 -16
  40. package/nstc-g6/components/Form/SelectCustom/index.vue +129 -139
  41. package/nstc-g6/components/Form/SelectSubject/index.js +5 -5
  42. package/nstc-g6/components/Form/SelectSubject/src/demo/index.vue +42 -48
  43. package/nstc-g6/components/Form/SelectSubject/src/main.vue +83 -86
  44. package/nstc-g6/components/Form/SelectindialogCustom/demo/index.vue +34 -35
  45. package/nstc-g6/components/Form/SelectindialogCustom/index.vue +133 -148
  46. package/nstc-g6/components/Form/SelectindialogCustom/install.js +3 -3
  47. package/nstc-g6/components/Form/TableRadioCustom/demo/index.vue +1 -7
  48. package/nstc-g6/components/Form/TableRadioCustom/index.vue +17 -26
  49. package/nstc-g6/components/Form/TextCustom/index.vue +2 -2
  50. package/nstc-g6/components/Form/UploadCustom/demo/index.vue +1 -3
  51. package/nstc-g6/components/Form/UploadCustom/index.vue +143 -173
  52. package/nstc-g6/components/Form/configs.js +3 -14
  53. package/nstc-g6/components/Form/configsSecond.js +3 -16
  54. package/nstc-g6/components/Form/index.js +1 -1
  55. package/nstc-g6/components/Form/payeePersonSelect/index.js +5 -5
  56. package/nstc-g6/components/Form/payeePersonSelect/src/demo/index.vue +50 -44
  57. package/nstc-g6/components/Form/payeePersonSelect/src/main.vue +73 -82
  58. package/nstc-g6/components/FormGroup/index.js +5 -5
  59. package/nstc-g6/components/FormGroup/src/demo/config.js +18 -19
  60. package/nstc-g6/components/FormGroup/src/demo/index.vue +14 -22
  61. package/nstc-g6/components/FormGroup/src/main.vue +122 -141
  62. package/nstc-g6/components/FormGroup/src/validate.js +11 -13
  63. package/nstc-g6/components/InputTag/InputTag.vue +78 -111
  64. package/nstc-g6/components/NstcBackToTop/NstcBackToTop.vue +24 -24
  65. package/nstc-g6/components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +4 -13
  66. package/nstc-g6/components/NstcCharts/NstcCharts.vue +9 -18
  67. package/nstc-g6/components/NstcCharts/define.js +1 -6
  68. package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +6 -21
  69. package/nstc-g6/components/NstcConfirm/index.js +21 -19
  70. package/nstc-g6/components/NstcDialog/NstcDialog.vue +34 -38
  71. package/nstc-g6/components/NstcDialogForm/NstcDialogForm.vue +17 -21
  72. package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +4 -17
  73. package/nstc-g6/components/NstcDropdown/NstcDropdown.vue +2 -12
  74. package/nstc-g6/components/NstcDropdownTree/NstcDropdownTree.vue +3 -13
  75. package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +18 -78
  76. package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +121 -147
  77. package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +9 -31
  78. package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +10 -33
  79. package/nstc-g6/components/NstcExpandCollapse/NstcExpandCollapse.vue +12 -16
  80. package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +19 -75
  81. package/nstc-g6/components/NstcForm/A_DEMO/component/originalForm.vue +35 -50
  82. package/nstc-g6/components/NstcForm/A_DEMO/config/config_3.js +1115 -1110
  83. package/nstc-g6/components/NstcForm/A_DEMO/index.vue +340 -354
  84. package/nstc-g6/components/NstcForm/AutocompleteCustom/index.vue +2 -2
  85. package/nstc-g6/components/NstcForm/BusinessSpecific/InputWithUnit.vue +11 -34
  86. package/nstc-g6/components/NstcForm/BusinessSpecific/SelectTreeDialog.vue +77 -77
  87. package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +5 -11
  88. package/nstc-g6/components/NstcForm/Component.vue +17 -62
  89. package/nstc-g6/components/NstcForm/ComponentSecond.vue +55 -77
  90. package/nstc-g6/components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +6 -24
  91. package/nstc-g6/components/NstcForm/InputCustom/index.vue +2 -8
  92. package/nstc-g6/components/NstcForm/IntervalInputCustom/index.vue +4 -21
  93. package/nstc-g6/components/NstcForm/Item.vue +3 -15
  94. package/nstc-g6/components/NstcForm/ItemSecond.vue +7 -22
  95. package/nstc-g6/components/NstcForm/List.vue +12 -28
  96. package/nstc-g6/components/NstcForm/ListSecond.vue +11 -27
  97. package/nstc-g6/components/NstcForm/RadioCustom/index.vue +5 -23
  98. package/nstc-g6/components/NstcForm/SelectAccount/NstcSelectAccount.vue +4 -24
  99. package/nstc-g6/components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +7 -30
  100. package/nstc-g6/components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue +50 -38
  101. package/nstc-g6/components/NstcForm/SelectCustom/index.vue +6 -16
  102. package/nstc-g6/components/NstcForm/SelectSubject/NstcSelectSubject.vue +72 -82
  103. package/nstc-g6/components/NstcForm/SelectindialogCustom/index.vue +6 -20
  104. package/nstc-g6/components/NstcForm/TableRadioCustom/index.vue +17 -26
  105. package/nstc-g6/components/NstcForm/TextCustom/index.vue +2 -2
  106. package/nstc-g6/components/NstcForm/UploadCustom/index.vue +13 -60
  107. package/nstc-g6/components/NstcForm/configs.js +3 -14
  108. package/nstc-g6/components/NstcForm/configsSecond.js +3 -16
  109. package/nstc-g6/components/NstcForm/index.js +1 -1
  110. package/nstc-g6/components/NstcForm/payeePersonSelect/NstcPayeePerson.vue +57 -73
  111. package/nstc-g6/components/NstcPagination/NstcPagination.vue +2 -12
  112. package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +2 -3
  113. package/nstc-g6/components/NstcSelectTree/NstcSelectTree.vue +4 -15
  114. package/nstc-g6/components/NstcSelectTreeList/NstcSelectTreeList.vue +5 -20
  115. package/nstc-g6/components/NstcSticky/NstcSticky.vue +10 -4
  116. package/nstc-g6/components/NstcSvgIcon/NstcSvgIcon.vue +1 -7
  117. package/nstc-g6/components/NstcTab/NstcTab.vue +8 -20
  118. package/nstc-g6/components/NstcTabWithBadge/NstcTabWithBadge.vue +7 -7
  119. package/nstc-g6/components/NstcTable/ElTableColumnCustom/index.vue +88 -126
  120. package/nstc-g6/components/NstcTable/NstcTable.vue +4 -17
  121. package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +27 -72
  122. package/nstc-g6/components/NstcThemePicker/NstcThemePicker.vue +13 -14
  123. package/nstc-g6/components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue +3 -13
  124. package/nstc-g6/components/NstcUploadExcel/NstcUploadExcel.vue +21 -22
  125. package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +4 -17
  126. package/nstc-g6/components/Search/NstcSearch.vue +12 -47
  127. package/nstc-g6/components/Search/src/demo/index copy.vue +28 -28
  128. package/nstc-g6/components/Search/src/demo/index.vue +36 -36
  129. package/nstc-g6/components/Search/src/main copy.vue +169 -204
  130. package/nstc-g6/components/approvelTwo/main.vue +2 -6
  131. package/nstc-g6/components/approvelTwo/progress.vue +7 -29
  132. package/nstc-g6/directives/VCopy/index.js +52 -54
  133. package/nstc-g6/directives/VNstcNumber/index.js +1 -1
  134. package/nstc-g6/directives/VNstcNumber/temp.js +357 -362
  135. package/nstc-g6/utils/mapper_aims.js +774 -775
  136. package/nstc-g6/utils/parseTime.js +38 -36
  137. package/nstc-g6/utils/validate/index.js +2 -2
  138. package/nstc-g6/utils/vendor/Export2Excel.js +110 -111
  139. package/nstc-g6/utils/vendor/Export2Zip.js +12 -7
  140. package/nstc-g6/utils/vue-bus.js +1 -1
  141. package/package.json +1 -1
  142. package/src/assets/iconFont/demo_index.html +1 -1
  143. package/src/assets/iconFont/iconfont.js +66 -1
  144. package/src/assets/iconFont2/demo_index.html +277 -286
  145. package/src/assets/iconFont2/iconfont.js +66 -1
  146. package/src/components/Button/button-group.vue +1 -1
  147. package/src/components/Layout/HeaderWrap/indexN.vue +1 -1
  148. package/src/components/Layout/indexN.vue +1 -2
  149. package/src/components/LoginTemporary/indexN.vue +12 -2
  150. package/src/components/TableOperateColumn/index.vue +1 -1
  151. package/src/plugins/Print/print-js/README.md +5 -5
  152. package/src/plugins/Print/print-js/package.json +2 -2
  153. package/src/plugins/Print/print-js/src/index.d.ts +36 -36
  154. package/src/plugins/Print/print-js/src/js/browser.js +3 -1
  155. package/src/plugins/Print/print-js/src/js/functions.js +16 -10
  156. package/src/plugins/Print/print-js/src/js/html.js +2 -2
  157. package/src/plugins/Print/print-js/src/js/image.js +1 -1
  158. package/src/plugins/Print/print-js/src/js/init.js +15 -7
  159. package/src/plugins/Print/print-js/src/js/json.js +14 -4
  160. package/src/plugins/Print/print-js/src/js/modal.js +16 -15
  161. package/src/plugins/Print/print-js/src/js/pdf.js +1 -1
  162. package/src/plugins/Print/print-js/src/js/print.js +6 -6
  163. package/src/plugins/Sign/NetSM3/InfosecNetSignCNGAgent.min.js +1825 -1592
  164. package/src/plugins/Sign/cfca/index.js +525 -520
  165. package/src/plugins/Sign/sign.js +128 -128
  166. package/style/index.css +1 -1
  167. package/style/index.css.map +1 -1
  168. package/theme/blue.css +1 -1
  169. package/theme/cctcRed.css +1 -1
  170. package/theme/green.css +1 -1
  171. package/theme/lightBlue.css +1 -1
  172. package/theme/orange.css +1 -1
  173. package/theme/purple.css +1 -1
  174. package/theme/red.css +1 -1
  175. package/theme/yellow.css +1 -1
@@ -7,33 +7,26 @@
7
7
  * @FilePath: NstcSelectSubject.vue
8
8
  -->
9
9
  <template>
10
- <SelectAndDialog v-model="_value" ref="select" v-bind="bindProps" :table-form="formSearch" :format-data="formatData"
11
- :format-params="formatParams" @show-dialog="onShowDialog">
10
+ <SelectAndDialog
11
+ v-model="_value"
12
+ ref="select"
13
+ v-bind="bindProps"
14
+ :table-form="formSearch"
15
+ :format-data="formatData"
16
+ :format-params="formatParams"
17
+ @show-dialog="onShowDialog"
18
+ >
12
19
  <div class="form-wrap">
13
20
  <el-form inline :model="formSearch">
14
21
  <el-form-item :label="chMapper.subjectNoLabel">
15
- <el-input
16
- :placeholder="chMapper.plcInput"
17
- v-model="formSearch.km"
18
- maxlength="60"
19
- clearable
20
- >
21
- </el-input>
22
+ <el-input :placeholder="chMapper.plcInput" v-model="formSearch.km" maxlength="60" clearable> </el-input>
22
23
  </el-form-item>
23
24
  <el-form-item :label="chMapper.subjectNameLabel">
24
- <el-input
25
- :placeholder="chMapper.plcInput"
26
- v-model="formSearch.kmName"
27
- maxlength="60"
28
- clearable
29
- >
30
- </el-input>
25
+ <el-input :placeholder="chMapper.plcInput" v-model="formSearch.kmName" maxlength="60" clearable> </el-input>
31
26
  </el-form-item>
32
27
  <el-form-item>
33
- <el-button type="primary" class="nstc-g6-common-btn-1" @click="searchClick">查询
34
- </el-button>
35
- <el-button style="margin-left:8px;" class="nstc-g6-common-btn-3" @click="queryReset">重置
36
- </el-button>
28
+ <el-button type="primary" class="nstc-g6-common-btn-1" @click="searchClick">查询 </el-button>
29
+ <el-button style="margin-left: 8px" class="nstc-g6-common-btn-3" @click="queryReset">重置 </el-button>
37
30
  </el-form-item>
38
31
  </el-form>
39
32
  </div>
@@ -41,29 +34,28 @@
41
34
  </template>
42
35
 
43
36
  <script>
44
- import SelectAndDialog from "../SelectAndDialog/NstcSelectAndDialog.vue";
37
+ import SelectAndDialog from '../SelectAndDialog/NstcSelectAndDialog.vue'
45
38
 
46
39
  export default {
47
- name: "NstcSelectSubject",
48
- components: {SelectAndDialog},
40
+ name: 'NstcSelectSubject',
41
+ components: { SelectAndDialog },
49
42
  props: {
50
43
  value: [String, Object],
51
44
  queryConf: {
52
45
  type: Object,
53
- default: () => {
54
- }
46
+ default: () => {}
55
47
  },
56
48
  chMapper: {
57
49
  type: Object,
58
50
  default: () => ({
59
- title: "选择科目",
60
- plcInput: "请输入",
61
- plcSelect: "请选择",
62
- noselectmsg: "请选择科目",
63
- subjectNoLabel: "科目编号",
64
- subjectNameLabel: "科目名称",
65
- balanceDirectionlabel: "余额方向",
66
- }),
51
+ title: '选择科目',
52
+ plcInput: '请输入',
53
+ plcSelect: '请选择',
54
+ noselectmsg: '请选择科目',
55
+ subjectNoLabel: '科目编号',
56
+ subjectNameLabel: '科目名称',
57
+ balanceDirectionlabel: '余额方向'
58
+ })
67
59
  },
68
60
  disabled: {
69
61
  type: Boolean,
@@ -72,23 +64,23 @@ export default {
72
64
  },
73
65
  data() {
74
66
  return {
75
- showText: "",
67
+ showText: '',
76
68
  formSearch: {
77
- km: "",
78
- kmName: "",
69
+ km: '',
70
+ kmName: ''
79
71
  },
80
72
  showDialog: false,
81
73
  columns: [],
82
74
  options: [],
83
75
  inputHovering: false,
84
- remoteQuery: "",
85
- bindProps: {},
86
- };
76
+ remoteQuery: '',
77
+ bindProps: {}
78
+ }
87
79
  },
88
80
  wacth: {
89
81
  'queryConf.defaultParam': {
90
82
  handler(val) {
91
- this.$refs.select.queryAllData();
83
+ this.$refs.select.queryAllData()
92
84
  // this.queryAllData();
93
85
  },
94
86
  deep: true
@@ -97,82 +89,80 @@ export default {
97
89
  computed: {
98
90
  _value: {
99
91
  set(val) {
100
- this.$emit("input", val);
92
+ this.$emit('input', val)
101
93
  },
102
94
  get() {
103
- return this.value;
104
- },
105
- },
95
+ return this.value
96
+ }
97
+ }
106
98
  },
107
99
  created() {
108
100
  let props = {
109
101
  columns: [
110
- {prop: "km", label: this.chMapper.subjectNoLabel, align: "center"},
111
- {prop: "kmName", label: this.chMapper.subjectNameLabel, align: "center"},
112
- {prop: "dirName", label: this.chMapper.balanceDirectionlabel, align: "center"},
102
+ { prop: 'km', label: this.chMapper.subjectNoLabel, align: 'center' },
103
+ { prop: 'kmName', label: this.chMapper.subjectNameLabel, align: 'center' },
104
+ { prop: 'dirName', label: this.chMapper.balanceDirectionlabel, align: 'center' }
113
105
  ],
114
- url: this.queryConf.url || "/api/nstc-tss/1.0/remote/list",
115
- httpMethod: this.queryConf.httpMethod || "POST",
106
+ url: this.queryConf.url || '/api/nstc-tss/1.0/remote/list',
107
+ httpMethod: this.queryConf.httpMethod || 'POST',
116
108
  params: this.queryConf.defaultParam || {},
117
- rowKey: "km",
118
- valueKey: "km",
119
- labelKey: "km",
109
+ rowKey: 'km',
110
+ valueKey: 'km',
111
+ labelKey: 'km',
120
112
  disabled: this.disabled,
121
113
  chMapper: this.chMapper
122
- };
123
- this.bindProps = props;
124
- },
125
- mounted() {
114
+ }
115
+ this.bindProps = props
126
116
  },
117
+ mounted() {},
127
118
  methods: {
128
119
  formatParams(params) {
129
120
  console.log(params, '----------params')
130
- let size = 20;
131
- let current = 1;
132
- if (params["page.size"]) {
133
- size = params["page.size"];
134
- current = params["page.current"];
121
+ let size = 20
122
+ let current = 1
123
+ if (params['page.size']) {
124
+ size = params['page.size']
125
+ current = params['page.current']
135
126
  }
136
127
  if (params.page && params.page.size) {
137
- size = params.page.size;
138
- current = params.page.current;
128
+ size = params.page.size
129
+ current = params.page.current
139
130
  }
140
- let page = {"pageSize": size, "pageNo": current};
141
- if (params.diabledValue && !(params.brNo)) {
131
+ let page = { pageSize: size, pageNo: current }
132
+ if (params.diabledValue && !params.brNo) {
142
133
  params.brNo = params.diabledValue
143
134
  }
144
- return {...params, ...page};
135
+ return { ...params, ...page }
145
136
  },
146
137
  formatData(res) {
147
138
  let data = [],
148
- total = 0;
139
+ total = 0
149
140
  if (res && !res.total && Array.isArray(res)) {
150
- data = res;
151
- total = res.length;
141
+ data = res
142
+ total = res.length
152
143
  } else if (res && res.total && res.list) {
153
- data = res.list || [];
154
- total = res.total;
144
+ data = res.list || []
145
+ total = res.total
155
146
  }
156
- return {data, total};
147
+ return { data, total }
157
148
  },
158
149
 
159
-
160
150
  onShowDialog() {
161
- this.queryReset();
151
+ this.queryReset()
162
152
  },
163
153
 
164
154
  searchClick() {
165
- this.$refs.select.queryTableData();
155
+ this.$refs.select.queryTableData()
166
156
  },
167
157
 
168
158
  queryReset() {
169
159
  this.formSearch = {
170
- km: "",
171
- kmName: "",
172
- };
173
- },
174
- },
175
- };
160
+ km: '',
161
+ kmName: ''
162
+ }
163
+ }
164
+ }
165
+ }
176
166
  </script>
177
167
 
178
168
  <style>
@@ -182,4 +172,4 @@ export default {
182
172
  right: 5px;
183
173
  top: -1px;
184
174
  }
185
- </style>
175
+ </style>
@@ -30,14 +30,8 @@
30
30
  @click="!disabled && (dialogVisible = true) && handleSelectClick()"
31
31
  ></i>
32
32
  </div>
33
- <div
34
- v-else
35
- class="select-in-dialog-result"
36
- @click="!disabled && (dialogVisible = true) && handleSelectClick()"
37
- >
38
- <span :class="{ 'select-in-dialog-result-null': !resultLabel }">{{
39
- resultLabel || '请选择'
40
- }}</span>
33
+ <div v-else class="select-in-dialog-result" @click="!disabled && (dialogVisible = true) && handleSelectClick()">
34
+ <span :class="{ 'select-in-dialog-result-null': !resultLabel }">{{ resultLabel || '请选择' }}</span>
41
35
  <el-button
42
36
  v-if="clearable && !disabled && hasValue"
43
37
  type="text"
@@ -350,9 +344,7 @@ export default {
350
344
  },
351
345
 
352
346
  hasValue() {
353
- return this.multiple
354
- ? this._value && this._value.length
355
- : this._value || this._value === 0
347
+ return this.multiple ? this._value && this._value.length : this._value || this._value === 0
356
348
  }
357
349
  },
358
350
 
@@ -373,8 +365,7 @@ export default {
373
365
  this.$refs.formCustom.resetFields()
374
366
  }
375
367
 
376
- const init =
377
- (!this.formConfig || !this.formConfig.length) && !this.hasInit // 未初始化
368
+ const init = (!this.formConfig || !this.formConfig.length) && !this.hasInit // 未初始化
378
369
  const query = init || !this.cache // 不需要缓存
379
370
  if (query && val) {
380
371
  this.handleQuery()
@@ -407,10 +398,7 @@ export default {
407
398
  }
408
399
 
409
400
  if (this.queryParamFormatter && model) {
410
- const formatParam = await this.queryParamFormatter(
411
- model,
412
- this.pagination
413
- )
401
+ const formatParam = await this.queryParamFormatter(model, this.pagination)
414
402
 
415
403
  param = {
416
404
  ...param,
@@ -466,9 +454,7 @@ export default {
466
454
  tableData = []
467
455
  }
468
456
 
469
- this.tableData = this.queryDataFormatter
470
- ? await this.queryDataFormatter(tableData)
471
- : tableData
457
+ this.tableData = this.queryDataFormatter ? await this.queryDataFormatter(tableData) : tableData
472
458
  this.hasInit = true
473
459
  this.loading = false
474
460
 
@@ -9,20 +9,12 @@
9
9
  :show-pagination="showPagination"
10
10
  :pagination.sync="_pagination"
11
11
  @selection-change="handleSelectionChange"
12
- @pagination-change="val => $emit('pagination-change', val)"
12
+ @pagination-change="(val) => $emit('pagination-change', val)"
13
13
  >
14
14
  <template v-if="!multiple" v-slot:before>
15
- <el-table-column
16
- :width="45"
17
- align="center"
18
- header-align="center"
19
- >
15
+ <el-table-column :width="45" align="center" header-align="center">
20
16
  <template v-slot="{ row, $index }">
21
- <el-radio
22
- v-model="_value"
23
- :label="$index"
24
- :disabled="row.disabled"
25
- >{{ '' }}</el-radio>
17
+ <el-radio v-model="_value" :label="$index" :disabled="row.disabled">{{ '' }}</el-radio>
26
18
  </template>
27
19
  </el-table-column>
28
20
  </template>
@@ -98,16 +90,14 @@ export default {
98
90
 
99
91
  data() {
100
92
  return {
101
- key: `TableRadioCustomID-${Math.random()
102
- .toString(36)
103
- .slice(2)}`
93
+ key: `TableRadioCustomID-${Math.random().toString(36).slice(2)}`
104
94
  }
105
95
  },
106
96
 
107
97
  computed: {
108
98
  _value: {
109
99
  get() {
110
- return this.data.findIndex(row => this.value && row[this.valueKey] === this.value[this.valueKey])
100
+ return this.data.findIndex((row) => this.value && row[this.valueKey] === this.value[this.valueKey])
111
101
  },
112
102
  set(val) {
113
103
  const row = this.data[val]
@@ -125,12 +115,12 @@ export default {
125
115
  _columns() {
126
116
  return this.multiple
127
117
  ? [
128
- {
129
- type: 'selection',
130
- width: 35
131
- },
132
- ...this.columns
133
- ]
118
+ {
119
+ type: 'selection',
120
+ width: 35
121
+ },
122
+ ...this.columns
123
+ ]
134
124
  : this.columns
135
125
  },
136
126
 
@@ -157,15 +147,16 @@ export default {
157
147
 
158
148
  methods: {
159
149
  setSelectedRow(data) {
160
- this.value && this.value.forEach((item) => {
161
- const index = data.findIndex(row => row[this.valueKey] === item[this.valueKey])
150
+ this.value &&
151
+ this.value.forEach((item) => {
152
+ const index = data.findIndex((row) => row[this.valueKey] === item[this.valueKey])
162
153
 
163
- this.$refs.tableSelect.$refs.elTable.toggleRowSelection(data[index], true)
164
- })
154
+ this.$refs.tableSelect.$refs.elTable.toggleRowSelection(data[index], true)
155
+ })
165
156
  },
166
157
 
167
158
  handleSelectionChange(val) {
168
- const res = val.map(item => ({
159
+ const res = val.map((item) => ({
169
160
  ...item,
170
161
  [this.valueKey]: item[this.valueKey],
171
162
  [this.labelKey]: item[this.labelKey]
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <span class="text-custom" :style="{width:parseFloat(width) + 'px'}">{{ getValue(value) }}</span>
2
+ <span class="text-custom" :style="{ width: parseFloat(width) + 'px' }">{{ getValue(value) }}</span>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -20,7 +20,7 @@ export default {
20
20
 
21
21
  methods: {
22
22
  getValue(value) {
23
- if(value instanceof Array) {
23
+ if (value instanceof Array) {
24
24
  return value.toString().replace(/,/g, '')
25
25
  } else {
26
26
  return value
@@ -1,19 +1,10 @@
1
1
  <template>
2
2
  <div
3
3
  :key="key"
4
- :class="[
5
- 'upload-custom',
6
- { 'is-multiple': multiple || valueClassification.img.length }
7
- ]"
4
+ :class="['upload-custom', { 'is-multiple': multiple || valueClassification.img.length }]"
8
5
  :style="{ width: `${_width}px` }"
9
6
  >
10
- <input
11
- v-if="isChoosing"
12
- ref="fileInput"
13
- type="file"
14
- :multiple="multiple"
15
- @change="handleFileChange"
16
- />
7
+ <input v-if="isChoosing" ref="fileInput" type="file" :multiple="multiple" @change="handleFileChange" />
17
8
  <el-button
18
9
  v-if="!isView"
19
10
  :loading="loading"
@@ -30,50 +21,25 @@
30
21
  <div v-if="fileName" class="upload-file-name" :title="fileName">
31
22
  {{ fileName }}
32
23
  </div>
33
- <el-button
34
- v-if="fileName"
35
- class="upload-file-delete"
36
- type="text"
37
- @click="handleClickFileBtn"
38
- >
24
+ <el-button v-if="fileName" class="upload-file-delete" type="text" @click="handleClickFileBtn">
39
25
  {{ fileBtnName }}
40
26
  </el-button>
41
27
  </template>
42
28
  <template v-else>
43
29
  <div class="upload-file-other">
44
- <div
45
- v-for="(item, index) in valueClassification.other"
46
- :key="index"
47
- class="upload-file-other-item"
48
- >
30
+ <div v-for="(item, index) in valueClassification.other" :key="index" class="upload-file-other-item">
49
31
  <div class="upload-file-name" :title="item.fileName">
50
32
  {{ item.fileName }}
51
33
  </div>
52
- <el-button
53
- class="upload-file-other-delete"
54
- type="text"
55
- @click="handleClickFileBtn(item)"
56
- >
34
+ <el-button class="upload-file-other-delete" type="text" @click="handleClickFileBtn(item)">
57
35
  {{ fileBtnName }}
58
36
  </el-button>
59
37
  </div>
60
38
  </div>
61
39
  <div class="upload-file-img">
62
- <div
63
- v-for="(item, index) in valueClassification.img"
64
- :key="index"
65
- class="upload-file-img-item"
66
- >
67
- <el-image
68
- :src="item.fileUrl"
69
- :preview-src-list="getPreviewSrcList(index)"
70
- />
71
- <img
72
- v-if="!isView"
73
- :src="closeImg"
74
- alt="#"
75
- @click="handleDelete(item)"
76
- />
40
+ <div v-for="(item, index) in valueClassification.img" :key="index" class="upload-file-img-item">
41
+ <el-image :src="item.fileUrl" :preview-src-list="getPreviewSrcList(index)" />
42
+ <img v-if="!isView" :src="closeImg" alt="#" @click="handleDelete(item)" />
77
43
  </div>
78
44
  </div>
79
45
  </template>
@@ -200,9 +166,7 @@ export default {
200
166
  },
201
167
 
202
168
  fileName() {
203
- return !this.multiple && this._value && this._value.fileName
204
- ? this._value.fileName
205
- : ''
169
+ return !this.multiple && this._value && this._value.fileName ? this._value.fileName : ''
206
170
  },
207
171
 
208
172
  _width() {
@@ -214,18 +178,11 @@ export default {
214
178
  },
215
179
 
216
180
  _disabled() {
217
- return (
218
- this.disabled ||
219
- (Array.isArray(this._value) && this._value.length >= this.max)
220
- )
181
+ return this.disabled || (Array.isArray(this._value) && this._value.length >= this.max)
221
182
  },
222
183
 
223
184
  valueClassification() {
224
- const _value = this.multiple
225
- ? this._value
226
- : this._value
227
- ? [this._value]
228
- : []
185
+ const _value = this.multiple ? this._value : this._value ? [this._value] : []
229
186
  const reg = /\.(png|jpg|gif|jpeg)$/
230
187
 
231
188
  return _value.reduce(
@@ -272,9 +229,7 @@ export default {
272
229
  },
273
230
 
274
231
  beforeDestroy() {
275
- this.revokeObjectURL.forEach((fileUrl) =>
276
- window.URL.revokeObjectURL(fileUrl)
277
- )
232
+ this.revokeObjectURL.forEach((fileUrl) => window.URL.revokeObjectURL(fileUrl))
278
233
  },
279
234
 
280
235
  methods: {
@@ -302,9 +257,7 @@ export default {
302
257
  await this.fileMaxCheck(files)
303
258
  await Promise.all(files.map((file) => this.fileTypeCheck(file)))
304
259
 
305
- const value = await Promise.all(
306
- files.map((file) => this.singleFileUpload(file))
307
- )
260
+ const value = await Promise.all(files.map((file) => this.singleFileUpload(file)))
308
261
 
309
262
  this._value = this.multiple ? [...this._value, ...value] : value[0]
310
263
  } catch (err) {
@@ -18,7 +18,6 @@
18
18
  // const FormTooltips = () => ('../FormCreate/component/FormTooltips')
19
19
  // const nstcselecttreeCustom = () => import('../SelectTree/src/main')
20
20
 
21
-
22
21
  import DatepickerCustom from './DatepickerCustom'
23
22
  import InputCustom from './InputCustom'
24
23
  import IntervalinputCustom from './IntervalInputCustom'
@@ -45,7 +44,6 @@ import selectsubjectCustom from './SelectSubject/NstcSelectSubject'
45
44
  import payeePersonSelect from './payeePersonSelect/NstcPayeePerson'
46
45
  import inputAndDialog from './InputAndDialog/NstcInputAndDialog'
47
46
 
48
-
49
47
  // 定义支持的类型
50
48
  export const SUPPORT_TYPE = [
51
49
  'datepicker',
@@ -108,7 +106,7 @@ export function getDefaultValue({ mold, multiple, type, default: def }) {
108
106
  case 'nstcBankBanchTree':
109
107
  case 'selecttreedialog':
110
108
  _def = {
111
- value: isEmpty(def) ? multiple ? [] : null : def
109
+ value: isEmpty(def) ? (multiple ? [] : null) : def
112
110
  }
113
111
  break
114
112
 
@@ -127,13 +125,7 @@ export function getDefaultValue({ mold, multiple, type, default: def }) {
127
125
 
128
126
  case 'upload':
129
127
  _def = {
130
- value: isEmpty(def)
131
- ? multiple
132
- ? []
133
- : null
134
- : multiple
135
- ? [...def]
136
- : def
128
+ value: isEmpty(def) ? (multiple ? [] : null) : multiple ? [...def] : def
137
129
  }
138
130
  break
139
131
 
@@ -158,9 +150,7 @@ export function getDefaultValue({ mold, multiple, type, default: def }) {
158
150
  case 'datewmqy':
159
151
  case 'datepicker':
160
152
  _def = {
161
- value: type && type.includes('range')
162
- ? isEmpty(def) ? [] : [...def]
163
- : isEmpty(def) ? null : def
153
+ value: type && type.includes('range') ? (isEmpty(def) ? [] : [...def]) : isEmpty(def) ? null : def
164
154
  }
165
155
  break
166
156
 
@@ -188,4 +178,3 @@ export function getDefaultValue({ mold, multiple, type, default: def }) {
188
178
  export function isEmpty(def) {
189
179
  return def === null || def === undefined
190
180
  }
191
-
@@ -18,7 +18,6 @@
18
18
  // const FormTooltips = () => ('../FormCreate/component/FormTooltips')
19
19
  // const nstcselecttreeCustom = () => import('../SelectTree/src/main')
20
20
 
21
-
22
21
  import DatepickerCustom from './DatepickerCustom'
23
22
  import InputCustom from './InputCustom'
24
23
  import IntervalinputCustom from './IntervalInputCustom'
@@ -34,8 +33,6 @@ import nstcselecttreeCustom from '../NstcSelectTree/NstcSelectTree'
34
33
  import nstcselecttreeListCustom from '../NstcSelectTreeList/NstcSelectTreeList'
35
34
  import nstcfileuploadCustom from '../NstcFileUpload/NstcFileUpload'
36
35
 
37
-
38
-
39
36
  // 定义支持的类型
40
37
  export const SUPPORT_TYPE = [
41
38
  'datepicker',
@@ -73,7 +70,6 @@ export const components = {
73
70
  nstcfileuploadCustom
74
71
  }
75
72
 
76
-
77
73
  // 支持的类型对应的默认值
78
74
  export function getDefaultValue({ mold, multiple, type, default: def }) {
79
75
  let _def
@@ -83,7 +79,7 @@ export function getDefaultValue({ mold, multiple, type, default: def }) {
83
79
  case 'selectindialog':
84
80
  case 'nstcBankBanchTree':
85
81
  _def = {
86
- value: isEmpty(def) ? multiple ? [] : null : def
82
+ value: isEmpty(def) ? (multiple ? [] : null) : def
87
83
  }
88
84
  break
89
85
 
@@ -99,13 +95,7 @@ export function getDefaultValue({ mold, multiple, type, default: def }) {
99
95
 
100
96
  case 'upload':
101
97
  _def = {
102
- value: isEmpty(def)
103
- ? multiple
104
- ? []
105
- : null
106
- : multiple
107
- ? [...def]
108
- : def
98
+ value: isEmpty(def) ? (multiple ? [] : null) : multiple ? [...def] : def
109
99
  }
110
100
  break
111
101
 
@@ -128,9 +118,7 @@ export function getDefaultValue({ mold, multiple, type, default: def }) {
128
118
  case 'datewmqy':
129
119
  case 'datepicker':
130
120
  _def = {
131
- value: type && type.includes('range')
132
- ? isEmpty(def) ? [] : [...def]
133
- : isEmpty(def) ? null : def
121
+ value: type && type.includes('range') ? (isEmpty(def) ? [] : [...def]) : isEmpty(def) ? null : def
134
122
  }
135
123
  break
136
124
 
@@ -158,4 +146,3 @@ export function getDefaultValue({ mold, multiple, type, default: def }) {
158
146
  export function isEmpty(def) {
159
147
  return def === null || def === undefined
160
148
  }
161
-
@@ -1,6 +1,6 @@
1
1
  import NstcForm from './Component'
2
2
 
3
- NstcForm.install = function(Vue) {
3
+ NstcForm.install = function (Vue) {
4
4
  Vue.component(NstcForm.name, NstcForm)
5
5
  }
6
6