ocpview-plus 1.0.2 → 1.0.3

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.0.2",
3
+ "version": "1.0.3",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -90,12 +90,12 @@
90
90
  <vxe-grid
91
91
  ref="table"
92
92
  keep-source
93
- border="inner"
93
+ border="full"
94
94
  style="width: 100%"
95
95
  :columns="RewriteColumns"
96
96
  :data="dataList"
97
97
  :height="tableHeight"
98
- :max-height="tableMaxHeight"
98
+ :max-height="tableMaxHeight + 100"
99
99
  :loading="loading"
100
100
  :sort-config="{ remote: true, trigger: 'cell' }"
101
101
  :valid-config="{
@@ -18,13 +18,14 @@
18
18
  <!-- 表格覆写点开始 -->
19
19
  <vxe-grid
20
20
  ref="table"
21
- border="inner"
21
+ border="full"
22
22
  :columns="RewriteColumns"
23
23
  :data="RewriteData"
24
24
  :height="tableHeight"
25
25
  :max-height="tableMaxHeight"
26
26
  :loading="loading"
27
27
  :sort-config="{ remote: true, trigger: 'cell' }"
28
+ :seq-config="seqConfig"
28
29
  @sort-change="RewriteTableOnSortChange"
29
30
  @cell-dblclick="RewriteTableCellDBlclick"
30
31
  >
@@ -32,45 +33,6 @@
32
33
  <Spin size="large" style="display: inline-block"></Spin>
33
34
  </template>
34
35
  </vxe-grid>
35
- <!-- <Table
36
- ref="table"
37
- :class="isFlag"
38
- :row-class-name="myConfig.rowClassName"
39
- :loading="loading"
40
- :show-summary="myConfig.showSummary"
41
- :summary-method="handleSummary"
42
- :size="myConfig.tableSize"
43
- :stripe="myConfig.showStripe"
44
- :border="myConfig.showBorder"
45
- :height="tableHeight"
46
- :max-height="tableMaxHeight"
47
- :show-header="myConfig.showHeader"
48
- :columns="tableColumns"
49
- :data="tempData"
50
- @on-sort-change="sortChagne"
51
- @on-current-change="onCurrentChange"
52
- :highlight-row="myConfig.highLightRow"
53
- @on-row-dblclick="dbclick"
54
- @on-select="onSelect"
55
- @on-select-cancel="onSelectCancel"
56
- @on-selection-change="OnSelectionChange"
57
- @on-row-click="click"
58
- @on-column-width-resize="onColumnWidthResize"
59
- >
60
- <template
61
- v-for="config in soltTableColumns"
62
- v-slot:[config.key]="{ row, index }"
63
- :key="'show_' + config.key"
64
- >
65
- <ShowText
66
- :label="formatValue(index, config, row)"
67
- :contentAlign="config.contentAlign"
68
- :class="config.cellClassName"
69
- :config="config"
70
- :rowIndex="index"
71
- ></ShowText>
72
- </template>
73
- </Table> -->
74
36
  <!-- 表格覆写点结束 -->
75
37
  </Card>
76
38
  <div ref="page" name="page">
@@ -329,6 +291,17 @@ export default {
329
291
  };
330
292
  });
331
293
  },
294
+
295
+ /**
296
+ * 表格分页行号起始值
297
+ */
298
+ seqConfig() {
299
+ return {
300
+ startIndex:
301
+ (this.myConfig.pageConfig.page_no - 1) *
302
+ this.myConfig.pageConfig.page_size,
303
+ };
304
+ },
332
305
  },
333
306
  methods: {
334
307
  /**
@@ -78,8 +78,37 @@ html:root {
78
78
  --vxe-font-size-small: 13px;
79
79
  /* 加载中 */
80
80
  --vxe-loading-color: var(--amp-primary-color);
81
+ --vxe-table-header-font-color: #303133;
82
+ --vxe-table-header-font-weight: bold;
83
+ --vxe-table-cell-padding-left: 8px;
84
+ --vxe-table-cell-padding-right: 8px;
85
+ --vxe-font-color: #303133;
81
86
  }
82
87
 
