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
aa137b34
Commit
aa137b34
authored
Dec 09, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
777
parent
d623f059
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
415 additions
and
234 deletions
+415
-234
index.js
src/router/index.js
+1
-1
infoEdit.vue
src/views/basicSetting/person/components/infoEdit.vue
+156
-0
index.vue
src/views/basicSetting/person/index.vue
+34
-219
info.vue
src/views/basicSetting/person/info.vue
+208
-0
Index.vue
src/views/basicSetting/unit/Index.vue
+1
-1
infoEdit.vue
src/views/basicSetting/unit/components/infoEdit.vue
+15
-13
No files found.
src/router/index.js
View file @
aa137b34
...
@@ -92,7 +92,7 @@ export const routes = [
...
@@ -92,7 +92,7 @@ export const routes = [
meta
:
{
title
:
'个人设置'
,
icon
:
'el-icon-user'
},
meta
:
{
title
:
'个人设置'
,
icon
:
'el-icon-user'
},
hidden
:
false
,
hidden
:
false
,
children
:
[
children
:
[
{
path
:
'/person/info'
,
name
:
'个人设置'
,
component
:
()
=>
import
(
'@/views/basicSetting/person/in
dex
.vue'
),
meta
:
{
title
:
'个人设置'
,
icon
:
''
,
noCache
:
true
}
},
{
path
:
'/person/info'
,
name
:
'个人设置'
,
component
:
()
=>
import
(
'@/views/basicSetting/person/in
fo
.vue'
),
meta
:
{
title
:
'个人设置'
,
icon
:
''
,
noCache
:
true
}
},
]
]
},
},
{
{
...
...
src/views/basicSetting/person/components/infoEdit.vue
0 → 100644
View file @
aa137b34
<
template
>
<div>
<a-form-model
ref=
"form"
:model=
"formData"
:rules=
"rules"
>
<a-form-model-item
label=
"姓 名"
prop=
"personName"
>
<a-input
v-model=
"formData.personName"
:maxLength=
"30"
style=
"width:180px;"
/>
</a-form-model-item>
<a-form-model-item
label=
"民 族"
prop=
"nation"
>
<para-select
v-model=
"formData.nation"
:width=
"180"
:typeId=
"11"
/>
</a-form-model-item>
<a-form-model-item
label=
"职 称"
prop=
"title"
>
<para-multi-select
:width=
"180"
v-model=
"formData.title"
:typeId=
"7"
/>
</a-form-model-item>
<a-form-model-item
label=
"专 业"
prop=
"spec"
>
<para-multi-select
:width=
"180"
v-model=
"formData.spec"
:typeId=
"57"
/>
</a-form-model-item>
<a-form-model-item
label=
"学 位"
prop=
"degree"
>
<para-select
v-model=
"formData.degree"
:width=
"180"
:typeId=
"9"
/>
</a-form-model-item>
<a-form-model-item
label=
"职 务"
prop=
"duty"
>
<a-input
v-model=
"formData.duty"
:maxLength=
"30"
style=
"width:180px;"
/>
</a-form-model-item>
<a-form-model-item
label=
"联系电话"
prop=
"telephone"
>
<a-input
v-model=
"formData.telephone"
:maxLength=
"30"
style=
"width:180px;"
/>
</a-form-model-item>
<a-form-model-item
label=
"传 真"
prop=
"fax"
>
<a-input
v-model=
"formData.fax"
:maxLength=
"30"
style=
"width:180px;"
/>
</a-form-model-item>
<a-form-model-item
label=
"邮 箱"
prop=
"email"
>
<a-input
v-model=
"formData.email"
:maxLength=
"30"
style=
"width:180px;"
/>
</a-form-model-item>
</a-form-model>
</div>
</
template
>
<
script
>
import
{
isEmptyParams
,
hideIdCard
,
hidePhone
,
checkEmail
}
from
"@/views/utils/common"
import
paraMultiSelect
from
'@/views/components/common/paraMultiSelect'
import
paraSelect
from
'@/views/components/common/paraSelect'
import
baseSelect
from
'@/views/components/common/baseSelect'
export
default
{
name
:
"infoEdit"
,
components
:
{
paraMultiSelect
,
paraSelect
,
baseSelect
},
data
()
{
return
{
rules
:
{
personName
:
[{
required
:
true
,
message
:
'*'
,
trigger
:
'blur'
},],
nation
:
[{
required
:
false
,
message
:
'*'
,
trigger
:
'change'
}],
title
:
[{
required
:
false
,
message
:
'*'
,
trigger
:
'change'
}],
spec
:
[{
required
:
false
,
message
:
'*'
,
trigger
:
'change'
}],
degree
:
[{
required
:
false
,
message
:
'*'
,
trigger
:
'change'
}],
duty
:
[{
required
:
false
,
message
:
'*'
,
trigger
:
'blur'
}],
telephone
:
[{
required
:
true
,
message
:
'*'
,
trigger
:
'blur'
},],
fax
:
[{
required
:
true
,
message
:
'*'
,
trigger
:
'blur'
},],
email
:
[{
required
:
true
,
message
:
'*'
,
trigger
:
'blur'
},],
},
}
},
props
:
{
formData
:
{
type
:
Object
,
default
:
()
=>
{
return
null
}
},
},
created
()
{
},
methods
:
{
submit
()
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$emit
(
'load'
,
true
)
let
pars
=
isEmptyParams
(
this
.
formData
)
let
par
=
{
...
pars
}
this
.
$api
.
person
.
updatePerson
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
$message
.
success
(
'修改成功!'
)
}
this
.
$emit
(
'load'
,
false
)
}).
catch
(()
=>
{
this
.
$emit
(
'load'
,
false
)
})
}
else
{
return
false
;
}
});
},
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.app-content {
padding: 10px 8px 10px 8px;
min-width: 920px;
.border-style {
border-radius: 4px;
border: 1px solid #e6ebf5;
background-color: #ffffff;
overflow: hidden;
color: #303133;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.card-left {
float: left;
width: 300px;
height: 600px;
margin-right: 6px;
.holder-photo {
margin: 20px 0px 10px 0px;
text-align: center;
}
.holder-photo > img {
width: 104px;
height: 104px;
margin-bottom: 10px;
}
.holder-info {
padding: 0px 10px 0px 10px;
.ant-row .ant-col {
padding: 3px 5px 3px 5px;
}
}
.title {
text-align: right;
}
}
.card-right {
float: left;
width: calc(100% - 320px);
min-width: 600px;
min-height: 200px;
padding: 0px 15px 15px 15px;
.ant-form-item {
margin-bottom: 0px;
}
::v-deep .ant-row {
.ant-col {
display: inline-block;
}
.ant-form-item-label {
width: 70px;
}
.ant-form-item-control-wrapper {
width: calc(100% - 70px);
}
.ant-form-explain {
margin-left: 5px;
display: inline-block;
}
}
}
}
</
style
>
\ No newline at end of file
src/views/basicSetting/person/index.vue
View file @
aa137b34
<
template
>
<
template
>
<div
class=
"app-content"
>
<div
class=
"app-content"
style=
"height:100%;overflow:auto;"
>
<div
class=
"card-left border-style"
>
<div
style=
"height: calc(100% - 32px);overflow:auto;margin-top: 16px;"
>
<div
class=
"holder-photo"
><img
alt=
""
src=
"https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png"
>
<a-spin
:spinning=
"loading"
style=
"width: 100%;height: 100%;"
>
<div
class=
"holder-name"
>
<info-edit
:formData
.
sync=
"formData"
@
load=
"onLoad"
ref=
"infoEdit"
/>
<!--
<a
title=
"修改"
style=
"text-decoration:none;"
href=
"#"
>
[修改]
</a>
-->
</div>
</div>
<div
class=
"holder-info"
>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
邮 箱
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
email
}}
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
手机号
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
mobile
}}
<!--
<a
title=
"修改"
style=
"text-decoration:none;"
href=
"#"
>
[修改]
</a>
-->
</a-col>
</a-row>
<a-divider
dashed
/>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
姓 名
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
personName
}}
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
性 别
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
sex
}}
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
生 日
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
birthday
}}
</a-col>
</a-row>
<a-row>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
<a-col
style=
"text-align: center;width:100%;"
>
证件号
<a-button
type=
"primary"
style=
"width:80px;"
@
click=
"submit"
>
保存
</a-button>
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
certId
}}
</a-col>
</a-col>
</a-row>
</a-row>
</div>
</div>
<div
class=
"card-right border-style"
>
<a-spin
:spinning=
"loading"
style=
"width: 100%;height: 100%;"
>
<a-tabs
:activeKey=
"tabsActive"
@
tabClick=
"tabclick"
>
<a-tab-pane
key=
"1"
tab=
"设置"
>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"消息"
force-render
>
</a-tab-pane>
</a-tabs>
<div
v-show=
"tabsActive!='1'"
>
<a-empty
/>
</div>
<div
v-show=
"tabsActive=='1'"
>
<a-form-model
ref=
"form"
:model=
"formData"
:rules=
"rules"
>
<a-form-model-item
label=
"姓 名"
prop=
"personName"
>
<a-input
v-model=
"formData.personName"
:maxLength=
"30"
style=
"width:180px;"
/>
</a-form-model-item>
<a-form-model-item
label=
"民 族"
prop=
"nation"
>
<para-select
v-model=
"formData.nation"
:width=
"180"
:typeId=
"11"
/>
</a-form-model-item>
<a-form-model-item
label=
"学 历"
prop=
"education"
>
<para-select
v-model=
"formData.education"
:width=
"180"
:typeId=
"8"
/>
</a-form-model-item>
<a-form-model-item
label=
"职 称"
prop=
"title"
>
<para-multi-select
:width=
"180"
v-model=
"formData.title"
:typeId=
"7"
/>
</a-form-model-item>
<a-form-model-item
label=
"专 业"
prop=
"spec"
>
<para-multi-select
:width=
"180"
v-model=
"formData.spec"
:typeId=
"57"
/>
</a-form-model-item>
<a-form-model-item
label=
"邮 箱"
prop=
"email"
>
<a-input
v-model=
"formData.email"
:maxLength=
"30"
style=
"width:180px;"
/>
</a-form-model-item>
<a-row>
<a-col
style=
"text-align: center;width:100%;"
>
<a-button
type=
"primary"
style=
"width:80px;"
@
click=
"submit"
>
保存
</a-button>
</a-col>
</a-row>
</a-form-model>
</div>
</a-spin>
</a-spin>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
isEmptyParams
,
hideIdCard
,
hidePhone
,
checkEmail
}
from
"@/views/utils/common"
import
paraMultiSelect
from
'@/views/components/common/paraMultiSelect'
import
infoEdit
from
'@/views/basicSetting/person/components/infoEdit'
import
paraSelect
from
'@/views/components/common/paraSelect'
import
moment
from
'moment'
export
default
{
export
default
{
name
:
'personInfo'
,
name
:
"unitEdit"
,
components
:
{
components
:
{
paraMultiSelect
,
paraSelec
t
infoEdi
t
},
},
data
()
{
data
()
{
return
{
return
{
tabsActive
:
'1'
,
personInfo
:
{
id
:
null
,
certId
:
null
,
personName
:
null
,
sex
:
null
,
birthday
:
null
,
nation
:
null
,
title
:
null
,
education
:
null
,
spec
:
null
,
mobile
:
null
,
email
:
null
,
},
formData
:
{
formData
:
{
id
:
null
,
personName
:
null
,
nation
:
null
,
title
:
null
,
education
:
null
,
spec
:
null
,
email
:
null
,
id
:
null
,
},
personName
:
null
,
rules
:
{
nation
:
null
,
personName
:
[{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
},],
title
:
null
,
nation
:
[{
required
:
false
,
message
:
'请选择民族'
,
trigger
:
'change'
}],
spec
:
null
,
title
:
[{
required
:
false
,
message
:
'请选择职称'
,
trigger
:
'change'
}],
degree
:
null
,
education
:
[{
required
:
false
,
message
:
'请选择学历'
,
trigger
:
'change'
}],
duty
:
null
,
spec
:
[{
required
:
false
,
message
:
'请选择专业'
,
trigger
:
'change'
}],
telephone
:
null
,
email
:
[{
required
:
false
,
validator
:
checkEmail
,
trigger
:
'blur'
}],
fax
:
null
,
email
:
null
,
},
},
loading
:
false
loading
:
false
}
}
},
},
created
()
{
created
()
{
this
.
get
User
Info
()
this
.
get
CurrentUnit
Info
()
},
},
methods
:
{
methods
:
{
moment
,
getCurrentUnitInfo
()
{
tabclick
(
key
)
{
this
.
loading
=
true
this
.
tabsActive
=
key
this
.
$api
.
unit
.
getCurrentUnitInfo
().
then
(({
data
=
{}
})
=>
{
},
getUserInfo
()
{
this
.
$api
.
person
.
getUserInfo
().
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
if
(
data
)
{
this
.
personInfo
=
data
this
.
formData
=
data
this
.
personInfo
.
birthday
=
moment
(
this
.
personInfo
.
birthday
).
format
(
'YYYY-MM-DD'
)
this
.
initformData
()
}
}
}).
catch
(()
=>
{
})
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
},
submit
()
{
submit
()
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
this
.
$refs
.
infoEdit
.
submit
()
if
(
valid
)
{
this
.
loading
=
true
let
pars
=
isEmptyParams
(
this
.
formData
)
let
par
=
{
...
pars
}
this
.
$api
.
person
.
updatePerson
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
$message
.
success
(
'修改成功!'
)
this
.
getCurrentPersonInfo
()
}
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
}
else
{
return
false
;
}
});
},
},
initformData
()
{
onLoad
(
value
)
{
this
.
formData
=
{
this
.
loading
=
value
id
:
this
.
personInfo
.
id
,
personName
:
this
.
personInfo
.
personName
,
nation
:
this
.
personInfo
.
nation
,
title
:
this
.
personInfo
.
title
,
education
:
this
.
personInfo
.
education
,
spec
:
this
.
personInfo
.
spec
,
email
:
this
.
personInfo
.
email
,
}
},
},
getCurrentPersonInfo
()
{
Object
.
assign
(
this
.
personInfo
,
this
.
formData
)
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.app-content {
padding: 10px 8px 10px 8px;
min-width: 920px;
.border-style {
border-radius: 4px;
border: 1px solid #e6ebf5;
background-color: #ffffff;
overflow: hidden;
color: #303133;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.card-left {
float: left;
width: 300px;
height: 600px;
margin-right: 6px;
.holder-photo {
margin: 20px 0px 10px 0px;
text-align: center;
}
.holder-photo > img {
width: 104px;
height: 104px;
margin-bottom: 10px;
}
.holder-info {
padding: 0px 10px 0px 10px;
.ant-row .ant-col {
padding: 3px 5px 3px 5px;
}
}
.title {
text-align: right;
}
}
.card-right {
float: left;
width: calc(100% - 320px);
min-width: 600px;
min-height: 200px;
padding: 0px 15px 15px 15px;
.ant-form-item {
margin-bottom: 6px;
}
::v-deep .ant-row {
.ant-col {
display: inline-block;
}
.ant-form-item-label {
width: 70px;
}
.ant-form-item-control-wrapper {
width: calc(100% - 70px);
}
.ant-form-explain {
margin-left: 5px;
display: inline-block;
}
}
}
}
}
}
</
s
tyle
>
</
s
cript
>
\ No newline at end of file
src/views/basicSetting/person/info.vue
0 → 100644
View file @
aa137b34
<
template
>
<div
class=
"app-content"
>
<div
class=
"card-left border-style"
>
<div
class=
"holder-photo"
><img
alt=
""
src=
"https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png"
>
<div
class=
"holder-name"
>
<!--
<a
title=
"修改"
style=
"text-decoration:none;"
href=
"#"
>
[修改]
</a>
-->
</div>
</div>
<div
class=
"holder-info"
>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
邮 箱
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
email
}}
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
手机号
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
mobile
}}
<!--
<a
title=
"修改"
style=
"text-decoration:none;"
href=
"#"
>
[修改]
</a>
-->
</a-col>
</a-row>
<a-divider
dashed
/>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
姓 名
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
personName
}}
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
性 别
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
sex
}}
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
生 日
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
birthday
}}
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"title"
>
证件号
</a-col>
<a-col
:span=
"18"
>
{{
personInfo
.
certId
}}
</a-col>
</a-row>
</div>
</div>
<div
class=
"card-right border-style"
>
<a-spin
:spinning=
"loading"
style=
"width: 100%;height: 100%;"
>
<a-tabs
:activeKey=
"tabsActive"
@
tabClick=
"tabclick"
>
<a-tab-pane
key=
"1"
tab=
"设置"
>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"消息"
force-render
>
</a-tab-pane>
</a-tabs>
<div
v-show=
"tabsActive!='1'"
>
<a-empty
/>
</div>
<div
v-show=
"tabsActive=='1'"
>
<info-edit
:formData
.
sync=
"formData"
@
load=
"onLoad"
ref=
"infoEdit"
/>
<a-row>
<a-col
style=
"text-align: center;width:100%;"
>
<a-button
type=
"primary"
style=
"width:80px;"
@
click=
"submit"
>
保存
</a-button>
</a-col>
</a-row>
</div>
</a-spin>
</div>
</div>
</
template
>
<
script
>
import
infoEdit
from
'@/views/basicSetting/person/components/infoEdit'
import
moment
from
'moment'
export
default
{
name
:
'personInfo'
,
components
:
{
infoEdit
},
data
()
{
return
{
tabsActive
:
'1'
,
personInfo
:
{
id
:
null
,
certId
:
null
,
personName
:
null
,
sex
:
null
,
birthday
:
null
,
nation
:
null
,
title
:
null
,
education
:
null
,
spec
:
null
,
mobile
:
null
,
email
:
null
,
},
formData
:
{
id
:
null
,
personName
:
null
,
nation
:
null
,
title
:
null
,
spec
:
null
,
degree
:
null
,
duty
:
null
,
telephone
:
null
,
fax
:
null
,
email
:
null
,
},
loading
:
false
}
},
created
()
{
this
.
getUserInfo
()
},
methods
:
{
moment
,
tabclick
(
key
)
{
this
.
tabsActive
=
key
},
getUserInfo
()
{
this
.
$api
.
person
.
getUserInfo
().
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
personInfo
=
data
this
.
personInfo
.
birthday
=
moment
(
this
.
personInfo
.
birthday
).
format
(
'YYYY-MM-DD'
)
this
.
getCurrentPersonInfo
()
}
}).
catch
(()
=>
{
})
},
submit
()
{
this
.
$refs
.
infoEdit
.
submit
()
},
onLoad
(
value
)
{
this
.
loading
=
value
},
getCurrentPersonInfo
()
{
Object
.
assign
(
this
.
personInfo
,
this
.
formData
)
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.app-content {
padding: 10px 8px 10px 8px;
min-width: 920px;
.border-style {
border-radius: 4px;
border: 1px solid #e6ebf5;
background-color: #ffffff;
overflow: hidden;
color: #303133;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.card-left {
float: left;
width: 300px;
height: 600px;
margin-right: 6px;
.holder-photo {
margin: 20px 0px 10px 0px;
text-align: center;
}
.holder-photo > img {
width: 104px;
height: 104px;
margin-bottom: 10px;
}
.holder-info {
padding: 0px 10px 0px 10px;
.ant-row .ant-col {
padding: 3px 5px 3px 5px;
}
}
.title {
text-align: right;
}
}
.card-right {
float: left;
width: calc(100% - 320px);
min-width: 600px;
min-height: 200px;
padding: 0px 15px 15px 15px;
.ant-form-item {
margin-bottom: 6px;
}
::v-deep .ant-row {
.ant-col {
display: inline-block;
}
.ant-form-item-label {
width: 70px;
}
.ant-form-item-control-wrapper {
width: calc(100% - 70px);
}
.ant-form-explain {
margin-left: 5px;
display: inline-block;
}
}
}
}
</
style
>
src/views/basicSetting/unit/Index.vue
View file @
aa137b34
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<
script
>
<
script
>
import
infoEdit
from
'@/views/basicSetting/
unit
/components/infoEdit'
import
infoEdit
from
'@/views/basicSetting/
person
/components/infoEdit'
export
default
{
export
default
{
name
:
"unitEdit"
,
name
:
"unitEdit"
,
...
...
src/views/basicSetting/unit/components/infoEdit.vue
View file @
aa137b34
...
@@ -331,20 +331,22 @@ export default {
...
@@ -331,20 +331,22 @@ export default {
submit
()
{
submit
()
{
//提交单位数据
//提交单位数据
this
.
$refs
.
form
.
validate
(
valid
=>
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
// if (valid) {
this
.
$emit
(
'load'
,
true
)
this
.
$emit
(
'load'
,
true
)
this
.
$api
.
unit
.
updateUnit
(
par
).
then
(({
data
=
{}
})
=>
{
let
pars
=
isEmptyParams
(
this
.
formData
)
if
(
data
)
{
let
par
=
{
...
pars
}
this
.
$message
.
success
(
'修改成功!'
)
this
.
$api
.
unit
.
updateUnit
(
par
).
then
(({
data
=
{}
})
=>
{
this
.
$emit
(
'load'
,
false
)
if
(
data
)
{
}
this
.
$message
.
success
(
'修改成功!'
)
}).
catch
(()
=>
{
this
.
$emit
(
'load'
,
false
)
this
.
$emit
(
'load'
,
false
)
})
}
}
else
{
}).
catch
(()
=>
{
this
.
$message
.
warn
(
'信息未填写完全!'
)
this
.
$emit
(
'load'
,
false
)
return
false
})
}
// } else {
// this.$message.warn('信息未填写完全!')
// return 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