Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
data-collect
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyi.chen
data-collect
Commits
5c9fb340
Commit
5c9fb340
authored
Apr 17, 2024
by
wenyi.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加指标完整页面
parent
c7009759
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
16 deletions
+61
-16
src/api/norm/index.js
src/api/norm/index.js
+7
-0
src/views/norm/list/details.vue
src/views/norm/list/details.vue
+1
-1
src/views/norm/list/whole.vue
src/views/norm/list/whole.vue
+53
-15
No files found.
src/api/norm/index.js
View file @
5c9fb340
...
...
@@ -35,6 +35,13 @@ export function normApi() {
data
,
});
},
normPartDetail
:
(
data
)
=>
{
return
request
({
url
:
'
/api/norm/partDetail
'
,
method
:
'
post
'
,
data
,
});
},
normEdit
:
(
data
)
=>
{
return
request
({
url
:
'
/api/norm/edit
'
,
...
...
src/views/norm/list/details.vue
View file @
5c9fb340
...
...
@@ -100,7 +100,7 @@ const state = reactive({
const
getInfo
=
()
=>
{
state
.
loading
=
true
// 清空数据
normApi
().
normDetail
(
state
.
apiData
).
then
(
res
=>
{
normApi
().
norm
Part
Detail
(
state
.
apiData
).
then
(
res
=>
{
let
addItem
=
res
.
data
.
addItem
;
let
custom
=
res
.
data
.
custom
;
// 数据详情
...
...
src/views/norm/list/whole.vue
View file @
5c9fb340
...
...
@@ -9,14 +9,12 @@
</el-page-header>
</div>
</div>
<div
class=
"page-main"
ref=
"pageMain"
v-loading=
"state.loading"
>
<div
class=
"page-main"
ref=
"pageMain"
v-loading=
"state.loading"
>
<el-card
shadow=
"hover"
>
<el-table
:data=
"state.tableData"
border
style=
"width: 100%"
:height=
"state.tableHeight"
<el-table
:data=
"state.tableData"
border
style=
"width: 100%
;
"
:height=
"state.tableHeight"
ref=
"multipleTableRef"
>
<el-table-column
v-for=
"column in state.columns"
:key=
"column.prop"
:label=
"column.label"
:prop=
"column.prop"
:width=
"column.width"
show-overflow-tooltip
align=
"center"
>
<template
#default
="
scope
"
>
<el-link
type=
"danger"
v-if=
"checkUrl(scope.row[column.prop])"
:href=
"scope.row[column.prop]"
target =
"_blank"
>
点击查看
</el-link>
<span
v-else
>
{{
scope
.
row
[
column
.
prop
]
}}
</span>
<el-table-column
:cell-style=
"
{ 'white-space': 'normal' }" v-for="column in state.columns" :key="column.prop" :label="column.label" :prop="column.prop" :width="column.width" show-overflow-tooltip align="center">
<template
#default
="
scope
"
><span
v-html=
"formatOutputCustom(scope.row[column.prop])"
></span>
<!--
<span
style=
"color:#409EFF"
v-if=
"column.label =='用户名称'"
>
{{
scope
.
row
[
column
.
prop
]
}}
</span>
<span
style=
"color:#909399"
v-else-if=
"column.label =='领取状态' && scope.row[column.prop] ==1"
>
已领取
</span>
<span
style=
"color:#E6A23C"
v-else-if=
"column.label =='完成状态' && scope.row[column.prop] ==0"
>
未完成
</span>
...
...
@@ -54,7 +52,7 @@
apiData
:
{
id
:
''
,
page
:
1
,
limit
:
1
3
,
limit
:
1
0
,
},
total
:
0
,
tableData
:[],
...
...
@@ -81,15 +79,15 @@
// 表格列名称
state
.
columns
=
[
{
label
:
'
序号
'
,
prop
:
'
index
'
,
width
:
'
80px
'
},
//
{ label:'ID', prop: 'id'},
{
label
:
'
用户名称
'
,
prop
:
'
userInfo.name
'
,
width
:
120
},
{
label
:
'
ID
'
,
prop
:
'
id
'
},
{
label
:
'
领取用户
'
,
prop
:
'
userInfo.name
'
,
width
:
120
},
{
label
:
'
任务名称
'
,
prop
:
'
task_info.name
'
,
width
:
180
},
{
label
:
'
子任务名称
'
,
prop
:
'
norm_info.name
'
,
width
:
180
},
{
label
:
'
指标名称
'
,
prop
:
'
norm_list_info.name
'
,
width
:
280
},
{
label
:
'
难度等级
'
,
prop
:
'
norm_info.level
'
,
width
:
180
},
{
label
:
'
参考信源
'
,
prop
:
'
norm_info.refer
'
,
width
:
180
},
{
label
:
'
单价
'
,
prop
:
'
norm_info.price
'
,
width
:
180
},
{
label
:
'
参考指南
'
,
prop
:
'
norm_info.guide
'
,
width
:
180
},
{
label
:
'
指标名称
'
,
prop
:
'
norm_list_info.name
'
,
width
:
280
},
{
label
:
'
上传文件
'
,
prop
:
'
fileListPdf
'
,
width
:
280
},
];
titleColumn
.
forEach
(
function
(
item
,
index
,
arr
)
{
...
...
@@ -101,6 +99,7 @@
receivesList
.
forEach
(
function
(
item
,
index
,
arr
)
{
let
list
=
{
'
index
'
:
index
+
1
,
'
id
'
:
item
.
id
,
'
userInfo.name
'
:
item
.
userInfo
.
name
,
'
task_info.name
'
:
item
.
task_info
.
name
,
'
norm_info.name
'
:
addItem
.
name
,
...
...
@@ -172,13 +171,52 @@
};
//校验链接
const
checkUrl
=
(
vlaue
)
=>
{
if
(
/^https
?
:
\/\/
/
.
test
(
vlaue
))
{
return
true
;
}
else
{
return
false
;
}
if
(
/^https
?
:
\/\/
/
.
test
(
vlaue
))
{
return
true
;
}
else
{
return
false
;
}
}
/**
* 自定义内容格式化输出
* @param {*} vlaue
*/
const
formatOutputCustom
=
(
value
)
=>
{
if
(
value
&&
typeof
value
==
"
string
"
){
let
arr
=
value
.
split
(
'
,
'
);
let
txt
=
''
;
arr
.
map
((
item
,
index
)
=>
{
let
str
=
checkUrl
(
item
);
if
(
str
){
if
(
index
==
0
){
txt
+=
"
<a style='color:#409EFF;' href='
"
+
item
+
"
' target ='_blank'>
"
+
item
+
"
</a>
"
;
}
else
{
txt
+=
"
<br><br><a style='color:#409EFF;' href='
"
+
item
+
"
' target ='_blank'>
"
+
item
+
"
</a>
"
;
}
}
else
{
txt
+=
item
;
}
})
return
txt
;
}
else
{
return
value
;
}
}
// /**
// * 检查数据类型并且将多个逗号分隔成数组
// * @param {*} value
// */
// const inspectionType = (value) =>{
// if(typeof value =="string"){
// let arr = value.split(',');
// return arr;
// }else{
// return [value];
// }
// }
// 暴露变量
defineExpose
({
...
...
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