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-select
17
13
  v-model="selectValue"
18
14
  v-nstc-lazy-load="lazyLoadAction"
@@ -35,12 +31,7 @@
35
31
  :value="item[valueKey]"
36
32
  ></el-option>
37
33
  </el-select>
38
- <i
39
- v-if="!showClose"
40
- class="search-btn el-input__icon el-icon-search"
41
- @click="onSearchIconClick"
42
- >
43
- </i>
34
+ <i v-if="!showClose" class="search-btn el-input__icon el-icon-search" @click="onSearchIconClick"> </i>
44
35
  <i
45
36
  v-if="showClose"
46
37
  class="search-btn el-select__caret el-input__icon el-icon-circle-close"
@@ -48,12 +39,7 @@
48
39
  ></i>
49
40
  </div>
50
41
 
51
- <DialogTable
52
- v-model="showDialog"
53
- ref="dialog"
54
- v-bind="dialogProps"
55
- @comfirm="onComfirm"
56
- >
42
+ <DialogTable v-model="showDialog" ref="dialog" v-bind="dialogProps" @comfirm="onComfirm">
57
43
  <template slot="form">
58
44
  <slot></slot>
59
45
  </template>
@@ -62,10 +48,10 @@
62
48
  </template>
63
49
 
64
50
  <script>
65
- import request from "@/utils/request";
66
- import DialogTable from "^/DialogTable/src/main.vue";
51
+ import request from '@/utils/request'
52
+ import DialogTable from '^/DialogTable/src/main.vue'
67
53
  export default {
68
- name: "NstcSelectAndDialog",
54
+ name: 'NstcSelectAndDialog',
69
55
  components: { DialogTable },
70
56
  props: {
71
57
  value: String,
@@ -73,81 +59,78 @@ export default {
73
59
  url: String,
74
60
  httpMethod: {
75
61
  type: String,
76
- default: "GET",
62
+ default: 'GET'
77
63
  },
78
64
  query: {
79
65
  type: String,
80
- default: "label",
66
+ default: 'label'
81
67
  },
82
68
  params: {
83
69
  type: Object,
84
70
  default: () => ({
85
- isEnable: 1,
86
- }),
71
+ isEnable: 1
72
+ })
87
73
  },
88
74
  rowKey: {
89
75
  type: String,
90
- default: "id",
76
+ default: 'id'
91
77
  },
92
78
  formatData: {
93
79
  type: Function,
94
- default: (d) => d,
80
+ default: (d) => d
95
81
  },
96
82
  formatParams: {
97
83
  type: Function,
98
- default: (d) => d,
84
+ default: (d) => d
99
85
  },
100
86
  tableForm: {
101
87
  type: Object,
102
- default: () => {},
88
+ default: () => {}
103
89
  },
104
90
  valueKey: {
105
91
  type: String,
106
- default: "value",
92
+ default: 'value'
107
93
  },
108
94
  labelKey: {
109
95
  type: String,
110
- default: "label",
96
+ default: 'label'
111
97
  },
112
98
  appendToBody: {
113
99
  type: Boolean,
114
- default: true,
100
+ default: true
115
101
  },
116
102
  disabled: {
117
103
  type: Boolean,
118
- default: false,
104
+ default: false
119
105
  },
120
106
  chMapper: {
121
107
  type: Object,
122
108
  default: () => ({
123
- title: "选择xx",
124
- noselectmsg: "请选择xx",
125
- plcInput: "请输入",
126
- plcSelect: "请选择",
127
- }),
109
+ title: '选择xx',
110
+ noselectmsg: '请选择xx',
111
+ plcInput: '请输入',
112
+ plcSelect: '请选择'
113
+ })
128
114
  },
129
115
  // 是否添加懒加载
130
116
  lazyLoad: {
131
117
  type: Boolean,
132
- default: false,
133
- },
118
+ default: false
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,39 +139,37 @@ 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;
161
+ let hasValue = this.value !== undefined && this.value !== null && this.value !== ''
162
+ return this.hovering && hasValue
182
163
  },
