|
@@ -0,0 +1,489 @@
|
|
|
+<template>
|
|
|
+ <div class="card-search">
|
|
|
+ <a-form
|
|
|
+ ref="formRef"
|
|
|
+ name="advanced_search"
|
|
|
+ class="ant-advanced-search-form"
|
|
|
+ :model="searchParams"
|
|
|
+ >
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item label="日期" :label-col="{ span: 8 }" name="emphasisTypeId">
|
|
|
+ <a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']" v-model:value="reportDate"
|
|
|
+ @change="onRangeChange"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6" style="text-align: left">
|
|
|
+ <a-button type="primary" html-type="submit" @click="onFinish">查询</a-button>
|
|
|
+ <a-button
|
|
|
+ style="margin: 0 8px"
|
|
|
+ @click="
|
|
|
+ () => {
|
|
|
+ formRef.resetFields();
|
|
|
+ onFinish();
|
|
|
+ }
|
|
|
+ ">重置
|
|
|
+ </a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <a-row class="edit-operation" style="margin-bottom: 20px">
|
|
|
+ <a-col :span="24" class="flex-space-between">
|
|
|
+ <div>
|
|
|
+ <a-radio-group v-model:value="searchType" button-style="solid" @change="searchTypeChange">
|
|
|
+ <a-radio-button value="companyCount">各区县企业入库与走访情况统计</a-radio-button>
|
|
|
+ <a-radio-button value="workSituationCount">各区县企业用工人数与岗位招聘人数统计</a-radio-button>
|
|
|
+ <a-radio-button value="industryWorkSituationCount">各行业企业用工人数与岗位招聘人数统计</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- 数据展示 -->
|
|
|
+ <!-- 企业入库与走访情况统计 -->
|
|
|
+ <div v-show="searchType == 'companyCount'">
|
|
|
+ <a-table :columns="companyCountDataTableColumns" :data-source="companyCountDataList"
|
|
|
+ :scroll="{ x:'100%' }"
|
|
|
+ :loading="searchLoading"
|
|
|
+ :pagination="false"
|
|
|
+ bordered>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+ <!-- 企业用工人数与岗位招聘人数统计 -->
|
|
|
+ <div v-show="searchType == 'workSituationCount'">
|
|
|
+ <a-table :columns="workSituationCountDataTableColumns" :data-source="workSituationCountDataList"
|
|
|
+ :scroll="{ x:'100%' }"
|
|
|
+ :loading="searchLoading"
|
|
|
+ :pagination="false"
|
|
|
+ bordered>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+ <!-- 企业用工人数与岗位招聘人数统计 -->
|
|
|
+ <div v-show="searchType == 'industryWorkSituationCount'">
|
|
|
+ <a-table :columns="industryWorkSituationCountDataTableColumns" :data-source="industryWorkSituationCountDataList"
|
|
|
+ :scroll="{ x:'100%' }"
|
|
|
+ :loading="searchLoading"
|
|
|
+ :pagination="false"
|
|
|
+ bordered>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import {onMounted, reactive, ref} from "vue";
|
|
|
+import type {RangeValue} from "ant-design-vue/es/vc-picker/interface";
|
|
|
+import dayjs from "dayjs";
|
|
|
+import {getSysDictionaryList} from "@/api/system/dictionary";
|
|
|
+import {
|
|
|
+ getIndustryCompanyWorkSituationCount,
|
|
|
+ getRegionCompanyModelCompanyCount,
|
|
|
+ getRegionCompanyWorkSituationCount
|
|
|
+} from "@/api/statistics";
|
|
|
+
|
|
|
+const searchParams = reactive({
|
|
|
+ startDate: "",
|
|
|
+ endDate: "",
|
|
|
+});
|
|
|
+const reportDate = ref<RangeValue<any>>();
|
|
|
+const searchType = ref("companyCount");
|
|
|
+const formRef = ref();
|
|
|
+const searchLoading = ref(false);
|
|
|
+const companyModelList = ref<Array<any>>();
|
|
|
+// 企业入库与走访情况统计表结构
|
|
|
+const companyCountDataTableColumns = ref<Array<any>>([
|
|
|
+ {
|
|
|
+ title: '区县', dataIndex: 'regionName', key: 'regionName', align: "center", width: 280
|
|
|
+ },
|
|
|
+]);
|
|
|
+const companyCountDataList = ref<Array<any>>([]);
|
|
|
+const companyCountKeyTemp = ref<Array<any>>([]);
|
|
|
+// 企业用工人数与岗位招聘人数统计表结构
|
|
|
+const workSituationCountDataTableColumns = ref<Array<any>>([
|
|
|
+ {
|
|
|
+ title: '区县', dataIndex: 'regionName', key: 'regionName', align: "center", width: 280
|
|
|
+ },
|
|
|
+]);
|
|
|
+const workSituationCountDataList = ref<Array<any>>([]);
|
|
|
+const workSituationCountKeyTemp = ref<Array<any>>([]);
|
|
|
+// 各行业企业用工人数与岗位招聘人数统计表结构
|
|
|
+const industryWorkSituationCountDataTableColumns = ref<Array<any>>([
|
|
|
+ {
|
|
|
+ title: '产业分类', dataIndex: 'estateCategoryName', key: 'estateCategoryName', align: "center", width: 150,
|
|
|
+ customCell: (record, index: any) => {
|
|
|
+ const obj = {
|
|
|
+ colSpan: 1,
|
|
|
+ rowSpan: 1,
|
|
|
+ };
|
|
|
+ if (record.estateCategoryName == '合计' || record.estateCategoryName == '小计') {
|
|
|
+ obj.colSpan = 3;
|
|
|
+ }
|
|
|
+ if (index === 0 || record.estateCategoryName !== industryWorkSituationCountDataList.value[index - 1].estateCategoryName) {
|
|
|
+ for (let i = index + 1; i < industryWorkSituationCountDataList.value.length; i++) {
|
|
|
+ if (industryWorkSituationCountDataList.value[i].estateCategoryName == record.estateCategoryName) {
|
|
|
+ obj.rowSpan++;
|
|
|
+ } else {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ obj.rowSpan = 0;
|
|
|
+ }
|
|
|
+ return obj;
|
|
|
+ },
|
|
|
+ }, {
|
|
|
+ title: '所属行业', dataIndex: 'parentIndustryName', key: 'parentIndustryName', align: "center", width: 150,
|
|
|
+ customCell: (record, index: any) => {
|
|
|
+ const obj = {
|
|
|
+ colSpan: 1,
|
|
|
+ rowSpan: 1,
|
|
|
+ };
|
|
|
+ if (record.estateCategoryName == '合计' || record.estateCategoryName == '小计') {
|
|
|
+ obj.colSpan = 0;
|
|
|
+ }
|
|
|
+ if (index === 0 || record.parentIndustryName !== industryWorkSituationCountDataList.value[index - 1].parentIndustryName) {
|
|
|
+ for (let i = index + 1; i < industryWorkSituationCountDataList.value.length; i++) {
|
|
|
+ if (industryWorkSituationCountDataList.value[i].parentIndustryName == record.parentIndustryName) {
|
|
|
+ obj.rowSpan++;
|
|
|
+ } else {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ obj.rowSpan = 0;
|
|
|
+ }
|
|
|
+ return obj;
|
|
|
+ },
|
|
|
+ }, {
|
|
|
+ title: '行业名称', dataIndex: 'industryName', key: 'industryName', align: "center", width: 200,
|
|
|
+ customCell: (record) => {
|
|
|
+ const obj = {
|
|
|
+ colSpan: 1,
|
|
|
+ rowSpan: 1,
|
|
|
+ };
|
|
|
+ if (record.estateCategoryName == '合计' || record.estateCategoryName == '小计') {
|
|
|
+ obj.colSpan = 0;
|
|
|
+ }
|
|
|
+ return obj;
|
|
|
+ },
|
|
|
+ },
|
|
|
+]);
|
|
|
+const industryWorkSituationCountDataList = ref<Array<any>>([]);
|
|
|
+const industryWorkSituationCountKeyTemp = ref<Array<any>>([]);
|
|
|
+
|
|
|
+// 时间段变更事件
|
|
|
+const onRangeChange = (dateString: [string, string]) => {
|
|
|
+ searchParams.startDate = dateString != null ? dayjs(dateString[0]).format("YYYY-MM-DD") : "";
|
|
|
+ searchParams.endDate = dateString != null ? dayjs(dateString[1]).format("YYYY-MM-DD") : "";
|
|
|
+ onFinish();
|
|
|
+};
|
|
|
+
|
|
|
+function onFinish() {
|
|
|
+ searchTypeChange();
|
|
|
+}
|
|
|
+
|
|
|
+// 获取企业规模
|
|
|
+function getCompanyModel() {
|
|
|
+ getSysDictionaryList("CompanyModel").then((result: any) => {
|
|
|
+ companyModelList.value = result;
|
|
|
+ // 生成表结构
|
|
|
+ result.forEach((item: any) => {
|
|
|
+ const key = 'companyModel' + item.value;
|
|
|
+ // 企业入库与走访情况统计表结构
|
|
|
+ companyCountKeyTemp.value.push(...[key + 'Count', key + 'SigninCount']);
|
|
|
+ companyCountDataTableColumns.value.push({
|
|
|
+ title: item.name, dataIndex: key, key, align: "center",
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '入库',
|
|
|
+ dataIndex: key + 'Count',
|
|
|
+ key: key + 'Count',
|
|
|
+ align: "center"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '走访',
|
|
|
+ dataIndex: key + 'SigninCount',
|
|
|
+ key: key + 'SigninCount',
|
|
|
+ align: "center"
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ // 区县企业用工人数与岗位招聘人数统计表结构
|
|
|
+ workSituationCountKeyTemp.value.push(...[key + 'WorkSituationCount', key + 'RecruitCount']);
|
|
|
+ workSituationCountDataTableColumns.value.push({
|
|
|
+ title: item.name, dataIndex: key, key, align: "center",
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '用工人数',
|
|
|
+ dataIndex: key + 'WorkSituationCount',
|
|
|
+ key: key + 'WorkSituationCount',
|
|
|
+ align: "center"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '岗位人数',
|
|
|
+ dataIndex: key + 'RecruitCount',
|
|
|
+ key: key + 'RecruitCount',
|
|
|
+ align: "center"
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ // 行业企业用工人数与岗位招聘人数统计表结构
|
|
|
+ industryWorkSituationCountKeyTemp.value.push(...[key + 'WorkSituationCount', key + 'RecruitCount']);
|
|
|
+ industryWorkSituationCountDataTableColumns.value.push({
|
|
|
+ title: item.name, dataIndex: key, key, align: "center",
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '用工人数',
|
|
|
+ dataIndex: key + 'WorkSituationCount',
|
|
|
+ key: key + 'WorkSituationCount',
|
|
|
+ align: "center"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '岗位人数',
|
|
|
+ dataIndex: key + 'RecruitCount',
|
|
|
+ key: key + 'RecruitCount',
|
|
|
+ align: "center"
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ })
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+function searchTypeChange() {
|
|
|
+ if (searchType.value == "companyCount") {
|
|
|
+ searchLoading.value = true;
|
|
|
+ companyCountDataList.value = [];
|
|
|
+ getRegionCompanyModelCompanyCount({...searchParams}).then((result: any) => {
|
|
|
+ // 初始化合计数据
|
|
|
+ let count = {
|
|
|
+ regionCode: -1,
|
|
|
+ regionName: "合计",
|
|
|
+ }
|
|
|
+ // 初始化字段值为O
|
|
|
+ companyCountKeyTemp.value.forEach((key: any) => {
|
|
|
+ count[key] = 0;
|
|
|
+ })
|
|
|
+ result.forEach((resItem: any) => {
|
|
|
+ const key = 'companyModel' + resItem.companyModel;
|
|
|
+ // 查询获取区县数据的下标,保证每个区县只存在一条数据
|
|
|
+ const findIndex = companyCountDataList.value.findIndex((find: any) => find.regionCode == resItem.regionCode);
|
|
|
+ if (findIndex > -1) {
|
|
|
+ // 区县已存在,修改这条数据
|
|
|
+ if (resItem.companyCount > 0) {
|
|
|
+ companyCountDataList.value[findIndex][key + 'Count'] = resItem.companyCount;
|
|
|
+ count[key + 'Count'] += resItem.companyCount;
|
|
|
+ }
|
|
|
+ if (resItem.signinCompanyCount > 0) {
|
|
|
+ companyCountDataList.value[findIndex][key + 'SigninCount'] = resItem.signinCompanyCount;
|
|
|
+ count[key + 'SigninCount'] += resItem.signinCompanyCount;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 不存在,新增一条数据
|
|
|
+ const newData = {
|
|
|
+ regionCode: resItem.regionCode,
|
|
|
+ regionName: resItem.regionName,
|
|
|
+ }
|
|
|
+ companyCountKeyTemp.value.forEach((key: any) => {
|
|
|
+ newData[key] = 0;
|
|
|
+ })
|
|
|
+ if (resItem.companyCount > 0) {
|
|
|
+ newData[key + 'Count'] = resItem.companyCount;
|
|
|
+ count[key + 'Count'] += resItem.companyCount;
|
|
|
+ }
|
|
|
+ if (resItem.signinCompanyCount > 0) {
|
|
|
+ newData[key + 'SigninCount'] = resItem.signinCompanyCount;
|
|
|
+ count[key + 'SigninCount'] += resItem.signinCompanyCount;
|
|
|
+ }
|
|
|
+ companyCountDataList.value.push(newData);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log(count);
|
|
|
+ companyCountDataList.value.push(count);
|
|
|
+ }).finally(() => {
|
|
|
+ searchLoading.value = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (searchType.value == "workSituationCount") {
|
|
|
+ searchLoading.value = true;
|
|
|
+ workSituationCountDataList.value = [];
|
|
|
+ getRegionCompanyWorkSituationCount({...searchParams}).then((result: any) => {
|
|
|
+ // 初始化合计数据
|
|
|
+ let count = {
|
|
|
+ regionCode: -1,
|
|
|
+ regionName: "合计",
|
|
|
+ }
|
|
|
+ // 初始化字段值为O
|
|
|
+ workSituationCountKeyTemp.value.forEach((key: any) => {
|
|
|
+ count[key] = 0;
|
|
|
+ });
|
|
|
+ result.forEach((resItem: any) => {
|
|
|
+ const key = 'companyModel' + resItem.companyModel;
|
|
|
+ // 查询获取区县数据的下标,保证每个区县只存在一条数据
|
|
|
+ const findIndex = workSituationCountDataList.value.findIndex((find: any) => find.regionCode == resItem.regionCode);
|
|
|
+ if (findIndex > -1) {
|
|
|
+ // 区县已存在,修改这条数据
|
|
|
+ if (resItem.workSituationCount > 0) {
|
|
|
+ workSituationCountDataList.value[findIndex][key + 'WorkSituationCount'] = resItem.workSituationCount;
|
|
|
+ count[key + 'WorkSituationCount'] += resItem.workSituationCount;
|
|
|
+ }
|
|
|
+ if (resItem.recruitCount > 0) {
|
|
|
+ workSituationCountDataList.value[findIndex][key + 'RecruitCount'] = resItem.recruitCount;
|
|
|
+ count[key + 'RecruitCount'] += resItem.recruitCount;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 不存在,新增一条数据
|
|
|
+ const newData = {
|
|
|
+ regionCode: resItem.regionCode,
|
|
|
+ regionName: resItem.regionName,
|
|
|
+ }
|
|
|
+ workSituationCountKeyTemp.value.forEach((key: any) => {
|
|
|
+ newData[key] = 0;
|
|
|
+ })
|
|
|
+ if (resItem.workSituationCount > 0) {
|
|
|
+ newData[key + 'WorkSituationCount'] = resItem.workSituationCount;
|
|
|
+ count[key + 'WorkSituationCount'] += resItem.workSituationCount;
|
|
|
+ }
|
|
|
+ if (resItem.recruitCount > 0) {
|
|
|
+ newData[key + 'RecruitCount'] = resItem.recruitCount;
|
|
|
+ count[key + 'RecruitCount'] += resItem.recruitCount;
|
|
|
+ }
|
|
|
+ workSituationCountDataList.value.push(newData);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ workSituationCountDataList.value.push(count);
|
|
|
+ }).finally(() => {
|
|
|
+ searchLoading.value = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (searchType.value == "industryWorkSituationCount") {
|
|
|
+ searchLoading.value = true;
|
|
|
+ industryWorkSituationCountDataList.value = [];
|
|
|
+ getIndustryCompanyWorkSituationCount({...searchParams}).then((result: any) => {
|
|
|
+ // 初始化合计数据
|
|
|
+ let count = {
|
|
|
+ estateCategoryId: -1,
|
|
|
+ estateCategoryName: "合计",
|
|
|
+ parentIndustryName: "合计",
|
|
|
+ industryName: "合计"
|
|
|
+ }
|
|
|
+ // 初始化字段值为O
|
|
|
+ industryWorkSituationCountKeyTemp.value.forEach((key: any) => {
|
|
|
+ count[key] = 0;
|
|
|
+ });
|
|
|
+ result.forEach((resItem: any) => {
|
|
|
+ const key = 'companyModel' + resItem.companyModel;
|
|
|
+ // 查询获取行业数据的下标,保证每个区县只存在一条数据
|
|
|
+ const findIndex = industryWorkSituationCountDataList.value.findIndex((find: any) => find.industryName == resItem.industryName);
|
|
|
+ if (findIndex > -1) {
|
|
|
+ // 行业已存在,修改这条数据
|
|
|
+ if (resItem.workSituationCount > 0) {
|
|
|
+ industryWorkSituationCountDataList.value[findIndex][key + 'WorkSituationCount'] = resItem.workSituationCount;
|
|
|
+ count[key + 'WorkSituationCount'] += resItem.workSituationCount;
|
|
|
+ }
|
|
|
+ if (resItem.recruitCount > 0) {
|
|
|
+ industryWorkSituationCountDataList.value[findIndex][key + 'RecruitCount'] = resItem.recruitCount;
|
|
|
+ count[key + 'RecruitCount'] += resItem.recruitCount;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 不存在,新增一条数据
|
|
|
+ const newData = {
|
|
|
+ parentIndustryName: resItem.parentIndustryName,
|
|
|
+ industryName: resItem.industryName,
|
|
|
+ }
|
|
|
+ setEstateCategoryName(newData);
|
|
|
+ industryWorkSituationCountKeyTemp.value.forEach((key: any) => {
|
|
|
+ newData[key] = 0;
|
|
|
+ })
|
|
|
+ if (resItem.workSituationCount > 0) {
|
|
|
+ newData[key + 'WorkSituationCount'] = resItem.workSituationCount;
|
|
|
+ count[key + 'WorkSituationCount'] += resItem.workSituationCount;
|
|
|
+ }
|
|
|
+ if (resItem.recruitCount > 0) {
|
|
|
+ newData[key + 'RecruitCount'] = resItem.recruitCount;
|
|
|
+ count[key + 'RecruitCount'] += resItem.recruitCount;
|
|
|
+ }
|
|
|
+ industryWorkSituationCountDataList.value.push(newData);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 按产业分类进行排序
|
|
|
+ industryWorkSituationCountDataList.value.sort((a, b) => a.estateCategoryId - b.estateCategoryId);
|
|
|
+ // 统计小计数据
|
|
|
+ calculateCategorySubtotal();
|
|
|
+ // 在末尾添加合计数据
|
|
|
+ industryWorkSituationCountDataList.value.push(count);
|
|
|
+ }).finally(() => {
|
|
|
+ searchLoading.value = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 按一级行业名称判断所属产业
|
|
|
+function setEstateCategoryName(newData: any) {
|
|
|
+ // 所属产业判断
|
|
|
+ const categoryMap = {
|
|
|
+ '农、林、牧、渔业': {name: '第一产业', id: 1},
|
|
|
+ '采矿业': {name: '第二产业', id: 2},
|
|
|
+ '制造业': {name: '第二产业', id: 2},
|
|
|
+ '电力、热力、燃气及水生产和供应业': {name: '第二产业', id: 2},
|
|
|
+ '建筑业': {name: '第二产业', id: 2}
|
|
|
+ };
|
|
|
+ if (newData.parentIndustryName && categoryMap[newData.parentIndustryName]) {
|
|
|
+ const category = categoryMap[newData.parentIndustryName];
|
|
|
+ newData.estateCategoryName = category.name;
|
|
|
+ newData.estateCategoryId = category.id;
|
|
|
+ } else {
|
|
|
+ newData.estateCategoryName = '第三产业';
|
|
|
+ newData.estateCategoryId = 3;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 统计小计数据
|
|
|
+function calculateCategorySubtotal() {
|
|
|
+ // 初始化每个类别的计数对象
|
|
|
+ const categorySubtotal = {
|
|
|
+ 1: {}, // 第一产业
|
|
|
+ 2: {}, // 第二产业
|
|
|
+ 3: {} // 第三产业
|
|
|
+ };
|
|
|
+ // 初始化字段值为0
|
|
|
+ industryWorkSituationCountKeyTemp.value.forEach((key: any) => {
|
|
|
+ [1, 2, 3].forEach(categoryId => {
|
|
|
+ categorySubtotal[categoryId][key] = 0;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ // 循环统计数据,进行小计数量的累加
|
|
|
+ industryWorkSituationCountDataList.value.forEach((count: any) => {
|
|
|
+ if (categorySubtotal[count.estateCategoryId]) {
|
|
|
+ Object.keys(categorySubtotal[count.estateCategoryId]).forEach(key => {
|
|
|
+ categorySubtotal[count.estateCategoryId][key] += count[key];
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 设置文本字段名称
|
|
|
+ ['estateCategoryName', 'parentIndustryName', 'industryName'].forEach((key: any) => {
|
|
|
+ [1, 2, 3].forEach(categoryId => {
|
|
|
+ categorySubtotal[categoryId][key] = '小计';
|
|
|
+ });
|
|
|
+ });
|
|
|
+ // 向表格插入小计数据
|
|
|
+ [1, 2, 3].forEach(categoryId => {
|
|
|
+ const lastIndex = industryWorkSituationCountDataList.value.map(item => item.estateCategoryId).lastIndexOf(categoryId);
|
|
|
+ if (lastIndex !== -1) {
|
|
|
+ industryWorkSituationCountDataList.value.splice(lastIndex + 1, 0, categorySubtotal[categoryId]);
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ getCompanyModel();
|
|
|
+ onFinish();
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|