n20-common-lib 2.4.4 → 2.4.6

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 (174) 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/LoginTemporary/indexN.vue +12 -2
  148. package/src/components/TableOperateColumn/index.vue +1 -1
  149. package/src/i18n.json +2 -2
  150. package/src/plugins/Print/print-js/README.md +5 -5
  151. package/src/plugins/Print/print-js/package.json +2 -2
  152. package/src/plugins/Print/print-js/src/index.d.ts +36 -36
  153. package/src/plugins/Print/print-js/src/js/browser.js +3 -1
  154. package/src/plugins/Print/print-js/src/js/functions.js +16 -10
  155. package/src/plugins/Print/print-js/src/js/html.js +2 -2
  156. package/src/plugins/Print/print-js/src/js/image.js +1 -1
  157. package/src/plugins/Print/print-js/src/js/init.js +15 -7
  158. package/src/plugins/Print/print-js/src/js/json.js +14 -4
  159. package/src/plugins/Print/print-js/src/js/modal.js +16 -15
  160. package/src/plugins/Print/print-js/src/js/pdf.js +1 -1
  161. package/src/plugins/Print/print-js/src/js/print.js +6 -6
  162. package/src/plugins/Sign/NetSM3/InfosecNetSignCNGAgent.min.js +1825 -1592
  163. package/src/plugins/Sign/cfca/index.js +525 -520
  164. package/src/plugins/Sign/sign.js +128 -128
  165. package/style/index.css +1 -1
  166. package/style/index.css.map +1 -1
  167. package/theme/blue.css +1 -1
  168. package/theme/cctcRed.css +1 -1
  169. package/theme/green.css +1 -1
  170. package/theme/lightBlue.css +1 -1
  171. package/theme/orange.css +1 -1
  172. package/theme/purple.css +1 -1
  173. package/theme/red.css +1 -1
  174. package/theme/yellow.css +1 -1
@@ -30,9 +30,7 @@
30
30
  @change="handleChange"
31
31
  @query="handleQuery"
32
32
  />
33
- <el-divider content-position="left"
34
- >保留小数点后六位 赋值 有isMoney</el-divider
35
- >
33
+ <el-divider content-position="left">保留小数点后六位 赋值 有isMoney</el-divider>
36
34
  <el-input
37
35
  v-model="item_number"
38
36
  v-nstc-number="{ min: -1, precision: 6, isMoney: true }"
@@ -49,9 +47,7 @@
49
47
  :disabled="isDisabled"
50
48
  placeholder="输入金额"
51
49
  /> -->
52
- <el-divider content-position="left"
53
- >不赋值 保留小数点后六位 没有isMoney</el-divider
54
- >
50
+ <el-divider content-position="left">不赋值 保留小数点后六位 没有isMoney</el-divider>
55
51
  <el-input
56
52
  v-model="item_number_2"
57
53
  v-nstc-number="{ min: -1, precision: 6 }"
@@ -60,9 +56,7 @@
60
56
  placeholder="输入金额"
61
57
  clearable
62
58
  />
63
- <el-divider content-position="left"
64
- >赋值 保留小数点后两位 没有isMoney</el-divider
65
- >
59
+ <el-divider content-position="left">赋值 保留小数点后两位 没有isMoney</el-divider>
66
60
  <el-input
67
61
  v-model="item_number_1"
68
62
  v-nstc-number="{ min: -1, precision: 2 }"
@@ -73,21 +67,12 @@
73
67
  />
74
68
  <!-- {{ varietyAmount1 }} -->
75
69
  <div style="padding-top: 20px">
76
- <el-button
77
- type="primary"
78
- @click="textDisable"
79
- class="nstc-g6-common-btn-1 nstc-g6-common-btn-size-b"
70
+ <el-button type="primary" @click="textDisable" class="nstc-g6-common-btn-1 nstc-g6-common-btn-size-b"
80
71
  >disabled状态切换</el-button
81
72
  >
82
73
  </div>
83
74
  <el-divider content-position="left">登记类表单</el-divider>
