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
@@ -8,11 +8,7 @@
8
8
  -->
9
9
  <template>
10
10
  <div class="dialog-select">
11
- <div
12
- style="position: relative"
13
- @mouseenter="hovering = true"
14
- @mouseleave="hovering = false"
15
- >
11
+ <div style="position: relative" @mouseenter="hovering = true" @mouseleave="hovering = false">
16
12
  <el-input
17
13
  v-model="InputValue"
18
14
  v-bind="$attrs"
@@ -20,14 +16,9 @@
20
16
  v-on="$listeners"
21
17
  @change="changeValue"
22
18
  :placeholder="chMapper.plcSelect"
23
- >
24
- </el-input>
25
- <i
26
- v-if="!showClose"
27
- class="search-btn el-input__icon el-icon-search"
28
- @click="onSearchIconClick"
29
19
  >
30
- </i>
20
+ </el-input>
21
+ <i v-if="!showClose" class="search-btn el-input__icon el-icon-search" @click="onSearchIconClick"> </i>
31
22
  <i
32
23
  v-if="showClose"
33
24
  class="search-btn el-select__caret el-input__icon el-icon-circle-close"
@@ -35,12 +26,7 @@
35
26
  ></i>
36
27
  </div>
37
28
 
38
- <DialogTable
39
- v-model="showDialog"
40
- ref="dialog"
41
- v-bind="dialogProps"
42
- @comfirm="onComfirm"
43
- >
29
+ <DialogTable v-model="showDialog" ref="dialog" v-bind="dialogProps" @comfirm="onComfirm">
44
30
  <template slot="form">
45
31
  <slot></slot>
46
32
  </template>
@@ -49,22 +35,22 @@
49
35
  </template>
50
36
 
51
37
  <script>
52
- import request from "@/utils/request";
53
- import DialogTable from "^/DialogTable/src/main.vue";
38
+ import request from '@/utils/request'
39
+ import DialogTable from '^/DialogTable/src/main.vue'
54
40
  export default {
55
- name: "NstcInputAndDialog",
41
+ name: 'NstcInputAndDialog',
56
42
  components: { DialogTable },
57
43
  props: {
58
44
  width: {
59
45
  type: String,
60
- default: "1000px",
46
+ default: '1000px'
61
47
  },
62
48
  value: String,
63
49
  columns: Array,
64
50
  url: String,
65
51
  httpMethod: {
66
52
  type: String,
67
- default: "GET",
53
+ default: 'GET'
68
54
  },
69
55
  clearable: {
70
56
  type: Boolean,
@@ -72,82 +58,79 @@ export default {
72
58
  },
73
59
  query: {
74
60
  type: String,
75
- default: "label",
61
+ default: 'label'
76
62
  },
77
63
  params: {
78
64
  type: Object,
79
65
  default: () => ({
80
- isEnable: 1,
81
- }),
66
+ isEnable: 1
67
+ })
82
68
  },
83
69
  rowKey: {
84
70
  type: String,
85
- default: "id",
71
+ default: 'id'
86
72
  },
87
73
  formatData: {
88
74
  type: Function,
89
- default: (d) => d,
75
+ default: (d) => d
90
76
  },
91
77
  formatParams: {
92
78
  type: Function,
93
- default: (d) => d,
79
+ default: (d) => d
94
80
  },
95
81
  tableForm: {
96
82
  type: Object,
97
- default: () => {},
83
+ default: () => {}
98
84
  },
99
85
  valueKey: {
100
86
  type: String,
101
- default: "value",
87
+ default: 'value'
102
88
  },
103
89
  labelKey: {
104
90
  type: String,
105
- default: "label",
91
+ default: 'label'
106
92
  },
107
93
  appendToBody: {
108
94
  type: Boolean,
109
- default: true,
95
+ default: true
110
96
  },
111
97
  disabled: {
112
98
  type: Boolean,
113
- default: false,
99
+ default: false
114
100
  },
115
101
  chMapper: {
116
102
  type: Object,
117
103
  default: () => ({
118
- title: "选择xx",
119
- noselectmsg: "请选择xx",
120
- plcInput: "请输入",
121
- plcSelect: "请选择",
122
- }),
104
+ title: '选择xx',
105
+ noselectmsg: '请选择xx',
106
+ plcInput: '请输入',
107
+ plcSelect: '请选择'
108
+ })
123
109
  },
124
110
  // 是否添加懒加载
125
111
  lazyLoad: {
126
112
  type: Boolean,
127
- default: false,
113
+ default: false
128
114
  },
129
115
  // 是否显示删除
130
116
  canClose: {
131
117
  type: Boolean,
132
- default : true
118
+ default: true
133
119
  }
