Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
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
徐俊
yn-science-front
Commits
a9821b36
Commit
a9821b36
authored
Dec 12, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
44444
parent
5dfe35f7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
110 additions
and
90 deletions
+110
-90
expertTemplate.xlsx
public/downloadFile/expertTemplate.xlsx
+0
-0
LayoutHeader.vue
src/components/layout/LayoutHeader.vue
+11
-1
unitSelect.vue
src/views/components/common/unitSelect.vue
+6
-0
expertEdit.vue
src/views/expert/components/expertEdit.vue
+15
-18
expertImport.vue
src/views/expert/components/expertImport.vue
+75
-41
expertEdit.vue
src/views/report/expert/components/expertEdit.vue
+2
-26
memberImport.vue
src/views/report/project/components/memberImport.vue
+1
-4
No files found.
public/downloadFile/expertTemplate.xlsx
0 → 100644
View file @
a9821b36
File added
src/components/layout/LayoutHeader.vue
View file @
a9821b36
...
...
@@ -8,7 +8,7 @@
</div>
<div
class=
"header_btn"
>
<div
class=
"toolbar-items"
>
<a-dropdown
style=
"margin-right:
5
px;"
:trigger=
"['click','hover']"
>
<a-dropdown
style=
"margin-right:
2
px;"
:trigger=
"['click','hover']"
>
<a
class=
"ant-dropdown-link"
>
<a-avatar
class=
"ava-img"
src=
"https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"
/>
<span
class=
"title_f"
v-if=
"userInfo.unitName"
>
{{
userInfo
.
unitName
}}
</span>
...
...
@@ -45,6 +45,16 @@
</a-menu>
</a-dropdown>
</div>
<div
class=
"toolbar-items"
>
<a
href=
"javascript:;"
@
click=
"logout"
>
<div
style=
"padding: 2px 30px 2px 6px;color: rgb(89 89 89);"
>
<span>
<a-icon
type=
"poweroff"
style=
"margin-right: 4px"
/>
</span>
<span>
退出
</span>
</div>
</a>
</div>
<div
class=
"toolbar-items"
v-if=
"false"
>
<a-dropdown
style=
"margin-right: 5px;"
:trigger=
"['click','hover']"
>
<a
class=
"ant-dropdown-link"
>
...
...
src/views/components/common/unitSelect.vue
View file @
a9821b36
...
...
@@ -89,6 +89,12 @@ export default {
handleChange
(
value
)
{
this
.
selected
=
value
;
this
.
$emit
(
"input"
,
value
);
var
newArr
=
this
.
data
.
filter
(
x
=>
x
.
key
==
value
);
if
(
!!
newArr
&&
newArr
.
length
>
0
)
{
var
text
=
!!
value
?
newArr
[
0
].
title
:
''
this
.
$emit
(
'changeTitle'
,
text
)
}
this
.
$emit
(
"change"
);
},
loadSelected
(
value
)
{
...
...
src/views/expert/components/expertEdit.vue
View file @
a9821b36
...
...
@@ -23,18 +23,24 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row
v-if=
"isShow"
>
<a-col
:span=
"4"
class=
"bg-gray"
>
<div>
选择单位
</div>
</a-col>
<a-col
:span=
"20"
>
<a-form-model-item
ref=
"treeCode"
prop=
"treeCode"
>
<unit-tree-select
v-model=
"formData.treeCode"
:disable=
"false"
:unitType=
"2"
:width=
"200"
/>
<span
style=
"color: green;margin-left: 6px;"
>
※系统中单位选择此项
</span>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"4"
class=
"bg-gray"
>
<div
class=
"required"
>
性别
</div>
<div
>
工作单位
</div>
</a-col>
<a-col
:span=
"20"
>
<a-form-model-item
ref=
"sex"
prop=
"sex"
>
<a-select
v-model=
"formData.sex"
style=
"width: 130px"
:disabled=
"!!formData.id"
>
<a-select-option
value=
""
>
--请选择性别--
</a-select-option>
<a-select-option
value=
"男"
>
男
</a-select-option>
<a-select-option
value=
"女"
>
女
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item
ref=
"workUnit"
prop=
"workUnit"
>
<a-input
v-model=
"formData.workUnit"
@
blur=
"() =>
{$refs.workUnit.onFieldBlur(); }" style="width: 200px" />
<span
style=
"color: green;margin-left: 6px;"
>
※非系统中单位填写此项
</span>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
...
...
@@ -68,16 +74,6 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row
v-if=
"isShow"
>
<a-col
:span=
"4"
class=
"bg-gray"
>
<div
class=
"required"
>
工作单位
</div>
</a-col>
<a-col
:span=
"20"
>
<a-form-model-item
ref=
"treeCode"
prop=
"treeCode"
>
<unit-tree-select
v-model=
"formData.treeCode"
:disable=
"false"
:unitType=
"2"
:width=
"300"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"4"
class=
"bg-gray"
style=
"padding-left:16px"
>
<div>
邮箱
</div>
...
...
@@ -161,6 +157,7 @@ export default {
{
required
:
false
,
validator
:
checkEmail
,
trigger
:
'blur'
}
],
personName
:
[{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
}],
workUnit
:
[{
required
:
false
,
message
:
'请输入工作单位'
,
trigger
:
'blur'
}],
sex
:
[{
required
:
true
,
message
:
'请选择性别'
,
trigger
:
'change'
}],
auditSpecList
:
[{
required
:
true
,
message
:
'请选择评审专业'
,
trigger
:
'change'
}],
title
:
[{
required
:
true
,
message
:
'请选择职称'
,
trigger
:
'change'
}],
...
...
src/views/expert/components/expertImport.vue
View file @
a9821b36
<
template
>
<div
class=
"app-content"
style=
"height:75vh;overflow: auto;"
>
<div
class=
"submit-btn upload-header"
>
<a
:href=
"url.downloadUrl"
download=
"ExpertInfo.xlsx"
>
<a-icon
type=
"download"
></a-icon>
<span
style=
"color:green;text-decoration:underline;"
>
模板下载
</span>
</a>
<FileUpload
@
beforeUpload=
"beforeUpload"
/>
<a-divider
style=
"height: 1px; background-color: #e8e8e8;"
/>
</div>
<a-divider
style=
"height: 1px; background-color: #e8e8e8;"
/>
<div
class=
"upload-table"
>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
rowKey=
"index"
:pagination=
"false"
:loading=
"loading"
>
<template
slot=
"stateSwitch"
slot-scope=
"record"
>
<a-switch
checked-children=
"正常"
un-checked-children=
"注销"
:checked=
"checkedState(record)"
@
change=
"switchChange($event, record)"
/>
</
template
>
<
template
slot=
"option"
slot-scope=
"record"
>
<a-button
type=
"primary"
size=
"small"
@
click=
"recordClick(record, 'view')"
>
查看
</a-button>
<a-button
type=
"primary"
size=
"small"
@
click=
"recordClick(record, 'edit')"
>
修改
</a-button>
<a-button
type=
"primary"
size=
"small"
@
click=
"recordClick(record, 'reset')"
>
重置密码
</a-button>
</
template
>
</a-table>
</div>
<div
class=
"upload-bottom"
style=
"text-align:center;padding:6px 0"
>
<a-button
type=
"primary"
@
click=
"dataImport"
:disabled=
"disabled"
>
导入
</a-button>
</div>
<a-spin
:spinning=
"loading"
style=
"width: 100%;height: 100%;"
>
<div
style=
"width:100%; height: 40px;"
>
<up-load
@
beforeUpload=
"beforeUpload"
:format=
"['xls', 'xlsx']"
/>
</div>
<div
style=
"width:100%;height: calc(100% - 80px);overflow: auto;"
>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
rowKey=
"index"
:pagination=
"false"
:loading=
"loading"
>
<template
slot=
"msg"
slot-scope=
"record"
>
<span
v-if=
"!!record.msg "
style=
"color: red;"
>
{{
record
.
msg
}}
</span>
</
template
>
<
template
slot=
"stateSwitch"
slot-scope=
"record"
>
<a-switch
checked-children=
"正常"
un-checked-children=
"注销"
:checked=
"checkedState(record)"
@
change=
"switchChange($event, record)"
/>
</
template
>
<
template
slot=
"option"
slot-scope=
"record"
>
<a-button
type=
"primary"
size=
"small"
@
click=
"recordClick(record, 'view')"
>
查看
</a-button>
<a-button
type=
"primary"
size=
"small"
@
click=
"recordClick(record, 'edit')"
>
修改
</a-button>
<a-button
type=
"primary"
size=
"small"
@
click=
"recordClick(record, 'reset')"
>
重置密码
</a-button>
</
template
>
</a-table>
</div>
<div
style=
"text-align:center;width:100%; height: 36px;"
>
<a
:href=
"url"
download=
"expertTemplate.xlsx"
style=
"margin-right: 30px;"
>
<a-icon
type=
"download"
></a-icon>
<span
style=
"color:green;text-decoration:underline;"
>
模板下载
</span>
</a>
<a-button
type=
"primary"
@
click=
"dataImport"
:disabled=
"disabled"
>
导入
</a-button>
</div>
</a-spin>
</div>
</template>
<
script
>
import
{
isEmptyParams
,
readExcelFile
,
personGender
,
personBirthday
,
checkIdentitytionId
,
checkEmail
,
checkPhone
}
from
"@/views/utils/common"
import
moment
from
"moment"
import
{
checkCertId
}
from
"@/views/utils/validate"
export
default
{
name
:
"expertImport"
,
...
...
@@ -42,13 +48,15 @@ export default {
{
title
:
"邮箱"
,
dataIndex
:
"email"
,
align
:
'center'
},
{
title
:
"职称"
,
dataIndex
:
"titleName"
,
align
:
'center'
},
{
title
:
"专业"
,
dataIndex
:
"specName"
,
align
:
'center'
},
{
title
:
'单位'
,
dataIndex
:
'unitName'
,
align
:
'center'
},
{
title
:
'工作单位'
,
dataIndex
:
'unitName'
,
align
:
'center'
},
{
title
:
'验证结果'
,
scopedSlots
:
{
customRender
:
'msg'
},
align
:
'center'
},
],
tableData
:
[],
disabled
:
true
,
errorState
:
false
,
loading
:
false
,
url
:
{
downloadUrl
:
'/downloadFile/
ExpertInfo
.xlsx'
,
downloadUrl
:
'/downloadFile/
expertTemplate
.xlsx'
,
}
};
},
...
...
@@ -57,6 +65,7 @@ export default {
},
methods
:
{
beforeUpload
(
file
)
{
this
.
errorState
=
false
this
.
tableData
=
[]
let
list
=
readExcelFile
(
file
,
0
)
let
certList
=
[]
...
...
@@ -66,9 +75,42 @@ export default {
list
.
then
((
d
)
=>
{
//读取文件数据
d
.
forEach
(
e
=>
{
let
gender
=
personGender
(
e
.
证件号
)
let
birthday
=
personBirthday
(
e
.
证件号
)
+
' 00:00:00'
let
expert
=
{
personName
:
e
.
姓名
,
certId
:
e
.
证件号
,
sex
:
gender
,
birthday
:
moment
(
birthday
).
format
(
'YYYY-MM-DD HH:mm:ss'
),
mobile
:
e
.
手机号
,
email
:
e
.
邮箱
,
specName
:
e
.
专业
,
titleName
:
e
.
职称
,
unitName
:
e
.
单位
}
let
msg
=
''
let
certId
=
e
.
证件号
let
gender
=
null
let
birthday
=
null
if
(
!!!
e
.
姓名
)
{
msg
=
';姓名不能为空!'
}
if
(
!!!
e
.
证件号
)
{
msg
+=
';证件号不能为空!'
}
if
(
!!!
e
.
手机号
)
{
msg
+=
';手机号不能为空!'
}
if
(
!!!
e
.
邮箱
)
{
msg
+=
';邮箱不能为空!'
}
if
(
!!!
e
.
专业
)
{
msg
+=
';专业不能为空!'
}
if
(
!!!
e
.
职称
)
{
msg
+=
';职称不能为空!'
}
if
(
!!!
e
.
工作单位
)
{
msg
+=
';工作单位不能为空!'
}
if
(
!!
msg
)
{
this
.
errorState
=
true
}
if
(
checkCertId
(
certId
))
{
gender
=
personGender
(
certId
)
birthday
=
personBirthday
(
certId
)
+
' 00:00:00'
}
let
expert
=
{
personName
:
e
.
姓名
,
certId
:
certId
,
sex
:
gender
,
birthday
:
birthday
,
mobile
:
e
.
手机号
,
email
:
e
.
邮箱
,
specName
:
e
.
专业
,
titleName
:
e
.
职称
,
unitName
:
e
.
工作单位
,
msg
:
msg
}
exportList
.
push
(
expert
)
certList
.
push
(
e
.
证件号
)
mobileList
.
push
(
e
.
手机号
)
...
...
@@ -85,13 +127,12 @@ export default {
this
.
$message
.
error
(
'证件号出现重复!'
)
return
false
}
if
(
exportList
.
length
>
0
)
{
this
.
tableData
=
exportList
this
.
disabled
=
false
this
.
disabled
=
this
.
errorState
?
true
:
false
}
})
return
false
},
dataImport
()
{
...
...
@@ -112,16 +153,9 @@ export default {
};
</
script
>
<
style
scoped
lang=
"less"
>
.upload-header {
height: 30px;
}
.upload-table {
min-height: 150px;
max-height: calc(100% - 75px);
overflow-y: auto;
}
.upload-bottom {
height: 42px;
::v-deep .ant-spin-container {
width: 100%;
height: 100%;
}
</
style
>
src/views/report/expert/components/expertEdit.vue
View file @
a9821b36
...
...
@@ -23,20 +23,6 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"4"
class=
"bg-gray"
>
<div
class=
"required"
>
性别
</div>
</a-col>
<a-col
:span=
"20"
>
<a-form-model-item
ref=
"sex"
prop=
"sex"
>
<a-select
v-model=
"formData.sex"
style=
"width: 130px"
:disabled=
"!!formData.id"
>
<a-select-option
value=
""
>
--请选择性别--
</a-select-option>
<a-select-option
value=
"男"
>
男
</a-select-option>
<a-select-option
value=
"女"
>
女
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"4"
class=
"bg-gray"
>
<div
class=
"required"
>
手机号
</div>
...
...
@@ -68,16 +54,6 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row
v-if=
"isShow"
>
<a-col
:span=
"4"
class=
"bg-gray"
>
<div
class=
"required"
>
工作单位
</div>
</a-col>
<a-col
:span=
"20"
>
<a-form-model-item
ref=
"treeCode"
prop=
"treeCode"
>
<unit-tree-select
v-model=
"formData.treeCode"
:disable=
"false"
:unitType=
"2"
:width=
"300"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"4"
class=
"bg-gray"
style=
"padding-left:16px"
>
<div>
邮箱
</div>
...
...
@@ -161,10 +137,10 @@ export default {
{
required
:
false
,
validator
:
checkEmail
,
trigger
:
'blur'
}
],
personName
:
[{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
}],
sex
:
[{
required
:
true
,
message
:
'请选择性别'
,
trigger
:
'change'
}],
//
sex: [{ required: true, message: '请选择性别', trigger: 'change' }],
auditSpecList
:
[{
required
:
true
,
message
:
'请选择评审专业'
,
trigger
:
'change'
}],
title
:
[{
required
:
true
,
message
:
'请选择职称'
,
trigger
:
'change'
}],
treeCode
:
[{
required
:
false
,
message
:
'请选择单位'
,
trigger
:
'change'
}],
//
treeCode: [{ required: false, message: '请选择单位', trigger: 'change' }],
remark
:
[{
required
:
false
,
message
:
'请输入备注'
,
trigger
:
'blur'
}],
},
}
...
...
src/views/report/project/components/memberImport.vue
View file @
a9821b36
...
...
@@ -109,10 +109,7 @@ export default {
if
(
!!!
e
.
每年工作
)
{
msg
+=
';每年工作不能为空!'
}
// if (checkCertId(certId)) {
// gender = personGender(certId)
// birthday = personBirthday(certId) + ' 00:00:00'
// }
if
(
!!
msg
)
{
this
.
errorState
=
true
}
...
...
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