flat: 暂存

This commit is contained in:
Apcallover
2024-03-31 16:52:37 +08:00
parent 302067761d
commit 3b5988351a
9 changed files with 393 additions and 44 deletions

View File

@@ -1,37 +1,25 @@
import request from "@/router/axios";
// 查看任务统计
export const missionCount = (current, size, params) => {
export const missionCount = (params) => {
return request({
url: "/api/jobslink-api/report/roleMissionCount/missionCount",
method: "get",
params: {
...params,
current,
size,
},
params,
});
};
// 查看岗位统计
export const roleCount = (current, size, params) => {
export const roleCount = (params) => {
return request({
url: "/api/jobslink-api/report/roleMissionCount/roleCount",
method: "get",
params: {
...params,
current,
size,
},
params,
});
};
//查看审核统计
export const reviewCount = (current, size, params) => {
export const reviewCount = (params) => {
return request({
url: "/api/jobslink-api/report/roleMissionCount/reviewCount",
method: "get",
params: {
...params,
current,
size,
},
params,
});
};

View File

@@ -1,7 +1,7 @@
<template>
<div class="loading-container" v-show="visible">
<div class="content">
<img src="@/assets/loading.gif" class="image" >
<img src="@/assets/loading.gif" :style="{width: Sized, height: Sized}">
<div class="text">
{{loadingText}}
</div>
@@ -10,9 +10,21 @@
</template>
<script>
const classEnum = {
small: '56px',
default: '86px',
large: '106px',
largeX: '126px',
largeXX: '146px',
largeXXL: '186px',
}
export default {
name: "loading",
data: {
data() {
return {
size: '100px'
}
},
props: {
visible: {
@@ -30,7 +42,21 @@ export default {
type: Boolean,
required: false,
},
}
size: {
type: String,
default: 'default',
required: false,
}
},
computed: {
Sized() {
if(Object.keys(classEnum).some((item) => item === this.size)) {
return classEnum[this.size]
} else {
return classEnum.default
}
}
},
}
</script>
@@ -51,7 +77,15 @@ export default {
align-items: center;
justify-content: center;
flex-direction: column;
.image{
.image_small{
width: 56px;
height: 56px;
}
.image_default{
width: 100px;
height: 100px;
}
.image_large{
width: 180px;
height: 180px;
}

View File

@@ -51,7 +51,11 @@ Vue.prototype.website = website;
// iconfontVersion.forEach(ele => {
// loadStyle(iconfontUrl.replace('$key', ele));
// });
// 睡眠函数
function sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time))
}
Vue.prototype.$api = { sleep }
Vue.config.productionTip = false;
new Vue({router, store, i18n, render: h => h(App)}).$mount('#app')

View File

@@ -1,21 +1,126 @@
<template>
<basic-container>
123
<basic-container style="position: relative">
<avue-crud
:data="infoData"
:option="options"
:search.sync="search"
:page.sync="infoPages"
@search-change="searchChange"
@search-reset="resetChange"
@size-change="sizeChange"
@current-change="currentChange"
>
</avue-crud>
<CustomLoading :visible="visible" loadingText="加载中..."></CustomLoading>
</basic-container>
</template>
<script>
import {reviewCount} from '@/api/report/report'
import CustomLoading from "@/components/Custom-Loading/index.vue";
import { dateFormat } from "@/util/date";
const pages = { total: 0, size: 10, currentPage: 1 }
const baseOptions = {
dateBtn: false,
addBtn: false,
editBtn: false,
delBtn: false,
height: "auto",
reserveSelection: false,
border: true,
columnBtn: false,
refreshBtn: false,
menu: false,
tip: false,
searchMenuSpan: 4,
selection: false,
}
export default {
components: {CustomLoading},
data() {
return {
infoPages: Object.assign({}, pages),
infoData: [],
visible: false,
search: {},
}
},
create() {
created() {
this.getList()
},
computed: {
options() {
return {
...baseOptions,
column: [{
label: '机构名称',
prop: 'name',
search: true,
},{
label: '企业数',
prop: 'companyCount',
},{
label: '任务数',
prop: 'missionCount',
},{
label: '岗位数',
prop: 'roleCount'
},{
label: '日期',
prop: 'date',
hide: true,
display: false,
type:'date',
searchSpan: 8,
searchRange:true,
search:true,
}]
}
}
},
methods: {
sizeChange(size) {
this.infoPages.size = size
this.getList()
},
currentChange(page) {
this.infoPages.page = page
this.getList()
},
searchChange(values, done) {
this.getList().then(() => {done()})
},
resetChange() {
this.search = {}
let params = { size: 10, current: 1 }
this.getList()
},
getList(values) {
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
}
console.log(123123, params)
let resData = await reviewCount(params)
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.$api.sleep(1000).then(() => {this.visible = false; resolve(true)})
} else {
reject()
}
})
}
}
}
</script>

View File

@@ -1,21 +1,129 @@
<template>
<basic-container>
123
<basic-container style="position: relative">
<avue-crud
:data="infoData"
:option="options"
:search.sync="search"
:page.sync="infoPages"
@search-change="searchChange"
@search-reset="resetChange"
@size-change="sizeChange"
@current-change="currentChange"
>
</avue-crud>
<CustomLoading :visible="visible" loadingText="加载中..."></CustomLoading>
</basic-container>
</template>
<script>
import {roleCount} from '@/api/report/report'
import CustomLoading from "@/components/Custom-Loading/index.vue";
import { dateFormat } from "@/util/date";
const pages = { total: 0, size: 10, currentPage: 1 }
const baseOptions = {
dateBtn: false,
addBtn: false,
editBtn: false,
delBtn: false,
height: "auto",
reserveSelection: false,
border: true,
columnBtn: false,
refreshBtn: false,
menu: false,
tip: false,
searchMenuSpan: 4,
selection: false,
}
export default {
components: {CustomLoading},
data() {
return {
infoPages: Object.assign({}, pages),
infoData: [],
visible: false,
search: {},
}
},
create() {
created() {
this.getList()
},
computed: {
options() {
return {
...baseOptions,
column: [{
label: '机构名称',
prop: 'name',
search:true,
},{
label: '发布数',
prop: 'count',
},{
label: '推送数',
prop: 'serveCount',
},{
label: '成功数',
prop: 'successCount',
},{
label: '跟踪数',
prop: 'traceCount'
},{
label: '日期',
prop: 'date',
hide: true,
display: false,
type:'date',
searchSpan: 8,
searchRange:true,
search:true,
}]
}
}
},
methods: {
sizeChange(size) {
this.infoPages.size = size
this.getList()
},
currentChange(page) {
this.infoPages.page = page
this.getList()
},
searchChange(values, done) {
this.getList().then(() => {done()})
},
resetChange() {
this.search = {}
let params = { size: 10, current: 1 }
this.getList()
},
getList(values) {
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
}
console.log(123123, params)
let resData = await roleCount(params)
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.$api.sleep(1000).then(() => {this.visible = false; resolve(true)})
} else {
reject()
}
})
}
}
}
</script>
@@ -23,3 +131,4 @@ export default {
<style scoped lang="scss">
</style>

View File

@@ -1,21 +1,129 @@
<template>
<basic-container>
123
<basic-container style="position: relative">
<avue-crud
:data="infoData"
:option="options"
:search.sync="search"
:page.sync="infoPages"
@search-change="searchChange"
@search-reset="resetChange"
@size-change="sizeChange"
@current-change="currentChange"
>
</avue-crud>
<CustomLoading :visible="visible" loadingText="加载中..."></CustomLoading>
</basic-container>
</template>
<script>
import {missionCount} from '@/api/report/report'
import CustomLoading from "@/components/Custom-Loading/index.vue";
import { dateFormat } from "@/util/date";
const pages = { total: 0, size: 10, currentPage: 1 }
const baseOptions = {
dateBtn: false,
addBtn: false,
editBtn: false,
delBtn: false,
height: "auto",
reserveSelection: false,
border: true,
columnBtn: false,
refreshBtn: false,
menu: false,
tip: false,
searchMenuSpan: 4,
selection: false,
}
export default {
components: {CustomLoading},
data() {
return {
infoPages: Object.assign({}, pages),
infoData: [],
visible: false,
search: {},
}
},
create() {
created() {
this.getList()
},
computed: {
options() {
return {
...baseOptions,
column: [{
label: '机构名称',
prop: 'name',
search:true,
},{
label: '发布数',
prop: 'count',
},{
label: '推送数',
prop: 'serveCount',
},{
label: '成功数',
prop: 'successCount',
},{
label: '跟踪数',
prop: 'traceCount'
},{
label: '日期',
prop: 'date',
hide: true,
display: false,
type:'date',
searchSpan: 8,
searchRange:true,
search:true,
}]
}
}
},
methods: {
sizeChange(size) {
this.infoPages.size = size
this.getList()
},
currentChange(page) {
this.infoPages.page = page
this.getList()
},
searchChange(values, done) {
this.getList().then(() => {done()})
},
resetChange() {
this.search = {}
let params = { size: 10, current: 1 }
this.getList()
},
getList(values) {
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
}
console.log(123123, params)
let resData = await missionCount(params)
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.$api.sleep(1000).then(() => {this.visible = false; resolve(true)})
} else {
reject()
}
})
}
}
}
</script>
@@ -23,3 +131,4 @@ export default {
<style scoped lang="scss">
</style>

View File

@@ -24,7 +24,7 @@
<TextTooltip :content="row.labelsBase" length="20"></TextTooltip>
</template>
</avue-crud>
<CustomLoading :visible="leftLoading" loading-text="用户数据加载中"></CustomLoading>
<CustomLoading :visible="leftLoading" size="largeXXL" loading-text="用户数据加载中"></CustomLoading>
</div>
<!-- 操作 -->
<div class="content-center">
@@ -50,7 +50,7 @@
<TextTooltip :content="row.jobDescription" length="40"></TextTooltip>
</template>
</avue-crud>
<CustomLoading :visible="rightLoading" loading-text="智能分析匹配中"></CustomLoading>
<CustomLoading :visible="rightLoading" size="largeXXL" loading-text="智能分析匹配中"></CustomLoading>
</div>
</div>
</div>