Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
ZZDataAnalysis
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlwu
ZZDataAnalysis
Commits
7290bf04
Commit
7290bf04
authored
Mar 14, 2024
by
whlviolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
71412585
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
289 additions
and
0 deletions
+289
-0
myData.vue
web/src/views/algorithmModel/components/myData.vue
+166
-0
myData.vue
web/src/views/dataHander/components/myData.vue
+123
-0
No files found.
web/src/views/algorithmModel/components/myData.vue
0 → 100644
View file @
7290bf04
<
template
>
<div
style=
"height:100%;width:100%"
>
<div
style=
"height: 100%;position:relative;"
>
<div
style=
"height:41px;line-height:41px; font-size:16px;font-weight:600;border-bottom:1px solid #e3e3e3"
>
<span
style=
"margin-left:30px"
>
{{
algoName
}}
</span>
</div>
<div
style=
"position: absolute; top: 41px; right:0px; left:0px; bottom:0px;overflow: scroll;"
>
<div
style=
"padding-bottom: 100px;"
>
<div
style=
"width: 100%; height:100%;margin:10px 30px;"
>
<span
style=
"font-weight:600;font-size:14px"
>
1、作用
</span>
<div
style=
"margin: 5px 0px "
>
<span
style=
"font-weight:400;font-size:14px"
>
{{
algoDes
}}
</span>
</div>
</div>
<div
style=
"width: 100%; height:100%;margin:5px 30px;"
>
<span
style=
"font-weight:600;font-size:14px"
>
2、参数说明
</span>
<div
style=
"margin: 5px 0px "
>
<span
style=
"font-weight:600;font-size:14px"
>
输入参数
</span>
</div>
<div
v-for=
"(item,idx) in algoPramsDes"
>
<!--
<component
:is=
"item.type"
></component>
-->
<div
style=
"margin: 5px 0px 5px"
>
<span
style=
"font-weight:400;font-size:14px"
>
{{
item
.
key
}}
{{
item
.
value
}}
</span>
</div>
</div>
<div
style=
"margin: 5px 0px "
>
<span
style=
"font-weight:600;font-size:14px"
>
输出结果
</span>
</div>
<div
style=
"margin: 5px 0px "
>
<span
style=
"font-weight:400;font-size:14px"
>
反应考核指标在量化评价中的综合得分与分档
</span>
</div>
<div
style=
"align-items: flex-end;margin-right:15px;margin-top:10px"
>
<el-button
type=
"primary"
style=
"width:200px;background-color: #0078D4"
@
click=
"handleClose"
>
在分析工具中打开该算法
</el-button>
</div>
</div>
<div
class=
"dynamicComp"
>
<div
v-for=
"(item,idx) in compDataList"
>
<!--
<component
:is=
"item.type"
></component>
-->
<div
style=
"margin:30px"
>
<span
style=
"font-weight:600;font-size:14px"
>
{{
item
.
name
}}
</span>
</div>
<div
v-if=
"item.name=='输出结果2:效益有效性分析'"
>
<div
style=
"margin:50px; height:600px; display: flex;flex-direction: column; align-content: center;justify-content: center; align-items: center;"
>
<vab-chart
autoresize
:options=
"fwl"
:style=
"
{'width': '80%', 'height':'80%'}" />
</div>
</div>
<div
v-else-if=
"item.name=='输出结果4:象限分析'"
>
<div
style=
"margin:50px; height:600px; display: flex;flex-direction: column; align-content: center;justify-content: center; align-items: center;"
>
<vab-chart
autoresize
:options=
"quadrant"
:style=
"
{'width': '80%', 'height':'80%'}" />
</div>
</div>
<div
v-else
>
<el-table
border
height=
"100%"
:data=
decimalNumberPrecision(item.header,item.value)
:style=
"
{'width': '100%','margin':'30px'}">
<template
v-for=
"item1 in item.header"
>
<el-table-column
:prop=
"item1"
align=
"center"
:label=
"item1"
:sortable=
"true"
min-width=
"200"
>
</el-table-column>
</
template
>
</el-table>
</div>
<div
style=
"margin:15px"
>
<div
style=
"font-weight:600;font-size: 14px;margin:10px 15px;"
>
图表说明:
</div>
<div
style=
"white-space: pre-wrap;font-size: 14px;margin:10px 15px;"
>
{{item.text}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<
script
>
import
{
getFileList
}
from
'@/api/data'
import
VabChart
from
"@/plugins/echarts"
;
export
default
{
name
:
'myData'
,
components
:
{
VabChart
},
props
:
{
algoName
:
{
},
algoRes
:
{
},
loading
:
false
},
data
()
{
return
{
fileList
:
[
],
}
},
mounted
()
{
this
.
initData
();
},
methods
:
{
initData
()
{
this
.
algoName
=
'秩和比综合评价法(RSR)'
this
.
algoDes
=
'秩和比(RSR)指将效益型指标从小到大排序进行排名、成本型指标从大到小排序进行排名,再计算秩和比,最后统计回归、分档排序。通过秩转换,获得无量纲统计量 RSR,以 RSR 值对评价对象的优劣直接排序或分档排序,从而对评价对象做出综合评价。'
this
.
algoPramsDes
=
[
{
key
:
"positive_columns:"
,
value
:
"正向指标"
},
{
key
:
"negative_columns:"
,
value
:
"负向指标"
},
{
key
:
"index_columns:"
,
value
:
"索引项"
},
{
key
:
"weights:"
,
value
:
"自定义权重"
},
{
key
:
"weight_type:"
,
value
:
"权重类型——entropy_method:熵权法,custom_weight:自定义权重,no_weight:不设置权重"
},
{
key
:
"make_method:"
,
value
:
"编秩方法——integer_rank:整秩方法,no_integer_rank:非整秩方法"
},
{
key
:
"number_bins:"
,
value
:
"分档数量——3档:3,4档: 4,5档: 5,6档: 6,7档: 7"
}
]
},
showData
(
row
)
{
console
.
log
(
row
)
this
.
$router
.
push
({
name
:
"detail"
,
query
:
row
})
},
handleClose
(){
},
dateFormat
(
timestamp
){
// 使用日期对象来格式化日期字符串
let
date
=
new
Date
(
timestamp
);
let
year
=
date
.
getFullYear
();
let
month
=
(
date
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
);
// 月份从0开始,所以要加1,然后使用padStart函数补零
let
day
=
date
.
getDate
().
toString
().
padStart
(
2
,
'0'
);
let
hours
=
date
.
getHours
().
toString
().
padStart
(
2
,
'0'
);
let
minutes
=
date
.
getMinutes
().
toString
().
padStart
(
2
,
'0'
);
let
seconds
=
date
.
getSeconds
().
toString
().
padStart
(
2
,
'0'
);
let
formattedDate
=
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
return
formattedDate
;
},
getFfileList
(
datas
){
for
(
let
i
in
datas
)
{
let
data
=
datas
[
i
]
data
[
'createTime'
]
=
this
.
dateFormat
(
data
[
'createTime'
])
data
[
'updateTime'
]
=
this
.
dateFormat
(
data
[
'updateTime'
])
};
return
datas
;
},
}
}
</
script
>
<
style
scoped
>
.index-container
{
height
:
100%
;
}
.fileName
:hover
{
cursor
:
pointer
;
color
:
rgb
(
255
,
121
,
11
);
}
</
style
>
web/src/views/dataHander/components/myData.vue
0 → 100644
View file @
7290bf04
<
template
>
<div
class=
"index-container"
>
<div
style=
"flex:1;padding: 10px;"
>
<el-table
:data=
fileList
:style=
"
{'width': '100%', 'height': '100%'}">
<template
v-for=
"item in tableHeader"
>
<el-table-column
v-if=
"item.key == 'name'"
:prop=
"item.key"
:label=
"item.title"
:sortable=
"true"
min-width=
"180"
>
<template
slot-scope=
"scope"
>
<i
class=
"el-icon-document"
></i>
<span
class=
"fileName"
style=
"margin-left: 10px"
@
click=
"showData(scope.row)"
>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
v-else
:prop=
"item.key"
:label=
"item.title"
:sortable=
"true"
min-width=
"180"
>
</el-table-column>
</template>
</el-table>
</div>
</div>
</template>
<
script
>
import
{
getFileList
}
from
'@/api/data'
export
default
{
name
:
'myData'
,
data
()
{
return
{
tableHeader
:
[
{
"title"
:
"文件名"
,
"key"
:
"name"
},
{
"title"
:
"更新时间"
,
"key"
:
"updateTime"
}
],
fileList
:
[
// {
// "id":"125",
// "name": "国民生产总值.csv",
// "type": "csv",
// "updateTime": "2023-05-22 10:10:10"
// },
// {
// "id":"124",
// "name": "人口.csv",
// "type": "csv",
// "updateTime": "2023-05-22 10:10:10"
// },
// {
// "id":"126",
// "name": "GDP.csv",
// "type": "csv",
// "updateTime": "2023-05-22 10:10:10"
// },
]
}
},
mounted
()
{
this
.
initData
();
},
methods
:
{
initData
()
{
getFileList
().
then
(
res
=>
{
console
.
log
(
res
)
this
.
fileList
=
this
.
getFfileList
(
res
.
data
)
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
showData
(
row
)
{
console
.
log
(
row
)
this
.
$router
.
push
({
name
:
"detail"
,
query
:
row
})
},
dateFormat
(
timestamp
){
// 使用日期对象来格式化日期字符串
let
date
=
new
Date
(
timestamp
);
let
year
=
date
.
getFullYear
();
let
month
=
(
date
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
);
// 月份从0开始,所以要加1,然后使用padStart函数补零
let
day
=
date
.
getDate
().
toString
().
padStart
(
2
,
'0'
);
let
hours
=
date
.
getHours
().
toString
().
padStart
(
2
,
'0'
);
let
minutes
=
date
.
getMinutes
().
toString
().
padStart
(
2
,
'0'
);
let
seconds
=
date
.
getSeconds
().
toString
().
padStart
(
2
,
'0'
);
let
formattedDate
=
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
return
formattedDate
;
},
getFfileList
(
datas
){
for
(
let
i
in
datas
)
{
let
data
=
datas
[
i
]
data
[
'createTime'
]
=
this
.
dateFormat
(
data
[
'createTime'
])
data
[
'updateTime'
]
=
this
.
dateFormat
(
data
[
'updateTime'
])
};
return
datas
;
},
}
}
</
script
>
<
style
scoped
>
.index-container
{
height
:
100%
;
}
.fileName
:hover
{
cursor
:
pointer
;
color
:
rgb
(
255
,
121
,
11
);
}
</
style
>
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