183
164
  selectValue: {
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
- },
191
- },
169
+ console.log(this.value)
170
+ return this.value
171
+ }
172
+ }
192
173
  },
193
174
  created() {
194
175
  let props = {
@@ -200,13 +181,13 @@ export default {
200
181
  queryApi: this.queryApi,
201
182
  formatParams: this.beforeFormatParams,
202
183
  formatData: this.formatData,
203
- appendToBody: this.appendToBody,
204
- };
205
- this.dialogProps = props;
184
+ appendToBody: this.appendToBody
185
+ }
186
+ this.dialogProps = props
206
187
  },
207
188
  mounted() {
208
- this.editSetOptions();
209
- this.lazyLoadLocal = this.lazyLoad;
189
+ this.editSetOptions()
190
+ this.lazyLoadLocal = this.lazyLoad
210
191
  },
211
192
  methods: {
212
193
  /**
@@ -214,63 +195,59 @@ export default {
214
195
  */
215
196
  lazyLoadAction() {
216
197
  if (this.lazyLoadLocal) {
217
- this.paginationObj.current++;
218
- this.queryAllData();
198
+ this.paginationObj.current++
199
+ this.queryAllData()
219
200
  }
220
201
  },
221
202
  async queryAllData() {
222
203
  let param = this.lazyLoadLocal
223
- ? this.beforeFormatParams(this.paginationObj, "init")
224
- : this.beforeFormatParams({ size: 100, current: 1 }, "init");
225
- this.lazyLoadLocal ? param.quickSearch = this.remoteQuery : ""
226
- let res = await this.queryApi(param);
204
+ ? this.beforeFormatParams(this.paginationObj, 'init')
205
+ : this.beforeFormatParams({ size: 100, current: 1 }, 'init')
206
+ this.lazyLoadLocal ? (param.quickSearch = this.remoteQuery) : ''
207
+ let res = await this.queryApi(param)
227
208
 
228
209
  if (!this.lazyLoadLocal && res && res.total && res.total > 100) {
229
- param = this.beforeFormatParams(
230
- { size: res.total, current: 1 },
231
- "init"
232
- );
233
- let resAll = await this.queryApi(param);
234
- res = resAll;
210
+ param = this.beforeFormatParams({ size: res.total, current: 1 }, 'init')
211
+ let resAll = await this.queryApi(param)
212
+ res = resAll
235
213
  }
236
214
  console.log('数据====', res)
237
- let { data } = this.formatData(res || []);
238
- this.allData = this.lazyLoadLocal ? this.allData.concat(data) : data;
215
+ let { data } = this.formatData(res || [])
216
+ this.allData = this.lazyLoadLocal ? this.allData.concat(data) : data
239
217
  // this.allData = data;
240
- console.log(this.allData);
241
- this.lazyLoadLocal ? this.setOptions(this.allData) : this.setOptions(data);
242
-
218
+ console.log(this.allData)
219
+ this.lazyLoadLocal ? this.setOptions(this.allData) : this.setOptions(data)
243
220
  },
244
221
 
245
222
  beforeFormatParams(pageParam, mode) {
246
- const { size, current } = pageParam;
247
- let defaultParam = this.params;
248
- let page = this.formatPageParam(size, current);
249
- let params;
250
- if (mode != "init") {
251
- let param = this.queryFormData || {};
252
- params = { ...defaultParam, ...param, ...page };
223
+ const { size, current } = pageParam
224
+ let defaultParam = this.params
225
+ let page = this.formatPageParam(size, current)
226
+ let params
227
+ if (mode != 'init') {
228
+ let param = this.queryFormData || {}
229
+ params = { ...defaultParam, ...param, ...page }
253
230
  } else {
254
- params = { ...defaultParam, ...page };
231
+ params = { ...defaultParam, ...page }
255
232
  }
256
- return this.formatParams(params);
233
+ return this.formatParams(params)
257
234
  },
258
235
 
259
236
  formatPageParam(size, current) {
260
- let page = { "page.size": size, "page.current": current };
261
- let method = this.httpMethod.toUpperCase();
262
- if (method == "POST") {
263
- page = { page: { size, current } };
237
+ let page = { 'page.size': size, 'page.current': current }
238
+ let method = this.httpMethod.toUpperCase()
239
+ if (method == 'POST') {
240
+ page = { page: { size, current } }
264
241
  }
265
- return page;
242
+ return page
266
243
  },
267
244
 
268
245
  queryApi(param) {
269
- const { url, httpMethod } = this;
270
- let body = httpMethod.toUpperCase() === "POST" ? "data" : "params";
271
- let reqConf = { url, method: httpMethod };
272
- reqConf[body] = param;
273
- return request(reqConf);
246
+ const { url, httpMethod } = this
247
+ let body = httpMethod.toUpperCase() === 'POST' ? 'data' : 'params'
248
+ let reqConf = { url, method: httpMethod }
249
+ reqConf[body] = param
250
+ return request(reqConf)
274
251
  },
275
252
 
276
253
  setOptions(data) {
@@ -288,90 +265,90 @@ export default {
288
265
  // } else {
289
266
  // opts = data.slice(0, 10);
290
267
  // }
291
- this.options = data;
268
+ this.options = data
292
269
  },
293
270
 
294
271
  filterOptions(query) {
295
- this.remoteQuery = query;
272
+ this.remoteQuery = query
296
273
  if (this.lazyLoad) {
297
- this.allData = [];
298
- this.queryAllData();
274
+ this.allData = []
275
+ this.queryAllData()
299
276
  return
300
277
  }
301
278
  if (query) {
302
279
  let opts = this.allData.filter((item) => {
303
- return item[this.labelKey].indexOf(query) > -1;
304
- });
305
- this.options = opts.slice(0, 10);
280
+ return item[this.labelKey].indexOf(query) > -1
281
+ })
282
+ this.options = opts.slice(0, 10)
306
283
  } else {
307
- this.options = this.allData.slice(0, 10);
284
+ this.options = this.allData.slice(0, 10)
308
285
  }
309
286
  },
310
287
 
311
288
  updateOptions(value) {
312
- let allData = this.allData || [];
313
- let options = this.options || [];
314
- let row = allData.find((item) => item[this.valueKey] == value);
315
- let hasRow = options.find((item) => item[this.valueKey] == value);
289
+ let allData = this.allData || []
290
+ let options = this.options || []
291
+ let row = allData.find((item) => item[this.valueKey] == value)
292
+ let hasRow = options.find((item) => item[this.valueKey] == value)
316
293
  if (row && !hasRow) {
317
- let opts = [row].concat(options);
318
- this.options = opts;
294
+ let opts = [row].concat(options)
295
+ this.options = opts
319
296
  }
320
- console.log(this.options);
297
+ console.log(this.options)
321
298
  },
322
299
 
323
300
  // 编辑回显
324
301
  editSetOptions() {
325
302
  if (this.value) {
326
- this.queryAllData();
303
+ this.queryAllData()
327
304
  }
328
305
  },
329
306
 
330
307
  // 显示弹窗
331
308
  onSearchIconClick(event) {
332
- this.$emit("show-dialog");
333
- this.queryAllData();
334
- this.showDialog = true;
309
+ this.$emit('show-dialog')
310
+ this.queryAllData()
311
+ this.showDialog = true
335
312
  this.$nextTick(() => {
336
- this.queryTableData();
337
- });
313
+ this.queryTableData()
314
+ })
338
315
  },
