ocpview-plus 1.2.3 → 1.2.5

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.2.3",
3
+ "version": "1.2.5",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -4,7 +4,7 @@
4
4
  :padding="0"
5
5
  dis-hover
6
6
  :bordered="false"
7
- style="background: #fff; padding: 14px 16px 14px 16px"
7
+ style="background: #FAFCFF; padding: 14px 16px 14px 16px"
8
8
  >
9
9
  <div ref="toolbar" style="padding-bottom: 14px">
10
10
  <!-- 列表覆写开始 -->
@@ -20,7 +20,7 @@
20
20
  <Card
21
21
  class="billquerygrid"
22
22
  :padding="0"
23
- :bordered="false"
23
+ :bordered="true"
24
24
  dis-hover
25
25
  >
26
26
  <Dropdown
@@ -1,134 +1,139 @@
1
1
  <template>
2
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">
3
+ <Card :padding="0" style="padding: 14px 16px" dis-hover>
4
+ <Row type="flex" :gutter="0">
5
+ <Col span="16">
6
+ <!-- 列表快捷查询 -->
7
+ <FormBox
8
+ v-if="searchFormListShowType"
9
+ ref="searchFormListVM"
10
+ :config="searchFormList"
11
+ :dictData="dictData"
12
+ />
13
+ <!-- 列表快捷查询 -->
14
+ </Col>
15
+ <Col span="8">
16
+ <Row type="flex" justify="end" :gutter="0">
17
+ <Col style="margin-right: 10px">
18
+ <Button
19
+ customIcon="iconfont icon-custom-search"
20
+ type="primary"
21
+ @click="search"
22
+ >查询</Button
23
+ >
24
+ </Col>
25
+ <Col>
26
+ <Button
27
+ customIcon="iconfont icon-custom-reset"
28
+ @click="clear"
29
+ >重置</Button
30
+ >
31
+ </Col>
32
+ <Col>
33
+ <Divider type="vertical" class="dividercommon" />
34
+ </Col>
35
+ <Col style="padding-right: 20px">
36
+ <Dropdown
37
+ trigger="custom"
38
+ :visible="filterSceneFlag"
39
+ @on-click="filterAction"
40
+ placement="bottom-start"
41
+ @on-clickoutside="closeFilterScene"
42
+ >
43
+ <Badge
44
+ class-name="badgeclass"
45
+ :count="sceneNum"
46
+ >
47
+ <ButtonGroup>
48
+ <Button
49
+ customIcon="iconfont icon-custom-filter"
50
+ @click="updataFilterScene"
51
+ >高级查询</Button
52
+ >
53
+ <Button
54
+ v-if="!filterSceneFlag && sceneFlag"
55
+ icon="ios-arrow-down"
56
+ @click="openFilterScene"
57
+ >
58
+ </Button>
59
+ <Button
60
+ v-if="filterSceneFlag && sceneFlag"
61
+ icon="ios-arrow-up"
62
+ @click="closeFilterScene"
63
+ >
64
+ </Button>
65
+ </ButtonGroup>
66
+ </Badge>
67
+ <template #list>
68
+ <DropdownMenu>
69
+ <DropdownItem
70
+ v-for="(temp, index) in sceneData"
71
+ :selected="
72
+ temp.scenename == selectedScence
73
+ "
74
+ :name="temp.scenename"
75
+ :key="'scene_' + index"
76
+ >{{ temp.scenename }}</DropdownItem
77
+ >
78
+ </DropdownMenu>
79
+ </template>
80
+ </Dropdown>
81
+ </Col>
82
+ <Col style="padding-right: 10px">
83
+ <Dropdown
84
+ trigger="custom"
85
+ :visible="btnFlag"
86
+ @on-click="action"
87
+ placement="bottom-start"
88
+ @on-clickoutside="closeBtn"
89
+ >
43
90
  <ButtonGroup>
44
91
  <Button
45
- customIcon="iconfont icon-custom-filter"
46
- @click="updataFilterScene"
47
- >高级查询</Button
92
+ customIcon="iconfont icon-custom-add"
93
+ v-if="addDataBtnFlag"
94
+ @click="addData"
95
+ >新增</Button
48
96
  >
