ocpview-pro 0.1.23 → 0.1.25

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-pro",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -109,9 +109,9 @@
109
109
  temp.data = [];
110
110
  el.data.forEach(el2 => {
111
111
  if (this.myConfig.codeWithName) {
112
- el2.label = '['+ el2[this.myConfig.valueField]+']' + el2[this.myConfig.textField];
112
+ el2.label = '['+ el2[this.myConfig.valueField]+']' + this.$t(el2[this.myConfig.textField]);
113
113
  } else {
114
- el2.label =el2[this.myConfig.textField];
114
+ el2.label =this.$t(el2[this.myConfig.textField]);
115
115
  }
116
116
  if (this.myConfig.filterData) {
117
117
  el2.visible = this.myConfig.filterData(el2);
@@ -123,9 +123,9 @@
123
123
  } else {
124
124
  obj.data.forEach(el => {
125
125
  if (this.myConfig.codeWithName) {
126
- el.label = '['+ el[this.myConfig.valueField]+']' + el[this.myConfig.textField];
126
+ el.label = '['+ el[this.myConfig.valueField]+']' + this.$t(el[this.myConfig.textField]);
127
127
  } else {
128
- el.label =el[this.myConfig.textField];
128
+ el.label =this.$t(el[this.myConfig.textField]);
129
129
  }
130
130
  if (this.myConfig.filterData) {
131
131
  el.visible = this.myConfig.filterData(el);
@@ -147,10 +147,10 @@
147
147
  temp.data = [];
148
148
  el.data.forEach(el2 => {
149
149
  if (this.myConfig.codeWithName) {
150
- el2.label = '['+ el2[this.myConfig.valueField]+']' + el2[this.myConfig.textField];
150
+ el2.label = '['+ el2[this.myConfig.valueField]+']' + this.$t(el2[this.myConfig.textField]);
151
151
  } else {
152
152
  if (el2[this.myConfig.textField]) {
153
- el2.label =el2[this.myConfig.textField];
153
+ el2.label =this.$t(el2[this.myConfig.textField]);
154
154
  } else {
155
155
  el2.label =el2[this.myConfig.valueField];
156
156
  }
@@ -166,10 +166,10 @@
166
166
  } else {
167
167
  this.myConfig.data.forEach(el => {
168
168
  if (this.myConfig.codeWithName) {
169
- el.label = '['+ el[this.myConfig.valueField]+']' + el[this.myConfig.textField];
169
+ el.label = '['+ el[this.myConfig.valueField]+']' + this.$t(el[this.myConfig.textField]);
170
170
  } else {
171
171
  if (el[this.myConfig.textField]) {
172
- el.label =el[this.myConfig.textField];
172
+ el.label =this.$t(el[this.myConfig.textField]);
173
173
  } else {
174
174
  el.label =el[this.myConfig.valueField];
175
175
  }
@@ -40,7 +40,7 @@
40
40
  <Tooltip placement="top">
41
41
  <template #content>
42
42
  <div>
43
- <span style="font-size: 12px"> 表头设计 </span>
43
+ <span style="font-size: 12px"> {{ $t("表头设计") }} </span>
44
44
  </div>
45
45
  </template>
46
46
  <p style="cursor: pointer" @click.stop="openColSet">
@@ -312,11 +312,12 @@ export default {
312
312
  type: "html",
313
313
  formatter: (params) => {
314
314
  const { row, cellValue } = params;
315
- const valueFormat = this.$Method.formatValue(
315
+ const valueData = this.$Method.formatValue(
316
316
  cellValue,
317
317
  row,
318
318
  item
319
319
  );
320
+ const valueFormat = this.$t(valueData);
320
321
  const colorGroup = item._colorMap[cellValue];
321
322
  if (colorGroup) {
322
323
  const styleStr = Object.entries({
@@ -41,7 +41,7 @@
41
41
  <Tooltip placement="top">
42
42
  <template #content>
43
43
  <div>
44
- <span style="font-size: 12px"> 表头设计 </span>
44
+ <span style="font-size: 12px"> {{ $t("表头设计") }} </span>
45
45
  </div>
46
46
  </template>
47
47
  <p style="cursor: pointer" @click.stop="openColSet">
@@ -41,7 +41,7 @@
41
41
  <Tooltip placement="top">
42
42
  <template #content>
43
43
  <div>
44
- <span style="font-size: 12px"> 表头设计 </span>
44
+ <span style="font-size: 12px"> {{ $t("表头设计") }} </span>
45
45
  </div>
46
46
  </template>
47
47
  <p style="cursor: pointer" @click.stop="openColSet">
@@ -235,6 +235,7 @@ export default {
235
235
  const code = params.row[fieldName];
236
236
  const colorGroup = colorMap[code];
237
237
  const text = this.$Method.formatComboBox(code, params.column);
238
+ const textF = this.$t(text);
238
239
  if (colorGroup) {
239
240
  const style = {
240
241
  color: colorGroup.text || "",
@@ -244,9 +245,9 @@ export default {
244
245
  borderRadius: "3px",
245
246
  padding: "0 5px",
246
247
  };
247
- return h("span", { style }, text);
248
+ return h("span", { style }, textF);
248
249
  }
249
- return h("span", text);
250
+ return h("span", textF);
250
251
  };
251
252
  el._colorMap = colorMap;
252
253
  },
@@ -128,7 +128,7 @@ export default {
128
128
  this.myConfig.gridConfig.showStripe = true;
129
129
  this.myConfig.gridConfig.generalOrientation = true;
130
130
  if (this.myConfig.gridConfig.title !== undefined) {
131
- this.myConfig.gridtitle = this.myConfig.gridConfig.title;
131
+ this.myConfig.gridtitle = this.$t(this.myConfig.gridConfig.title);
132
132
  }
133
133
 
134
134
  if (this.myConfig.gridConfig.multiSelect === undefined) {
@@ -132,7 +132,7 @@ export default {
132
132
  this.myConfig.gridConfig.generalOrientation = true;
133
133
 
134
134
  if (this.myConfig.gridConfig.title) {
135
- this.myConfig.gridtitle = this.myConfig.gridConfig.title;
135
+ this.myConfig.gridtitle = this.$t(this.myConfig.gridConfig.title);
136
136
  }
137
137
  let size = this.myConfig.detailGridsConfig.length;
138
138
  this.myConfig.detailGridsConfig.forEach((el,index) => {
@@ -112,7 +112,7 @@ export default {
112
112
  this.myConfig.gridConfig.height = 1;
113
113
  this.myConfig.gridConfig.adjustHeight = 0;
114
114
  if (this.myConfig.gridConfig.title !== undefined) {
115
- this.myConfig.gridtitle = this.myConfig.gridConfig.title;
115
+ this.myConfig.gridtitle = this.$t(this.myConfig.gridConfig.title);
116
116
  }
117
117
  if (!this.myConfig.gridConfig.method) {
118
118
  this.myConfig.gridConfig.method = this.myConfig.classPrefix + '.search';
@@ -18,7 +18,7 @@
18
18
  </span>
19
19
  </template>
20
20
  <template v-if="showUnit" #append>
21
- <span v-if="showUnit" >{{myConfig.unit}}</span>
21
+ <span v-if="showUnit" >{{myConfig.unit?$t(myConfig.unit):myConfig.unit}}</span>
22
22
  <div v-if="myConfig.unitCustom" :style="'min-width:' + myConfig.unitWidth + 'px'">
23
23
  <NumberRangeExpand :render="myConfig.unitRender" />
24
24
  </div>
@@ -96,12 +96,12 @@ export default {
96
96
  this.isEnter = true;
97
97
  if (this.label === this.getLabel()) {
98
98
  if (this.$parent.enterKeyDown) {
99
- this.$parent.enterKeyDown();
99
+ this.$parent.enterKeyDown();
100
100
  this.isEnter = false;
101
101
  }
102
102
  return;
103
103
  } else {
104
- this._setFatherValue();
104
+ this._setFatherValue();
105
105
  }
106
106
  },
107
107
  _setFatherValue(e) {
@@ -150,7 +150,7 @@ export default {
150
150
  }
151
151
  this.setFatherValue();
152
152
  },
153
-
153
+
154
154
  setFatherValueSuccess(para) {
155
155
  this.label = this.$Method.formatNumber(
156
156
  this.value,
@@ -191,10 +191,10 @@ export default {
191
191
  this.myConfig.defaultValue = '';
192
192
  }
193
193
  }
194
- if (this.myConfig.unitRender) {
194
+ if (this.myConfig.unitRender) {
195
195
  this.myConfig.unitCustom = true;
196
196
  } else {
197
- this.myConfig.unitCustom = false;
197
+ this.myConfig.unitCustom = false;
198
198
  }
199
199
  if (this.myConfig.format && this.myConfig.format.length > 1) {
200
200
  this.myConfig.precision = Number(this.myConfig.format[1]);
@@ -271,7 +271,7 @@ export default {
271
271
  } else {
272
272
  return curlvalue;
273
273
  }
274
- },
274
+ },
275
275
  watchCustomFatherValue() {
276
276
  this.label = this.getLabel();
277
277
  },
@@ -300,4 +300,4 @@ export default {
300
300
  }
301
301
  }
302
302
  };
303
- </script>
303
+ </script>
@@ -32,9 +32,9 @@
32
32
  if (obj.data !== undefined && obj.data.length > 0) {
33
33
  obj.data.forEach(el => {
34
34
  if (this.myConfig.codeWithName) {
35
- el.label = '['+ el[this.myConfig.valueField]+']' + el[this.myConfig.textField];
35
+ el.label = '['+ el[this.myConfig.valueField]+']' + this.$t(el[this.myConfig.textField]);
36
36
  } else {
37
- el.label =el[this.myConfig.textField];
37
+ el.label =this.$t(el[this.myConfig.textField]);
38
38
  }
39
39
  });
40
40
  }
@@ -44,10 +44,10 @@
44
44
  if (this.myConfig.data && this.myConfig.data.length > 0) {
45
45
  this.myConfig.data.forEach(el => {
46
46
  if (this.myConfig.codeWithName) {
47
- el.label = '['+ el[this.myConfig.valueField]+']' + el[this.myConfig.textField];
47
+ el.label = '['+ el[this.myConfig.valueField]+']' + this.$t(el[this.myConfig.textField]);
48
48
  } else {
49
49
  if (el[this.myConfig.textField]) {
50
- el.label =el[this.myConfig.textField];
50
+ el.label =this.$t(el[this.myConfig.textField]);
51
51
  } else {
52
52
  el.label =el[this.myConfig.valueField];
53
53
  }