flat: 8.30
This commit is contained in:
@@ -16,11 +16,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {vocationalTrainingServiceCount , listAllServe} from '@/api/report/report'
|
||||
import {vocationalTrainingServiceCount, listAllServe} from '@/api/report/report'
|
||||
import CustomLoading from "@/components/Custom-Loading/index.vue";
|
||||
import { dateFormat } from "@/util/date";
|
||||
import {dateFormat} from "@/util/date";
|
||||
import search from "@/page/index/search.vue";
|
||||
import {deepClone} from "@/util/util";
|
||||
|
||||
const columnEnum = {
|
||||
"data1": "服务总人数",
|
||||
"data2": "推送政策总人次",
|
||||
@@ -28,7 +29,7 @@ const columnEnum = {
|
||||
"data4": "跟踪服务总次数",
|
||||
"data5": "服务成功总次数"
|
||||
}
|
||||
const pages = { total: 0, size: 10, currentPage: 1 }
|
||||
const pages = {total: 0, size: 10, currentPage: 1}
|
||||
const baseOptions = {
|
||||
dateBtn: false,
|
||||
addBtn: false,
|
||||
@@ -62,7 +63,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getServeList().then((res) => {
|
||||
if(res.length) {
|
||||
if (res.length) {
|
||||
this.headTitle = res[0].name
|
||||
this.search.serveId = res[0].id
|
||||
this.searchServeId = res[0].id
|
||||
@@ -77,7 +78,7 @@ export default {
|
||||
display: false,
|
||||
children: Object.keys(columnEnum).map((key) => ({
|
||||
label: columnEnum[key],
|
||||
prop: key,
|
||||
prop: key,
|
||||
display: false,
|
||||
}))
|
||||
}]
|
||||
@@ -88,7 +89,7 @@ export default {
|
||||
prop: 'serveId',
|
||||
hide: true,
|
||||
display: false,
|
||||
type:'select',
|
||||
type: 'select',
|
||||
searchSpan: 6,
|
||||
search: true,
|
||||
searchClearable: false,
|
||||
@@ -97,7 +98,7 @@ export default {
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
},
|
||||
},{
|
||||
}, {
|
||||
label: '机构名称',
|
||||
prop: 'name',
|
||||
search: true,
|
||||
@@ -109,10 +110,12 @@ export default {
|
||||
prop: 'date',
|
||||
hide: true,
|
||||
display: false,
|
||||
type:'date',
|
||||
type: 'month',
|
||||
format: "yyyy-MM",
|
||||
valueFormat: "yyyy-MM",
|
||||
searchSpan: 6,
|
||||
searchRange:true,
|
||||
search:true,
|
||||
searchRange: true,
|
||||
search: true,
|
||||
}]
|
||||
}
|
||||
}
|
||||
@@ -133,14 +136,14 @@ export default {
|
||||
this.getList().then(() => done())
|
||||
},
|
||||
resetChange() {
|
||||
this.search = { serveId: this.searchServeId }
|
||||
let params = { size: 10, current: 1 }
|
||||
this.search = {serveId: this.searchServeId}
|
||||
let params = {size: 10, current: 1}
|
||||
this.getList()
|
||||
},
|
||||
getServeList() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let resData = await listAllServe({id: '1762444363573792769'})
|
||||
if(resData.data.code === 200) {
|
||||
if (resData.data.code === 200) {
|
||||
this.serveData = resData.data.data
|
||||
resolve(resData.data.data)
|
||||
} else {
|
||||
@@ -149,25 +152,25 @@ export default {
|
||||
})
|
||||
},
|
||||
getList(values) {
|
||||
return new Promise(async(resolve, reject) => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
this.visible = true
|
||||
let params = {
|
||||
size: this.infoPages.size,
|
||||
current: this.infoPages.currentPage,
|
||||
...this.search,
|
||||
}
|
||||
if( Array.isArray(this.search.date) && this.search.date.length ) {
|
||||
const [stime, etime] = this.search.date
|
||||
params.stime = dateFormat(stime, "yyyy-MM-dd")
|
||||
params.etime = dateFormat(etime, "yyyy-MM-dd")
|
||||
delete params.date
|
||||
}
|
||||
// if (Array.isArray(this.search.date) && this.search.date.length) {
|
||||
// const [stime, etime] = this.search.date
|
||||
// params.stime = dateFormat(stime, "yyyy-MM-dd")
|
||||
// params.etime = dateFormat(etime, "yyyy-MM-dd")
|
||||
// delete params.date
|
||||
// }
|
||||
const copySearch = deepClone(params)
|
||||
let resData = await vocationalTrainingServiceCount(params)
|
||||
if(resData.data.code === 200) {
|
||||
const { records, current, total, size } = resData.data.data
|
||||
if (resData.data.code === 200) {
|
||||
const {records, current, total, size} = resData.data.data
|
||||
this.infoData = records
|
||||
this.infoPages = { ...this.infoPages, currentPage: current, total, size}
|
||||
this.infoPages = {...this.infoPages, currentPage: current, total, size}
|
||||
this.visible = false;
|
||||
resolve(records)
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user