339
316
 
340
317
  onClearIconClick() {
341
- this.options = this.allData.slice(0, 10);
342
- this.$emit("input", "");
318
+ this.options = this.allData.slice(0, 10)
319
+ this.$emit('input', '')
343
320
  },
344
321
 
345
322
  queryTableData() {
346
- this.queryFormData = Object.assign({}, this.tableForm);
347
- this.$refs.dialog.queryData("searchbtn");
323
+ this.queryFormData = Object.assign({}, this.tableForm)
324
+ this.$refs.dialog.queryData('searchbtn')
348
325
  },
349
326
 
350
327
  selectOpt(val) {
351
- let row = this.allData.find((item) => item[this.valueKey] == val);
352
- console.log(val,row,this.valueKey,this.allData);
353
- this.$emit("comfirm", [val], row);
328
+ let row = this.allData.find((item) => item[this.valueKey] == val)
329
+ console.log(val, row, this.valueKey, this.allData)
330
+ this.$emit('comfirm', [val], row)
354
331
  },
355
332
 
356
333
  selectFocus() {
357
334
  this.allData = []
358
- this.queryAllData();
335
+ this.queryAllData()
359
336
  },
360
337
  selectBlur() {
361
- if(this.lazyLoadLocal) {
362
- this.paginationObj = { size: 20, current: 1 };
338
+ if (this.lazyLoadLocal) {
339
+ this.paginationObj = { size: 20, current: 1 }
363
340
  }
364
- return;
341
+ return
365
342
  },
366
343
 
367
344
  onComfirm(values, row) {
368
- let value = row[this.valueKey];
369
- this.updateOptions(value);
370
- this.$emit("input", value);
371
- this.$emit("comfirm", values, row);
372
- },
373
- },
374
- };
345
+ let value = row[this.valueKey]
346
+ this.updateOptions(value)
347
+ this.$emit('input', value)
348
+ this.$emit('comfirm', values, row)
349
+ }
350
+ }
351
+ }
375
352
  </script>
