Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
91eaf102
Commit
91eaf102
authored
Dec 07, 2022
by
liuguorong93
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除功能
parent
5ca7c78a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
191 additions
and
4 deletions
+191
-4
src/api/menuDataApi/poDogJobManageApi.js
+4
-0
src/router/modules/index.js
+24
-1
src/views/poDogJobManage/components/poDogJobManageEdit.vue
+112
-0
src/views/poDogJobManage/index.vue
+51
-3
No files found.
src/api/menuDataApi/poDogJobManageApi.js
View file @
91eaf102
...
...
@@ -7,3 +7,7 @@ export const getPoDogJobList = params =>
// 工作犬信息(导出url)
export
const
exportPoDogJobUrl
=
`
${
baseUrl
}
/work/export`
// 工作犬信息(删除)
export
const
deletePoDogJob
=
params
=>
postJson
(
`
${
baseUrl
}
/work/dogDelete`
,
params
)
src/router/modules/index.js
View file @
91eaf102
...
...
@@ -218,7 +218,30 @@ export default [
title
:
'警用工作犬信息管理'
,
isOneMenu
:
false
,
oneMenuName
:
'poDogManage'
,
paixu
:
2
paixu
:
2
,
routeNames
:
[
'poDogJobManageEdit'
,
'poDogJobManageAdd'
],
}
},
// 警用工作犬信息管理(编辑页)
{
path
:
'poDogJobManageEdit'
,
name
:
'poDogJobManageEdit'
,
component
:
()
=>
import
(
'@/views/poDogJobManage/components/poDogJobManageEdit.vue'
),
meta
:
{
title
:
'警用工作犬信息管理-编辑'
,
// 编辑新增页面此字段务必设置为true
isEditPage
:
true
}
},
// 警用工作犬信息管理(新增页)
{
path
:
'poDogJobManageAdd'
,
name
:
'poDogJobManageAdd'
,
component
:
()
=>
import
(
'@/views/poDogJobManage/components/poDogJobManageEdit.vue'
),
meta
:
{
title
:
'警用工作犬信息管理-新增'
,
// 编辑新增页面此字段务必设置为true
isEditPage
:
true
}
},
// 警用退役犬信息管理(二级菜单)
...
...
src/views/poDogJobManage/components/poDogJobManageEdit.vue
0 → 100644
View file @
91eaf102
<
template
>
<div>
132
</div>
</
template
>
<
script
>
import
moment
from
"moment"
;
export
default
{
name
:
"poDogJobManageEdit"
,
data
()
{
return
{
detailInfo
:
{
xxdjryXm
:
""
,
xxdjryGmsfhm
:
""
,
xxdjdwGajgmc
:
""
,
xxdjdwGajgjgdm
:
""
,
djsj
:
""
,
},
userInfoJson
:
{},
};
},
async
mounted
()
{
let
userInfo
=
window
.
sessionStorage
.
getItem
(
"userInfo"
);
if
(
userInfo
)
this
.
userInfoJson
=
JSON
.
parse
(
userInfo
);
// 判断是新增/编辑页面
this
.
routeName
=
this
.
$route
.
name
||
""
;
if
(
this
.
routeName
===
"poDogJobManageEdit"
)
{
// 编辑
let
id
=
this
.
$route
.
query
.
id
||
""
;
this
.
getDetail
(
id
);
}
else
{
// 新增
this
.
detailInfo
.
xxdjryXm
=
this
.
userInfoJson
.
userName
||
""
;
this
.
detailInfo
.
xxdjryGmsfhm
=
this
.
userInfoJson
.
identitycard
||
""
;
this
.
detailInfo
.
xxdjdwGajgmc
=
this
.
userInfoJson
.
unitname
||
""
;
this
.
detailInfo
.
xxdjdwGajgjgdm
=
this
.
userInfoJson
.
unitcode
||
""
;
this
.
detailInfo
.
djsj
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
},
methods
:
{
getDetail
(
id
)
{},
},
};
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"../../../assets/styles/detailContent.scss"
;
.requiredClass
{
color
:
#f56c6c
;
}
.sxjqClass
{
/deep/
.el-form-item__label
{
width
:
100%
;
text-align
:
left
;
}
/
deep
/
.el-form-item__label
:before
{
vertical-align
:
middle
;
}
/
deep
/
.el-form-item__content
{
position
:
relative
;
}
.labelNameClass
{
display
:
inline-block
;
vertical-align
:
middle
;
margin-right
:
8px
;
}
.yuandianClass
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
border-radius
:
50%
;
background
:
#2c5de5
;
vertical-align
:
middle
;
margin-right
:
3px
;
}
.numClass
{
display
:
inline-block
;
color
:
#2c5de5
;
font-size
:
14px
;
vertical-align
:
middle
;
}
.itemSxjqClass
{
width
:
32%
;
margin-right
:
5%
;
}
.itemJqxphClass
{
width
:
50%
;
margin-right
:
5%
;
}
.itemJqxphClass2
{
width
:
87%
;
margin-right
:
5%
;
}
.conBtnClass
{
display
:
inline-block
;
width
:
16px
;
height
:
16px
;
border-radius
:
50%
;
border
:
1px
solid
#2c5de5
;
line-height
:
12px
;
text-align
:
center
;
color
:
#2c5de5
;
cursor
:
pointer
;
position
:
absolute
;
right
:
0
;
bottom
:
8px
;
}
}
</
style
>
\ No newline at end of file
src/views/poDogJobManage/index.vue
View file @
91eaf102
...
...
@@ -278,6 +278,7 @@
import
{
getPoDogJobList
,
exportPoDogJobUrl
,
deletePoDogJob
,
}
from
"@/api/menuDataApi/poDogJobManageApi.js"
;
import
{
getJsonDataApi
}
from
"@/utils/getJsonData.js"
;
import
{
getCodeName
,
handleDownFile
}
from
"@/utils/mk.js"
;
...
...
@@ -407,9 +408,56 @@ export default {
this
.
currentPage
=
current
;
this
.
getLists
(
current
);
},
addData
()
{},
editData
()
{},
deleteData
()
{},
addData
()
{
this
.
$router
.
push
({
name
:
"poDogJobManageAdd"
});
},
editData
(
row
)
{
this
.
$router
.
push
({
name
:
"poDogJobManageEdit"
,
query
:
{
id
:
row
.
id
,
},
});
},
deleteData
(
row
)
{
this
.
$confirm
(
`此操作将永久删除该数据,是否继续?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
let
params
=
{
id
:
row
.
id
,
};
deletePoDogJob
(
params
)
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
&&
res
.
success
)
{
this
.
$message
({
message
:
"删除成功"
,
type
:
"success"
,
duration
:
1000
,
});
this
.
getLists
(
1
);
return
;
}
this
.
$message
({
message
:
res
.
message
,
type
:
"warning"
,
duration
:
3000
,
});
})
.
catch
(()
=>
{
this
.
$message
({
message
:
"删除失败"
,
type
:
"warning"
,
duration
:
3000
,
});
});
})
.
catch
(()
=>
{
this
.
$message
(
"已取消删除"
);
});
},
importData
()
{
this
.
showImportBox
=
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