49
97
  <Button
50
- v-if="!filterSceneFlag && sceneFlag"
98
+ v-if="!btnFlag && moreBtnFlag"
51
99
  icon="ios-arrow-down"
52
- @click="openFilterScene"
100
+ @click="openBtn"
53
101
  >
54
102
  </Button>
55
103
  <Button
56
- v-if="filterSceneFlag && sceneFlag"
104
+ v-if="btnFlag && moreBtnFlag"
57
105
  icon="ios-arrow-up"
58
- @click="closeFilterScene"
106
+ @click="closeBtn"
59
107
  >
60
108
  </Button>
61
109
  </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
110
+ <template #list>
111
+ <DropdownMenu>
112
+ <DropdownItem
113
+ v-for="(item, index) in btnData"
114
+ style="padding-left: 0px"
115
+ :key="'btn_' + index"
119
116
  >
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">
117
+ <Button
118
+ :icon="item.icon"
119
+ type="text"
120
+ :customIcon="item.customIcon"
121
+ @click="action(item.name)"
122
+ >{{ item.text }}</Button
123
+ >
124
+ </DropdownItem>
125
+ </DropdownMenu>
126
+ </template>
127
+ </Dropdown>
128
+ </Col>
129
+ <Col>
130
+ <PromptMessages style="height: 100%" />
131
+ </Col>
132
+ </Row>
133
+ </Col>
134
+ </Row>
135
+ </Card>
136
+ <div v-show="filterFlag" style="margin-top: 14px">
132
137
  <BillConditionsBox
133
138
  ref="filter"
134
139
  @doAction="doAction"
@@ -143,7 +148,7 @@
143
148
  import querybar from "../querybar.vue";
144
149
 
145
150
  export default {
146
- name: "BillListPanelV2QueryBar",
151
+ name: "BillListPanelV3QueryBar",
147
152
  extends: querybar,
148
153
  data() {
149
154
  return {
@@ -77,7 +77,6 @@ export default {
77
77
  this.uiconfig = config;
78
78
  Object.assign(this,obj);
79
79
  this.init();
80
- // this.loadDynamicConfig();
81
80
  if (this.customInit) {
82
81
  this.customInit();
83
82
  }
@@ -194,10 +193,8 @@ export default {
194
193
  }
195
194
  this.setDictData();
196
195
  this.importReset = false;
197
- console.log('---------- base 执行完毕')
198
196
  this.$nextTick(() => {
199
197
  this.importReset = true;
200
-
201
198
  });
202
199
  },
203
200
  initUiConfig(obj,tmp) {
@@ -316,7 +313,6 @@ export default {
316
313
  });
317
314
 
318
315
  },
319
-
320
316
  commonUiCustomConfig(obj,items) {
321
317
  let index = items.findIndex(el => el.name === obj.fieldname || el.sname === obj.fieldname);
322
318
  if (index > -1) {
@@ -355,158 +351,6 @@ export default {
355
351
  Object.assign(items[index], tmp);
356
352
  }
357
353
  },
358
- loadDynamicConfig() {
359
- try {
360
- const postData = {
361
- modulecode: this.globalConfig.modulecode,
362
- moduleid: this.globalConfig.modulecode
363
- };
364
-
365
- this.asyncPost(
366
- this.uiconfig.resources,
367
- "uiconfigs.getPageConfig",
368
- postData,
369
- (data) => {
370
- if (!data || !this.uiconfig) {
371
- console.log('1 没有配置数据')
372
- return;
373
- }
374
-
375
- this.mergeDynamicConfig(
376
- this.uiconfig,
377
- data
378
- );
379
- }
380
- ,function(data) {
381
- console.error(data)
382
- },function(data) {
383
- console.error(data)
384
- });
385
- } catch (e) {
386
- console.error('动态配置加载失败', e);
387
- }
388
- },
389
-
390
- /**
391
- * 通用递归合并配置
392
- * @param {Object} localConfig 本地 config(this.uiconfig)
393
- * @param {Object} serverConfig 接口返回 config
394
- */
395
-
396
- mergeDynamicConfig(localConfig, serverConfig) {
397
- if (!localConfig || !serverConfig) {
398
- console.log('1 没有配置数据')
399
- return;
400
- }
401
-
402
- // ✅ 1️⃣ 处理 billQueryConfig
403
- if (
404
- localConfig.billQueryConfig.gridConfig.items &&
405
- serverConfig.billQueryConfig.gridConfig.items
406
- ) {
407
- this.mergeFlatItems(
408
- localConfig.billQueryConfig.gridConfig.items,
409
- serverConfig.billQueryConfig.gridConfig.items
410
- );
411
- }
412
-
413
- // ✅ 2️⃣ 处理 detailConfig
414
- if (localConfig.detailConfig && serverConfig.detailConfig) {
415
- this.mergeDetailConfig(
416
- localConfig.detailConfig,
417
- serverConfig.detailConfig
418
- );
419
- }
420
- },
421
-
422
- mergeDetailConfig(localDetail, serverDetail) {
423
-
424
- // ✅ formsConfig
425
- if (
426
- localDetail.formsConfig.items &&
427
- serverDetail.formsConfig.items
428
- ) {
429
- this.mergeContainerItems(
430
- localDetail.formsConfig.items,
431
- serverDetail.formsConfig.items
432
- );
433
- }
434
-
435
- // ✅ billDetailConfig
436
- if (
437
- localDetail.billDetailConfig.items &&
438
- serverDetail.billDetailConfig.items
439
- ) {
440
- this.mergeContainerItems(
441
- localDetail.billDetailConfig.items,
442
- serverDetail.billDetailConfig.items
443
- );
444
- }
445
- },
446
-
447
- mergeContainerItems(localContainers, serverContainers) {
448
-
449
- const containerMap = this.buildItemMap(localContainers);
450
-
451
- serverContainers.forEach(serverContainer => {
452
-
453
- const localContainer = containerMap.get(serverContainer.name);
454
- if (!localContainer) {
455
- console.log('2 没有配置localcontainer')
456
- return;
457
- }
458
-
459
- // ✅ 合并容器自身属性
460
- Object.assign(localContainer, serverContainer);
461
-
462
- // ✅ 如果有子字段
463
- if (
464
- Array.isArray(localContainer.items) &&
465
- Array.isArray(serverContainer.items)
466
- ) {
467
- this.mergeFlatItems(
468
- localContainer.items,
469
- serverContainer.items
470
- );
471
- }
472
- });
473
- },
474
-
475
- mergeFlatItems(localItems, serverItems) {
476
- const fieldMap = this.buildItemMap(localItems);
477
-
478
- serverItems.forEach(serverItem => {
479
- const localItem = fieldMap.get(serverItem.name);
480
- console.log(serverItem.name, localItem)
481
- if (localItem) {
482
- console.log('合并前', localItem)
483
- Object.assign(localItem, serverItem);
484
- console.log('merge后', JSON.stringify(this.uiconfig))
485
- this.uiconfig = Object.assign({}, this.uiconfig);
486
- }
487
- });
488
- },
489
-
490
- buildItemMap(items, map = new Map()) {
491
- if (!Array.isArray(items)) return map;
492
-
493
- items.forEach(item => {
494
- if (!item) {
495
- console.log('3 没有配置数据')
496
- return;
497
- }
498
-
499
- if (item.name) {
500
- map.set(item.name, item);
501
- }
502
-
503
- if (Array.isArray(item.items)) {
504
- this.buildItemMap(item.items, map);
505
- }
506
- });
507
-
508
- return map;
509
- },
510
354
  _isFun (pro) {
511
355
  let index = this.eventObject.findIndex(el => el === pro);
512
356
  if (index > -1) {
@@ -567,6 +411,7 @@ export default {
567
411
  return;
568
412
  }
569
413
  this.$refs.detailappendix.setData(obj.billno,obj.billmoduleid,obj.idkey);
414
+ this.$refs.detailappendix.setReadOnly(e.readOnly);
570
415
  this.$nextTick(() => {
571
416
  if (e.readOnly) {
572
417
  let data = this.$refs.detailappendix.getData();