83
- .efu-stable-footer-row{
88
+ .efu-stable-footer-row {
84
89
  background-color: rgb(245, 247, 250);
85
90
  }
91
+
92
+ .vxe-table--render-default .vxe-table--border-line {
93
+ border: 0;
94
+ }
95
+
96
+ /* .col--valid-error .ivu-input {
97
+ border-color: var(--amp-error-color);
98
+ } */
99
+
100
+ .col--valid-error > .vxe-cell .ivu-input-wrapper .ivu-input,
101
+ .col--valid-error > .vxe-cell .ivu-auto-complete .ivu-input,
102
+ .col--valid-error > .vxe-cell .ivu-input-number,
103
+ .col--valid-error > .vxe-cell .ivu-select .ivu-select-selection,
104
+ .col--valid-error > .vxe-cell .ivu-cascader .ivu-input,
105
+ .col--valid-error > .vxe-cell .ivu-date-picker .ivu-input,
106
+ .col--valid-error > .vxe-tree-cell .ivu-input-wrapper .ivu-input,
107
+ .col--valid-error > .vxe-tree-cell .ivu-auto-complete .ivu-input,
108
+ .col--valid-error > .vxe-tree-cell .ivu-input-number,
109
+ .col--valid-error > .vxe-tree-cell .ivu-select .ivu-select-selection,
110
+ .col--valid-error > .vxe-tree-cell .ivu-cascader .ivu-input,
111
+ .col--valid-error > .vxe-tree-cell .ivu-date-picker .ivu-input {
112
+ border-color: var(--amp-error-color);
113
+ box-shadow: none;
114
+ }
@@ -1,6 +1,6 @@
1
- import VXETable from 'vxe-table'
2
- import 'vxe-table/lib/style.css'
3
- import '../theme/theme-variable.css'
1
+ import VXETable from "vxe-table";
2
+ import "vxe-table/lib/style.css";
3
+ import "../theme/theme-variable.css";
4
4
 
5
5
  // ========== 全局renderer引入位置 ==========
6
6
  // import './renderer/filter'
@@ -10,7 +10,7 @@ import '../theme/theme-variable.css'
10
10
 
11
11
  // 全局配置
12
12
  VXETable.setup({
13
- size: 'mini', // 全局尺寸
13
+ size: "mini", // 全局尺寸
14
14
  zIndex: 8000, // 全局 zIndex 起始值,如果项目的的 z-index 样式值过大时就需要跟随设置更大,避免被遮挡
15
15
  version: 0, // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
16
16
  // loadingText: '加载中...', // 全局loading提示内容,如果为null则不显示文本
@@ -28,91 +28,94 @@ VXETable.setup({
28
28
  round: false,
29
29
  // emptyText: '暂无数据',
30
30
  rowConfig: {
31
- keyField: '_X_ROW_KEY', // 行数据的唯一主键字段名
31
+ keyField: "_X_ROW_KEY", // 行数据的唯一主键字段名
32
32
  isCurrent: true, // 当鼠标点击行时,是否要高亮当前行
33
- isHover: true //当鼠标移到行时,是否要高亮当前行
33
+ isHover: true, //当鼠标移到行时,是否要高亮当前行
34
34
  },
35
35
  radioConfig: {
36
- trigger: 'default'
36
+ trigger: "default",
37
37
  },
38
38
  checkboxConfig: {
39
39
  strict: false,
40
40
  highlight: false,
41
41
  range: false,
42
- trigger: 'default'
42
+ trigger: "default",
43
43
  },
44
44
  sortConfig: {
45
45
  remote: false,
46
- trigger: 'default',
47
- orders: ['asc', 'desc', null],
48
- sortMethod: null
46
+ trigger: "default",
47
+ orders: ["asc", "desc", null],
48
+ sortMethod: null,
49
49
  },
50
50
  filterConfig: {
51
51
  remote: false,
52
- filterMethod: null
52
+ filterMethod: null,
53
53
  },
54
54
  expandConfig: {
55
- trigger: 'default',
56
- showIcon: true
55
+ trigger: "default",
56
+ showIcon: true,
57
57
  },
58
58
  treeConfig: {
59
- rowField: 'id',
60
- parentField: 'parentId',
61
- children: 'children',
62
- hasChild: 'hasChild',
63
- mapChildren: '_X_ROW_CHILD',
59
+ rowField: "id",
60
+ parentField: "parentId",
61
+ children: "children",
62
+ hasChild: "hasChild",
63
+ mapChildren: "_X_ROW_CHILD",
64
64
  indent: 20,
65
- showIcon: true
65
+ showIcon: true,
66
66
  },
67
67
  tooltipConfig: {
68
- enterable: true
68
+ enterable: true,
69
69
  },
70
70
  menuConfig: {
71
- visibleMethod() {}
71
+ visibleMethod() {},
72
72
  },
73
73
  editConfig: {
74
- mode: 'cell',
75
- showAsterisk: true
74
+ mode: "cell",
75
+ showAsterisk: true,
76
76
  },
77
77
  importConfig: {
78
- modes: ['insert', 'covering']
78
+ modes: ["insert", "covering"],
79
79
  },
80
80
  exportConfig: {
81
- modes: ['current', 'selected']
81
+ modes: ["current", "selected"],
82
82
  },
83
83
  customConfig: {
84
- storage: false
84
+ storage: false,
85
85
  },
86
86
  scrollX: {
87
- gt: 60
87
+ gt: 60,
88
88
  },
89
89
  scrollY: {
90
90
  enabled: true,
91
- gt: 100
91
+ gt: 60,
92
92
  },
93
93
  loading: {
94
- icon: 'vxe-icon-spinner roll',
94
+ icon: "vxe-icon-spinner roll",
95
95
  // text: '加载中...'
96
- }
96
+ },
97
+ mouseConfig: {
98
+ selected: true,
99
+ },
97
100
  },
98
101
  grid: {
99
102
  size: null,
100
103
  zoomConfig: {
101
- escRestore: true
104
+ escRestore: true,
102
105
  },
103
106
  pagerConfig: {
104
- perfect: false
107
+ perfect: false,
105
108
  },
106
109
  toolbarConfig: {
107
- perfect: false
110
+ perfect: false,
108
111
  },
109
112
  proxyConfig: {
110
113
  autoLoad: true,
111
114
  message: true,
112
115
  props: {
113
116
  list: null, // 用于列表,读取响应数据
114
- result: 'result', // 用于分页,读取响应数据
115
- total: 'page.total' // 用于分页,读取总条数
117
+ result: "result", // 用于分页,读取响应数据
118
+ total: "page.total", // 用于分页,读取总条数
116
119
  },
117
120
  beforeItem: null,
118
121
  beforeColumn: null,
@@ -121,8 +124,8 @@ VXETable.setup({
121
124
  beforeDelete: null,
122
125
  afterDelete: null,
123
126
  beforeSave: null,
124
- afterSave: null
125
- }
127
+ afterSave: null,
128
+ },
126
129
  },
127
130
  pager: {
128
131
  size: null,
@@ -134,79 +137,79 @@ VXETable.setup({
134
137
  pagerCount: 7,
135
138
  pageSizes: [50, 100, 200, 500],
136
139
  layouts: [
137
- 'Sizes',
138
- 'PrevJump',
139
- 'PrevPage',
140
- 'Number',
141
- 'NextPage',
142
- 'NextJump',
143
- 'FullJump',
144
- 'Total'
145
- ]
140
+ "Sizes",
141
+ "PrevJump",
142
+ "PrevPage",
143
+ "Number",
144
+ "NextPage",
145
+ "NextJump",
146
+ "FullJump",
147
+ "Total",
148
+ ],
146
149
  },
147
150
  form: {
148
151
  preventSubmit: false,
149
152
  size: null,
150
153
  colon: false,
151
154
  validConfig: {
152
- autoPos: true
155
+ autoPos: true,
153
156
  },
154
157
  tooltipConfig: {
155
- enterable: true
158
+ enterable: true,
156
159
  },
157
- titleAsterisk: true
160
+ titleAsterisk: true,
158
161
  },
159
162
  input: {
160
163
  size: null,
161
164
  transfer: false,
162
- parseFormat: 'yyyy-MM-dd HH:mm:ss.SSS',
163
- labelFormat: '',
164
- valueFormat: '',
165
+ parseFormat: "yyyy-MM-dd HH:mm:ss.SSS",
166
+ labelFormat: "",
167
+ valueFormat: "",
165
168
  startDay: 1,
166
169
  digits: 2,
167
- controls: true
170
+ controls: true,
168
171
  },
169
172
  textarea: {
170
173
  size: null,
171
174
  autosize: {
172
175
  minRows: 1,
173
- maxRows: 10
174
- }
176
+ maxRows: 10,
177
+ },
175
178
  },
176
179
  select: {
177
180
  size: null,
178
181
  transfer: false,
179
182
  optionConfig: {
180
- keyField: '_X_OPTION_KEY' // 选项数据的唯一主键字段名
183
+ keyField: "_X_OPTION_KEY", // 选项数据的唯一主键字段名
181
184
  },
182
- multiCharOverflow: 8
185
+ multiCharOverflow: 8,
183
186
  },
184
187
  toolbar: {
185
188
  size: null,
186
189
  import: {
187
- mode: 'covering'
190
+ mode: "covering",
188
191
  },
189
192
  export: {
190
- types: ['csv', 'html', 'xml', 'txt']
193
+ types: ["csv", "html", "xml", "txt"],
191
194
  },
192
195
  custom: {
193
- showFooter: true
196
+ showFooter: true,
194
197
  },
195
198
  buttons: [],
196
- tools: []
199
+ tools: [],
197
200
  },
198
201
  button: {
199
202
  size: null,
200
- transfer: false
203
+ transfer: false,
201
204
  },
202
205
  radio: {
203
- size: null
206
+ size: null,
204
207
  },
205
208
  checkbox: {
206
- size: null
209
+ size: null,
207
210
  },
208
211
  switch: {
209
- size: null
212
+ size: null,
210
213
  },
211
214
  modal: {
212
215
  // size: null,
@@ -218,21 +221,21 @@ VXETable.setup({
218
221
  marginSize: 0,
219
222
  dblclickZoom: true,
220
223
  showTitleOverflow: true,
221
- storage: false
224
+ storage: false,
222
225
  },
223
226
  list: {
224
227
  scrollY: {
225
- gt: 100
226
- }
227
- }
228
- })
228
+ gt: 100,
229
+ },
230
+ },
231
+ });
229
232
 
230
233
  const install = (app, i18n) => {
231
234
  VXETable.setup({
232
235
  // 对组件内置的提示语进行国际化翻译
233
236
  // i18n: (key, args) => i18n.global.t(key, args)
234
- })
235
- app.use(VXETable)
236
- }
237
+ });
238
+ app.use(VXETable);
239
+ };
237
240
 
238
- export default { install }
241
+ export default { install };