134
120
  },
135
121
  directives: {
136
- "nstc-lazy-load": {
122
+ 'nstc-lazy-load': {
137
123
  bind(el, binding) {
138
- const SELECTWRAP_DOM = el.querySelector(
139
- ".el-select-dropdown .el-select-dropdown__wrap"
140
- );
141
- SELECTWRAP_DOM.addEventListener("scroll", function () {
142
- const condition =
143
- this.scrollHeight - this.scrollTop - 2 <= this.clientHeight;
144
- console.log("condition", condition);
124
+ const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
125
+ SELECTWRAP_DOM.addEventListener('scroll', function () {
126
+ const condition = this.scrollHeight - this.scrollTop - 2 <= this.clientHeight
127
+ console.log('condition', condition)
145
128
  if (condition) {
146
- binding.value();
129
+ binding.value()
147
130
  }
148
- });
149
- },
150
- },
131
+ })
132
+ }
133
+ }
151
134
  },
152
135
  data() {
153
136
  return {
@@ -156,49 +139,47 @@ export default {
156
139
  allData: [],
157
140
  hovering: false,
158
141
  loading: false,
159
- remoteQuery: "",
142
+ remoteQuery: '',
160
143
  dialogProps: {},
161
144
  paginationObj: {
162
145
  current: 1,
163
- size: 20,
146
+ size: 20
164
147
  },
165
- lazyLoadLocal: false,
166
-
167
- };
148
+ lazyLoadLocal: false
149
+ }
168
150
  },
169
151
  created() {
170
- this.$bus.$on("nstc_custom_form_config_update", (formData) => {
171
- console.log("监听到的全局事件", formData);
172
- });
152
+ this.$bus.$on('nstc_custom_form_config_update', (formData) => {
153
+ console.log('监听到的全局事件', formData)
154
+ })
173
155
  },
174
156
  beforeDestroy() {
175
- this.$bus.$off("nstc_custom_form_config_update");
157
+ this.$bus.$off('nstc_custom_form_config_update')
176
158
  },
177
159
  computed: {
178
160
  showClose() {
179
- let hasValue =
180
- this.value !== undefined && this.value !== null && this.value !== "";
181
- return this.hovering && hasValue && this.canClose;
161
+ let hasValue = this.value !== undefined && this.value !== null && this.value !== ''
162
+ return this.hovering && hasValue && this.canClose
182
163
  },
183
164
  attrs: {
184
165
  set(val) {
185
- this.$emit("input", val);
166
+ this.$emit('input', val)
186
167
  },
187
168
  get() {
188
- console.log(this.value);
189
- return this.value;
190
- },
169
+ console.log(this.value)
170
+ return this.value
171
+ }
191
172
  },
192
173
  InputValue: {
193
174
  set(val) {
194
175
  console.log(21212121)
195
- this.$emit("input", val);
176
+ this.$emit('input', val)
196
177
  },
197
178
  get() {
198
- console.log(this.value);
199
- return this.value;
200
- },
201
- },
179
+ console.log(this.value)
180
+ return this.value
181
+ }
182
+ }
202
183
  },
203
184
  created() {
204
185
  let props = {
@@ -212,13 +193,13 @@ export default {
212
193
  formatData: this.formatData,
213
194
  appendToBody: this.appendToBody,
214
195
  width: this.width
215
- };
196
+ }
216
197
  console.log('inputDialog===', props)
217
- this.dialogProps = props;
198
+ this.dialogProps = props
218
199
  },
219
200
  mounted() {
220
- this.editSetOptions();
221
- this.lazyLoadLocal = this.lazyLoad;
201
+ this.editSetOptions()
202
+ this.lazyLoadLocal = this.lazyLoad
222
203
  },