376
353
 
377
354
  <style scoped>
@@ -381,4 +358,4 @@ export default {
381
358
  right: 7px;
382
359
  top: -1px;
383
360
  }
384
- </style>
361
+ </style>
@@ -6,10 +6,10 @@
6
6
  * @Description: 现金流输入弹窗
7
7
  * @FilePath: \nstc_g6_common\packages\Form\SelectCashFlow\index.js
8
8
  */
9
- import NstcSelectCashFlow from "./src/main.vue";
9
+ import NstcSelectCashFlow from './src/main.vue'
10
10
 
11
- NstcSelectCashFlow.install = function(Vue) {
12
- Vue.component(NstcSelectCashFlow.name, NstcSelectCashFlow);
13
- };
11
+ NstcSelectCashFlow.install = function (Vue) {
12
+ Vue.component(NstcSelectCashFlow.name, NstcSelectCashFlow)
13
+ }
14
14
 
15
- export default NstcSelectCashFlow;
15
+ export default NstcSelectCashFlow
@@ -7,36 +7,35 @@
7
7
  * @FilePath: \settle\src\cmmon-components\demo.vue
8
8
  -->
9
9
  <template>
10
- <select-cash-flow v-model="cashflow" :ch-mapper="labelconf" :query-conf="cashConf"/>
10
+ <select-cash-flow v-model="cashflow" :ch-mapper="labelconf" :query-conf="cashConf" />
11
11
  </template>
12
12
 
13
13
  <script>
14
- import SelectCashFlow from "../main.vue";
14
+ import SelectCashFlow from '../main.vue'
15
15
  export default {
16
16
  components: { SelectCashFlow },
17
17
  data() {
18
18
  return {
19
- cashflow: "",
20
- cashConf:{
21
- defaultParam: {
22
- resultType: 0,
23
- lastNode: 1,
24
- flowNoLike: "",
25
- showFlag:1,
19
+ cashflow: '',
20
+ cashConf: {
21
+ defaultParam: {
22
+ resultType: 0,
23
+ lastNode: 1,
24
+ flowNoLike: '',
25
+ showFlag: 1
26
26
  }
27
27
  },
28
28
  labelconf: {
29
- title: "选择现金流",
30
- plcInput: "请输入",
31
- plcSelect: "请选择",
32
- noselectmsg: "请选择现金流",
33
- flowNoLabel: "现金流编号",
34
- flowNameLabel: "现金流名称"
29
+ title: '选择现金流',
30
+ plcInput: '请输入',
31
+ plcSelect: '请选择',
32
+ noselectmsg: '请选择现金流',
33
+ flowNoLabel: '现金流编号',
34
+ flowNameLabel: '现金流名称'
35
35
  }
36
- };
36
+ }
37
37
  }
38
- };
38
+ }
39
39
  </script>
40
40
 
41
- <style>
42
- </style>
41
+ <style></style>