cnhis-design-vue 3.1.17-beta.4 → 3.1.17-beta.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/es/packages/button-print/index.d.ts +1 -1
- package/es/packages/button-print/src/ButtonPrint.vue.d.ts +1 -1
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +13 -17
- package/es/packages/fabric-chart/src/hooks/useLeft.js +3 -1
- package/es/packages/fabric-chart/src/hooks/useRight.js +8 -2
- package/es/packages/form-render/style/index.css +1 -1
- package/es/packages/index.css +1 -1
- package/global.d.ts +8 -8
- package/package.json +1 -1
|
@@ -133,8 +133,8 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
133
133
|
}[];
|
|
134
134
|
currentFormatItem: import("vue").ComputedRef<{} | undefined>;
|
|
135
135
|
formatTitle: import("vue").ComputedRef<any>;
|
|
136
|
+
getTemplateIdByFormatId: import("vue").ComputedRef<any>;
|
|
136
137
|
renderLabel: (option: any) => any;
|
|
137
|
-
getTemplateIdByFormatId: (id: any) => any;
|
|
138
138
|
callLocalServicesSuccessCb: (res: any, type: any) => void;
|
|
139
139
|
callLocalServicesErrorCb: (res: any) => void;
|
|
140
140
|
prevFnError: () => void;
|
|
@@ -137,8 +137,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
137
137
|
}[];
|
|
138
138
|
currentFormatItem: import("vue").ComputedRef<{} | undefined>;
|
|
139
139
|
formatTitle: import("vue").ComputedRef<any>;
|
|
140
|
+
getTemplateIdByFormatId: import("vue").ComputedRef<any>;
|
|
140
141
|
renderLabel: (option: any) => any;
|
|
141
|
-
getTemplateIdByFormatId: (id: any) => any;
|
|
142
142
|
callLocalServicesSuccessCb: (res: any, type: any) => void;
|
|
143
143
|
callLocalServicesErrorCb: (res: any) => void;
|
|
144
144
|
prevFnError: () => void;
|
|
@@ -102,6 +102,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
102
102
|
return state.formatList.find((item) => item.id === id);
|
|
103
103
|
});
|
|
104
104
|
const formatTitle = computed(() => currentFormatItem.value.name || "\u683C\u5F0F\u9009\u62E9");
|
|
105
|
+
const getTemplateIdByFormatId = computed(() => {
|
|
106
|
+
let find = state.formatList.find((item) => item.id === state.currentFormatId);
|
|
107
|
+
return find == null ? void 0 : find.templateId;
|
|
108
|
+
});
|
|
105
109
|
const renderLabel = (option) => {
|
|
106
110
|
return createVNode("span", {
|
|
107
111
|
"class": {
|
|
@@ -109,15 +113,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
109
113
|
}
|
|
110
114
|
}, [option.label]);
|
|
111
115
|
};
|
|
112
|
-
const getTemplateIdByFormatId = (id) => {
|
|
113
|
-
let find = state.formatList.find((item) => item.id === id);
|
|
114
|
-
return find.templateId;
|
|
115
|
-
};
|
|
116
116
|
const callLocalServicesSuccessCb = (res, type) => {
|
|
117
117
|
let info = {
|
|
118
118
|
type,
|
|
119
119
|
formatId: state.currentFormatId,
|
|
120
|
-
templateId: getTemplateIdByFormatId
|
|
120
|
+
templateId: getTemplateIdByFormatId.value
|
|
121
121
|
};
|
|
122
122
|
emit("success", res, info);
|
|
123
123
|
};
|
|
@@ -180,7 +180,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
180
180
|
for (let i = 0; i < state.printParams.length; i++) {
|
|
181
181
|
const queryParams = {
|
|
182
182
|
formatId: state.currentFormatId,
|
|
183
|
-
templateId: getTemplateIdByFormatId
|
|
183
|
+
templateId: getTemplateIdByFormatId.value,
|
|
184
184
|
params: getPrintParams(i)
|
|
185
185
|
};
|
|
186
186
|
printInstance.printDirect(queryParams, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
|
|
@@ -188,7 +188,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
188
188
|
} else {
|
|
189
189
|
const queryParams = {
|
|
190
190
|
formatId: state.currentFormatId,
|
|
191
|
-
templateId: getTemplateIdByFormatId
|
|
191
|
+
templateId: getTemplateIdByFormatId.value,
|
|
192
192
|
params: getOnceParams()
|
|
193
193
|
};
|
|
194
194
|
printInstance.printDirect(queryParams, (res) => {
|
|
@@ -207,7 +207,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
207
207
|
const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
|
|
208
208
|
const queryParams = {
|
|
209
209
|
formatId: state.currentFormatId,
|
|
210
|
-
templateId: getTemplateIdByFormatId
|
|
210
|
+
templateId: getTemplateIdByFormatId.value,
|
|
211
211
|
params
|
|
212
212
|
};
|
|
213
213
|
printInstance.preview(queryParams, (res) => {
|
|
@@ -225,7 +225,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
225
225
|
const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
|
|
226
226
|
const queryParams = {
|
|
227
227
|
formatId: state.currentFormatId,
|
|
228
|
-
templateId: getTemplateIdByFormatId
|
|
228
|
+
templateId: getTemplateIdByFormatId.value,
|
|
229
229
|
print: {
|
|
230
230
|
print: "1",
|
|
231
231
|
type: "1",
|
|
@@ -357,7 +357,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
357
357
|
};
|
|
358
358
|
const initCRM = async (formatListResult) => {
|
|
359
359
|
var _a;
|
|
360
|
-
console.log("formatListResult", formatListResult);
|
|
361
360
|
state.formatList = formatListResult ? formatFormatList(formatListResult.obj) : [];
|
|
362
361
|
state.currentFormatId = getDefaultFormatId(state.formatList, "defaultFlag");
|
|
363
362
|
if (!state.currentFormatId) {
|
|
@@ -365,14 +364,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
365
364
|
return requestError();
|
|
366
365
|
}
|
|
367
366
|
setOptions();
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
let templateParamsResult = ((_a = await props.queryTemplateParams()) == null ? void 0 : _a.obj) || {};
|
|
373
|
-
if (templateParamsResult) {
|
|
367
|
+
let templateParamsResult = (_a = await props.queryTemplateParams()) == null ? void 0 : _a.obj;
|
|
368
|
+
if (templateParamsResult && getTemplateIdByFormatId.value) {
|
|
374
369
|
state.templateParams = templateParamsResult;
|
|
375
370
|
} else {
|
|
371
|
+
$message.error("\u83B7\u53D6\u6253\u5370\u6A21\u677F\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01");
|
|
376
372
|
return requestError();
|
|
377
373
|
}
|
|
378
374
|
state.printParams = formatParams(state.templateParams, props.params);
|
|
@@ -420,7 +416,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
420
416
|
state.identityVerification.visible = false;
|
|
421
417
|
const queryParams = {
|
|
422
418
|
formatId: state.currentFormatId,
|
|
423
|
-
templateId: getTemplateIdByFormatId
|
|
419
|
+
templateId: getTemplateIdByFormatId.value,
|
|
424
420
|
params: getPrintParams(),
|
|
425
421
|
token
|
|
426
422
|
};
|
|
@@ -261,10 +261,12 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
261
261
|
nextTick(() => {
|
|
262
262
|
var _a;
|
|
263
263
|
iconsWidth && drawIcons();
|
|
264
|
-
const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "left"
|
|
264
|
+
const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "left" && v.type !== "pain");
|
|
265
265
|
if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "left") {
|
|
266
266
|
yScaleValueList.push(getRightInfo);
|
|
267
267
|
}
|
|
268
|
+
painIndex == 0 && yScaleValueList.unshift(left.yScaleValue[painIndex]);
|
|
269
|
+
painIndex == left.yScaleValue.length - 1 && yScaleValueList.push(left.yScaleValue[painIndex]);
|
|
268
270
|
drawScaleValue(yScaleValueList);
|
|
269
271
|
canvas.value.renderAll();
|
|
270
272
|
});
|
|
@@ -3,15 +3,21 @@ import { fabric } from '../utils/index.js';
|
|
|
3
3
|
import { defaultBorderStyle } from './useDraw.js';
|
|
4
4
|
|
|
5
5
|
function useRight(canvas, propItems, drawScaleValue) {
|
|
6
|
-
const { left, right, getRightInfo, canvasWidth, endY } = propItems;
|
|
6
|
+
const { left, right, getRightInfo, canvasWidth, endY, endX, originY } = propItems;
|
|
7
7
|
onMounted(() => {
|
|
8
8
|
nextTick(() => {
|
|
9
9
|
var _a;
|
|
10
10
|
const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "right");
|
|
11
11
|
if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "right") {
|
|
12
12
|
yScaleValueList.push(getRightInfo);
|
|
13
|
+
}
|
|
14
|
+
if ((right == null ? void 0 : right.width) || yScaleValueList.length > 0) {
|
|
13
15
|
const rightBorderLine = new fabric.Line([canvasWidth - 1, 0, canvasWidth - 1, endY], defaultBorderStyle);
|
|
14
|
-
|
|
16
|
+
const rightBorderLine2 = new fabric.Line([endX + 1, originY, canvasWidth - 1, originY], {
|
|
17
|
+
...defaultBorderStyle,
|
|
18
|
+
stroke: "#fff"
|
|
19
|
+
});
|
|
20
|
+
canvas.value.add(rightBorderLine, rightBorderLine2);
|
|
15
21
|
}
|
|
16
22
|
drawScaleValue(yScaleValueList);
|
|
17
23
|
});
|
package/es/packages/index.css
CHANGED
package/global.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as NaiveUI from 'naive-ui';
|
|
2
|
-
|
|
3
|
-
declare module 'naive-ui' {
|
|
4
|
-
// @ts-ignore
|
|
5
|
-
export const NTree: any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export {};
|
|
1
|
+
import * as NaiveUI from 'naive-ui';
|
|
2
|
+
|
|
3
|
+
declare module 'naive-ui' {
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
export const NTree: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export {};
|