ocpview-plus 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ocpviewplus.min.esm.js +687 -526
- package/dist/ocpviewplus.min.js +14 -14
- package/package.json +1 -1
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTable.vue +19 -2
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTableControlbox.vue +126 -0
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTableControlboxNumberbox.vue +21 -0
- package/src/components/masterplate/RewriteBillListDetails/mixins/useVxeGridEditTypeKeydownEventHook.js +4 -0
- package/src/components/numberbox/NumberBoxV1.vue +39 -0
- package/src/components/numberbox/index.js +4 -3
- package/src/index.js +3 -2
- package/src/method/const/const.js +149 -149
package/package.json
CHANGED
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
:mouse-config="VG_mouseConfig"
|
|
113
113
|
@sort-change="RewriteTableOnSortChange"
|
|
114
114
|
@cell-dblclick="RewriteTableCellDBlclick"
|
|
115
|
+
@edit-activated="VG_editActivated"
|
|
115
116
|
@keydown="VG_keydown"
|
|
116
117
|
>
|
|
117
118
|
<!-- 操作面板插槽 -->
|
|
@@ -154,7 +155,7 @@
|
|
|
154
155
|
|
|
155
156
|
<!-- 编辑列插槽 -->
|
|
156
157
|
<template #columnEdit="{ row, rowIndex, columnIndex }">
|
|
157
|
-
<
|
|
158
|
+
<BillInfoPanelEditTableControlbox
|
|
158
159
|
:autofocus="true"
|
|
159
160
|
:config="getTableColumnConfig(columnIndex)"
|
|
160
161
|
:valueData="row"
|
|
@@ -165,7 +166,7 @@
|
|
|
165
166
|
}
|
|
166
167
|
"
|
|
167
168
|
@doAction="doAction"
|
|
168
|
-
></
|
|
169
|
+
></BillInfoPanelEditTableControlbox>
|
|
169
170
|
</template>
|
|
170
171
|
</vxe-grid>
|
|
171
172
|
<!-- 编辑表格 覆写结束 -->
|
|
@@ -275,11 +276,13 @@
|
|
|
275
276
|
</template>
|
|
276
277
|
<script>
|
|
277
278
|
import editgridcard from "../editgridcard.vue";
|
|
279
|
+
import BillInfoPanelEditTableControlbox from "./BillInfoPanelEditTableControlbox.vue";
|
|
278
280
|
import useVxeGridEditTypeKeydownEventHook from "./mixins/useVxeGridEditTypeKeydownEventHook.js";
|
|
279
281
|
|
|
280
282
|
export default {
|
|
281
283
|
name: "BillInfoPanelEditTable",
|
|
282
284
|
extends: editgridcard,
|
|
285
|
+
components: { BillInfoPanelEditTableControlbox },
|
|
283
286
|
mixins: [useVxeGridEditTypeKeydownEventHook],
|
|
284
287
|
data() {
|
|
285
288
|
return {
|
|
@@ -352,6 +355,16 @@ export default {
|
|
|
352
355
|
!columnsItemType && {
|
|
353
356
|
editRender: {
|
|
354
357
|
enabled: true,
|
|
358
|
+
autoselect: this.$utils.get(
|
|
359
|
+
item,
|
|
360
|
+
"autoselect",
|
|
361
|
+
false
|
|
362
|
+
),
|
|
363
|
+
autofocus: this.$utils.get(
|
|
364
|
+
item,
|
|
365
|
+
"autofocus",
|
|
366
|
+
""
|
|
367
|
+
),
|
|
355
368
|
defaultValue: item.defaultValue || "",
|
|
356
369
|
},
|
|
357
370
|
slots: { edit: "columnEdit" },
|
|
@@ -679,6 +692,10 @@ export default {
|
|
|
679
692
|
},
|
|
680
693
|
|
|
681
694
|
getTableColumnConfig(index) {
|
|
695
|
+
let column = this.tableColumns[index];
|
|
696
|
+
if (column.type === "NumberBox") {
|
|
697
|
+
column.place = "unset";
|
|
698
|
+
}
|
|
682
699
|
return this.tableColumns[index];
|
|
683
700
|
},
|
|
684
701
|
|
package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTableControlbox.vue
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="hackReset" @keydown.enter="keyDown('enter')">
|
|
3
|
+
<template v-if="type === 'Divider'">
|
|
4
|
+
<Divider
|
|
5
|
+
:orientation="config.orientation"
|
|
6
|
+
:dashed="config.dashed"
|
|
7
|
+
:type="config.vtype"
|
|
8
|
+
:id="config.id"
|
|
9
|
+
:style="config.style"
|
|
10
|
+
>
|
|
11
|
+
<template v-if="!!config.label || !!config.hide" #default>
|
|
12
|
+
<span v-if="!!config.label" v-text="config.label"> </span>
|
|
13
|
+
<div v-if="!!config.hide">
|
|
14
|
+
<p
|
|
15
|
+
v-if="hideFlag"
|
|
16
|
+
@click.stop="hide"
|
|
17
|
+
class="efuture-hide-text"
|
|
18
|
+
>
|
|
19
|
+
<Icon type="ios-arrow-up" />
|
|
20
|
+
<span> 收起查询条件 </span>
|
|
21
|
+
</p>
|
|
22
|
+
<p v-else @click.stop="hide" class="efuture-hide-text">
|
|
23
|
+
<Icon type="ios-arrow-down" />
|
|
24
|
+
<span>展开查询条件</span>
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
</Divider>
|
|
29
|
+
</template>
|
|
30
|
+
<template v-else-if="type === 'NumberRangeBox'">
|
|
31
|
+
<NumberRangeBox
|
|
32
|
+
ref="myControl"
|
|
33
|
+
:fatherSvalue="svalue"
|
|
34
|
+
:fatherEvalue="evalue"
|
|
35
|
+
@inputValue="input"
|
|
36
|
+
:config="config"
|
|
37
|
+
></NumberRangeBox>
|
|
38
|
+
</template>
|
|
39
|
+
<template v-else-if="type === 'DateRangeBox'">
|
|
40
|
+
<DateRangeBox
|
|
41
|
+
ref="myControl"
|
|
42
|
+
:fatherSvalue="svalue"
|
|
43
|
+
:fatherEvalue="evalue"
|
|
44
|
+
@inputValue="input"
|
|
45
|
+
:config="config"
|
|
46
|
+
></DateRangeBox>
|
|
47
|
+
</template>
|
|
48
|
+
<template v-else-if="type === 'PopTextBox'">
|
|
49
|
+
<PopTextBox
|
|
50
|
+
ref="myControl"
|
|
51
|
+
:fatherValue="value"
|
|
52
|
+
:fatherText="text"
|
|
53
|
+
@inputValue="input"
|
|
54
|
+
:config="config"
|
|
55
|
+
></PopTextBox>
|
|
56
|
+
</template>
|
|
57
|
+
<template v-else-if="type === 'PictureBox'">
|
|
58
|
+
<PictureBox
|
|
59
|
+
ref="myControl"
|
|
60
|
+
v-if="config.multiSelect !== true"
|
|
61
|
+
:fatherValue="value"
|
|
62
|
+
@inputValue="input"
|
|
63
|
+
:config="config"
|
|
64
|
+
:readOnly="readOnly"
|
|
65
|
+
:showStyle="config.showStyle"
|
|
66
|
+
></PictureBox>
|
|
67
|
+
<PictureBox
|
|
68
|
+
ref="myControl"
|
|
69
|
+
v-else
|
|
70
|
+
:config="config"
|
|
71
|
+
:readOnly="readOnly"
|
|
72
|
+
:showStyle="config.showStyle"
|
|
73
|
+
></PictureBox>
|
|
74
|
+
</template>
|
|
75
|
+
<template v-else-if="type === 'VideoBox'">
|
|
76
|
+
<VideoBox
|
|
77
|
+
ref="myControl"
|
|
78
|
+
v-if="config.multiSelect !== true"
|
|
79
|
+
:fatherValue="value"
|
|
80
|
+
@inputValue="input"
|
|
81
|
+
:config="config"
|
|
82
|
+
:readOnly="readOnly"
|
|
83
|
+
:showStyle="config.showStyle"
|
|
84
|
+
></VideoBox>
|
|
85
|
+
<VideoBox
|
|
86
|
+
ref="myControl"
|
|
87
|
+
v-else
|
|
88
|
+
:config="config"
|
|
89
|
+
:readOnly="readOnly"
|
|
90
|
+
:showStyle="config.showStyle"
|
|
91
|
+
></VideoBox>
|
|
92
|
+
</template>
|
|
93
|
+
<template v-else-if="type === 'NumberBox'">
|
|
94
|
+
<BillInfoPanelEditTableControlboxNumberbox
|
|
95
|
+
ref="myControl"
|
|
96
|
+
:fatherValue="value"
|
|
97
|
+
:readOnly="readOnly"
|
|
98
|
+
@inputValue="input"
|
|
99
|
+
:config="config"
|
|
100
|
+
></BillInfoPanelEditTableControlboxNumberbox>
|
|
101
|
+
</template>
|
|
102
|
+
<template v-else>
|
|
103
|
+
<component
|
|
104
|
+
:is="type"
|
|
105
|
+
ref="myControl"
|
|
106
|
+
:fatherValue="value"
|
|
107
|
+
:readOnly="readOnly"
|
|
108
|
+
@inputValue="input"
|
|
109
|
+
:config="config"
|
|
110
|
+
/>
|
|
111
|
+
</template>
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
114
|
+
|
|
115
|
+
<script>
|
|
116
|
+
import controlbox from "../../base/controlbox.vue";
|
|
117
|
+
import BillInfoPanelEditTableControlboxNumberbox from "./BillInfoPanelEditTableControlboxNumberbox.vue";
|
|
118
|
+
export default {
|
|
119
|
+
name: "BillInfoPanelEditTableControlbox",
|
|
120
|
+
extends: controlbox,
|
|
121
|
+
components: { BillInfoPanelEditTableControlboxNumberbox },
|
|
122
|
+
mounted() {
|
|
123
|
+
// console.log("我继承覆写了999999");
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import numberbox from "../../numberbox/numberbox.vue";
|
|
3
|
+
export default {
|
|
4
|
+
name: "BillInfoPanelEditTableControlboxNumberbox",
|
|
5
|
+
extends: numberbox,
|
|
6
|
+
methods: {
|
|
7
|
+
init() {
|
|
8
|
+
// 获取默认属性
|
|
9
|
+
this.myConfig = Object.assign({}, this.globalConfig, this.myConfig);
|
|
10
|
+
|
|
11
|
+
// 获取动态属性
|
|
12
|
+
if (this.config) {
|
|
13
|
+
this.myConfig = Object.assign({}, this.myConfig, this.config);
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
mounted() {
|
|
18
|
+
// console.log("我继承覆写了999999");
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import numberbox from "./numberbox.vue";
|
|
3
|
+
export default {
|
|
4
|
+
name: "NumberBoxV1",
|
|
5
|
+
extends: numberbox,
|
|
6
|
+
methods: {
|
|
7
|
+
init() {
|
|
8
|
+
// 获取默认属性
|
|
9
|
+
this.myConfig = Object.assign({}, this.globalConfig, this.myConfig);
|
|
10
|
+
|
|
11
|
+
// 获取动态属性
|
|
12
|
+
if (this.config) {
|
|
13
|
+
this.myConfig = Object.assign({}, this.myConfig, this.config);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
this.myConfig.place = "unset";
|
|
17
|
+
|
|
18
|
+
if (this.customInit) {
|
|
19
|
+
this.customInit();
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
parser(event) {
|
|
23
|
+
this.label = this.getValueNumber(this.value);
|
|
24
|
+
if (event) {
|
|
25
|
+
const currentTarget = event.currentTarget;
|
|
26
|
+
setTimeout(() => {
|
|
27
|
+
currentTarget.select();
|
|
28
|
+
}, 0);
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
// mounted() {
|
|
33
|
+
// // console.log("我继承覆写了");
|
|
34
|
+
// },
|
|
35
|
+
// beforeUnmount() {
|
|
36
|
+
// // console.log("我销毁了");
|
|
37
|
+
// },
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import NumberBox from
|
|
2
|
-
import NumberRangeBox from
|
|
3
|
-
|
|
1
|
+
import NumberBox from "./numberbox.vue";
|
|
2
|
+
import NumberRangeBox from "./numberrangebox.vue";
|
|
3
|
+
import NumberBoxV1 from "./NumberBoxV1.vue";
|
|
4
|
+
export { NumberBox, NumberRangeBox, NumberBoxV1 };
|
package/src/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from './components/grid';
|
|
20
20
|
import TextBox from './components/textbox';
|
|
21
21
|
import RichTextBox from './components/richtextbox';
|
|
22
|
-
import { NumberBox, NumberRangeBox } from './components/numberbox';
|
|
22
|
+
import { NumberBox, NumberRangeBox,NumberBoxV1 } from './components/numberbox';
|
|
23
23
|
import { DateBox, DateRangeBox } from './components/datebox';
|
|
24
24
|
import TimePicBox from './components/timebox';
|
|
25
25
|
import PopTextBox from './components/poptextbox';
|
|
@@ -171,7 +171,8 @@ const components = {
|
|
|
171
171
|
mBillAsyncImport,
|
|
172
172
|
mBillImport,
|
|
173
173
|
wRichTextBox,
|
|
174
|
-
mBillListDetails
|
|
174
|
+
mBillListDetails,
|
|
175
|
+
NumberBoxV1
|
|
175
176
|
};
|
|
176
177
|
|
|
177
178
|
const iview = {
|