施工产值
This commit is contained in:
@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台
|
||||
VITE_APP_ENV = 'development'
|
||||
|
||||
# 开发环境
|
||||
VITE_APP_BASE_API = 'http://192.168.110.159:8899'
|
||||
VITE_APP_BASE_API = 'http://192.168.110.180:8899'
|
||||
|
||||
# 无人机接口地址
|
||||
|
||||
|
97
src/api/design/volumeCatalog/index.ts
Normal file
97
src/api/design/volumeCatalog/index.ts
Normal file
@ -0,0 +1,97 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { VolumeCatalogVO, VolumeCatalogForm, VolumeCatalogQuery } from '@/api/design/volumeCatalog/types';
|
||||
|
||||
/**
|
||||
* 查询卷册目录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listVolumeCatalog = (query?: VolumeCatalogQuery): AxiosPromise<VolumeCatalogVO[]> => {
|
||||
return request({
|
||||
url: '/design/volumeCatalog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询卷册目录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getVolumeCatalog = (id: string | number): AxiosPromise<VolumeCatalogVO> => {
|
||||
return request({
|
||||
url: '/design/volumeCatalog/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询卷册目录文件列表
|
||||
* @param id
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getVolumeCatafileList = (id: string | number): AxiosPromise => {
|
||||
return request({
|
||||
url: '/design/volumeCatalog/listFileById/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查阅卷册目录文件
|
||||
* @param id
|
||||
*/
|
||||
export const lookViewerFile = (id: string | number): AxiosPromise => {
|
||||
return request({
|
||||
url: '/design/volumeCatalog/viewerFile/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 新增卷册目录
|
||||
* @param data
|
||||
*/
|
||||
export const addVolumeCatalog = (data: VolumeCatalogForm) => {
|
||||
return request({
|
||||
url: '/design/volumeCatalog',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改卷册目录
|
||||
* @param data
|
||||
*/
|
||||
export const updateVolumeCatalog = (data: VolumeCatalogForm) => {
|
||||
return request({
|
||||
url: '/design/volumeCatalog',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除卷册目录
|
||||
* @param id
|
||||
*/
|
||||
export const delVolumeCatalog = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/design/volumeCatalog/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传卷册文件
|
||||
* @param query
|
||||
*/
|
||||
export const uploadVolumeFile = (query?: any): AxiosPromise => {
|
||||
return request({
|
||||
url: '/design/volumeFile',
|
||||
method: 'POST',
|
||||
data: query
|
||||
});
|
||||
};
|
96
src/api/design/volumeCatalog/types.ts
Normal file
96
src/api/design/volumeCatalog/types.ts
Normal file
@ -0,0 +1,96 @@
|
||||
export interface VolumeCatalogVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 设计子项ID
|
||||
*/
|
||||
designSubitemId: string | number;
|
||||
|
||||
/**
|
||||
* 卷册号
|
||||
*/
|
||||
volumeNumber: string;
|
||||
|
||||
/**
|
||||
* 资料名称
|
||||
*/
|
||||
documentName: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface VolumeCatalogForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 设计子项ID
|
||||
*/
|
||||
designSubitemId?: string | number;
|
||||
|
||||
/**
|
||||
* 卷册号
|
||||
*/
|
||||
volumeNumber?: string;
|
||||
|
||||
/**
|
||||
* 资料名称
|
||||
*/
|
||||
documentName?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface VolumeCatalogQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 设计子项ID
|
||||
*/
|
||||
designSubitemId?: string | number;
|
||||
|
||||
/**
|
||||
* 卷册号
|
||||
*/
|
||||
volumeNumber?: string;
|
||||
|
||||
/**
|
||||
* 资料名称
|
||||
*/
|
||||
documentName?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
63
src/api/out/constructionValue/index.ts
Normal file
63
src/api/out/constructionValue/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ConstructionValueVO, ConstructionValueForm, ConstructionValueQuery } from '@/api/out/constructionValue/types';
|
||||
|
||||
/**
|
||||
* 查询施工产值列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listConstructionValue = (query?: ConstructionValueQuery): AxiosPromise<ConstructionValueVO[]> => {
|
||||
return request({
|
||||
url: '/out/constructionValue/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询施工产值详细
|
||||
* @param id
|
||||
*/
|
||||
export const getConstructionValue = (id: string | number): AxiosPromise<ConstructionValueVO> => {
|
||||
return request({
|
||||
url: '/out/constructionValue/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增施工产值
|
||||
* @param data
|
||||
*/
|
||||
export const addConstructionValue = (data: ConstructionValueForm) => {
|
||||
return request({
|
||||
url: '/out/constructionValue',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改施工产值
|
||||
* @param data
|
||||
*/
|
||||
export const updateConstructionValue = (data: ConstructionValueForm) => {
|
||||
return request({
|
||||
url: '/out/constructionValue',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除施工产值
|
||||
* @param id
|
||||
*/
|
||||
export const delConstructionValue = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/out/constructionValue/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
156
src/api/out/constructionValue/types.ts
Normal file
156
src/api/out/constructionValue/types.ts
Normal file
@ -0,0 +1,156 @@
|
||||
export interface ConstructionValueVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 方阵id
|
||||
*/
|
||||
matrixId: string | number;
|
||||
|
||||
/**
|
||||
* 分项工程id
|
||||
*/
|
||||
progressCategoryId: string | number;
|
||||
|
||||
/**
|
||||
* 人工填报数量
|
||||
*/
|
||||
artificialNum: number;
|
||||
|
||||
/**
|
||||
* 无人机识别数量
|
||||
*/
|
||||
uavNum: number;
|
||||
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
confirmNum: number;
|
||||
|
||||
/**
|
||||
* 产值
|
||||
*/
|
||||
outValue: number;
|
||||
|
||||
/**
|
||||
* 上报日期
|
||||
*/
|
||||
reportDate: string;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
auditStatus: string;
|
||||
}
|
||||
|
||||
export interface ConstructionValueForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
planDate?: string;
|
||||
planNum?: number;
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
reportDateId?: string | number;
|
||||
/**
|
||||
* 方阵id
|
||||
*/
|
||||
matrixId?: string | number;
|
||||
|
||||
/**
|
||||
* 分项工程id
|
||||
*/
|
||||
progressCategoryId?: string | number;
|
||||
|
||||
/**
|
||||
* 人工填报数量
|
||||
*/
|
||||
artificialNum?: number;
|
||||
|
||||
/**
|
||||
* 无人机识别数量
|
||||
*/
|
||||
uavNum?: number;
|
||||
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
confirmNum?: number;
|
||||
|
||||
/**
|
||||
* 产值
|
||||
*/
|
||||
outValue?: number;
|
||||
|
||||
/**
|
||||
* 上报日期
|
||||
*/
|
||||
reportDate?: string;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
auditStatus?: string;
|
||||
}
|
||||
|
||||
export interface ConstructionValueQuery extends PageQuery {
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 方阵id
|
||||
*/
|
||||
matrixId?: string | number;
|
||||
|
||||
/**
|
||||
* 分项工程id
|
||||
*/
|
||||
progressCategoryId?: string | number;
|
||||
|
||||
/**
|
||||
* 人工填报数量
|
||||
*/
|
||||
artificialNum?: number;
|
||||
|
||||
/**
|
||||
* 无人机识别数量
|
||||
*/
|
||||
uavNum?: number;
|
||||
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
confirmNum?: number;
|
||||
|
||||
/**
|
||||
* 产值
|
||||
*/
|
||||
outValue?: number;
|
||||
|
||||
/**
|
||||
* 上报日期
|
||||
*/
|
||||
reportDate?: string;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
auditStatus?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/out/designCompletion/index.ts
Normal file
63
src/api/out/designCompletion/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DesignCompletionVO, DesignCompletionForm, DesignCompletionQuery } from '@/api/out/designCompletion/types';
|
||||
|
||||
/**
|
||||
* 查询设计完工产值列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDesignCompletion = (query?: DesignCompletionQuery): AxiosPromise<DesignCompletionVO[]> => {
|
||||
return request({
|
||||
url: '/out/designCompletion/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设计完工产值详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDesignCompletion = (id: string | number): AxiosPromise<DesignCompletionVO> => {
|
||||
return request({
|
||||
url: '/out/designCompletion/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增设计完工产值
|
||||
* @param data
|
||||
*/
|
||||
export const addDesignCompletion = (data: DesignCompletionForm) => {
|
||||
return request({
|
||||
url: '/out/designCompletion',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改设计完工产值
|
||||
* @param data
|
||||
*/
|
||||
export const updateDesignCompletion = (data: DesignCompletionForm) => {
|
||||
return request({
|
||||
url: '/out/designCompletion',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除设计完工产值
|
||||
* @param id
|
||||
*/
|
||||
export const delDesignCompletion = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/out/designCompletion/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
86
src/api/out/designCompletion/types.ts
Normal file
86
src/api/out/designCompletion/types.ts
Normal file
@ -0,0 +1,86 @@
|
||||
export interface DesignCompletionVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 产值
|
||||
*/
|
||||
outValue: number;
|
||||
|
||||
/**
|
||||
* 完工月份(YYYY-MM)
|
||||
*/
|
||||
completeMonth: string;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
auditStatus: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DesignCompletionForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 产值
|
||||
*/
|
||||
outValue?: number;
|
||||
|
||||
/**
|
||||
* 完工月份(YYYY-MM)
|
||||
*/
|
||||
completeMonth?: string;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
auditStatus?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DesignCompletionQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 产值
|
||||
*/
|
||||
outValue?: number;
|
||||
|
||||
/**
|
||||
* 完工月份(YYYY-MM)
|
||||
*/
|
||||
completeMonth?: string;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
auditStatus?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
63
src/api/out/monthPlan/index.ts
Normal file
63
src/api/out/monthPlan/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MonthPlanVO, MonthPlanForm, MonthPlanQuery } from '@/api/out/monthPlan/types';
|
||||
|
||||
/**
|
||||
* 查询月度产值计划列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMonthPlan = (query?: MonthPlanQuery): AxiosPromise<MonthPlanVO[]> => {
|
||||
return request({
|
||||
url: '/out/monthPlan/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询月度产值计划详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMonthPlan = (id: string | number): AxiosPromise<MonthPlanVO> => {
|
||||
return request({
|
||||
url: '/out/monthPlan/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增月度产值计划
|
||||
* @param data
|
||||
*/
|
||||
export const addMonthPlan = (data: MonthPlanForm) => {
|
||||
return request({
|
||||
url: '/out/monthPlan',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改月度产值计划
|
||||
* @param data
|
||||
*/
|
||||
export const updateMonthPlan = (data: MonthPlanForm) => {
|
||||
return request({
|
||||
url: '/out/monthPlan',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除月度产值计划
|
||||
* @param id
|
||||
*/
|
||||
export const delMonthPlan = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/out/monthPlan/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
131
src/api/out/monthPlan/types.ts
Normal file
131
src/api/out/monthPlan/types.ts
Normal file
@ -0,0 +1,131 @@
|
||||
export interface MonthPlanVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 设计产值
|
||||
*/
|
||||
designValue: number;
|
||||
|
||||
/**
|
||||
* 采购产值
|
||||
*/
|
||||
procurementValue: number;
|
||||
|
||||
/**
|
||||
* 施工产值
|
||||
*/
|
||||
constructionValue: number;
|
||||
|
||||
/**
|
||||
* 总产值
|
||||
*/
|
||||
totalValue: number;
|
||||
|
||||
/**
|
||||
* 计划月份(YYYY-MM)
|
||||
*/
|
||||
planMonth: string;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
auditStatus: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MonthPlanForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 设计产值
|
||||
*/
|
||||
designValue?: number;
|
||||
|
||||
/**
|
||||
* 采购产值
|
||||
*/
|
||||
procurementValue?: number;
|
||||
|
||||
/**
|
||||
* 施工产值
|
||||
*/
|
||||
constructionValue?: number;
|
||||
|
||||
/**
|
||||
* 总产值
|
||||
*/
|
||||
totalValue?: number;
|
||||
|
||||
/**
|
||||
* 计划月份(YYYY-MM)
|
||||
*/
|
||||
planMonth?: string;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
auditStatus?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface MonthPlanQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 设计产值
|
||||
*/
|
||||
designValue?: number;
|
||||
|
||||
/**
|
||||
* 采购产值
|
||||
*/
|
||||
procurementValue?: number;
|
||||
|
||||
/**
|
||||
* 施工产值
|
||||
*/
|
||||
constructionValue?: number;
|
||||
|
||||
/**
|
||||
* 总产值
|
||||
*/
|
||||
totalValue?: number;
|
||||
|
||||
/**
|
||||
* 计划月份(YYYY-MM)
|
||||
*/
|
||||
planMonth?: string;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
auditStatus?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,6 +119,18 @@ export const workScheduleList = (query: workScheduleListQuery): AxiosPromise<wor
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取进度计划详细详细信息
|
||||
* @param params
|
||||
*/
|
||||
export const workScheduleListDetail = (id: string): AxiosPromise<any> => {
|
||||
return request({
|
||||
url: '/progress/progressPlanDetail/list',
|
||||
method: 'get',
|
||||
params: { progressCategoryId: id }
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取进度类别坐标信息
|
||||
* @param params
|
||||
|
367
src/views/design/volumeCatalog/index.vue
Normal file
367
src/views/design/volumeCatalog/index.vue
Normal file
@ -0,0 +1,367 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<!-- <el-form-item label="子项ID" prop="designSubitemId">
|
||||
<el-input v-model="queryParams.designSubitemId" placeholder="请输入设计子项ID" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="卷册号" prop="volumeNumber">
|
||||
<el-input v-model="queryParams.volumeNumber" placeholder="请输入卷册号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资料名称" prop="documentName">
|
||||
<el-input v-model="queryParams.documentName" placeholder="请输入资料名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['design:volumeCatalog:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['design:volumeCatalog:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['design:volumeCatalog:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="volumeCatalogList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="子项ID" align="center" prop="designSubitemId" /> -->
|
||||
<el-table-column label="卷册号" align="center" prop="volumeNumber" />
|
||||
<el-table-column label="资料名称" align="center" prop="documentName" />
|
||||
<el-table-column label="文件" align="center" prop="fileVoList">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-for="item in scope.row.fileVoList"
|
||||
:key="item.fileId"
|
||||
:href="item.fileUrl"
|
||||
target="_blank"
|
||||
:type="item.status == '1' ? 'primary' : 'info'"
|
||||
:underline="false"
|
||||
@click="lookFile(scope.row.id)"
|
||||
>
|
||||
{{ item.fileName }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上传说明" align="center" prop="explainText">
|
||||
<template #default="scope">
|
||||
{{ scope.row.fileVoList[0]?.explainText }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:volumeCatalog:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Upload" @click="handleUpload(scope.row)">上传</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['design:volumeCatalog:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改卷册目录对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="volumeCatalogFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<!-- <el-form-item label="子项ID" prop="designSubitemId">
|
||||
<el-input v-model="form.designSubitemId" placeholder="请输入设计子项ID" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="卷册号" prop="volumeNumber">
|
||||
<el-input v-model="form.volumeNumber" placeholder="请输入卷册号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资料名称" prop="documentName">
|
||||
<el-input v-model="form.documentName" placeholder="请输入资料名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 上传文件对话框 -->
|
||||
<el-dialog title="上传卷册文件" v-model="uploadVisible" width="500px" append-to-body>
|
||||
<el-form :model="uploadForm" label-width="80px" :inline="false">
|
||||
<el-form-item label="查阅人员" prop="userId">
|
||||
<el-select v-model="uploadForm.userIds" placeholder="请选择查阅人员" clearable multiple>
|
||||
<el-option v-for="user in userList" :key="user.userId" :label="user.nickName" :value="user.userId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="作废文件" prop="cancellationIds">
|
||||
<el-select v-model="uploadForm.cancellationIds" placeholder="这里可以选择作废已上传的文件" clearable multiple>
|
||||
<el-option v-for="user in uploadForm.fileList" :key="user.id" :label="user.fileName" :value="user.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传文件" prop="fileId">
|
||||
<file-upload v-model="uploadForm.fileId"></file-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="说明" prop="explainText">
|
||||
<el-input v-model="uploadForm.explainText" placeholder="请输入说明" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit" :loading="buttonLoading">确定</el-button>
|
||||
<el-button @click="uploadVisible = false">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="VolumeCatalog" lang="ts">
|
||||
import {
|
||||
listVolumeCatalog,
|
||||
getVolumeCatalog,
|
||||
delVolumeCatalog,
|
||||
addVolumeCatalog,
|
||||
updateVolumeCatalog,
|
||||
uploadVolumeFile,
|
||||
getVolumeCatafileList,
|
||||
lookViewerFile
|
||||
} from '@/api/design/volumeCatalog';
|
||||
import { VolumeCatalogVO, VolumeCatalogQuery, VolumeCatalogForm } from '@/api/design/volumeCatalog/types';
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const volumeCatalogList = ref<VolumeCatalogVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const volumeCatalogFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const uploadForm = reactive({
|
||||
userIds: [],
|
||||
volumeCatalogId: undefined,
|
||||
fileId: undefined,
|
||||
explainText: '',
|
||||
fileList: [],
|
||||
cancellationIds: [] // 用于存储已作废的文件ID
|
||||
});
|
||||
|
||||
const userList = ref([]);
|
||||
|
||||
const initFormData: VolumeCatalogForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id || '',
|
||||
designSubitemId: undefined,
|
||||
volumeNumber: undefined,
|
||||
documentName: undefined,
|
||||
remark: undefined
|
||||
};
|
||||
const data = reactive<PageData<VolumeCatalogForm, VolumeCatalogQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value?.id,
|
||||
designSubitemId: undefined,
|
||||
volumeNumber: undefined,
|
||||
documentName: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
|
||||
volumeNumber: [{ required: true, message: '卷册号不能为空', trigger: 'blur' }],
|
||||
documentName: [{ required: true, message: '资料名称不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询卷册目录列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await listVolumeCatalog(queryParams.value);
|
||||
volumeCatalogList.value = res.rows;
|
||||
total.value = res.total;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
volumeCatalogFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: VolumeCatalogVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加卷册目录';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: VolumeCatalogVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getVolumeCatalog(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改卷册目录';
|
||||
};
|
||||
|
||||
/** 上传文件按钮操作 */
|
||||
const uploadVisible = ref(false);
|
||||
const handleUpload = async (row?: any) => {
|
||||
resetUploadForm();
|
||||
uploadForm.volumeCatalogId = row.id;
|
||||
userList.value = row.noViewerList;
|
||||
const res = await getVolumeCatafileList(row.id);
|
||||
uploadForm.fileList = res.data.filter((item) => item.status == '1') || [];
|
||||
uploadVisible.value = true;
|
||||
};
|
||||
|
||||
/** 查看文件 */
|
||||
const lookFile = (fileId: string) => {
|
||||
lookViewerFile(fileId);
|
||||
};
|
||||
|
||||
/** 重置上传表单 */
|
||||
const resetUploadForm = () => {
|
||||
uploadForm.userIds = [];
|
||||
uploadForm.volumeCatalogId = undefined;
|
||||
uploadForm.fileId = undefined;
|
||||
uploadForm.explainText = '';
|
||||
uploadForm.fileList = [];
|
||||
uploadForm.cancellationIds = []; // 重置作废文件ID列表
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
volumeCatalogFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateVolumeCatalog(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addVolumeCatalog(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 上传文件提交 */
|
||||
const onSubmit = async () => {
|
||||
buttonLoading.value = true;
|
||||
try {
|
||||
await uploadVolumeFile(uploadForm);
|
||||
proxy?.$modal.msgSuccess('文件上传成功');
|
||||
uploadVisible.value = false;
|
||||
await getList();
|
||||
} catch (error) {
|
||||
console.error('上传文件失败:', error);
|
||||
} finally {
|
||||
buttonLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: VolumeCatalogVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除卷册目录编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delVolumeCatalog(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'design/volumeCatalog/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`volumeCatalog_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
||||
onUnmounted(() => {
|
||||
listeningProject();
|
||||
});
|
||||
</script>
|
@ -22,7 +22,7 @@
|
||||
</div>
|
||||
<p>总人数</p>
|
||||
<div class="peopleNum">
|
||||
<span>{{ constructionUserData?.peopleCount + ' ' }} </span>人
|
||||
<span>{{ constructionUserData?.peopleCount }} </span>人
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
@ -31,7 +31,7 @@
|
||||
</div>
|
||||
<p>出勤人</p>
|
||||
<div class="peopleNum">
|
||||
<span>{{ constructionUserData?.attendanceCount + ' ' }} </span>人
|
||||
<span>{{ constructionUserData?.attendanceCount }} </span>人
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
@ -40,7 +40,7 @@
|
||||
</div>
|
||||
<p>出勤率</p>
|
||||
<div class="peopleNum">
|
||||
<span>{{ constructionUserData?.attendanceRate + ' ' }} </span>%
|
||||
<span>{{ constructionUserData?.attendanceRate }} </span>%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
379
src/views/out/constructionValue/index.vue
Normal file
379
src/views/out/constructionValue/index.vue
Normal file
@ -0,0 +1,379 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="上报日期" prop="reportDate">
|
||||
<el-date-picker clearable v-model="queryParams.reportDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择上报日期" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['out:constructionValue:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['out:constructionValue:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['out:constructionValue:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['out:constructionValue:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="constructionValueList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键ID" align="center" prop="id" v-if="true" /> -->
|
||||
<el-table-column label="上报日期" align="center" prop="reportDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.reportDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目子项" align="center" prop="subProjectName" />
|
||||
<el-table-column label="分部工程" align="center" prop="categoryName" />
|
||||
<el-table-column label="分项工程" align="center" prop="progressCategoryName" />
|
||||
<el-table-column label="人工填报数量" align="center" prop="artificialNum" />
|
||||
<el-table-column label="无人机识别数量" align="center" prop="uavNum" />
|
||||
<el-table-column label="确认数量" align="center" prop="confirmNum" />
|
||||
<el-table-column label="产值" align="center" prop="outValue" />
|
||||
<!-- <el-table-column label="审核状态" align="center" prop="auditStatus" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['out:constructionValue:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['out:constructionValue:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改施工产值对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="constructionValueFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="方阵" prop="matrixId">
|
||||
<el-cascader
|
||||
:options="matrixOptions"
|
||||
placeholder="请选择"
|
||||
:props="{ value: 'matrixId', label: 'name', emitPath: false }"
|
||||
v-model="form.matrixId"
|
||||
@clear="resetCascader(1)"
|
||||
@change="handleChange"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分项工程" prop="progressCategoryId">
|
||||
<el-cascader
|
||||
:options="progressCategoryList"
|
||||
v-model="form.progressCategoryId"
|
||||
@clear="resetCascader()"
|
||||
:disabled="!form.matrixId"
|
||||
@change="selectTime"
|
||||
:props="{ expandTrigger: 'hover', value: 'id', label: 'name', emitPath: false }"
|
||||
placeholder="请选择分项工程"
|
||||
clearable
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划日期" prop="reportDateId">
|
||||
<el-cascader
|
||||
:options="progressTimeList"
|
||||
v-model="form.reportDateId"
|
||||
:disabled="!form.progressCategoryId"
|
||||
:props="{ expandTrigger: 'hover', value: 'id', label: 'date', emitPath: false }"
|
||||
placeholder="请选择计划日期"
|
||||
@change="submitTime"
|
||||
clearable
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="人工填报数量" prop="artificialNum">
|
||||
<el-input v-model="form.artificialNum" placeholder="请输入人工填报数量" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="无人机识别数量" prop="uavNum">
|
||||
<el-input v-model="form.uavNum" placeholder="请输入无人机识别数量" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="上报日期" prop="planDate">
|
||||
<el-date-picker v-model="form.planDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择上报日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="确认数量" prop="confirmNum">
|
||||
<el-input v-model="form.confirmNum" placeholder="请输入确认数量" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="产值" prop="outValue">
|
||||
<el-input v-model="form.outValue" disabled />
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ConstructionValue" lang="ts">
|
||||
import {
|
||||
listConstructionValue,
|
||||
getConstructionValue,
|
||||
delConstructionValue,
|
||||
addConstructionValue,
|
||||
updateConstructionValue
|
||||
} from '@/api/out/constructionValue';
|
||||
import { ConstructionValueVO, ConstructionValueQuery, ConstructionValueForm } from '@/api/out/constructionValue/types';
|
||||
import { getProjectSquare, listProgressCategory, workScheduleList, workScheduleListDetail, workScheduleListPosition } from '@/api/progress/plan';
|
||||
import { ProgressCategoryVO } from '@/api/progress/plan/types';
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const constructionValueList = ref<ConstructionValueVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const matrixOptions = ref([]);
|
||||
const progressCategoryList = ref<ProgressCategoryVO[]>([]);
|
||||
const progressTimeList = ref<any[]>([]);
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const constructionValueFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: ConstructionValueForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
matrixId: undefined,
|
||||
progressCategoryId: undefined,
|
||||
artificialNum: undefined,
|
||||
planNum: undefined,
|
||||
planDate: undefined,
|
||||
uavNum: undefined,
|
||||
confirmNum: undefined,
|
||||
outValue: undefined,
|
||||
reportDate: undefined,
|
||||
reportDateId: undefined,
|
||||
auditStatus: undefined
|
||||
};
|
||||
const data = reactive<PageData<ConstructionValueForm, ConstructionValueQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value?.id,
|
||||
matrixId: undefined,
|
||||
progressCategoryId: undefined,
|
||||
artificialNum: undefined,
|
||||
uavNum: undefined,
|
||||
confirmNum: undefined,
|
||||
outValue: undefined,
|
||||
reportDate: undefined,
|
||||
auditStatus: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
|
||||
matrixId: [{ required: true, message: '方阵id不能为空', trigger: 'blur' }],
|
||||
progressCategoryId: [{ required: true, message: '分项工程不能为空', trigger: 'blur' }],
|
||||
artificialNum: [{ required: true, message: '人工填报数量不能为空', trigger: 'blur' }],
|
||||
reportDateId: [{ required: true, message: '上报日期不能为空', trigger: 'blur' }],
|
||||
uavNum: [{ required: true, message: '无人机识别数量不能为空', trigger: 'blur' }],
|
||||
confirmNum: [{ required: true, message: '确认数量不能为空', trigger: 'blur' }],
|
||||
outValue: [{ required: true, message: '产值不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询施工产值列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listConstructionValue(queryParams.value);
|
||||
constructionValueList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
constructionValueFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: ConstructionValueVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = async () => {
|
||||
reset();
|
||||
const res = await getProjectSquare(currentProject.value.id);
|
||||
if (res.data.length === 0) return proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
const isFangzhen = res.data.every((item) => item.children.length);
|
||||
if (!isFangzhen) return proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
let matrixList = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
matrixId: item?.projectId
|
||||
};
|
||||
});
|
||||
matrixOptions.value = matrixList;
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加施工产值';
|
||||
};
|
||||
|
||||
/** 方阵选择器改变事件 */
|
||||
const handleChange = async (value: number) => {
|
||||
queryParams.value.matrixId = value;
|
||||
const res = await listProgressCategory(queryParams.value);
|
||||
const data = proxy?.handleTree<ProgressCategoryVO>(res.data, 'id', 'pid');
|
||||
if (data) {
|
||||
progressCategoryList.value = data;
|
||||
console.log('🚀 ~ handleChange ~ progressCategoryList.value :', progressCategoryList.value);
|
||||
}
|
||||
};
|
||||
|
||||
/** 分项工程选择器改变事件 */
|
||||
const selectTime = async (value: string) => {
|
||||
const res = await workScheduleListDetail(value);
|
||||
console.log('🚀 ~ selectTime ~ res:', res);
|
||||
progressTimeList.value = res.rows;
|
||||
};
|
||||
|
||||
/** 上报日期选择器改变事件 */
|
||||
const submitTime = async (value: string) => {
|
||||
const data = progressTimeList.value.filter((item) => item.id === value)[0];
|
||||
console.log(data);
|
||||
form.value.uavNum = data?.aiFill;
|
||||
form.value.reportDate = data?.date;
|
||||
form.value.planNum = data?.planNumber;
|
||||
form.value.artificialNum = data?.finishedNumber;
|
||||
};
|
||||
|
||||
/** 重置选择器 */
|
||||
const resetCascader = (index?: number) => {
|
||||
if (index) {
|
||||
form.value.progressCategoryId = undefined;
|
||||
}
|
||||
form.value.reportDate = undefined;
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: ConstructionValueVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getConstructionValue(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改施工产值';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
constructionValueFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateConstructionValue(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addConstructionValue(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: ConstructionValueVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除施工产值编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delConstructionValue(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'out/constructionValue/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`constructionValue_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
||||
onUnmounted(() => {
|
||||
listeningProject();
|
||||
});
|
||||
</script>
|
241
src/views/out/designCompletion/index.vue
Normal file
241
src/views/out/designCompletion/index.vue
Normal file
@ -0,0 +1,241 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<el-input v-model="queryParams.projectId" placeholder="请输入项目ID" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产值" prop="outValue">
|
||||
<el-input v-model="queryParams.outValue" placeholder="请输入产值" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="完工月份" prop="completeMonth">
|
||||
<el-input v-model="queryParams.completeMonth" placeholder="请输入完工月份" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['out:designCompletion:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['out:designCompletion:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['out:designCompletion:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['out:designCompletion:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="designCompletionList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" v-if="true" />
|
||||
<el-table-column label="项目ID" align="center" prop="projectId" />
|
||||
<el-table-column label="产值" align="center" prop="outValue" />
|
||||
<el-table-column label="完工月份" align="center" prop="completeMonth" />
|
||||
<el-table-column label="审核状态" align="center" prop="auditStatus" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['out:designCompletion:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['out:designCompletion:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改设计完工产值对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="designCompletionFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产值" prop="outValue">
|
||||
<el-input v-model="form.outValue" placeholder="请输入产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="完工月份" prop="completeMonth">
|
||||
<el-input v-model="form.completeMonth" placeholder="请输入完工月份" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DesignCompletion" lang="ts">
|
||||
import { listDesignCompletion, getDesignCompletion, delDesignCompletion, addDesignCompletion, updateDesignCompletion } from '@/api/out/designCompletion';
|
||||
import { DesignCompletionVO, DesignCompletionQuery, DesignCompletionForm } from '@/api/out/designCompletion/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const designCompletionList = ref<DesignCompletionVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const designCompletionFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: DesignCompletionForm = {
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
outValue: undefined,
|
||||
completeMonth: undefined,
|
||||
auditStatus: undefined,
|
||||
}
|
||||
const data = reactive<PageData<DesignCompletionForm, DesignCompletionQuery>>({
|
||||
form: {...initFormData},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: undefined,
|
||||
outValue: undefined,
|
||||
completeMonth: undefined,
|
||||
auditStatus: undefined,
|
||||
params: {
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "主键ID不能为空", trigger: "blur" }
|
||||
],
|
||||
projectId: [
|
||||
{ required: true, message: "项目ID不能为空", trigger: "blur" }
|
||||
],
|
||||
outValue: [
|
||||
{ required: true, message: "产值不能为空", trigger: "blur" }
|
||||
],
|
||||
completeMonth: [
|
||||
{ required: true, message: "完工月份不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询设计完工产值列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listDesignCompletion(queryParams.value);
|
||||
designCompletionList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = {...initFormData};
|
||||
designCompletionFormRef.value?.resetFields();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: DesignCompletionVO[]) => {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = "添加设计完工产值";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: DesignCompletionVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0]
|
||||
const res = await getDesignCompletion(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = "修改设计完工产值";
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
designCompletionFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateDesignCompletion(form.value).finally(() => buttonLoading.value = false);
|
||||
} else {
|
||||
await addDesignCompletion(form.value).finally(() => buttonLoading.value = false);
|
||||
}
|
||||
proxy?.$modal.msgSuccess("操作成功");
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: DesignCompletionVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除设计完工产值编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
|
||||
await delDesignCompletion(_ids);
|
||||
proxy?.$modal.msgSuccess("删除成功");
|
||||
await getList();
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download('out/designCompletion/export', {
|
||||
...queryParams.value
|
||||
}, `designCompletion_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
268
src/views/out/monthPlan/index.vue
Normal file
268
src/views/out/monthPlan/index.vue
Normal file
@ -0,0 +1,268 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<el-input v-model="queryParams.projectId" placeholder="请输入项目ID" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设计产值" prop="designValue">
|
||||
<el-input v-model="queryParams.designValue" placeholder="请输入设计产值" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="采购产值" prop="procurementValue">
|
||||
<el-input v-model="queryParams.procurementValue" placeholder="请输入采购产值" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="施工产值" prop="constructionValue">
|
||||
<el-input v-model="queryParams.constructionValue" placeholder="请输入施工产值" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总产值" prop="totalValue">
|
||||
<el-input v-model="queryParams.totalValue" placeholder="请输入总产值" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划月份" prop="planMonth">
|
||||
<el-input v-model="queryParams.planMonth" placeholder="请输入计划月份" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['out:monthPlan:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['out:monthPlan:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['out:monthPlan:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['out:monthPlan:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="monthPlanList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="计划月份" align="center" prop="planMonth" />
|
||||
<el-table-column label="设计产值" align="center" prop="designValue" />
|
||||
<el-table-column label="采购产值" align="center" prop="procurementValue" />
|
||||
<el-table-column label="施工产值" align="center" prop="constructionValue" />
|
||||
<el-table-column label="总产值" align="center" prop="totalValue" />
|
||||
<el-table-column label="审核状态" align="center" prop="auditStatus" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['out:monthPlan:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['out:monthPlan:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改月度产值计划对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="monthPlanFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设计产值" prop="designValue">
|
||||
<el-input v-model="form.designValue" placeholder="请输入设计产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="采购产值" prop="procurementValue">
|
||||
<el-input v-model="form.procurementValue" placeholder="请输入采购产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="施工产值" prop="constructionValue">
|
||||
<el-input v-model="form.constructionValue" placeholder="请输入施工产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总产值" prop="totalValue">
|
||||
<el-input v-model="form.totalValue" placeholder="请输入总产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划月份" prop="planMonth">
|
||||
<el-input v-model="form.planMonth" placeholder="请输入计划月份" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="MonthPlan" lang="ts">
|
||||
import { listMonthPlan, getMonthPlan, delMonthPlan, addMonthPlan, updateMonthPlan } from '@/api/out/monthPlan';
|
||||
import { MonthPlanVO, MonthPlanQuery, MonthPlanForm } from '@/api/out/monthPlan/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const monthPlanList = ref<MonthPlanVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const monthPlanFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: MonthPlanForm = {
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
designValue: undefined,
|
||||
procurementValue: undefined,
|
||||
constructionValue: undefined,
|
||||
totalValue: undefined,
|
||||
planMonth: undefined,
|
||||
auditStatus: undefined
|
||||
};
|
||||
const data = reactive<PageData<MonthPlanForm, MonthPlanQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: undefined,
|
||||
designValue: undefined,
|
||||
procurementValue: undefined,
|
||||
constructionValue: undefined,
|
||||
totalValue: undefined,
|
||||
planMonth: undefined,
|
||||
auditStatus: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
|
||||
designValue: [{ required: true, message: '设计产值不能为空', trigger: 'blur' }],
|
||||
procurementValue: [{ required: true, message: '采购产值不能为空', trigger: 'blur' }],
|
||||
constructionValue: [{ required: true, message: '施工产值不能为空', trigger: 'blur' }],
|
||||
totalValue: [{ required: true, message: '总产值不能为空', trigger: 'blur' }],
|
||||
planMonth: [{ required: true, message: '计划月份不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询月度产值计划列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listMonthPlan(queryParams.value);
|
||||
monthPlanList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
monthPlanFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: MonthPlanVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加月度产值计划';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: MonthPlanVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getMonthPlan(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改月度产值计划';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
monthPlanFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateMonthPlan(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addMonthPlan(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: MonthPlanVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除月度产值计划编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delMonthPlan(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'out/monthPlan/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`monthPlan_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
@ -1,7 +1,190 @@
|
||||
<template>
|
||||
<div>init</div>
|
||||
<div class="system-busSalaryDetails-container">
|
||||
<el-card shadow="hover">
|
||||
<div class="info_s">
|
||||
<div>
|
||||
<el-button type="success" @click="DownloadSalaryMOdel"
|
||||
><el-icon><Download /></el-icon>下载模版</el-button
|
||||
>
|
||||
<el-button type="primary" @click="uploadSalary"
|
||||
><el-icon><Upload /></el-icon>上传工资表</el-button
|
||||
>
|
||||
<el-button type="danger" :disabled="!(ids.length > 0)" @click="delSalary"
|
||||
><el-icon><Delete /></el-icon>删除</el-button
|
||||
>
|
||||
</div>
|
||||
<el-popover placement="top-start" title="" :width="200" trigger="hover" :content="DetailMoney + '元'">
|
||||
<template #reference>
|
||||
<el-tag class="m-2" size="large"
|
||||
><span style="font-size: 20px; cursor: pointer">金额:{{ totalMoney }}元</span></el-tag
|
||||
>
|
||||
</template>
|
||||
</el-popover>
|
||||
</div>
|
||||
<el-table v-loading="loading" @selection-change="handleSelectionChange" size="large" border :data="tableData.data" height="76vh">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" type="index" min-width="50px" />
|
||||
<el-table-column label="标题" align="center" prop="title" min-width="120px" />
|
||||
<el-table-column label="金额" align="center" prop="money" min-width="100px" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding" min-width="200px" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="handleView(scope.row)"
|
||||
><el-icon><View /></el-icon>详情</el-button
|
||||
>
|
||||
<el-button type="success" link @click="bookSalary(scope.row)"
|
||||
><el-icon><View /></el-icon>查看工资表</el-button
|
||||
>
|
||||
<el-button type="primary" link @click="DownloadSalary(scope.row)"
|
||||
><el-icon><Download /></el-icon>下载工资表</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!-- <uploadSalary ref="uploadSalaryRef" @busSalaryDetailsList="busSalaryDetailsList"></uploadSalary>
|
||||
<detail ref="detailRef" @busSalaryDetailsList="busSalaryDetailsList"></detail>
|
||||
<documentDetail ref="documentDetailRef" v-if="showDocumentDetail" @onClose="showDocumentDetail = false"></documentDetail> -->
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, getCurrentInstance, nextTick, toRaw } from 'vue';
|
||||
// import uploadSalary from '/@/views/system/salaryExcel/component/uploadSalary.vue';
|
||||
// import detail from '/@/views/system/salaryExcel/component/detail.vue';
|
||||
// import { readAllImportedListData, getTheSourceExcelAccordingToTheIdOfThePayroll, deletePayroll } from '/@/api/system/salaryExcel';
|
||||
// import documentDetail from '/@/views/OnlineEngineering/comm/documentsDetail/index.vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
const stores = useUserStoreHook();
|
||||
const { proxy } = <any>getCurrentInstance();
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
const loading = ref(false);
|
||||
const uploadSalaryRef = ref();
|
||||
const editRef = ref();
|
||||
const documentDetailRef = ref();
|
||||
const detailRef = ref();
|
||||
|
||||
const showAll = ref(false);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
|
||||
const showDocumentDetail = ref(false);
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0
|
||||
});
|
||||
const totalMoney = ref(0);
|
||||
const DetailMoney = ref(0);
|
||||
const ids = ref<any[]>([]);
|
||||
|
||||
const uploadSalary = () => {
|
||||
uploadSalaryRef.value.openDialog();
|
||||
};
|
||||
|
||||
const initTableData = () => {
|
||||
busSalaryDetailsList();
|
||||
};
|
||||
|
||||
const busSalaryDetailsList = () => {
|
||||
loading.value = true;
|
||||
readAllImportedListData().then((res: any) => {
|
||||
let list = res.data.list ?? [];
|
||||
let moneySum = 0;
|
||||
list.forEach((item) => {
|
||||
moneySum += parseInt(item.money);
|
||||
});
|
||||
DetailMoney.value = moneySum;
|
||||
totalMoney.value = moneySum >= 10000 ? (moneySum / 10000).toFixed(2) + '万' : moneySum;
|
||||
tableData.data = list;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
const handleView = (row: any) => {
|
||||
detailRef.value.openDialog(toRaw(row));
|
||||
};
|
||||
|
||||
const bookSalary = (row: any) => {
|
||||
getTheSourceExcelAccordingToTheIdOfThePayroll({ id: row.id }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
showDocumentDetail.value = true;
|
||||
let obj = {
|
||||
suffix: '.' + res.data.Suffix,
|
||||
name: res.data.Name,
|
||||
filenPathCoding: res.data.Path,
|
||||
id: row.id
|
||||
};
|
||||
nextTick(() => {
|
||||
documentDetailRef.value.openDialog(obj);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const DownloadSalary = (row: any) => {
|
||||
getTheSourceExcelAccordingToTheIdOfThePayroll({ id: row.id }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
window.open(res.data.Path, '_blank');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const DownloadSalaryMOdel = () => {
|
||||
window.open('http://zmkg.cqet.top:8899/file/masterMask/coryStorageTemplate/工资表模板.xlsx', '_blank');
|
||||
};
|
||||
|
||||
const delSalary = () => {
|
||||
ElMessageBox.confirm('是否删除选中数据', '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deletePayroll({ ids: ids.value }).then(() => {
|
||||
ElMessage.success('删除成功');
|
||||
busSalaryDetailsList();
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
const handleSelectionChange = (selection: any[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
// initTableData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.colBlock {
|
||||
display: block;
|
||||
}
|
||||
.colNone {
|
||||
display: none;
|
||||
}
|
||||
.system-busSalaryDetails-container {
|
||||
.el-tag__content {
|
||||
font-size: 20px !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
.info_s {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
input[type='file'] {
|
||||
display: none;
|
||||
}
|
||||
label {
|
||||
display: inline-block;
|
||||
background-color: #007bff; /*设置背景色*/
|
||||
color: #fff; /*设置字体颜色*/
|
||||
padding: 3px 10px; /*设置内边距*/
|
||||
border-radius: 5px; /*设置圆角*/
|
||||
cursor: pointer; /*将鼠标光标设置为手型*/
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -27,9 +27,11 @@ const iframeLoaded = () => {
|
||||
};
|
||||
//baseUrl +
|
||||
const open = async (definitionId, disabled) => {
|
||||
const url = baseUrl + `/warm-flow-ui/index.html?id=${definitionId}&disabled=${disabled}`;
|
||||
const url = import.meta.env.DEV
|
||||
? `/warm-flow-ui/index.html?id=${definitionId}&disabled=${disabled}`
|
||||
: baseUrl + `/warm-flow-ui/index.html?id=${definitionId}&disabled=${disabled}`;
|
||||
iframeUrl.value = url + '&Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID;
|
||||
console.log('🚀 ~ open ~ iframeUrl:', iframeUrl.value);
|
||||
console.log('🚀 ~ open ~ iframeUrl:', import.meta.env);
|
||||
};
|
||||
/** 关闭按钮 */
|
||||
function close() {
|
||||
|
Reference in New Issue
Block a user