ocpview-plus 1.1.6 → 1.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ocpview-plus",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -0,0 +1,121 @@
1
+ <template>
2
+ <div>
3
+ <Card
4
+ :padding="0"
5
+ dis-hover
6
+ :bordered="false"
7
+ style="background: #fff; padding: 14px 16px 14px 16px"
8
+ >
9
+ <div ref="toolbar" style="padding-bottom: 14px">
10
+ <!-- 列表覆写开始 -->
11
+ <BillListPanelV3QueryBar
12
+ :config="myConfig.queryConfig"
13
+ :dictData="dictData"
14
+ :moduleMethod="moduleMethod"
15
+ @conditionAction="conditionAction"
16
+ @doAction="doAction"
17
+ />
18
+ <!-- 列表覆写结束 -->
19
+ </div>
20
+ <Card
21
+ class="billquerygrid"
22
+ :padding="0"
23
+ :bordered="false"
24
+ dis-hover
25
+ >
26
+ <Dropdown
27
+ trigger="custom"
28
+ :visible="colsetFlag"
29
+ style="
30
+ position: absolute;
31
+ z-index: 99;
32
+ right: 15px;
33
+ top: 1px;
34
+ padding: 7.5px;
35
+ background-color: #f5f7fa;
36
+ "
37
+ placement="bottom-end"
38
+ :transfer="transferFlag"
39
+ @on-clickoutside="closeColset"
40
+ >
41
+ <Tooltip placement="top">
42
+ <template #content>
43
+ <div>
44
+ <span style="font-size: 12px"> 表头设计 </span>
45
+ </div>
46
+ </template>
47
+ <p style="cursor: pointer" @click.stop="openColSet">
48
+ <Icon
49
+ custom="iconfont icon-custom-colset"
50
+ style="margin-top: 4px"
51
+ size="16"
52
+ color="#515a6e"
53
+ />
54
+ </p>
55
+ </Tooltip>
56
+ <template #list>
57
+ <DropdownMenu>
58
+ <GridColSet
59
+ ref="gridcol"
60
+ :config="myConfig.gridConfig"
61
+ @doAction="doAction"
62
+ />
63
+ </DropdownMenu>
64
+ </template>
65
+ </Dropdown>
66
+ <SimpleViewGrid
67
+ v-if="reset"
68
+ ref="grid"
69
+ :config="changeGridConfig"
70
+ :dictData="dictData"
71
+ @dbclick="dbclick"
72
+ />
73
+ </Card>
74
+ </Card>
75
+ </div>
76
+ </template>
77
+
78
+ <script>
79
+ import billquerygrid from "../billquerygrid.vue";
80
+ import BillListPanelV3QueryBar from "./BillListPanelV3QueryBar.vue";
81
+ export default {
82
+ name: "BillListPanelV2",
83
+ extends: billquerygrid,
84
+ components: { BillListPanelV3QueryBar },
85
+ data() {
86
+ return {
87
+ billListPanelSearchParams: {},
88
+ };
89
+ },
90
+ computed: {},
91
+ methods: {
92
+ /**
93
+ * 列表覆写点
94
+ * para 原始查询条件
95
+ * flag 是否是刷新
96
+ */
97
+ refurbish(para, flag = "base") {
98
+ if (!para) {
99
+ para = {};
100
+ if (flag === "backData") {
101
+ para = this.billListPanelSearchParams;
102
+ }
103
+ }
104
+ this.billListPanelSearchParams = para;
105
+ this.$refs.grid.clearSearchBeforeSearchParam();
106
+ this.$refs.grid.setSearchBeforeSearchParam(para);
107
+ this.$refs.grid.refurbish();
108
+ },
109
+ },
110
+ mounted() {},
111
+ created() {
112
+ if (this.myConfig.gridConfig.searchFormList) {
113
+ this.myConfig.queryConfig.searchFormList = this.$Method.copy(
114
+ this.myConfig.gridConfig.searchFormList
115
+ );
116
+ }
117
+ },
118
+ };
119
+ </script>
120
+
121
+ <style lang="scss" scoped></style>
@@ -0,0 +1,270 @@
1
+ <template>
2
+ <div class="querybar list-details-v3-panel">
3
+ <Row type="flex" :gutter="0">
4
+ <Col span="16">
5
+ <!-- 列表快捷查询 -->
6
+ <FormBox
7
+ v-if="searchFormListShowType"
8
+ ref="searchFormListVM"
9
+ :config="searchFormList"
10
+ :dictData="dictData"
11
+ />
12
+ <!-- 列表快捷查询 -->
13
+ </Col>
14
+ <Col span="8">
15
+ <Row type="flex" justify="end" :gutter="0">
16
+ <Col style="margin-right: 10px">
17
+ <Button
18
+ customIcon="iconfont icon-custom-search"
19
+ type="primary"
20
+ @click="search"
21
+ >查询</Button
22
+ >
23
+ </Col>
24
+ <Col>
25
+ <Button
26
+ customIcon="iconfont icon-custom-reset"
27
+ @click="clear"
28
+ >重置</Button
29
+ >
30
+ </Col>
31
+ <Col>
32
+ <Divider type="vertical" class="dividercommon" />
33
+ </Col>
34
+ <Col style="padding-right: 20px">
35
+ <Dropdown
36
+ trigger="custom"
37
+ :visible="filterSceneFlag"
38
+ @on-click="filterAction"
39
+ placement="bottom-start"
40
+ @on-clickoutside="closeFilterScene"
41
+ >
42
+ <Badge class-name="badgeclass" :count="sceneNum">
43
+ <ButtonGroup>
44
+ <Button
45
+ customIcon="iconfont icon-custom-filter"
46
+ @click="updataFilterScene"
47
+ >高级查询</Button
48
+ >
49
+ <Button
50
+ v-if="!filterSceneFlag && sceneFlag"
51
+ icon="ios-arrow-down"
52
+ @click="openFilterScene"
53
+ >
54
+ </Button>
55
+ <Button
56
+ v-if="filterSceneFlag && sceneFlag"
57
+ icon="ios-arrow-up"
58
+ @click="closeFilterScene"
59
+ >
60
+ </Button>
61
+ </ButtonGroup>
62
+ </Badge>
63
+ <template #list>
64
+ <DropdownMenu>
65
+ <DropdownItem
66
+ v-for="(temp, index) in sceneData"
67
+ :selected="
68
+ temp.scenename == selectedScence
69
+ "
70
+ :name="temp.scenename"
71
+ :key="'scene_' + index"
72
+ >{{ temp.scenename }}</DropdownItem
73
+ >
74
+ </DropdownMenu>
75
+ </template>
76
+ </Dropdown>
77
+ </Col>
78
+ <Col style="padding-right: 10px">
79
+ <Dropdown
80
+ trigger="custom"
81
+ :visible="btnFlag"
82
+ @on-click="action"
83
+ placement="bottom-start"
84
+ @on-clickoutside="closeBtn"
85
+ >
86
+ <ButtonGroup>
87
+ <Button
88
+ customIcon="iconfont icon-custom-add"
89
+ v-if="addDataBtnFlag"
90
+ @click="addData"
91
+ >新增</Button
92
+ >
93
+ <Button
94
+ v-if="!btnFlag && moreBtnFlag"
95
+ icon="ios-arrow-down"
96
+ @click="openBtn"
97
+ >
98
+ </Button>
99
+ <Button
100
+ v-if="btnFlag && moreBtnFlag"
101
+ icon="ios-arrow-up"
102
+ @click="closeBtn"
103
+ >
104
+ </Button>
105
+ </ButtonGroup>
106
+ <template #list>
107
+ <DropdownMenu>
108
+ <DropdownItem
109
+ v-for="(item, index) in btnData"
110
+ style="padding-left: 0px"
111
+ :key="'btn_' + index"
112
+ >
113
+ <Button
114
+ :icon="item.icon"
115
+ type="text"
116
+ :customIcon="item.customIcon"
117
+ @click="action(item.name)"
118
+ >{{ item.text }}</Button
119
+ >
120
+ </DropdownItem>
121
+ </DropdownMenu>
122
+ </template>
123
+ </Dropdown>
124
+ </Col>
125
+ <Col>
126
+ <PromptMessages style="height: 100%" />
127
+ </Col>
128
+ </Row>
129
+ </Col>
130
+ </Row>
131
+ <div v-show="filterFlag" style="margin-top: 20px">
132
+ <BillConditionsBox
133
+ ref="filter"
134
+ @doAction="doAction"
135
+ @conditionAction="conditionAction"
136
+ :config="config"
137
+ :dictData="dictData"
138
+ />
139
+ </div>
140
+ </div>
141
+ </template>
142
+ <script>
143
+ import querybar from "../querybar.vue";
144
+
145
+ export default {
146
+ name: "BillListPanelV2QueryBar",
147
+ extends: querybar,
148
+ data() {
149
+ return {
150
+ searchFormListShowType: false,
151
+ searchFormList: {},
152
+ searchFormItemHashMap: {},
153
+ };
154
+ },
155
+ methods: {
156
+ /**
157
+ * 快捷查询参数整理复写
158
+ */
159
+ customGetQuerySearchParam() {
160
+ let searchParam = {};
161
+ // let obj = {};
162
+ // let el = {};
163
+ // el.field = this.$refs.field.getValue();
164
+ // el.editors = this.$refs.editors.getValue();
165
+ // el.calculator = "==";
166
+ // if (el.field && el.editors) {
167
+ // if (this.dataType[el.field].calculator) {
168
+ // el.calculator = this.dataType[el.field].calculator;
169
+ // }
170
+ // obj = this.getConditionValue(
171
+ // el.field,
172
+ // el.editors,
173
+ // el.calculator,
174
+ // this.dataType[el.field]
175
+ // );
176
+ // }
177
+ // searchParam = obj;
178
+ // ==============================================
179
+ if (this.$refs.searchFormListVM) {
180
+ const searchFormData = this.$refs.searchFormListVM.getData();
181
+ this.$utils.objectEach(searchFormData, (value, key) => {
182
+ const itemConfig = this.$utils.get(
183
+ this.searchFormItemHashMap,
184
+ key,
185
+ {}
186
+ );
187
+ const valueStr = this.$utils.toValueString(value);
188
+ if (
189
+ !this.$utils.isEmpty(itemConfig) &&
190
+ !this.$utils.isEmpty(valueStr)
191
+ ) {
192
+ const fieldKey = this.$utils.get(
193
+ itemConfig,
194
+ "field",
195
+ key
196
+ );
197
+ const calculator = this.$utils.get(
198
+ itemConfig,
199
+ "calculator",
200
+ "=="
201
+ );
202
+ const transformObj = this.getConditionValue(
203
+ fieldKey,
204
+ value,
205
+ calculator,
206
+ itemConfig
207
+ );
208
+ searchParam = { ...searchParam, ...transformObj };
209
+ }
210
+ });
211
+ }
212
+ // ==============================================
213
+ return searchParam;
214
+ },
215
+ /**
216
+ * 重置事件复写
217
+ */
218
+ clear() {
219
+ // this.customClear();
220
+ let temp = {};
221
+ temp.name = "condition_clear";
222
+ this.$emit("conditionAction", temp);
223
+ // ==============================================
224
+ this.clearSearchParams();
225
+ // ==============================================
226
+ },
227
+ clearSearchParams() {
228
+ if (this.$refs.searchFormListVM) {
229
+ this.$refs.searchFormListVM.clearData();
230
+ }
231
+ },
232
+ conditionAction(obj) {
233
+ // this.filterFlag = false;
234
+ let data = this.$refs.filter.getData();
235
+ this.updateScene(data.scenename, data);
236
+ this.$emit("conditionAction", obj);
237
+ },
238
+ },
239
+ computed: {},
240
+ mounted() {},
241
+ created() {
242
+ this.searchFormList = this.$utils.get(
243
+ this.config,
244
+ "searchFormList",
245
+ {}
246
+ );
247
+ const items = this.$utils.get(this.searchFormList, "items", []);
248
+ this.searchFormListShowType = items.length > 0;
249
+ this.searchFormItemHashMap = this.$utils.reduce(
250
+ items,
251
+ (previous, item) => {
252
+ previous[item.name] = {
253
+ ...item,
254
+ field: this.$utils.get(item, "field", item.name),
255
+ };
256
+ return previous;
257
+ },
258
+ {}
259
+ );
260
+ },
261
+ };
262
+ </script>
263
+
264
+ <style lang="less">
265
+ .list-details-v3-panel {
266
+ .ivu-form-item {
267
+ margin-top: 0px;
268
+ }
269
+ }
270
+ </style>