统计分析

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

View File

@ -3,11 +3,38 @@
<div> <div>
<div class="h-layout space-between h-center"> <div class="h-layout space-between h-center">
<div> <div>
<div class="h-layout"> <div class="h-layout h-center">
<div class="tool-item" @click="getList"> <div class="tool-item" @click="getList">
<svg-icon name="refurbish" class="icon" /> <svg-icon name="refurbish" class="icon" />
<span>刷新</span> <span>刷新</span>
</div> </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> </div>
</div> </div>
@ -20,117 +47,76 @@
border border
> >
<el-table-column <el-table-column
prop="cName" prop="orgName"
align="center" align="center"
:resizable="true" :resizable="true"
label="村名" label="村名"
>
</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>
<!-- <el-table-column key="年" label="每月达标率(%">
<el-table-column
v-for="(item, index) in months"
:key="item"
:label="item"
> >
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.monthData[index].complianceRate }}</span> <span>{{scope.row.orgName?scope.row.orgName:'--'}}</span>
</template> </template>
</el-table-column> --> </el-table-column>
<!-- 分页 --> <el-table-column prop="ongoing" align="center" label="进行中"></el-table-column>
<el-pagination <el-table-column prop="completed" align="center" label="已完成"></el-table-column>
class="pagination" </el-table>
@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> </div>
</template> </template>
<script lang='ts' setup> <script lang='ts' setup>
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
import { ElMessageBox } from "element-plus"; import { ElMessageBox } from "element-plus";
import { wkTypes } from "@/api/Work";
import { workStatistic } from "@/api/statistic";
const search = ref([]); import { areaTree } from "@/api/account";
const currentPage = ref(1); import useUserStore from "@/store/modules/user";
const pageSize = ref(10); const userStore = useUserStore();
const total = ref(0); const user = ref(JSON.parse(userStore.userInfo));
const tableData = ref([{ cName: "xxx村名",aa:{a:1,b:2},bb:[{a:'1',b:'2'}] }, { cName: "xxx村名" }]); 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -3,14 +3,30 @@
<div> <div>
<div class="h-layout space-between h-center"> <div class="h-layout space-between h-center">
<div> <div>
<div class="h-layout"> <div class="h-layout h-center">
<div class="tool-item" @click="getList"> <div class="tool-item" @click="getList">
<svg-icon name="refurbish" class="icon" /> <svg-icon name="refurbish" class="icon" />
<span>刷新</span> <span>刷新</span>
</div> </div>
<div class="tool-item"> <!-- <div class="tool-item">
<svg-icon name="export" class="icon" /> <svg-icon name="export" class="icon" />
<span>导出</span> <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> </div>
</div> </div>
@ -29,6 +45,9 @@
:resizable="true" :resizable="true"
label="村名" label="村名"
> >
<template #default="scope">
<span>{{scope.row.orgName?scope.row.orgName:'--'}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="localNum" :resizable="true" align="center" label="本地户籍"> <el-table-column prop="localNum" :resizable="true" align="center" label="本地户籍">
</el-table-column> </el-table-column>
@ -55,7 +74,12 @@
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
import { ElMessageBox } from "element-plus"; import { ElMessageBox } from "element-plus";
import { domicileStatistic } from "@/api/statistic"; 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 currentPage = ref(1);
const pageSize = ref(10); const pageSize = ref(10);
const total = ref(0); const total = ref(0);
@ -63,21 +87,28 @@ const tableData = ref([]);
const tableDataloading = ref(false); const tableDataloading = ref(false);
const getDomicileStatistic = () => { const getDomicileStatistic = () => {
tableDataloading.value = true; tableDataloading.value = true;
// let params = { let params = {
// limit: pageSize.value, orgCode:search.value.orgCode?search.value.orgCode[search.value.orgCode.length-1]:'',
// page: currentPage.value, };
// }; domicileStatistic(params).then((res: any) => {
domicileStatistic().then((res: any) => {
tableData.value = res.data; tableData.value = res.data;
total.value = res.data.total; total.value = res.data.total;
tableDataloading.value = false; tableDataloading.value = false;
}); });
}; };
//
const orgList = ref([]);
const getareaTree = () => {
areaTree(userId.value).then((res: any) => {
orgList.value = res.data;
});
};
const getList = () => { const getList = () => {
getDomicileStatistic() getDomicileStatistic();
} }
onMounted(() => { onMounted(() => {
getDomicileStatistic(); getareaTree();
getList();
}); });
</script> </script>

View File

@ -3,14 +3,30 @@
<div> <div>
<div class="h-layout space-between h-center"> <div class="h-layout space-between h-center">
<div> <div>
<div class="h-layout"> <div class="h-layout h-center">
<div class="tool-item" @click="getList"> <div class="tool-item" @click="getList">
<svg-icon name="refurbish" class="icon" /> <svg-icon name="refurbish" class="icon" />
<span>刷新</span> <span>刷新</span>
</div> </div>
<div class="tool-item"> <!-- <div class="tool-item">
<svg-icon name="export" class="icon" /> <svg-icon name="export" class="icon" />
<span>导出</span> <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> </div>
</div> </div>
@ -29,6 +45,9 @@
align="center" align="center"
label="村名" label="村名"
> >
<template #default="scope">
{{scope.row.orgName?scope.row.orgName:'--'}}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-for="(item, index) in months" v-for="(item, index) in months"
@ -41,7 +60,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<el-pagination <!-- <el-pagination
class="pagination" class="pagination"
v-model:current-page="currentPage" v-model:current-page="currentPage"
:page-sizes="[10, 15, 20, 30]" :page-sizes="[10, 15, 20, 30]"
@ -50,7 +69,7 @@
:total="total" :total="total"
background background
> >
</el-pagination> </el-pagination> -->
</div> </div>
</template> </template>
@ -58,35 +77,52 @@
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
import { ElMessageBox } from "element-plus"; import { ElMessageBox } from "element-plus";
import { personnelTypeStatistic } from "@/api/statistic"; 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 currentPage = ref(1);
const pageSize = ref(10); const pageSize = ref(10);
const total = ref(0); const total = ref(0);
const tableData = ref([]); const tableData = ref([]);
const tableDataloading = ref(false); const tableDataloading = ref(false);
// //
const months= ref([]) const months = ref([]);
const getpersonnelTypeStatistic = () => { const getpersonnelTypeStatistic = () => {
tableDataloading.value = true; tableDataloading.value = true;
// let params = { let params = {
// limit: pageSize.value, orgCode: search.value.orgCode
// page: currentPage.value, ? search.value.orgCode[search.value.orgCode.length - 1]
// }; : "",
personnelTypeStatistic().then((res: any) => { };
personnelTypeStatistic(params).then((res: any) => {
months.value = []; months.value = [];
res.data[0].typeList.forEach(item => { if (res.data[0].typeList) {
res.data[0].typeList.forEach((item) => {
if (item.typeName) {
months.value.push(item.typeName); months.value.push(item.typeName);
}
}); });
}
tableData.value = res.data; tableData.value = res.data;
total.value = res.data.total;
tableDataloading.value = false; tableDataloading.value = false;
}); });
}; };
const getList = () => { const getList = () => {
getpersonnelTypeStatistic() getpersonnelTypeStatistic();
} };
//
const orgList = ref([]);
const getareaTree = () => {
areaTree(userId.value).then((res: any) => {
orgList.value = res.data;
});
};
onMounted(() => { onMounted(() => {
getareaTree();
getList(); getList();
}); });
</script> </script>

View File

@ -7,7 +7,7 @@
:model="formData" :model="formData"
class="center-form" 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-input placeholder="请输入" type="input" v-model="formData.name" />
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -47,23 +47,25 @@ const save = () => {
height: fit-content; height: fit-content;
background: #fff; background: #fff;
border-radius: 0.26042vw; 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; padding: 0.83333vw;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden !important; overflow-x: hidden !important;
/* stylelint-disable-next-line property-no-vendor-prefix */
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-o-box-sizing: border-box; -o-box-sizing: border-box;
/* stylelint-disable-next-line property-no-vendor-prefix */
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.option { .option {
bottom: 10px; bottom: 10px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.btn { .btn {
width: 10vw; width: 10vw;
} }

View File

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

View File

@ -63,10 +63,15 @@ const getMsg = (val) => {
padding: 0.83333vw; padding: 0.83333vw;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden !important; overflow-x: hidden !important;
box-sizing: border-box; /* stylelint-disable-next-line property-no-vendor-prefix */
box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; /* stylelint-disable-next-line property-no-vendor-prefix */
box-sizing: border-box; -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; box-sizing: border-box;
position: relative; position: relative;
display: flex; display: flex;

View File

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