ocpview-pro 0.1.26 → 0.1.27
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 +24 -4
- package/dist/ocpviewplus.min.js +2 -2
- package/package.json +1 -1
- package/src/components/masterplate/RewriteBillListDetails/BillListPanelTable.vue +16 -1
- package/src/components/masterplate/RewriteListdetails/BillListPanelV3QueryBar.vue +1 -1
- package/src/components/masterplate/billquerygrid.vue +13 -1
package/package.json
CHANGED
|
@@ -317,7 +317,9 @@ export default {
|
|
|
317
317
|
row,
|
|
318
318
|
item
|
|
319
319
|
);
|
|
320
|
-
|
|
320
|
+
// codeWithName 拼接的 [编码] 前缀会导致 $t 匹配失效,先剥离再转义
|
|
321
|
+
const valueFormat =
|
|
322
|
+
this.translateComboBoxText(valueData);
|
|
321
323
|
const colorGroup = item._colorMap[cellValue];
|
|
322
324
|
if (colorGroup) {
|
|
323
325
|
const styleStr = Object.entries({
|
|
@@ -494,6 +496,19 @@ export default {
|
|
|
494
496
|
}),
|
|
495
497
|
];
|
|
496
498
|
},
|
|
499
|
+
/**
|
|
500
|
+
* 剥离 codeWithName 拼接的 "[编码]" 前缀,只对名称部分做多语言转义
|
|
501
|
+
*/
|
|
502
|
+
translateComboBoxText(text) {
|
|
503
|
+
if (typeof text !== "string") {
|
|
504
|
+
return text;
|
|
505
|
+
}
|
|
506
|
+
const match = text.match(/^(\[[^\]]*\])([\s\S]*)$/);
|
|
507
|
+
if (match) {
|
|
508
|
+
return match[1] + this.$t(match[2]);
|
|
509
|
+
}
|
|
510
|
+
return this.$t(text);
|
|
511
|
+
},
|
|
497
512
|
handleSumField(params) {
|
|
498
513
|
const { list, field } = params;
|
|
499
514
|
let count = 0;
|
|
@@ -235,7 +235,8 @@ 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
|
-
|
|
238
|
+
// codeWithName 拼接的 [编码] 前缀会导致 $t 匹配失效,先剥离再转义
|
|
239
|
+
const textF = this.translateComboBoxText(text);
|
|
239
240
|
if (colorGroup) {
|
|
240
241
|
const style = {
|
|
241
242
|
color: colorGroup.text || "",
|
|
@@ -251,6 +252,17 @@ export default {
|
|
|
251
252
|
};
|
|
252
253
|
el._colorMap = colorMap;
|
|
253
254
|
},
|
|
255
|
+
translateComboBoxText(text) {
|
|
256
|
+
if (typeof text !== "string") {
|
|
257
|
+
return text;
|
|
258
|
+
}
|
|
259
|
+
// 剥离 codeWithName 拼接的 "[编码]" 前缀,只对名称部分做多语言转义
|
|
260
|
+
const match = text.match(/^(\[[^\]]*\])([\s\S]*)$/);
|
|
261
|
+
if (match) {
|
|
262
|
+
return match[1] + this.$t(match[2]);
|
|
263
|
+
}
|
|
264
|
+
return this.$t(text);
|
|
265
|
+
},
|
|
254
266
|
initRowBtn() {
|
|
255
267
|
if (this.enablePermissions) {
|
|
256
268
|
let btns = [];
|