形象进度开发

dev_xd
lj7788@126.com 2025-07-08 19:30:31 +08:00
parent 9886d8c731
commit fdafdcd16e
12 changed files with 288 additions and 191 deletions

View File

@ -17,7 +17,16 @@ const findAllSchedule = (data) => {
});
};
//查询计划进度
const findPlanProgress=projectId=>{
return request({
url: `/manage/plan/findPlanProgress/${projectId}`,
method: "get",
});
}
export default {
findAllPlanDatas,
findAllSchedule
findAllSchedule,
findPlanProgress
};

View File

@ -1 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9075"><path d="M960 938.666667h-21.333333v-89.753334c9.846667-4.206667 18.793333-11.293333 25.906666-20.773333 10.806667-14.413333 16.76-33.246667 16.76-53.026667 0-19-5.546667-49.873333-13.48-75.08-4.746667-15.06-10.06-27.373333-15.793333-36.6-9.666667-15.546667-21.333333-23.433333-34.726667-23.433333s-25.06 7.886667-34.726666 23.433333c-5.733333 9.226667-11.046667 21.54-15.793334 36.6-7.933333 25.206667-13.48 56.08-13.48 75.08 0 19.78 5.953333 38.613333 16.76 53.026667 7.113333 9.48 16.06 16.566667 25.906667 20.773333V938.666667h-85.333333v-170.666667c0-47.12 12.04-91.133333 33.906666-123.933333C864.666667 613.933333 890.506667 597.333333 917.333333 597.333333a21.333333 21.333333 0 0 0 21.333334-21.333333V277.333333a21.333333 21.333333 0 0 0-21.333334-21.333333h-21.333333v-64a21.333333 21.333333 0 0 0-21.333333-21.333333H576a21.333333 21.333333 0 0 0-21.333333 21.333333v64h-44.813334a106.98 106.98 0 0 0-84.98-83.54A106.98 106.98 0 0 0 341.333333 87.48V64a21.333333 21.333333 0 0 0-42.666666 0v23.48a106.98 106.98 0 0 0-83.54 84.98C165.613333 181.666667 128 225.193333 128 277.333333v106.666667h-21.333333a21.333333 21.333333 0 0 0-21.333334 21.333333v64H64a21.333333 21.333333 0 0 0-21.333333 21.333334v469.333333a21.333333 21.333333 0 0 0 21.333333 21.333333h896a21.333333 21.333333 0 0 0 0-42.666666zM213.333333 810.666667h-42.666666v-85.333334h42.666666z m0-128h-42.666666V597.333333h42.666666z m170.666667 256h-42.666667V469.333333h-42.666666V384h42.666666v85.333333h42.666667z m384-554.666667h42.666667v85.333333h-42.666667z m-128 469.333333h-42.666667v-85.333333h42.666667z m0-128h-42.666667V640h42.666667z m0-128h-42.666667V512h42.666667z m0-128h-42.666667V384h42.666667z m85.333333 384h-42.666666v-85.333333h42.666666z m0-128h-42.666666V640h42.666666z m0-128h-42.666666V512h42.666666z m0-128h-42.666666V384h42.666666z m42.666667 42.666667h42.666667v85.333333h-42.666667z" p-id="9076"></path></svg>
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5081"><path d="M811.033 70c41.238 0 74.667 33.43 74.667 74.667V869.67a75.3 75.3 0 0 1-0.756 10.667H939c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H86c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h54.056a75.3 75.3 0 0 1-0.756-10.667V613.81c0-41.238 33.43-74.667 74.667-74.667h85.266a75.3 75.3 0 0 1 10.667 0.756V144.667C309.9 103.429 343.33 70 384.567 70z m-511.8 533.143h-85.266c-5.891 0-10.667 4.775-10.667 10.667V869.67c0 5.891 4.776 10.667 10.667 10.667h85.266c5.891 0 10.667-4.776 10.667-10.667V743.009c-0.659 16.91-14.44 30.451-31.446 30.727l-0.529 0.004H256.6c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h21.325c17.252 0 31.316 13.653 31.976 30.743L309.9 613.81c0-5.892-4.776-10.667-10.667-10.667zM811.033 134H384.567c-5.891 0-10.667 4.776-10.667 10.667V869.67c0 5.891 4.776 10.667 10.667 10.667h426.466c5.891 0 10.667-4.776 10.667-10.667V144.667c0-5.891-4.776-10.667-10.667-10.667zM725.75 677.766v85.299h-85.3v-85.299h85.3z m0-149.272v85.298h-85.3v-85.298h85.3zM555.15 379.22v85.298h-85.3v-85.298h85.3z m170.6 0v85.298h-85.3v-85.298h85.3z m-170.6-149.273v85.299h-85.3v-85.299h85.3z m170.6 0v85.299h-85.3v-85.299h85.3z" p-id="5082"></path></svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -190,6 +190,17 @@
<img :src="rightSrc" class="toSafety-fixed-right-img" @click="arrowRetract" id="arrowRight" />
</div>
<div class="div-mode">
<div class="mode-item" :class="{ 'is-active': mode == 'plan' }" @click="changeMode('plan')">
<svg-icon icon-class="funnel" />
<span>形象进度</span>
</div>
<div class="mode-item" :class="{ 'is-active': mode == 'model' }" @click="changeMode('model')">
<svg-icon icon-class="city" />
<span>整体模型</span>
</div>
</div>
<div class="div-tools" :class="'menu-' + menuShowCount">
<div class="tool-item" @click="resetScene">
<div class="icon">
@ -223,6 +234,25 @@
<span class="sp-text">电箱监控</span>
</div>
</div>
<div class="plan-chart" :class="{ isShow: leftShow, isHide: !leftShow }" v-if="mode=='plan'">
<div class="plan-item">
<span style="background:rgba(59, 255, 0,1)"></span>
<span>提前完工</span>
</div>
<div class="plan-item">
<span style="background:rgba(255,255,255,1)"></span>
<span>正常完工</span>
</div>
<div class="plan-item">
<span style="background:rgba(250, 0, 0,1)"></span>
<span>延迟完工</span>
</div>
<div class="plan-item">
<span style="background:rgba(0,0, 255,1)"></span>
<span>正在施工</span>
</div>
</div>
<video-dialog ref="videoDlg"></video-dialog>
</div>
</template>
@ -346,6 +376,9 @@ export default {
power: false, //
},
menuShowCount: 0,
isClient: false,
modelLoadSuccess: false, //
mode: "model", // model- plan-
};
},
beforeDestroy() {
@ -722,7 +755,8 @@ export default {
this.elId++;
this.activeMenu = 0;
setTimeout(() => {
if (localStorage.getItem("BimClient")) {
this.isClient = localStorage.getItem("BimClient");
if (this.isClient) {
this.loadEngine2();
} else {
this.loadEngine();
@ -827,7 +861,13 @@ export default {
projectId: this.selProject.id,
})
.then((d) => {
this.models = d.rows || [];
this.models = (d.rows || []).map((it) => {
it.modelId = it.lightweightName;
it.visible = false;
it.checked = true;
it.gis = this.$tryToJson(it.gisJson || "{}", {});
return it;
});
if (this.models.length == 0) {
this.$message.error("暂无模型,请先关联模型");
} else {
@ -839,6 +879,9 @@ export default {
},
addModel(modelId, cb) {
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
if (this.isClient) {
url = `/bimdata/Tools/output/model/${modelId}/root.glt`;
}
let api = bimMgrApi;
console.log(modelId, url);
api.Model.add(
@ -850,17 +893,85 @@ export default {
console.log("加载模型成功");
this.loadDevicePosition();
setTimeout(() => {
if (this.viewPoint) {
api.Camera.setViewPort(this.viewPoint);
if (this.isClient) {
} else {
api.Camera.getViewPort((p) => {
this.viewPoint = p;
});
if (this.viewPoint) {
api.Camera.setViewPort(this.viewPoint);
} else {
api.Camera.getViewPort((p) => {
this.viewPoint = p;
});
}
}
this.modelLoadSuccess = true;
}, 1000);
}
);
},
changeMode(mode) {
if (!this.modelLoadSuccess) {
this.$message.error("模型加载中,请稍后");
return;
}
if (mode == this.mode) {
return;
}
this.mode = mode;
let api = bimMgrApi;
if (mode == "model") {
this.models.forEach((it) => {
api.Model.original(it.lightweightName);
api.Model.setAlpha(it.lightweightName,1);
});
this.resetScene();
} else {
this.$api.planSchedule.findPlanProgress(this.selProject.id).then((d) => {
let datas = d.data || [];
let beforeData = []; //
let afterData = []; //
let processData = []; //
let standData = []; //
let allData = [];
datas.forEach((it) => {
let planFinishDate = it.planFinishDate;
let finishDate = it.finishDate;
it.bim = this.$tryToJson(it.bimId, []);
if (finishDate == "2000-01-01") {
it.bim.forEach((item) => {
processData.push(item);
allData.push(item);
});
} else if (planFinishDate == finishDate) {
it.bim.forEach((item) => {
standData.push(item);
allData.push(item);
});
} else if (this.$dt(planFinishDate) < this.$dt(finishDate)) {
it.bim.forEach((item) => {
afterData.push(item);
allData.push(item);
});
} else {
it.bim.forEach((item) => {
beforeData.push(item);
allData.push(item);
});
}
});
//console.log("====>",beforeData,afterData,processData,standData);
if (allData.length > 0) {
allData=allData.map(item=>item.featureId);
this.models.forEach(model=>{
api.Model.setAlpha(model.lightweightName,0.5);
});
api.Feature.setColor(beforeData.map((it) => it.featureId).join("#"), "rgba(59, 255, 0,1)");
api.Feature.setColor(standData.map((it) => it.featureId).join("#"), "rgba(255,255,255,1)");
api.Feature.setColor(processData.map((it) => it.featureId).join("#"), "rgba(0,0, 255,1)");
api.Feature.setColor(afterData.map((it) => it.featureId).join("#"), "rgba(250, 0, 0,1)");
}
});
}
},
resetScene() {
bimMgrApi.Camera.stopImmersiveRoam();
bimMgrApi.Model.location(bimMgrApi.m_model.keys().toArray()[0]);
@ -1087,6 +1198,61 @@ export default {
}
}
}
.div-mode {
position: absolute;
top: calc(80vh - 110px);
left: 50%;
display: flex;
padding: 10px 0px;
background: #00000080;
border-radius: 10px;
margin-left: -125px;
.mode-item {
display: flex;
align-items: center;
font-size: 14px;
line-height: 30px;
margin: 0px 10px;
background: #05798754;
padding: 0px 10px;
border-radius: 13px;
cursor: pointer;
&.is-active {
background: #097fca94;
color: #75fbfd;
border: solid 1px #75fbfd;
.svg-icon {
fill: #75fbfd;
}
}
.svg-icon {
width: 24px;
height: 24px;
margin-right: 4px;
}
}
}
.plan-chart{
position: absolute;
top: calc(80vh - 110px);
right: 40px;
&.isShow{
right:calc(20% + 140px);
}
.plan-item{
display: flex;
font-size:12px;
margin-bottom: 10px;
span{
display:block;
&:first-child{
width:15px;
height:15px;
margin-right:4px;
}
}
}
}
.div-tools {
position: absolute;
top: calc(80vh - 50px);

View File

@ -46,6 +46,13 @@ module.exports = defineConfig({
"^/cesium": "/",
},
},
"/bimdata": {
target: `http://62.234.3.186/bimdata/`,
changeOrigin: true,
pathRewrite: {
"^/bimdata": "/",
},
},
"/cdn": {
target: `http://62.234.3.186/cdn/`,
changeOrigin: true,

View File

@ -135,4 +135,9 @@ public interface ProPlanMapper
*
*/
public List<ProPlan> findAllPlanDatasByProId(Long proId);
/**
*
*/
public List<ProPlan> findPlanProgress(Long proId);
}

View File

@ -303,6 +303,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="findPlanProgress" parameterType="Long" resultMap="ProPlanResult">
SELECT
pp.id,pp.comid,pp.project_id,pp.task_id,pp.task_unique_id,pp.parent_id,pp.task_type,pp.task_outline_level,pp.task_name,pp.task_duation,pp.start_date,pp.predecessors,pp.plan_start_date,pp.plan_finish_date,
pp.bim_id,pp.operator,pp.operator_id,pp.group_id,pp.group_name,pp.schedule_node,pp.is_del,pp.create_by,pp.create_time,pp.update_by,pp.update_time,
pps.finish_date AS finish_date
FROM
pro_plan pp
JOIN (
SELECT
plan_id,
ifnull(max(date(finish_date)),'2000-01-01') AS finish_date
FROM
pro_plan_schedule
WHERE
project_id = #{proId}
GROUP BY
plan_id
) pps ON pp.id = pps.plan_id
WHERE
pp.project_id = #{proId}
</select>
<select id="findAllPlanDatasByProId" parameterType="Long" resultMap="ProPlanResult">
SELECT
pp.id,

View File

@ -252,4 +252,14 @@ public class ProPlanController extends BaseController
List<ProPlan> plans = proPlanService.findAllPlanDatasByProId(proId);
return success(plans);
}
/**
*
*/
@GetMapping(value = "/findPlanProgress/{proId}")
public AjaxResult findPlanProgress(@PathVariable("proId") Long proId){
List<ProPlan> plans = proPlanService.findPlanProgress(proId);
return success(plans);
}
}

View File

@ -97,4 +97,9 @@ public interface IProPlanService
*
*/
public List<ProPlan> findAllPlanDatasByProId(Long proId);
/**
*
*/
public List<ProPlan> findPlanProgress(Long proId);
}

View File

@ -18,7 +18,7 @@ import com.yanzhu.manage.service.IProPlanService;
* @date 2024-11-03
*/
@Service
public class ProPlanServiceImpl implements IProPlanService
public class ProPlanServiceImpl implements IProPlanService
{
@Autowired
private ProPlanMapper proPlanMapper;
@ -218,4 +218,12 @@ public class ProPlanServiceImpl implements IProPlanService
public List<ProPlan> findAllPlanDatasByProId(Long proId){
return proPlanMapper.findAllPlanDatasByProId(proId);
}
/**
*
*/
@Override
public List<ProPlan> findPlanProgress(Long proId) {
return proPlanMapper.findPlanProgress(proId);
}
}

View File

@ -1,27 +1,11 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter="handleQuery"
/>
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="计划名称" prop="taskName">
<el-input
v-model="queryParams.taskName"
placeholder="请输入计划名称"
clearable
@keyup.enter="handleQuery"
/>
<el-input v-model="queryParams.taskName" placeholder="请输入计划名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
@ -31,29 +15,12 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['manage:schedule:add']"
>新增</el-button
>
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['manage:schedule:add']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['manage:schedule:export']"
>导出</el-button
>
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['manage:schedule:export']"></el-button>
</el-col>
<right-toolbar
v-model:showSearch="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="scheduleList">
@ -65,22 +32,12 @@
<el-tag effect="plain">{{ scope.row.taskDuation + " 天" }}</el-tag>
</template>
</el-table-column>
<el-table-column
label="计划开始时间"
align="center"
prop="planStartDate"
width="120"
>
<el-table-column label="计划开始时间" align="center" prop="planStartDate" width="120">
<template #default="scope">
<span>{{ parseTime(scope.row.planStartDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
label="计划结束时间"
align="center"
prop="planFinishDate"
width="120"
>
<el-table-column label="计划结束时间" align="center" prop="planFinishDate" width="120">
<template #default="scope">
<span>{{ parseTime(scope.row.planFinishDate, "{y}-{m}-{d}") }}</span>
</template>
@ -92,12 +49,8 @@
</el-table-column>
<el-table-column label="完成进度" align="center" prop="schedulePercent" width="88">
<template #default="scope">
<el-tag v-if="scope.row.schedulePercent != 100" effect="dark" type="info">{{
scope.row.schedulePercent + " %"
}}</el-tag>
<el-tag v-else effect="dark" type="success">{{
scope.row.schedulePercent + " %"
}}</el-tag>
<el-tag v-if="scope.row.schedulePercent != 100" effect="dark" type="info">{{ scope.row.schedulePercent + " %" }}</el-tag>
<el-tag v-else effect="dark" type="success">{{ scope.row.schedulePercent + " %" }}</el-tag>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" prop="finishDate" width="120">
@ -108,63 +61,23 @@
<el-table-column label="施工作业图" align="center" prop="images" width="120">
<template #default="scope">
<div v-if="scope.row.images != null">
<image-preview
v-if="scope.row.images.split(',').length == 1"
:src="scope.row.images"
:width="50"
:height="50"
/>
<el-badge
v-if="scope.row.images.split(',').length > 1"
:value="scope.row.images.split(',').length"
type="primary"
class="item"
:offset="[2, 8]"
>
<image-preview v-if="scope.row.images.split(',').length == 1" :src="scope.row.images" :width="50" :height="50" />
<el-badge v-if="scope.row.images.split(',').length > 1" :value="scope.row.images.split(',').length" type="primary" class="item" :offset="[2, 8]">
<image-preview :src="scope.row.images" :width="50" :height="50" />
</el-badge>
</div>
<div v-else style="color: var(--el-color-info-light-3)">暂无图片</div>
</template>
</el-table-column>
<el-table-column
v-if="false"
label="操作"
align="center"
width="200"
fixed="right"
class-name="small-padding fixed-width"
>
<el-table-column v-if="false" label="操作" align="center" width="200" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button
v-if="scope.row.id == scope.row.maxId"
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['manage:schedule:edit']"
>修改</el-button
>
<el-button
v-if="scope.row.id == scope.row.maxId"
link
type="primary"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['manage:schedule:remove']"
>删除</el-button
>
<el-button v-if="scope.row.id == scope.row.maxId" link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:schedule:edit']"></el-button>
<el-button v-if="scope.row.id == scope.row.maxId" link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:schedule: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"
/>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改项目进度对话框 -->
<el-dialog :title="title" v-model="open" width="798px" append-to-body>
@ -176,44 +89,16 @@
<el-input v-model="form.taskName" placeholder="请输入工程计划名称" disabled />
</el-form-item>
<el-form-item label="工程计划名称" prop="planId">
<el-tree-select
ref="selTreePlan"
v-model="form.planId"
:data="planOptions"
:props="{ value: 'id', label: 'taskName', children: 'children' }"
value-key="id"
placeholder="请选择工程计划名称"
style="width: 100%"
@change="(v) => handleChangePlan(v)"
>
<el-tree-select ref="selTreePlan" v-model="form.planId" :data="planOptions" :props="{ value: 'id', label: 'taskName', children: 'children' }" value-key="id" placeholder="请选择工程计划名称" style="width: 100%" @change="(v) => handleChangePlan(v)">
<template #default="{ node, data }">
{{ data.taskName
}}<span
style="
float: right;
color: var(--el-text-color-secondary);
font-weight: 600;
"
>{{ data.scheduleNode }} %
</span>
{{ data.taskName }}<span style="float: right; color: var(--el-text-color-secondary); font-weight: 600">{{ data.scheduleNode }} % </span>
</template>
</el-tree-select>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="当前完成进度" prop="schedulePercent">
<el-input-number
v-model="form.schedulePercent"
placeholder="请输入当前完成进度"
:min="
previousSchedule.schedulePercent ? previousSchedule.schedulePercent : 1
"
:max="100"
:step="1"
:precision="0"
controls-position="right"
style="width: 220px"
>
<el-input-number v-model="form.schedulePercent" placeholder="请输入当前完成进度" :min="previousSchedule.schedulePercent ? previousSchedule.schedulePercent : 1" :max="100" :step="1" :precision="0" @change="doPercentChange" controls-position="right" style="width: 220px">
<template #suffix>
<span>%</span>
</template>
@ -221,48 +106,20 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-alert
v-if="previousSchedule.schedulePercent"
:title="'上次完成进度 ' + previousSchedule.schedulePercent + '%'"
type="warning"
show-icon
:closable="false"
/>
<el-alert v-if="previousSchedule.schedulePercent" :title="'上次完成进度 ' + previousSchedule.schedulePercent + '%'" type="warning" show-icon :closable="false" />
</el-col>
</el-row>
<el-form-item
label="完成时间"
prop="finishDate"
v-if="form.schedulePercent == 100"
>
<el-date-picker
v-model="form.finishDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择完成时间"
>
</el-date-picker>
<el-form-item label="完成时间" prop="finishDate" v-if="form.schedulePercent == 100">
<el-date-picker v-model="form.finishDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择完成时间"> </el-date-picker>
</el-form-item>
<el-form-item label="施工进度描述" prop="description">
<el-input
v-model="form.description"
type="textarea"
placeholder="请输入施工进度描述"
:autosize="{ minRows: 3, maxRows: 6 }"
maxlength="999"
show-word-limit
/>
<el-input v-model="form.description" type="textarea" placeholder="请输入施工进度描述" :autosize="{ minRows: 3, maxRows: 6 }" maxlength="999" show-word-limit />
</el-form-item>
<el-form-item label="施工作业图" prop="images">
<image-upload v-model="form.images" :limit="5" />
</el-form-item>
<el-form-item label="填报时间" prop="createDate">
<el-date-picker
v-model="form.createDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择填报时间"
/>
<el-date-picker v-model="form.createDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择填报时间" />
</el-form-item>
</el-form>
<template #footer>
@ -277,14 +134,7 @@
<script setup name="Schedule">
import { findOnlyPlan, findPlanDatas, findRecursionPlan } from "@/api/manage/plan";
import {
listSchedule,
getSchedule,
delSchedule,
addSchedule,
updateSchedule,
findPreviousSchedule,
} from "@/api/manage/schedule";
import { listSchedule, getSchedule, delSchedule, addSchedule, updateSchedule, findPreviousSchedule } from "@/api/manage/schedule";
import useUserStore from "@/store/modules/user";
const { proxy } = getCurrentInstance();
@ -321,13 +171,12 @@ const data = reactive({
rules: {
projectId: [{ required: true, message: "项目名称不能为空", trigger: "blur" }],
planId: [{ required: true, message: "工程计划不能为空", trigger: "change" }],
schedulePercent: [
{ required: true, message: "当前完成进度不能为空", trigger: "blur" },
],
schedulePercent: [{ required: true, message: "当前完成进度不能为空", trigger: "blur" }],
finishDate: [{ required: true, message: "完成时间不能为空", trigger: "change" }],
description: [{ required: true, message: "施工进度描述不能为空", trigger: "blur" }],
images_1: [{ required: true, message: "施工作业图不能为空", trigger: "change" }],
},
allData: [],
});
const { queryParams, form, rules } = toRefs(data);
@ -335,7 +184,7 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询项目进度列表 */
function getList() {
loading.value = true;
queryParams.value.projectId=userStore.currentPrjId;
queryParams.value.projectId = userStore.currentPrjId;
listSchedule(queryParams.value).then((response) => {
scheduleList.value = response.rows;
total.value = response.total;
@ -393,6 +242,18 @@ function handleSelectionChange(selection) {
multiple.value = !selection.length;
}
/** 进度改变 */
function doPercentChange() {
form.value.finishDate = "";
form.value.createDate = "";
if (form.value.schedulePercent == 100) {
let plan = data.allData.find((it) => it.id == form.value.planId);
if (plan) {
form.value.finishDate = plan.planFinishDate || "";
form.value.createDate = plan.planFinishDate || "";
}
}
}
/** 新增按钮操作 */
function handleAdd() {
if (!userStore.currentComId) {
@ -495,6 +356,7 @@ function buildTree(all, id) {
/** 初始化计划管理 */
function initPlanDatas(proId) {
findPlanDatas(proId).then((res) => {
data.allData = res.data || [];
let treeDatas = buildTree(res.data, 1);
planOptions.value = treeDatas;
});

View File

@ -144,7 +144,9 @@ function getList() {
dangerType: queryParams.value.dangerType,
lordSent: queryParams.value.lordSent,
createUser: queryParams.value.createUser,
checkState: " abcde".indexOf(data.activeName)
checkState: " abcde".indexOf(data.activeName),
pageNum:queryParams.value.pageNum,
pageSize:queryParams.value.pageSize
};
if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) {
postData.createTime = queryParams.value.dataRange[0];

View File

@ -144,7 +144,9 @@ function getList() {
dangerType: queryParams.value.dangerType,
lordSent: queryParams.value.lordSent,
createUser: queryParams.value.createUser,
checkState: " abcde".indexOf(data.activeName)
checkState: " abcde".indexOf(data.activeName),
pageNum:queryParams.value.pageNum,
pageSize:queryParams.value.pageSize
};
if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) {
postData.createTime = queryParams.value.dataRange[0];