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,222 @@
1
+ <template>
2
+ <Card ref="card" :bordered="false" :padding="0" dis-hover>
3
+ <template v-if="myConfig.modetype === '1'">
4
+ <p v-if="showTitle" @click="toggle" style="cursor:pointer;" >
5
+ <Row type="flex" justify="start" align="middle" style="margin-top:14px;margin-bottom:14px">
6
+ <Icon custom='iconfont icon-custom-pack' color="#f3b352" v-show="showGrid" size="14" />
7
+ <Icon v-show="!showGrid" color="#f3b352" custom='iconfont icon-custom-spread' size="14"/> <span style="margin-left:10px;font-size: 14px;font-weight:bold" v-text="myConfig.title" />
8
+ </Row>
9
+ </p>
10
+ <Divider style="margin-left:24px;margin-top:0px;margin-bottom:10px;"/>
11
+ </template>
12
+ <template v-if="myConfig.modetype === '2'">
13
+ <div v-if="showTitle" style="margin-bottom:10px;">
14
+ <span class="efuture-title-verticalline"/><span style="font-size: 14px;font-weight:bold" v-text="myConfig.title" />
15
+ </div>
16
+ </template>
17
+ <div :style="divStyle">
18
+ <div v-if="$slots.header">
19
+ <slot name="header"></slot>
20
+ </div>
21
+ <Row v-else v-show="showGrid" type="flex" justify="start" align="middle" :gutter="0" style="margin-bottom: 10px;">
22
+ <Col v-if="showAddBtn">
23
+ <Button :style="btnStyle" customIcon="iconfont icon-custom-rowadd3" type="text" :disabled="myConfig.readOnly" @click="addRow" >添加</Button>
24
+ </Col>
25
+ <Col v-if="showAddBtn && showDelBatchBtn">
26
+ <Divider type="vertical" style="margin: 0 6px 0 6px;"/>
27
+ </Col>
28
+ <Col v-if="showDelBatchBtn">
29
+ <Button :style="btnStyle" customIcon="iconfont icon-custom-rowdel3" type="text" :disabled="myConfig.readOnly" @click="delBatchRow">删除</Button>
30
+ </Col>
31
+ </Row>
32
+ <Row v-show="showGrid" >
33
+ <Table ref="table" :row-class-name="rowClassName" :loading="loading" :size="myConfig.tableSize" :stripe="myConfig.showStripe" :border="myConfig.showBorder" :height="tableHeight" :maxHeight="tableMaxHeight" :show-header="myConfig.showHeader" @on-selection-change="OnSelectionChange" :columns="tableColumns" :data="data" @on-column-width-resize="onColumnWidthResize" @on-row-click="rowClick" :show-summary="myConfig.showSummary" :summary-method="handleSummary">
34
+ <template v-for="config in soltTableColumns" v-slot:[config.key]="{ index }" :key="'show_' + config.key">
35
+ <div @click="EditCell(index,config)" :class="config.cellClassName">
36
+ <ControlBox v-if="editIndex === index && editKey=== config.key" :ref="'cell_'+ index + '_' + config.key" :autofocus="true" :config="getCellConfig(index,config)" :valueData="getCurRow(index)" @inputValue="input" :editIndex="index" @doAction="doAction"></ControlBox>
37
+ <ShowText v-else :label="formatValue(index,config)" :contentAlign="config.contentAlign" :class="IsCellError(index,config)" :config="config" :rowIndex="index"></ShowText>
38
+ </div>
39
+ </template>
40
+ </Table>
41
+ <div ref="page" v-if="myConfig.showPage" style="background:#eee;padding-top:5px;width:100%" >
42
+ <Card :bordered="false" :padding="0" :dis-hover="true" style="border-radius:0px">
43
+ <Row type="flex" justify="end" style="padding:5px;padding-right:10px">
44
+ <Page :total="myConfig.pageConfig.total_results" :size="myConfig.pageSize" :current="myConfig.pageConfig.page_no" :page-size="myConfig.pageConfig.page_size" :page-size-opts="myConfig.pageConfig.pageSizeList" @on-page-size-change="changePageSize" @on-change="changePage" :show-total="myConfig.pageShowTotal" :show-elevator="myConfig.pageShowElevator" :show-sizer="myConfig.pageShowSizer"></Page>
45
+ </Row>
46
+ </Card>
47
+ </div>
48
+ </Row>
49
+ <p v-show="showGrid && showEffectValue" @click="toggleEffect" style="cursor:pointer;background-color:#FFF2DE;height:36px;line-height:36px;border: 1px solid #F3B352;margin-top: 10px;" >
50
+ <Icon custom='iconfont icon-custom-help' size="20" style="margin-left: 10px;" color="#D5882E" /> <span style="margin-left: 4px;color:#D5882E">参考数据</span>
51
+ </p>
52
+ <Row v-show="showGrid && showEffectValue && showEffectGrid" class="efuture-effect-grid" style="margin-top: 10px;">
53
+ <Table ref="effect_table" :row-class-name="rowClassName" :loading="loading" :size="myConfig.tableSize" :border="myConfig.showBorder" :stripe="myConfig.showStripe" :maxHeight="tableMaxHeight" :columns="tableColumns" :data="curlEffectData" @on-column-width-resize="onColumnWidthResize" >
54
+ <template v-for="config in soltTableColumns" v-slot:[config.key]="{ row, index }" :key="'show_effect' + config.key">
55
+ <ShowText :label="effectFormatValue(index,config,row)" :contentAlign="config.contentAlign" :class="config.cellClassName" :config="config" :rowIndex="index"></ShowText>
56
+ </template>
57
+ </Table>
58
+ </Row>
59
+ </div>
60
+ <Modal v-if="!editRowFlag" v-model="showEditRowForm" width="90%" title="编辑" @on-ok="editRow">
61
+ <div>
62
+ <ExpandRow ref="rowForm" :config="myConfig" :dictData="dictData" />
63
+ </div>
64
+ </Modal>
65
+ </Card>
66
+ </template>
67
+ <script>
68
+ import { resolveComponent } from 'vue';
69
+ import Base from '@/components/grid/editgridbase.vue';
70
+ export default {
71
+ name: 'meditgridcard',
72
+ extends: Base,
73
+ data () {
74
+ return {
75
+ myConfig:{
76
+ title:'',
77
+ modetype:'1',
78
+ operFixedFlag:false,
79
+ showCheckBox:true,
80
+ showPage:false,
81
+ showAppendixCol:false,
82
+ appedixLable:'附件'
83
+ },
84
+ btnStyle:'padding-left:0px;padding-right:0px',
85
+ divStyle:'padding-left:24px',
86
+ showAddBtn:true,
87
+ showDelBatchBtn:true,
88
+ showGrid:true,
89
+ showTitle:true,
90
+ showEffectValue:false,
91
+ showEffectGrid:true,
92
+ actionAppendixConfig:{
93
+ label:'附件',
94
+ key:'actionappendix',
95
+ align: 'center',
96
+ fixed: 'right',
97
+ render:this.actionAppendixRender,
98
+ width:45
99
+ },
100
+ curlEffectData:[],
101
+ effectData:[]
102
+
103
+ };
104
+ },
105
+ methods: {
106
+ customInit2() {
107
+ if (this.myConfig.showTitle !== undefined) {
108
+ this.showTitle = this.myConfig.showTitle;
109
+ }
110
+ this.myConfig.items.forEach(el => {
111
+ if (el.resizable === undefined) {
112
+ el.resizable = true;
113
+ }
114
+ if (!el.width && !el.minWidth) {
115
+ el.minWidth = 60;
116
+ }
117
+ });
118
+ if (this.myConfig.showAppendixCol) {
119
+ this.actionAppendixConfig.label = this.myConfig.appedixLable;
120
+ this.myConfig.items.push(this.actionAppendixConfig);
121
+ }
122
+
123
+ if (this.myConfig.showEffectValue !== undefined) {
124
+ this.showEffectValue = this.myConfig.showEffectValue;
125
+ }
126
+ if (this.showEffectValue) {
127
+ this.myConfig.dynamicHeight = true;
128
+ }
129
+ if (this.myConfig.modetype === '1') {
130
+ this.btnStyle = 'padding-left:0px;padding-right:0px';
131
+ this.divStyle = 'padding-left:24px';
132
+ } else {
133
+ this.btnStyle = '';
134
+ this.divStyle = 'padding-left:2px';
135
+ }
136
+ },
137
+ toggle () {
138
+ this.showGrid = !this.showGrid;
139
+ },
140
+ toggleEffect () {
141
+ this.showEffectGrid = !this.showEffectGrid;
142
+ },
143
+ setShowEffectGrid(value) {
144
+ this.showEffectGrid = value;
145
+ },
146
+ setShowGrid(value) {
147
+ this.showGrid = value;
148
+ },
149
+ rowClick(e) {
150
+ if (this.showEffectValue) {
151
+ this.curlEffectData = [];
152
+ let key = '';
153
+ if (this.myConfig.effectKey) {
154
+ key = this.myConfig.effectKey;
155
+ }
156
+ if (key) {
157
+ let index = this.effectData.findIndex(el => e[key] === el[key]);
158
+ if (index > -1) {
159
+ this.curlEffectData.push(this.$Method.copy(this.effectData[index]));
160
+ }
161
+ }
162
+ }
163
+ },
164
+ setEffectData(obj) {
165
+ this.effectData = [];
166
+ this.effectData = this.$Method.copy(obj);
167
+ this.curlEffectData = [];
168
+ if (this.myConfig.showEffectValue) {
169
+ if (obj.length === 0) {
170
+ this.showEffectValue = false;
171
+ } else {
172
+ this.showEffectValue = true;
173
+ }
174
+ }
175
+ },
176
+ actionAppendixRender(h, params) {
177
+ return h('div', [
178
+ h(resolveComponent('Button'), {
179
+ type: 'text',
180
+ size: 'small',
181
+ customIcon:'iconfont icon-custom-anniu-fujian',
182
+ onClick:(e) =>{
183
+ let tmp = {};
184
+ tmp.rowinfo = params;
185
+ tmp.name = 'actionappendix';
186
+ tmp.readOnly = this.myConfig.readOnly;
187
+ this.$emit('doAction',tmp);
188
+ }
189
+ })
190
+ ]);
191
+ },
192
+ effectFormatValue(index, column) {
193
+ let value = '';
194
+ let row = this.$Method.copy(this.curlEffectData[index]);
195
+ if (column.name) {
196
+ value = row[column.name];
197
+ }
198
+ let config = column;
199
+ let valueFormat = this.$Method.formatValue(value, row, config);
200
+ let obj = {};
201
+ obj.value = value;
202
+ obj.row = row;
203
+ obj.config = config;
204
+ obj.valueFormat = valueFormat;
205
+ if (column.formatValue) {
206
+ return column.formatValue(obj);
207
+ } else if (this.myConfig.formatValue) {
208
+ return this.myConfig.formatValue(obj);
209
+ } else {
210
+ return valueFormat;
211
+ }
212
+ },
213
+ },
214
+ mounted() {
215
+ if (this.$refs.card && this.$refs.card.$el) {
216
+ this.$refs.card.$el.onmouseleave = () => {
217
+ // this.handleOut();
218
+ };
219
+ }
220
+ }
221
+ };
222
+ </script>
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <Card ref="card" :bordered="false" :padding="0" dis-hover>
3
+ <Row style="margin-top: 10px;">
4
+ <Table ref="table" :row-class-name="rowClassName" :loading="loading" :size="myConfig.tableSize" :stripe="myConfig.showStripe" :border="myConfig.showBorder" :height="tableHeight" :maxHeight="tableMaxHeight" :show-header="myConfig.showHeader" @on-selection-change="OnSelectionChange" :columns="tableColumns" :data="data" @on-column-width-resize="onColumnWidthResize" :show-summary="myConfig.showSummary" :summary-method="handleSummary">
5
+ <template v-for="config in soltTableColumns" v-slot:[config.key]="{ index }" :key="'show_' + config.key">
6
+ <div @click="EditCell(index,config)" :class="config.cellClassName">
7
+ <ControlBox v-if="editIndex === index && editKey=== config.key" :autofocus="true" :config="getCellConfig(index,config)" :valueData="getCurRow(index)" @inputValue="input" :editIndex="index" @doAction="doAction"></ControlBox>
8
+ <ShowText v-else :label="formatValue(index,config)" :contentAlign="config.contentAlign" :class="IsCellError(index,config)" :config="config" :rowIndex="index"></ShowText>
9
+ </div>
10
+ </template>
11
+ </Table>
12
+ <div ref="page" v-if="myConfig.showPage" style="background:#eee;padding-top:5px;width:100%" >
13
+ <Card :bordered="false" :padding="0" :dis-hover="true" style="border-radius:0px">
14
+ <Row type="flex" justify="end" style="padding:5px;padding-right:10px">
15
+ <Page :total="myConfig.pageConfig.total_results" :size="myConfig.pageSize" :current="myConfig.pageConfig.page_no" :page-size="myConfig.pageConfig.page_size" :page-size-opts="myConfig.pageConfig.pageSizeList" @on-page-size-change="changePageSize" @on-change="changePage" :show-total="myConfig.pageShowTotal" :show-elevator="myConfig.pageShowElevator" :show-sizer="myConfig.pageShowSizer"></Page>
16
+ </Row>
17
+ </Card>
18
+ </div>
19
+ </Row>
20
+ <Modal v-if="!editRowFlag" v-model="showEditRowForm" width="90%" title="编辑" @on-ok="editRow">
21
+ <div>
22
+ <ExpandRow ref="rowForm" :config="myConfig" :dictData="dictData"/>
23
+ </div>
24
+ </Modal>
25
+ </Card>
26
+ </template>
27
+ <script>
28
+ import { resolveComponent } from 'vue';
29
+ import Base from '@/components/grid/editgridbase.vue';
30
+ export default {
31
+ name: 'meditgridcard2',
32
+ extends: Base,
33
+ data () {
34
+ return {
35
+ myConfig:{
36
+ title:'',
37
+ modetype:'1',
38
+ operFixedFlag:false,
39
+ showCheckBox:true,
40
+ showPage:false,
41
+ showAppendixCol:false,
42
+ appedixLable:'附件'
43
+ },
44
+ showAddBtn:true,
45
+ showDelBatchBtn:true,
46
+ showGrid:true,
47
+ showTitle:true,
48
+ actionAppendixConfig:{
49
+ label:'附件',
50
+ key:'actionappendix',
51
+ align: 'center',
52
+ render:this.actionAppendixRender,
53
+ fixed:'right'
54
+ }
55
+
56
+ };
57
+ },
58
+ methods: {
59
+ customInit2() {
60
+ if (this.myConfig.showTitle !== undefined) {
61
+ this.showTitle = this.myConfig.showTitle;
62
+ }
63
+ this.myConfig.items.forEach(el => {
64
+ if (el.resizable === undefined) {
65
+ el.resizable = true;
66
+ }
67
+ if (!el.width && !el.minWidth) {
68
+ el.minWidth = 60;
69
+ }
70
+ });
71
+ if (this.myConfig.showAppendixCol) {
72
+ this.actionAppendixConfig.label = this.myConfig.appedixLable;
73
+ this.myConfig.items.push(this.actionAppendixConfig);
74
+ }
75
+
76
+
77
+ },
78
+ toggle () {
79
+ this.showGrid = !this.showGrid;
80
+ },
81
+ setShowGrid(value) {
82
+ this.showGrid = value;
83
+ },
84
+ actionAppendixRender(h, params) {
85
+ return h('div', [
86
+ h(resolveComponent('Button'), {
87
+ type: 'text',
88
+ size: 'small',
89
+ customIcon:'iconfont icon-custom-anniu-fujian',
90
+ onClick:(e) =>{
91
+ let tmp = {};
92
+ tmp.rowinfo = params;
93
+ tmp.name = 'actionappendix';
94
+ tmp.readOnly = this.readOnly;
95
+ this.$emit('doAction',val);
96
+ }
97
+ })
98
+ ]);
99
+ }
100
+ },
101
+ mounted() {
102
+ if (this.$refs.card && this.$refs.card.$el) {
103
+ this.$refs.card.$el.onmouseleave = () => {
104
+ // this.handleOut();
105
+ };
106
+ }
107
+ }
108
+ };
109
+ </script>
@@ -0,0 +1,106 @@
1
+ <template>
2
+ <Card :bordered="false" :padding="0" dis-hover>
3
+ <template v-if="myConfig.modetype === '1'">
4
+ <p @click="toggle" style="cursor:pointer;" >
5
+ <Row type="flex" justify="start" align="middle" style="margin-top:14px;margin-bottom:14px">
6
+ <Icon custom='iconfont icon-custom-pack' color="#f3b352" v-show="showForm" size="14" />
7
+ <Icon v-show="!showForm" color="#f3b352" custom='iconfont icon-custom-spread' size="14"/>
8
+ <span style="margin-left:10px;font-size: 14px;font-weight:bold" v-text="myConfig.title" />
9
+ </Row>
10
+ </p>
11
+ <Divider style="margin-left:24px;margin-top:0px;margin-bottom:10px;"/>
12
+ </template>
13
+ <template v-if="myConfig.modetype === '2'">
14
+ <div style="margin-bottom:10px;">
15
+ <span class="efuture-title-verticalline" /> <span style="font-size: 14px;font-weight:bold" v-text="myConfig.title" />
16
+ </div>
17
+ </template>
18
+ <Form ref="form" class="efuture-tip-form" v-show="showForm" :model="form" :rules="formRules" :label-position="myConfig.labelPosition" :label-width="myConfig.labelWidth" :inline="myConfig.inline" :id="myConfig.name" @submit.enter.prevent>
19
+ <Row type="flex" justify="start">
20
+ <template v-for="(item,index) in items" :key="'form_'+index">
21
+ <Col v-if="item.status" :span="initFormItemCol(index)" v-show="item.visible !== false" class="efuture-form" >
22
+ <FormItem v-if="item.type !== 'Divider' && item.status && item.visible !== false" :prop="item.name||item.sname" :style="getFormItemStyle(item)" :show-message="false">
23
+ <template #label>
24
+ <ShowText :style="getLableStyle" :contentAlign="myConfig.labelPosition" :label="item.label" :config="item"></ShowText>
25
+ </template>
26
+ <template v-if="!showEffectValue || !item.showEffectValue">
27
+ <ControlBox :ref="item.name||item.sname" :valueData="form" :config="item" @inputValue="input" @doAction="doAction" ></ControlBox>
28
+ </template>
29
+ <template v-else>
30
+ <Poptip trigger="hover" style="width:100%" placement="top">
31
+ <ControlBox :ref="item.name||item.sname" :valueData="form" :config="item" @inputValue="input" @doAction="doAction" ></ControlBox>
32
+ <template #content>
33
+ <ControlBox :ref="'effect_' + item.name||item.sname" style="width:100%" :valueData="effectForm" :config="effectConfig(item)" ></ControlBox>
34
+ </template>
35
+ </Poptip>
36
+ </template>
37
+ </FormItem>
38
+ <ControlBox v-if="item.type === 'Divider'" :ref="item.dividerName" :style="getDividerStyle" :config="item"></ControlBox>
39
+ </Col>
40
+ </template>
41
+ </Row>
42
+ </Form>
43
+ </Card>
44
+ </template>
45
+
46
+ <script>
47
+ import Base from '@/components/form/formbox.vue';
48
+ export default {
49
+ name:'mformcard',
50
+ extends: Base,
51
+ data () {
52
+ return {
53
+ myConfig:{
54
+ title:'',
55
+ modetype:'1',
56
+ labelPosition: "right",
57
+ },
58
+ showForm:true,
59
+ editFlag:false,
60
+ showTitle:false,
61
+ showEffectValue:false,
62
+ effectForm:{}
63
+ };
64
+ },
65
+ methods:{
66
+ customInit() {
67
+ if (this.myConfig.showEffectValue !== undefined) {
68
+ this.showEffectValue = this.myConfig.showEffectValue;
69
+ }
70
+ this.myConfig.items.forEach(el => {
71
+ if (el.showEffectValue === undefined) {
72
+ if (this.myConfig.showEffectValue) {
73
+ el.showEffectValue = this.myConfig.showEffectValue;
74
+ }
75
+ }
76
+ })
77
+ },
78
+ toggle () {
79
+ this.showForm = !this.showForm;
80
+ },
81
+ setShowForm(value) {
82
+ this.showForm = value;
83
+ },
84
+ effectConfig(item) {
85
+ let config = this.$Method.copy(item);
86
+ config.readOnly = true;
87
+ return config;
88
+ },
89
+ setEffectData(obj) {
90
+ this.effectForm = Object.assign({}, {}, obj);
91
+ },
92
+ getLableStyle() {
93
+ if (this.myConfig.modetype === '1') {
94
+ return 'padding-left:10px';
95
+ }
96
+ return '';
97
+ },
98
+ getDividerStyle() {
99
+ if (this.myConfig.modetype === '1') {
100
+ return 'margin-left:32px;';
101
+ }
102
+ return '';
103
+ }
104
+ }
105
+ };
106
+ </script>
@@ -0,0 +1,168 @@
1
+ <template>
2
+ <div>
3
+ <div v-for="(item) in myConfig.items" :id="item.divId" :key="item.divId" v-show="headList[item.name]">
4
+ <Formcard :ref="item.name" :config="item" :dictData="dictData" @doAction="doAction" >
5
+ </Formcard>
6
+ </div>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ import Formcard from './formcard.vue';
12
+ export default {
13
+ name:'mformcardgroupbox',
14
+ data () {
15
+ return {
16
+ myConfig:{
17
+ title:''
18
+ },
19
+ showForm:true,
20
+ headList:{}
21
+ };
22
+ },
23
+ components:{Formcard},
24
+ created () {
25
+ this.init();
26
+ },
27
+ props:{
28
+ config: {
29
+ type:Object,
30
+ default:null
31
+ },
32
+ dictData: {
33
+ type: Object,
34
+ default:null
35
+ }
36
+ },
37
+ methods:{
38
+ init (){
39
+ this.showForm = {};
40
+ this.headList = {};
41
+ this.myConfig = Object.assign({},this.myConfig,this.config);
42
+ if (this.myConfig.items) {
43
+ this.myConfig.items.forEach((el, index) => {
44
+ if (!el.name) {
45
+ el.name = 'form_' + index;
46
+
47
+ }
48
+ if (!el.labelWidth) {
49
+ el.labelWidth = 100;
50
+ }
51
+ this.headList[el.name] = true;
52
+ });
53
+ }
54
+ },
55
+ getData () {
56
+ let obj = {};
57
+ this.myConfig.items.forEach((el,index) => {
58
+ if (this.$refs[el.name] && this.$refs[el.name][0]) {
59
+ if (index === 0) {
60
+ Object.assign(obj, this.$refs[el.name][0].getData());
61
+ } else {
62
+ let data = this.$refs[el.name][0].getData();
63
+ if (el.items) {
64
+ el.items.forEach(el2 => {
65
+ if (el2.name) {
66
+ obj[el2.name] = data[el2.name];
67
+ }
68
+ if (el2.sname) {
69
+ obj[el2.sname] = data[el2.sname];
70
+ }
71
+ if (el2.ename) {
72
+ obj[el2.ename] = data[el2.ename];
73
+ }
74
+ if (el2.textName) {
75
+ obj[el2.textName] = data[el2.textName];
76
+ }
77
+ });
78
+ }
79
+ }
80
+ }
81
+ });
82
+ return obj;
83
+
84
+ },
85
+ setData (data) {
86
+ this.myConfig.items.forEach(el => {
87
+ if (this.$refs[el.name] && this.$refs[el.name][0]) {
88
+ this.$refs[el.name][0].setData(data);
89
+ }
90
+ });
91
+ },
92
+ setEffectData(data) {
93
+ this.myConfig.items.forEach(el => {
94
+ if (this.$refs[el.name] && this.$refs[el.name][0]) {
95
+ this.$refs[el.name][0].setEffectData(data);
96
+ }
97
+ });
98
+ },
99
+ isChange () {
100
+ let flag = false;
101
+ this.myConfig.items.forEach(el => {
102
+ if (this.$refs[el.name] && this.$refs[el.name][0]) {
103
+ if (!flag) {
104
+ flag = this.$refs[el.name][0].isChange();
105
+ } else {
106
+ return true;
107
+ }
108
+
109
+ }
110
+ });
111
+ return flag;
112
+ },
113
+ getForm(name) {
114
+ if (this.$refs[name] && this.$refs[name][0]) {
115
+ return this.$refs[name][0];
116
+ } else {
117
+ return null;
118
+ }
119
+ },
120
+ clearData () {
121
+ this.myConfig.items.forEach(el => {
122
+ if (this.$refs[el.name] && this.$refs[el.name][0]) {
123
+ this.$refs[el.name][0].clearData();
124
+
125
+ }
126
+ });
127
+ },
128
+ setFormReadOnly (value) {
129
+ this.myConfig.items.forEach(el => {
130
+ if (this.$refs[el.name] && this.$refs[el.name][0]) {
131
+ this.$refs[el.name][0].setFormReadOnly(value);
132
+
133
+ }
134
+ });
135
+ },
136
+ checkValidate() {
137
+ let flag = false;
138
+ this.myConfig.items.forEach(el => {
139
+ if (this.$refs[el.name] && this.$refs[el.name][0]) {
140
+ if (this.headList[el.name]) {
141
+ this.$refs[el.name][0].checkValidate();
142
+ if (this.$refs[el.name][0].isError()) {
143
+ flag = true;
144
+ return true;
145
+ }
146
+ }
147
+
148
+ }
149
+ });
150
+ return flag;
151
+ },
152
+ doAction(obj) {
153
+ this.$emit('doAction', obj);
154
+ },
155
+ setShowForm(value, name) {
156
+ if (this.$refs[name] && this.$refs[name][0]) {
157
+ this.$refs[name][0].setShowForm(value)
158
+ }
159
+ },
160
+ setVisible(name,value) {
161
+ let obj = {};
162
+ obj[name] = value;
163
+ this.headList = Object.assign({},this.headList,obj);
164
+ }
165
+ }
166
+
167
+ };
168
+ </script>