Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
d45f7b6a
提交
d45f7b6a
authored
12月 31, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
daa6b8cd
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
78 行增加
和
28 行删除
+78
-28
index.vue
src/modules/offices/src/index.vue
+9
-2
credit.vue
src/pages/grade/credit.vue
+69
-26
没有找到文件。
src/modules/offices/src/index.vue
浏览文件 @
d45f7b6a
...
@@ -85,8 +85,15 @@ export default {
...
@@ -85,8 +85,15 @@ export default {
const
[
first
=
{}]
=
response
const
[
first
=
{}]
=
response
this
.
active
=
first
this
.
active
=
first
this
.
types
=
response
this
.
types
=
response
if
(
this
.
$route
.
query
.
id
)
{
const
query
=
this
.
$route
.
query
const
index
=
response
.
findIndex
(
item
=>
item
.
id
===
this
.
$route
.
query
.
id
)
if
(
query
.
id
||
query
.
channel
)
{
let
index
=
0
if
(
query
.
id
)
{
index
=
response
.
findIndex
(
item
=>
item
.
id
===
query
.
id
)
}
if
(
query
.
channel
)
{
index
=
response
.
findIndex
(
item
=>
item
.
form_name
===
query
.
channel
)
}
this
.
tapParam
[
0
].
selectIndex
=
index
this
.
tapParam
[
0
].
selectIndex
=
index
this
.
active
=
response
[
index
]
this
.
active
=
response
[
index
]
}
}
...
...
src/pages/grade/credit.vue
浏览文件 @
d45f7b6a
...
@@ -4,29 +4,50 @@
...
@@ -4,29 +4,50 @@
<div
class=
"con-box"
>
<div
class=
"con-box"
>
<div
class=
"total-core"
>
<div
class=
"total-core"
>
<div
class=
"title"
>
{{
$t
(
'pages.grade.credit.totalCredits'
)
}}
</div>
<div
class=
"title"
>
{{
$t
(
'pages.grade.credit.totalCredits'
)
}}
</div>
<div
class=
"core"
>
{{
score
.
total
}}
</div>
<div
class=
"core"
>
{{
score
.
total
}}
</div>
<el-progress
ref=
"credit_total"
:text-inside=
"true"
:stroke-width=
"30"
:percentage=
"percent1"
color=
"#df9d75"
></el-progress>
<el-progress
ref=
"credit_total"
:text-inside=
"true"
:stroke-width=
"30"
:percentage=
"percent1"
color=
"#df9d75"
></el-progress>
</div>
</div>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"12"
:lg=
"12"
:xl=
"12"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"12"
:lg=
"12"
:xl=
"12"
>
<div
class=
"compulsory-core"
>
<div
class=
"compulsory-core"
>
<div
class=
"title"
>
{{
$t
(
'pages.grade.credit.compCredits'
)
}}
</div>
<div
class=
"title"
>
{{
$t
(
'pages.grade.credit.compCredits'
)
}}
</div>
<div
class=
"core"
>
{{
score
.
must
}}
</div>
<div
class=
"core"
>
{{
score
.
must
}}
</div>
<el-progress
ref=
"credit_must"
:text-inside=
"true"
:stroke-width=
"30"
:percentage=
"percent2"
color=
"#8ca4cf"
></el-progress>
<el-progress
ref=
"credit_must"
:text-inside=
"true"
:stroke-width=
"30"
:percentage=
"percent2"
color=
"#8ca4cf"
></el-progress>
</div>
</div>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"12"
:lg=
"12"
:xl=
"12"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"12"
:lg=
"12"
:xl=
"12"
>
<div
class=
"elective-core"
>
<div
class=
"elective-core"
>
<div
class=
"title"
>
{{
$t
(
'pages.grade.credit.eleCredits'
)
}}
</div>
<div
class=
"title"
>
{{
$t
(
'pages.grade.credit.eleCredits'
)
}}
</div>
<div
class=
"core"
>
{{
score
.
unmust
}}
</div>
<div
class=
"core"
>
{{
score
.
unmust
}}
</div>
<el-progress
ref=
"credit_unmust"
:text-inside=
"true"
:stroke-width=
"30"
:percentage=
"percent3"
color=
"#66c6bd"
></el-progress>
<el-progress
ref=
"credit_unmust"
:text-inside=
"true"
:stroke-width=
"30"
:percentage=
"percent3"
color=
"#66c6bd"
></el-progress>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<div
class=
"color-box"
>
<div
class=
"color-box"
>
<div
class=
"color"
style=
"background: #8ca4cf;"
></div><div
class=
"txt"
>
{{
$t
(
'pages.grade.credit.compCredits'
)
}}
</div>
<div
class=
"color"
style=
"background: #8ca4cf"
></div>
<div
class=
"color"
style=
"background: #66c6bd;"
></div><div
class=
"txt"
>
{{
$t
(
'pages.grade.credit.eleCredits'
)
}}
</div>
<div
class=
"txt"
>
{{
$t
(
'pages.grade.credit.compCredits'
)
}}
</div>
<div
class=
"color"
style=
"background: #df9d75;"
></div><div
class=
"txt"
>
{{
$t
(
'pages.grade.credit.allCredits'
)
}}
</div>
<div
class=
"color"
style=
"background: #66c6bd"
></div>
<div
class=
"txt"
>
{{
$t
(
'pages.grade.credit.eleCredits'
)
}}
</div>
<div
class=
"color"
style=
"background: #df9d75"
></div>
<div
class=
"txt"
>
{{
$t
(
'pages.grade.credit.allCredits'
)
}}
</div>
</div>
</div>
<m-page
<m-page
:tableHead=
"tableHead"
:tableHead=
"tableHead"
...
@@ -35,7 +56,7 @@
...
@@ -35,7 +56,7 @@
:objFn=
"objFn"
:objFn=
"objFn"
:tableConfig=
"tableConfig"
:tableConfig=
"tableConfig"
/>
/>
<div
style=
"height: 0.3rem
;
"
></div>
<div
style=
"height: 0.3rem"
></div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -45,7 +66,7 @@ import mPage from '@/components/comTable/mPage.vue'
...
@@ -45,7 +66,7 @@ import mPage from '@/components/comTable/mPage.vue'
export
default
{
export
default
{
components
:
{
mPage
},
components
:
{
mPage
},
data
()
{
data
()
{
return
{
return
{
percent1
:
0
,
percent1
:
0
,
percent2
:
0
,
percent2
:
0
,
...
@@ -72,43 +93,63 @@ export default {
...
@@ -72,43 +93,63 @@ export default {
{
prop
:
'credit'
,
label
:
this
.
$t
(
'pages.grade.credit.credit'
),
minWidth
:
'40'
,
fix
:
false
},
{
prop
:
'credit'
,
label
:
this
.
$t
(
'pages.grade.credit.credit'
),
minWidth
:
'40'
,
fix
:
false
},
{
prop
:
'score'
,
label
:
this
.
$t
(
'pages.grade.credit.grade'
),
minWidth
:
'40'
,
fix
:
false
},
{
prop
:
'score'
,
label
:
this
.
$t
(
'pages.grade.credit.grade'
),
minWidth
:
'40'
,
fix
:
false
},
// { prop: '', label: this.$t('pages.grade.credit')'', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数
// { prop: '', label: this.$t('pages.grade.credit')'', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数
{
prop
:
'operate-x'
,
label
:
this
.
$t
(
'pages.grade.credit.operate'
),
width
:
'80px'
,
fix
:
false
,
commandArr
:
[{
command
:
're-start'
,
name
:
'重修'
},
{
command
:
're-start'
,
name
:
'已申请'
}]
}
{
prop
:
'operate-x'
,
label
:
this
.
$t
(
'pages.grade.credit.operate'
),
width
:
'80px'
,
fix
:
false
,
commandArr
:
[
{
command
:
're-start'
,
name
:
'重修'
},
{
command
:
're-start'
,
name
:
'已申请'
}
]
}
],
],
tableData
:
[],
tableData
:
[],
params
:
{
keywords
:
''
,
curPage
:
1
,
pageSize
:
100
,
total
:
''
},
params
:
{
keywords
:
''
,
curPage
:
1
,
pageSize
:
100
,
total
:
''
},
objFn
:
{
objFn
:
{
paramsFn
:
(
_this
)
=>
{
return
{}
},
paramsFn
:
_this
=>
{
return
{}
},
nameAPI
:
'getCredit'
,
nameAPI
:
'getCredit'
,
actionClass
:
'Grade'
,
actionClass
:
'Grade'
,
// nameExcel: 'getStatSummaryExcel',
// nameExcel: 'getStatSummaryExcel',
nameExcel
:
'getExportExcel3_4_14'
,
nameExcel
:
'getExportExcel3_4_14'
,
callback
:
(
_this
,
data
)
=>
{
callback
:
(
_this
,
data
)
=>
{
this
.
score
=
data
this
.
score
=
data
this
.
percent1
=
Math
.
floor
(
this
.
score
.
myTotal
/
this
.
score
.
total
*
100
)
||
0
this
.
percent1
=
Math
.
floor
(
(
this
.
score
.
myTotal
/
this
.
score
.
total
)
*
100
)
||
0
this
.
percent2
=
Math
.
floor
(
this
.
score
.
myMust
/
this
.
score
.
must
*
100
)
||
0
this
.
percent2
=
Math
.
floor
(
(
this
.
score
.
myMust
/
this
.
score
.
must
)
*
100
)
||
0
this
.
percent3
=
Math
.
floor
(
this
.
score
.
myUnmust
/
(
this
.
score
.
unmust
?
this
.
score
.
unmust
:
1
)
*
100
)
||
0
this
.
percent3
=
Math
.
floor
(
(
this
.
score
.
myUnmust
/
(
this
.
score
.
unmust
?
this
.
score
.
unmust
:
1
)
)
*
100
)
||
0
// console.log(111, this.score, this.percent1, this.percent2, this.percent3)
// console.log(111, this.score, this.percent1, this.percent2, this.percent3)
this
.
$refs
.
credit_total
.
$el
.
children
[
0
].
children
[
0
].
children
[
0
].
children
[
0
].
innerHTML
=
this
.
score
.
myTotal
+
'(分)'
this
.
$refs
.
credit_total
.
$el
.
children
[
0
].
children
[
0
].
children
[
0
].
children
[
0
].
innerHTML
=
this
.
$refs
.
credit_must
.
$el
.
children
[
0
].
children
[
0
].
children
[
0
].
children
[
0
].
innerHTML
=
this
.
score
.
myMust
+
'(分)'
this
.
score
.
myTotal
+
'(分)'
this
.
$refs
.
credit_unmust
.
$el
.
children
[
0
].
children
[
0
].
children
[
0
].
children
[
0
].
innerHTML
=
this
.
score
.
myUnmust
+
'(分)'
this
.
$refs
.
credit_must
.
$el
.
children
[
0
].
children
[
0
].
children
[
0
].
children
[
0
].
innerHTML
=
this
.
score
.
myMust
+
'(分)'
this
.
$refs
.
credit_unmust
.
$el
.
children
[
0
].
children
[
0
].
children
[
0
].
children
[
0
].
innerHTML
=
this
.
score
.
myUnmust
+
'(分)'
_this
.
params
.
total
=
100
_this
.
params
.
total
=
100
data
=
data
.
list
data
=
data
.
list
data
.
forEach
((
elem
,
i
)
=>
{
data
.
forEach
((
elem
,
i
)
=>
{
elem
.
index
=
i
+
1
+
(
_this
.
params
.
curPage
-
1
)
*
_this
.
params
.
pageSize
elem
.
index
=
i
+
1
+
(
_this
.
params
.
curPage
-
1
)
*
_this
.
params
.
pageSize
elem
.
passed
=
elem
.
passed
!==
0
?
(
elem
.
passed
===
2
?
this
.
$t
(
'pages.grade.credit.unpublished'
)
:
this
.
$t
(
'pages.grade.credit.passed'
))
:
this
.
$t
(
'pages.grade.credit.failed'
)
elem
.
passed
=
elem
.
passed
!==
0
?
elem
.
passed
===
2
?
this
.
$t
(
'pages.grade.credit.unpublished'
)
:
this
.
$t
(
'pages.grade.credit.passed'
)
:
this
.
$t
(
'pages.grade.credit.failed'
)
_this
.
tableData
.
push
(
elem
)
_this
.
tableData
.
push
(
elem
)
})
})
}
}
}
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
VueEvent
.
$off
(
'command-tablelist-x'
).
$on
(
'command-tablelist-x'
,
(
data
)
=>
{
this
.
VueEvent
.
$off
(
'command-tablelist-x'
).
$on
(
'command-tablelist-x'
,
data
=>
{
if
(
data
.
command
.
command
===
're-start'
)
{
if
(
data
.
command
.
command
===
're-start'
)
{
const
_data
=
data
.
tableData
[
data
.
index
-
1
]
this
.
$router
.
push
({
path
:
'/app/offices'
,
query
:
{
channel
:
'retake'
}
})
window
.
localStorage
.
setItem
(
'rebuild'
,
JSON
.
stringify
(
_data
))
// const _data = data.tableData[data.index - 1]
this
.
$router
.
push
({
path
:
'/app/grade/rebuild'
})
// window.localStorage.setItem('rebuild', JSON.stringify(_data))
// this.$router.push({ path: '/app/grade/rebuild' })
}
}
})
})
}
}
...
@@ -116,7 +157,9 @@ export default {
...
@@ -116,7 +157,9 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.total-core
,
.compulsory-core
,
.elective-core
{
.total-core
,
.compulsory-core
,
.elective-core
{
margin-top
:
0
.1rem
;
margin-top
:
0
.1rem
;
font-size
:
16px
;
font-size
:
16px
;
line-height
:
36px
;
line-height
:
36px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论