Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
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
0
Merge Requests
0
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
wangqi
dd_school
Commits
0ca51a08
Commit
0ca51a08
authored
Dec 08, 2023
by
zhaopanyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zpy 12.8 教师电子档案
parent
2487251e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
489 additions
and
112 deletions
+489
-112
ruoyi-ui/src/components/ExportTable/index.vue
+9
-24
ruoyi-ui/src/views/smartSchool/electronicArchives/basicInformation/index.vue
+0
-0
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors/index.vue
+61
-17
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/essaysWritings/index.vue
+55
-4
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/lectureAwards/index.vue
+59
-8
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/teacherAwards/index.vue
+64
-14
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/teachingAchievements/index.vue
+2
-2
ruoyi-ui/src/views/smartSchool/personWork/comprehensiveHonors/index.vue
+61
-17
ruoyi-ui/src/views/smartSchool/personWork/essaysWritings/index.vue
+55
-4
ruoyi-ui/src/views/smartSchool/personWork/lectureAwards/index.vue
+59
-8
ruoyi-ui/src/views/smartSchool/personWork/teacherAwards/index.vue
+64
-14
No files found.
ruoyi-ui/src/components/ExportTable/index.vue
View file @
0ca51a08
<
template
>
<el-dialog
:visible
.
sync=
"open"
:title=
"title"
width=
"300px"
>
<el-dialog
:visible
.
sync=
"open"
:title=
"title"
width=
"300px"
>
<el-radio-group
v-model=
"exportType"
>
<el-radio
v-for=
"item in ExportOptions"
:key=
"item.type"
:label=
"item.type"
style=
"display: block; margin-bottom: 10px"
>
{{
item
.
label
}}
<el-radio
v-for=
"item in ExportOptions"
:key=
"item.type"
:label=
"item.type"
style=
"display: block; margin-bottom: 10px"
>
{{
item
.
label
}}
</el-radio>
</el-radio-group>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"exportFile"
>
导 出
<el-button
type=
"primary"
@
click=
"exportFile"
>
导 出
</el-button>
<el-button
plain
@
click=
"closeExport"
>
取 消
<el-button
plain
@
click=
"closeExport"
>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
ExportType
,
ExportTypes
}
from
"@/enums/common"
;
import
{
ExportType
,
ExportTypes
}
from
"@/enums/common"
;
export
default
{
name
:
"ExportTable"
,
...
...
@@ -80,10 +66,11 @@ export default {
exportFile
()
{
this
.
$emit
(
'export'
,
(
exportOptions
=
[],
fileName
)
=>
{
const
result
=
exportOptions
.
find
(
item
=>
item
.
type
===
this
.
exportType
);
console
.
log
(
'result'
,
result
);
if
(
result
)
{
// 添加校验
if
(
result
.
path
&&
this
.
isSelectedData
(
result
.
path
))
{
this
.
download
(
result
.
path
,
{
...
result
.
params
},
fileName
);
this
.
download
(
result
.
path
,
{
...
result
.
params
},
fileName
);
}
this
.
open
=
false
;
}
...
...
@@ -109,6 +96,4 @@ export default {
}
</
script
>
<
style
scoped
>
</
style
>
<
style
scoped
></
style
>
ruoyi-ui/src/views/smartSchool/electronicArchives/basicInformation/index.vue
View file @
0ca51a08
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors/index.vue
View file @
0ca51a08
...
...
@@ -2,28 +2,25 @@
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"学科"
prop=
"sub"
>
<el-select
v-model=
"
form
.teachingSubject"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-select
v-model=
"
queryParams
.teachingSubject"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.teaching_subjects"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"获奖类别"
prop=
"awardType"
>
<el-select
v-model=
"form.awardType"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award_categories"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
<el-input
v-model=
"queryParams.awardType"
placeholder=
"请输入获奖类别"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"获奖级别"
prop=
"awardRank"
>
<el-select
v-model=
"
form
.awardRank"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-select
v-model=
"
queryParams
.awardRank"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.awards_level"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"获奖等级"
prop=
"awardLevel"
>
<el-select
v-model=
"
form
.awardLevel"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-select
v-model=
"
queryParams
.awardLevel"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award_rank"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
...
...
@@ -108,11 +105,8 @@
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"获奖类别"
prop
=
"awardType"
>
<
el
-
select
v
-
model
=
"form.awardType"
placeholder
=
"请选择"
style
=
"width: 100%;"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories"
:
key
=
"dict.value"
:
label
=
"dict.label"
:
value
=
"dict.value"
>
<
/el-option
>
<
/el-select
>
<
el
-
input
v
-
model
=
"queryParams.awardType"
placeholder
=
"请输入获奖类别"
clearable
@
keyup
.
enter
.
native
=
"handleQuery"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -168,9 +162,17 @@
<
el
-
input
v
-
model
=
"form.remark"
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"pictureName"
>
<
el
-
input
v
-
model
=
"form.pictureName"
placeholder
=
"请输入证书图片名称"
/>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
class
=
"custom-margin"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"photo"
>
<
el
-
upload
v
-
loading
=
"uploadLoading"
class
=
"avatar-uploader"
action
=
"#"
accept
=
"image/*"
:
show
-
file
-
list
=
"false"
:
on
-
success
=
"handleAvatarSuccess"
:
before
-
upload
=
"beforeAvatarUpload"
:
http
-
request
=
"uploadImage"
>
<
img
v
-
if
=
"form.photoUrl"
:
src
=
"baseUrl + form.photoUrl"
style
=
"max-width: 100%; max-height: 100%"
class
=
"avatar"
alt
=
""
/>
<
i
v
-
else
class
=
"el-icon-plus avatar-uploader-icon"
><
/i
>
<
/el-upload
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -185,12 +187,15 @@
<
script
>
// import
{
listHonors
,
getHonors
,
delHonors
,
addHonors
,
updateHonors
}
from
"@/api/system/honors"
;
import
{
uploadImage
as
commonUpload
}
from
"@/api/common"
;
export
default
{
name
:
"Honors"
,
dicts
:
[
"teaching_subjects"
,
'award_categories'
,
'awards_level'
,
'award_rank'
],
data
()
{
return
{
// 图片上传遮罩层
uploadLoading
:
false
,
baseUrl
:
[
process
.
env
.
VUE_APP_BASE_API
],
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -303,6 +308,45 @@ export default {
handleExamine
()
{
}
,
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
photoUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
}
,
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
}
,
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
this
.
uploadLoading
=
true
;
commonUpload
(
formData
)
.
then
((
response
)
=>
{
this
.
uploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
photoUrl
=
this
.
pev
+
response
.
url
;
this
.
form
.
photoUrl
=
response
.
url
;
}
)
.
catch
((
error
)
=>
{
this
.
uploadLoading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/essaysWritings/index.vue
View file @
0ca51a08
...
...
@@ -170,9 +170,17 @@
<
el
-
input
v
-
model
=
"form.remark"
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"pictureName"
>
<
el
-
input
v
-
model
=
"form.pictureName"
placeholder
=
"请输入证书图片名称"
/>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
class
=
"custom-margin"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"photo"
>
<
el
-
upload
v
-
loading
=
"uploadLoading"
class
=
"avatar-uploader"
action
=
"#"
accept
=
"image/*"
:
show
-
file
-
list
=
"false"
:
on
-
success
=
"handleAvatarSuccess"
:
before
-
upload
=
"beforeAvatarUpload"
:
http
-
request
=
"uploadImage"
>
<
img
v
-
if
=
"form.photoUrl"
:
src
=
"baseUrl + form.photoUrl"
style
=
"max-width: 100%; max-height: 100%"
class
=
"avatar"
alt
=
""
/>
<
i
v
-
else
class
=
"el-icon-plus avatar-uploader-icon"
><
/i
>
<
/el-upload
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -187,7 +195,7 @@
<
script
>
// import
{
listWorks
,
getWorks
,
delWorks
,
addWorks
,
updateWorks
}
from
"@/api/system/works"
;
import
{
uploadImage
as
commonUpload
}
from
"@/api/common"
;
export
default
{
name
:
"Works"
,
dicts
:
[
"teaching_subjects"
,
'award_categories'
,
'awards_level'
,
'award_rank'
],
...
...
@@ -205,6 +213,8 @@ export default {
showSearch
:
true
,
// 总条数
total
:
0
,
// 图片上传遮罩层
uploadLoading
:
false
,
// 论文著作表格数据
worksList
:
[{
id
:
1
,
...
...
@@ -246,6 +256,8 @@ export default {
pictureName
:
null
,
pictureUrl
:
null
,
}
,
baseUrl
:
[
process
.
env
.
VUE_APP_BASE_API
],
uploadFileLoading
:
false
,
// 表单参数
form
:
{
}
,
// 表单校验
...
...
@@ -310,6 +322,45 @@ export default {
this
.
open
=
false
;
this
.
reset
();
}
,
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
photoUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
}
,
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
}
,
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
this
.
uploadLoading
=
true
;
commonUpload
(
formData
)
.
then
((
response
)
=>
{
this
.
uploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
photoUrl
=
this
.
pev
+
response
.
url
;
this
.
form
.
photoUrl
=
response
.
url
;
}
)
.
catch
((
error
)
=>
{
this
.
uploadLoading
=
false
;
}
);
}
,
// 表单重置
reset
()
{
this
.
form
=
{
...
...
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/lectureAwards/index.vue
View file @
0ca51a08
...
...
@@ -10,7 +10,7 @@
</el-form-item>
<el-form-item
label=
"获奖类别"
prop=
"awardType"
>
<el-select
v-model=
"form.awardType"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award_categories"
:key=
"dict.value"
:label=
"dict.label"
<el-option
v-for=
"dict in dict.type.award_categories
jk
"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
...
...
@@ -110,8 +110,8 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"获奖类别"
prop
=
"awardType"
>
<
el
-
select
v
-
model
=
"form.awardType"
placeholder
=
"请选择"
style
=
"width: 100%;"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories
"
:
key
=
"dict.value"
:
label
=
"dict.label
"
:
value
=
"dict.value"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories
jk"
:
key
=
"dict.value
"
:
label
=
"dict.label"
:
value
=
"dict.value"
>
<
/el-option
>
<
/el-select
>
<
/el-form-item
>
...
...
@@ -171,9 +171,17 @@
<
el
-
input
v
-
model
=
"form.remark"
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"pictureName"
>
<
el
-
input
v
-
model
=
"form.pictureName"
placeholder
=
"请输入证书图片名称"
/>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
class
=
"custom-margin"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"photo"
>
<
el
-
upload
v
-
loading
=
"uploadLoading"
class
=
"avatar-uploader"
action
=
"#"
accept
=
"image/*"
:
show
-
file
-
list
=
"false"
:
on
-
success
=
"handleAvatarSuccess"
:
before
-
upload
=
"beforeAvatarUpload"
:
http
-
request
=
"uploadImage"
>
<
img
v
-
if
=
"form.photoUrl"
:
src
=
"baseUrl + form.photoUrl"
style
=
"max-width: 100%; max-height: 100%"
class
=
"avatar"
alt
=
""
/>
<
i
v
-
else
class
=
"el-icon-plus avatar-uploader-icon"
><
/i
>
<
/el-upload
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -188,12 +196,15 @@
<
script
>
// import
{
listAwards
,
getAwards
,
delAwards
,
addAwards
,
updateAwards
}
from
"@/api/system/awards"
;
import
{
uploadImage
as
commonUpload
}
from
"@/api/common"
;
export
default
{
name
:
"Awards"
,
dicts
:
[
"teaching_subjects"
,
'award_categories'
,
'awards_level'
,
'award_rank'
],
dicts
:
[
"teaching_subjects"
,
'award_categories
jk
'
,
'awards_level'
,
'award_rank'
],
data
()
{
return
{
// 图片上传遮罩层
uploadLoading
:
false
,
baseUrl
:
[
process
.
env
.
VUE_APP_BASE_API
],
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -295,6 +306,7 @@ export default {
// this.getList();
}
,
methods
:
{
/** 查询讲课获奖列表 */
getList
()
{
this
.
loading
=
true
;
...
...
@@ -304,6 +316,45 @@ export default {
this
.
loading
=
false
;
}
);
}
,
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
photoUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
}
,
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
}
,
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
this
.
uploadLoading
=
true
;
commonUpload
(
formData
)
.
then
((
response
)
=>
{
this
.
uploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
photoUrl
=
this
.
pev
+
response
.
url
;
this
.
form
.
photoUrl
=
response
.
url
;
}
)
.
catch
((
error
)
=>
{
this
.
uploadLoading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/teacherAwards/index.vue
View file @
0ca51a08
...
...
@@ -8,16 +8,16 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"获奖
类别"
prop=
"awardType
"
>
<el-select
v-model=
"form.award
Type
"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award
_categories
"
:key=
"dict.value"
:label=
"dict.label"
<el-form-item
label=
"获奖
级别"
prop=
"awardRank
"
>
<el-select
v-model=
"form.award
Rank
"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award
s_level
"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"获奖
级别"
prop=
"awardRank
"
>
<el-select
v-model=
"form.award
Rank
"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award
s_level
"
:key=
"dict.value"
:label=
"dict.label"
<el-form-item
label=
"获奖
类别"
prop=
"awardType
"
>
<el-select
v-model=
"form.award
Type
"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award
_categoriesjs
"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
...
...
@@ -69,7 +69,7 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"成长类型"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"学科"
align=
"center"
prop=
"sub"
/>
<el-table-column
label=
"获奖类
型
"
align=
"center"
prop=
"awardType"
/>
<el-table-column
label=
"获奖类
别
"
align=
"center"
prop=
"awardType"
/>
<el-table-column
label=
"获奖等级"
align=
"center"
prop=
"awardLevel"
/>
<el-table-column
label=
"获奖级别"
align=
"center"
prop=
"awardRank"
/>
<el-table-column
label=
"教学获奖-成果名称"
align=
"center"
prop=
"resultName"
/>
...
...
@@ -111,8 +111,8 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"获奖类别"
prop
=
"awardType"
>
<
el
-
select
v
-
model
=
"form.awardType"
placeholder
=
"请选择"
style
=
"width: 100%;"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories
"
:
key
=
"dict.value"
:
label
=
"dict.label
"
:
value
=
"dict.value"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories
js"
:
key
=
"dict.value
"
:
label
=
"dict.label"
:
value
=
"dict.value"
>
<
/el-option
>
<
/el-select
>
<
/el-form-item
>
...
...
@@ -170,9 +170,17 @@
<
el
-
input
v
-
model
=
"form.remark"
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"pictureName"
>
<
el
-
input
v
-
model
=
"form.pictureName"
placeholder
=
"请输入证书图片名称"
/>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
class
=
"custom-margin"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"photo"
>
<
el
-
upload
v
-
loading
=
"uploadLoading"
class
=
"avatar-uploader"
action
=
"#"
accept
=
"image/*"
:
show
-
file
-
list
=
"false"
:
on
-
success
=
"handleAvatarSuccess"
:
before
-
upload
=
"beforeAvatarUpload"
:
http
-
request
=
"uploadImage"
>
<
img
v
-
if
=
"form.photoUrl"
:
src
=
"baseUrl + form.photoUrl"
style
=
"max-width: 100%; max-height: 100%"
class
=
"avatar"
alt
=
""
/>
<
i
v
-
else
class
=
"el-icon-plus avatar-uploader-icon"
><
/i
>
<
/el-upload
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -187,12 +195,15 @@
<
script
>
// import
{
listAwards
,
getAwards
,
delAwards
,
addAwards
,
updateAwards
}
from
"@/api/system/awards"
;
import
{
uploadImage
as
commonUpload
}
from
"@/api/common"
;
export
default
{
name
:
"Awards"
,
dicts
:
[
"teaching_subjects"
,
'award_categories'
,
'awards_level'
,
'award_rank'
],
dicts
:
[
"teaching_subjects"
,
'award_categories
js
'
,
'awards_level'
,
'award_rank'
],
data
()
{
return
{
// 图片上传遮罩层
uploadLoading
:
false
,
baseUrl
:
[
process
.
env
.
VUE_APP_BASE_API
],
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -302,6 +313,45 @@ export default {
this
.
loading
=
false
;
}
);
}
,
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
photoUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
}
,
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
}
,
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
this
.
uploadLoading
=
true
;
commonUpload
(
formData
)
.
then
((
response
)
=>
{
this
.
uploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
photoUrl
=
this
.
pev
+
response
.
url
;
this
.
form
.
photoUrl
=
response
.
url
;
}
)
.
catch
((
error
)
=>
{
this
.
uploadLoading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
ruoyi-ui/src/views/smartSchool/electronicArchives/professionalDevelopment/teachingAchievements/index.vue
View file @
0ca51a08
...
...
@@ -277,7 +277,7 @@ export default {
// 表单校验
rules
:
{
schoolYear
:
[
{
required
:
true
,
message
:
"学年
(下拉框)
不能为空"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"学年不能为空"
,
trigger
:
"change"
}
],
semester
:
[
{
required
:
true
,
message
:
"学期不能为空"
,
trigger
:
"change"
}
...
...
@@ -289,7 +289,7 @@ export default {
{
required
:
true
,
message
:
"考试类型不能为空"
,
trigger
:
"change"
}
],
year
:
[
{
required
:
true
,
message
:
"届别
(下拉框)
不能为空"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"届别不能为空"
,
trigger
:
"change"
}
],
grade
:
[
{
required
:
true
,
message
:
"年级不能为空"
,
trigger
:
"change"
}
...
...
ruoyi-ui/src/views/smartSchool/personWork/comprehensiveHonors/index.vue
View file @
0ca51a08
...
...
@@ -2,28 +2,25 @@
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"学科"
prop=
"sub"
>
<el-select
v-model=
"
form
.teachingSubject"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-select
v-model=
"
queryParams
.teachingSubject"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.teaching_subjects"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"获奖类别"
prop=
"awardType"
>
<el-select
v-model=
"form.awardType"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award_categories"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
<el-input
v-model=
"queryParams.awardType"
placeholder=
"请输入获奖类别"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"获奖级别"
prop=
"awardRank"
>
<el-select
v-model=
"
form
.awardRank"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-select
v-model=
"
queryParams
.awardRank"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.awards_level"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"获奖等级"
prop=
"awardLevel"
>
<el-select
v-model=
"
form
.awardLevel"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-select
v-model=
"
queryParams
.awardLevel"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award_rank"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
...
...
@@ -106,11 +103,8 @@
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"获奖类别"
prop
=
"awardType"
>
<
el
-
select
v
-
model
=
"form.awardType"
placeholder
=
"请选择"
style
=
"width: 100%;"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories"
:
key
=
"dict.value"
:
label
=
"dict.label"
:
value
=
"dict.value"
>
<
/el-option
>
<
/el-select
>
<
el
-
input
v
-
model
=
"queryParams.awardType"
placeholder
=
"请输入获奖类别"
clearable
@
keyup
.
enter
.
native
=
"handleQuery"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -166,9 +160,17 @@
<
el
-
input
v
-
model
=
"form.remark"
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"pictureName"
>
<
el
-
input
v
-
model
=
"form.pictureName"
placeholder
=
"请输入证书图片名称"
/>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
class
=
"custom-margin"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"photo"
>
<
el
-
upload
v
-
loading
=
"uploadLoading"
class
=
"avatar-uploader"
action
=
"#"
accept
=
"image/*"
:
show
-
file
-
list
=
"false"
:
on
-
success
=
"handleAvatarSuccess"
:
before
-
upload
=
"beforeAvatarUpload"
:
http
-
request
=
"uploadImage"
>
<
img
v
-
if
=
"form.photoUrl"
:
src
=
"baseUrl + form.photoUrl"
style
=
"max-width: 100%; max-height: 100%"
class
=
"avatar"
alt
=
""
/>
<
i
v
-
else
class
=
"el-icon-plus avatar-uploader-icon"
><
/i
>
<
/el-upload
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -183,12 +185,15 @@
<
script
>
// import
{
listHonors
,
getHonors
,
delHonors
,
addHonors
,
updateHonors
}
from
"@/api/system/honors"
;
import
{
uploadImage
as
commonUpload
}
from
"@/api/common"
;
export
default
{
name
:
"Honors"
,
dicts
:
[
"teaching_subjects"
,
'award_categories'
,
'awards_level'
,
'award_rank'
],
data
()
{
return
{
// 图片上传遮罩层
uploadLoading
:
false
,
baseUrl
:
[
process
.
env
.
VUE_APP_BASE_API
],
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -301,6 +306,45 @@ export default {
handleExamine
()
{
}
,
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
photoUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
}
,
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
}
,
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
this
.
uploadLoading
=
true
;
commonUpload
(
formData
)
.
then
((
response
)
=>
{
this
.
uploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
photoUrl
=
this
.
pev
+
response
.
url
;
this
.
form
.
photoUrl
=
response
.
url
;
}
)
.
catch
((
error
)
=>
{
this
.
uploadLoading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
ruoyi-ui/src/views/smartSchool/personWork/essaysWritings/index.vue
View file @
0ca51a08
...
...
@@ -168,9 +168,17 @@
<
el
-
input
v
-
model
=
"form.remark"
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"pictureName"
>
<
el
-
input
v
-
model
=
"form.pictureName"
placeholder
=
"请输入证书图片名称"
/>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
class
=
"custom-margin"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"photo"
>
<
el
-
upload
v
-
loading
=
"uploadLoading"
class
=
"avatar-uploader"
action
=
"#"
accept
=
"image/*"
:
show
-
file
-
list
=
"false"
:
on
-
success
=
"handleAvatarSuccess"
:
before
-
upload
=
"beforeAvatarUpload"
:
http
-
request
=
"uploadImage"
>
<
img
v
-
if
=
"form.photoUrl"
:
src
=
"baseUrl + form.photoUrl"
style
=
"max-width: 100%; max-height: 100%"
class
=
"avatar"
alt
=
""
/>
<
i
v
-
else
class
=
"el-icon-plus avatar-uploader-icon"
><
/i
>
<
/el-upload
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -185,7 +193,7 @@
<
script
>
// import
{
listWorks
,
getWorks
,
delWorks
,
addWorks
,
updateWorks
}
from
"@/api/system/works"
;
import
{
uploadImage
as
commonUpload
}
from
"@/api/common"
;
export
default
{
name
:
"Works"
,
dicts
:
[
"teaching_subjects"
,
'award_categories'
,
'awards_level'
,
'award_rank'
],
...
...
@@ -203,6 +211,8 @@ export default {
showSearch
:
true
,
// 总条数
total
:
0
,
// 图片上传遮罩层
uploadLoading
:
false
,
// 论文著作表格数据
worksList
:
[{
id
:
1
,
...
...
@@ -244,6 +254,8 @@ export default {
pictureName
:
null
,
pictureUrl
:
null
,
}
,
baseUrl
:
[
process
.
env
.
VUE_APP_BASE_API
],
uploadFileLoading
:
false
,
// 表单参数
form
:
{
}
,
// 表单校验
...
...
@@ -308,6 +320,45 @@ export default {
this
.
open
=
false
;
this
.
reset
();
}
,
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
photoUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
}
,
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
}
,
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
this
.
uploadLoading
=
true
;
commonUpload
(
formData
)
.
then
((
response
)
=>
{
this
.
uploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
photoUrl
=
this
.
pev
+
response
.
url
;
this
.
form
.
photoUrl
=
response
.
url
;
}
)
.
catch
((
error
)
=>
{
this
.
uploadLoading
=
false
;
}
);
}
,
// 表单重置
reset
()
{
this
.
form
=
{
...
...
ruoyi-ui/src/views/smartSchool/personWork/lectureAwards/index.vue
View file @
0ca51a08
...
...
@@ -10,7 +10,7 @@
</el-form-item>
<el-form-item
label=
"获奖类别"
prop=
"awardType"
>
<el-select
v-model=
"form.awardType"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award_categories"
:key=
"dict.value"
:label=
"dict.label"
<el-option
v-for=
"dict in dict.type.award_categories
jk
"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
...
...
@@ -108,8 +108,8 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"获奖类别"
prop
=
"awardType"
>
<
el
-
select
v
-
model
=
"form.awardType"
placeholder
=
"请选择"
style
=
"width: 100%;"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories
"
:
key
=
"dict.value"
:
label
=
"dict.label
"
:
value
=
"dict.value"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories
jk"
:
key
=
"dict.value
"
:
label
=
"dict.label"
:
value
=
"dict.value"
>
<
/el-option
>
<
/el-select
>
<
/el-form-item
>
...
...
@@ -169,9 +169,17 @@
<
el
-
input
v
-
model
=
"form.remark"
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"pictureName"
>
<
el
-
input
v
-
model
=
"form.pictureName"
placeholder
=
"请输入证书图片名称"
/>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
class
=
"custom-margin"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"photo"
>
<
el
-
upload
v
-
loading
=
"uploadLoading"
class
=
"avatar-uploader"
action
=
"#"
accept
=
"image/*"
:
show
-
file
-
list
=
"false"
:
on
-
success
=
"handleAvatarSuccess"
:
before
-
upload
=
"beforeAvatarUpload"
:
http
-
request
=
"uploadImage"
>
<
img
v
-
if
=
"form.photoUrl"
:
src
=
"baseUrl + form.photoUrl"
style
=
"max-width: 100%; max-height: 100%"
class
=
"avatar"
alt
=
""
/>
<
i
v
-
else
class
=
"el-icon-plus avatar-uploader-icon"
><
/i
>
<
/el-upload
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -186,12 +194,15 @@
<
script
>
// import
{
listAwards
,
getAwards
,
delAwards
,
addAwards
,
updateAwards
}
from
"@/api/system/awards"
;
import
{
uploadImage
as
commonUpload
}
from
"@/api/common"
;
export
default
{
name
:
"Awards"
,
dicts
:
[
"teaching_subjects"
,
'award_categories'
,
'awards_level'
,
'award_rank'
],
dicts
:
[
"teaching_subjects"
,
'award_categories
jk
'
,
'awards_level'
,
'award_rank'
],
data
()
{
return
{
// 图片上传遮罩层
uploadLoading
:
false
,
baseUrl
:
[
process
.
env
.
VUE_APP_BASE_API
],
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -293,6 +304,7 @@ export default {
// this.getList();
}
,
methods
:
{
/** 查询讲课获奖列表 */
getList
()
{
this
.
loading
=
true
;
...
...
@@ -302,6 +314,45 @@ export default {
this
.
loading
=
false
;
}
);
}
,
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
photoUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
}
,
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
}
,
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
this
.
uploadLoading
=
true
;
commonUpload
(
formData
)
.
then
((
response
)
=>
{
this
.
uploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
photoUrl
=
this
.
pev
+
response
.
url
;
this
.
form
.
photoUrl
=
response
.
url
;
}
)
.
catch
((
error
)
=>
{
this
.
uploadLoading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
ruoyi-ui/src/views/smartSchool/personWork/teacherAwards/index.vue
View file @
0ca51a08
...
...
@@ -8,16 +8,16 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"获奖
类别"
prop=
"awardType
"
>
<el-select
v-model=
"form.award
Type
"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award
_categories
"
:key=
"dict.value"
:label=
"dict.label"
<el-form-item
label=
"获奖
级别"
prop=
"awardRank
"
>
<el-select
v-model=
"form.award
Rank
"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award
s_level
"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"获奖
级别"
prop=
"awardRank
"
>
<el-select
v-model=
"form.award
Rank
"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award
s_level
"
:key=
"dict.value"
:label=
"dict.label"
<el-form-item
label=
"获奖
类别"
prop=
"awardType
"
>
<el-select
v-model=
"form.award
Type
"
placeholder=
"请选择"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.award
_categoriesjs
"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
>
</el-option>
</el-select>
...
...
@@ -69,7 +69,7 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"成长类型"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"学科"
align=
"center"
prop=
"sub"
/>
<el-table-column
label=
"获奖类
型
"
align=
"center"
prop=
"awardType"
/>
<el-table-column
label=
"获奖类
别
"
align=
"center"
prop=
"awardType"
/>
<el-table-column
label=
"获奖等级"
align=
"center"
prop=
"awardLevel"
/>
<el-table-column
label=
"获奖级别"
align=
"center"
prop=
"awardRank"
/>
<el-table-column
label=
"教学获奖-成果名称"
align=
"center"
prop=
"resultName"
/>
...
...
@@ -109,8 +109,8 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"获奖类别"
prop
=
"awardType"
>
<
el
-
select
v
-
model
=
"form.awardType"
placeholder
=
"请选择"
style
=
"width: 100%;"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories
"
:
key
=
"dict.value"
:
label
=
"dict.label
"
:
value
=
"dict.value"
>
<
el
-
option
v
-
for
=
"dict in dict.type.award_categories
js"
:
key
=
"dict.value
"
:
label
=
"dict.label"
:
value
=
"dict.value"
>
<
/el-option
>
<
/el-select
>
<
/el-form-item
>
...
...
@@ -168,9 +168,17 @@
<
el
-
input
v
-
model
=
"form.remark"
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"pictureName"
>
<
el
-
input
v
-
model
=
"form.pictureName"
placeholder
=
"请输入证书图片名称"
/>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
class
=
"custom-margin"
>
<
el
-
form
-
item
label
=
"证书图片"
prop
=
"photo"
>
<
el
-
upload
v
-
loading
=
"uploadLoading"
class
=
"avatar-uploader"
action
=
"#"
accept
=
"image/*"
:
show
-
file
-
list
=
"false"
:
on
-
success
=
"handleAvatarSuccess"
:
before
-
upload
=
"beforeAvatarUpload"
:
http
-
request
=
"uploadImage"
>
<
img
v
-
if
=
"form.photoUrl"
:
src
=
"baseUrl + form.photoUrl"
style
=
"max-width: 100%; max-height: 100%"
class
=
"avatar"
alt
=
""
/>
<
i
v
-
else
class
=
"el-icon-plus avatar-uploader-icon"
><
/i
>
<
/el-upload
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
...
...
@@ -185,12 +193,15 @@
<
script
>
// import
{
listAwards
,
getAwards
,
delAwards
,
addAwards
,
updateAwards
}
from
"@/api/system/awards"
;
import
{
uploadImage
as
commonUpload
}
from
"@/api/common"
;
export
default
{
name
:
"Awards"
,
dicts
:
[
"teaching_subjects"
,
'award_categories'
,
'awards_level'
,
'award_rank'
],
dicts
:
[
"teaching_subjects"
,
'award_categories
js
'
,
'awards_level'
,
'award_rank'
],
data
()
{
return
{
// 图片上传遮罩层
uploadLoading
:
false
,
baseUrl
:
[
process
.
env
.
VUE_APP_BASE_API
],
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -300,6 +311,45 @@ export default {
this
.
loading
=
false
;
}
);
}
,
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
photoUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
}
,
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
}
,
// 上传图片
uploadImage
(
file
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
this
.
uploadLoading
=
true
;
commonUpload
(
formData
)
.
then
((
response
)
=>
{
this
.
uploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
photoUrl
=
this
.
pev
+
response
.
url
;
this
.
form
.
photoUrl
=
response
.
url
;
}
)
.
catch
((
error
)
=>
{
this
.
uploadLoading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
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