ocpview-pro 0.1.25 → 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 +28 -8
- package/dist/ocpviewplus.min.js +2 -2
- package/package.json +1 -1
- package/src/components/checkbox/checkbox.vue +4 -4
- package/src/components/masterplate/RewriteBillListDetails/BillListPanelTable.vue +16 -1
- package/src/components/masterplate/RewriteListdetails/BillListPanelV3QueryBar.vue +2 -2
- package/src/components/masterplate/billquerygrid.vue +13 -1
- package/src/components/picturebox/picturebox.vue +2 -2
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<div v-show="myConfig.visible" class="efuture-checkbox" :style="myConfig.divStyle">
|
|
3
3
|
<Checkbox ref="myControl" v-model="value" :size="myConfig.size" :true-value="myConfig.trueValue" :false-value="myConfig.falseValue" :disabled="readOnly||myConfig.readOnly" @on-change="setFatherValue">
|
|
4
4
|
<template v-if="showTextFlag" #default>
|
|
5
|
-
<span style="margin-left: 10px;" v-text="myConfig.showText"/>
|
|
5
|
+
<span style="margin-left: 10px;" v-text="myConfig.showText?$t(myConfig.showText):myConfig.showText"/>
|
|
6
6
|
</template>
|
|
7
7
|
</Checkbox>
|
|
8
8
|
</div>
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
this.$refs.myControl.$el.blur();
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
</script>
|
|
76
|
+
</script>
|
|
@@ -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;
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
:icon="btnData[0].icon"
|
|
103
103
|
:customIcon="btnData[0].customIcon"
|
|
104
104
|
@click="action(btnData[0].name)"
|
|
105
|
-
>{{ btnData[0].text }}</Button
|
|
105
|
+
>{{ $t(btnData[0].text) }}</Button
|
|
106
106
|
>
|
|
107
107
|
<Button
|
|
108
108
|
v-if="!btnFlag && moreBtnFlag"
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
type="text"
|
|
130
130
|
:customIcon="item.customIcon"
|
|
131
131
|
@click="action(item.name)"
|
|
132
|
-
>{{ item.text }}</Button
|
|
132
|
+
>{{ $t(item.text) }}</Button
|
|
133
133
|
>
|
|
134
134
|
</DropdownItem>
|
|
135
135
|
</DropdownMenu>
|
|
@@ -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 = [];
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<template #btn>
|
|
24
24
|
<Row type="flex" justify="center" align="middle" :style="btnStyle">
|
|
25
25
|
<Icon :custom="myConfig.defaultIcon" :size="myConfig.iconSize" :color="iconColor"/>
|
|
26
|
-
<span v-if="myConfig.text">{{myConfig.text}}</span>
|
|
26
|
+
<span v-if="myConfig.text">{{$t(myConfig.text)}}</span>
|
|
27
27
|
</Row>
|
|
28
28
|
</template>
|
|
29
29
|
</UploadBox>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</Row>
|
|
32
32
|
<Row v-show="showMemo" type="flex" justify="start" align="middle" :gutter="16">
|
|
33
33
|
<Col span='24'>
|
|
34
|
-
<ShowText :label="myConfig.memo" contentAlign="left" :class="myConfig.memoClass"></ShowText>
|
|
34
|
+
<ShowText :label="$t(myConfig.memo)" contentAlign="left" :class="myConfig.memoClass"></ShowText>
|
|
35
35
|
</Col>
|
|
36
36
|
</Row>
|
|
37
37
|
</div>
|