Compare commits
2 Commits
fc8226e526
...
16e131d60e
Author | SHA1 | Date |
---|---|---|
|
16e131d60e | |
|
f6cc1ecbf8 |
|
@ -116,4 +116,18 @@ public interface ProPlanMapper
|
|||
* @return
|
||||
*/
|
||||
public ProPlan findOnlyPlan(ProPlan proPlan);
|
||||
|
||||
/**
|
||||
* 查询计划数据
|
||||
* @param proPlan
|
||||
* @return
|
||||
*/
|
||||
public List<ProPlan> findPlanDatas(ProPlan proPlan);
|
||||
|
||||
/**
|
||||
* 递归获取计划信息
|
||||
* @param proPlan
|
||||
* @return
|
||||
*/
|
||||
public ProPlan findRecursionPlan(ProPlan proPlan);
|
||||
}
|
||||
|
|
|
@ -64,5 +64,5 @@ public interface ProPlanScheduleMapper
|
|||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
public ProPlanSchedule findPreviousScheduleByTaskId(Long taskId);
|
||||
public ProPlanSchedule findPreviousScheduleByPlanId(Long taskId);
|
||||
}
|
||||
|
|
|
@ -251,4 +251,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by id limit 1
|
||||
</select>
|
||||
|
||||
<select id="findPlanDatas" parameterType="ProPlan" resultMap="ProPlanResult">
|
||||
select id, comid, project_id, task_id, task_unique_id, parent_id, task_type,
|
||||
task_outline_level,
|
||||
<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
|
||||
<where>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||
and is_del = 0 and task_outline_level <![CDATA[ > ]]> 1 and finish_date is null
|
||||
</where>
|
||||
order by id
|
||||
</select>
|
||||
|
||||
<select id="findRecursionPlan" parameterType="ProPlan" resultMap="ProPlanResult">
|
||||
select id, comid, project_id, task_id, task_unique_id, parent_id, task_type,
|
||||
task_outline_level,
|
||||
<if test="taskName != null and taskName != ''"> concat(#{taskName}, ' / ', task_name) as 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
|
||||
<where>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -141,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="findPreviousScheduleByTaskId" parameterType="Long" resultMap="ProPlanScheduleResult">
|
||||
<select id="findPreviousScheduleByPlanId" parameterType="Long" resultMap="ProPlanScheduleResult">
|
||||
<include refid="selectProPlanScheduleVo"/>
|
||||
where pps.plan_id = #{taskId} and pps.is_del = 0 order by pps.id desc limit 1
|
||||
</select>
|
||||
|
|
|
@ -215,4 +215,27 @@ public class ProPlanController extends BaseController
|
|||
ProPlan proPlan = proPlanService.findOnlyPlan(planQuery);
|
||||
return success(proPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取计划管理详细信息
|
||||
*/
|
||||
@GetMapping(value = "/findPlanDatas/{proId}")
|
||||
public AjaxResult findPlanDatas(@PathVariable("proId") Long proId)
|
||||
{
|
||||
ProPlan planQuery = new ProPlan();
|
||||
planQuery.setProjectId(proId);
|
||||
List<ProPlan> proPlans = proPlanService.findPlanDatas(planQuery);
|
||||
return success(proPlans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归获取计划信息
|
||||
*/
|
||||
@GetMapping(value = "/findRecursionPlan/{planId}")
|
||||
public AjaxResult findRecursionPlan(@PathVariable("planId") Long planId){
|
||||
ProPlan plan = proPlanService.selectProPlanById(planId);
|
||||
ProPlan parents = proPlanService.findRecursionPlan(plan);
|
||||
plan.setTaskName(parents.getTaskName());
|
||||
return success(plan);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,9 +99,10 @@ public class ProPlanScheduleController extends BaseController
|
|||
/**
|
||||
* 获取项目进度详细信息
|
||||
*/
|
||||
@GetMapping(value = "/findPreviousSchedule/{taskId}")
|
||||
public AjaxResult findPreviousSchedule(@PathVariable("taskId") Long taskId)
|
||||
@GetMapping(value = "/findPreviousSchedule/{planId}")
|
||||
public AjaxResult findPreviousSchedule(@PathVariable("planId") Long planId)
|
||||
{
|
||||
return success(proPlanScheduleService.findPreviousScheduleByTaskId(taskId));
|
||||
return success(proPlanScheduleService.findPreviousScheduleByPlanId(planId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -61,8 +61,8 @@ public interface IProPlanScheduleService
|
|||
|
||||
/**
|
||||
* 查询上次任务计划
|
||||
* @param taskId
|
||||
* @param planId 计划主键
|
||||
* @return
|
||||
*/
|
||||
public ProPlanSchedule findPreviousScheduleByTaskId(Long taskId);
|
||||
public ProPlanSchedule findPreviousScheduleByPlanId(Long planId);
|
||||
}
|
||||
|
|
|
@ -78,4 +78,18 @@ public interface IProPlanService
|
|||
* @return
|
||||
*/
|
||||
public ProPlan findOnlyPlan(ProPlan proPlan);
|
||||
|
||||
/**
|
||||
* 查询计划数据
|
||||
* @param proPlan
|
||||
* @return
|
||||
*/
|
||||
public List<ProPlan> findPlanDatas(ProPlan proPlan);
|
||||
|
||||
/**
|
||||
* 递归获取计划信息
|
||||
* @param proPlan 计划管理
|
||||
* @return
|
||||
*/
|
||||
public ProPlan findRecursionPlan(ProPlan proPlan);
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ public class ProPlanScheduleServiceImpl implements IProPlanScheduleService
|
|||
for(Long id:ids){
|
||||
ProPlanSchedule proPlanSchedule = proPlanScheduleMapper.selectProPlanScheduleById(id);
|
||||
ProPlan plan = proPlanMapper.selectProPlanById(proPlanSchedule.getPlanId());
|
||||
ProPlanSchedule Previous = proPlanScheduleMapper.findPreviousScheduleByTaskId(plan.getId());
|
||||
ProPlanSchedule Previous = proPlanScheduleMapper.findPreviousScheduleByPlanId(plan.getId());
|
||||
if(Previous!=null){
|
||||
plan.setScheduleNode(Previous.getSchedulePercent().toString());
|
||||
}else{
|
||||
|
@ -159,7 +159,7 @@ public class ProPlanScheduleServiceImpl implements IProPlanScheduleService
|
|||
if(res>0){
|
||||
ProPlanSchedule proPlanSchedule = proPlanScheduleMapper.selectProPlanScheduleById(id);
|
||||
ProPlan plan = proPlanMapper.selectProPlanById(proPlanSchedule.getPlanId());
|
||||
ProPlanSchedule Previous = proPlanScheduleMapper.findPreviousScheduleByTaskId(plan.getId());
|
||||
ProPlanSchedule Previous = proPlanScheduleMapper.findPreviousScheduleByPlanId(plan.getId());
|
||||
if(Previous!=null){
|
||||
plan.setScheduleNode(Previous.getSchedulePercent().toString());
|
||||
}else{
|
||||
|
@ -354,12 +354,12 @@ public class ProPlanScheduleServiceImpl implements IProPlanScheduleService
|
|||
|
||||
/**
|
||||
* 查询上次任务计划
|
||||
* @param taskId
|
||||
* @param planId 计划主键
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProPlanSchedule findPreviousScheduleByTaskId(Long taskId){
|
||||
return proPlanScheduleMapper.findPreviousScheduleByTaskId(taskId);
|
||||
public ProPlanSchedule findPreviousScheduleByPlanId(Long planId){
|
||||
return proPlanScheduleMapper.findPreviousScheduleByPlanId(planId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ public class ProPlanServiceImpl implements IProPlanService
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询唯一计划
|
||||
* 递归查询唯一计划
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
@ -181,4 +181,33 @@ public class ProPlanServiceImpl implements IProPlanService
|
|||
return proPlan;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询计划数据
|
||||
* @param proPlan
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProPlan> findPlanDatas(ProPlan proPlan){
|
||||
return proPlanMapper.findPlanDatas(proPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归获取计划信息
|
||||
* @param proPlan 计划信息
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProPlan findRecursionPlan(ProPlan proPlan){
|
||||
if(proPlan.getTaskOutlineLevel()!=2){
|
||||
ProPlan planQuery = new ProPlan();
|
||||
planQuery.setTaskName(proPlan.getTaskName());
|
||||
planQuery.setProjectId(proPlan.getProjectId());
|
||||
planQuery.setTaskId(proPlan.getParentId());
|
||||
ProPlan plan = proPlanMapper.findRecursionPlan(planQuery);
|
||||
return findRecursionPlan(plan);
|
||||
}else{
|
||||
return proPlan;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -273,3 +273,12 @@ export function editSubUsersPhone(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询进度计划管理列表
|
||||
export function planScheduleList(query) {
|
||||
return request({
|
||||
url: '/manage/schedule/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
"pages/project_subusers/info/index",
|
||||
"pages/project_magusers/list/index",
|
||||
"pages/project_magusers/add/index",
|
||||
"pages/project_magusers/info/index"
|
||||
"pages/project_magusers/info/index",
|
||||
"pages/project_schedule/list/index",
|
||||
"pages/project_schedule/add/index"
|
||||
],
|
||||
"usingComponents": {
|
||||
"van-row": "@vant/weapp/row",
|
||||
|
|
|
@ -130,7 +130,7 @@ Page({
|
|||
onLoad: function (options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../login/login',
|
||||
})
|
||||
}
|
||||
wx.setStorageSync('nav-menu', "xmgk");
|
||||
|
@ -576,10 +576,9 @@ Page({
|
|||
|
||||
//跳转到进度管理
|
||||
JDGL: function () {
|
||||
app.toast("正在建设中");
|
||||
// wx.redirectTo({
|
||||
// url: '../../pageage/project_schedule/list/index'
|
||||
// })
|
||||
wx.redirectTo({
|
||||
url: '../project_schedule/list/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到项目管理
|
||||
|
|
|
@ -5,41 +5,41 @@
|
|||
</view>
|
||||
|
||||
<view class="max_content">
|
||||
<view class="address list_title">
|
||||
总工程数<text>({{proCount}})</text>
|
||||
</view>
|
||||
<view class="address list_title">
|
||||
总工程数<text>({{proCount}})</text>
|
||||
</view>
|
||||
|
||||
<view class="list_option_max">
|
||||
<view class="list_option" wx:for="{{projectInfoList}}" wx:key="projectInfoList">
|
||||
<view class="list_right" bindtap="checkProject" data-id="{{item.id}}" data-name="{{item.projectName}}">
|
||||
<view class="list_left">{{item.comName}}</view>
|
||||
<view class="list_con_bottom">
|
||||
<view class="list_right_name">{{item.projectName}}</view>
|
||||
<view class="list_right_address">{{item.projectAddress}}</view>
|
||||
<view class="list_right_info">
|
||||
<van-row>
|
||||
<van-col span="8" wx:if="{{item.warningCount != '0'}}">
|
||||
<text class="list_warning active">预警({{item.warningCount}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.warningCount == '0'}}">
|
||||
<text class="list_warning">预警({{item.warningCount}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.videoNum != '0'}}">
|
||||
<text class="list_video active">视频({{item.videoNum}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.videoNum == '0'}}">
|
||||
<text class="list_video">视频({{item.videoNum}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.monitoringCount != '0'}}">
|
||||
<text class="list_dust active">结构体({{item.monitoringCount}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.monitoringCount == '0'}}">
|
||||
<text class="list_dust">结构体({{item.monitoringCount}})</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_option_max">
|
||||
<view class="list_option" wx:for="{{projectInfoList}}" wx:key="projectInfoList">
|
||||
<view class="list_right" bindtap="checkProject" data-id="{{item.id}}" data-name="{{item.projectName}}">
|
||||
<view class="list_left">{{item.comName}}</view>
|
||||
<view class="list_con_bottom">
|
||||
<view class="list_right_name">{{item.projectName}}</view>
|
||||
<view class="list_right_address">{{item.projectAddress}}</view>
|
||||
<view class="list_right_info">
|
||||
<van-row>
|
||||
<van-col span="8" wx:if="{{item.warningCount != '0'}}">
|
||||
<text class="list_warning active">预警({{item.warningCount}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.warningCount == '0'}}">
|
||||
<text class="list_warning">预警({{item.warningCount}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.videoNum != '0'}}">
|
||||
<text class="list_video active">视频({{item.videoNum}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.videoNum == '0'}}">
|
||||
<text class="list_video">视频({{item.videoNum}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.monitoringCount != '0'}}">
|
||||
<text class="list_dust active">结构体({{item.monitoringCount}})</text>
|
||||
</van-col>
|
||||
<van-col span="8" wx:if="{{item.monitoringCount == '0'}}">
|
||||
<text class="list_dust">结构体({{item.monitoringCount}})</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
|
@ -46,7 +46,7 @@ Page({
|
|||
onLoad: function (options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../login/login',
|
||||
})
|
||||
}
|
||||
const proUserInfo = getUserInfo();
|
||||
|
@ -57,7 +57,7 @@ Page({
|
|||
id: app.globalData.useProjectId,
|
||||
text: app.globalData.useProjectName,
|
||||
},
|
||||
active: proUserInfo.projectUserInfo.subDeptType=='1'?4:1,
|
||||
active: proUserInfo.projectUserInfo.subDeptType == '1' ? 4 : 1,
|
||||
subDeptUserInfo: proUserInfo.projectUserInfo,
|
||||
});
|
||||
//用户权限菜单
|
||||
|
@ -82,7 +82,7 @@ Page({
|
|||
|
||||
goMenu: function (event) {
|
||||
let _url = event.currentTarget.dataset.url;
|
||||
if(!_url){
|
||||
if (!_url) {
|
||||
app.toast("正在建设中...")
|
||||
return false;
|
||||
}
|
||||
|
@ -117,24 +117,23 @@ Page({
|
|||
AQGL: function () {
|
||||
wx.setStorageSync('nav-menu', "aqgl");
|
||||
wx.redirectTo({
|
||||
url:'../project_safety/index'
|
||||
})
|
||||
url: '../project_safety/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到质量管理
|
||||
ZLGL: function () {
|
||||
wx.setStorageSync('nav-menu', "zlgl");
|
||||
wx.redirectTo({
|
||||
url:'../project_quality/index'
|
||||
})
|
||||
url: '../project_quality/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到进度管理
|
||||
JDGL: function () {
|
||||
app.toast("正在建设中");
|
||||
// wx.redirectTo({
|
||||
// url:'../../pageage/project_schedule/list/index'
|
||||
// })
|
||||
wx.redirectTo({
|
||||
url: '../project_schedule/list/index'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -146,11 +145,11 @@ Page({
|
|||
if (res.code == 200) {
|
||||
let proUserInfo = this.data.subDeptUserInfo;
|
||||
this.setData({
|
||||
todoDb: proUserInfo.subDeptType=="1"?(res.data.dwsh+res.data.rysh):res.data.todo,
|
||||
todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo,
|
||||
fbdwDB: res.data.dwsh,
|
||||
fbrtDB: res.data.rysh,
|
||||
aqglDb: proUserInfo.subDeptType=="1"?res.data.aqgl:0,
|
||||
zlglDb: proUserInfo.subDeptType=="1"?res.data.zlgl:0,
|
||||
aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
|
||||
zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
|
||||
aqyhDB: res.data.aqgl,
|
||||
zlyhDB: res.data.zlgl,
|
||||
})
|
||||
|
|
|
@ -71,7 +71,7 @@ Page({
|
|||
onLoad: function (options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../login/login',
|
||||
})
|
||||
}
|
||||
const proUserInfo = getUserInfo();
|
||||
|
@ -163,10 +163,9 @@ Page({
|
|||
|
||||
//跳转到进度管理
|
||||
JDGL: function () {
|
||||
app.toast("正在建设中");
|
||||
// wx.redirectTo({
|
||||
// url:'../../pageage/project_schedule/list/index'
|
||||
// })
|
||||
wx.redirectTo({
|
||||
url: '../project_schedule/list/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到项目管理
|
||||
|
|
|
@ -70,7 +70,7 @@ Page({
|
|||
onLoad: function (options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../login/login',
|
||||
})
|
||||
}
|
||||
const proUserInfo = getUserInfo();
|
||||
|
@ -162,10 +162,9 @@ Page({
|
|||
|
||||
//跳转到进度管理
|
||||
JDGL: function () {
|
||||
app.toast("正在建设中");
|
||||
// wx.redirectTo({
|
||||
// url:'../../pageage/project_schedule/list/index'
|
||||
// })
|
||||
wx.redirectTo({
|
||||
url: '../project_schedule/list/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到项目管理
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
// pages/project_schedule/add/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<!--pages/project_schedule/add/index.wxml-->
|
||||
<text>pages/project_schedule/add/index.wxml</text>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_schedule/add/index.wxss */
|
|
@ -0,0 +1,160 @@
|
|||
import {
|
||||
getToken,
|
||||
getUserInfo
|
||||
} from '../../../utils/auth'
|
||||
import {
|
||||
findMyTask
|
||||
} from '../../../api/flowable'
|
||||
import {
|
||||
planScheduleList
|
||||
} from '../../../api/project'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
active: 3,
|
||||
projectId: '',
|
||||
projectName: '',
|
||||
subDeptUserInfo: {},
|
||||
initData: {},
|
||||
aqglDb: 0,
|
||||
zlyhDB: 0,
|
||||
zlglDb: 0,
|
||||
todoDB: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
listData: []
|
||||
},
|
||||
|
||||
|
||||
//项目切换 返回值
|
||||
onProjectSelect(e) {
|
||||
let projectId = e.detail.id;
|
||||
let projectName = e.detail.text;
|
||||
app.globalData.useProjectId = projectId;
|
||||
app.globalData.useProjectName = projectName;
|
||||
this.onLoad();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
})
|
||||
}
|
||||
const proUserInfo = getUserInfo();
|
||||
this.setData({
|
||||
projectId: app.globalData.useProjectId,
|
||||
projectName: app.globalData.useProjectName,
|
||||
initData: {
|
||||
id: app.globalData.useProjectId,
|
||||
text: app.globalData.useProjectName,
|
||||
},
|
||||
subDeptUserInfo: proUserInfo.projectUserInfo,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
listData: [],
|
||||
});
|
||||
this.awaitTask();
|
||||
this.getListData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 数据加载
|
||||
*/
|
||||
getListData() {
|
||||
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId;
|
||||
planScheduleList(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
res.rows.forEach(item => {
|
||||
item.mainImage = item.images.split(',')[0];
|
||||
});
|
||||
this.setData({
|
||||
total: res.total,
|
||||
listData: this.data.listData.concat(res.rows)
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 滚动加载
|
||||
*/
|
||||
onScrollToLower() {
|
||||
let nal = Math.ceil(this.data.total / this.data.pageSize);
|
||||
if (this.data.pageNum < nal) {
|
||||
this.setData({
|
||||
pageNum: this.data.pageNum + 1
|
||||
});
|
||||
this.getListData();
|
||||
} else {
|
||||
console.log("已经到底了,没有数据可加载!!!");
|
||||
}
|
||||
},
|
||||
|
||||
// 底部导航
|
||||
onChange(event) {
|
||||
// event.detail 的值为当前选中项的索引
|
||||
this.setData({
|
||||
active: event.detail
|
||||
});
|
||||
},
|
||||
|
||||
//跳转到项目概况
|
||||
XMGK: function () {
|
||||
wx.setStorageSync('nav-menu', "xmgk");
|
||||
wx.redirectTo({
|
||||
url: '../project_info/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到安全管理
|
||||
AQGL: function () {
|
||||
wx.setStorageSync('nav-menu', "aqgl");
|
||||
wx.redirectTo({
|
||||
url: '../project_safety/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到进度管理
|
||||
JDGL: function () {
|
||||
wx.redirectTo({
|
||||
url: '../project_schedule/list/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到项目管理
|
||||
XMGL: function () {
|
||||
wx.setStorageSync('nav-menu', "xmgl");
|
||||
wx.redirectTo({
|
||||
url: '../project_more/index'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 统计代办
|
||||
*/
|
||||
awaitTask() {
|
||||
let param = "proId=" + app.globalData.useProjectId;
|
||||
findMyTask(param).then(res => {
|
||||
if (res.code == 200) {
|
||||
let proUserInfo = this.data.subDeptUserInfo;
|
||||
this.setData({
|
||||
aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
|
||||
zlyhDB: res.data.zlyl,
|
||||
zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
|
||||
todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
})
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-tabbar": "@vant/weapp/tabbar",
|
||||
"van-tabbar-item": "@vant/weapp/tabbar-item"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="XMGK">
|
||||
<image src="/images/left.png"></image>
|
||||
<text class="header_fh">返回</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="3">
|
||||
<user-infos></user-infos>
|
||||
</van-col>
|
||||
<van-col span="10">
|
||||
<view class="header_name">进度管理</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="inspect_max_scroll">
|
||||
<view class="inspect_for_scroll" v-if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="inspect_list_info_img">
|
||||
<van-image width="120rpx" height="120rpx" fit="cover" src="{{imgBaseUrl+item.mainImage+'.min.jpg'}}" />
|
||||
</view>
|
||||
<view class="inspect_list_info_data">
|
||||
<view class="inspect_list_info_data_prop">计划名称:<text class="color_blue">{{item.taskName}}</text></view>
|
||||
<view class="inspect_list_info_data_prop safety_issue_number">完成进度:<text class="color_orange">{{item.schedulePercent}} %</text></view>
|
||||
<view class="inspect_list_info_data_prop ">填报时间:<text>{{item.createDate}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info_position">
|
||||
进度描述:<text class="color_purple">{{item.description}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to" bindtap="skipAdd">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="/images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
|
||||
<van-tabbar-item bindtap="XMGK">
|
||||
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
|
||||
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
|
||||
项目概况
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item>
|
||||
<image slot="icon" src="/images/footer_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
|
||||
<image slot="icon-active" src="/images/foot_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
|
||||
安全管理
|
||||
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="ZLGL">
|
||||
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
|
||||
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
|
||||
质量管理
|
||||
<span class="tabNum" wx:if="{{zlglDB>0}}">{{zlglDB}}</span>
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="JDGL">
|
||||
<image slot="icon" src="/images/footer_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
|
||||
<image slot="icon-active" src="/images/foot_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
|
||||
进度管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="XMGL">
|
||||
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
|
||||
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
|
||||
项目管理
|
||||
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_schedule/list/index.wxss */
|
|
@ -43,10 +43,26 @@ export function delPlan(id) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询项目进度
|
||||
// 查询计划管理
|
||||
export function findOnlyPlan(proId) {
|
||||
return request({
|
||||
url: '/manage/plan/findOnlyPlan/' + proId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 查询计划管理
|
||||
export function findPlanDatas(proId) {
|
||||
return request({
|
||||
url: '/manage/plan/findPlanDatas/' + proId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 递归查询计划
|
||||
export function findRecursionPlan(planId) {
|
||||
return request({
|
||||
url: '/manage/plan/findRecursionPlan/' + planId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ export function delSchedule(id) {
|
|||
}
|
||||
|
||||
// 查询之前项目进度
|
||||
export function findPreviousSchedule(taskId) {
|
||||
export function findPreviousSchedule(planId) {
|
||||
return request({
|
||||
url: '/manage/schedule/findPreviousSchedule/' + taskId,
|
||||
url: '/manage/schedule/findPreviousSchedule/' + planId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -127,6 +127,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="false"
|
||||
label="操作"
|
||||
align="center"
|
||||
width="200"
|
||||
|
@ -170,9 +171,33 @@
|
|||
<el-form-item label="项目名称" v-if="form.projectId">
|
||||
<el-tag effect="plain">{{ form.projectName }}</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程计划名称" prop="taskName">
|
||||
<el-form-item label="工程计划名称" prop="taskName" v-if="false">
|
||||
<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)"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
{{ 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">
|
||||
|
@ -243,7 +268,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="Schedule">
|
||||
import { findOnlyPlan } from "@/api/manage/plan";
|
||||
import { findOnlyPlan, findPlanDatas, findRecursionPlan } from "@/api/manage/plan";
|
||||
import {
|
||||
listSchedule,
|
||||
getSchedule,
|
||||
|
@ -267,6 +292,7 @@ const multiple = ref(true);
|
|||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const planNode = ref({});
|
||||
const planOptions = ref([]);
|
||||
const previousSchedule = ref({});
|
||||
|
||||
const data = reactive({
|
||||
|
@ -286,11 +312,13 @@ const data = reactive({
|
|||
},
|
||||
rules: {
|
||||
projectId: [{ required: true, message: "项目名称不能为空", trigger: "blur" }],
|
||||
taskName: [{ required: true, message: "工程计划不能为空", trigger: "blur" }],
|
||||
schedulePercent: [{ required: true, message: "当前完成进度不能为空", trigger: "blur" }],
|
||||
planId: [{ required: true, message: "工程计划不能为空", trigger: "change" }],
|
||||
schedulePercent: [
|
||||
{ required: true, message: "当前完成进度不能为空", trigger: "blur" },
|
||||
],
|
||||
finishDate: [{ required: true, message: "完成时间不能为空", trigger: "change" }],
|
||||
description: [{ required: true, message: "施工进度描述不能为空", trigger: "blur" }],
|
||||
images1: [{ required: true, message: "施工作业图不能为空", trigger: "change" }],
|
||||
images: [{ required: true, message: "施工作业图不能为空", trigger: "change" }],
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -369,7 +397,8 @@ function handleAdd() {
|
|||
form.value.comName = userStore.currentComName;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
initPlan(userStore.currentPrjId);
|
||||
//initPlan(userStore.currentPrjId);
|
||||
initPlanDatas(userStore.currentPrjId);
|
||||
title.value = "添加项目进度";
|
||||
}
|
||||
|
||||
|
@ -444,15 +473,44 @@ function initPlan(proId) {
|
|||
});
|
||||
}
|
||||
|
||||
function buildTree(all, id) {
|
||||
let tmps = all.filter((d) => d.parentId == id);
|
||||
if (tmps.length > 0) {
|
||||
tmps.forEach((it) => {
|
||||
it.children = buildTree(all, it.taskId);
|
||||
});
|
||||
}
|
||||
return tmps;
|
||||
}
|
||||
|
||||
/** 初始化计划管理 */
|
||||
function initPlanDatas(proId) {
|
||||
findPlanDatas(proId).then((res) => {
|
||||
let treeDatas = buildTree(res.data, 1);
|
||||
planOptions.value = treeDatas;
|
||||
});
|
||||
}
|
||||
|
||||
/** 根据单位选择角色 */
|
||||
function handleChangePlan(value) {
|
||||
initPreviousSchedule(value);
|
||||
findRecursionPlan(value).then((res) => {
|
||||
form.value.taskId = res.data.taskId;
|
||||
form.value.taskUniqueId = res.data.taskUniqueId;
|
||||
form.value.taskName = res.data.taskName;
|
||||
form.value.bimId = res.data.bimId;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询上次计划进度 */
|
||||
function initPreviousSchedule(taskId) {
|
||||
findPreviousSchedule(taskId).then((res) => {
|
||||
function initPreviousSchedule(planId) {
|
||||
findPreviousSchedule(planId).then((res) => {
|
||||
if (res.data) {
|
||||
previousSchedule.value = res.data;
|
||||
form.value.schedulePercent = res.data.schedulePercent;
|
||||
}else{
|
||||
previousSchedule.value = 1;
|
||||
form.value.schedulePercent = {};
|
||||
} else {
|
||||
previousSchedule.value = {};
|
||||
form.value.schedulePercent = 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue