Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiqiao-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
金民
weiqiao-vue
Commits
71b72590
Commit
71b72590
authored
Mar 25, 2026
by
董晓奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工艺路线
列表中产品类型字段显示id不显示对应名称BUG修复
parent
26e920b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletions
+40
-1
xjrsoft-vue3/src/api/jcsj/gylx/index.ts
+12
-0
xjrsoft-vue3/src/views/jcsj/gylx/index.vue
+28
-1
No files found.
xjrsoft-vue3/src/api/jcsj/gylx/index.ts
View file @
71b72590
...
...
@@ -11,6 +11,7 @@ enum Api {
List
=
'/jcsj/gylx/list'
,
Info
=
'/jcsj/gylx/info'
,
RokeRouting
=
'/jcsj/gylx'
,
getAllCplx
=
'/magic-api/jcxx/cplx/getAllCPLX'
,
}
/**
...
...
@@ -90,3 +91,14 @@ export async function deleteRokeRouting(ids: string[], mode: ErrorMessageMode =
},
);
}
export
async
function
getAllCPLX
(
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
get
<
Array
<
{
value
:
string
;
label
:
string
}
>>
(
{
url
:
Api
.
getAllCplx
,
},
{
errorMessageMode
:
mode
,
},
);
}
xjrsoft-vue3/src/views/jcsj/gylx/index.vue
View file @
71b72590
...
...
@@ -31,6 +31,10 @@
/>
</
template
>
<
template
v-else-if=
"column.dataIndex === 'productType'"
>
{{
getProductTypeName
(
record
.
productType
)
}}
</
template
>
<
template
v-else-if=
"column.dataIndex && column?.listStyle"
>
<span
:style=
"executeListStyle(getValue(record, column, 'style'), column?.listStyle)"
>
{{
getValue
(
record
,
column
,
'value'
)
...
...
@@ -44,7 +48,7 @@
</ResizePageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
provide
,
Ref
,
createVNode
}
from
'vue'
;
import
{
ref
,
computed
,
provide
,
Ref
,
createVNode
,
onMounted
}
from
'vue'
;
import
{
Modal
}
from
'ant-design-vue'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons-vue'
;
...
...
@@ -70,6 +74,10 @@
import
{
useConcurrentLock
}
from
'/@/hooks/web/useConcurrentLock'
;
import
{
getAllCPLX
}
from
'/@/api/jcsj/gylx/index'
;
const
productTypeMap
=
ref
<
Record
<
string
,
string
>>
({});
const
pageParamsInfo
=
ref
<
any
>
({});
const
{
enableLockeData
,
...
...
@@ -305,6 +313,25 @@
});
return
actionsList
;
}
onMounted
(
async
()
=>
{
try
{
const
res
=
await
getAllCPLX
();
// 假设返回格式为 [{ value: 'id', label: '名称' }, ...]
const
map
:
Record
<
string
,
string
>
=
{};
res
.
forEach
((
item
)
=>
{
map
[
item
.
value
]
=
item
.
label
;
});
productTypeMap
.
value
=
map
;
}
catch
(
error
)
{
console
.
error
(
'获取产品类型列表失败'
,
error
);
}
});
function
getProductTypeName
(
id
:
string
|
number
):
string
{
if
(
!
id
)
return
''
;
return
productTypeMap
.
value
[
id
]
||
String
(
id
);
}
</
script
>
<
style
lang=
"less"
scoped
>
:deep
(
.ant-table-selection-col
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment