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,356 @@
1
+ <template>
2
+ <Card :padding="0" style="padding-left:20px;padding-right:20px" dis-hover>
3
+ <p @click="toggle" style="cursor:pointer;margin-top: 14px;margin-bottom:14px;" >
4
+ <template v-if="!isAdd">
5
+ <Row type="flex" :gutter="0" align="middle">
6
+ <Col span="18">
7
+ <Icon custom='iconfont icon-custom-pack' color="#f3b352" v-show="showForm" size="14" />
8
+ <Icon v-show="!showForm" color="#f3b352" custom='iconfont icon-custom-spread' size="14"/>
9
+ <span style="margin-left:16px;font-size: 14px;font-weight:bold" v-text="title" />
10
+ </Col>
11
+ <Col span="6" v-show="showForm" >
12
+ <Row type="flex" justify="end" align="middle" :gutter="0">
13
+ <Col>
14
+ <Button style="float:right" size="small" customIcon="iconfont icon-custom-recallcard" type="text" :disabled="btnReadOnly" @click.stop="resetRow" >撤消</Button>
15
+ </Col>
16
+ <Col >
17
+ <Divider type="vertical" style="margin: 0 15px 0 15px;float:right"/>
18
+ </Col>
19
+ <Col>
20
+ <Button style="float:right" size="small" customIcon="iconfont icon-custom-delcard" type="text" :disabled="btnReadOnly" @click.stop="delBatchRow">删除</Button>
21
+ </Col>
22
+ </Row>
23
+ </Col>
24
+ </Row>
25
+ <Divider type="vertical" style="margin: 0 15px 0 15px;float:right"/>
26
+ </template>
27
+ <template v-else>
28
+ <Badge status="processing" text="新增项" />
29
+ </template>
30
+ </p>
31
+ <Divider v-show="showForm" style="margin-top:0px;margin-bottom:10px;"/>
32
+ <div v-show="showForm" style="padding-left:10px">
33
+ <Formcard ref="form" :key="myConfig.name" :config="myConfig" :dictData="dictData" @doAction="doAction"/>
34
+ <Divider v-show="showChildrenGrid" style="margin-bottom:10px;margin-top: 10px;"/>
35
+ <EditGridCard v-show="showChildrenGrid" ref="grid" :config="gridConfig" :dictData="dictData" >
36
+ <template #header>
37
+ <Row type="flex" justify="start" align="middle" :gutter="0" style="margin-bottom: 10px;">
38
+ <Col v-if="showAddBtn">
39
+ <Button customIcon="iconfont icon-custom-rowadd" type="text" size="small" :disabled="btnReadOnly" @click="addRow" >添加</Button>
40
+ </Col>
41
+ <Col v-if="showAddBtn && showDelBatchBtn">
42
+ <Divider type="vertical" style="margin: 0 15px 0 15px;height: 20px"/>
43
+ </Col>
44
+ <Col v-if="showDelBatchBtn">
45
+ <Button customIcon="iconfont icon-custom-rowdel" size="small" type="text" :disabled="btnReadOnly" @click="delRow">删除</Button>
46
+ </Col>
47
+ </Row>
48
+ </template>
49
+ </EditGridCard>
50
+ <Row v-if="isAdd" type="flex" justify="end" align="middle" style="margin-top: 10px;margin-bottom: 10px;" :gutter="16">
51
+ <Col>
52
+ <Button style="width:84px" @click="cancel">取消</Button>
53
+ </Col>
54
+ <Col>
55
+ <Button style="width:84px" type="info" @click="save">确认</Button>
56
+ </Col>
57
+ </Row>
58
+ </div>
59
+ </Card>
60
+ </template>
61
+
62
+ <script>
63
+ import Formcard from './formcard.vue';
64
+ import EditGridCard from './editgridcard.vue';
65
+ export default {
66
+ name:'mformdetail',
67
+ components:{Formcard,EditGridCard},
68
+ data () {
69
+ return {
70
+ editFlag:false,
71
+ showChildrenGrid:false,
72
+ gridConfig:{},
73
+ myConfig:{},
74
+ readOnly:false,
75
+ btnReadOnly:false,
76
+ showAddBtn:true,
77
+ showDelBatchBtn:true,
78
+ showForm:true
79
+ };
80
+ },
81
+ props:{
82
+ config:{
83
+ type:Object,
84
+ default:null
85
+ },
86
+ valueData:{
87
+ type:Object,
88
+ default () {
89
+ return {};
90
+ }
91
+ },
92
+ dictData: {
93
+ type: Object,
94
+ default:null
95
+ },
96
+ index:{
97
+ type:String,
98
+ default:''
99
+ },
100
+ curlIndex:{
101
+ type:[String,Number],
102
+ default:''
103
+ },
104
+ isAdd:{
105
+ type:Boolean,
106
+ default:false
107
+ }
108
+ },
109
+ created () {
110
+ this.init();
111
+ },
112
+ computed: {
113
+ title() {
114
+ let title = '标题';
115
+ if (this.config.titleName) {
116
+ if (this.valueData[this.config.titleName]) {
117
+ title = this.valueData[this.config.titleName];
118
+ }
119
+ }
120
+ let titlePrefix = '#';
121
+ if (this.config.titlePrefix) {
122
+ titlePrefix = this.config.titlePrefix;
123
+ }
124
+ let resultTitle = titlePrefix + (Number(this.index)+1) + ' ' + title;
125
+ return resultTitle;
126
+ }
127
+ },
128
+ methods:{
129
+ init () {
130
+ this.myConfig = Object.assign({},this.myConfig, this.config.formConfig);
131
+ if (this.config.showEffectValue !== undefined) {
132
+ this.myConfig.showEffectValue = this.config.showEffectValue;
133
+ }
134
+ this.myConfig.modetype = '3';
135
+ if (this.config.gridConfig !== undefined && this.config.gridConfig.items && this.config.gridConfig.items.length > 0) {
136
+ Object.assign(this.gridConfig, this.config.gridConfig);
137
+ this.gridConfig.showCheckBox = true;
138
+ if (this.config.showEffectValue !== undefined) {
139
+ this.gridConfig.showEffectValue = this.config.showEffectValue;
140
+ }
141
+ this.gridConfig.modetype = '3';
142
+ if (this.gridConfig.showAddBtn !== undefined) {
143
+ this.showAddBtn = this.gridConfig.showAddBtn;
144
+ }
145
+ if (this.gridConfig.showDelBatchBtn !== undefined) {
146
+ this.showDelBatchBtn = this.gridConfig.showDelBatchBtn;
147
+ }
148
+ this.gridConfig.addRowBefore = this.addRowBefore;
149
+ this.gridConfig.delRowBefore = this.delRowBefore;
150
+ this.showChildrenGrid = true;
151
+ if (this.gridConfig.height === undefined) {
152
+ this.gridConfig.height = 200;
153
+ }
154
+ } else {
155
+ this.showChildrenGrid = false;
156
+ }
157
+ },
158
+ toggle () {
159
+ this.showForm = !this.showForm;
160
+ },
161
+ addRowBefore(e) {
162
+ if (this.config.gridConfig.addRowBefore) {
163
+ e.form = this.$refs.form.getData();
164
+ return this.config.gridConfig.addRowBefore(e);
165
+ }
166
+ return true;
167
+ },
168
+ delRowBefore(e) {
169
+ if (this.config.gridConfig.delRowBefore) {
170
+ e.form = this.$refs.form.getData();
171
+ return this.config.gridConfig.delRowBefore(e);
172
+ }
173
+ return true;
174
+ },
175
+ edit () {
176
+ this.editFlag = true;
177
+ if (this.$refs.form) {
178
+ this.$refs.form.setFormReadOnly(false);
179
+ }
180
+ if (this.$refs.grid) {
181
+ this.$refs.grid.setReadOnly(false);
182
+ }
183
+ let obj = {};
184
+ obj.name = 'editForm';
185
+ obj.para = {};
186
+ obj.para.curlIndex = this.curlIndex;
187
+ obj.para.formObject = this.$refs.form;
188
+ obj.para.form = this.$refs.form.getData();
189
+ if (this.$refs.grid) {
190
+ obj.para.gridObject = this.$refs.grid;
191
+ }
192
+ this.$emit('doAction', obj);
193
+ },
194
+ del () {
195
+ let obj = {};
196
+ obj.name = 'delForm';
197
+ obj.para = {};
198
+ obj.para.curlIndex = this.curlIndex;
199
+ this.$emit('doAction', obj);
200
+ },
201
+ checkValidate () {
202
+ this.$refs.form.checkValidate();
203
+ if (this.$refs.form.isError()) {
204
+ return true;
205
+ } else {
206
+ return false;
207
+ }
208
+ },
209
+ save () {
210
+ this.$refs.form.checkValidate();
211
+ if (this.$refs.form.isError()) {
212
+ return false;
213
+ }
214
+ let obj = {};
215
+ obj.name = 'saveForm';
216
+ obj.para = {};
217
+ obj.para.curlIndex = this.curlIndex;
218
+ obj.para.data = this.$refs.form.getData();
219
+ if (this.showChildrenGrid && this.$refs.grid) {
220
+ if (this.$refs.grid.checkValidate()) {
221
+ return false;
222
+ }
223
+ obj.para.data[this.config.gridName] = this.$refs.grid.getChangeData();
224
+ if (obj.para.data[this.config.gridName].length > 0 && obj.para.data.flag === undefined) {
225
+ obj.para.data.flag = 'U';
226
+ }
227
+ }
228
+ if (!this.isAdd) {
229
+ this.editFlag = false;
230
+ }
231
+ this.$emit('doAction', obj);
232
+ },
233
+ getChangeData () {
234
+ let data = this.$refs.form.getData();
235
+ if (data.flag === undefined) {
236
+ data.flag = 'U';
237
+ }
238
+ if (this.showChildrenGrid && this.$refs.grid) {
239
+ if (this.$refs.grid.checkValidate()) {
240
+ return false;
241
+ }
242
+ data[this.config.gridName] = this.$refs.grid.getChangeData();
243
+ if (data[this.config.gridName].length > 0 && data.flag === undefined) {
244
+ data.flag = 'U';
245
+ }
246
+ }
247
+ return data;
248
+ },
249
+ cancel () {
250
+ if (!this.isAdd) {
251
+ this.editFlag = false;
252
+ }
253
+ this.$refs.form.setData(this.valueData);
254
+ this.$refs.form.setFormReadOnly(true);
255
+ if (this.showChildrenGrid && this.$refs.grid) {
256
+ this.$refs.grid.setReadOnly(true);
257
+ this.$refs.grid.setData(this.valueData[this.config.gridName]);
258
+ }
259
+ let obj = {};
260
+ obj.name = 'cancelForm';
261
+ this.$emit('doAction', obj);
262
+ },
263
+
264
+ setReadOnly (value) {
265
+ this.readOnly = value;
266
+ this.btnReadOnly = value;
267
+ this.$refs.form.setFormReadOnly(value);
268
+ if (this.showChildrenGrid && this.$refs.grid) {
269
+ this.$refs.grid.setReadOnly(value);
270
+ }
271
+ },
272
+ clearData() {
273
+ this.$refs.form.clearData();
274
+ if (this.$refs.grid) {
275
+ this.$refs.grid.clearData();
276
+ }
277
+ },
278
+ isChange () {
279
+ let flag = this.$refs.form.isChange();
280
+ if (!flag) {
281
+ if (this.showChildrenGrid && this.$refs.grid) {
282
+ flag = this.$refs.grid.isChange();
283
+ }
284
+ }
285
+ return flag;
286
+ },
287
+ setFormReadOnly(value) {
288
+ this.readOnly = value;
289
+ },
290
+ setData(data) {
291
+ this.customSetData(data);
292
+ },
293
+ setEffectData(data) {
294
+ if (this.$refs.form) {
295
+ this.$refs.form.setEffectData(data);
296
+ }
297
+ if (this.showChildrenGrid && this.$refs.grid) {
298
+ let gridData = [];
299
+ if (data[this.config.gridName]) {
300
+ gridData = data[this.config.gridName];
301
+ }
302
+ this.$refs.grid.setEffectData(gridData);
303
+ }
304
+ },
305
+ getData() {
306
+ let data = this.$refs.form.getData();
307
+ if (this.showChildrenGrid && this.$refs.grid && this.config.gridName) {
308
+ data[this.config.gridName] = this.$refs.grid.getData();
309
+ }
310
+ return data;
311
+ },
312
+ customSetData(data) {
313
+ if (this.$refs.form) {
314
+ this.$refs.form.setData(data);
315
+ }
316
+ if (this.showChildrenGrid && this.$refs.grid) {
317
+ let gridData = [];
318
+ if (data[this.config.gridName]) {
319
+ gridData = data[this.config.gridName];
320
+ }
321
+ this.$refs.grid.setData(gridData);
322
+ }
323
+ },
324
+ setShowForm(value) {
325
+ this.showForm = value;
326
+ },
327
+ setBtnReadOnly(value) {
328
+ this.btnReadOnly = value;
329
+ },
330
+ addRow () {
331
+ this.$refs.grid.addRow();
332
+ },
333
+ delRow() {
334
+ this.$refs.grid.delBatchRow();
335
+ },
336
+ delBatchRow() {
337
+ let obj = {};
338
+ obj.name = 'delRowData'
339
+ obj.para = {};
340
+ obj.para.curlIndex = this.curlIndex;
341
+ this.$emit('doAction', obj);
342
+ },
343
+ resetRow() {
344
+ this.customSetData(this.valueData);
345
+ },
346
+ doAction(obj) {
347
+ this.$emit('doAction', obj);
348
+ }
349
+ },
350
+ mounted () {
351
+ this.$nextTick(()=> {
352
+ this.customSetData(this.valueData);
353
+ });
354
+ }
355
+ };
356
+ </script>
@@ -0,0 +1,227 @@
1
+ <template>
2
+ <Card :bordered="false" :padding="0" style="padding-top:14px;padding-left:16px;padding-right:16px;padding-bottom:14px" dis-hover>
3
+ <Row type="flex" justify="start" align="middle">
4
+ <Col span='18'>
5
+ <span>显示这些字段</span>
6
+ </Col>
7
+ <Col span='6'>
8
+ <Row type="flex" justify="end" align="middle" >
9
+ <Col>
10
+ <p style="cursor:pointer" @click.stop="close">
11
+ <Icon type="ios-close" size="24" />
12
+ </p>
13
+ </Col>
14
+ </Row>
15
+ </Col>
16
+ </Row>
17
+ <Card :padding="0" dis-hover style="width:330px;margin-top:20px;">
18
+ <template #title>
19
+ <p style="margin-top: 3px;margin-bottom: 3px;margin-left: 8px;margin-right: 10px;">
20
+ <span style="font-size:14px">已选择字段: </span><span style="color:#AF292E;font-size:14px">{{num}}个</span>
21
+ </p>
22
+ </template>
23
+
24
+ <div style="max-height:400px;overflow-y:auto;overflow-x:hidden;margin:14px 16px">
25
+ <VueDraggable v-model="data" @start="drag = true" :options="{animation:300}" @end="drag = false">
26
+ <Card v-for="(tmp,index) in data" :key="tmp.name + '_col_' + index " :padding="0" :bordered="false" dis-hover style="padding-top:6px;padding-bottom:6px">
27
+ <Row type="flex" justify="start" align="middle" :gutter="0" class="gridcelrow">
28
+ <Col>
29
+ <Icon custom="iconfont icon-custom-sort" class="colset" color="#A8ABB2" size="22" />
30
+ </Col>
31
+ <Col span="17" style="padding-left:14px;">
32
+ <Checkbox v-model="form[tmp.name]" @on-change="countNum"><span style="padding-left:14px;">{{tmp.label}}</span></Checkbox>
33
+ </Col>
34
+ <Col >
35
+ <Tooltip placement="left">
36
+ <template #content>
37
+ <div>
38
+ <span style="font-size:12px"> 冻结列 </span>
39
+ </div>
40
+ </template>
41
+ <p @click.stop="doFixed(tmp.name)" style="padding-right:14px;">
42
+ <Icon v-if="formFixed[tmp.name]" custom="iconfont icon-custom-fixed" color="#AF292E" size="22" />
43
+ <Icon v-else class="colset" custom="iconfont icon-custom-fixed" size="22" color="#A8ABB2" />
44
+ </p>
45
+ </Tooltip>
46
+ </Col>
47
+ <Col>
48
+ <Tooltip placement="left">
49
+ <template #content>
50
+ <div>
51
+ <span style="font-size:12px"> 置顶 </span>
52
+ </div>
53
+ </template>
54
+ <p @click.stop="doStick(index)">
55
+ <Icon custom='iconfont icon-custom-stick' class="colset" color="#A8ABB2" size="22" />
56
+ </p>
57
+ </Tooltip>
58
+ </Col>
59
+ </Row>
60
+ </Card>
61
+ </VueDraggable>
62
+ </div>
63
+ </Card>
64
+ <Row style="margin-top:14px" type="flex" justify="end" align="middle" :gutter="10" >
65
+ <Col>
66
+ <Button @click="reset" >重置</Button>
67
+ </Col>
68
+ <Col>
69
+ <Button type="info" @click="ok" >确定</Button>
70
+ </Col>
71
+ </Row>
72
+ </Card>
73
+ </template>
74
+
75
+ <script>
76
+ import {VueDraggable} from 'vue-draggable-plus';
77
+ export default {
78
+ name:'gridcolset',
79
+ components:{
80
+ VueDraggable
81
+ },
82
+ data () {
83
+ return {
84
+ myConfig:{
85
+ },
86
+ defaultData:[],
87
+ moreFlag:false,
88
+ btnItems:[],
89
+ num:0,
90
+ form:{},
91
+ data:[],
92
+ formFixed:{}
93
+ };
94
+ },
95
+ props:{
96
+ config: {
97
+ type:Object,
98
+ default:null
99
+ }
100
+ },
101
+ created () {
102
+ this.init();
103
+ },
104
+ methods: {
105
+ init () {
106
+ this.myConfig = Object.assign({},this.myConfig, this.config);
107
+ this.initData = [];
108
+ this.initform ={};
109
+ this.initFixed ={};
110
+ this.num = 0;
111
+ this.myConfig.items.forEach(el => {
112
+ if (el.visible !== false && el.key !== 'actionbtn') {
113
+ let tmp = {};
114
+ tmp.label = el.label;
115
+ if (el.name) {
116
+ tmp.name = el.name;
117
+ } else {
118
+ if (el.sname) {
119
+ tmp.name = el.sname;
120
+ }
121
+ }
122
+ this.initData.push(tmp);
123
+ this.initform[tmp.name] = true;
124
+ this.initFixed[tmp.name] = false;
125
+ this.num++;
126
+ }
127
+ });
128
+ this.data = this.$Method.copy(this.initData);
129
+ this.form = this.$Method.copy(this.initform);
130
+ this.formFixed = this.$Method.copy(this.initFixed);
131
+
132
+ },
133
+ reset() {
134
+ this.data = this.$Method.copy(this.initData);
135
+ this.$nextTick(() => {
136
+ Object.assign(this.form,this.initform);
137
+ Object.assign(this.formFixed,this.initFixed);
138
+ this.ok();
139
+ })
140
+ },
141
+ ok () {
142
+ let tmp = [];
143
+ this.data.forEach(el => {
144
+ let obj = {};
145
+ obj.name = el.name;
146
+ obj.visible = true;
147
+ obj.visible = this.form[obj.name];
148
+ if (obj.visible) {
149
+ obj.fixed =this.formFixed[obj.name];
150
+ } else {
151
+ obj.fixed = false;
152
+ }
153
+ tmp.push(obj);
154
+ });
155
+ let temp = {};
156
+ temp.name = 'saveGridCol';
157
+ temp.para = tmp;
158
+ this.$emit('doAction',temp);
159
+ },
160
+ close() {
161
+ let temp = {};
162
+ temp.name = 'closeGridCol';
163
+ this.$emit('doAction',temp);
164
+ },
165
+ doStick(index) {
166
+ let data = this.$Method.copy(this.data);
167
+ this.data = this.swapArrData(0,index,data);
168
+ },
169
+ swapArrData (index1,index2,arr) {
170
+ const temp = arr.splice(index2, 1, arr[index1]);
171
+ arr[index1] = temp[0];
172
+ return arr;
173
+ },
174
+ setData(data) {
175
+ let tmp = [];
176
+ let form = {};
177
+ let formFixed = {};
178
+ let num = 0;
179
+ data.forEach(el => {
180
+ let config = this.initData.find(el2 => el.name === el2.name);
181
+ if (config) {
182
+ tmp.push(config);
183
+ form[el.name] = el.visible;
184
+ formFixed[el.name] = el.fixed;
185
+ if (el.visible) {
186
+ num++;
187
+ } else {
188
+ formFixed[el.name] = false;
189
+ }
190
+ }
191
+ });
192
+ this.form = form;
193
+ this.formFixed = formFixed;
194
+ this.data = tmp;
195
+ this.num = num;
196
+ },
197
+ countNum() {
198
+ this.$nextTick(() => {
199
+ let num = 0;
200
+ let initFixed = {};
201
+ for(let tmp in this.form) {
202
+ if (this.form[tmp]) {
203
+ num++;
204
+ } else {
205
+ if (this.formFixed[tmp]){
206
+ initFixed[tmp] = false;
207
+ }
208
+ }
209
+ }
210
+ Object.assign(this.formFixed, initFixed);
211
+ this.num = num;
212
+ });
213
+ },
214
+ doFixed(name) {
215
+ let obj = {};
216
+ obj[name] = !this.formFixed[name];
217
+ this.formFixed = Object.assign({},this.formFixed,obj);
218
+ }
219
+ }
220
+
221
+ };
222
+ </script>
223
+ <style scoped>
224
+ .colset:hover {
225
+ color: #606266 !important;
226
+ }
227
+ </style>
@@ -0,0 +1,23 @@
1
+ import PageCustom from './page.vue';
2
+ import SimpleViewGrid from './simpleviewgrid.vue';
3
+ import SimpleTree from './simpletree.vue';
4
+ import RowBtnToolbar from './rowbtntoolbar.vue';
5
+ import DetailBtnToolbar from './detailbtntoolbar.vue';
6
+ import BillTemplate from './layouttemplate.vue';
7
+ import mListDetails from './listdetails.vue';
8
+ import mLeftListRightDetails from './leftlistrightdetails.vue';
9
+ import mLeftTreeRightDetails from './lefttreerightdetails.vue';
10
+ import mLeftListRightList from './leftlistrightlist.vue';
11
+ import mBillSingleGrid from './billsinglegrid.vue';
12
+ import mReportBill from './report.vue';
13
+ import mLevelReport from './levelreport.vue';
14
+ import mBirtReport from './birtreport.vue';
15
+ import mAppendixBoxs from './appendix.vue';
16
+ import ListBtnToolbar from './listbtntoolbar.vue';
17
+ import PromptMessages from './promptmessage.vue';
18
+ import BillOperLog from './operlog.vue';
19
+ import mFormCardBox from './formcard.vue';
20
+ import mEditGridCard from './editgridcard.vue';
21
+ import mBillAsyncImport from './billasyncimport.vue';
22
+ import mBillImport from './billimport.vue';
23
+ export {RowBtnToolbar,PageCustom,SimpleViewGrid,DetailBtnToolbar,BillTemplate,SimpleTree,mListDetails,mLeftListRightDetails,mLeftTreeRightDetails,mLeftListRightList,mBillSingleGrid,mReportBill,mLevelReport,mBirtReport,ListBtnToolbar,mAppendixBoxs,PromptMessages,BillOperLog,mFormCardBox,mEditGridCard,mBillImport,mBillAsyncImport};
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div>
3
+ <component ref="layout" :is="uiLayoutType" :config="uiconfig" :dictData="globalConfig.dictData" :moduleMethod="globalConfig.userModuleMethod" @doAction="doAction" />
4
+ <Modal title="附件" v-model="showDetailAppendix" :width="appendixCurrentWidth" :footer-hide="true">
5
+ <AppendixBoxs v-if="detalAppendixFlag" ref="detailappendix" :config="billDetailAppendixConfig" @doAction="doAction"/>
6
+ </Modal>
7
+ <Modal title="模版打印" v-model="showPrintMode" :width="appendixCurrentWidth" :footer-hide="true" :fullscreen="true">
8
+ <iframe ref="iframetemplate" v-if="printModeReset" :src="printModeUrl" width="100%" height="100%" allowtransparency="true" frameborder="0" ></iframe>
9
+ </Modal>
10
+ <BillAsyncImport v-if="importReset" ref="billAsyncImport" :config="billAsyncImportConfig" />
11
+ <BillImport v-if="importReset" ref="billImport" :config="billImportConfig"> </BillImport>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ import Base from './base.vue';
17
+ import AppendixBoxs from './appendix.vue';
18
+ import BillAsyncImport from './billasyncimport.vue';
19
+ import BillImport from './billimport.vue';
20
+ export default {
21
+ name:'BillTemplate',
22
+ extends: Base,
23
+ components:{AppendixBoxs,BillAsyncImport,BillImport},
24
+ computed: {
25
+ uiLayoutType () {
26
+ return 'm' + this.uiconfig.layoutType;
27
+ },
28
+ appendixCurrentWidth () {
29
+ return this.$Store.state.app.clientWidth * 0.8;
30
+ },
31
+ },
32
+ };
33
+ </script>