Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rongtong-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
融通安全管理系统
rongtong-app
Commits
972b8e8c
Commit
972b8e8c
authored
Aug 02, 2023
by
杨帆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dev yf'
parent
ea53da41
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
87 deletions
+99
-87
src/views/riskProject/add/addPresent.vue
src/views/riskProject/add/addPresent.vue
+40
-28
src/views/riskProject/add/index.vue
src/views/riskProject/add/index.vue
+59
-59
No files found.
src/views/riskProject/add/addPresent.vue
View file @
972b8e8c
...
@@ -165,7 +165,8 @@
...
@@ -165,7 +165,8 @@
type=
"textarea"
type=
"textarea"
rows=
"3"
rows=
"3"
autosize
autosize
placeholder=
"请输入"
>
placeholder=
"请输入"
>
</van-field>
</van-field>
<van-field
name=
"measuresProjectFile[]"
label=
"技术措施附件"
>
<van-field
name=
"measuresProjectFile[]"
label=
"技术措施附件"
>
<
template
#input
>
<
template
#input
>
...
@@ -200,13 +201,15 @@
...
@@ -200,13 +201,15 @@
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<van-field
label=
"管理措施"
<van-field
label=
"管理措施"
v-model=
"form.measuresAdministration"
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
name=
"measuresAdministration"
type=
"textarea"
type=
"textarea"
rows=
"3"
rows=
"3"
autosize
autosize
placeholder=
"请输入"
>
placeholder=
"请输入"
>
</van-field>
</van-field>
<van-field
name=
"measuresAdministrationFile[]"
label=
"管理措施附件"
>
<van-field
name=
"measuresAdministrationFile[]"
label=
"管理措施附件"
>
<
template
#input
>
<
template
#input
>
...
@@ -241,13 +244,15 @@
...
@@ -241,13 +244,15 @@
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<van-field
label=
"应急措施"
<van-field
label=
"应急措施"
v-model=
"form.measuresEmergency"
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
name=
"measuresEmergency"
type=
"textarea"
type=
"textarea"
rows=
"3"
rows=
"3"
autosize
autosize
placeholder=
"请输入"
>
placeholder=
"请输入"
>
</van-field>
</van-field>
<van-field
name=
"measuresEmergencyFile[]"
label=
"应急措施附件"
>
<van-field
name=
"measuresEmergencyFile[]"
label=
"应急措施附件"
>
<
template
#input
>
<
template
#input
>
...
@@ -655,14 +660,13 @@ export default {
...
@@ -655,14 +660,13 @@ export default {
this
.
existingId
=
this
.
$route
.
params
.
existingId
;
this
.
existingId
=
this
.
$route
.
params
.
existingId
;
this
.
inherentId
=
this
.
form
.
inherentId
=
this
.
inherentId
=
this
.
form
.
inherentId
=
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
);
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
);
},
},
mounted
()
{
mounted
()
{
if
(
sessionStorage
.
getItem
(
"
presentForm
"
))
{
if
(
sessionStorage
.
getItem
(
"
presentForm
"
))
{
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
presentForm
"
));
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
presentForm
"
));
this
.
form
.
level
=
sessionStorage
.
getItem
(
"
level
"
);
this
.
form
.
level
=
sessionStorage
.
getItem
(
"
level
"
);
sessionStorage
.
removeItem
(
'
presentForm
'
)
sessionStorage
.
removeItem
(
"
presentForm
"
);
}
else
{
}
else
{
this
.
postReturnEcho
();
this
.
postReturnEcho
();
}
}
},
},
...
@@ -751,7 +755,15 @@ export default {
...
@@ -751,7 +755,15 @@ export default {
this
.
form
.
planId
=
res
.
data
.
planId
;
this
.
form
.
planId
=
res
.
data
.
planId
;
/* 下面这些值还要可以输入,用上面的方法赋值后没有办法输入新的值!还不知道为啥 */
/* 下面这些值还要可以输入,用上面的方法赋值后没有办法输入新的值!还不知道为啥 */
const
{
measuresProject
,
measuresEmergency
,
measuresAdministration
,
measuresDeptName
,
measuresUserName
,
measuresUserPhone
,
presenceLocation
}
=
res
.
data
const
{
measuresProject
,
measuresEmergency
,
measuresAdministration
,
measuresDeptName
,
measuresUserName
,
measuresUserPhone
,
presenceLocation
}
=
res
.
data
;
const
formValue
=
{
const
formValue
=
{
measuresProject
,
measuresProject
,
measuresEmergency
,
measuresEmergency
,
...
@@ -760,11 +772,11 @@ export default {
...
@@ -760,11 +772,11 @@ export default {
measuresUserName
,
measuresUserName
,
measuresUserPhone
,
measuresUserPhone
,
presenceLocation
presenceLocation
}
}
;
this
.
form
=
{
this
.
form
=
{
...
this
.
form
,
...
this
.
form
,
...
formValue
...
formValue
}
}
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
...
...
src/views/riskProject/add/index.vue
View file @
972b8e8c
...
@@ -308,7 +308,7 @@
...
@@ -308,7 +308,7 @@
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
CreateComponent
from
'
./addProject.vue
'
import
CreateComponent
from
"
./addProject.vue
"
;
import
selectDept
from
"
@/components/selectDept/index.vue
"
;
import
selectDept
from
"
@/components/selectDept/index.vue
"
;
import
selectPeople
from
"
@/views/riskProject/add/projectList.vue
"
;
import
selectPeople
from
"
@/views/riskProject/add/projectList.vue
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
...
@@ -317,7 +317,7 @@ import {
...
@@ -317,7 +317,7 @@ import {
getLocalUserInfo
,
getLocalUserInfo
,
setLocalUserInfo
setLocalUserInfo
}
from
"
@/utils/userInfo
"
;
}
from
"
@/utils/userInfo
"
;
import
{
getFun
,
postFun
,
putFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
,
putFun
}
from
"
@/service/table.js
"
;
export
default
{
export
default
{
name
:
"
risk-add
"
,
name
:
"
risk-add
"
,
...
@@ -334,11 +334,11 @@ export default {
...
@@ -334,11 +334,11 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
createComponentData
:{
createComponentData
:
{
visible
:
false
,
visible
:
false
,
type
:
''
,
type
:
""
,
close
:
this
.
projectComponentClose
,
close
:
this
.
projectComponentClose
,
confirm
:
this
.
projectComponentConfirm
confirm
:
this
.
projectComponentConfirm
},
},
loadingStatus
:
false
,
loadingStatus
:
false
,
loadingText
:
"
提交...
"
,
loadingText
:
"
提交...
"
,
...
@@ -401,16 +401,16 @@ export default {
...
@@ -401,16 +401,16 @@ export default {
};
};
},
},
created
()
{
created
()
{
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
text
=
'
编辑
'
this
.
text
=
"
编辑
"
;
this
.
getDetail
(
this
.
$route
.
query
.
id
)
this
.
getDetail
(
this
.
$route
.
query
.
id
)
;
}
else
{
}
else
{
var
userInfo
=
getUserInfo
();
var
userInfo
=
getUserInfo
();
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userName
=
userInfo
.
nickName
;
this
.
form
.
userName
=
userInfo
.
nickName
;
this
.
form
.
deptId
=
userInfo
.
dept
.
deptId
;
this
.
form
.
deptId
=
userInfo
.
dept
.
deptId
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
createDeptName
=
userInfo
.
dept
.
deptName
this
.
form
.
createDeptName
=
userInfo
.
dept
.
deptName
;
}
}
getFun
(
`/risk/plan/project/list`
).
then
(
res
=>
{
getFun
(
`/risk/plan/project/list`
).
then
(
res
=>
{
this
.
columnsSource
=
res
.
data
;
this
.
columnsSource
=
res
.
data
;
...
@@ -418,12 +418,12 @@ export default {
...
@@ -418,12 +418,12 @@ export default {
},
},
methods
:
{
methods
:
{
/* 创建项目 */
/* 创建项目 */
createProject
(){
createProject
()
{
this
.
createComponentData
.
visible
=
true
;
this
.
createComponentData
.
visible
=
true
;
this
.
createComponentData
.
type
=
'
project
'
this
.
createComponentData
.
type
=
"
project
"
;
},
},
/* 创建 */
/* 创建 */
createBuilding
(){
createBuilding
()
{
if
(
!
this
.
form
.
projectId
)
{
if
(
!
this
.
form
.
projectId
)
{
this
.
$toast
({
this
.
$toast
({
title
:
"
提示
"
,
title
:
"
提示
"
,
...
@@ -432,18 +432,18 @@ export default {
...
@@ -432,18 +432,18 @@ export default {
return
false
;
return
false
;
}
}
this
.
createComponentData
.
visible
=
true
;
this
.
createComponentData
.
visible
=
true
;
this
.
createComponentData
.
type
=
'
building
'
this
.
createComponentData
.
type
=
"
building
"
;
this
.
createComponentData
.
projectId
=
this
.
form
.
projectId
this
.
createComponentData
.
projectId
=
this
.
form
.
projectId
;
},
},
projectComponentClose
(){
projectComponentClose
()
{
this
.
createComponentData
.
visible
=
false
;
this
.
createComponentData
.
visible
=
false
;
this
.
createComponentData
.
type
=
''
this
.
createComponentData
.
type
=
""
;
},
},
projectComponentConfirm
(
data
){
projectComponentConfirm
(
data
)
{
// this.createComponentData.visible = false;
// this.createComponentData.visible = false;
// this.createComponentData.type = '';
// this.createComponentData.type = '';
},
},
getDetail
(
id
){
getDetail
(
id
)
{
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
...
@@ -452,12 +452,12 @@ export default {
...
@@ -452,12 +452,12 @@ export default {
});
});
getFun
(
`/risk/plan/details/
${
id
}
`
)
getFun
(
`/risk/plan/details/
${
id
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
$toast
.
clear
()
this
.
$toast
.
clear
();
this
.
form
=
res
.
data
.
detailsDto
;
this
.
form
=
res
.
data
.
detailsDto
;
this
.
form
.
userName
=
this
.
form
.
createUserName
this
.
form
.
userName
=
this
.
form
.
createUserName
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
clear
()
this
.
$toast
.
clear
()
;
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
},
...
@@ -605,14 +605,14 @@ export default {
...
@@ -605,14 +605,14 @@ export default {
// });
// });
this
.
loadingStatus
=
true
;
this
.
loadingStatus
=
true
;
let
url
=
"
/risk/plan
"
;
let
url
=
"
/risk/plan
"
;
const
fetch
=
()
=>
{
const
fetch
=
()
=>
{
if
(
this
.
$route
.
query
.
id
){
if
(
this
.
$route
.
query
.
id
)
{
return
putFun
(
url
,
this
.
form
)
return
putFun
(
url
,
this
.
form
);
}
else
{
}
else
{
delete
this
.
form
.
createDeptName
delete
this
.
form
.
createDeptName
;
return
postFun
(
url
,
this
.
form
)
return
postFun
(
url
,
this
.
form
);
}
}
}
};
fetch
()
fetch
()
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
...
...
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