master
parent
9d2ddb0fb6
commit
9d503366d5
@ -0,0 +1,49 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function overview (params,isLoading=false) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/statistic/year-overview",
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function personOverview (params,isLoading=false) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/statistic/person-year-overview",
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function personDetail (params,isLoading=false) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/statistic/person-year-detail",
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function getByCategory (params,isLoading=true) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/statistic/get-by-category",
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function recordShow (params,isLoading=true) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/api/admin/statistic/record-show",
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="填报" width="860px" :visible.sync="visible">
|
||||
|
||||
<xy-table style="width: 820px"
|
||||
stripe
|
||||
ref="xyTable"
|
||||
:req-opt="select"
|
||||
:is-first-req="false"
|
||||
:height="500"
|
||||
:list="list"
|
||||
:table-item="table">
|
||||
</xy-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getByCategory, recordShow } from "@/api/fill/index";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
auth: [],
|
||||
visible: false,
|
||||
list:[],
|
||||
select:{
|
||||
category_id: "",
|
||||
person_id:''
|
||||
},
|
||||
|
||||
table: [
|
||||
{
|
||||
prop: "title",
|
||||
label: "标题",
|
||||
fixed: "left",
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
prop: "created_at",
|
||||
label: "填报日期",
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
prop: "content",
|
||||
label: "内容",
|
||||
align: "left",
|
||||
minWidth: 200
|
||||
},
|
||||
{
|
||||
prop: "operate",
|
||||
label: "操作",
|
||||
align: "left",
|
||||
width: 140,
|
||||
customFn: row => {
|
||||
const _this = this
|
||||
return (
|
||||
<div>
|
||||
<Button type="primary"
|
||||
size="small"
|
||||
on={{
|
||||
['click']:_ => {
|
||||
this.showInfo(row.id)
|
||||
}
|
||||
}}>查看</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
getList(){
|
||||
getByCategory({
|
||||
person_id:this.select.person_id,
|
||||
category_id:this.select.category_id
|
||||
}).then(res=>{
|
||||
this.list = res.data
|
||||
})
|
||||
},
|
||||
show () {
|
||||
this.visible = true;
|
||||
},
|
||||
hide () {
|
||||
this.visible = false;
|
||||
},
|
||||
setId (id) {
|
||||
this.select.category_id = id;
|
||||
},
|
||||
setPersonId (id) {
|
||||
this.select.person_id = id;
|
||||
},
|
||||
getData () {
|
||||
this.$refs['xyTable'].getTableData()
|
||||
},
|
||||
showInfo(id){
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
visible (newVal) {
|
||||
if (newVal) {
|
||||
this.$nextTick(_ => {
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
Loading…
Reference in new issue