进度计划

This commit is contained in:
Teo
2025-09-11 21:01:16 +08:00
parent 410c6beece
commit 9cc4e17c6a
4 changed files with 92 additions and 58 deletions

View File

@ -5,8 +5,8 @@ VITE_APP_TITLE = 煤科建管平台
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
# 开发环境 # 开发环境
VITE_APP_BASE_API = 'http://192.168.110.209:8899' # VITE_APP_BASE_API = 'http://192.168.110.180:8899'
# VITE_APP_BASE_API = 'http://58.17.134.85:8899' VITE_APP_BASE_API = 'http://58.17.134.85:8899'
# GO开发环境 # GO开发环境
VITE_APP_BASE_API_GO = 'http://xny.yj-3d.com:7464' VITE_APP_BASE_API_GO = 'http://xny.yj-3d.com:7464'
# VITE_APP_BASE_API_GO = 'http://192.168.110.188:8919' # VITE_APP_BASE_API_GO = 'http://192.168.110.188:8919'

View File

@ -112,7 +112,7 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination <pagination
v-show="1" v-show="1"
:total="detailTotal" :total="detailTotal"
v-model:page="detailQueryParams.pageNum" v-model:page="detailQueryParams.pageNum"
@ -120,7 +120,7 @@
@pagination="getPvModuleList" @pagination="getPvModuleList"
layout="total, sizes, prev, pager, next" layout="total, sizes, prev, pager, next"
:isSmall="5" :isSmall="5"
/> --> />
</div> </div>
<div class="box_right" v-else> <div class="box_right" v-else>
<div class="time_submit"> <div class="time_submit">
@ -199,10 +199,10 @@ const state = reactive<{
}; };
detialList: any[]; detialList: any[];
detailTotal: number; detailTotal: number;
// detailQueryParams: { detailQueryParams: {
// pageSize: number; pageSize: number;
// pageNum: number; pageNum: number;
// }; };
loading1: boolean; loading1: boolean;
loading2: boolean; loading2: boolean;
typeList: ('info' | 'warning' | 'success' | 'danger')[]; typeList: ('info' | 'warning' | 'success' | 'danger')[];
@ -238,10 +238,10 @@ const state = reactive<{
}, },
detialList: [], detialList: [],
detailTotal: 0, detailTotal: 0,
// detailQueryParams: { detailQueryParams: {
// pageSize: 10, pageSize: 10,
// pageNum: 1 pageNum: 1
// }, },
loading1: false, loading1: false,
loading2: false, loading2: false,
typeList: ['info', 'warning', 'success', 'danger'], typeList: ['info', 'warning', 'success', 'danger'],
@ -275,7 +275,7 @@ const {
formDetail, formDetail,
detialList, detialList,
detailTotal, detailTotal,
// detailQueryParams, detailQueryParams,
loading1, loading1,
loading2, loading2,
typeList, typeList,
@ -327,7 +327,8 @@ const resetForm = (bool: boolean) => {
const getPvModuleList = () => { const getPvModuleList = () => {
loading1.value = true; loading1.value = true;
pvModuleList({ pvModuleList({
id: formDetail.value.id id: formDetail.value.id,
...detailQueryParams.value
}).then((res: any) => { }).then((res: any) => {
loading1.value = false; loading1.value = false;
if (res.code === 200) { if (res.code === 200) {

View File

@ -1,14 +1,12 @@
<template> <template>
<div class="p-2"> <div class="p-2">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
:leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]"> <div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true"> <el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="请选择项目:" prop="pid" label-width="100"> <el-form-item label="请选择项目:" prop="pid" label-width="100">
<el-select v-model="queryParams.projectId" placeholder="请选择" @change="handleChange" clearable> <el-select v-model="queryParams.projectId" placeholder="请选择" @change="handleChange" clearable>
<el-option v-for="item in matrixOptions" :key="item.projectId" :label="item.name" <el-option v-for="item in matrixOptions" :key="item.projectId" :label="item.name" :value="item.projectId" />
:value="item.projectId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="请选择方阵:" prop="pid" label-width="100" v-if="relevancyStructure == '2'"> <el-form-item label="请选择方阵:" prop="pid" label-width="100" v-if="relevancyStructure == '2'">
@ -23,14 +21,23 @@
<el-tabs type="border-card" v-model="activeTab" @tab-click="handleTabClick"> <el-tabs type="border-card" v-model="activeTab" @tab-click="handleTabClick">
<el-tab-pane :label="item.name" v-for="item in tabList" :key="item.id" :name="item.id"></el-tab-pane> <el-tab-pane :label="item.name" v-for="item in tabList" :key="item.id" :name="item.id"></el-tab-pane>
<el-card shadow="never"> <el-card shadow="never">
<el-table ref="progressCategoryTableRef" v-loading="loading" :data="progressCategoryList" row-key="id" <el-table
:default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" ref="progressCategoryTableRef"
v-if="isExpand" border> v-loading="loading"
:data="progressCategoryList"
row-key="id"
:default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
v-if="isExpand"
border
>
<el-table-column label="" width="50" type="expand"> <el-table-column label="" width="50" type="expand">
<template #header> <template #header>
<el-icon class="cursor-pointer text-4! transform-rotate-z--90 transition-all-300" <el-icon
class="cursor-pointer text-4! transform-rotate-z--90 transition-all-300"
:class="!isExpandAll ? 'transform-rotate-z--90' : 'transform-rotate-z-90'" :class="!isExpandAll ? 'transform-rotate-z--90' : 'transform-rotate-z-90'"
@click="handleToggleExpandAll"> @click="handleToggleExpandAll"
>
<Expand /> <Expand />
</el-icon> </el-icon>
</template> </template>
@ -40,86 +47,9 @@
<el-table-column label="名称" align="center" prop="name" width="170"> <el-table-column label="名称" align="center" prop="name" width="170">
<template #default="{ row }"> <template #default="{ row }">
<el-tooltip :content="row.remark" placement="top" effect="dark" v-if="row.remark"> <el-tooltip :content="row.remark" placement="top" effect="dark" v-if="row.remark">
<span class="flex items-center justify-center"><i <span class="flex items-center justify-center"
class="iconfont icon-wenhao mr-0.5 text-3.5! text-#999"></i>{{ row.name }}</span> ><i class="iconfont icon-wenhao mr-0.5 text-3.5! text-#999"></i>{{ row.name }}</span
</el-tooltip> >
<span v-else>{{ row.name }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<template #default="{ row }">
<dict-tag :options="progress_status" :value="row.status" />
</template>
</el-table-column>
<el-table-column label="是否延期" align="center" prop="isDelay" width="100">
<template #default="{ row }">
<el-tag :type="row.isDelay == '1' ? 'danger' : 'primary'">{{ row.isDelay == '1' ? '是' : '否'
}}</el-tag>
</template>
</el-table-column>
<el-table-column label="计量方式" align="center" prop="unitType" width="100">
<template #default="{ row }">
<dict-tag :options="progress_unit_type" :value="row.unitType" />
</template>
</el-table-column>
<el-table-column label="总量" align="center" prop="total" width="100" />
<el-table-column label="总进度" align="center" prop="projectId">
<template #default="{ row }">
<el-progress :text-inside="true" :stroke-width="20" :percentage="row.completedPercentage"
status="success" />
</template>
</el-table-column>
<el-table-column label="计划总量" align="center" prop="planTotal" width="100" />
<el-table-column label="计划中" align="center" prop="projectId">
<template #default="{ row }">
<el-progress :text-inside="true" :stroke-width="20" :percentage="row.planTotalPercentage" />
</template>
</el-table-column>
<el-table-column label="对比" align="center" prop="unitType" width="100">
<template #default="{ row }">
{{ row.completed + '/' + row.total }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template #default="scope">
<el-button type="warning" icon="Download" link size="small" v-if="scope.row.name === '光伏板'"
@click="openDialog(scope.row, 'importTableStatus', '上传表格')"
v-hasPermi="['progress:progressCategory:add']">
导入表格
</el-button>
<el-button type="success" icon="Plus" link size="small" @click="planRef.openDialog(scope.row)"
v-hasPermi="['progress:progressCategory:add']">
计划
</el-button>
<el-button type="primary" icon="Plus" link size="small" @click="handleDayAdd(scope.row)"
v-hasPermi="['progress:progressCategory:add']">
日报
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="name" width="150" />
<el-table-column label="状态" align="center" prop="status" width="100">
<template #default="{ row }">
<dict-tag :options="progress_status" :value="row.status" />
</template>
</el-table-column>
<el-table-column label="总进度" align="center" prop="projectId">
<template #default="{ row }">
<el-progress :text-inside="true" :stroke-width="20" :percentage="row.completedPercentage"
status="success" />
</template>
</el-table-column>
</el-table>
<el-table ref="progressCategoryTableRef" v-loading="loading" :data="progressCategoryList" v-else border>
<el-table-column label="名称" align="center" prop="name" width="170">
<template #default="{ row }">
<el-tooltip :content="row.remark" placement="top" effect="dark" v-if="row.remark">
<span class="flex items-center justify-center"><i
class="iconfont icon-wenhao mr-0.5 text-3.5! text-#999"></i>{{ row.name }}</span>
</el-tooltip> </el-tooltip>
<span v-else>{{ row.name }}</span> <span v-else>{{ row.name }}</span>
</template> </template>
@ -142,8 +72,7 @@
<el-table-column label="总量" align="center" prop="total" width="100" /> <el-table-column label="总量" align="center" prop="total" width="100" />
<el-table-column label="总进度" align="center" prop="projectId"> <el-table-column label="总进度" align="center" prop="projectId">
<template #default="{ row }"> <template #default="{ row }">
<el-progress :text-inside="true" :stroke-width="20" :percentage="row.completedPercentage" <el-progress :text-inside="true" :stroke-width="20" :percentage="row.completedPercentage" status="success" />
status="success" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划总量" align="center" prop="planTotal" width="100" /> <el-table-column label="计划总量" align="center" prop="planTotal" width="100" />
@ -159,17 +88,120 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template #default="scope"> <template #default="scope">
<el-button type="warning" icon="Download" link size="small" v-if="scope.row.name === '光伏板'" <el-button
type="warning"
icon="Download"
link
size="small"
v-if="scope.row.name === '光伏板'"
@click="openDialog(scope.row, 'importTableStatus', '上传表格')" @click="openDialog(scope.row, 'importTableStatus', '上传表格')"
v-hasPermi="['progress:progressCategory:add']"> v-hasPermi="['progress:progressCategory:add']"
>
导入表格 导入表格
</el-button> </el-button>
<el-button type="success" icon="Plus" link size="small" @click="planRef.openDialog(scope.row)" <el-button
v-hasPermi="['progress:progressCategory:add']"> type="success"
icon="Plus"
link
size="small"
@click="planRef.openDialog(scope.row)"
v-hasPermi="['progress:progressCategory:add']"
>
计划 计划
</el-button> </el-button>
<el-button type="primary" icon="Plus" link size="small" @click="handleDayAdd(scope.row)" <el-button
v-hasPermi="['progress:progressCategory:add']"> type="primary"
icon="Plus"
link
size="small"
@click="handleDayAdd(scope.row)"
v-hasPermi="['progress:progressCategory:add']"
>
日报
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="name" width="150" />
<el-table-column label="状态" align="center" prop="status" width="100">
<template #default="{ row }">
<dict-tag :options="progress_status" :value="row.status" />
</template>
</el-table-column>
<el-table-column label="总进度" align="center" prop="projectId">
<template #default="{ row }">
<el-progress :text-inside="true" :stroke-width="20" :percentage="row.completedPercentage" status="success" />
</template>
</el-table-column>
</el-table>
<el-table ref="progressCategoryTableRef" v-loading="loading" :data="progressCategoryList" v-else border>
<el-table-column label="名称" align="center" prop="name" width="170">
<template #default="{ row }">
<el-tooltip :content="row.remark" placement="top" effect="dark" v-if="row.remark">
<span class="flex items-center justify-center"><i class="iconfont icon-wenhao mr-0.5 text-3.5! text-#999"></i>{{ row.name }}</span>
</el-tooltip>
<span v-else>{{ row.name }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<template #default="{ row }">
<dict-tag :options="progress_status" :value="row.status" />
</template>
</el-table-column>
<el-table-column label="是否延期" align="center" prop="isDelay" width="100">
<template #default="{ row }">
<el-tag :type="row.isDelay == '1' ? 'danger' : 'primary'">{{ row.isDelay == '1' ? '是' : '否' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="计量方式" align="center" prop="unitType" width="100">
<template #default="{ row }">
<dict-tag :options="progress_unit_type" :value="row.unitType" />
</template>
</el-table-column>
<el-table-column label="总量" align="center" prop="total" width="100" />
<el-table-column label="总进度" align="center" prop="projectId">
<template #default="{ row }">
<el-progress :text-inside="true" :stroke-width="20" :percentage="row.completedPercentage" status="success" />
</template>
</el-table-column>
<el-table-column label="计划总量" align="center" prop="planTotal" width="100" />
<el-table-column label="计划中" align="center" prop="projectId">
<template #default="{ row }">
<el-progress :text-inside="true" :stroke-width="20" :percentage="row.planTotalPercentage" />
</template>
</el-table-column>
<el-table-column label="对比" align="center" prop="unitType" width="100">
<template #default="{ row }">
{{ row.completed + '/' + row.total }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template #default="scope">
<el-button
type="warning"
icon="Download"
link
size="small"
v-if="scope.row.name === '光伏板'"
@click="openDialog(scope.row, 'importTableStatus', '上传表格')"
v-hasPermi="['progress:progressCategory:add']"
>
导入表格
</el-button>
<el-button
type="success"
icon="Plus"
link
size="small"
@click="planRef.openDialog(scope.row)"
v-hasPermi="['progress:progressCategory:add']"
>
计划
</el-button>
<el-button type="primary" icon="Plus" link size="small" @click="handleDayAdd(scope.row)" v-hasPermi="['progress:progressCategory:add']">
日报 日报
</el-button> </el-button>
</template> </template>
@ -180,8 +212,7 @@
<!-- 导入数据对话框 --> <!-- 导入数据对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.importDataStatus" width="500px" append-to-body> <el-dialog :title="dialog.title" v-model="dialog.importDataStatus" width="500px" append-to-body>
<file-upload class="pl-20 pt" v-model="dialog.file" :limit="20" :file-size="50" <file-upload class="pl-20 pt" v-model="dialog.file" :limit="20" :file-size="50" :file-type="['shp', 'shx', 'dbf']" />
:file-type="['shp', 'shx', 'dbf']" />
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
@ -291,6 +322,9 @@ const getList = async () => {
const res = await getProjectSquare(currentProject.value?.id); const res = await getProjectSquare(currentProject.value?.id);
if (!res.data || res.data.length === 0) { if (!res.data || res.data.length === 0) {
proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵'); proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
tabList.value = [];
progressCategoryList.value = [];
return;
} else { } else {
let matrixList = res.data.map((item) => { let matrixList = res.data.map((item) => {
return { return {
@ -367,6 +401,7 @@ const reset = () => {
const resetMatrix = () => { const resetMatrix = () => {
matrixValue.value = undefined; matrixValue.value = undefined;
queryParams.value.matrixId = undefined; queryParams.value.matrixId = undefined;
queryParams.value.projectId = undefined;
matrixOptions.value = []; matrixOptions.value = [];
}; };
@ -467,8 +502,6 @@ onMounted(() => {
const listeningProject = watch( const listeningProject = watch(
() => currentProject.value?.id, () => currentProject.value?.id,
(nid, oid) => { (nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;
resetMatrix(); resetMatrix();
getList(); getList();
} }

View File

@ -20,10 +20,10 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSearch" <el-button type="primary" @click="onSearch"
><el-icon><ele-Search /></el-icon>搜索</el-button ><el-icon><Search /></el-icon>搜索</el-button
> >
<el-button @click="resetQuery(queryRef)" <el-button @click="resetQuery(queryRef)"
><el-icon><ele-Refresh /></el-icon>重置</el-button ><el-icon><Refresh /></el-icon>重置</el-button
> >
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -32,12 +32,12 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" @click="handleAdd" v-auth="'api/v1/system/busWeeklySecurityReport/add'" <el-button type="primary" @click="handleAdd" v-auth="'api/v1/system/busWeeklySecurityReport/add'"
><el-icon><ele-Plus /></el-icon>新增</el-button ><el-icon><Plus /></el-icon>新增</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" :disabled="multiple" @click="handleDelete(null)" v-auth="'api/v1/system/busWeeklySecurityReport/delete'" <el-button type="danger" :disabled="multiple" @click="handleDelete(null)" v-auth="'api/v1/system/busWeeklySecurityReport/delete'"
><el-icon><ele-Delete /></el-icon>删除</el-button ><el-icon><Delete /></el-icon>删除</el-button
> >
</el-col> </el-col>
</el-row> </el-row>
@ -60,13 +60,13 @@
<el-table-column label="操作" align="center" class-name="small-padding" min-width="200px" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding" min-width="200px" fixed="right">
<template #default="scope"> <template #default="scope">
<el-button type="primary" link @click="handleView(scope.row)" <el-button type="primary" link @click="handleView(scope.row)"
><el-icon><ele-View /></el-icon>预览</el-button ><el-icon><View /></el-icon>预览</el-button
> >
<el-button type="success" link @click="handleUpdate(scope.row)" v-auth="'api/v1/system/busWeeklySecurityReport/edit'" <el-button type="success" link @click="handleUpdate(scope.row)" v-auth="'api/v1/system/busWeeklySecurityReport/edit'"
><el-icon><ele-EditPen /></el-icon>修改</el-button ><el-icon><EditPen /></el-icon>修改</el-button
> >
<el-button type="danger" link @click="handleDelete(scope.row)" v-auth="'api/v1/system/busWeeklySecurityReport/delete'" <el-button type="danger" link @click="handleDelete(scope.row)" v-auth="'api/v1/system/busWeeklySecurityReport/delete'"
><el-icon><ele-DeleteFilled /></el-icon>删除</el-button ><el-icon><DeleteFilled /></el-icon>删除</el-button
> >
</template> </template>
</el-table-column> </el-table-column>