ocpview-plus 0.0.1

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 (195) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/dist/efviewplus.min.esm.js +99954 -0
  4. package/dist/efviewplus.min.js +142 -0
  5. package/dist/locale/lang.js +1 -0
  6. package/dist/locale/zh-CN.js +1 -0
  7. package/dist/locale/zh-TW.js +1 -0
  8. package/dist/locale/zh-UG.js +1 -0
  9. package/dist/style.css +9 -0
  10. package/dist/styles/efviewplus.css +1 -0
  11. package/package.json +144 -0
  12. package/src/components/base/controlbase.vue +191 -0
  13. package/src/components/base/controlbox.vue +102 -0
  14. package/src/components/base/index.js +3 -0
  15. package/src/components/base/load.js +20 -0
  16. package/src/components/base/probase.js +220 -0
  17. package/src/components/base/size.js +78 -0
  18. package/src/components/billbox/billbox.vue +68 -0
  19. package/src/components/billbox/index.js +2 -0
  20. package/src/components/cascaderbox/cascaderbox.vue +184 -0
  21. package/src/components/cascaderbox/index.js +2 -0
  22. package/src/components/checkbox/checkbox.vue +76 -0
  23. package/src/components/checkbox/checkgroupbox.vue +104 -0
  24. package/src/components/checkbox/index.js +3 -0
  25. package/src/components/colorbox/colorbox.vue +44 -0
  26. package/src/components/colorbox/index.js +2 -0
  27. package/src/components/combobox/combobox.vue +220 -0
  28. package/src/components/combobox/index.js +2 -0
  29. package/src/components/conditionbox/conditionbase.vue +195 -0
  30. package/src/components/conditionbox/conditionbox.vue +63 -0
  31. package/src/components/conditionbox/conditionfilterbox.vue +477 -0
  32. package/src/components/conditionbox/conditionselectorbox.vue +237 -0
  33. package/src/components/conditionbox/index.js +5 -0
  34. package/src/components/conditionbox/queryconditionbox.vue +26 -0
  35. package/src/components/conditionbox/queryconditionboxbase.vue +124 -0
  36. package/src/components/conditionbox/searchconditionbox.vue +114 -0
  37. package/src/components/conditionbox/searchgrid.vue +391 -0
  38. package/src/components/datebox/datebox.vue +129 -0
  39. package/src/components/datebox/daterangebox.vue +155 -0
  40. package/src/components/datebox/index.js +3 -0
  41. package/src/components/form/baseform.vue +677 -0
  42. package/src/components/form/detailsbox.vue +487 -0
  43. package/src/components/form/formbox.vue +29 -0
  44. package/src/components/form/formcardbox.vue +268 -0
  45. package/src/components/form/formcardgroupbox.vue +252 -0
  46. package/src/components/form/formcompro.js +19 -0
  47. package/src/components/form/formdetail.vue +129 -0
  48. package/src/components/form/formdetailtwo.vue +302 -0
  49. package/src/components/form/index.js +8 -0
  50. package/src/components/form/toolanchor.js +46 -0
  51. package/src/components/form/workform.vue +168 -0
  52. package/src/components/grid/basegrid.vue +1061 -0
  53. package/src/components/grid/editgrid.vue +51 -0
  54. package/src/components/grid/editgridbase.vue +947 -0
  55. package/src/components/grid/editgridcard.vue +193 -0
  56. package/src/components/grid/expandrow.vue +137 -0
  57. package/src/components/grid/index.js +6 -0
  58. package/src/components/grid/viewgrid.vue +122 -0
  59. package/src/components/grid/viewgridbase.vue +1284 -0
  60. package/src/components/icon/common-icon.vue +53 -0
  61. package/src/components/icon/eicon.vue +29 -0
  62. package/src/components/icon/icons.vue +42 -0
  63. package/src/components/icon/index.js +2 -0
  64. package/src/components/label/index.js +3 -0
  65. package/src/components/label/showtext.vue +95 -0
  66. package/src/components/load/loadcartoon.vue +228 -0
  67. package/src/components/map/index.js +2 -0
  68. package/src/components/map/mapbox.vue +348 -0
  69. package/src/components/masterplate/appendix.vue +586 -0
  70. package/src/components/masterplate/approval.vue +803 -0
  71. package/src/components/masterplate/base.vue +985 -0
  72. package/src/components/masterplate/billasyncimport.vue +614 -0
  73. package/src/components/masterplate/billconditionbox.vue +224 -0
  74. package/src/components/masterplate/billconditionsbox.vue +427 -0
  75. package/src/components/masterplate/billdetailform.vue +990 -0
  76. package/src/components/masterplate/billimport.vue +263 -0
  77. package/src/components/masterplate/billquerygrid.vue +316 -0
  78. package/src/components/masterplate/billsinglegrid.vue +234 -0
  79. package/src/components/masterplate/birtreport.vue +185 -0
  80. package/src/components/masterplate/detailbtntoolbar.vue +311 -0
  81. package/src/components/masterplate/detailsbox.vue +386 -0
  82. package/src/components/masterplate/editgridcard.vue +222 -0
  83. package/src/components/masterplate/editgridcard2.vue +109 -0
  84. package/src/components/masterplate/formcard.vue +106 -0
  85. package/src/components/masterplate/formcardgroupbox.vue +168 -0
  86. package/src/components/masterplate/formdetailtwo.vue +356 -0
  87. package/src/components/masterplate/gridcolset.vue +227 -0
  88. package/src/components/masterplate/index.js +23 -0
  89. package/src/components/masterplate/layouttemplate.vue +33 -0
  90. package/src/components/masterplate/leftlistrightdetails.vue +474 -0
  91. package/src/components/masterplate/leftlistrightlist.vue +465 -0
  92. package/src/components/masterplate/lefttreerightdetails.vue +619 -0
  93. package/src/components/masterplate/levelreport.vue +510 -0
  94. package/src/components/masterplate/listbtntoolbar.vue +257 -0
  95. package/src/components/masterplate/listdetails.vue +769 -0
  96. package/src/components/masterplate/operlog.vue +272 -0
  97. package/src/components/masterplate/options.vue +110 -0
  98. package/src/components/masterplate/page.vue +102 -0
  99. package/src/components/masterplate/promptmessage.vue +74 -0
  100. package/src/components/masterplate/querybar.vue +490 -0
  101. package/src/components/masterplate/report.vue +357 -0
  102. package/src/components/masterplate/rowbtntoolbar.vue +126 -0
  103. package/src/components/masterplate/simpletree.vue +129 -0
  104. package/src/components/masterplate/simpleviewgrid.vue +144 -0
  105. package/src/components/mychart/bar/bar.vue +202 -0
  106. package/src/components/mychart/basechart.vue +190 -0
  107. package/src/components/mychart/complexmychart/barline.vue +154 -0
  108. package/src/components/mychart/gauge/gauge.vue +83 -0
  109. package/src/components/mychart/index.js +9 -0
  110. package/src/components/mychart/line/line.vue +202 -0
  111. package/src/components/mychart/liquidfill/liquidfill.vue +109 -0
  112. package/src/components/mychart/pie/pie.vue +96 -0
  113. package/src/components/mychart/radar/radar.vue +122 -0
  114. package/src/components/mychart/scatter/scatter.vue +76 -0
  115. package/src/components/numberbox/append.js +11 -0
  116. package/src/components/numberbox/index.js +3 -0
  117. package/src/components/numberbox/numberbox.vue +303 -0
  118. package/src/components/numberbox/numberrangebox.vue +423 -0
  119. package/src/components/picturebox/filebox.vue +365 -0
  120. package/src/components/picturebox/index.js +3 -0
  121. package/src/components/picturebox/picturebox.vue +541 -0
  122. package/src/components/picturebox/uploadbox.vue +164 -0
  123. package/src/components/poptagbox/index.js +2 -0
  124. package/src/components/poptagbox/poptagbox.vue +389 -0
  125. package/src/components/poptextbox/index.js +2 -0
  126. package/src/components/poptextbox/poptextbox.vue +601 -0
  127. package/src/components/radiobox/index.js +2 -0
  128. package/src/components/radiobox/radiogroupbox.vue +76 -0
  129. package/src/components/richtextbox/editor.vue +150 -0
  130. package/src/components/richtextbox/index.js +2 -0
  131. package/src/components/richtextbox/richtextbox.vue +448 -0
  132. package/src/components/textbox/index.js +2 -0
  133. package/src/components/textbox/textbox.vue +98 -0
  134. package/src/components/timebox/index.js +2 -0
  135. package/src/components/timebox/timebox.vue +76 -0
  136. package/src/components/toolbar/ebutton.vue +169 -0
  137. package/src/components/toolbar/index.js +3 -0
  138. package/src/components/toolbar/toolbar.vue +446 -0
  139. package/src/components/tree/basetree.vue +725 -0
  140. package/src/components/tree/index.js +3 -0
  141. package/src/components/tree/treedata.vue +51 -0
  142. package/src/components/tree/treedatabase.vue +189 -0
  143. package/src/components/upload/billimport.vue +233 -0
  144. package/src/components/upload/index.js +2 -0
  145. package/src/components/videobox/index.js +2 -0
  146. package/src/components/videobox/uploadbox.vue +148 -0
  147. package/src/components/videobox/videobox.vue +503 -0
  148. package/src/components/wrichtextbox/editor.vue +219 -0
  149. package/src/components/wrichtextbox/index.js +2 -0
  150. package/src/components/wrichtextbox/wrichtextbox.vue +63 -0
  151. package/src/index.js +215 -0
  152. package/src/locale/format.js +51 -0
  153. package/src/locale/index.js +63 -0
  154. package/src/locale/lang/zh-CN.js +123 -0
  155. package/src/locale/lang/zh-TW.js +114 -0
  156. package/src/locale/lang/zh-UG.js +115 -0
  157. package/src/locale/lang.js +15 -0
  158. package/src/method/case/case.js +1180 -0
  159. package/src/method/config/queryconfig.js +24 -0
  160. package/src/method/const/const.js +815 -0
  161. package/src/method/index.js +8 -0
  162. package/src/static/excel/exportexcel.js +627 -0
  163. package/src/static/iview/coustom.js +463 -0
  164. package/src/store/index.js +19 -0
  165. package/src/store/modules/app.js +53 -0
  166. package/src/styles/README.md +3 -0
  167. package/src/styles/common.less +75 -0
  168. package/src/styles/components/anchor.less +74 -0
  169. package/src/styles/components/approval.less +136 -0
  170. package/src/styles/components/button.less +208 -0
  171. package/src/styles/components/card.less +51 -0
  172. package/src/styles/components/content.less +38 -0
  173. package/src/styles/components/font.less +314 -0
  174. package/src/styles/components/form.less +72 -0
  175. package/src/styles/components/iconfont/fonts/iconfont.less +1376 -0
  176. package/src/styles/components/iconfont/fonts/iconfont.svg +699 -0
  177. package/src/styles/components/iconfont/fonts/iconfont.ttf +0 -0
  178. package/src/styles/components/iconfont/fonts/iconfont.woff +0 -0
  179. package/src/styles/components/iconfont/fonts/iconfont.woff2 +0 -0
  180. package/src/styles/components/index.less +16 -0
  181. package/src/styles/components/input.less +290 -0
  182. package/src/styles/components/modal.less +203 -0
  183. package/src/styles/components/page.less +340 -0
  184. package/src/styles/components/select.less +361 -0
  185. package/src/styles/components/steps.less +367 -0
  186. package/src/styles/components/table.less +544 -0
  187. package/src/styles/components/tabs.less +249 -0
  188. package/src/styles/components/upload.less +83 -0
  189. package/src/styles/custom.less +67 -0
  190. package/src/styles/index.less +6 -0
  191. package/src/styles/pack.less +6 -0
  192. package/src/utils/EfuMessenger.js +155 -0
  193. package/src/utils/assist.js +353 -0
  194. package/src/utils/index.js +1 -0
  195. package/src/utils/random_str.js +10 -0
@@ -0,0 +1,220 @@
1
+ <template>
2
+ <div v-show="myConfig.visible">
3
+ <Select ref="myControl" v-model="value" :transfer="myConfig.transfer" :multiple="myConfig.multiSelect" :max-tag-count="myConfig.maxTagCount" :size="myConfig.size" :disabled="myConfig.readOnly" :clearable="myConfig.clearable" @on-change="_setFatherValue" :filterable="myConfig.filterable" :placeholder="myConfig.placeholder" @on-open-change="onOpenChange">
4
+ <template v-if="!myConfig.showOptionGroup">
5
+ <template v-if="myConfig.readOnly">
6
+ <Option v-for="(item) in myConfig.data" :value="item[myConfig.valueField]" :key="item[myConfig.valueField]">{{item.label}}</Option>
7
+ </template>
8
+ <template v-else>
9
+ <Option v-for="(item) in myConfig.data" v-show="item.visible" :value="item[myConfig.valueField]" :key="item[myConfig.valueField]">{{item.label}}</Option>
10
+ </template>
11
+ </template>
12
+ <template v-else>
13
+ <OptionGroup v-for="(item,index) in myConfig.data" :label="item.label" :key="'option_' + index">
14
+ <template v-if="myConfig.readOnly">
15
+ <Option v-for="(item2) in item.data" :value="item2[myConfig.valueField]" :key="item2[myConfig.valueField]">{{item2.label}}</Option>
16
+ </template>
17
+ <template v-else>
18
+ <Option v-for="(item2) in item.data" v-show="item2.visible" :value="item2[myConfig.valueField]" :key="item2[myConfig.valueField]">{{item2.label}}</Option>
19
+ </template>
20
+ </OptionGroup>
21
+ </template>
22
+ </Select>
23
+ </div>
24
+ </template>
25
+ <script>
26
+ import Base from '@/components/base/controlbase.vue';
27
+ export default {
28
+ name: 'combobox',
29
+ extends: Base,
30
+ data () {
31
+ return {
32
+ myConfig: {
33
+ data:[],
34
+ valueField: 'code',
35
+ textField: 'name',
36
+ maxTagCount: 2,
37
+ codeWithName: true ,
38
+ defaultValue:'',
39
+ filterable:false,
40
+ clearable:true,
41
+ readOnly:false,
42
+ showOptionGroup:false,
43
+ multiSelect:false,
44
+ editData:[],
45
+ showNullItem:false,
46
+ filterData:null,
47
+ transfer:false
48
+ }
49
+ };
50
+ },
51
+ methods:{
52
+ fatherValueToValue (value) {
53
+ if (this.myConfig.multiSelect) {
54
+ return value;
55
+ } else {
56
+ return value + '';
57
+ }
58
+ },
59
+ watchCustomFatherValue() {
60
+ let para= {};
61
+ let flag = false;
62
+ if (!this.myConfig.multiSelect && this.value === '') {
63
+ if (!this.myConfig.showNullItem && this.myConfig.data.length === 1) {
64
+ if (this.myConfig.required) {
65
+ if (this.myConfig.showOptionGroup) {
66
+ if (this.myConfig.data[0].data.length === 1) {
67
+ this.value = this.myConfig.data[0].data[0][this.myConfig.valueField];
68
+ flag = true;
69
+ }
70
+ } else {
71
+ this.value = this.myConfig.data[0][this.myConfig.valueField];
72
+ flag = true;
73
+ }
74
+ }
75
+ para.value = this.value;
76
+ }
77
+ } else {
78
+ para.value = this.value;
79
+ }
80
+ this.oldValue = this.value;
81
+ if (flag) {
82
+ this.$nextTick(() =>{
83
+ para.name = this.myConfig.name;
84
+ this.$emit('inputValue', para);
85
+ });
86
+ }
87
+ },
88
+ setPro (obj) {
89
+ if (this.setCustomPro) {
90
+ obj = this.setCustomPro(obj);
91
+ }
92
+ if (obj) {
93
+ this.myConfig = Object.assign({}, this.myConfig, obj);
94
+ }
95
+ },
96
+ isOptionShow(temp) {
97
+ if (this.myConfig.readOnly) {
98
+ return true;
99
+ } else {
100
+ return temp.visible;
101
+ }
102
+ },
103
+ setCustomPro(obj) {
104
+ if (obj.data !== undefined && obj.data.length > 0) {
105
+ this.editData = [];
106
+ if (this.myConfig.showOptionGroup) {
107
+ obj.forEach(el => {
108
+ let temp = this.$Method.copy(el);
109
+ temp.data = [];
110
+ el.data.forEach(el2 => {
111
+ if (this.myConfig.codeWithName) {
112
+ el2.label = '['+ el2[this.myConfig.valueField]+']' + el2[this.myConfig.textField];
113
+ } else {
114
+ el2.label =el2[this.myConfig.textField];
115
+ }
116
+ if (this.myConfig.filterData) {
117
+ el2.visible = this.myConfig.filterData(el2);
118
+ } else {
119
+ el2.visible = this.doDictGroupKey(el2);
120
+ }
121
+ });
122
+ });
123
+ } else {
124
+ obj.data.forEach(el => {
125
+ if (this.myConfig.codeWithName) {
126
+ el.label = '['+ el[this.myConfig.valueField]+']' + el[this.myConfig.textField];
127
+ } else {
128
+ el.label =el[this.myConfig.textField];
129
+ }
130
+ if (this.myConfig.filterData) {
131
+ el.visible = this.myConfig.filterData(el);
132
+ } else {
133
+ el.visible = this.doDictGroupKey(el);
134
+ }
135
+ });
136
+ }
137
+
138
+ }
139
+ return obj;
140
+ },
141
+ customInit() {
142
+ this.editData = [];
143
+ if (this.myConfig.data && this.myConfig.data.length > 0) {
144
+ if (this.myConfig.showOptionGroup) {
145
+ this.myConfig.data.forEach(el => {
146
+ let temp = this.$Method.copy(el);
147
+ temp.data = [];
148
+ el.data.forEach(el2 => {
149
+ if (this.myConfig.codeWithName) {
150
+ el2.label = '['+ el2[this.myConfig.valueField]+']' + el2[this.myConfig.textField];
151
+ } else {
152
+ if (el2[this.myConfig.textField]) {
153
+ el2.label =el2[this.myConfig.textField];
154
+ } else {
155
+ el2.label =el2[this.myConfig.valueField];
156
+ }
157
+ }
158
+ if (this.myConfig.filterData) {
159
+ el2.visible = this.myConfig.filterData(el2);
160
+ } else {
161
+ el2.visible = this.doDictGroupKey(el2);
162
+ }
163
+ });
164
+ this.editData.push(temp);
165
+ });
166
+ } else {
167
+ this.myConfig.data.forEach(el => {
168
+ if (this.myConfig.codeWithName) {
169
+ el.label = '['+ el[this.myConfig.valueField]+']' + el[this.myConfig.textField];
170
+ } else {
171
+ if (el[this.myConfig.textField]) {
172
+ el.label =el[this.myConfig.textField];
173
+ } else {
174
+ el.label =el[this.myConfig.valueField];
175
+ }
176
+
177
+ }
178
+ if (this.myConfig.filterData) {
179
+ el.visible = this.myConfig.filterData(el);
180
+ } else {
181
+ el.visible = this.doDictGroupKey(el);
182
+ }
183
+ });
184
+ }
185
+
186
+ }
187
+ },
188
+ onOpenChange(value) {
189
+ if (this.config.onOpenChange) {
190
+ this.config.onOpenChange(value);
191
+ }
192
+ },
193
+ doDictGroupKey(el) {
194
+ if (!this.config.dictgroupkey) {
195
+ return true;
196
+ }
197
+ let dictgroupkey = this.config.dictgroupkey.split(',');
198
+ if (el.dgroup) {
199
+ let index = dictgroupkey.findIndex(tmp => tmp === el.dgroup);
200
+ if (index > -1) {
201
+ return true;
202
+ } else {
203
+ return false;
204
+ }
205
+ } else {
206
+ return true;
207
+ }
208
+ },
209
+ setFocus(value) {
210
+ if (value) {
211
+ this.$refs.myControl.$refs.reference.focus();
212
+ this.$refs.myControl.isFocused = true;
213
+ } else {
214
+ this.$refs.myControl.$refs.reference.blur();
215
+ this.$refs.myControl.isFocused = false;
216
+ }
217
+ }
218
+ }
219
+ };
220
+ </script>
@@ -0,0 +1,2 @@
1
+ import ComboBox from './combobox.vue';
2
+ export default ComboBox;
@@ -0,0 +1,195 @@
1
+ <script>
2
+ import { oneOf } from '../../utils/assist';
3
+ export default {
4
+ name: 'conditionbase',
5
+ data () {
6
+ return {
7
+ globalConfig:{
8
+ },
9
+ myConfig: {
10
+ },
11
+ clearInfo:'清空',
12
+ conditionPrior:[],
13
+ condition:[],
14
+ dataType:{},
15
+ hackReset:true,
16
+ showCondition:true
17
+ };
18
+ },
19
+ created () {
20
+ this.init();
21
+ },
22
+ props:{
23
+ config: {
24
+ type: Object,
25
+ default () {
26
+ return {};
27
+ }
28
+ },
29
+ dictData: {
30
+ type: Object,
31
+ default:null
32
+ },
33
+ isPop: {
34
+ type: Boolean,
35
+ default:false
36
+ },
37
+ modelType: {
38
+ validator (value) {
39
+ return oneOf(value, ['treeSearch', 'search','billSearch']);
40
+ },
41
+ default: 'search'
42
+ }
43
+ } ,
44
+ methods:{
45
+ init () {
46
+ //获取初期默认值
47
+ this.myConfig = Object.assign({}, this.globalConfig, this.myConfig);
48
+
49
+ //获取配置
50
+ if (this.config) {
51
+ this.myConfig = Object.assign({}, this.myConfig, this.config);
52
+ }
53
+ if (this.isPop) {
54
+ this.clearInfo = '清空';
55
+ } else {
56
+ this.clearInfo = '重置';
57
+ }
58
+
59
+ if (this.myConfig.clearInfo) {
60
+ this.clearInfo = this.myConfig.clearInfo;
61
+ }
62
+ //处理下拉框
63
+ if (this.dictData) {
64
+ if (this.myConfig.items) {
65
+ this.myConfig.items.forEach(el => {
66
+ this.initDictkey(el);
67
+ });
68
+ }
69
+ }
70
+
71
+
72
+ //特定化处理
73
+ if (this.customInit) {
74
+ this.customInit();
75
+ }
76
+ },
77
+ initDictkey(el) {
78
+ if (el.children && el.children.length > 0) {
79
+ for (let i=0;i<el.children.length; i++) {
80
+ this.initDictkey(el.children[i]);
81
+ }
82
+ } else {
83
+ if (el.dictkey) {
84
+ if (el.data === undefined) {
85
+ let dictkey = el.dictkey;
86
+ if (el.customDictkey) {
87
+ dictkey = el.customDictkey;
88
+ }
89
+ el.data = this.dictData[dictkey];
90
+ }
91
+ }
92
+ }
93
+ },
94
+ initField() {
95
+ let condition = [];
96
+ let datatype = {};
97
+ let conditionPrior = [];
98
+ if (this.myConfig.items) {
99
+ this.myConfig.items.forEach(el => {
100
+ this.initComnonField(el,condition,datatype,conditionPrior);
101
+ });
102
+ }
103
+ this.condition = condition;
104
+ this.dataType = datatype;
105
+ this.conditionPrior = conditionPrior;
106
+ },
107
+ initComnonField(el,condition,datatype,conditionPrior) {
108
+ if (el.children && el.children.length > 0) {
109
+ for (let i=0;i<el.children.length; i++) {
110
+ this.initComnonField(el.children[i],condition,datatype,conditionPrior);
111
+ }
112
+ } else {
113
+ if (el.condition || el.conditionPrior) {
114
+ let obj = {};
115
+ obj.code = el.name;
116
+ if (el.label) {
117
+ obj.name = el.label;
118
+ } else {
119
+ obj.name = el.name;
120
+ }
121
+ let tempObj = this.$Method.copy(el);
122
+ tempObj.readOnly = false;
123
+ tempObj.visible = true;
124
+ tempObj.defaultValue = '';
125
+ tempObj.required = false;
126
+ obj.config = tempObj;
127
+ datatype[obj.code] = tempObj;
128
+ condition.push(obj);
129
+ if (el.conditionPrior) {
130
+ conditionPrior.push(obj);
131
+ }
132
+ }
133
+ }
134
+ },
135
+
136
+ clear() {
137
+ let temp = {};
138
+ temp.action = 'condition_clear';
139
+ if (this.customClear) {
140
+ this.customClear();
141
+ }
142
+ this.$emit('conditionAction',temp);
143
+ },
144
+ ok() {
145
+ let temp = {};
146
+ temp.action = 'condition_ok';
147
+ this.$emit('conditionAction',temp);
148
+ },
149
+ cancel() {
150
+ let temp = {};
151
+ temp.action = 'condition_cancel';
152
+ this.$emit('conditionAction',temp);
153
+ },
154
+ search() {
155
+ let temp = {};
156
+ temp.action = 'condition_search';
157
+ temp.para = this.getQuerySearchParam();
158
+ this.$emit('conditionAction',temp);
159
+ },
160
+ getQuerySearchParam() {
161
+ let result={};
162
+ if (!this.showCondition) {
163
+ return result;
164
+ }
165
+ if (this.customGetQuerySearchParam) {
166
+ return this.customGetQuerySearchParam();
167
+ }
168
+
169
+ },
170
+ getCommomParam(name,value,type) {
171
+ let param = {};
172
+ if (this.myConfig.response === 'report') {
173
+ param[name] = value;
174
+ return param;
175
+ }
176
+ if (type === '2') {
177
+ param[name] = {'LIKE':'%' + value + '%'};
178
+ } else if (type === '1') {
179
+ param[name] = {'==': value};
180
+ } else if (type === '5') {
181
+ param[name] = {'<>': value};
182
+ } else if (type === '3') {
183
+ param[name] = {'>=': value};
184
+ } else if (type === '4') {
185
+ param[name] = {'<=': value};
186
+ } else if (type === '6') {
187
+ param[name] = value;
188
+ }
189
+ return param;
190
+ },
191
+ }
192
+
193
+
194
+ };
195
+ </script>
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <div>
3
+ <template v-if="modelType === 'billSearch'">
4
+ <searchConditionBox ref="condition" :config="config" @conditionAction="conditionAction" :dictData="dictData" :modelType="modelType" :isPop="isPop"></searchConditionBox>
5
+ </template>
6
+ <template v-else>
7
+ <queryConditionBox ref="condition" :config="config" @conditionAction="conditionAction" :dictData="dictData" :modelType="modelType" :isPop="isPop"></queryConditionBox>
8
+ </template>
9
+ </div>
10
+ </template>
11
+ <script>
12
+ import searchConditionBox from '@/components/conditionbox/searchconditionbox.vue';
13
+ import queryConditionBox from '@/components/conditionbox/queryconditionbox.vue';
14
+ export default {
15
+ name: 'conditionbox',
16
+ components: {searchConditionBox,queryConditionBox},
17
+ props:{
18
+ config: {
19
+ type: Object,
20
+ default () {
21
+ return {};
22
+ }
23
+ },
24
+ dictData: {
25
+ type: Object,
26
+ default:null
27
+ },
28
+ isPop: {
29
+ type: Boolean,
30
+ default:false
31
+ },
32
+ modelType: {
33
+ type:String,
34
+ default: 'search'
35
+ }
36
+ } ,
37
+ methods:{
38
+ conditionAction(obj) {
39
+ this.$emit('conditionAction',obj);
40
+ },
41
+ getValue(name) {
42
+ if (this.$refs.condition.getValue) {
43
+ return this.$refs.condition.getValue(name);
44
+ } else {
45
+ return null;
46
+ }
47
+
48
+ },
49
+ setValue(name, value) {
50
+ if (this.$refs.condition.setValue) {
51
+ this.$refs.condition.setValue(name,value);
52
+ }
53
+ },
54
+ clear() {
55
+ if (this.$refs.condition.clear) {
56
+ this.$refs.condition.clear();
57
+ }
58
+ }
59
+ }
60
+
61
+
62
+ };
63
+ </script>