223
204
  methods: {
224
205
  changeValue(val) {
@@ -229,66 +210,62 @@ export default {
229
210
  */
230
211
  lazyLoadAction() {
231
212
  if (this.lazyLoadLocal) {
232
- this.paginationObj.current++;
233
- this.queryAllData();
213
+ this.paginationObj.current++
214
+ this.queryAllData()
234
215
  }
235
216
  },
236
217
  async queryAllData() {
237
218
  let param = this.lazyLoadLocal
238
- ? this.beforeFormatParams(this.paginationObj, "init")
239
- : this.beforeFormatParams({ size: 100, current: 1 }, "init");
240
- this.lazyLoadLocal ? param.quickSearch = this.remoteQuery : ""
241
- let res = await this.queryApi(param);
219
+ ? this.beforeFormatParams(this.paginationObj, 'init')
220
+ : this.beforeFormatParams({ size: 100, current: 1 }, 'init')
221
+ this.lazyLoadLocal ? (param.quickSearch = this.remoteQuery) : ''
222
+ let res = await this.queryApi(param)
242
223
 
243
224
  if (!this.lazyLoadLocal && res && res.total && res.total > 100) {
244
- param = this.beforeFormatParams(
245
- { size: res.total, current: 1 },
246
- "init"
247
- );
248
- let resAll = await this.queryApi(param);
249
- res = resAll;
225
+ param = this.beforeFormatParams({ size: res.total, current: 1 }, 'init')
226
+ let resAll = await this.queryApi(param)
227
+ res = resAll
250
228
  }
251
229
 
252
- let { data } = this.formatData(res || []);
230
+ let { data } = this.formatData(res || [])
253
231
  console.log('data==============', data)
254
- this.allData = this.lazyLoadLocal ? this.allData.concat(data) : data;
232
+ this.allData = this.lazyLoadLocal ? this.allData.concat(data) : data
255
233
  // this.allData = data;
256
- console.log(this.allData);
257
- this.lazyLoadLocal ? this.setOptions(this.allData) : this.setOptions(data);
258
-
234
+ console.log(this.allData)
235
+ this.lazyLoadLocal ? this.setOptions(this.allData) : this.setOptions(data)
259
236
  },
260
237
 
261
238
  beforeFormatParams(pageParam, mode) {
262
- console.log('beforeFormatParams pageParam,mode', pageParam, mode)
263
- const { size, current } = pageParam;
264
- let defaultParam = this.params;
265
- let page = this.formatPageParam(size, current);
266
- let params;
267
- if (mode != "init") {
268
- let param = this.queryFormData || {};
269
- params = { ...defaultParam, ...param, ...page };
239
+ console.log('beforeFormatParams pageParam,mode', pageParam, mode)
240
+ const { size, current } = pageParam
241
+ let defaultParam = this.params
242
+ let page = this.formatPageParam(size, current)
243
+ let params
244
+ if (mode != 'init') {
245
+ let param = this.queryFormData || {}
246
+ params = { ...defaultParam, ...param, ...page }
270
247
  } else {
271
- params = { ...defaultParam, ...page };
248
+ params = { ...defaultParam, ...page }
272
249
  }
273
- return this.formatParams(params);
250
+ return this.formatParams(params)
274
251
  },
275
252
 
276
253
  formatPageParam(size, current) {
277
- let page = { "page.size": size, "page.current": current };
278
- let method = this.httpMethod.toUpperCase();
279
- if (method == "POST") {
280
- page = { page: { size, current } };
254
+ let page = { 'page.size': size, 'page.current': current }
255
+ let method = this.httpMethod.toUpperCase()
256
+ if (method == 'POST') {
257
+ page = { page: { size, current } }
281
258
  }
282
- console.log('formatPageParam===',page )
283
- return page;
259
+ console.log('formatPageParam===', page)
260
+ return page
284
261
  },
285
262
 
286
263
  queryApi(param) {
287
- const { url, httpMethod } = this;
288
- let body = httpMethod.toUpperCase() === "POST" ? "data" : "params";
289
- let reqConf = { url, method: httpMethod };
290
- reqConf[body] = param;
291
- return request(reqConf);
264
+ const { url, httpMethod } = this
265
+ let body = httpMethod.toUpperCase() === 'POST' ? 'data' : 'params'
266
+ let reqConf = { url, method: httpMethod }
267
+ reqConf[body] = param
268
+ return request(reqConf)
292
269
  },
293
270
 
294
271
  setOptions(data) {
@@ -306,83 +283,83 @@ export default {
306
283
  // } else {
307
284
  // opts = data.slice(0, 10);
308
285
  // }
309
- this.options = data;
286
+ this.options = data
310
287
  },
311
288
 
312
289
  filterOptions(query) {
313
- this.remoteQuery = query;
290
+ this.remoteQuery = query
314
291
  if (this.lazyLoad) {
315
- this.allData = [];
316
- this.queryAllData();
292
+ this.allData = []
293
+ this.queryAllData()
317
294
  return
318
295
  }
319
296
  if (query) {
320
297
  let opts = this.allData.filter((item) => {
321
- return item[this.labelKey].indexOf(query) > -1;
322
- });
323
- this.options = opts.slice(0, 10);
298
+ return item[this.labelKey].indexOf(query) > -1
299
+ })
300
+ this.options = opts.slice(0, 10)
324
301
  } else {
325
- this.options = this.allData.slice(0, 10);
302
+ this.options = this.allData.slice(0, 10)
326
303
  }
327
304
  },
328
305
  updateOptions(value) {
329
- let allData = this.allData || [];
330
- let options = this.options || [];
331
- let row = allData.find((item) => item[this.valueKey] == value);
332
- let hasRow = options.find((item) => item[this.valueKey] == value);
306
+ let allData = this.allData || []
307
+ let options = this.options || []
308
+ let row = allData.find((item) => item[this.valueKey] == value)
309
+ let hasRow = options.find((item) => item[this.valueKey] == value)
333
310
  if (row && !hasRow) {
334
- let opts = [row].concat(options);
335
- this.options = opts;
311
+ let opts = [row].concat(options)
312
+ this.options = opts
336
313
  }
337
- console.log(this.options);
314
+ console.log(this.options)
338
315
  },
339
316
 
340
317
  // 编辑回显
341
318
  editSetOptions() {
342
319
  if (this.value) {
343
- this.queryAllData();
320
+ this.queryAllData()
344
321
  }
345
322
  },
346
323
 
347
324
  // 显示弹窗
348
325
  onSearchIconClick(event) {
349
- this.$emit("show-dialog");
326
+ this.$emit('show-dialog')
350
327
  // 判断是否有付款单位
351
328
  let resUltParams = this.formatParams()
352
329
  console.log('resUltParams====', resUltParams)
353
- if(!resUltParams.unitCode) return
354
- this.queryAllData();
355
- this.showDialog = true;
330
+ if (!resUltParams.unitCode) return
331
+ this.queryAllData()
332
+ this.showDialog = true
356
333
  this.$nextTick(() => {
357
- this.queryTableData();
358
- });
334
+ this.queryTableData()
335
+ })
359
336
  },
360
337
 
361
338
  onClearIconClick() {
362
- this.options = this.allData.slice(0, 10);
363
- this.$emit("input", "");
339
+ this.options = this.allData.slice(0, 10)
340
+ this.$emit('input', '')
364
341
  },
365
342
 
366
343
  queryTableData() {
367
- this.queryFormData = Object.assign({}, this.tableForm);
368
- this.$refs.dialog.queryData("searchbtn");
344
+ this.queryFormData = Object.assign({}, this.tableForm)
345
+ this.$refs.dialog.queryData('searchbtn')
369
346
  },
370
347
  selectBlur() {
371
- if(this.lazyLoadLocal) {
372
- this.paginationObj = { size: 20, current: 1 };
348
+ if (this.lazyLoadLocal) {
349
+ this.paginationObj = { size: 20, current: 1 }
373
350
  }
374
- return;
351
+ return
375
352
  },
376
353
 
377
354
  onComfirm(values, row) {
378
355
  console.log('this.valueKey=====', this.valueKey)
379
- let value = row[this.valueKey];
380
- this.updateOptions(value);
381
- this.$emit("input", value);
382
- this.$emit("comfirm", values, row);
383
- },
384
- },
385
- };
356
+ let value = row[this.valueKey]
357
+ this.updateOptions(value)
358
+ this.$emit('input', value)
359
+ this.$emit('comfirm', values, row)
360
+ }
361
+ }
362
+ }
386
363
  </script>
