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
5ca7c78a
Commit
5ca7c78a
authored
Dec 07, 2022
by
liuguorong93
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
警用工作犬 列表+导入+导出
parent
aeac21cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
300 additions
and
5 deletions
+300
-5
public/JsonData/CODE_GZQDJ.json
+50
-0
src/api/menuDataApi/importApi.js
+4
-0
src/api/menuDataApi/poDogJobManageApi.js
+9
-0
src/views/poDogJobManage/index.vue
+237
-5
No files found.
public/JsonData/CODE_GZQDJ.json
0 → 100644
View file @
5ca7c78a
{
"code"
:
200
,
"data"
:{
"rows"
:[
{
"ids"
:
"666669"
,
"label"
:
"一级"
,
"codeType"
:
"CODE_GZQDJ"
,
"text"
:
"一级"
,
"pId"
:
null
,
"id"
:
"1"
,
"isParent"
:
false
,
"children"
:[]
},
{
"ids"
:
"666670"
,
"label"
:
"二级"
,
"codeType"
:
"CODE_GZQDJ"
,
"text"
:
"二级"
,
"pId"
:
null
,
"id"
:
"2"
,
"isParent"
:
false
,
"children"
:[]
},
{
"ids"
:
"666671"
,
"label"
:
"三级"
,
"codeType"
:
"CODE_GZQDJ"
,
"text"
:
"三级"
,
"pId"
:
null
,
"id"
:
"3"
,
"isParent"
:
false
,
"children"
:[]
},
{
"ids"
:
"666672"
,
"label"
:
"其他"
,
"codeType"
:
"CODE_GZQDJ"
,
"text"
:
"其他"
,
"pId"
:
null
,
"id"
:
"4"
,
"isParent"
:
false
,
"children"
:[]
}
]
},
"success"
:
true
,
"message"
:
"成功"
}
\ No newline at end of file
src/api/menuDataApi/importApi.js
View file @
5ca7c78a
...
...
@@ -8,3 +8,7 @@ export const importArtisanApi = params =>
// 技术单位(批量导入)
export
const
importTeUnitApi
=
params
=>
postform
(
`
${
baseUrl
}
/technicalUnits/excelsave`
,
params
)
// 警用工作犬(批量导入)
export
const
importPoDogJobApi
=
params
=>
postform
(
`
${
baseUrl
}
/work/excelsave`
,
params
)
src/api/menuDataApi/poDogJobManageApi.js
0 → 100644
View file @
5ca7c78a
import
{
post
,
postform
,
get
,
postJson
}
from
'@/utils/http.js'
export
let
baseUrl
=
'/api'
// 获取警用工作犬信息管理列表接口
export
const
getPoDogJobList
=
params
=>
postJson
(
`
${
baseUrl
}
/work/dogQuery`
,
params
)
// 工作犬信息(导出url)
export
const
exportPoDogJobUrl
=
`
${
baseUrl
}
/work/export`
src/views/poDogJobManage/index.vue
View file @
5ca7c78a
...
...
@@ -135,12 +135,152 @@
重置
</el-button>
</div>
<div
class=
"hengLine"
></div>
<div
class=
"resultClass spaceBetween"
>
<div
class=
"leftC"
>
<div
class=
"titles"
style=
"display: inline-block;width: 72px;"
>
查询结果
</div>
<span
class=
"infoClass"
>
共有
<span
class=
"numColor"
>
{{
total
}}
</span>
条查询结果,共
<span
class=
"numColor"
>
{{
Math
.
ceil
(
total
/
limit
)
}}
</span>
页;
</span>
</div>
<div
class=
"rightC"
>
<el-button
icon=
"el-icon-plus"
size=
"small"
@
click=
"addData"
>
新增
</el-button>
<el-button
size=
"small"
icon=
"el-icon-download"
@
click=
"importData"
>
批量导入
</el-button>
<el-button
size=
"small"
icon=
"el-icon-upload2"
style=
"margin-right: 0 !important;"
@
click=
"exportData"
>
导出
</el-button>
</div>
</div>
<el-table
v-loading=
"tableLoading"
element-loading-text=
"拼命加载中"
ref=
"tableRef"
:data=
"tableData"
tooltip-effect=
"dark"
max-height=
"600"
width=
"100%"
size=
"small"
class=
"elTableClass"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"100"
>
<template
slot-scope=
"scope"
>
<div>
<el-button
type=
"text"
size=
"small"
@
click=
"editData(scope.row)"
>
补采
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteData(scope.row)"
>
删除
</el-button>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"警犬名称"
align=
"center"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"chipCode"
label=
"芯片号"
align=
"center"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"出生日期"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
birthDate
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"归属单位"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
trainingUnit
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"工作犬等级"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
trainingLevelId
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"专业方向"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
workingDogClassificationId
}}
</span>
</
template
>
</el-table-column>
</el-table>
<div
class=
"pageClass"
>
<el-pagination
class=
"elPage"
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
:page-size=
"limit"
layout=
"prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</div>
<!-- 批量导入 -->
<importFilePublic
v-if=
"showImportBox"
:importInfo=
"importInfo"
@
close=
"showImportBox = false"
@
refreshLists=
"getLists(1)"
>
</importFilePublic>
</div>
</template>
<
script
>
import
{
getPoDogJobList
,
exportPoDogJobUrl
,
}
from
"@/api/menuDataApi/poDogJobManageApi.js"
;
import
{
getJsonDataApi
}
from
"@/utils/getJsonData.js"
;
import
{
getCodeName
,
handleDownFile
}
from
"@/utils/mk.js"
;
import
LazySelectTreeDialog
from
"@c/lazy_treeCode_components.vue"
;
import
importFilePublic
from
"@c/importFilePublic.vue"
;
...
...
@@ -189,16 +329,18 @@ export default {
showImportBox
:
false
,
importInfo
:
{
fileCName
:
"
技术人员
导入模版.xlsx"
,
fileLocalUrl
:
"files/j
sry
drmb.xlsx"
,
apiName
:
"import
Artisan
Api"
,
fileCName
:
"
警用工作犬
导入模版.xlsx"
,
fileLocalUrl
:
"files/j
ygzq
drmb.xlsx"
,
apiName
:
"import
PoDogJob
Api"
,
},
};
},
async
mounted
()
{
this
.
zyfxOptions
=
await
getJsonDataApi
(
"CODE_WORKINGDOGCLASSIFICA"
);
this
.
gzqdjOptions
=
await
getJsonDataApi
(
"CODE_
WORKINGDOGCLASSIFICA
"
);
this
.
gzqdjOptions
=
await
getJsonDataApi
(
"CODE_
GZQDJ
"
);
this
.
jyjqOptions
=
await
getJsonDataApi
(
"CODE_SPECIES"
);
this
.
getLists
(
1
);
},
methods
:
{
resetForm
()
{
...
...
@@ -213,7 +355,97 @@ export default {
this
.
getLists
(
1
);
},
getLists
()
{},
getLists
(
current
)
{
this
.
tableLoading
=
true
;
this
.
currentPage
=
current
;
let
params
=
{
pageNow
:
current
,
pageSize
:
this
.
limit
,
chipCode
:
this
.
formData
.
chipCode
,
name
:
this
.
formData
.
name
,
birthDate
:
this
.
formData
.
birthDate
,
trainingUnit
:
this
.
formData
.
trainingUnit
,
workingDogClassificationId
:
this
.
formData
.
workingDogClassificationId
,
trainingLevelId
:
this
.
formData
.
trainingLevelId
,
speciesId
:
this
.
formData
.
speciesId
,
jsrymc
:
this
.
formData
.
jsrymc
,
};
getPoDogJobList
(
params
)
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
&&
res
.
success
&&
res
.
data
&&
res
.
data
.
data
&&
res
.
data
.
data
.
records
&&
res
.
data
.
data
.
records
.
length
)
{
let
datas
=
res
.
data
.
data
.
records
;
// console.log(datas);
// datas.forEach((item) => {
// item.jwjsxlForName = getCodeName(item.jwjsxl, this.jwjsxlOptions);
// });
this
.
tableData
=
datas
;
this
.
total
=
res
.
data
.
data
.
total
;
this
.
tableLoading
=
false
;
return
;
}
this
.
tableLoading
=
false
;
this
.
tableData
=
[];
this
.
total
=
0
;
})
.
catch
((
e
)
=>
{
console
.
log
(
e
);
this
.
tableLoading
=
false
;
this
.
tableData
=
[];
this
.
total
=
0
;
});
},
handleCurrentChange
(
current
)
{
this
.
currentPage
=
current
;
this
.
getLists
(
current
);
},
addData
()
{},
editData
()
{},
deleteData
()
{},
importData
()
{
this
.
showImportBox
=
true
;
},
exportData
()
{
this
.
tableLoading
=
true
;
let
params
=
{
pageNow
:
1
,
pageSize
:
99999
,
chipCode
:
this
.
formData
.
chipCode
,
name
:
this
.
formData
.
name
,
birthDate
:
this
.
formData
.
birthDate
,
trainingUnit
:
this
.
formData
.
trainingUnit
,
workingDogClassificationId
:
this
.
formData
.
workingDogClassificationId
,
trainingLevelId
:
this
.
formData
.
trainingLevelId
,
speciesId
:
this
.
formData
.
speciesId
,
jsrymc
:
this
.
formData
.
jsrymc
,
};
axios
.
post
(
exportPoDogJobUrl
,
JSON
.
stringify
(
params
),
{
headers
:
{
"Content-Type"
:
"application/json"
},
responseType
:
"blob"
,
})
.
then
((
res
)
=>
{
if
(
!
res
.
data
)
{
this
.
tableLoading
=
false
;
return
;
}
let
obj
=
{
data
:
res
.
data
,
filename
:
"警用工作犬信息.xlsx"
,
};
handleDownFile
(
obj
);
this
.
tableLoading
=
false
;
});
},
},
watch
:
{},
};
...
...
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