84
- <el-form
85
- :model="ruleForm"
86
- :rules="rules"
87
- ref="ruleForm"
88
- label-width="100px"
89
- class="demo-ruleForm"
90
- >
75
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
91
76
  <el-form-item label="活动名称" prop="name">
92
77
  <el-input
93
78
  v-model="ruleForm.name"
@@ -758,10 +743,7 @@ export default {
758
743
  let rules
759
744
  rules = config
760
745
  .reduce((prev, next) => [...prev, ...next.formConfig], [])
761
- .reduce(
762
- (prev, next) => [...prev, ...(Array.isArray(next) ? next : [next])],
763
- []
764
- )
746
+ .reduce((prev, next) => [...prev, ...(Array.isArray(next) ? next : [next])], [])
765
747
  .reduce((prev, next) => {
766
748
  if (next.link) {
767
749
  const links = next.link.filter((item) => !!item.mold)
@@ -773,10 +755,7 @@ export default {
773
755
  }, [])
774
756
  .filter((item) => item.isRequired)
775
757
  .reduce((res, curr) => {
776
- const isInput =
777
- curr.mold === 'input' ||
778
- curr.prop === 'dueDate' ||
779
- 'lastShipmentDate'
758
+ const isInput = curr.mold === 'input' || curr.prop === 'dueDate' || 'lastShipmentDate'
780
759
 
781
760
  return {
782
761
  ...res,
@@ -800,4 +779,3 @@ export default {
800
779
  }
801
780
  }
802
781
  </script>
803
-
@@ -2,7 +2,7 @@
2
2
  <el-autocomplete
3
3
  v-model="_value"
4
4
  v-bind="$attrs"
5
- :style="{width:parseFloat(width) + 'px'}"
5
+ :style="{ width: parseFloat(width) + 'px' }"
6
6
  :placeholder="placeholder"
7
7
  v-on="$listeners"
8
8
  @select="handleSelect"
@@ -37,7 +37,7 @@ export default {
37
37
 
38
38
  placeholder: {
39
39
  type: String,
40
- default: function (){
40
+ default: function () {
41
41
  return '请输入'
42
42
  }
43
43
  },
@@ -67,6 +67,4 @@ export default {
67
67
  }
68
68
  </script>
69
69
 
70
- <style scoped>
71
-
72
- </style>
70
+ <style scoped></style>
@@ -2,28 +2,28 @@
2
2
  <template>
3
3
  <div class="nstc-g6-common-input-multiple">
4
4
  <SelectCustom
5
- v-model="_value[0]"
6
- filterable
7
- :options="options[0]"
8
- :width="widthConfig[0]"
9
- @change="inputChange(0)"
10
- class="nstc-g6-common-input-multiple-select"
5
+ v-model="_value[0]"
6
+ filterable
7
+ :options="options[0]"
8
+ :width="widthConfig[0]"
9
+ @change="inputChange(0)"
10
+ class="nstc-g6-common-input-multiple-select"
11
11
  />
12
12
  <SelectCustom
13
- v-model="_value[1]"
14
- filterable
15
- :options="options[1]"
16
- :width="widthConfig[1]"
17
- @change="inputChange(1)"
18
- class="nstc-g6-common-input-multiple-select"
13
+ v-model="_value[1]"
14
+ filterable
15
+ :options="options[1]"
16
+ :width="widthConfig[1]"
17
+ @change="inputChange(1)"
18
+ class="nstc-g6-common-input-multiple-select"
19
19
  />
20
20
  <SelectCustom
21
- v-model="_value[2]"
22
- filterable
23
- :options="options[2]"
24
- :width="widthConfig[2]"
25
- @change="inputChange(2)"
26
- class="nstc-g6-common-input-multiple-select"
21
+ v-model="_value[2]"
22
+ filterable
23
+ :options="options[2]"
24
+ :width="widthConfig[2]"
25
+ @change="inputChange(2)"
26
+ class="nstc-g6-common-input-multiple-select"
27
27
  />
28
28
  </div>
29
29
  </template>
@@ -32,7 +32,7 @@
32
32
  import SelectCustom from '../SelectCustom'
33
33
  import request from '@/utils/request'
34
34
  export default {
35
- name: "NstcInputMultiple",
35
+ name: 'NstcInputMultiple',
36
36
  props: {
37
37
  value: {
38
38
  type: Array,
@@ -109,7 +109,7 @@ export default {
109
109
  data() {
110
110
  return {
111
111
  arr: [null, null, null],
112
- options: [null,null,null]
112
+ options: [null, null, null]
113
113
  }
114
114
  },
115
115
 
@@ -121,70 +121,68 @@ export default {
121
121
  url: url,
122
122
  method: 'get',
123
123
  params: optionsIndex === 0 ? null : this.params
124
- }).then(res => {
125
- console.log(res)
126
- let resList = res.list || res
127
- resList = Array.isArray(resList) ? resList : [resList]
124
+ })
125
+ .then((res) => {
126
+ console.log(res)
127
+ let resList = res.list || res
128
+ resList = Array.isArray(resList) ? resList : [resList]
128
129
 
129
- // 特殊业务处理
130
- if (this.father && optionsIndex === 0) {
131
- let newOptions = []
132
- that.options[optionsIndex] = resList
133
- that.options[optionsIndex].map(item => {
134
- if (!item.fatherNo) {
130
+ // 特殊业务处理
131
+ if (this.father && optionsIndex === 0) {
132
+ let newOptions = []
133
+ that.options[optionsIndex] = resList
134
+ that.options[optionsIndex].map((item) => {
135
+ if (!item.fatherNo) {
136
+ item.label = item[this.labelKey]
137
+ item.value = item[this.valueKey]
138
+ newOptions.push(item)
139
+ }
140
+ })
141
+ that.options[optionsIndex] = newOptions
142
+ } else {
143
+ // alert(1)
144
+ console.log(resList[0].children)
145
+ let newOptions = resList[0].children
146
+ newOptions.map((item) => {
135
147
  item.label = item[this.labelKey]
136
148
  item.value = item[this.valueKey]
137
- newOptions.push(item)
138
- }
139
- })
140
- that.options[optionsIndex] = newOptions
141
- } else {
142
- // alert(1)
143
- console.log(resList[0].children)
144
- let newOptions = resList[0].children
145
- newOptions.map(item => {
146
- item.label = item[this.labelKey]
147
- item.value = item[this.valueKey]
149
+ })
150
+
151
+ that.options[optionsIndex] = newOptions
152
+ }
153
+
154
+ that.$nextTick(() => {
155
+ that.$forceUpdate()
148
156
  })
149
-
150
- that.options[optionsIndex] = newOptions
151
-
152
- }
153
-
154
- that.$nextTick(() => {
155
- that.$forceUpdate()
156
157
  })
157
- }).catch(() => {})
158
-
158
+ .catch(() => {})
159
159
  },
160
160
  inputChange(i) {
161
161
  switch (i) {
162
162
  case 0:
163
- this._value[1] = ''
164
- this._value[2] = ''
165
- this.request(`${this.url}?${this.valueKey}=${this._value[i]}`, 1)
166
- break;
163
+ this._value[1] = ''
164
+ this._value[2] = ''
165
+ this.request(`${this.url}?${this.valueKey}=${this._value[i]}`, 1)
166
+ break
167
167
  case 1:
168
- this._value[2] = ''
169
- this.request(`${this.url}?${this.valueKey}=${this._value[i]}`, 2)
170
- break;
168
+ this._value[2] = ''
169
+ this.request(`${this.url}?${this.valueKey}=${this._value[i]}`, 2)
170
+ break
171
171
  }
172
-
173
172
  }
174
-
175
- },
173
+ }
176
174
  }
177
175
  </script>
178
176
 
179
177
  <style scoped lang="scss">
180
178
  @import '~@/theme/theme1/styles/variables.scss';
181
- .nstc-g6-common-input-multiple{
179
+ .nstc-g6-common-input-multiple {
182
180
  display: flex;
183
181
  width: $formItemDefaultWidth;
184
182
  .nstc-g6-common-input-multiple-select {
185
183
  margin-right: 10px;
186
184
  }
187
- .input-custom{
185
+ .input-custom {
188
186
  margin-right: 10px;
189
187
  }
190
188
  }
@@ -1,38 +1,15 @@
1
1
  <template>
2
2
  <div>
3
3
  <div v-if="isSingle" class="nstc-g6-common-input-with-unit">
4
- <InputCustom
5
- v-model="_value[0]"
6
- :width="_widthConfig[0]"
7
- :maxlength="3"
8
- />
9
- <SelectCustom
10
- v-model="_value[1]"
11
- filterable
12
- :options="options"
13
- :width="_widthConfig[1]"
14
- />
4
+ <InputCustom v-model="_value[0]" :width="_widthConfig[0]" :maxlength="3" />
5
+ <SelectCustom v-model="_value[1]" filterable :options="options" :width="_widthConfig[1]" />
15
6
  </div>
16
7
  <div v-else class="nstc-g6-common-input-with-unit">
17
- <InputCustom
18
- v-model="_value[0]"
19
- :width="_widthConfig[0]"
20
- :maxlength="3"
21
- />
8
+ <InputCustom v-model="_value[0]" :width="_widthConfig[0]" :maxlength="3" />
22
9
  <span style="margin: 0 10px">到</span>
23
- <InputCustom
24
- v-model="_value[1]"
25
- :width="_widthConfig[1]"
26
- :maxlength="3"
27
- />
28
- <SelectCustom
29
- v-model="_value[2]"
30
- filterable
31
- :options="options"
32
- :width="_widthConfig[2]"
33
- />
10
+ <InputCustom v-model="_value[1]" :width="_widthConfig[1]" :maxlength="3" />
11
+ <SelectCustom v-model="_value[2]" filterable :options="options" :width="_widthConfig[2]" />
34
12
  </div>
35
-
36
13
  </div>
37
14
  </template>
38
15
 
@@ -40,11 +17,11 @@
40
17
  import InputCustom from '../InputCustom'
41
18
  import SelectCustom from '../SelectCustom'
42
19
  export default {
43
- name: "NstcInputWithUnit",
20
+ name: 'NstcInputWithUnit',
44
21
  props: {
45
22
  isSingle: {
46
23
  type: Boolean,
47
- default: false,
24
+ default: false
48
25
  },
49
26
  value: {
50
27
  type: Array,
@@ -56,9 +33,9 @@ export default {
56
33
  type: Array,
57
34
  default: () => {
58
35
  return [
59
- {label: '年', value: 3},
60
- {label: '月', value: 2},
61
- {label: '日', value: 1},
36
+ { label: '年', value: 3 },
37
+ { label: '月', value: 2 },
38
+ { label: '日', value: 1 }
62
39
  ]
63
40
  }
64
41
  },
@@ -80,7 +57,7 @@ export default {
80
57
  SelectCustom
81
58
  },
82
59
  watch: {
83
- isSingle:{
60
+ isSingle: {
84
61
  immediate: true,
85
62
  handler(val) {
86
63
  if (!val) {
@@ -117,7 +94,7 @@ export default {
117
94
 
118
95
  <style scoped lang="scss">
119
96
  @import '~@/theme/theme1/styles/variables.scss';
120
- .nstc-g6-common-input-with-unit{
97
+ .nstc-g6-common-input-with-unit {
121
98
  display: flex;
122
99
  width: $formItemDefaultWidth;
123
100
  align-items: center;
@@ -1,39 +1,36 @@
1
1
  <template>
2
2
  <SelectInDialogCustom
3
- ref="SelectInDialogCustom"
4
- v-model="model[0]"
5
- :title="title"
6
- :url="url"
7
- clearable
8
- remote
9
- :value-key="valueKey"
10
- :label-key="labelKey"
11
- width="294"
12
- :original-form="false"
13
- :original-table="false"
14
- :dialogVisibleTree="dialogVisibleTree"
3
+ ref="SelectInDialogCustom"
4
+ v-model="model[0]"
5
+ :title="title"
6
+ :url="url"
7
+ clearable
8
+ remote
9
+ :value-key="valueKey"
10
+ :label-key="labelKey"
11
+ width="294"
12
+ :original-form="false"
13
+ :original-table="false"
14
+ :dialogVisibleTree="dialogVisibleTree"
15
15
  >
16
16
  <template v-slot:table>
17
- <div style="display:flex;">
18
- <el-input
19
- class="select-dialog-custom-tree-inp"
20
- placeholder="输入关键字进行过滤"
21
- v-model="filterText">
17
+ <div style="display: flex">
18
+ <el-input class="select-dialog-custom-tree-inp" placeholder="输入关键字进行过滤" v-model="filterText">
22
19
  </el-input>
23
20
  <el-button
24
21
  type="primary"
25
- style="margin-left: 20px;"
22
+ style="margin-left: 20px"
26
23
  class="nstc-g6-common-btn-1 nstc-g6-common-btn-size-b"
27
24
  @click.stop="handleQuery"
28
25
  >
29
26
  查询
30
27
  </el-button>
31
28
  </div>
32
-
33
- <div style="height:300px;overflow:scroll;">
29
+
30
+ <div style="height: 300px; overflow: scroll">
34
31
  <el-tree
35
32
  class="filter-tree"
36
- style="margin:20px;"
33
+ style="margin: 20px"
37
34
  :data="data"
38
35
  :props="defaultProps"
39
36
  :node-key="nodeKey"
@@ -47,24 +44,14 @@
47
44
  >
48
45
  </el-tree>
49
46
  </div>
50
- <div style='text-align:center;'>
51
- <el-button
52
- type="primary"
53
- class="nstc-g6-common-btn-1 nstc-g6-common-btn-size-b"
54
- @click.stop="handleclick"
55
- >
47
+ <div style="text-align: center">
48
+ <el-button type="primary" class="nstc-g6-common-btn-1 nstc-g6-common-btn-size-b" @click.stop="handleclick">
56
49
  确认
57
50
  </el-button>
58
- <el-button
59
- class="nstc-g6-common-btn-1 nstc-g6-common-btn-size-b"
60
- @click.stop="handleClear"
61
- >
62
- 取消
63
- </el-button>
64
- </div>
51
+ <el-button class="nstc-g6-common-btn-1 nstc-g6-common-btn-size-b" @click.stop="handleClear"> 取消 </el-button>
52
+ </div>
65
53
  </template>
66
54
  </SelectInDialogCustom>
67
-
68
55
  </template>
69
56
 
70
57
  <script>
@@ -73,9 +60,9 @@ export default {
73
60
  name: 'SelectTreeDialog',
74
61
 
75
62
  components: {
76
- SelectInDialogCustom,
63
+ SelectInDialogCustom
77
64
  },
78
-
65
+
79
66
  computed: {
80
67
  _value: {
81
68
  get() {
@@ -98,41 +85,56 @@ export default {
98
85
  },
99
86
  data: {
100
87
  type: Array,
101
- default: () => [{
88
+ default: () => [
89
+ {
102
90
  id: 1,
103
91
  label: '一级 1',
104
- children: [{
105
- id: 4,
106
- label: '二级 1-1',
107
- children: [{
108
- id: 9,
109
- label: '三级 1-1-1'
110
- }, {
111
- id: 10,
112
- label: '三级 1-1-2'
113
- }]
114
- }]
115
- }, {
92
+ children: [
93
+ {
94
+ id: 4,
95
+ label: '二级 1-1',
96
+ children: [
97
+ {
98
+ id: 9,
99
+ label: '三级 1-1-1'
100
+ },
101
+ {
102
+ id: 10,
103
+ label: '三级 1-1-2'
104
+ }
105
+ ]
106
+ }
107
+ ]
108
+ },
109
+ {
116
110
  id: 2,
117
111
  label: '一级 2',
118
- children: [{
119
- id: 5,
120
- label: '二级 2-1'
121
- }, {
122
- id: 6,
123
- label: '二级 2-2'
124
- }]
125
- }, {
112
+ children: [
113
+ {
114
+ id: 5,
115
+ label: '二级 2-1'
116
+ },
117
+ {
118
+ id: 6,
119
+ label: '二级 2-2'
120
+ }
121
+ ]
122
+ },
123
+ {
126
124
  id: 3,
127
125
  label: '一级 3',
128
- children: [{
129
- id: 7,
130
- label: '二级 3-1'
131
- }, {
132
- id: 8,
133
- label: '二级 3-2'
134
- }]
135
- }]
126
+ children: [
127
+ {
128
+ id: 7,
129
+ label: '二级 3-1'
130
+ },
131
+ {
132
+ id: 8,
133
+ label: '二级 3-2'
134
+ }
135
+ ]
136
+ }
137
+ ]
136
138
  },
137
139
  defaultProps: {
138
140
  type: Object,
@@ -143,7 +145,7 @@ export default {
143
145
  }
144
146
  }
145
147
  },
146
- valueKey :{
148
+ valueKey: {
147
149
  type: String,
148
150
  default: 'prop1'
149
151
  },
@@ -162,25 +164,24 @@ export default {
162
164
  nodeKey: {
163
165
  type: String,
164
166
  default: 'id'
165
- },
166
-
167
+ }
167
168
  },
168
169
 
169
170
  data() {
170
171
  return {
171
172
  filterText: '',
172
173
  model: [{ prop1: '1', prop2: '' }],
173
- dialogVisibleTree: false,
174
+ dialogVisibleTree: false
174
175
  }
175
176
  },
176
177
 
177
178
  methods: {
178
179
  filterNode(value, data) {
179
- if (!value) return true;
180
- return data.label.indexOf(value) !== -1;
180
+ if (!value) return true
181
+ return data.label.indexOf(value) !== -1
181
182
  },
182
183
  handleQuery() {
183
- this.$refs.tree.filter(this.filterText);
184
+ this.$refs.tree.filter(this.filterText)
184
185
  },
185
186
  /**
186
187
  * 树节点点击事件
@@ -195,14 +196,14 @@ export default {
195
196
  this.placeholder = this.filterText
196
197
 
197
198
  this._value = data[this.nodeKey]
198
- console.log(this._value,this.nodeKey)
199
+ console.log(this._value, this.nodeKey)
199
200
 
200
201
  // 主动让input框失去交单
201
202
  // this.$refs[this.inputRefName].blur()
202
203
  this.showPopoverFlag = false
203
204
  },
204
205
  handleclick() {
205
- this.$emit('handleclick', this.filterText)
206
+ this.$emit('handleclick', this.filterText)
206
207
  this.model[0].prop2 = this.filterText
207
208
  this.model[0].prop1 = this.nodeKey
208
209
  this.$refs.SelectInDialogCustom.dialogVisible = false
@@ -219,10 +220,9 @@ export default {
219
220
  margin-right: 20px;
220
221
  }
221
222
  .el-tree-node:focus {
222
- background-color: #007AFF;
223
+ background-color: #007aff;
223
224
  }
224
225
  }
225
-
226
226
  </style>
227
227
 
228
228
  <style scoped>
@@ -4,7 +4,7 @@
4
4
  v-bind="$attrs"
5
5
  :collapse-tags="collapseTags"
6
6
  :props="calcProps"
7
- :style="{width:parseFloat(width) + 'px'}"
7
+ :style="{ width: parseFloat(width) + 'px' }"
8
8
  v-on="$listeners"
9
9
  >
10
10
  <template v-slot="scope">
@@ -72,9 +72,9 @@ export default {
72
72
  ...this.props,
73
73
  lazyLoad: this.props.lazy
74
74
  ? (node) => {
75
- // Todo 需要后端统一传参格式与返回数据的格式
76
- console.log('子选项node', node)
77
- }
75
+ // Todo 需要后端统一传参格式与返回数据的格式
76
+ console.log('子选项node', node)
77
+ }
78
78
  : undefined
79
79
  }
80
80
  }