ztxkui 4.2.23-608 → 4.2.23-609
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/UI/Detail/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import React, { useMemo, useRef } from 'react';
|
|
|
3
3
|
import { DetailHeader, OperationBtnGroup, Container, Button, InputNumber, Input, Tabs, Dropdown, DatePicker, Collapse, Modal, Tooltip, } from '../../index.build';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import EditTable from '../Table/EditTable';
|
|
6
|
+
import { obj } from './test';
|
|
6
7
|
var Detail = function () {
|
|
7
8
|
var rangeDatesRef = useRef(null);
|
|
8
9
|
var items = useMemo(function () {
|
|
@@ -214,7 +215,20 @@ var Detail = function () {
|
|
|
214
215
|
React.createElement(InputNumber, { precision: 6, min: 0 }),
|
|
215
216
|
React.createElement(InputNumber, { precision: 0, min: 0, formatterType: "currency" }),
|
|
216
217
|
React.createElement(Input, { placeholder: i18next.t('若遇"共同责任"、"授权委托"审批情形,则"合同金额"字段填写(拟)授信金额。') }),
|
|
217
|
-
React.createElement(Input.Quill, { placeholder: i18next.t('若遇"共同责任"、"授权委托"审批情形,则"合同金额"字段填写(拟)授信金额。')
|
|
218
|
+
React.createElement(Input.Quill, { placeholder: i18next.t('若遇"共同责任"、"授权委托"审批情形,则"合同金额"字段填写(拟)授信金额。'), onChange: function (value) {
|
|
219
|
+
console.log(value);
|
|
220
|
+
} }),
|
|
221
|
+
React.createElement(Input.Quill, { placeholder: i18next.t('若遇"共同责任"、"授权委托"审批情形,则"合同金额"字段填写(拟)授信金额。'), onChange: function (value) {
|
|
222
|
+
console.log(value);
|
|
223
|
+
} }),
|
|
224
|
+
"111",
|
|
225
|
+
React.createElement(Input.QuillRead, { escapeHtml: true,
|
|
226
|
+
// value={
|
|
227
|
+
// '111<img+src="x"+onerror="eval(unescape(\'%61%6c%65%72%74%28%22%78%73%73%34%22%29%3b\'))">' ??
|
|
228
|
+
// ''
|
|
229
|
+
// }
|
|
230
|
+
value: obj.mark }),
|
|
231
|
+
"222",
|
|
218
232
|
React.createElement(Tabs, { isHeader: true }, Array.from({ length: 6 }, function (_, i) { return (React.createElement(Tabs.TabPane, { key: i, tab: React.createElement(Dropdown, { trigger: ['contextMenu'], overlay: React.createElement("div", null,
|
|
219
233
|
React.createElement("a", null, i18next.t('编辑')),
|
|
220
234
|
React.createElement("a", null, i18next.t('删除'))) },
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export namespace obj {
|
|
2
|
+
const id: string;
|
|
3
|
+
const tenantId: string;
|
|
4
|
+
const serviceId: string;
|
|
5
|
+
const serverIp: string;
|
|
6
|
+
const serverHost: string;
|
|
7
|
+
const env: string;
|
|
8
|
+
const remoteIp: string;
|
|
9
|
+
const userAgent: string;
|
|
10
|
+
const requestUri: string;
|
|
11
|
+
const method: string;
|
|
12
|
+
const methodClass: string;
|
|
13
|
+
const methodName: string;
|
|
14
|
+
const params: string;
|
|
15
|
+
const createBy: string;
|
|
16
|
+
const createTime: string;
|
|
17
|
+
const requestType: number;
|
|
18
|
+
const mobileModel: any;
|
|
19
|
+
const appVersion: any;
|
|
20
|
+
const offlineVersion: any;
|
|
21
|
+
const system: number;
|
|
22
|
+
const paramsCleanRegex: any;
|
|
23
|
+
const logLevel: string;
|
|
24
|
+
const logId: string;
|
|
25
|
+
const logData: string;
|
|
26
|
+
const mark: string;
|
|
27
|
+
const logModule: string;
|
|
28
|
+
const operationName: any;
|
|
29
|
+
const operationTime: any;
|
|
30
|
+
const logExtra: any;
|
|
31
|
+
const createByName: string;
|
|
32
|
+
const createDeptByName: string;
|
|
33
|
+
const mobile: boolean;
|
|
34
|
+
const systemName: string;
|
|
35
|
+
const requestTypeName: string;
|
|
36
|
+
}
|
|
37
|
+
export namespace obj1 {
|
|
38
|
+
const id_1: string;
|
|
39
|
+
export { id_1 as id };
|
|
40
|
+
const tenantId_1: string;
|
|
41
|
+
export { tenantId_1 as tenantId };
|
|
42
|
+
const serviceId_1: string;
|
|
43
|
+
export { serviceId_1 as serviceId };
|
|
44
|
+
const serverIp_1: string;
|
|
45
|
+
export { serverIp_1 as serverIp };
|
|
46
|
+
const serverHost_1: string;
|
|
47
|
+
export { serverHost_1 as serverHost };
|
|
48
|
+
const env_1: string;
|
|
49
|
+
export { env_1 as env };
|
|
50
|
+
const remoteIp_1: string;
|
|
51
|
+
export { remoteIp_1 as remoteIp };
|
|
52
|
+
const userAgent_1: string;
|
|
53
|
+
export { userAgent_1 as userAgent };
|
|
54
|
+
const requestUri_1: string;
|
|
55
|
+
export { requestUri_1 as requestUri };
|
|
56
|
+
const method_1: string;
|
|
57
|
+
export { method_1 as method };
|
|
58
|
+
const methodClass_1: string;
|
|
59
|
+
export { methodClass_1 as methodClass };
|
|
60
|
+
const methodName_1: string;
|
|
61
|
+
export { methodName_1 as methodName };
|
|
62
|
+
const params_1: string;
|
|
63
|
+
export { params_1 as params };
|
|
64
|
+
const createBy_1: string;
|
|
65
|
+
export { createBy_1 as createBy };
|
|
66
|
+
const createTime_1: string;
|
|
67
|
+
export { createTime_1 as createTime };
|
|
68
|
+
const requestType_1: number;
|
|
69
|
+
export { requestType_1 as requestType };
|
|
70
|
+
const mobileModel_1: any;
|
|
71
|
+
export { mobileModel_1 as mobileModel };
|
|
72
|
+
const appVersion_1: any;
|
|
73
|
+
export { appVersion_1 as appVersion };
|
|
74
|
+
const offlineVersion_1: any;
|
|
75
|
+
export { offlineVersion_1 as offlineVersion };
|
|
76
|
+
const system_1: number;
|
|
77
|
+
export { system_1 as system };
|
|
78
|
+
const paramsCleanRegex_1: any;
|
|
79
|
+
export { paramsCleanRegex_1 as paramsCleanRegex };
|
|
80
|
+
const logLevel_1: string;
|
|
81
|
+
export { logLevel_1 as logLevel };
|
|
82
|
+
const logId_1: string;
|
|
83
|
+
export { logId_1 as logId };
|
|
84
|
+
const logData_1: string;
|
|
85
|
+
export { logData_1 as logData };
|
|
86
|
+
const mark_1: string;
|
|
87
|
+
export { mark_1 as mark };
|
|
88
|
+
const logModule_1: string;
|
|
89
|
+
export { logModule_1 as logModule };
|
|
90
|
+
const operationName_1: any;
|
|
91
|
+
export { operationName_1 as operationName };
|
|
92
|
+
const operationTime_1: any;
|
|
93
|
+
export { operationTime_1 as operationTime };
|
|
94
|
+
const logExtra_1: any;
|
|
95
|
+
export { logExtra_1 as logExtra };
|
|
96
|
+
const createByName_1: string;
|
|
97
|
+
export { createByName_1 as createByName };
|
|
98
|
+
const createDeptByName_1: string;
|
|
99
|
+
export { createDeptByName_1 as createDeptByName };
|
|
100
|
+
const mobile_1: boolean;
|
|
101
|
+
export { mobile_1 as mobile };
|
|
102
|
+
const systemName_1: string;
|
|
103
|
+
export { systemName_1 as systemName };
|
|
104
|
+
const requestTypeName_1: string;
|
|
105
|
+
export { requestTypeName_1 as requestTypeName };
|
|
106
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export var obj = {
|
|
3
|
+
id: '2085200609873104606',
|
|
4
|
+
tenantId: '000000',
|
|
5
|
+
serviceId: 'zmdms-scm-order',
|
|
6
|
+
serverIp: 'fe80:0:0:0:12:34ff:fe06:6e85%eth0:18101',
|
|
7
|
+
serverHost: 'zmdms-scm-order-test-zmdmsscm-5464cbd67-mdb2j',
|
|
8
|
+
env: 'test',
|
|
9
|
+
remoteIp: '172.28.7.23',
|
|
10
|
+
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36',
|
|
11
|
+
requestUri: '/quotation/update',
|
|
12
|
+
method: 'POST',
|
|
13
|
+
methodClass: 'com.zmdms.core.log.logger.ZmdmsLogger',
|
|
14
|
+
methodName: 'info',
|
|
15
|
+
params: '{"id":"2094543572492935213","createUser":"8177127521209909288","createDept":"381761329295575035","createTime":"2026-08-21 15:57:09","updateUser":"8177127521209909288","updateTime":"2026-08-21 15:58:49","status":10,"isDeleted":0,"xid":null,"quotationNo":"BJ26000021","companyId":"1415837991701037057","companyName":"浙商中拓集团股份有限公司","depId":"381761329295575035","depName":"中拓本部","officeId":"1514579225679962114","officeName":"总部职能","firstDepId":null,"firstDepName":"","secondDepId":null,"secondDepName":"","profitCenterId":null,"profitCenterName":null,"customerMemberId":"8780290016480822868","customerMemberName":"CESHI","customerEmail":null,"salesmanId":"8177127521209909288","salesman":"申胜","currency":"CNY","totalQuantity":1,"totalAmount":1,"hasSent":null,"hasSealTakenOut":null,"verificationCode":null,"sealAddress":null,"predictProfit":null,"pricingType":"","disputeResolution":null,"areaScope":null,"mark":"\\"><img src=\\"x\\" onerror=\\"eval(unescape(\'%61%6c%65%72%74%28%22%78%73%73%34%22%29%3b\'))\\">","approveUser":null,"approveTime":null,"approveOpinion":null,"wfType":null,"wfProcessInstId":null,"wfParams":null,"approveFailInfo":null,"constituteOffer":0,"offerCustomer":null,"approveType":null,"exchangeRateRmb":"1.00","totalAmountRmb":1,"predictProfitRmb":null,"createUserName":"申胜","hasSentName":null,"statusName":"草稿","hasSealTakenOutName":null,"sealAddressName":null,"currencyName":null,"disputeResolutionName":null,"quotationWorkFlowVO":null,"electronicSealInfo":null,"approveTypeName":null,"officeCode":"Z098","secondDepCode":"","firstDepCode":"","constituteOfferName":"否","offerCustomerName":null,"attachmentDTOS":[],"postDate":"2026-08-21","postingDate":"2026-08-21","quotationDetailDTOList":[{"id":"2094543572492935214","createUser":"8177127521209909288","createDept":"381761329295575035","createTime":"2026-08-21 15:57:09","updateUser":"8177127521209909288","updateTime":"2026-08-21 15:58:49","status":1,"isDeleted":0,"xid":null,"quotationId":"2094543572492935213","quotationNo":"BJ26000021","quotationSubNo":"BJ26000021001","materialDescription":"1","quantityUnit":"Z34","quantityUnitName":"箱","quantity":"1.000000","unitPrice":"1.00","deliveryDate":null,"validityPeriodDate":null,"paymentMethod":null,"repaymentConditions":null,"mark":null,"unitPriceRmb":"1.00","paymentMethodName":null,"amount":"1.00","amountRmb":"1.00","_isUpdateData":true}]}',
|
|
16
|
+
createBy: '申胜',
|
|
17
|
+
createTime: '2026-08-21 16:00:55',
|
|
18
|
+
requestType: 1,
|
|
19
|
+
mobileModel: null,
|
|
20
|
+
appVersion: null,
|
|
21
|
+
offlineVersion: null,
|
|
22
|
+
system: 5,
|
|
23
|
+
paramsCleanRegex: null,
|
|
24
|
+
logLevel: 'info',
|
|
25
|
+
logId: '2094543572492935213',
|
|
26
|
+
logData: '修改',
|
|
27
|
+
// "mark": "\"><img src=\"x\" onerror=\"eval(unescape('%61%6c%65%72%74%28%22%78%73%73%34%22%29%3b'))\">",
|
|
28
|
+
// mark: '<p>"&gt;&lt;img src="x" onerror="eval(unescape('%61%6c%65%72%74%28%22%78%73%73%34%22%29%3b'))"&gt;</p>',
|
|
29
|
+
mark: '<p>"><a href="javascript:alert(1)">你好</a></p>',
|
|
30
|
+
logModule: '报价单',
|
|
31
|
+
operationName: null,
|
|
32
|
+
operationTime: null,
|
|
33
|
+
logExtra: null,
|
|
34
|
+
createByName: '申胜',
|
|
35
|
+
createDeptByName: '中拓本部',
|
|
36
|
+
mobile: false,
|
|
37
|
+
systemName: '中拓供应链',
|
|
38
|
+
requestTypeName: 'web',
|
|
39
|
+
};
|
|
40
|
+
export var obj1 = {
|
|
41
|
+
id: '2085200609873104558',
|
|
42
|
+
tenantId: '000000',
|
|
43
|
+
serviceId: 'zmdms-scm-order',
|
|
44
|
+
serverIp: 'fe80:0:0:0:12:34ff:fe06:6e85%eth0:18101',
|
|
45
|
+
serverHost: 'zmdms-scm-order-test-zmdmsscm-5464cbd67-mdb2j',
|
|
46
|
+
env: 'test',
|
|
47
|
+
remoteIp: '172.28.7.23',
|
|
48
|
+
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36',
|
|
49
|
+
requestUri: '/quotation/save',
|
|
50
|
+
method: 'POST',
|
|
51
|
+
methodClass: 'com.zmdms.core.log.logger.ZmdmsLogger',
|
|
52
|
+
methodName: 'info',
|
|
53
|
+
params: '{"companyId":"1415837991701037057","companyName":"浙商中拓集团股份有限公司","officeCode":"Z098","depId":"381761329295575035","depName":"中拓本部","salesmanId":"8177127521209909288","salesman":"申胜","constituteOffer":0,"currency":"CNY","exchangeRateRmb":1,"totalQuantity":1,"totalAmount":1,"totalAmountRmb":1,"pricingType":"","customerMemberId":"8780290016480822868","customerEmail":null,"predictProfit":null,"disputeResolution":null,"areaScope":null,"mark":"“><img+src=\\"x\\"+onerror=\\"eval(unescape(\'%61%6c%65%72%74%28%22%78%73%73%34%22%29%3b\'))\\">","customerMemberName":"CESHI","postDate":"2026-08-21","postingDate":"2026-08-21","quotationDetailDTOList":[{"_isUpdateData":false,"quantityUnit":"Z34","quantityUnitName":"箱","materialDescription":"1","quantity":1,"unitPrice":1,"unitPriceRmb":1,"amount":1,"amountRmb":1}],"status":10}',
|
|
54
|
+
createBy: '申胜',
|
|
55
|
+
createTime: '2026-08-21 15:57:09',
|
|
56
|
+
requestType: 1,
|
|
57
|
+
mobileModel: null,
|
|
58
|
+
appVersion: null,
|
|
59
|
+
offlineVersion: null,
|
|
60
|
+
system: 5,
|
|
61
|
+
paramsCleanRegex: null,
|
|
62
|
+
logLevel: 'info',
|
|
63
|
+
logId: '2094543572492935213',
|
|
64
|
+
logData: '新增',
|
|
65
|
+
mark: '“><img+src="x"+onerror="eval(unescape(\'%61%6c%65%72%74%28%22%78%73%73%34%22%29%3b\'))">',
|
|
66
|
+
logModule: '报价单',
|
|
67
|
+
operationName: null,
|
|
68
|
+
operationTime: null,
|
|
69
|
+
logExtra: null,
|
|
70
|
+
createByName: '申胜',
|
|
71
|
+
createDeptByName: '中拓本部',
|
|
72
|
+
mobile: false,
|
|
73
|
+
systemName: '中拓供应链',
|
|
74
|
+
requestTypeName: 'web',
|
|
75
|
+
};
|
|
@@ -22,6 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import React, { useMemo } from 'react';
|
|
24
24
|
import ReactQuill from 'react-quill';
|
|
25
|
+
import DOMPurify from 'dompurify';
|
|
25
26
|
import 'react-quill/dist/quill.snow.css';
|
|
26
27
|
/**
|
|
27
28
|
* @description HTML转义,将HTML标签转为实体字符
|
|
@@ -76,10 +77,13 @@ var CustomToolbar = function (_a) {
|
|
|
76
77
|
var InputQuill = function (_a) {
|
|
77
78
|
var value = _a.value, onBlur = _a.onBlur, buttons = _a.buttons, _b = _a.escapeHtml, escapeHtml = _b === void 0 ? false : _b, onChange = _a.onChange, props = __rest(_a, ["value", "onBlur", "buttons", "escapeHtml", "onChange"]);
|
|
78
79
|
var toolbarId = useMemo(function () { return "toolbar-" + Math.random().toString(36).substring(2, 11); }, []);
|
|
79
|
-
//
|
|
80
|
+
// 如果启用了转义,显示时需要反转义;
|
|
81
|
+
// 进入编辑器前统一净化,防止存库值被污染时(历史脏数据/后端拼接)注入恶意标签,
|
|
82
|
+
// 不再单独依赖 Quill 内部的格式白名单做安全边界
|
|
80
83
|
var displayValue = useMemo(function () {
|
|
81
84
|
var val = getValue(value);
|
|
82
|
-
|
|
85
|
+
var html = escapeHtml && val ? unescapeHtmlContent(val) : val;
|
|
86
|
+
return html ? DOMPurify.sanitize(html) : html;
|
|
83
87
|
}, [value, escapeHtml]);
|
|
84
88
|
// 处理onChange,如果启用了转义,输出时进行转义
|
|
85
89
|
var handleChange = function (content) {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React, { useRef, useEffect, useState, useMemo } from 'react';
|
|
2
|
+
import DOMPurify from 'dompurify';
|
|
2
3
|
import { unescapeHtmlContent } from './InputQuill';
|
|
3
4
|
var InputQuillRead = function (_a) {
|
|
4
5
|
var value = _a.value, _b = _a.escapeHtml, escapeHtml = _b === void 0 ? false : _b;
|
|
5
6
|
var contentRef = useRef(null);
|
|
6
7
|
var _c = useState(undefined), height = _c[0], setHeight = _c[1];
|
|
7
|
-
//
|
|
8
|
+
// 如果启用了转义,显示时需要反转义;
|
|
9
|
+
// 反转义/原始HTML在注入 innerHTML 前必须经过净化,防止 onerror 等事件属性与 script 造成 XSS
|
|
8
10
|
var displayValue = useMemo(function () {
|
|
9
|
-
|
|
11
|
+
var val = escapeHtml && value ? unescapeHtmlContent(value) : value;
|
|
12
|
+
return val ? DOMPurify.sanitize(val) : val;
|
|
10
13
|
}, [value, escapeHtml]);
|
|
11
14
|
useEffect(function () {
|
|
12
15
|
if (contentRef.current && displayValue) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ztxkui",
|
|
3
|
-
"version": "4.2.23-
|
|
3
|
+
"version": "4.2.23-609",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "React components library",
|
|
6
6
|
"author": "zt-front-end",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"axios": "^0.21.1",
|
|
17
17
|
"classnames": "^2.2.6",
|
|
18
18
|
"dayjs": "^1.10.4",
|
|
19
|
+
"dompurify": "^3.4.14",
|
|
19
20
|
"file-saver": "^2.0.5",
|
|
20
21
|
"html-docx-js": "^0.3.1",
|
|
21
22
|
"immutability-helper": "^3.1.1",
|