387
364
 
388
365
  <style scoped>
@@ -392,4 +369,4 @@ export default {
392
369
  right: 7px;
393
370
  top: -1px;
394
371
  }
395
- </style>
372
+ </style>
@@ -9,19 +9,14 @@
9
9
  <!-- <template v-slot:prepend>3</template>-->
10
10
  <!-- <template v-slot:append>4</template>-->
11
11
  <!-- </InputCustom>-->
12
- <InputCustom
13
- v-model="value"
14
- width="500"
15
- is-money
16
- style="margin: 10px"
17
- />
12
+ <InputCustom v-model="value" width="500" is-money style="margin: 10px" />
18
13
  <el-divider />
19
14
  <InputCustom
20
15
  v-model="inputValue"
21
16
  width="500"
22
17
  is-money
23
18
  style="margin: 10px"
24
- :number-rule="{ min:0, precision: 2, isMoney: true }"
19
+ :number-rule="{ min: 0, precision: 2, isMoney: true }"
25
20
  />
26
21
  <el-divider />
27
22
  <InputCustom
@@ -29,11 +24,10 @@
29
24
  width="500"
30
25
  is-money
31
26
  style="margin: 10px"
32
- :number-rule="{ min:0, precision: 2, isMoney: true }"
27
+ :number-rule="{ min: 0, precision: 2, isMoney: true }"
33
28
  />
34
29
  <el-button @click="add">增加</el-button>
35
30
  </div>
36
-
37
31
  </template>
38
32
 
39
33
  <script>
@@ -60,6 +54,4 @@ export default {
60
54
  }
61
55
  </script>
62
56
 
63
- <style scoped>
64
-
65
- </style>
57
+ <style scoped></style>