优化任务计划,开发BIM设置
parent
d8ce658341
commit
c2e66dd1ae
|
@ -68,6 +68,16 @@ public class BimModelInfo extends BaseEntity
|
|||
private String projectName;
|
||||
private String deptName;
|
||||
|
||||
private String bimConfig;
|
||||
|
||||
public String getBimConfig() {
|
||||
return bimConfig;
|
||||
}
|
||||
|
||||
public void setBimConfig(String bimConfig) {
|
||||
this.bimConfig = bimConfig;
|
||||
}
|
||||
|
||||
public Double getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
|
|
@ -97,6 +97,16 @@ public class ProPlan extends BaseEntity
|
|||
@Excel(name = "班组ID")
|
||||
private Long groupId;
|
||||
|
||||
private String noBim;
|
||||
|
||||
public String getNoBim() {
|
||||
return noBim;
|
||||
}
|
||||
|
||||
public void setNoBim(String noBim) {
|
||||
this.noBim = noBim;
|
||||
}
|
||||
|
||||
/** 班组名称 */
|
||||
@Excel(name = "班组名称")
|
||||
private String groupName;
|
||||
|
|
|
@ -55,10 +55,6 @@ public class ProPlanSchedule extends BaseEntity
|
|||
@Excel(name = "任务名称")
|
||||
private String taskName;
|
||||
|
||||
/** BIM构建 */
|
||||
@Excel(name = "BIM构建")
|
||||
private String bimId;
|
||||
|
||||
/** 进度百分比 */
|
||||
@Excel(name = "进度百分比")
|
||||
private Long schedulePercent;
|
||||
|
@ -184,15 +180,7 @@ public class ProPlanSchedule extends BaseEntity
|
|||
{
|
||||
return taskName;
|
||||
}
|
||||
public void setBimId(String bimId)
|
||||
{
|
||||
this.bimId = bimId;
|
||||
}
|
||||
|
||||
public String getBimId()
|
||||
{
|
||||
return bimId;
|
||||
}
|
||||
|
||||
public Double getTaskDuation() {
|
||||
return taskDuation;
|
||||
|
@ -325,7 +313,6 @@ public class ProPlanSchedule extends BaseEntity
|
|||
.append("taskId", getTaskId())
|
||||
.append("taskUniqueId", getTaskUniqueId())
|
||||
.append("taskName", getTaskName())
|
||||
.append("bimId", getBimId())
|
||||
.append("schedulePercent", getSchedulePercent())
|
||||
.append("finishDate", getFinishDate())
|
||||
.append("description", getDescription())
|
||||
|
|
|
@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="bimConfig" column="bim_config" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBimModelInfoVo">
|
||||
|
@ -35,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sp.dept_name projectName,
|
||||
sd.dept_name com_name,pd.sub_dept_name dept_name,bmi.unit,
|
||||
bmi.dept_id, bmi.model_name, bmi.lightweightName, bmi.gis_json, bmi.model_status, bmi.model_type,
|
||||
bmi.file_type, bmi.file_size, bmi.show_sand, bmi.status, bmi.remark, bmi.create_by, bmi.create_time, bmi.update_by, bmi.update_time,bmi.is_del
|
||||
bmi.file_type, bmi.file_size, bmi.show_sand, bmi.status, bmi.remark, bmi.create_by, bmi.create_time, bmi.update_by, bmi.update_time,bmi.is_del,bmi.bim_config
|
||||
from bim_model_info bmi
|
||||
left join sys_dept sp on sp.dept_id = bmi.project_id
|
||||
left join sys_dept sd on sd.dept_id = bmi.com_id
|
||||
|
@ -117,7 +118,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="modelName != null">model_name = #{modelName},</if>
|
||||
<if test="lightweightName != null">lightweightName = #{lightweightName},</if>
|
||||
<if test="gisJson != null">gis_json = #{gisJson},</if>
|
||||
<if test="modelStatus != null">model_status = #{modelStatus},</if>
|
||||
<if test="modelType != null">model_type = #{modelType},</if>
|
||||
|
@ -132,8 +132,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="bimConfig != null">bim_config = #{bimConfig},</if>
|
||||
</trim>
|
||||
where model_id = #{modelId}
|
||||
where lightweightName = #{lightweightName}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBimModelInfoByModelId" parameterType="Long">
|
||||
|
|
|
@ -38,10 +38,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="nowMonth" column="nowMonth" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProPlanVo">
|
||||
<sql id="selectProPlanVoNoBim">
|
||||
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.finish_date,
|
||||
pp.predecessors, pp.plan_start_date, pp.plan_finish_date, pp.bim_id, pp.operator, pp.operator_id,
|
||||
pp.predecessors, pp.plan_start_date, pp.plan_finish_date,
|
||||
<if test="not (noBim != null and noBim != '')">
|
||||
pp.bim_id,
|
||||
</if>
|
||||
|
||||
<if test="noBim != null and noBim != ''">
|
||||
left(ifnull(pp.bim_id,''),10) bim_id,
|
||||
</if>
|
||||
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, pp.remark,
|
||||
dp.`dept_name` comp_name,pi.`project_name`,
|
||||
CASE
|
||||
|
@ -69,8 +77,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN pro_project_info pi ON pp.`project_id`=pi.`id`
|
||||
</sql>
|
||||
|
||||
<sql id="selectProPlanVo">
|
||||
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.finish_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, pp.remark,
|
||||
dp.`dept_name` comp_name,pi.`project_name`,
|
||||
CASE
|
||||
WHEN pp.start_date IS NULL THEN
|
||||
'wks'
|
||||
WHEN pp.start_date IS NOT NULL
|
||||
AND pp.finish_date IS NOT NULL
|
||||
AND date(pp.plan_finish_date) <![CDATA[ >= ]]> date(pp.finish_date) THEN
|
||||
'zcwc'
|
||||
WHEN pp.start_date IS NOT NULL
|
||||
AND pp.finish_date IS NOT NULL
|
||||
AND date(pp.plan_finish_date) <![CDATA[ < ]]> date(pp.finish_date) THEN
|
||||
'zhwc'
|
||||
WHEN pp.start_date IS NOT NULL
|
||||
AND pp.finish_date IS NULL
|
||||
AND date(pp.plan_finish_date) <![CDATA[ >= ]]> date(NOW()) THEN
|
||||
'zcjxz'
|
||||
WHEN pp.start_date IS NOT NULL
|
||||
AND pp.finish_date IS NULL
|
||||
AND date(pp.plan_finish_date) <![CDATA[ < ]]> date(NOW()) THEN
|
||||
'zhjxz'
|
||||
END AS task_status
|
||||
from pro_plan pp
|
||||
LEFT JOIN sys_dept dp ON pp.`comid`=dp.`dept_id`
|
||||
LEFT JOIN pro_project_info pi ON pp.`project_id`=pi.`id`
|
||||
</sql>
|
||||
|
||||
<select id="selectProPlanList" parameterType="ProPlan" resultMap="ProPlanResult">
|
||||
<include refid="selectProPlanVo"/>
|
||||
<include refid="selectProPlanVoNoBim"/>
|
||||
<where>
|
||||
<if test="comid != null "> and pp.comid = #{comid}</if>
|
||||
<if test="projectId != null "> and pp.project_id = #{projectId}</if>
|
||||
|
@ -97,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="selectProPlanListView" parameterType="ProPlan" resultMap="ProPlanResult">
|
||||
<include refid="selectProPlanVo"/>
|
||||
<include refid="selectProPlanVoNoBim"/>
|
||||
<where>
|
||||
<if test="comid != null "> and pp.comid = #{comid}</if>
|
||||
<if test="projectId != null "> and pp.project_id = #{projectId}</if>
|
||||
|
@ -280,8 +323,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskName != null and taskName != ''"> concat(#{taskName}, ' / ', task_name) as task_name,</if>
|
||||
<if test="taskName == null or taskName == ''"> task_name,</if>
|
||||
task_duation, start_date, finish_date,
|
||||
predecessors, plan_start_date, plan_finish_date, bim_id, operator, operator_id,
|
||||
group_id, group_name, schedule_node, is_del from pro_plan
|
||||
predecessors, plan_start_date, plan_finish_date, operator, operator_id,
|
||||
<if test="not (noBim != null and noBim != '')">
|
||||
bim_id,
|
||||
</if>
|
||||
group_id, group_name, schedule_node, is_del
|
||||
from pro_plan
|
||||
<where>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||
|
|
|
@ -15,7 +15,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="taskId" column="task_id" />
|
||||
<result property="taskUniqueId" column="task_unique_id" />
|
||||
<result property="taskName" column="task_name" />
|
||||
<result property="bimId" column="bim_id" />
|
||||
<result property="schedulePercent" column="schedule_percent" />
|
||||
<result property="taskDuation" column="task_duation" />
|
||||
<result property="planStartDate" column="plan_start_date" />
|
||||
|
@ -33,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectProPlanScheduleVo">
|
||||
select pps.id, (select max(mp.id) from pro_plan_schedule mp where mp.project_id = pps.project_id and mp.is_del=0) as max_id, pps.com_id, sd.dept_name as com_name, pps.project_id, pi.project_name, pps.plan_id, pps.task_id, pps.task_unique_id, pps.task_name, pps.bim_id, pps.schedule_percent, pp.task_duation, pp.plan_start_date, pp.plan_finish_date, pps.finish_date, pps.description, pps.images, pps.is_del, pps.create_by, pps.create_user_id, pps.create_date, pps.update_by, pps.update_date, pps.total_schedule
|
||||
select pps.id, (select max(mp.id) from pro_plan_schedule mp where mp.project_id = pps.project_id and mp.is_del=0) as max_id, pps.com_id, sd.dept_name as com_name, pps.project_id, pi.project_name, pps.plan_id, pps.task_id, pps.task_unique_id, pps.task_name, pps.schedule_percent, pp.task_duation, pp.plan_start_date, pp.plan_finish_date, pps.finish_date, pps.description, pps.images, pps.is_del, pps.create_by, pps.create_user_id, pps.create_date, pps.update_by, pps.update_date, pps.total_schedule
|
||||
from pro_plan_schedule pps
|
||||
left join pro_project_info pi on pi.id = pps.project_id
|
||||
left join sys_dept sd on sd.dept_id = pps.com_id
|
||||
|
@ -52,7 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskId != null "> and pps.task_id = #{taskId}</if>
|
||||
<if test="taskUniqueId != null and taskUniqueId != ''"> and pps.task_unique_id = #{taskUniqueId}</if>
|
||||
<if test="taskName != null and taskName != ''"> and pps.task_name like concat('%', #{taskName}, '%')</if>
|
||||
<if test="bimId != null and bimId != ''"> and pps.bim_id = #{bimId}</if>
|
||||
<if test="isDel != null "> and pps.is_del = #{isDel}</if>
|
||||
<if test="createUserId != null "> and pps.create_user_id = #{createUserId}</if>
|
||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and date(pps.create_date) between #{params.beginTime} and #{params.endTime}</if>
|
||||
|
@ -76,7 +74,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskId != null">task_id,</if>
|
||||
<if test="taskUniqueId != null">task_unique_id,</if>
|
||||
<if test="taskName != null">task_name,</if>
|
||||
<if test="bimId != null">bim_id,</if>
|
||||
<if test="schedulePercent != null">schedule_percent,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="description != null">description,</if>
|
||||
|
@ -96,7 +93,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="taskUniqueId != null">#{taskUniqueId},</if>
|
||||
<if test="taskName != null">#{taskName},</if>
|
||||
<if test="bimId != null">#{bimId},</if>
|
||||
<if test="schedulePercent != null">#{schedulePercent},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
|
@ -120,7 +116,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="taskUniqueId != null">task_unique_id = #{taskUniqueId},</if>
|
||||
<if test="taskName != null">task_name = #{taskName},</if>
|
||||
<if test="bimId != null">bim_id = #{bimId},</if>
|
||||
<if test="schedulePercent != null">schedule_percent = #{schedulePercent},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
|
|
|
@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pi.floor_area, pi.total_output_value, pi.planned_completion_time, pi.scheduled_start_time, pi.actual_operating_time, pi.actual_completion_time,
|
||||
pi.contract_amount, pi.paid_amount, pi.on_account_amount, pi.project_schedule, pi.project_summarize, pi.project_qr_code, pi.project_status,
|
||||
pi.project_sort, pi.is_del, pi.create_by, pi.create_time, pi.update_by, pi.update_time, pi.remark,
|
||||
pd.id pd_id,pd.dept_type pd_type,pd.dept_name pd_name,pd.dept_code pd_code,pd.leader pd_leader,pd.phone pd_phone,pi.bim_config
|
||||
pd.id pd_id,pd.dept_type pd_type,pd.dept_name pd_name,pd.dept_code pd_code,pd.leader pd_leader,pd.phone pd_phone,pi.bim_config,
|
||||
ps.id ps_id,ps.org_name ps_org_name,ps.org_logo ps_org_logo,ps.org_image ps_org_image,ps.org_video ps_org_video,ps.org_plane ps_org_plane,ac.vendors_code
|
||||
from pro_project_info pi
|
||||
left join sys_dept sd on sd.dept_id = pi.com_id
|
||||
|
@ -286,7 +286,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="bimConfig != null">bim_config = #{bimConfig},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
@ -220,10 +220,11 @@ public class ProPlanController extends BaseController
|
|||
* 获取计划管理详细信息
|
||||
*/
|
||||
@GetMapping(value = "/findPlanDatas/{proId}")
|
||||
public AjaxResult findPlanDatas(@PathVariable("proId") Long proId)
|
||||
public AjaxResult findPlanDatas(@PathVariable("proId") Long proId,String noBim)
|
||||
{
|
||||
ProPlan planQuery = new ProPlan();
|
||||
planQuery.setProjectId(proId);
|
||||
planQuery.setNoBim(noBim);
|
||||
List<ProPlan> proPlans = proPlanService.findPlanDatas(planQuery);
|
||||
return success(proPlans);
|
||||
}
|
||||
|
|
|
@ -52,9 +52,9 @@ export function findOnlyPlan(proId) {
|
|||
}
|
||||
|
||||
// 查询计划管理
|
||||
export function findPlanDatas(proId) {
|
||||
export function findPlanDatas(proId,noBim) {
|
||||
return request({
|
||||
url: '/manage/plan/findPlanDatas/' + proId,
|
||||
url: '/manage/plan/findPlanDatas/' + proId+"?noBim="+(noBim||''),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,130 @@
|
|||
<template>
|
||||
<div class="hide-features">
|
||||
<div style="padding: 0px 10px 10px" v-show="hideParts.length > 0">
|
||||
<el-button @click="delAllDelList">删除所有</el-button>
|
||||
</div>
|
||||
<div class="sel-list scroll hide-list" :key="hideEl">
|
||||
<div v-for="(it, idx) in hideParts" :key="idx" class="div-sel-item">
|
||||
<el-tooltip placement="bottom" :content="it.info">
|
||||
<div class="sel-item-info">{{ it.info }}</div>
|
||||
</el-tooltip>
|
||||
<el-button link @click="delHideItem(idx)">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getModelFeatureInfos,
|
||||
} from "@/api/bim/bimModel";
|
||||
export default {
|
||||
props: {
|
||||
me: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
hideParts: [],
|
||||
hideEl: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
delAllDelList() {
|
||||
this.$modal.confirm("确定删除吗?").then(() => {
|
||||
api.Feature.setVisible(this.hideParts.map(it => it.featureId).join("#"), true);
|
||||
this.hideParts = [];
|
||||
this.hideEl++;
|
||||
});
|
||||
},
|
||||
delHideItem(idx) {
|
||||
api.Feature.setVisible(this.hideParts[idx].featureId, true);
|
||||
this.hideParts.splice(idx, 1);
|
||||
},
|
||||
doHideFeatures() {
|
||||
let that = this;
|
||||
api.Public.clearHandler();
|
||||
api.Feature.getByEvent(false);
|
||||
api.Feature.getByEvent(true, async (n) => {
|
||||
if (n && n["id"]) {
|
||||
let featureId = n.id;
|
||||
let datas = await that.getServerFeatureInfos(that, [featureId]);
|
||||
datas.forEach(it => {
|
||||
that.hideParts.push(it);
|
||||
});
|
||||
//that.hideParts.push(featureId);
|
||||
api.Feature.setVisible(featureId, false);
|
||||
that.hideEl++;
|
||||
}
|
||||
});
|
||||
},
|
||||
async getServerFeatureInfos(that, ids) {
|
||||
if (ids.length == 0) {
|
||||
return;
|
||||
}
|
||||
let tmps = ids[0].split("^");
|
||||
if (tmps.length < 2) {
|
||||
return;
|
||||
}
|
||||
let modelId = tmps[0];
|
||||
let externalIds = ids.map((it) => it.split("^")[1]);
|
||||
let res = await getModelFeatureInfos(modelId, externalIds);
|
||||
return (res.data || []).map((o) => {
|
||||
o = this.convertFeatureInfo(o, modelId);
|
||||
return o;
|
||||
});
|
||||
},
|
||||
convertFeatureInfo(o, modelId) {
|
||||
o.modelId = modelId;
|
||||
o.featureId = o.modelId + "^" + o.externalId;
|
||||
o.name = o.name || "";
|
||||
o.name = o.name.replaceAll('"', "").replaceAll("'", "").replaceAll("\\", "");
|
||||
o.info = `[${o.externalId}]${o.groupname}-${o.name}`;
|
||||
return o;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.hide-features {
|
||||
padding: 0px 0px 20px;
|
||||
height: 80vh;
|
||||
.sel-list {
|
||||
padding: 0px 10px 10px;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
&.hide-list {
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
|
||||
.div-sel-item {
|
||||
background-color: #f7f7f975;
|
||||
position: relative;
|
||||
color: #555;
|
||||
line-height: 30px;
|
||||
padding: 0px 10px;
|
||||
margin-top: 5px;
|
||||
|
||||
.sel-item-info {
|
||||
width: calc(100% - 40px);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 4px;
|
||||
color: #f40606;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -10,19 +10,11 @@
|
|||
</span>
|
||||
</div>
|
||||
<div class="scroll-box model-tree">
|
||||
<el-tree
|
||||
:key="treeKey"
|
||||
ref="tree"
|
||||
:props="{
|
||||
children: 'children',
|
||||
label: 'title',
|
||||
isLeaf: 'leaf',
|
||||
}"
|
||||
node-key="key"
|
||||
@check="onCheckTree"
|
||||
:load="loadNode"
|
||||
lazy
|
||||
show-checkbox></el-tree>
|
||||
<el-tree :key="treeKey" ref="tree" :props="{
|
||||
children: 'children',
|
||||
label: 'title',
|
||||
isLeaf: 'leaf',
|
||||
}" node-key="key" @check="onCheckTree" :load="loadNode" lazy show-checkbox></el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -89,7 +81,7 @@ export default {
|
|||
});
|
||||
});
|
||||
this.expandedKeys = ["root"];
|
||||
this.$nextTick(() => {});
|
||||
this.$nextTick(() => { });
|
||||
},
|
||||
methods: {
|
||||
loadNode(node, resolve) {
|
||||
|
@ -194,12 +186,27 @@ export default {
|
|||
api.Model.add(
|
||||
url,
|
||||
modelId,
|
||||
() => {},
|
||||
() => { },
|
||||
() => {
|
||||
console.log("加载模型成功");
|
||||
let modelInfo=this.projectMessage.find(m=>m.modelId==modelId);
|
||||
if(modelInfo){
|
||||
let cfg=modelInfo.bimCfg;
|
||||
let x=cfg?.x||0;
|
||||
let y=cfg?.y||0;
|
||||
let z=cfg?.z||0;
|
||||
let rotateZ=cfg?.rotateZ||0;
|
||||
if(x*1+y*1+z*1!=0){
|
||||
api.Model.moveToPosition([x,y,z], 0,modelId)
|
||||
}
|
||||
if(rotateZ*1!=0){
|
||||
api.Model.rotate(0, 0, rotateZ, modelId)
|
||||
}
|
||||
}
|
||||
cb && cb();
|
||||
this.$emit("change");
|
||||
setTimeout(() => {
|
||||
api.Model.location(modelId);
|
||||
if (this.$parent.viewPoint) {
|
||||
api.Camera.setViewPort(this.$parent.viewPoint);
|
||||
} else {
|
||||
|
@ -235,16 +242,24 @@ export default {
|
|||
return;
|
||||
}
|
||||
if (checkNode.type == "model") {
|
||||
if (checked) {
|
||||
api.Model.setVisible(checkNode.modelId, true);
|
||||
api.Model.original(checkNode.modelId);
|
||||
this.projectMessage.find((mm) => mm.modelId == checkNode.modelId).visible = true;
|
||||
this.$emit("change");
|
||||
} else {
|
||||
api.Model.setVisible(checkNode.modelId, false);
|
||||
this.projectMessage.find((mm) => mm.modelId == checkNode.modelId).visible = false;
|
||||
this.$emit("change");
|
||||
let func = () => {
|
||||
if (checked) {
|
||||
api.Model.setVisible(checkNode.modelId, true);
|
||||
api.Model.original(checkNode.modelId);
|
||||
this.projectMessage.find((mm) => mm.modelId == checkNode.modelId).visible = true;
|
||||
this.$emit("change");
|
||||
} else {
|
||||
api.Model.setVisible(checkNode.modelId, false);
|
||||
this.projectMessage.find((mm) => mm.modelId == checkNode.modelId).visible = false;
|
||||
this.$emit("change");
|
||||
}
|
||||
}
|
||||
if (!api.m_model.has(checkNode.modelId)) {
|
||||
this.addModel(checkNode.modelId, func);
|
||||
} else {
|
||||
func();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
this.showItem(checkNode, event);
|
||||
|
@ -324,33 +339,41 @@ export default {
|
|||
left: 20px;
|
||||
color: #fff;
|
||||
background: #274754;
|
||||
|
||||
&.hide-tree {
|
||||
height: 50px;
|
||||
|
||||
.ant-tree {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-header {
|
||||
border-bottom: solid 1px #fff;
|
||||
line-height: 40px;
|
||||
padding: 0px 10px;
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
color: rgb(0, 255, 212);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
|
||||
.el-icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-tree {
|
||||
background: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.scroll-box {
|
||||
margin-top: 15px;
|
||||
height: 64vh;
|
||||
|
@ -379,6 +402,7 @@ export default {
|
|||
.ant-tree-node-content-wrapper {
|
||||
color: #ffffff;
|
||||
white-space: nowrap;
|
||||
|
||||
&.ant-tree-node-selected {
|
||||
background: #409eff54 !important;
|
||||
}
|
||||
|
@ -389,24 +413,30 @@ export default {
|
|||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.model-tree {
|
||||
height: calc(100% - 60px);
|
||||
overflow-y: auto;
|
||||
|
||||
.el-tree {
|
||||
background: transparent;
|
||||
color: #eee;
|
||||
|
||||
.el-checkbox {
|
||||
color: #45fdfe;
|
||||
}
|
||||
|
||||
.el-tree-node {
|
||||
&:focus {
|
||||
& > .el-tree-node__content {
|
||||
&>.el-tree-node__content {
|
||||
background: #3489d966;
|
||||
|
||||
&:hover {
|
||||
background: #3489d966;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-tree-node__content:hover {
|
||||
background: #3489d966;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
<template>
|
||||
<div class="move-model">
|
||||
<el-form ref="form" :model="form" label-width="40px">
|
||||
<div class="nav-title">位置</div>
|
||||
<el-form-item label="经度">
|
||||
<el-input v-model="form.x"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="纬度">
|
||||
<el-input v-model="form.y"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="高度">
|
||||
<el-input v-model="form.z"></el-input>
|
||||
</el-form-item>
|
||||
<div class="button-group">
|
||||
<el-button type="primary" @click="updatePosition">更新位置</el-button>
|
||||
</div>
|
||||
<div class="nav-title">旋转</div>
|
||||
<el-form-item label="绕X轴">
|
||||
<el-slider v-model="form.rotateZ" :min="-180" :max="180"></el-slider>
|
||||
<el-input-number v-model="form.rotateZ" placeholder="请输入旋转角度" :min="-180" :max="180"></el-input-number>
|
||||
</el-form-item>
|
||||
<div class="button-group">
|
||||
<el-button type="primary" @click="updateRotate">更新旋转角度</el-button>
|
||||
|
||||
</div>
|
||||
<div class="footer-btn">
|
||||
<el-button @click="resetRotate">清除模型偏移和旋转</el-button>
|
||||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||||
<el-button @click="onCancel">取消</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateBimModel } from "@/api/bim/bimModel"
|
||||
export default {
|
||||
props: {
|
||||
me: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
modelId: null,
|
||||
movePoint: null,
|
||||
form: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0,
|
||||
rotateZ: 0
|
||||
|
||||
},
|
||||
saveData: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0,
|
||||
rotateZ: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onCancel() {
|
||||
this.me.showMove = false;
|
||||
this.me.activeMenu = -1;
|
||||
},
|
||||
onSubmit() {
|
||||
this.$modal.confirm("确定保存吗?").then(() => {
|
||||
let model = this.me.models.find(model => model.modelId == this.modelId);
|
||||
if (model) {
|
||||
model.bimConfig = JSON.stringify(this.saveData);
|
||||
updateBimModel(model).then(res => {
|
||||
this.$message.success("保存成功");
|
||||
this.me.showMove = false;
|
||||
this.me.activeMenu = -1;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
initData(modelId) {
|
||||
this.modelId = modelId;
|
||||
let modelInfo = this.me.models.find(m => m.modelId == modelId);
|
||||
if (modelInfo) {
|
||||
let cfg = modelInfo.bimCfg;
|
||||
this.form.x = cfg?.x || 0;
|
||||
this.form.y = cfg?.y || 0;
|
||||
this.form.z = cfg?.z || 0;
|
||||
this.form.rotateZ = cfg?.rotateZ || 0;
|
||||
|
||||
|
||||
} else {
|
||||
this.$message.error("模型信息不存在");
|
||||
}
|
||||
this.saveData.x = this.form.x;
|
||||
this.saveData.y = this.form.y;
|
||||
this.saveData.z = this.form.z;
|
||||
this.saveData.rotateZ = this.form.rotateZ;
|
||||
|
||||
},
|
||||
init(pt, modelId) {
|
||||
if (pt) {
|
||||
this.form.x = pt[0]
|
||||
this.form.y = pt[1]
|
||||
this.form.z = pt[2]
|
||||
} else {
|
||||
this.form.x = 0
|
||||
this.form.y = 0
|
||||
this.form.z = 0
|
||||
}
|
||||
this.saveData.x = this.form.x;
|
||||
this.saveData.y = this.form.y;
|
||||
this.saveData.z = this.form.z;
|
||||
let modelInfo = this.me.models.find(m => m.modelId == modelId);
|
||||
this.form.rotateZ = modelInfo?.bimCfg?.rotateZ || 0;
|
||||
this.modelId = modelId
|
||||
},
|
||||
updatePosition() {
|
||||
api.Model.moveToPosition([this.form.x, this.form.y, this.form.z], 0, this.modelId)
|
||||
this.saveData.x = this.form.x;
|
||||
this.saveData.y = this.form.y;
|
||||
this.saveData.z = this.form.z;
|
||||
},
|
||||
|
||||
updateRotate() {
|
||||
api.Model.rotate(0, 0, this.form.rotateZ, this.modelId)
|
||||
this.saveData.rotateZ = this.form.rotateZ;
|
||||
},
|
||||
resetRotate() {
|
||||
api.Model.clearRotation(this.modelId)
|
||||
this.saveData = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0,
|
||||
rotateZ: 0
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.move-model {
|
||||
padding: 0px 10px 20px;
|
||||
|
||||
.nav-title {
|
||||
background: linear-gradient(45deg, #00000033, transparent);
|
||||
line-height: 40px;
|
||||
padding-left: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
margin-bottom: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.footer-btn {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,7 +1,11 @@
|
|||
<template>
|
||||
<div class="bim-setting-page app-container2">
|
||||
<div id="bimSettingContainer"></div>
|
||||
<model-floor-tree ref="modelFloorTree" @change="doChange" @modelAdd="modelAdded" :projectMessage="models" v-if="showTree"></model-floor-tree>
|
||||
<div class="bim-cfg-tools">
|
||||
<el-switch v-model="showGis" @change="doChangeGis"></el-switch>GIS
|
||||
</div>
|
||||
<model-floor-tree ref="modelFloorTree" @change="doChange" @modelAdd="modelAdded" :projectMessage="models"
|
||||
v-if="showTree"></model-floor-tree>
|
||||
<div class="footer-box" v-if="showModels.length > 0">
|
||||
<el-tooltip placement="top" content="主视图">
|
||||
<div class="footer-btn" @click="doMenu(0)" :class="activeMenu == 0 ? 'is-active' : ''">
|
||||
|
@ -28,8 +32,13 @@
|
|||
<svg-icon icon-class="hide" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip placement="top" content="模型偏移">
|
||||
<div class="footer-btn" @click="doMenu(5)" :class="activeMenu == 5 ? 'is-active' : ''">
|
||||
<svg-icon icon-class="position" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="bim-setting-tools" v-show="activeMenu > 0">
|
||||
<div class="bim-setting-tools" v-show="(activeMenu > 0 && activeMenu != 5)">
|
||||
<div class="tools-title">
|
||||
<svg-icon icon-class="roam" v-if="activeMenu == 1" />
|
||||
<svg-icon icon-class="view" v-if="activeMenu == 2" />
|
||||
|
@ -43,18 +52,33 @@
|
|||
<person-roaming v-if="activeMenu == 1" ref="personRoaming" :me="this"></person-roaming>
|
||||
<custom-viewpoint v-if="activeMenu == 2" ref="customViewpoint" :me="this"></custom-viewpoint>
|
||||
<viewpoint v-if="activeMenu == 3" ref="viewpoint" :me="this"></viewpoint>
|
||||
<HideFeature v-if="activeMenu == 4" ref="hideFeature" :me="this"></HideFeature>
|
||||
</div>
|
||||
|
||||
<div class="bim-setting-tools" v-show="showMove">
|
||||
<div class="tools-title">
|
||||
<svg-icon icon-class="position" />
|
||||
{{ param.title }}
|
||||
</div>
|
||||
<el-icon @click="doCloseMove" style="color: #000; font-size: 20px; cursor: pointer" class="tools-close">
|
||||
<Close />
|
||||
</el-icon>
|
||||
<MoveModel ref="moveModel" :me="this"></MoveModel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { listBimModel } from "@/api/bim/bimModel";
|
||||
import {getDefaultViewPoint} from '@/api/bim/bim';
|
||||
import { getDefaultViewPoint } from '@/api/bim/bim';
|
||||
import ModelFloorTree from "./ModelFloorTree.vue";
|
||||
import PersonRoaming from "./PersonRoaming.vue";
|
||||
import CustomViewpoint from "./CustomViewpoint.vue";
|
||||
import Viewpoint from "./Viewpoint.vue";
|
||||
import MoveModel from "./MoveModel.vue";
|
||||
import HideFeature from "./HideFeature.vue";
|
||||
import { ElMessage, ElTooltip } from 'element-plus';
|
||||
export default {
|
||||
components: {
|
||||
|
@ -62,7 +86,9 @@ export default {
|
|||
PersonRoaming,
|
||||
CustomViewpoint,
|
||||
Viewpoint,
|
||||
ElTooltip
|
||||
ElTooltip,
|
||||
MoveModel,
|
||||
HideFeature,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -79,7 +105,12 @@ export default {
|
|||
activeMenu: 0,
|
||||
showModels: [],
|
||||
param: {},
|
||||
viewPoint:null,
|
||||
viewPoint: null,
|
||||
showGis: false,
|
||||
movePoint: null,
|
||||
moveModelId: null,
|
||||
isMove: false,
|
||||
showMove: false,
|
||||
};
|
||||
},
|
||||
beforeUnmount() {
|
||||
|
@ -95,9 +126,22 @@ export default {
|
|||
this.initEngine();
|
||||
},
|
||||
methods: {
|
||||
modelAdded(point){
|
||||
if(this.viewPoint!=null){
|
||||
this.viewPoint=point;
|
||||
doCloseMove() {
|
||||
this.showMove = false;
|
||||
this.activeMenu = -1;
|
||||
},
|
||||
modelAdded(point) {
|
||||
if (this.viewPoint != null) {
|
||||
this.viewPoint = point;
|
||||
}
|
||||
},
|
||||
doChangeGis() {
|
||||
if (this.showGis) {
|
||||
api.Public.setGisState(true);
|
||||
api.Public.setTerrainState(false, "http://113.201.2.107:9304/layer.json", false)
|
||||
api.Public.setGisState(true);
|
||||
} else {
|
||||
api.Public.setGisState(false);
|
||||
}
|
||||
},
|
||||
doChange() {
|
||||
|
@ -111,20 +155,30 @@ export default {
|
|||
api.Camera.stopImmersiveRoam();
|
||||
api.Model.location(api.m_model.keys().toArray()[0]);
|
||||
api.Plugin.deleteMiniMap();
|
||||
if(this.viewPoint){
|
||||
if (this.viewPoint) {
|
||||
api.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
},
|
||||
doMenu(n) {
|
||||
if (this.activeMenu == 4) {
|
||||
api.Public.clearHandler();
|
||||
api.Feature.getByEvent(false);
|
||||
}
|
||||
if (n == this.activeMenu) {
|
||||
if (n == 0) {
|
||||
this.resetScene();
|
||||
if (this.isMove) {
|
||||
this.activeMenu = 5;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.activeMenu = n;
|
||||
if (n == 0) {
|
||||
this.resetScene();
|
||||
if (this.isMove) {
|
||||
this.activeMenu = 5;
|
||||
}
|
||||
}
|
||||
if (n == 1) {
|
||||
this.param.title = "第一人称漫游";
|
||||
|
@ -135,25 +189,73 @@ export default {
|
|||
if (n == 3) {
|
||||
this.param.title = "视点管理";
|
||||
}
|
||||
if (n == 4) {
|
||||
this.param.title = "构件隐藏管理";
|
||||
setTimeout(() => {
|
||||
this.$refs.hideFeature.doHideFeatures();
|
||||
}, 800);
|
||||
|
||||
}
|
||||
if (n == 5) {
|
||||
this.param.title = "模型偏移管理";
|
||||
//this.showMove = true;
|
||||
this.isMove = true;
|
||||
this.doModelMove();
|
||||
} else {
|
||||
if (this.isMove) {
|
||||
this.isMove = false;
|
||||
this.showMove = false;
|
||||
api.Public.clearHandler(),
|
||||
api.Public.pickupCoordinate(false);
|
||||
}
|
||||
}
|
||||
},
|
||||
doModelMove() {
|
||||
ElMessage.info("请在场景中选择要移动的模型!");
|
||||
api.Public.pickupCoordinate(false);
|
||||
api.Public.event("LEFT_CLICK", (e) => {
|
||||
api.Feature.getByPosition([e.x, e.y], (n) => {
|
||||
if (n && n["id"]) {
|
||||
let modelId = n.id.split("^")[0];
|
||||
//this.modelMove(modelId);
|
||||
this.showMove=true;
|
||||
this.$refs.moveModel.initData( modelId)
|
||||
} else {
|
||||
ElMessage.warning("请在模型上选点!");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
modelMove(modelId) {
|
||||
ElMessage.info("左键单击选择移动位置,右键单击结束操作!");
|
||||
let that = this;
|
||||
api.Public.event("LEFT_CLICK", ((n) => {
|
||||
api.Public.pickupCoordinate(true, ((n) => {
|
||||
api.Public.convertWorldToCartographicLocation(n, m => {
|
||||
api.Model.moveToPosition(m, 0, modelId)
|
||||
that.movePoint = m;
|
||||
that.moveModelId = modelId;
|
||||
});
|
||||
}
|
||||
))
|
||||
}
|
||||
)),
|
||||
api.Public.event("RIGHT_CLICK", ((n) => {
|
||||
api.Public.clearHandler(),
|
||||
api.Public.pickupCoordinate(false);
|
||||
ElMessage.info("已结束模型移动!"),
|
||||
that.activeMenu = -1;
|
||||
that.onmoveCilck(t)
|
||||
}));
|
||||
},
|
||||
onmoveCilck() {
|
||||
this.showMove = true;
|
||||
this.$refs.moveModel.init(this.movePoint, this.moveModelId)
|
||||
},
|
||||
NotificationPopup(parameter) {
|
||||
this.param = parameter;
|
||||
// const that = this
|
||||
// that.$notification.open({
|
||||
// key: 'EngineKey',
|
||||
// message: parameter.title,
|
||||
// description: parameter.description,
|
||||
// class: 'engine-notification ' + (parameter.tips ? parameter.tips : ''),
|
||||
// duration: null,
|
||||
// placement: parameter.placement ? parameter.placement : that.isMobile ? 'bottomLeft' : 'topRight',
|
||||
// style: {
|
||||
// top: parameter.top ? parameter.top : '50px',
|
||||
// width: parameter.width ? parameter.width : '360px',
|
||||
// marginRight: `20px`,
|
||||
// borderRadius: '0px',
|
||||
// },
|
||||
// onClose: this.notifClose,
|
||||
// })
|
||||
|
||||
},
|
||||
doToolsClose() {
|
||||
this.activeMenu = 0;
|
||||
|
@ -212,14 +314,14 @@ export default {
|
|||
);
|
||||
},
|
||||
initLoadModel() {
|
||||
getDefaultViewPoint(this.currentPrjId,1).then(d=>{
|
||||
let pt="";
|
||||
if(d.data && d.data.length>0){
|
||||
pt=d.data[0].viewPosition;
|
||||
pt=this.$tryToJson(pt,null);
|
||||
getDefaultViewPoint(this.currentPrjId, 1).then(d => {
|
||||
let pt = "";
|
||||
if (d.data && d.data.length > 0) {
|
||||
pt = d.data[0].viewPosition;
|
||||
pt = this.$tryToJson(pt, null);
|
||||
}
|
||||
if(pt){
|
||||
this.viewPoint=pt;
|
||||
if (pt) {
|
||||
this.viewPoint = pt;
|
||||
}
|
||||
});
|
||||
listBimModel({
|
||||
|
@ -228,9 +330,10 @@ export default {
|
|||
comId: this.currentComId,
|
||||
projectId: this.currentPrjId,
|
||||
}).then((d) => {
|
||||
this.models = (d.rows || []).map((it) => {
|
||||
this.models = (d.rows || []).map((it) => {
|
||||
it.modelId = it.lightweightName;
|
||||
it.visible=false;
|
||||
it.bimCfg=this.$tryToJson(it.bimConfig || "{}", {});
|
||||
it.visible = false;
|
||||
it.checked = true;
|
||||
it.gis = this.$tryToJson(it.gisJson || "{}", {});
|
||||
return it;
|
||||
|
@ -250,9 +353,17 @@ export default {
|
|||
.bim-setting-page {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.bim-cfg-tools {
|
||||
position: absolute;
|
||||
left: 340px;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
#bimSettingContainer {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.footer-box {
|
||||
position: absolute;
|
||||
bottom: 10vh;
|
||||
|
@ -260,6 +371,7 @@ export default {
|
|||
margin-left: -75px;
|
||||
background: #274754;
|
||||
border-radius: 4px;
|
||||
|
||||
.footer-btn {
|
||||
display: inline-flex;
|
||||
width: 40px;
|
||||
|
@ -267,14 +379,17 @@ export default {
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: #408edb97;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
svg {
|
||||
fill: rgb(0, 255, 174);
|
||||
|
@ -282,6 +397,7 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bim-setting-tools {
|
||||
position: absolute;
|
||||
top: 80px;
|
||||
|
@ -290,11 +406,13 @@ export default {
|
|||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
min-width: 300px;
|
||||
min-height: 400px;
|
||||
|
||||
.tools-title {
|
||||
padding: 10px;
|
||||
color: #114c5f;
|
||||
size: 24px;
|
||||
}
|
||||
|
||||
.tools-close {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
|
|
|
@ -1,34 +1,15 @@
|
|||
<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="projectId">
|
||||
<el-select
|
||||
:disabled="data.projectId ? true : false"
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请选择项目"
|
||||
style="width: 192px"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="prj in data.projects"
|
||||
:key="prj.id"
|
||||
:label="prj.projectName"
|
||||
:value="prj.id"
|
||||
>
|
||||
<el-select :disabled="data.projectId ? true : false" v-model="queryParams.projectId" placeholder="请选择项目"
|
||||
style="width: 192px" clearable @change="handleQuery">
|
||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -48,109 +29,48 @@
|
|||
</el-col>
|
||||
-->
|
||||
<el-col :span="1.5">
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
:limit="1"
|
||||
accept=".mpp"
|
||||
:headers="upload.headers"
|
||||
:action="
|
||||
upload.url +
|
||||
'?compId=' +
|
||||
data.compId +
|
||||
'&projectId=' +
|
||||
queryParams.projectId
|
||||
"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="true"
|
||||
>
|
||||
<el-button type="primary" v-loading="upload.isUploading"
|
||||
>导入(Project)</el-button
|
||||
>
|
||||
<el-upload ref="uploadRef" :limit="1" accept=".mpp" :headers="upload.headers" :action="upload.url +
|
||||
'?compId=' +
|
||||
data.compId +
|
||||
'&projectId=' +
|
||||
queryParams.projectId
|
||||
" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess"
|
||||
:auto-upload="true">
|
||||
<el-button type="primary" v-loading="upload.isUploading">导入(Project)</el-button>
|
||||
</el-upload>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="planList.length > 0">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['manage:plan:export']"
|
||||
>导出(Project)</el-button
|
||||
>
|
||||
<el-button @click="handleBindBim" v-if="planList.length > 0"
|
||||
>关联Bim</el-button
|
||||
>
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['manage:plan:export']">导出(Project)</el-button>
|
||||
<el-button @click="handleBindBim" v-if="planList.length > 0">关联Bim</el-button>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
v-if="1 == 2"
|
||||
></right-toolbar>
|
||||
<right-toolbar :showSearch="showSearch" @queryTable="getList" v-if="1 == 2"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="planList"
|
||||
row-key="taskId"
|
||||
default-expand-all
|
||||
>
|
||||
<el-table v-loading="loading" :data="planList" row-key="taskId" default-expand-all>
|
||||
<el-table-column label="任务名称" align="left" prop="taskName" />
|
||||
<el-table-column
|
||||
label="任务工期"
|
||||
align="center"
|
||||
prop="taskDuation"
|
||||
width="120"
|
||||
>
|
||||
<el-table-column label="任务工期" align="center" prop="taskDuation" width="120">
|
||||
<template #default="scope">{{ scope.row.taskDuation }}d</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="计划开始时间"
|
||||
align="center"
|
||||
prop="planStartDate"
|
||||
width="180"
|
||||
>
|
||||
<el-table-column label="计划开始时间" align="center" prop="planStartDate" width="180">
|
||||
<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="180"
|
||||
>
|
||||
<el-table-column label="计划结束时间" align="center" prop="planFinishDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.planFinishDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="BIM ID" align="center" prop="bimId" width="120">
|
||||
<template #default="scope">
|
||||
<template
|
||||
v-if="!scope.row.children || scope.row.children.length == 0"
|
||||
>
|
||||
<span
|
||||
@click="handleBim(scope.row)"
|
||||
style="color: red"
|
||||
v-if="scope.row.bimId"
|
||||
>已关联BIM</span
|
||||
>
|
||||
<span @click="handleBim(scope.row)" v-else style="color: #8e9aaf"
|
||||
>未关联BIM</span
|
||||
>
|
||||
<span
|
||||
@click="handleBim(scope.row)"
|
||||
style="margin-left: 8px; cursor: pointer"
|
||||
>
|
||||
<template v-if="!scope.row.children || scope.row.children.length == 0">
|
||||
<span @click="handleBim(scope.row)" style="color: red" v-if="scope.row.bimId">已关联BIM</span>
|
||||
<span @click="handleBim(scope.row)" v-else style="color: #8e9aaf">未关联BIM</span>
|
||||
<span @click="handleBim(scope.row)" style="margin-left: 8px; cursor: pointer">
|
||||
<el-tooltip append-to="" content="关联BIM模型" placement="top">
|
||||
<span>
|
||||
<svg-icon
|
||||
icon-class="position"
|
||||
style="cursor: pointer"
|
||||
class="icon-blue"
|
||||
@click="handleBim(scope.row)"
|
||||
/>
|
||||
<svg-icon icon-class="position" style="cursor: pointer" class="icon-blue" />
|
||||
</span>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
|
@ -158,23 +78,10 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="负责人"
|
||||
align="center"
|
||||
prop="operator"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="班组名称"
|
||||
align="center"
|
||||
prop="groupName"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column label="负责人" align="center" prop="operator" width="120" />
|
||||
<el-table-column label="班组名称" align="center" prop="groupName" width="120" />
|
||||
</el-table>
|
||||
<bim-selection-dialog
|
||||
ref="bimDlg"
|
||||
@success="doSelectSuccess"
|
||||
></bim-selection-dialog>
|
||||
<bim-selection-dialog ref="bimDlg" @success="doSelectSuccess"></bim-selection-dialog>
|
||||
<bim-selection-dialog3 ref="bimDlg3" @success="doSelectSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
@ -272,6 +179,7 @@ function buildTree(all, id) {
|
|||
/** 查询计划管理列表 */
|
||||
function getList() {
|
||||
queryParams.value.projectId = userStore.currentPrjId;
|
||||
queryParams.value.noBim = 'Y'
|
||||
if (!queryParams.value.projectId) {
|
||||
planList.value = [];
|
||||
loading.value = false;
|
||||
|
@ -288,7 +196,13 @@ function getList() {
|
|||
}
|
||||
|
||||
function handleBim(row) {
|
||||
bimDlg.value.showDialog(row, data.planAll);
|
||||
loading.value = true;
|
||||
getPlan(row.id).then((response) => {
|
||||
row.bimId = response.data.bimId;
|
||||
loading.value = false;
|
||||
bimDlg.value.showDialog(row, data.planAll);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function handleBindBim() {
|
||||
|
@ -435,7 +349,7 @@ function handleDelete(row) {
|
|||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
|
|
|
@ -164,7 +164,6 @@ const data = reactive({
|
|||
taskId: null,
|
||||
taskUniqueId: null,
|
||||
taskName: null,
|
||||
bimId: null,
|
||||
isDel: null,
|
||||
createUserId: null,
|
||||
},
|
||||
|
@ -208,7 +207,6 @@ function reset() {
|
|||
taskId: null,
|
||||
taskUniqueId: null,
|
||||
taskName: null,
|
||||
bimId: null,
|
||||
schedulePercent: null,
|
||||
finishDate: null,
|
||||
description: null,
|
||||
|
@ -338,7 +336,6 @@ function initPlan(proId) {
|
|||
form.value.taskId = res.data.taskId;
|
||||
form.value.taskUniqueId = res.data.taskUniqueId;
|
||||
form.value.taskName = res.data.taskName;
|
||||
form.value.bimId = res.data.bimId;
|
||||
initPreviousSchedule(res.data.id);
|
||||
});
|
||||
}
|
||||
|
@ -355,7 +352,7 @@ function buildTree(all, id) {
|
|||
|
||||
/** 初始化计划管理 */
|
||||
function initPlanDatas(proId) {
|
||||
findPlanDatas(proId).then((res) => {
|
||||
findPlanDatas(proId,'Y').then((res) => {
|
||||
data.allData = res.data || [];
|
||||
let treeDatas = buildTree(res.data, 1);
|
||||
planOptions.value = treeDatas;
|
||||
|
@ -369,7 +366,6 @@ function handleChangePlan(value) {
|
|||
form.value.taskId = res.data.taskId;
|
||||
form.value.taskUniqueId = res.data.taskUniqueId;
|
||||
form.value.taskName = res.data.taskName;
|
||||
form.value.bimId = res.data.bimId;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue