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

View File

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

View File

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

View File

@@ -1,21 +1,126 @@
<template> <template>
<basic-container> <basic-container style="position: relative">
123 <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> </basic-container>
</template> </template>
<script> <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 { export default {
components: {CustomLoading},
data() { data() {
return { 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: { 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> </script>

View File

@@ -1,21 +1,129 @@
<template> <template>
<basic-container> <basic-container style="position: relative">
123 <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> </basic-container>
</template> </template>
<script> <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 { export default {
components: {CustomLoading},
data() { data() {
return { 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: { 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> </script>
@@ -23,3 +131,4 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>

View File

@@ -1,21 +1,129 @@
<template> <template>
<basic-container> <basic-container style="position: relative">
123 <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> </basic-container>
</template> </template>
<script> <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 { export default {
components: {CustomLoading},
data() { data() {
return { 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: { 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> </script>
@@ -23,3 +131,4 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>

View File

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

View File

@@ -23,7 +23,7 @@ module.exports = {
port: 1888, port: 1888,
proxy: { proxy: {
"/api": { "/api": {
target: 'http://10.165.0.173:8000', target: 'http://localhost:8000',
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {