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.
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/dist/efviewplus.min.esm.js +99954 -0
- package/dist/efviewplus.min.js +142 -0
- package/dist/locale/lang.js +1 -0
- package/dist/locale/zh-CN.js +1 -0
- package/dist/locale/zh-TW.js +1 -0
- package/dist/locale/zh-UG.js +1 -0
- package/dist/style.css +9 -0
- package/dist/styles/efviewplus.css +1 -0
- package/package.json +144 -0
- package/src/components/base/controlbase.vue +191 -0
- package/src/components/base/controlbox.vue +102 -0
- package/src/components/base/index.js +3 -0
- package/src/components/base/load.js +20 -0
- package/src/components/base/probase.js +220 -0
- package/src/components/base/size.js +78 -0
- package/src/components/billbox/billbox.vue +68 -0
- package/src/components/billbox/index.js +2 -0
- package/src/components/cascaderbox/cascaderbox.vue +184 -0
- package/src/components/cascaderbox/index.js +2 -0
- package/src/components/checkbox/checkbox.vue +76 -0
- package/src/components/checkbox/checkgroupbox.vue +104 -0
- package/src/components/checkbox/index.js +3 -0
- package/src/components/colorbox/colorbox.vue +44 -0
- package/src/components/colorbox/index.js +2 -0
- package/src/components/combobox/combobox.vue +220 -0
- package/src/components/combobox/index.js +2 -0
- package/src/components/conditionbox/conditionbase.vue +195 -0
- package/src/components/conditionbox/conditionbox.vue +63 -0
- package/src/components/conditionbox/conditionfilterbox.vue +477 -0
- package/src/components/conditionbox/conditionselectorbox.vue +237 -0
- package/src/components/conditionbox/index.js +5 -0
- package/src/components/conditionbox/queryconditionbox.vue +26 -0
- package/src/components/conditionbox/queryconditionboxbase.vue +124 -0
- package/src/components/conditionbox/searchconditionbox.vue +114 -0
- package/src/components/conditionbox/searchgrid.vue +391 -0
- package/src/components/datebox/datebox.vue +129 -0
- package/src/components/datebox/daterangebox.vue +155 -0
- package/src/components/datebox/index.js +3 -0
- package/src/components/form/baseform.vue +677 -0
- package/src/components/form/detailsbox.vue +487 -0
- package/src/components/form/formbox.vue +29 -0
- package/src/components/form/formcardbox.vue +268 -0
- package/src/components/form/formcardgroupbox.vue +252 -0
- package/src/components/form/formcompro.js +19 -0
- package/src/components/form/formdetail.vue +129 -0
- package/src/components/form/formdetailtwo.vue +302 -0
- package/src/components/form/index.js +8 -0
- package/src/components/form/toolanchor.js +46 -0
- package/src/components/form/workform.vue +168 -0
- package/src/components/grid/basegrid.vue +1061 -0
- package/src/components/grid/editgrid.vue +51 -0
- package/src/components/grid/editgridbase.vue +947 -0
- package/src/components/grid/editgridcard.vue +193 -0
- package/src/components/grid/expandrow.vue +137 -0
- package/src/components/grid/index.js +6 -0
- package/src/components/grid/viewgrid.vue +122 -0
- package/src/components/grid/viewgridbase.vue +1284 -0
- package/src/components/icon/common-icon.vue +53 -0
- package/src/components/icon/eicon.vue +29 -0
- package/src/components/icon/icons.vue +42 -0
- package/src/components/icon/index.js +2 -0
- package/src/components/label/index.js +3 -0
- package/src/components/label/showtext.vue +95 -0
- package/src/components/load/loadcartoon.vue +228 -0
- package/src/components/map/index.js +2 -0
- package/src/components/map/mapbox.vue +348 -0
- package/src/components/masterplate/appendix.vue +586 -0
- package/src/components/masterplate/approval.vue +803 -0
- package/src/components/masterplate/base.vue +985 -0
- package/src/components/masterplate/billasyncimport.vue +614 -0
- package/src/components/masterplate/billconditionbox.vue +224 -0
- package/src/components/masterplate/billconditionsbox.vue +427 -0
- package/src/components/masterplate/billdetailform.vue +990 -0
- package/src/components/masterplate/billimport.vue +263 -0
- package/src/components/masterplate/billquerygrid.vue +316 -0
- package/src/components/masterplate/billsinglegrid.vue +234 -0
- package/src/components/masterplate/birtreport.vue +185 -0
- package/src/components/masterplate/detailbtntoolbar.vue +311 -0
- package/src/components/masterplate/detailsbox.vue +386 -0
- package/src/components/masterplate/editgridcard.vue +222 -0
- package/src/components/masterplate/editgridcard2.vue +109 -0
- package/src/components/masterplate/formcard.vue +106 -0
- package/src/components/masterplate/formcardgroupbox.vue +168 -0
- package/src/components/masterplate/formdetailtwo.vue +356 -0
- package/src/components/masterplate/gridcolset.vue +227 -0
- package/src/components/masterplate/index.js +23 -0
- package/src/components/masterplate/layouttemplate.vue +33 -0
- package/src/components/masterplate/leftlistrightdetails.vue +474 -0
- package/src/components/masterplate/leftlistrightlist.vue +465 -0
- package/src/components/masterplate/lefttreerightdetails.vue +619 -0
- package/src/components/masterplate/levelreport.vue +510 -0
- package/src/components/masterplate/listbtntoolbar.vue +257 -0
- package/src/components/masterplate/listdetails.vue +769 -0
- package/src/components/masterplate/operlog.vue +272 -0
- package/src/components/masterplate/options.vue +110 -0
- package/src/components/masterplate/page.vue +102 -0
- package/src/components/masterplate/promptmessage.vue +74 -0
- package/src/components/masterplate/querybar.vue +490 -0
- package/src/components/masterplate/report.vue +357 -0
- package/src/components/masterplate/rowbtntoolbar.vue +126 -0
- package/src/components/masterplate/simpletree.vue +129 -0
- package/src/components/masterplate/simpleviewgrid.vue +144 -0
- package/src/components/mychart/bar/bar.vue +202 -0
- package/src/components/mychart/basechart.vue +190 -0
- package/src/components/mychart/complexmychart/barline.vue +154 -0
- package/src/components/mychart/gauge/gauge.vue +83 -0
- package/src/components/mychart/index.js +9 -0
- package/src/components/mychart/line/line.vue +202 -0
- package/src/components/mychart/liquidfill/liquidfill.vue +109 -0
- package/src/components/mychart/pie/pie.vue +96 -0
- package/src/components/mychart/radar/radar.vue +122 -0
- package/src/components/mychart/scatter/scatter.vue +76 -0
- package/src/components/numberbox/append.js +11 -0
- package/src/components/numberbox/index.js +3 -0
- package/src/components/numberbox/numberbox.vue +303 -0
- package/src/components/numberbox/numberrangebox.vue +423 -0
- package/src/components/picturebox/filebox.vue +365 -0
- package/src/components/picturebox/index.js +3 -0
- package/src/components/picturebox/picturebox.vue +541 -0
- package/src/components/picturebox/uploadbox.vue +164 -0
- package/src/components/poptagbox/index.js +2 -0
- package/src/components/poptagbox/poptagbox.vue +389 -0
- package/src/components/poptextbox/index.js +2 -0
- package/src/components/poptextbox/poptextbox.vue +601 -0
- package/src/components/radiobox/index.js +2 -0
- package/src/components/radiobox/radiogroupbox.vue +76 -0
- package/src/components/richtextbox/editor.vue +150 -0
- package/src/components/richtextbox/index.js +2 -0
- package/src/components/richtextbox/richtextbox.vue +448 -0
- package/src/components/textbox/index.js +2 -0
- package/src/components/textbox/textbox.vue +98 -0
- package/src/components/timebox/index.js +2 -0
- package/src/components/timebox/timebox.vue +76 -0
- package/src/components/toolbar/ebutton.vue +169 -0
- package/src/components/toolbar/index.js +3 -0
- package/src/components/toolbar/toolbar.vue +446 -0
- package/src/components/tree/basetree.vue +725 -0
- package/src/components/tree/index.js +3 -0
- package/src/components/tree/treedata.vue +51 -0
- package/src/components/tree/treedatabase.vue +189 -0
- package/src/components/upload/billimport.vue +233 -0
- package/src/components/upload/index.js +2 -0
- package/src/components/videobox/index.js +2 -0
- package/src/components/videobox/uploadbox.vue +148 -0
- package/src/components/videobox/videobox.vue +503 -0
- package/src/components/wrichtextbox/editor.vue +219 -0
- package/src/components/wrichtextbox/index.js +2 -0
- package/src/components/wrichtextbox/wrichtextbox.vue +63 -0
- package/src/index.js +215 -0
- package/src/locale/format.js +51 -0
- package/src/locale/index.js +63 -0
- package/src/locale/lang/zh-CN.js +123 -0
- package/src/locale/lang/zh-TW.js +114 -0
- package/src/locale/lang/zh-UG.js +115 -0
- package/src/locale/lang.js +15 -0
- package/src/method/case/case.js +1180 -0
- package/src/method/config/queryconfig.js +24 -0
- package/src/method/const/const.js +815 -0
- package/src/method/index.js +8 -0
- package/src/static/excel/exportexcel.js +627 -0
- package/src/static/iview/coustom.js +463 -0
- package/src/store/index.js +19 -0
- package/src/store/modules/app.js +53 -0
- package/src/styles/README.md +3 -0
- package/src/styles/common.less +75 -0
- package/src/styles/components/anchor.less +74 -0
- package/src/styles/components/approval.less +136 -0
- package/src/styles/components/button.less +208 -0
- package/src/styles/components/card.less +51 -0
- package/src/styles/components/content.less +38 -0
- package/src/styles/components/font.less +314 -0
- package/src/styles/components/form.less +72 -0
- package/src/styles/components/iconfont/fonts/iconfont.less +1376 -0
- package/src/styles/components/iconfont/fonts/iconfont.svg +699 -0
- package/src/styles/components/iconfont/fonts/iconfont.ttf +0 -0
- package/src/styles/components/iconfont/fonts/iconfont.woff +0 -0
- package/src/styles/components/iconfont/fonts/iconfont.woff2 +0 -0
- package/src/styles/components/index.less +16 -0
- package/src/styles/components/input.less +290 -0
- package/src/styles/components/modal.less +203 -0
- package/src/styles/components/page.less +340 -0
- package/src/styles/components/select.less +361 -0
- package/src/styles/components/steps.less +367 -0
- package/src/styles/components/table.less +544 -0
- package/src/styles/components/tabs.less +249 -0
- package/src/styles/components/upload.less +83 -0
- package/src/styles/custom.less +67 -0
- package/src/styles/index.less +6 -0
- package/src/styles/pack.less +6 -0
- package/src/utils/EfuMessenger.js +155 -0
- package/src/utils/assist.js +353 -0
- package/src/utils/index.js +1 -0
- package/src/utils/random_str.js +10 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Card ref="card" :padding="0" :bordered="myConfig.bordered" :dis-hover="myConfig.disHover" :headClass="headClass" :extraClass="extraClass" >
|
|
3
|
+
<template v-if="showTitle" #title>
|
|
4
|
+
<p :style="pStyle" @click="toggle" >
|
|
5
|
+
<span :class="titleClass" v-text="myConfig.title" /><Icon v-if="myConfig.hide" class="efuture-title-icon" :style="iconStyle" type='ios-arrow-forward'/>
|
|
6
|
+
</p>
|
|
7
|
+
</template>
|
|
8
|
+
<template #extra>
|
|
9
|
+
<a v-if="showBtn && myConfig.readOnly && myConfig.addBtnType === '3' && !btnReadOnly" href="#" @click.prevent="editGrid">{{myConfig.editBtnName}} </a>
|
|
10
|
+
<span v-if="showBtn && myConfig.readOnly && myConfig.addBtnType === '3' && btnReadOnly">{{myConfig.editBtnName}} </span>
|
|
11
|
+
<a v-if="showBtn && !myConfig.readOnly && myConfig.addBtnType === '3'" href="#" @click.prevent="cancelGrid">{{myConfig.cancelBtnName}} </a>
|
|
12
|
+
<a v-if="showBtn && myConfig.addBtnType === '3' && !btnReadOnly" style="margin-left: 10px;" href="#" @click.prevent="addRow">{{myConfig.addBtnName}} </a>
|
|
13
|
+
<span v-if="showBtn && myConfig.addBtnType === '3' && btnReadOnly" style="margin-left: 10px;" >{{myConfig.addBtnName}}</span>
|
|
14
|
+
<a v-if="showBtn && !myConfig.readOnly && myConfig.addBtnType === '1'" href="#" @click.prevent="addRow">{{myConfig.addBtnName}} </a>
|
|
15
|
+
</template>
|
|
16
|
+
<div v-show="showGrid" :style="cardStyle" >
|
|
17
|
+
<Row>
|
|
18
|
+
<Table ref="table" :loading="loading" :size="myConfig.tableSize" :row-class-name="rowClassName" :stripe="myConfig.showStripe" :border="myConfig.showBorder" :height="tableHeight" :maxHeight="tableMaxHeight" :show-header="myConfig.showHeader" :columns="tableColumns" @on-selection-change="OnSelectionChange" :data="data" @on-column-width-resize="onColumnWidthResize" :show-summary="myConfig.showSummary" :summary-method="handleSummary">
|
|
19
|
+
<template v-for="config in soltTableColumns" v-slot:[config.key]="{ index }" :key="'show_' + config.key">
|
|
20
|
+
<div @click="EditCell(index,config)" class="ivu-table-cell">
|
|
21
|
+
<ControlBox v-if="editIndex === index && editKey=== config.key" :config="getCellConfig(index,config)" :autofocus="true" :valueData="getCurRow(index)" @inputValue="input" :editIndex="index" @doAction="doAction"></ControlBox>
|
|
22
|
+
<ShowText v-else style="display:inline-block;" :label="formatValue(index,config)" :contentAlign="config.contentAlign" :class="IsCellError(index,config)" ></ShowText>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
</Table>
|
|
26
|
+
<div ref="page" v-if="myConfig.showPage" style="background:#eee;padding-top:5px;width:100%" >
|
|
27
|
+
<Card :bordered="false" :padding="0" :dis-hover="true" style="border-radius:0px">
|
|
28
|
+
<Row type="flex" justify="end" style="padding:5px;padding-right:10px">
|
|
29
|
+
<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>
|
|
30
|
+
</Row>
|
|
31
|
+
</Card>
|
|
32
|
+
</div>
|
|
33
|
+
</Row>
|
|
34
|
+
<Row v-if="showBtn && !myConfig.readOnly && myConfig.addBtnType === '2'" type="flex" justify="center" style="margin-top: 10px;margin-bottom:10px;" >
|
|
35
|
+
<Button type="default" style="background-color:#f8f8f9" @click="addRow" long>{{myConfig.addBtnName}}</Button>
|
|
36
|
+
</Row>
|
|
37
|
+
</div>
|
|
38
|
+
</Card>
|
|
39
|
+
</template>
|
|
40
|
+
<script>
|
|
41
|
+
import Base from './editgridbase.vue';
|
|
42
|
+
export default {
|
|
43
|
+
name: 'editgridcard',
|
|
44
|
+
extends: Base,
|
|
45
|
+
data () {
|
|
46
|
+
return {
|
|
47
|
+
myConfig:{
|
|
48
|
+
addBtnType:'2',
|
|
49
|
+
hide:true,
|
|
50
|
+
titleType:1,
|
|
51
|
+
bordered:true,
|
|
52
|
+
disHover:false,
|
|
53
|
+
operFixedFlag:false
|
|
54
|
+
},
|
|
55
|
+
btnReadOnly:false,
|
|
56
|
+
showBtn:true,
|
|
57
|
+
cardPadding:0,
|
|
58
|
+
cardStyle:'',
|
|
59
|
+
showGrid:true,
|
|
60
|
+
showTitle:true,
|
|
61
|
+
editFlag:false,
|
|
62
|
+
pStyle:'',
|
|
63
|
+
iconStyle:'',
|
|
64
|
+
showDelRow:true,
|
|
65
|
+
rowAction:[],
|
|
66
|
+
delRowAction:[{
|
|
67
|
+
iconcls: 'row',
|
|
68
|
+
icon:'ios-trash',
|
|
69
|
+
name: 'delRow',
|
|
70
|
+
text: '删除',
|
|
71
|
+
size:'20',
|
|
72
|
+
type:'text'
|
|
73
|
+
}],
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
titleClass () {
|
|
78
|
+
return `efuture-title-font-${this.myConfig.titleType}`;
|
|
79
|
+
},
|
|
80
|
+
headClass () {
|
|
81
|
+
if (!this.showGrid) {
|
|
82
|
+
return `efuture-card-head-title-${this.myConfig.titleType}` + ' efuture-card-head-title-nobottom';
|
|
83
|
+
} else {
|
|
84
|
+
return `efuture-card-head-title-${this.myConfig.titleType}`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
},
|
|
88
|
+
extraClass () {
|
|
89
|
+
return `efuture-card-extra-title-${this.myConfig.titleType}`;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
methods: {
|
|
93
|
+
customInit2() {
|
|
94
|
+
if (this.myConfig.hide) {
|
|
95
|
+
this.pStyle = 'cursor:pointer';
|
|
96
|
+
this.iconStyle = 'transform: rotate(90deg)';
|
|
97
|
+
}
|
|
98
|
+
if (this.myConfig.titleType !== 1) {
|
|
99
|
+
if (this.config.hide === undefined) {
|
|
100
|
+
this.myConfig.hide = false;
|
|
101
|
+
}
|
|
102
|
+
if (this.config.bordered === undefined) {
|
|
103
|
+
this.myConfig.bordered = false;
|
|
104
|
+
}
|
|
105
|
+
if (this.config.disHover === undefined) {
|
|
106
|
+
this.myConfig.disHover = true;
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
if (this.config.hide === undefined) {
|
|
110
|
+
this.myConfig.hide = true;
|
|
111
|
+
}
|
|
112
|
+
if (this.config.bordered === undefined) {
|
|
113
|
+
this.myConfig.bordered = true;
|
|
114
|
+
}
|
|
115
|
+
if (this.config.disHover === undefined) {
|
|
116
|
+
this.myConfig.disHover = false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (this.myConfig.showTitle !== undefined) {
|
|
120
|
+
this.showTitle = this.myConfig.showTitle;
|
|
121
|
+
}
|
|
122
|
+
if (this.myConfig.showBtn !== undefined) {
|
|
123
|
+
this.showBtn = this.myConfig.showBtn;
|
|
124
|
+
}
|
|
125
|
+
if (this.myConfig.showAddBtn !== undefined) {
|
|
126
|
+
this.showBtn = this.myConfig.showAddBtn;
|
|
127
|
+
}
|
|
128
|
+
this.myToolConfig.icon = true;
|
|
129
|
+
this.setTitleStyle();
|
|
130
|
+
},
|
|
131
|
+
toggle () {
|
|
132
|
+
if (this.myConfig.hide) {
|
|
133
|
+
this.showGrid = !this.showGrid;
|
|
134
|
+
this.setTitleStyle();
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
setShowGrid(value) {
|
|
138
|
+
this.showGrid = value;
|
|
139
|
+
this.setTitleStyle();
|
|
140
|
+
},
|
|
141
|
+
setTitleStyle () {
|
|
142
|
+
if (this.showGrid) {
|
|
143
|
+
this.iconStyle = 'transform: rotate(90deg)';
|
|
144
|
+
this.cardPadding = 5 * Number(this.myConfig.titleType);
|
|
145
|
+
this.cardStyle = 'padding-left:'+this.cardPadding+'px;padding-right:'+this.cardPadding+'px;padding-bottom: 10px;';
|
|
146
|
+
} else {
|
|
147
|
+
this.iconStyle = '';
|
|
148
|
+
this.cardPadding = 0;
|
|
149
|
+
this.cardStyle = '';
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
editGrid() {
|
|
153
|
+
if (this.checkIsEdit()) {
|
|
154
|
+
this.setReadOnly(false);
|
|
155
|
+
let obj = {};
|
|
156
|
+
obj.name = 'editGrid';
|
|
157
|
+
obj.gridname = this.myConfig.name;
|
|
158
|
+
this.$emit('doAction', obj);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
cancelGrid() {
|
|
162
|
+
this.setData(this.initData);
|
|
163
|
+
this.setReadOnly(true);
|
|
164
|
+
let obj = {};
|
|
165
|
+
obj.name = 'cancelGrid';
|
|
166
|
+
obj.gridname = this.myConfig.name;
|
|
167
|
+
this.$emit('doAction', obj);
|
|
168
|
+
},
|
|
169
|
+
checkIsEdit() {
|
|
170
|
+
let flag = true;
|
|
171
|
+
if (this.myConfig.editObjectBefore) {
|
|
172
|
+
flag = this.myConfig.editObjectBefore(this.myConfig.name);
|
|
173
|
+
}
|
|
174
|
+
return flag;
|
|
175
|
+
},
|
|
176
|
+
setBtnType(value) {
|
|
177
|
+
let obj = {};
|
|
178
|
+
obj.addBtnType = value;
|
|
179
|
+
this.setPro(obj);
|
|
180
|
+
},
|
|
181
|
+
setBtnReadOnly(value) {
|
|
182
|
+
this.btnReadOnly = value;
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
mounted() {
|
|
186
|
+
if (this.$refs.card && this.$refs.card.$el) {
|
|
187
|
+
this.$refs.card.$el.onmouseleave = () => {
|
|
188
|
+
this.handleOut();
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
</script>
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :style="style">
|
|
3
|
+
<Form ref="form" :model="form" :rules="formRules" :label-width="myConfig.labelWidth" :inline="myConfig.inline" :id="myConfig.name" @keydown.enter.prevent ="keyDownEvent">
|
|
4
|
+
<Row type="flex" justify="start">
|
|
5
|
+
<Col v-for="(item,index) in items" :key="'form_' + index" :span="initFormItemCol(index)" v-show="item.visible !== false" :style="{height:item.height}" >
|
|
6
|
+
<FormItem :label="item.label" :prop="item.name||item.sname" style="width: 100%;" :show-message="false">
|
|
7
|
+
<template #label>
|
|
8
|
+
<span v-if="item.required === true" style="color:#348eed;">{{item.label}}</span>
|
|
9
|
+
<span v-else>{{item.label}}</span>
|
|
10
|
+
</template>
|
|
11
|
+
<div @click="EditCell(item)" style="width: 100%;height:100%" >
|
|
12
|
+
<ControlBox v-if="editKey=== item.name" :config="item" :valueData="form" @inputValue="input" style="width:100%" :editIndex="editIndex" ></ControlBox>
|
|
13
|
+
<ShowText v-else style="display:inline-block;height:32px;line-height:32px" :label="formatValue(form[item.name],form,item)" contentAlign="left" ></ShowText>
|
|
14
|
+
</div>
|
|
15
|
+
</FormItem>
|
|
16
|
+
</Col>
|
|
17
|
+
</Row>
|
|
18
|
+
</Form>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
<script>
|
|
22
|
+
import Base from '@/components/form/baseform.vue';
|
|
23
|
+
export default {
|
|
24
|
+
extends: Base,
|
|
25
|
+
data (){
|
|
26
|
+
return {
|
|
27
|
+
editIndex: -1,
|
|
28
|
+
editKey:''
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
created () {
|
|
32
|
+
this.init();
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
valueData: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default () {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
vstyle:{
|
|
42
|
+
type:String,
|
|
43
|
+
default:''
|
|
44
|
+
},
|
|
45
|
+
showRowAction:{
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default:false
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
methods:{
|
|
51
|
+
customInit() {
|
|
52
|
+
this.form = Object.assign({},this.form,this.valueData);
|
|
53
|
+
this.style = this.vstyle;
|
|
54
|
+
},
|
|
55
|
+
keyDownEvent() {
|
|
56
|
+
this.cancelCellEditing();
|
|
57
|
+
},
|
|
58
|
+
formatValue(value , row, column) {
|
|
59
|
+
return this.$Method.formatValue(value ,row, column);
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
EditCell(config) {
|
|
63
|
+
if (config.readOnly) {
|
|
64
|
+
this.editKey = '';
|
|
65
|
+
this.cancelCellEditing();
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (this.showRowAction) {
|
|
69
|
+
this.cancelCellEditing();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (this.editKey === config.name) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (this.config.cellbeginedit) {
|
|
76
|
+
let rowinfo = {};
|
|
77
|
+
rowinfo.index = this.editIndex;
|
|
78
|
+
rowinfo.column = config;
|
|
79
|
+
rowinfo.row = this.valueData;
|
|
80
|
+
if (this.config.cellbeginedit) {
|
|
81
|
+
if (!this.config.cellbeginedit(rowinfo)) {
|
|
82
|
+
this.cancelCellEditing();
|
|
83
|
+
return;
|
|
84
|
+
} else {
|
|
85
|
+
this.editKey = config.name;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
this.editKey = config.name;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
addRowInfo(obj,column) {
|
|
93
|
+
obj.rowinfo = {};
|
|
94
|
+
obj.rowinfo.column = column;
|
|
95
|
+
obj.rowinfo.index = this.editIndex;
|
|
96
|
+
obj.rowinfo.row = this.valueData;
|
|
97
|
+
obj.rowinfo.gridObject = this.config.getGridObject();
|
|
98
|
+
obj.rowinfo.formObject = this;
|
|
99
|
+
},
|
|
100
|
+
valueChanged(obj) {
|
|
101
|
+
const column = this.config.items.find(el => {return el.name === obj.name;});
|
|
102
|
+
this.addRowInfo(obj,column);
|
|
103
|
+
return column.valueChanged(obj);
|
|
104
|
+
},
|
|
105
|
+
searchBefore(obj) {
|
|
106
|
+
const column = this.config.items.find(el => {return el.name === obj.config.name;});
|
|
107
|
+
this.addRowInfo(obj,column);
|
|
108
|
+
return column.searchBefore(obj);
|
|
109
|
+
},
|
|
110
|
+
setDataBefore(obj,that) {
|
|
111
|
+
const column = this.config.items.find(el => {return el.name === that.myConfig.name;}) ;
|
|
112
|
+
let temp = {};
|
|
113
|
+
temp.data = obj;
|
|
114
|
+
this.addRowInfo(temp,column);
|
|
115
|
+
return column.setDataBefore(temp, that);
|
|
116
|
+
},
|
|
117
|
+
setEditIndex(value) {
|
|
118
|
+
this.editIndex = value;
|
|
119
|
+
},
|
|
120
|
+
getEditIndex() {
|
|
121
|
+
return this.editIndex;
|
|
122
|
+
},
|
|
123
|
+
cancelCellEditing() {
|
|
124
|
+
this.editKey = '';
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
watch:{
|
|
128
|
+
valueData: {
|
|
129
|
+
handler(data) {
|
|
130
|
+
this.form = Object.assign({},this.form,data);
|
|
131
|
+
},
|
|
132
|
+
deep: true,
|
|
133
|
+
immediate: true,
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
</script>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import ExpandRow from './expandrow.vue';
|
|
2
|
+
import ViewGridBase from './viewgridbase.vue';
|
|
3
|
+
import ViewGrid from './viewgrid.vue';
|
|
4
|
+
import EditGrid from './editgrid.vue';
|
|
5
|
+
import EditGridCard from './editgridcard.vue';
|
|
6
|
+
export {ExpandRow,EditGrid,ViewGridBase,ViewGrid,EditGridCard};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div ref="head">
|
|
4
|
+
<div v-if="$slots.header" :style="myConfig.headStyle">
|
|
5
|
+
<slot name="header"></slot>
|
|
6
|
+
</div>
|
|
7
|
+
<div v-else :style="myConfig.headStyle">
|
|
8
|
+
<div v-if="showCondition">
|
|
9
|
+
<Row v-if="myConfig.gridType === 'billGrid'" :gutter="4">
|
|
10
|
+
<Col span='18'>
|
|
11
|
+
<ConditionBox ref="condition" :config="myConfig" @conditionAction="conditionAction" :dictData="dictData" modelType="billSearch"></ConditionBox>
|
|
12
|
+
</Col>
|
|
13
|
+
<Col span='6'>
|
|
14
|
+
<Row type="flex" justify="end" :gutter="8">
|
|
15
|
+
<Col>
|
|
16
|
+
<Toolbar :config="myToolConfig" @doAction="doBatchAction" tooltype="batch" :moduleMethod="globalConfig.moduleMethod" ></Toolbar>
|
|
17
|
+
</Col>
|
|
18
|
+
<Col v-if="showHelpBtn">
|
|
19
|
+
<a href="#" @click.prevent="openHelp">
|
|
20
|
+
<Tooltip content="帮助中心" placement="left">
|
|
21
|
+
<CommonIcon size="32" color="#2d8cf0" type="md-help-circle" />
|
|
22
|
+
</Tooltip>
|
|
23
|
+
</a>
|
|
24
|
+
</Col>
|
|
25
|
+
<Col v-if="modulecode">
|
|
26
|
+
<Tooltip :content="modulecode" placement="left">
|
|
27
|
+
<CommonIcon size="32" color="#2d8cf0" type="ios-information-circle-outline" />
|
|
28
|
+
</Tooltip>
|
|
29
|
+
</Col>
|
|
30
|
+
</Row>
|
|
31
|
+
</Col>
|
|
32
|
+
</Row>
|
|
33
|
+
<Row v-else>
|
|
34
|
+
<Col span='24'>
|
|
35
|
+
<ConditionBox ref="condition" :config="myConfig" @conditionAction="conditionAction" :dictData="dictData" :isPop="isPop"></ConditionBox>
|
|
36
|
+
</Col>
|
|
37
|
+
</Row>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<template v-if="!myConfig.multiSelectGrid">
|
|
42
|
+
<Table ref="table" :row-class-name="myConfig.rowClassName" :loading="loading" :show-summary="myConfig.showSummary" :summary-method="handleSummary" :size="myConfig.tableSize" :stripe="myConfig.showStripe" :border="myConfig.showBorder" :height="tableHeight" :max-height="tableMaxHeight" :show-header="myConfig.showHeader" :columns="tableColumns" :data="tempData" @on-sort-change="sortChagne" @on-current-change="onCurrentChange" :highlight-row="myConfig.highLightRow" @on-row-dblclick="dbclick" @on-select="onSelect" @on-select-cancel="onSelectCancel" @on-selection-change="OnSelectionChange" @on-row-click="click" @on-column-width-resize="onColumnWidthResize">
|
|
43
|
+
<template v-for="config in soltTableColumns" v-slot:[config.key]="{ index }" :key="'show_' + config.key">
|
|
44
|
+
<ShowText :label="formatValue(index,config)" :contentAlign="config.contentAlign" :rowIndex="index" ></ShowText>
|
|
45
|
+
</template>
|
|
46
|
+
</Table>
|
|
47
|
+
<div v-if="$slots.footer">
|
|
48
|
+
<slot name="footer"></slot>
|
|
49
|
+
</div>
|
|
50
|
+
<div ref="page" name="page">
|
|
51
|
+
<div v-if="myConfig.showPage" style="background:#eee;padding-top:5px;" >
|
|
52
|
+
<Card :bordered="false" :padding="0" :dis-hover="true" style="border-radius:0px">
|
|
53
|
+
<Row type="flex" justify="end" style="padding:5px;padding-right:10px">
|
|
54
|
+
<Page v-model="culPage" :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>
|
|
55
|
+
</Row>
|
|
56
|
+
</Card>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
<template v-else>
|
|
61
|
+
<Row type="flex" justify="center" align="middle" >
|
|
62
|
+
<Col :span="gridCol">
|
|
63
|
+
<Card :padding="0" :bordered="false">
|
|
64
|
+
<template #title>
|
|
65
|
+
<span v-text="myConfig.gridTitle"></span>
|
|
66
|
+
</template>
|
|
67
|
+
<Table ref="table" :row-class-name="myConfig.rowClassName" :show-summary="myConfig.showSummary" :summary-method="handleSummary" :loading="loading" :size="myConfig.tableSize" :stripe="myConfig.showStripe" :border="myConfig.showBorder" :height="tableHeight" :max-height="tableMaxHeight" :show-header="myConfig.showHeader" :columns="tableColumns" :data="tempData" @on-sort-change="sortChagne" @on-current-change="onCurrentChange" :highlight-row="myConfig.highLightRow" @on-row-dblclick="dbclick" @on-select="onSelect" @on-select-cancel="onSelectCancel" @on-selection-change="OnSelectionChange" @on-row-click="click" @on-column-width-resize="onColumnWidthResize">
|
|
68
|
+
<template v-for="config in soltTableColumns" v-slot:[config.key]="{ index }" :key="'show_' + config.key">
|
|
69
|
+
<ShowText :label="formatValue(index,config)" :contentAlign="config.contentAlign" :rowIndex="index"></ShowText>
|
|
70
|
+
</template>
|
|
71
|
+
</Table>
|
|
72
|
+
</Card>
|
|
73
|
+
</Col>
|
|
74
|
+
<Col span= '2'>
|
|
75
|
+
<Row type="flex" justify="center" align="middle" style="padding:5px;" >
|
|
76
|
+
<Tooltip content="删除" placement="left">
|
|
77
|
+
<Button type="primary" size="small" icon="ios-arrow-back" :disabled="!rightActive" @click="moveToLeft"></Button>
|
|
78
|
+
</Tooltip>
|
|
79
|
+
</Row>
|
|
80
|
+
<Row type="flex" justify="center" align="middle" style="padding:5px;" >
|
|
81
|
+
<Tooltip content="添加" placement="right">
|
|
82
|
+
<Button type="primary" size="small" icon="ios-arrow-forward" :disabled="!leftActive" @click="moveToRight"></Button>
|
|
83
|
+
</Tooltip>
|
|
84
|
+
</Row>
|
|
85
|
+
</Col>
|
|
86
|
+
<Col :span="multiGridCol">
|
|
87
|
+
<Card :padding="0" :bordered="false">
|
|
88
|
+
<template #title>
|
|
89
|
+
<span v-text="myConfig.multiGridTitle"></span>
|
|
90
|
+
</template>
|
|
91
|
+
<Table ref="multiSelectTable" :row-class-name="myConfig.rowClassName" :size="myConfig.tableSize" :stripe="myConfig.showStripe" :border="myConfig.showBorder" :height="tableHeight" :max-height="tableMaxHeight" :show-header="myConfig.showHeader" :columns="multiTableColumns" :data="tempMultiSelectData" :highlight-row="myConfig.highLightRow" @on-selection-change="OnMultiSelectionChange">
|
|
92
|
+
<template v-for="config in multiSoltTableColumns" v-slot:[config.key]="{ index }" :key="'show_' + config.key">
|
|
93
|
+
<ShowText :label="formatMulValue(index,config)" :contentAlign="config.contentAlign" ></ShowText>
|
|
94
|
+
</template>
|
|
95
|
+
</Table>
|
|
96
|
+
</Card>
|
|
97
|
+
</Col>
|
|
98
|
+
</Row>
|
|
99
|
+
<div ref="page" name="page">
|
|
100
|
+
<div v-if="$slots.footer">
|
|
101
|
+
<slot name="footer"></slot>
|
|
102
|
+
</div>
|
|
103
|
+
<div v-if="myConfig.showPage" ref="page" style="background:#eee;padding-top:5px;">
|
|
104
|
+
<Card :bordered="false" :padding="0" :dis-hover="true" style="border-radius:0px">
|
|
105
|
+
<Row type="flex" justify="start" style="padding:5px;padding-right:10px">
|
|
106
|
+
<Page v-model="culPage" :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>
|
|
107
|
+
</Row>
|
|
108
|
+
</Card>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</template>
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
114
|
+
<script>
|
|
115
|
+
import Base from './viewgridbase.vue';
|
|
116
|
+
export default {
|
|
117
|
+
name: 'viewgrid',
|
|
118
|
+
extends: Base,
|
|
119
|
+
mounted () {
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
</script>
|