统计分析

This commit is contained in:
du 2024-03-18 17:34:11 +08:00
parent 74ae5eca02
commit 1d5060b1f4
9 changed files with 304 additions and 222 deletions

View File

@ -3,19 +3,32 @@ import request from "@/utils/request";
/**
*
*/
export function personnelTypeStatistic() {
export function personnelTypeStatistic(params) {
return request({
url: `/admin/statistic/personnelTypeStatistic`,
method: "GET",
params:params
});
}
/**
*
*/
export function domicileStatistic() {
export function domicileStatistic(params) {
return request({
url: `/admin/statistic/domicileStatistic`,
method: "GET",
params:params
});
}
/**
*
*/
export function workStatistic(params) {
return request({
url: `/admin/statistic/workStatistic/`,
method: "GET",
params:params
});
}

View File

@ -23,10 +23,10 @@
v-model="formData.orgname"
/>
</el-form-item>
<el-form-item prop="orgcode" label="所属区域">
<el-form-item prop="superiororgcode" label="所属区域">
<el-cascader
ref="cascader"
v-model="formData.orgcode"
v-model="formData.superiororgcode"
placeholder="请选择地区"
:options="orgList"
:props="{
@ -92,16 +92,16 @@ const handleSubmit = () => {
if (valid) {
let params = {
orgname:formData.value.orgname,
// orgcode:'',
orgcode:formData.value.orgcode?formData.value.orgcode:'',
sortId:formData.value.sortId,
charger:formData.value.charger,
telephone:formData.value.telephone,
orgcode:formData.value.orgcode?formData.value.orgcode:null,
superiororgcode:'',
};
if (formData.value.orgcode instanceof Array) {
params.orgcode = formData.value.orgcode[formData.value.orgcode.length - 1];
if (formData.value.superiororgcode instanceof Array) {
params.superiororgcode = formData.value.superiororgcode[formData.value.superiororgcode.length - 1];
}else{
params.orgcode = formData.value.orgcode;
params.superiororgcode = formData.value.superiororgcode;
};
orgAdd(params).then((res: any) => {
if (res.code == 1) {
@ -141,7 +141,7 @@ onMounted(() => {
watch(
() => props.form,
(val: any) => {
titleName.value = val.id ? "编辑" : "新增";
titleName.value = val.orgcode ? "编辑" : "新增";
formData.value = JSON.parse(JSON.stringify(val));
}

View File

@ -3,11 +3,38 @@
<div>
<div class="h-layout space-between h-center">
<div>
<div class="h-layout">
<div class="h-layout h-center">
<div class="tool-item" @click="getList">
<svg-icon name="refurbish" class="icon" />
<span>刷新</span>
</div>
<div class="label-select filter-tab">
<label>工作类型</label>
<el-select
v-model="search.wkTypeId"
@change="getList"
clearable
placeholder="请选择"
>
<el-option v-for="(item,index) in tabs" :key="index" :label="item.typeName" :value="item.typeId"></el-option>
</el-select>
</div>
<div class="label-select filter-tab">
<label>地区选择</label>
<el-cascader
ref="cascader"
v-model="search.orgCode"
@change="getList"
placeholder="请选择地区"
:options="orgList"
:props="{
checkStrictly: true,
label: 'orgname',
value: 'orgcode',
}"
clearable
></el-cascader>
</div>
</div>
</div>
</div>
@ -20,117 +47,76 @@
border
>
<el-table-column
prop="cName"
prop="orgName"
align="center"
:resizable="true"
label="村名"
>
<template #default="scope">
<span>{{scope.row.orgName?scope.row.orgName:'--'}}</span>
</template>
</el-table-column>
<el-table-column
prop="aa"
align="center"
:resizable="true"
label="常规工作"
>
<el-table-column
prop="a"
align="center"
label="进行中"
>
</el-table-column>
<el-table-column
prop="b"
align="center"
label="已完成"
></el-table-column>
</el-table-column>
<el-table-column
prop="bb"
:resizable="true"
align="center"
label="督办工作"
>
<el-table-column
prop="a"
align="center"
label="进行中"
></el-table-column>
<el-table-column
prop="b"
align="center"
label="已完成"
></el-table-column>
</el-table-column>
<el-table-column
prop="yj"
:resizable="true"
align="center"
label="应急工作"
>
<el-table-column
prop="cz"
align="center"
label="进行中"
></el-table-column>
<el-table-column
prop="cz"
align="center"
label="已完成"
></el-table-column>
</el-table-column>
<el-table-column
prop="dj"
:resizable="true"
align="center"
label="党建工作"
>
<el-table-column
prop="cz"
align="center"
label="进行中"
></el-table-column>
<el-table-column
prop="cz"
align="center"
label="已完成"
></el-table-column>
</el-table-column>
<el-table-column prop="ongoing" align="center" label="进行中"></el-table-column>
<el-table-column prop="completed" align="center" label="已完成"></el-table-column>
</el-table>
<!-- <el-table-column key="年" label="每月达标率(%">
<el-table-column
v-for="(item, index) in months"
:key="item"
:label="item"
>
<template #default="scope">
<span>{{ scope.row.monthData[index].complianceRate }}</span>
</template>
</el-table-column> -->
<!-- 分页 -->
<el-pagination
class="pagination"
@size-change="getList"
@current-change="getList"
v-model:current-page="currentPage"
:page-sizes="[10, 15, 20, 30]"
v-model:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
background
>
</el-pagination>
</div>
</template>
<script lang='ts' setup>
import { onMounted, reactive, ref } from "vue";
import { ElMessageBox } from "element-plus";
import { wkTypes } from "@/api/Work";
import { workStatistic } from "@/api/statistic";
const search = ref([]);
const currentPage = ref(1);
const pageSize = ref(10);
const total = ref(0);
const tableData = ref([{ cName: "xxx村名",aa:{a:1,b:2},bb:[{a:'1',b:'2'}] }, { cName: "xxx村名" }]);
import { areaTree } from "@/api/account";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore();
const user = ref(JSON.parse(userStore.userInfo));
const userId = ref(user.value.userId);
const search = ref({wkTypeId: "",orgCode: "",});
const tableData = ref([]);
//
const tabs = ref([]);
const getWkTypes = ()=>{
let params = {
classify:1
}
wkTypes(params).then((res: any) => {
tabs.value = res.data;
search.value.wkTypeId = res.data[0].typeId
});
}
//
const tableDataloading = ref(false);
const getWorkStatistic = () => {
tableDataloading.value = true;
let params = {
orgCode:search.value.orgCode?search.value.orgCode[search.value.orgCode.length-1]:'',
wkTypeId:search.value.wkTypeId?search.value.wkTypeId:'',
};
workStatistic(params).then((res: any) => {
console.log(res,'res====>');
tableData.value = res.data;
tableDataloading.value = false;
});
};
const getList = ()=>{
getWorkStatistic();
}
//
const orgList = ref([]);
const getareaTree = () => {
areaTree(userId.value).then((res: any) => {
orgList.value = res.data;
});
};
onMounted(() => {
getWkTypes();
getareaTree();
getList();
});
</script>
<style lang="scss" scoped>

View File

@ -3,14 +3,30 @@
<div>
<div class="h-layout space-between h-center">
<div>
<div class="h-layout">
<div class="h-layout h-center">
<div class="tool-item" @click="getList">
<svg-icon name="refurbish" class="icon" />
<span>刷新</span>
</div>
<div class="tool-item">
<!-- <div class="tool-item">
<svg-icon name="export" class="icon" />
<span>导出</span>
</div> -->
<div class="label-select filter-tab">
<label>地区选择</label>
<el-cascader
ref="cascader"
v-model="search.orgCode"
@change="getList"
placeholder="请选择地区"
:options="orgList"
:props="{
checkStrictly: true,
label: 'orgname',
value: 'orgcode',
}"
clearable
></el-cascader>
</div>
</div>
</div>
@ -29,6 +45,9 @@
:resizable="true"
label="村名"
>
<template #default="scope">
<span>{{scope.row.orgName?scope.row.orgName:'--'}}</span>
</template>
</el-table-column>
<el-table-column prop="localNum" :resizable="true" align="center" label="本地户籍">
</el-table-column>
@ -55,7 +74,12 @@
import { onMounted, reactive, ref } from "vue";
import { ElMessageBox } from "element-plus";
import { domicileStatistic } from "@/api/statistic";
const search = ref([]);
import { areaTree } from "@/api/account";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore();
const user = ref(JSON.parse(userStore.userInfo));
const userId = ref(user.value.userId);
const search = ref({orgCode: "",});
const currentPage = ref(1);
const pageSize = ref(10);
const total = ref(0);
@ -63,21 +87,28 @@ const tableData = ref([]);
const tableDataloading = ref(false);
const getDomicileStatistic = () => {
tableDataloading.value = true;
// let params = {
// limit: pageSize.value,
// page: currentPage.value,
// };
domicileStatistic().then((res: any) => {
let params = {
orgCode:search.value.orgCode?search.value.orgCode[search.value.orgCode.length-1]:'',
};
domicileStatistic(params).then((res: any) => {
tableData.value = res.data;
total.value = res.data.total;
tableDataloading.value = false;
});
};
//
const orgList = ref([]);
const getareaTree = () => {
areaTree(userId.value).then((res: any) => {
orgList.value = res.data;
});
};
const getList = () => {
getDomicileStatistic()
getDomicileStatistic();
}
onMounted(() => {
getDomicileStatistic();
getareaTree();
getList();
});
</script>

View File

@ -3,14 +3,30 @@
<div>
<div class="h-layout space-between h-center">
<div>
<div class="h-layout">
<div class="h-layout h-center">
<div class="tool-item" @click="getList">
<svg-icon name="refurbish" class="icon" />
<span>刷新</span>
</div>
<div class="tool-item">
<!-- <div class="tool-item">
<svg-icon name="export" class="icon" />
<span>导出</span>
</div> -->
<div class="label-select filter-tab">
<label>地区选择</label>
<el-cascader
ref="cascader"
v-model="search.orgCode"
@change="getList"
placeholder="请选择地区"
:options="orgList"
:props="{
checkStrictly: true,
label: 'orgname',
value: 'orgcode',
}"
clearable
></el-cascader>
</div>
</div>
</div>
@ -29,19 +45,22 @@
align="center"
label="村名"
>
<template #default="scope">
{{scope.row.orgName?scope.row.orgName:'--'}}
</template>
</el-table-column>
<el-table-column
v-for="(item, index) in months"
:key="item"
:label="item"
>
<template #default="scope">
<span>{{ scope.row.typeList[index].typeNum }}</span>
</template>
</el-table-column>
<el-table-column
v-for="(item, index) in months"
:key="item"
:label="item"
>
<template #default="scope">
<span>{{ scope.row.typeList[index].typeNum }}</span>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
<!-- <el-pagination
class="pagination"
v-model:current-page="currentPage"
:page-sizes="[10, 15, 20, 30]"
@ -50,7 +69,7 @@
:total="total"
background
>
</el-pagination>
</el-pagination> -->
</div>
</template>
@ -58,35 +77,52 @@
import { onMounted, reactive, ref } from "vue";
import { ElMessageBox } from "element-plus";
import { personnelTypeStatistic } from "@/api/statistic";
import { areaTree } from "@/api/account";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore();
const user = ref(JSON.parse(userStore.userInfo));
const userId = ref(user.value.userId);
const search = ref([]);
const search = ref({ orgCode: "" });
const currentPage = ref(1);
const pageSize = ref(10);
const total = ref(0);
const tableData = ref([]);
const tableDataloading = ref(false);
//
const months= ref([])
const months = ref([]);
const getpersonnelTypeStatistic = () => {
tableDataloading.value = true;
// let params = {
// limit: pageSize.value,
// page: currentPage.value,
// };
personnelTypeStatistic().then((res: any) => {
let params = {
orgCode: search.value.orgCode
? search.value.orgCode[search.value.orgCode.length - 1]
: "",
};
personnelTypeStatistic(params).then((res: any) => {
months.value = [];
res.data[0].typeList.forEach(item => {
months.value.push(item.typeName);
});
if (res.data[0].typeList) {
res.data[0].typeList.forEach((item) => {
if (item.typeName) {
months.value.push(item.typeName);
}
});
}
tableData.value = res.data;
total.value = res.data.total;
tableDataloading.value = false;
});
};
const getList = () => {
getpersonnelTypeStatistic()
}
getpersonnelTypeStatistic();
};
//
const orgList = ref([]);
const getareaTree = () => {
areaTree(userId.value).then((res: any) => {
orgList.value = res.data;
});
};
onMounted(() => {
getareaTree();
getList();
});
</script>

View File

@ -7,7 +7,7 @@
:model="formData"
class="center-form"
>
<el-form-item label="文件上传接口" style="width: 94%">
<el-form-item label="文件上传接口" style="width: 94%;">
<el-input placeholder="请输入" type="input" v-model="formData.name" />
</el-form-item>
</el-form>
@ -43,30 +43,32 @@ const save = () => {
<style lang="scss" scoped>
.content {
width: 100%;
height: fit-content;
background: #fff;
border-radius: 0.26042vw;
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1);
padding: 0.83333vw;
overflow-y: auto;
overflow-x: hidden !important;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-o-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
position: relative;
.option {
bottom: 10px;
display: flex;
align-items: center;
justify-content: center;
.btn {
width: 10vw;
width: 100%;
height: fit-content;
background: #fff;
border-radius: 0.26042vw;
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
padding: 0.83333vw;
overflow-y: auto;
overflow-x: hidden !important;
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-o-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-ms-box-sizing: border-box;
box-sizing: border-box;
position: relative;
.option {
bottom: 10px;
display: flex;
align-items: center;
justify-content: center;
.btn {
width: 10vw;
}
}
}
}
</style>

View File

@ -7,17 +7,17 @@
:model="formData"
class="center-form"
>
<el-form-item label="系统名称" style="width: 94%">
<el-form-item label="系统名称" style="width: 94%;">
<el-input placeholder="请输入" type="input" v-model="formData.name" />
</el-form-item>
<el-form-item label="版权信息" style="width: 94%">
<el-form-item label="版权信息" style="width: 94%;">
<el-input
placeholder="请输入"
type="input"
v-model="formData.address"
/>
</el-form-item>
<el-form-item label="logo图标" style="width: 94%">
<el-form-item label="logo图标" style="width: 94%;">
<file-upload OTCType="logo" :uuid="uuid" userId="123" />
</el-form-item>
</el-form>
@ -38,6 +38,7 @@ const uuid = ref(getUUID());
* 保存
*/
const save = () => {
console.log(formData.value,'formData==>');
};
</script>
@ -48,23 +49,26 @@ const save = () => {
height: fit-content;
background: #fff;
border-radius: 0.26042vw;
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1);
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
padding: 0.83333vw;
overflow-y: auto;
overflow-x: hidden !important;
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-o-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-ms-box-sizing: border-box;
/* stylelint-disable-next-line indentation */
box-sizing: border-box;
position: relative;
.option {
bottom: 10px;
display: flex;
align-items: center;
justify-content: center;
.btn {
width: 10vw;
}

View File

@ -40,49 +40,54 @@ const getMsg = (val) => {
<style lang="scss" scoped>
.percentage-content {
height: auto;
height: auto;
display: flex;
flex-direction: column;
.rg {
padding: 16px;
background: #fff;
box-shadow: 0 0 6px rgb(0 120 255 / 10%);
border-radius: 6px;
display: flex;
flex-direction: row;
margin-bottom: 10px;
:deep(.el-radio-button__inner) {
min-width: 150px;
}
}
.content {
width: 100%;
background: #fff;
border-radius: 0.26042vw;
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
padding: 0.83333vw;
overflow-y: auto;
overflow-x: hidden !important;
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-o-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-ms-box-sizing: border-box;
/* stylelint-disable-next-line indentation */
box-sizing: border-box;
position: relative;
display: flex;
flex-direction: column;
.rg {
padding: 16px;
background: #fff;
box-shadow: 0 0 6px rgb(0 120 255 / 10%);
border-radius: 6px;
display: flex;
flex-direction: row;
margin-bottom: 10px;
:deep(.el-radio-button__inner) {
min-width: 150px;
}
.qedit {
height: 63vh;
}
.content {
width: 100%;
background: #fff;
border-radius: 0.26042vw;
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
padding: 0.83333vw;
overflow-y: auto;
overflow-x: hidden !important;
box-sizing: border-box;
box-sizing: border-box;
box-sizing: border-box;
box-sizing: border-box;
box-sizing: border-box;
position: relative;
display: flex;
flex-direction: column;
.qedit {
height: 63vh;
}
.option {
margin: 50px 0 10px;
display: flex;
align-items: center;
justify-content: center;
.btn {
width: 10vw;
}
}
.option {
margin: 50px 0 10px;
display: flex;
align-items: center;
justify-content: center;
.btn {
width: 10vw;
}
}
}
}
</style>

View File

@ -8,17 +8,17 @@
label-width="130"
class="center-form"
>
<el-form-item label="初始密码" style="width: 94%">
<el-form-item label="初始密码" style="width: 94%;">
<el-input placeholder="请输入" type="input" v-model="formData.pwd" />
</el-form-item>
<el-form-item label="强制修改密码时间" style="width: 94%">
<el-form-item label="强制修改密码时间" style="width: 94%;">
<el-input
placeholder="请输入"
type="input"
v-model="formData.address"
/>
</el-form-item>
<el-form-item label="接口加密类型" style="width: 94%">
<el-form-item label="接口加密类型" style="width: 94%;">
<el-input
placeholder="请输入"
type="input"
@ -42,27 +42,32 @@ const uuid = ref(getUUID());
<style lang="scss" scoped>
.content {
/* stylelint-disable-next-line indentation */
width: 100%;
height: fit-content;
background: #fff;
border-radius: 0.26042vw;
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1);
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
padding: 0.83333vw;
overflow-y: auto;
/* stylelint-disable-next-line indentation */
overflow-x: hidden !important;
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-o-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-ms-box-sizing: border-box;
/* stylelint-disable-next-line indentation */
box-sizing: border-box;
position: relative;
.option {
bottom: 10px;
display: flex;
align-items: center;
justify-content: center;
.btn {
width: 10vw;
}