Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a0283c5d
authored
Mar 20, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 联调修改
1 parent
47d8cb25
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
12 deletions
src/views/goods/productManage/components/drawerDetail.vue
src/views/goods/productManage/components/drawerSkuDetail.vue
src/views/goods/productManage/components/drawerDetail.vue
View file @
a0283c5
...
@@ -266,16 +266,18 @@ export default {
...
@@ -266,16 +266,18 @@ export default {
label
:
"旧值"
,
label
:
"旧值"
,
prop
:
"oldValue"
,
prop
:
"oldValue"
,
minWidth
:
120
,
minWidth
:
120
,
formatter
:
row
=>
this
.
formatNameValue
(
row
.
oldValue
),
html
:
true
,
formatter
:
row
=>
this
.
formatNameValueHtml
(
row
.
oldValue
),
},
},
{
{
label
:
"新值"
,
label
:
"新值"
,
prop
:
"newValue"
,
prop
:
"newValue"
,
minWidth
:
120
,
minWidth
:
120
,
formatter
:
row
=>
this
.
formatNameValue
(
row
.
newValue
),
html
:
true
,
formatter
:
row
=>
this
.
formatNameValueHtml
(
row
.
newValue
),
},
},
{
label
:
"商品编码"
,
prop
:
"
commodityCode"
,
minWidth
:
100
,
formatter
:
row
=>
row
.
commodityCod
e
??
"-"
},
{
label
:
"商品编码"
,
prop
:
"
type"
,
minWidth
:
100
,
formatter
:
row
=>
row
.
typ
e
??
"-"
},
{
label
:
"ID"
,
prop
:
"
baseGoodsId"
,
minWidth
:
100
,
formatter
:
row
=>
row
.
baseGoodsId
??
row
.
baseGoodsId
??
"-"
},
{
label
:
"ID"
,
prop
:
"
commodityCode"
,
minWidth
:
100
,
formatter
:
row
=>
row
.
commodityCode
??
"-"
},
{
label
:
"操作人"
,
prop
:
"updatedBy"
,
minWidth
:
100
},
{
label
:
"操作人"
,
prop
:
"updatedBy"
,
minWidth
:
100
},
{
{
label
:
"操作日期"
,
label
:
"操作日期"
,
...
@@ -434,12 +436,39 @@ export default {
...
@@ -434,12 +436,39 @@ export default {
.
filter
(
item
=>
item
&&
(
item
.
name
!=
null
||
item
.
value
!=
null
))
.
filter
(
item
=>
item
&&
(
item
.
name
!=
null
||
item
.
value
!=
null
))
.
map
(
item
=>
`
${
item
.
name
??
""
}:
$
{
item
.
value
??
""
}
`.trim())
.
map
(
item
=>
`
${
item
.
name
??
""
}:
$
{
item
.
value
??
""
}
`.trim())
.filter(s => s && s !== ":")
.filter(s => s && s !== ":")
.join("
;
");
.join("
\n
");
return str || "-";
return str || "-";
} catch {
} catch {
return val;
return val;
}
}
},
},
// 解析 JSON 格式的 name/value,返回 HTML 用于换行显示
formatNameValueHtml(val) {
if (val == null || val === "")
return "-";
try {
const data = typeof val === "string" ? JSON.parse(val) : val;
const arr = Array.isArray(data) ? data : [data];
const str = arr
.filter(item => item && (item.name != null || item.value != null))
.map(item => `
$
{
this
.
escapeHtml
(
item
.
name
??
""
)}:
$
{
this
.
escapeHtml
(
item
.
value
??
""
)}
`.trim())
.filter(s => s && s !== ":")
.join("<br>");
return str || "-";
} catch {
return this.escapeHtml(String(val));
}
},
escapeHtml(str) {
if (str == null)
return "";
const s = String(str);
return s
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """);
},
},
},
};
};
</
script
>
</
script
>
...
...
src/views/goods/productManage/components/drawerSkuDetail.vue
View file @
a0283c5
...
@@ -137,28 +137,28 @@
...
@@ -137,28 +137,28 @@
min-width=
"120"
min-width=
"120"
prop=
"oldValue"
>
prop=
"oldValue"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
formatNameValue
(
scope
.
row
.
oldValue
)
}}
<span
v-html=
"formatNameValueHtml(scope.row.oldValue)"
></span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"新值"
<el-table-column
label=
"新值"
min-width=
"120"
min-width=
"120"
prop=
"newValue"
>
prop=
"newValue"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
formatNameValue
(
scope
.
row
.
newValue
)
}}
<span
v-html=
"formatNameValueHtml(scope.row.newValue)"
></span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"商品编码"
<el-table-column
label=
"商品编码"
min-width=
"100"
min-width=
"100"
prop=
"
commodityCod
e"
>
prop=
"
typ
e"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
commodityCod
e
||
"-"
}}
{{
scope
.
row
.
typ
e
||
"-"
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"ID"
<el-table-column
label=
"ID"
min-width=
"100"
min-width=
"100"
prop=
"
baseGoodsId
"
>
prop=
"
commodityCode
"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
baseGoodsId
||
scope
.
row
.
id
||
"-"
}}
{{
scope
.
row
.
commodityCode
||
"-"
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作人"
<el-table-column
label=
"操作人"
...
@@ -301,12 +301,38 @@ export default {
...
@@ -301,12 +301,38 @@ export default {
.
filter
(
item
=>
item
&&
(
item
.
name
!=
null
||
item
.
value
!=
null
))
.
filter
(
item
=>
item
&&
(
item
.
name
!=
null
||
item
.
value
!=
null
))
.
map
(
item
=>
`
${
item
.
name
??
""
}:
$
{
item
.
value
??
""
}
`.trim())
.
map
(
item
=>
`
${
item
.
name
??
""
}:
$
{
item
.
value
??
""
}
`.trim())
.filter(s => s && s !== ":")
.filter(s => s && s !== ":")
.join("
;
");
.join("
\n
");
return str || "-";
return str || "-";
} catch {
} catch {
return val;
return val;
}
}
},
},
formatNameValueHtml(val) {
if (val == null || val === "")
return "-";
try {
const data = typeof val === "string" ? JSON.parse(val) : val;
const arr = Array.isArray(data) ? data : [data];
const str = arr
.filter(item => item && (item.name != null || item.value != null))
.map(item => `
$
{
this
.
escapeHtml
(
item
.
name
??
""
)}:
$
{
this
.
escapeHtml
(
item
.
value
??
""
)}
`.trim())
.filter(s => s && s !== ":")
.join("<br>");
return str || "-";
} catch {
return this.escapeHtml(String(val));
}
},
escapeHtml(str) {
if (str == null)
return "";
const s = String(str);
return s
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """);
},
loadSkuData() {
loadSkuData() {
if (!this.commodityInfoId)
if (!this.commodityInfoId)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment