Compare commits

...

2 Commits

Author SHA1 Message Date
姜玉琦 d9a0c5b99e Merge branch 'dev_xd' of http://62.234.3.186:3000/jiangyq/YZProjectCloud into dev_xd 2025-04-29 00:39:41 +08:00
姜玉琦 3b3784aa37 提交代码 2025-04-29 00:39:32 +08:00
52 changed files with 1311 additions and 243 deletions

View File

@ -270,7 +270,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="taskName != null and taskName != ''"> concat(task_name, ' / ', #{taskName}) 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

View File

@ -214,13 +214,15 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
*/
@Override
public List<Map<String,Object>> statsAttendanceDaysByProId(Long proId){
ProProjectInfoSubdeptsUsers myInfos = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proId,SecurityUtils.getLoginUser().getUserid());
AttendanceUbiData attendanceQuery = new AttendanceUbiData();
attendanceQuery.setProjectId(proId);
if(Objects.equals(myInfos.getSubDeptType(), SubDeptsEnums.LWFB.getCode()) || Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.ZYFB.getCode())){
attendanceQuery.setSubDeptId(myInfos.getSubDeptId());
if(Objects.equals(myInfos.getUserPost(),UserPostEnums.BZZ.getCode())){
attendanceQuery.setSubDeptGroup(myInfos.getSubDeptGroup());
if(!SecurityUtils.isAdmin(SecurityUtils.getUserId()) && !SecurityUtils.isGSAdmin()){
ProProjectInfoSubdeptsUsers myInfos = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proId,SecurityUtils.getLoginUser().getUserid());
if(Objects.equals(myInfos.getSubDeptType(), SubDeptsEnums.LWFB.getCode()) || Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.ZYFB.getCode())){
attendanceQuery.setSubDeptId(myInfos.getSubDeptId());
if(Objects.equals(myInfos.getUserPost(),UserPostEnums.BZZ.getCode())){
attendanceQuery.setSubDeptGroup(myInfos.getSubDeptGroup());
}
}
}
return attendanceUbiDataMapper.statsAttendanceDays(attendanceQuery);
@ -232,13 +234,15 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
*/
@Override
public List<Map<String,Object>> statsAttendanceViewByProId(Long proId){
ProProjectInfoSubdeptsUsers myInfos = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proId,SecurityUtils.getLoginUser().getUserid());
AttendanceUbiData attendanceQuery = new AttendanceUbiData();
attendanceQuery.setProjectId(proId);
if(Objects.equals(myInfos.getSubDeptType(), SubDeptsEnums.LWFB.getCode()) || Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.ZYFB.getCode())){
attendanceQuery.setSubDeptId(myInfos.getSubDeptId());
if(Objects.equals(myInfos.getUserPost(),UserPostEnums.BZZ.getCode())){
attendanceQuery.setSubDeptGroup(myInfos.getSubDeptGroup());
if(!SecurityUtils.isAdmin(SecurityUtils.getUserId()) && !SecurityUtils.isGSAdmin()){
ProProjectInfoSubdeptsUsers myInfos = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proId,SecurityUtils.getLoginUser().getUserid());
if(Objects.equals(myInfos.getSubDeptType(), SubDeptsEnums.LWFB.getCode()) || Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.ZYFB.getCode())){
attendanceQuery.setSubDeptId(myInfos.getSubDeptId());
if(Objects.equals(myInfos.getUserPost(),UserPostEnums.BZZ.getCode())){
attendanceQuery.setSubDeptGroup(myInfos.getSubDeptGroup());
}
}
}
Map<String, Object> params = new HashMap<>();

View File

@ -64,6 +64,9 @@ public class ProPlanScheduleServiceImpl implements IProPlanScheduleService
@Transactional
public int insertProPlanSchedule(ProPlanSchedule proPlanSchedule)
{
if(proPlanSchedule.getSchedulePercent()!=100L){
proPlanSchedule.setFinishDate(null);
}
proPlanSchedule.setCreateBy(SecurityContextHolder.getUserName());
proPlanSchedule.setCreateDate(DateUtils.getNowDate());
int res = proPlanScheduleMapper.insertProPlanSchedule(proPlanSchedule);
@ -98,7 +101,11 @@ public class ProPlanScheduleServiceImpl implements IProPlanScheduleService
@Transactional
public int updateProPlanSchedule(ProPlanSchedule proPlanSchedule)
{
if(proPlanSchedule.getSchedulePercent()!=100L){
proPlanSchedule.setFinishDate(null);
}
proPlanSchedule.setUpdateBy(SecurityContextHolder.getUserName());
proPlanSchedule.setUpdateDate(DateUtils.getNowDate());
int res = proPlanScheduleMapper.updateProPlanSchedule(proPlanSchedule);
if(res>0){
ProPlan plan = proPlanMapper.selectProPlanById(proPlanSchedule.getPlanId());

View File

@ -1517,13 +1517,15 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
*/
@Override
public List<Map<String,Object>> statsSubDeptsUsersByProId(Long proId){
ProProjectInfoSubdeptsUsers myInfos = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proId,SecurityUtils.getLoginUser().getUserid());
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
query.setProjectId(proId);
if(Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.LWFB.getCode()) || Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.ZYFB.getCode())){
query.setSubDeptId(myInfos.getSubDeptId());
if(Objects.equals(myInfos.getUserPost(),UserPostEnums.BZZ.getCode())){
query.setSubDeptGroup(myInfos.getSubDeptGroup());
if(!SecurityUtils.isAdmin(SecurityUtils.getUserId()) && !SecurityUtils.isGSAdmin()){
ProProjectInfoSubdeptsUsers myInfos = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proId,SecurityUtils.getLoginUser().getUserid());
if(Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.LWFB.getCode()) || Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.ZYFB.getCode())){
query.setSubDeptId(myInfos.getSubDeptId());
if(Objects.equals(myInfos.getUserPost(),UserPostEnums.BZZ.getCode())){
query.setSubDeptGroup(myInfos.getSubDeptGroup());
}
}
}
return proProjectInfoSubdeptsUsersMapper.statsSubDeptsUsersByProId(query);

View File

@ -145,9 +145,9 @@ export function registerSubDeptsGL(data) {
}
// 修改参建单位入场状态
export function editSubDeptsUseStatus(id,status) {
export function editSubDeptsUseStatus(id, status) {
return request({
url: '/manage/proProjectInfoSubdepts/editUseStatus/'+id+'?status='+status,
url: '/manage/proProjectInfoSubdepts/editUseStatus/' + id + '?status=' + status,
method: 'get'
})
}
@ -182,23 +182,23 @@ export function subgroupsCount(query) {
// 查看单位班组详情
export function findSubdeptsGroupById(id) {
return request({
url: '/manage/proProjectInfoSubdeptsGroup/'+id,
url: '/manage/proProjectInfoSubdeptsGroup/' + id,
method: 'get'
})
}
// 修改单位班组入场状态
export function editSubGroupsUseStatus(id,status) {
export function editSubGroupsUseStatus(id, status) {
return request({
url: '/manage/proProjectInfoSubdeptsGroup/editUseStatus/'+id+'?status='+status,
url: '/manage/proProjectInfoSubdeptsGroup/editUseStatus/' + id + '?status=' + status,
method: 'get'
})
}
// 查看可选班组长列表
export function fileGroupLeaderUsers(subDeptId,craftPost) {
export function fileGroupLeaderUsers(subDeptId, craftPost) {
return request({
url: '/manage/proProjectInfoSubdeptsUsers/fileGroupLeaderUsers/'+subDeptId+'?craftPost='+craftPost,
url: '/manage/proProjectInfoSubdeptsUsers/fileGroupLeaderUsers/' + subDeptId + '?craftPost=' + craftPost,
method: 'get'
})
}
@ -251,15 +251,15 @@ export function registerSubUsersGL(data) {
// 查询班组人员详情
export function findProSubUsersInfoById(id) {
return request({
url: '/manage/proProjectInfoSubdeptsUsers/'+id,
url: '/manage/proProjectInfoSubdeptsUsers/' + id,
method: 'get'
})
}
// 修改班组人员入场状态
export function editSubUsersUseStatus(id,status) {
export function editSubUsersUseStatus(id, status) {
return request({
url: '/manage/proProjectInfoSubdeptsUsers/editUseStatus/'+id+'?status='+status,
url: '/manage/proProjectInfoSubdeptsUsers/editUseStatus/' + id + '?status=' + status,
method: 'get'
})
}
@ -282,3 +282,43 @@ export function planScheduleList(query) {
})
}
// 查询进度计划管理详情
export function planScheduleInfo(id) {
return request({
url: '/manage/schedule/' + id,
method: 'get'
})
}
// 查询之前项目进度
export function findPreviousSchedule(planId) {
return request({
url: '/manage/schedule/findPreviousSchedule/' + planId,
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'
})
}
// 保存计划进度
export function submitPlanSchedule(data) {
return request({
url: '/manage/schedule',
method: 'post',
data: data
})
}

View File

@ -31,7 +31,8 @@
"pages/project_magusers/add/index",
"pages/project_magusers/info/index",
"pages/project_schedule/list/index",
"pages/project_schedule/add/index"
"pages/project_schedule/add/index",
"pages/project_schedule/info/index"
],
"usingComponents": {
"van-row": "@vant/weapp/row",
@ -77,6 +78,7 @@
"select-roles": "./components/select-roles/index",
"select-group-person": "./components/select-group-person/index",
"select-group-position": "./components/select-group-position/index",
"select-group-plan": "./components/select-group-plan/index",
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
"curve-echarts": "pages/components/curve-echarts/index",

View File

@ -1,8 +1,9 @@
/* newComponents/select-person/index.wxss */
page{
height:100%
page {
height: 100%
}
.rectifier_add_to{
.rectifier_add_to {
width: 100rpx;
height: 100rpx;
margin: auto;
@ -14,21 +15,24 @@ page{
font-weight: bold;
border-radius: 5rpx;
}
.rectifier_max{
.rectifier_max {
width: 100%;
background: #232a44;
border-radius: 15rpx;
position: relative;
height: 100%;
}
.rectifier_title{
.rectifier_title {
position: relative;
background: #27304f;
border-radius: 15rpx;
text-align: center;
padding:20rpx 15rpx;
padding: 20rpx 15rpx;
}
.rectifier_close{
.rectifier_close {
position: absolute;
width: 50rpx;
height: 50rpx;
@ -37,14 +41,17 @@ page{
line-height: 60rpx;
text-align: center;
}
.rectifier_list{
padding:20rpx 40rpx;
.rectifier_list {
padding: 20rpx 40rpx;
}
.rectifier_list_height{
.rectifier_list_height {
height: 990rpx;
overflow: auto;
}
.rectifier_list_for{
.rectifier_list_for {
display: flex;
align-items: center;
padding: 16rpx 15rpx;
@ -52,44 +59,53 @@ page{
text-overflow: ellipsis;
white-space: nowrap;
}
.rectifier_list_radio{
.rectifier_list_radio {
width: 70rpx;
}
.rectifier_list_radio_circle{
.rectifier_list_radio_circle {
width: 30rpx;
height: 30rpx;
border-radius: 50%;
border: 1px solid #6576a2;
}
.rectifier_list_radio_circle.active{
.rectifier_list_radio_circle.active {
background: #8262f3;
border: 1px solid #8262f3;
}
.rectifier_list_name{
.rectifier_list_name {
padding-left: 10rpx;
color: #8499d0;
}
.rectifier_list_name.active{
.rectifier_list_name.active {
color: #ffffff;
}
.rectifier_btn{
.rectifier_btn {
display: flex;
align-items: center;
background: #27304f;
border-radius: 0 0 15rpx 15rpx;
}
.rectifier_btn view{
.rectifier_btn view {
width: 50%;
text-align: center;
height: 80rpx;
line-height: 80rpx;
color:#6874a4;
color: #6874a4;
}
.rectifier_btn view:last-child{
.rectifier_btn view:last-child {
border-left: 1px solid #6874a4;
color: #ffffff;
}
.rectifier_list-group_for{
.rectifier_list-group_for {
height: 65rpx;
background-color: #9898987d;
line-height: 65rpx;
@ -99,7 +115,8 @@ page{
border-radius: 5px;
font-weight: 500;
}
.rectifier_list-group_for:not(:first-child){
.rectifier_list-group_for:not(:first-child) {
margin-top: 15px;
}
@ -109,31 +126,8 @@ page{
border-radius: 10rpx;
padding: 0 30rpx;
}
.modify_eharts_title_1 {
padding-left: 45rpx;
background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/40rpx;
}
padding-left: 45rpx;
background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/40rpx;
}

View File

@ -0,0 +1,227 @@
Component({
/**
* 组件的属性列表
*/
properties: {
dataTree: {
type: Array,
value: []
},
treeListIndex: { // 当期树形列表的索引
type: Number,
value: 1
},
isOpenAll: { // 是否展开全部节点
type: Boolean,
value: false
},
showCheckBox: { // 是否显示选择框
type: Boolean,
value: true
}
},
observers: {
'dataTree': function (params) {
this.setData({
tree: this._initSourceData(params)
})
}
},
/**
* 组件的初始数据
*/
data: {
tree: [],
allChoiceIdList: [] // 所有选中的id数组
},
/**
* 组件的方法列表
*/
methods: {
isOpen(e) {
const open = 'tree[' + e.currentTarget.dataset.index + '].open'
this.setData({
[open]: !this.data.tree[e.currentTarget.dataset.index].open
})
},
_initSourceData(nodes) {
nodes.forEach(element => {
if (element.checked === undefined) element.checked = 0
element.open = this.properties.isOpenAll // 是否展开
if (element.children && element.children.length > 0) element.children = this._initSourceData(element.children)
})
return nodes
},
/**
* 选择节点
* @param {*} e
*/
select(e) {
this._initSourceData(this.data.tree);
let item = e.currentTarget.dataset.item
if(item.children && item.children.length>0){
wx.showToast({
title: "请选择进度计划任务!",
icon: 'none',
duration: 600,
mask: true
});
return false;
}
item = this._handleClickItem(item)
this.data.tree = this._updateTree(this.data.tree, item)
this.setData({
tree: this.data.tree
})
this.data.allChoiceIdList = this.getAllChoiceId(this.data.tree)
this.triggerEvent('select', {
item: item,
idList: this.data.allChoiceIdList
}, {
bubbles: true,
composed: true
})
this.triggerEvent('clickItem', {
item: item
}, {
bubbles: true,
composed: true
})
},
// 选择冒泡事件
handleSelect(e) {
let parent = e.currentTarget.dataset.parent
let currentTap = e.detail.item
console.log('parent节点:', parent)
console.log('currentTap节点:', currentTap)
// 修正它的父节点
parent.children = this._updateTree(parent.children, currentTap)
const {
half,
all,
none
} = this.getChildState(parent.children)
// console.log(`half:${half},all:${all},none:${none}`)
if (half) parent.checked = -1
if (all) parent.checked = 1
if (none) parent.checked = 0
// 修正整个tree
this.data.tree = this._updateTree(this.data.tree, parent)
this.setData({
tree: this.data.tree
})
this.data.allChoiceIdList = this.getAllChoiceId(this.data.tree)
this.triggerEvent('select', {
item: parent,
idList: this.data.allChoiceIdList
}, {
bubbles: true,
composed: true
})
},
/**
* @method 处理点击选择
* @param {Object} node 节点对象
* @returns {Object} node 处理完毕的节点
* @description 有子节点则全选中或全取消当前为最底层单节点则选中或单取消
*/
_handleClickItem(node) {
switch (node.checked) {
case 0:
node.checked = 1
if (node.children && node.children.length > 0) node.children = this._allChoice(node.children)
break;
case 1:
node.checked = 0
if (node.children && node.children.length > 0) node.children = this._allCancel(node.children)
break;
default:
node.checked = 1
if (node.children && node.children.length > 0) node.children = this._allChoice(node.children)
break;
}
return node
},
/**
* @method 全选
* @param {Array} nodes 节点数组
* @returns {Array} nodes 处理完毕的节点数组
*/
_allChoice(nodes) {
if (nodes.length <= 0) return
for (let i = 0; i < nodes.length; i++) {
nodes[i].checked = 1
if (nodes[i].children && nodes[i].children.length > 0) nodes[i].children = this._allChoice(nodes[i].children)
}
return nodes
},
/**
* @method 全取消
* @param {Array} nodes 节点数组
* @returns {Array} nodes 处理完毕的节点数组
*/
_allCancel(nodes) {
if (nodes.length <= 0) return
for (let i = 0; i < nodes.length; i++) {
nodes[i].checked = 0
if (nodes[i].children && nodes[i].children.length > 0) nodes[i].children = this._allCancel(nodes[i].children)
}
return nodes
},
/**
* @method 更新tree
* @param {Array} tree 节点树
* @param {Object} newItem 需要替换新节点
* @description 找到tree中目标进行替换
*/
_updateTree(tree, newItem) {
if (!tree || tree.length <= 0) return
for (let i = 0; i < tree.length; i++) {
if (tree[i].id === newItem.id) {
tree[i] = newItem
break
} else {
if (tree[i].children && tree[i].children.length > 0) {
tree[i].children = this._updateTree(tree[i].children, newItem)
}
}
}
return tree
},
/**
* @method 获取子节点的状态
* @param {Array} node 节点数组
*/
getChildState(node) {
let all = true;
let none = true;
for (let i = 0, j = node.length; i < j; i++) {
const n = node[i];
if (n.checked === 1 || n.checked === -1) {
none = none && false;
}
if (n.checked === 0 || n.checked === -1) {
all = all && false
}
}
return {
all,
none,
half: !all && !none
};
},
// 获取所有选中的节点id
getAllChoiceId(nodes, res = []) {
for (let i = 0; i < nodes.length; i++) {
if (nodes[i].checked === 1) {
var obj = {}
obj.planId = nodes[i].id
obj.planName = nodes[i].taskName
res.push(obj)
}
if (nodes[i].children && nodes[i].children.length > 0) this.getAllChoiceId(nodes[i].children, res)
}
return res
}
}
})

View File

@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"categoryTree": "../select-group-plan/index"
}
}

View File

@ -0,0 +1,22 @@
<view wx:for="{{tree}}" wx:key="id" class="tree_container">
<!-- 一级菜单 -->
<view style="margin-left: {{treeListIndex*20}}rpx" class="tree-item">
<view class="tree-item-onOff" wx:if="{{item.children && item.children.length > 0}}" bindtap="isOpen" data-index="{{index}}">
<van-icon name="arrow-down" s class="{{item.open ? 'expand' : 'collapse'}}" />
</view>
<view class="tree-item-onOff" wx:else></view>
<view class="block_" bindtap="select" data-item="{{item}}" data-index="{{index}}">
<block wx:if="{{showCheckBox}}">
<image wx:if="{{item.checked === 1}}" src="/images/choice.png" class="check-box"></image>
<image wx:if="{{item.checked === 0}}" src="/images/unchoice.png" class="check-box"></image>
<image wx:if="{{item.checked === -1}}" src="/images/unfullChoice.png" class="check-box"></image>
</block>
<view class="tree-item-name">
<text class="tree-item-title {{item.checked === 1 ? 'tree-item-name-select' : '' }}">{{item.taskName}}<text class="tree-item-suffix"> {{item.scheduleNode}} % </text></text>
</view>
</view>
</view>
<!-- 二级菜单 -->
<categoryTree wx:if="{{item.children && item.children.length > 0 && item.open}}" data-parent="{{item}}" dataTree='{{ item.children }}' isOpenAll="{{isOpenAll}}" showCheckBox="{{showCheckBox}}" treeListIndex="{{treeListIndex+1}}" catch:select="handleSelect" />
</view>

View File

@ -0,0 +1,76 @@
.tree_container {
width: auto;
box-sizing: border-box;
overflow: scroll;
position: relative;
}
.tree-item {
width: auto;
box-sizing: border-box;
overflow-x: scroll;
padding: 18rpx 0;
display: flex;
justify-content: flex-start;
align-items: center;
border-bottom: 1rpx solid #27304f;
}
.block_ {
width: 100% !important;
display: contents;
}
.tree-item-name {
display: flex;
justify-content: flex-start;
align-items: center;
flex: 8;
width: 100%;
}
.tree-item-title {
margin-left: 12rpx;
color: #cdcdcd;
font-size: 32rpx;
word-break: break-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 80%;
}
.tree-item-suffix{
font-weight: 600;
}
.tree-item-onOff {
width: 40rpx;
display: flex;
justify-content: center;
align-items: center;
color: coral !important;
margin-right: 10rpx;
}
.collapse {
width: 36rpx;
height: 20rpx;
transform: rotate(-90deg);
}
.expand {
width: 36rpx;
height: 20rpx;
}
.check-box {
/* position: absolute;
right: 15%; */
height: 32rpx !important;
width: 32rpx !important;
}
.tree-item-name-select {
color: #0079FE;
}

View File

@ -1,8 +1,9 @@
/* newComponents/select-person/index.wxss */
page{
height:100%
page {
height: 100%
}
.rectifier_add_to{
.rectifier_add_to {
width: 100rpx;
height: 100rpx;
margin: auto;
@ -14,21 +15,24 @@ page{
font-weight: bold;
border-radius: 5rpx;
}
.rectifier_max{
.rectifier_max {
width: 100%;
background: #232a44;
border-radius: 15rpx;
position: relative;
height: 100%;
}
.rectifier_title{
.rectifier_title {
position: relative;
background: #27304f;
border-radius: 15rpx;
text-align: center;
padding:20rpx 15rpx;
padding: 20rpx 15rpx;
}
.rectifier_close{
.rectifier_close {
position: absolute;
width: 50rpx;
height: 50rpx;
@ -37,14 +41,17 @@ page{
line-height: 60rpx;
text-align: center;
}
.rectifier_list{
padding:20rpx 40rpx;
.rectifier_list {
padding: 20rpx 40rpx;
}
.rectifier_list_height{
.rectifier_list_height {
height: 990rpx;
overflow: auto;
}
.rectifier_list_for{
.rectifier_list_for {
display: flex;
align-items: center;
padding: 18rpx 15rpx;
@ -52,44 +59,53 @@ page{
text-overflow: ellipsis;
white-space: nowrap;
}
.rectifier_list_radio{
.rectifier_list_radio {
width: 70rpx;
}
.rectifier_list_radio_circle{
.rectifier_list_radio_circle {
width: 30rpx;
height: 30rpx;
border-radius: 50%;
border: 1px solid #6576a2;
}
.rectifier_list_radio_circle.active{
.rectifier_list_radio_circle.active {
background: #8262f3;
border: 1px solid #8262f3;
}
.rectifier_list_name{
.rectifier_list_name {
padding-left: 10rpx;
color: #6576a2;
}
.rectifier_list_name.active{
.rectifier_list_name.active {
color: #ffffff;
}
.rectifier_btn{
.rectifier_btn {
display: flex;
align-items: center;
background: #27304f;
border-radius: 0 0 15rpx 15rpx;
}
.rectifier_btn view{
.rectifier_btn view {
width: 50%;
text-align: center;
height: 80rpx;
line-height: 80rpx;
color:#6874a4;
color: #6874a4;
}
.rectifier_btn view:last-child{
.rectifier_btn view:last-child {
border-left: 1px solid #6874a4;
color: #ffffff;
}
.rectifier_list-group_for{
.rectifier_list-group_for {
height: 65rpx;
background-color: #879ff97d;
line-height: 65rpx;
@ -97,33 +113,10 @@ page{
text-overflow: ellipsis;
white-space: nowrap;
}
.inspect_input_fill_in {
height: 90rpx;
background: #212737;
border-radius: 10rpx;
padding: 0 30rpx;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

View File

@ -31,7 +31,7 @@
<text wx:if="{{item.endTime}}" class="color_purple">办结时间 {{item.endTime}}</text>
</view>
<view wx:if="{{showChecked && activeState=='dsh'}}" class="myIcon" data-set="{{item.procInsId}}" catchtap="selectItem">
<image src="{{item.selected ? '/images/radio-selected.png' : '/images/radio.png'}}" />
<image src="{{item.selected ? '/images/choice.png' : '/images/unchoice.png'}}" />
</view>
</view>
</view>

View File

@ -576,6 +576,7 @@ Page({
//跳转到进度管理
JDGL: function () {
wx.setStorageSync('nav-menu', "xmgk");
wx.redirectTo({
url: '../project_schedule/list/index'
})

View File

@ -47,7 +47,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
if (options && options.id) {

View File

@ -34,7 +34,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
if (options && options.id) {

View File

@ -39,7 +39,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
this.setData({

View File

@ -131,6 +131,7 @@ Page({
//跳转到进度管理
JDGL: function () {
wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({
url: '../project_schedule/list/index'
})

View File

@ -68,7 +68,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();

View File

@ -43,7 +43,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
this.setData({

View File

@ -57,7 +57,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();

View File

@ -43,7 +43,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();

View File

@ -51,7 +51,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();

View File

@ -43,7 +43,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
this.setData({

View File

@ -765,7 +765,7 @@
<view wx:if="{{item.questionType!=2}}" class="question_body">
<view wx:for="{{item.questionOption}}" wx:key="pancan" wx:for-item="pancan" wx:for-index="innerIndex" bindtap="toggleRadio" class="option" data-id="{{index+'_'+innerIndex}}">
<view class="icon">
<image src="{{pancan.selected ? '/images/radio-selected.png' : '/images/radio.png'}}" />
<image src="{{pancan.selected ? '/images/choice.png' : '/images/unchoice.png'}}" />
</view>
<view class="content {{pancan.selected?'ac':''}}">{{pancan.opt}} : {{pancan.result}}</view>
</view>
@ -773,7 +773,7 @@
<view wx:else class="question_body">
<view wx:for="{{item.questionOption}}" wx:key="pancan" wx:for-item="pancan" wx:for-index="innerIndex" bindtap="toggleCheckbox" class="option" data-id="{{index+'_'+innerIndex}}">
<view class="icon">
<image src="{{pancan.selected ? '/images/radio-selected.png' : '/images/radio.png'}}" />
<image src="{{pancan.selected ? '/images/choice.png' : '/images/unchoice.png'}}" />
</view>
<view class="content {{pancan.selected?'ac':''}}">{{pancan.opt}} : {{pancan.result}}</view>
</view>
@ -831,7 +831,7 @@
<view wx:if="{{item.questionType!=2}}" class="question_body">
<view wx:for="{{item.questionOption}}" wx:key="pancan" wx:for-item="pancan" wx:for-index="innerIndex" bindtap="toggleRadio" class="option" data-id="{{index+'_'+innerIndex}}">
<view class="icon">
<image src="{{pancan.selected ? '/images/radio-selected.png' : '/images/radio.png'}}" />
<image src="{{pancan.selected ? '/images/choice.png' : '/images/unchoice.png'}}" />
</view>
<view class="content {{pancan.selected?'ac':''}}">{{pancan.opt}} : {{pancan.result}}</view>
</view>
@ -839,7 +839,7 @@
<view wx:else class="question_body">
<view wx:for="{{item.questionOption}}" wx:key="pancan" wx:for-item="pancan" wx:for-index="innerIndex" bindtap="toggleCheckbox" class="option" data-id="{{index+'_'+innerIndex}}">
<view class="icon">
<image src="{{pancan.selected ? '/images/radio-selected.png' : '/images/radio.png'}}" />
<image src="{{pancan.selected ? '/images/choice.png' : '/images/unchoice.png'}}" />
</view>
<view class="content {{pancan.selected?'ac':''}}">{{pancan.opt}} : {{pancan.result}}</view>
</view>

View File

@ -163,6 +163,7 @@ Page({
//跳转到进度管理
JDGL: function () {
wx.setStorageSync('nav-menu', "zlgl");
wx.redirectTo({
url: '../project_schedule/list/index'
})

View File

@ -162,6 +162,7 @@ Page({
//跳转到进度管理
JDGL: function () {
wx.setStorageSync('nav-menu', "aqgl");
wx.redirectTo({
url: '../project_schedule/list/index'
})

View File

@ -1,66 +1,327 @@
// pages/project_schedule/add/index.js
import config from '../../../config'
import {
getToken
} from '../../../utils/auth'
import {
findPlanDatas,
findRecursionPlan,
findPreviousSchedule,
submitPlanSchedule
} from '../../../api/project'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
/**
* 页面的初始数据
*/
data: {
maxDate: new Date().getTime() + (3600 * 24 * 30 * 1000),
form: {
schedulePercent: 1
},
loadShow: false,
imageInfoData: [],
picker: false,
planOptions: [],
previousSchedule: null, //上次填报数据
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../login/login',
})
}
this.setData({
"form.projectId": app.globalData.useProjectId,
"form.projectName": app.globalData.useProjectName
});
this.initPlanDatas();
},
/**
* 打开选择窗
*/
openPicker() {
this.setData({
picker: true
})
},
closePicker() {
this.setData({
picker: false
})
},
/**
* 构建树结构
* @param {*} all
* @param {*} id
*/
buildTree(all, id) {
let tmps = all.filter((d) => d.parentId == id);
if (tmps.length > 0) {
tmps.forEach((it) => {
it.children = this.buildTree(all, it.taskId);
});
}
return tmps;
},
/**
* 初始化计划
*/
initPlanDatas() {
findPlanDatas(app.globalData.useProjectId).then((res) => {
let treeDatas = this.buildTree(res.data, 1);
this.setData({
planOptions: treeDatas
})
});
},
/**
* 组件选中时会触发
*/
handleClick: function (e) {
let checkIds = e.detail.idList;
if (checkIds.length > 0) {
let planValue = checkIds[checkIds.length - 1];
this.setData({
picker: false
})
findRecursionPlan(planValue.planId).then(res => {
if (res.data) {
this.setData({
"form.comId": res.data.comid,
"form.planId": planValue.planId,
"form.taskId": res.data.taskId,
"form.taskUniqueId": res.data.taskUniqueId,
"form.taskName": res.data.taskName,
"form.bimId": res.data.bimId,
});
} else {
this.setData({
"form.comId": null,
"form.taskId": null,
"form.taskUniqueId": null,
"form.taskName": null,
"form.bimId": null,
});
}
});
findPreviousSchedule(planValue.planId).then((res) => {
if (res.data) {
this.setData({
previousSchedule: res.data,
"form.schedulePercent": res.data.schedulePercent
});
} else {
this.setData({
previousSchedule: null,
"form.schedulePercent": 1
});
}
});
}
},
onChangeMinus(e) {
this.setData({
"form.schedulePercent": this.data.form.schedulePercent - 1
});
},
onChangePlus(e) {
this.setData({
"form.schedulePercent": this.data.form.schedulePercent + 1
});
},
onChangeBlur(e) {
this.setData({
"form.schedulePercent": e.detail.value
});
},
//完成时间
onInputTime(e) {
this.setData({
"form.finishDate": e.detail
})
},
//进度描述
onInputDescription(e) {
this.setData({
"form.description": e.detail.value
})
},
// 上传图片
onImagesArr(e) {
this.setData({
imageInfoData: e.detail
})
},
/**
* 数据保存
*/
submitSave() {
let _form = {
...this.data.form
};
let {
imageInfoData
} = this.data
//数据效验
if (!_form.projectId) {
app.toast("数据异常,请刷新页面重试!")
return false;
}
if (!_form.planId) {
app.toast("请选择工程计划!")
return false;
}
if (!_form.schedulePercent) {
app.toast("请填写计划完成进度!")
return false;
} else {
if (_form.schedulePercent == 100 && !_form.finishDate) {
app.toast("请选择完成时间!")
return false;
}
}
if (!_form.description) {
app.toast("请填写进度描述!")
return false;
}
if (imageInfoData.length == 0) {
app.toast("请上传施工现场作业图!")
return false;
}
let fileUrls = [];
this.setData({
loadShow: true
});
let that = this;
imageInfoData.forEach(async (item) => {
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
let obj = await that.syncUploadImage(item);
fileUrls.push(obj.data.data.url);
//验证图片上传完毕
if (fileUrls.length == imageInfoData.length) {
_form.images = fileUrls.toString();
submitPlanSchedule(_form).then(res => {
this.setData({
loadShow: false
});
if (res.code == 200) {
app.toast("新增进度成功!")
setTimeout(() => {
wx.redirectTo({
url: `../list/index`,
})
}, 200)
}
});
}
})
},
returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/
wx.redirectTo({
url: `../list/index`,
})
},
/**
* 这里考虑上传图片异步问题封装为同步
*/
syncUploadImage(file) {
let _baseUrl = config.baseUrl;
return new Promise((resolve, reject) => {
wx.uploadFile({
url: _baseUrl + "/file/upload", // 上传的服务器接口地址
filePath: file,
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
'Authorization': 'Bearer ' + getToken()
},
name: "file", //上传的所需字段,后端提供
formData: {},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
resolve({
data: data
})
},
fail: (err) => {
//上传失败修改pedding为reject
console.log("访问接口失败", err);
wx.showToast({
title: "网络出错,上传失败",
icon: 'none',
duration: 1000
});
reject(err)
}
});
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,3 +1,7 @@
{
"usingComponents": {}
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index",
"van-stepper": "@vant/weapp/stepper/index"
},
"navigationStyle":"custom"
}

View File

@ -1,2 +1,79 @@
<!--pages/project_schedule/add/index.wxml-->
<text>pages/project_schedule/add/index.wxml</text>
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
</view>
</van-col>
<van-col span="15">
<view class="header_name">新增进度计划</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<view class="inspect_info">
<view class="module_title_2 module_title_padding">
<view>{{form.projectName}}</view>
</view>
<view class="inspect_info_list">
<view class="markers inspect_info_title">工程计划</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写选择工程计划" placeholder-style="color:#6777aa;" bindtap="openPicker" disabled model:value="{{form.taskName}}" />
<van-popup show="{{ picker }}" bind:close="closePicker" position="bottom">
<view class="rectifier_max">
<view class="rectifier_title">
<view class="rectifier_text">选择工程计划</view>
<view class="rectifier_close" bindtap="closePicker">
<van-icon name="cross" />
</view>
</view>
<view class="rectifier_list">
<view class="rectifier_list_height">
<select-group-plan dataTree="{{planOptions}}" isOpenAll="{{fales}}" showCheckBox="{{fales}}" bind:select="handleClick" />
</view>
</view>
</view>
</van-popup>
</view>
</view>
<view class="inspect_info_list">
<view class="markers inspect_info_title">完成进度
<text wx:if="{{previousSchedule && previousSchedule.schedulePercent}}" style="font-size: small; color: #ff711e;font-weight: 600;">[ 上次完成进度 {{previousSchedule.schedulePercent}} % ]</text>
</view>
<view class="inspect_info_content">
<van-stepper v-model="{{form.schedulePercent}}" :value="{{form.schedulePercent}}" min="{{previousSchedule && previousSchedule.schedulePercent ? previousSchedule.schedulePercent : 1}}" max="100" integer bind:blur="onChangeBlur" bind:minus="onChangeMinus" bind:plus="onChangePlus" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{form.schedulePercent==100}}">
<view class="markers inspect_info_title">完成时间</view>
<view class="inspect_info_content">
<voucher-date counts="5" placeholder="请选择完成时间" minDate="{{minDate}}" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
</view>
</view>
<view class="inspect_info_list">
<view class="markers inspect_info_title">进度描述</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写施工进度描述800字内" placeholder-style="color:#6777aa;" bindinput="onInputDescription" maxlength="800" />
</view>
</view>
<view class="inspect_info_list">
<view class="markers inspect_info_title">施工图片</view>
<view class="inspect_info_content" style="margin-left: 10px;">
<file-uploader bindimages="onImagesArr"></file-uploader>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="returnToPage">取消</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="submitSave">保存进度</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="/images/loding.gif"></image>
<view>数据处理中!请稍后...</view>
</view>
</van-overlay>

View File

@ -1 +1,86 @@
/* pages/project_schedule/add/index.wxss */
.rectifier_max {
width: 100%;
background: #232a44;
border-radius: 15rpx;
position: relative;
height: 100%;
}
.rectifier_title {
position: relative;
background: #27304f;
border-radius: 15rpx;
text-align: center;
padding: 20rpx 15rpx;
}
.rectifier_close {
position: absolute;
width: 50rpx;
height: 50rpx;
right: 20rpx;
top: 12rpx;
line-height: 60rpx;
text-align: center;
}
.rectifier_list {
padding: 20rpx 40rpx;
}
.rectifier_list_height {
height: 990rpx;
overflow: auto;
}
.rectifier_list_for {
display: flex;
align-items: center;
padding: 16rpx 15rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rectifier_btn {
display: flex;
align-items: center;
background: #27304f;
border-radius: 0 0 15rpx 15rpx;
}
.rectifier_btn view {
width: 50%;
text-align: center;
height: 80rpx;
line-height: 80rpx;
color: #6874a4;
}
.rectifier_btn view:last-child {
border-left: 1px solid #6874a4;
color: #ffffff;
}
.van-stepper__minus {
width: 90rpx !important;
height: 90rpx !important;
background-color: #513ea7 !important;
color: #cdcdcd !important;
}
.van-stepper__input {
width: calc(100% - 196rpx) !important;
height: 90rpx !important;
background: #212737 !important;
border-radius: 10rpx !important;
padding: 0 30rpx !important;
color: #ffffff !important;
}
.van-stepper__plus {
width: 90rpx !important;
height: 90rpx !important;
background-color: #513ea7 !important;
color: #cdcdcd !important;
}

View File

@ -0,0 +1,116 @@
import config from '../../../config'
import {
getToken
} from '../../../utils/auth'
import {
planScheduleInfo
} from '../../../api/project'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
infoData: {},
imageList: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../login/login',
})
}
this.getInfo(options.id);
},
/**
* 查详进度详情
* @param {*} id
*/
getInfo(id) {
planScheduleInfo(id).then(res => {
if (res.code == 200) {
let urls = [];
if (res.data.images) {
res.data.images.split(',').forEach(item => {
urls.push(config.baseImgUrl + item);
});
}
this.setData({
infoData: res.data,
imageList: urls
})
}
})
},
//展示图片
showImg: function (e) {
let img = e.target.dataset.set;
wx.previewImage({
urls: img.split(','),
current: 0
})
},
returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/
wx.redirectTo({
url: `../list/index`,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle":"custom"
}

View File

@ -0,0 +1,85 @@
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
</view>
</van-col>
<van-col span="15">
<view class="header_name">进度计划详情</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<view class="inspect_overview_max">
<view class="inspect_overview">
<view class="module_title_2 module_title_padding">
<view>{{infoData.projectName}}</view>
</view>
<view class="inspect_overview_list_max">
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">计划名称</text></van-col>
<van-col span="18" class="color_blue">
{{infoData.taskName}}
</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">任务编号</text></van-col>
<van-col span="18">{{infoData.taskUniqueId}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.bimId}}">
<van-row>
<van-col span="6"><text class="color_purple">BIM编号</text></van-col>
<van-col span="18">{{infoData.bimId}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">完成进度</text></van-col>
<van-col span="18" class="safety_issue_number color_orange txtb">{{infoData.schedulePercent}} % </van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.finishDate}}">
<van-row>
<van-col span="6"><text class="color_purple">完成时间</text></van-col>
<van-col span="18">{{infoData.finishDate}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">进度描述</text></van-col>
<van-col span="18">{{infoData.description}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">进度图片</text></van-col>
<van-col span="18" class="in-img-max">
<view class="in-img-div" wx:for="{{imageList}}" wx:key="index">
<image bindtap='showImg' data-set="{{item}}" src="{{item+'.min.jpg'}}"></image>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">填报用户</text></van-col>
<van-col span="18" class="color_blue">{{infoData.createBy}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">填报时间</text></van-col>
<van-col span="18" class="color_blue">{{infoData.createDate}}</van-col>
</van-row>
</view>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,25 @@
.in-img-max:after {
display: block;
clear: both;
content: "";
visibility: hidden;
height: 0
}
.in-img-max {
width: auto;
zoom: 1
}
.in-img-div {
position: relative;
margin: 0 8px 8px 0;
float: left;
}
.in-img-div image {
width: 180rpx;
height: 180rpx;
border-radius: 15rpx;
position: relative;
}

View File

@ -1,3 +1,4 @@
import config from '../../../config'
import {
getToken,
getUserInfo
@ -27,7 +28,8 @@ Page({
pageNum: 1,
pageSize: 10,
total: 0,
listData: []
listData: [],
imgBaseUrl:config.baseImgUrl
},
@ -67,6 +69,28 @@ Page({
this.getListData();
},
/**
* 添加进度计划
*/
skipAdd() {
wx.redirectTo({
url: `../add/index`,
})
},
/**
* 查看进度详情
* @param {*} e
*/
getInfo(e) {
let {
id
} = e.currentTarget.dataset.set
wx.redirectTo({
url: `../info/index?id=${id}`,
})
},
/**
* 数据加载
*/
@ -75,7 +99,15 @@ Page({
planScheduleList(params).then(res => {
if (res.code == 200) {
res.rows.forEach(item => {
item.mainImage = item.images.split(',')[0];
let _tsk = item.taskName.split(' / ');
item.mainPlan = _tsk[_tsk.length];
item.planName = item.taskName.replace(item.mainPlan + " / ");
if (item.images) {
item.mainImage = item.images.split(',')[0];
} else {
item.mainImage = "default";
}
});
this.setData({
total: res.total,
@ -112,7 +144,7 @@ Page({
XMGK: function () {
wx.setStorageSync('nav-menu', "xmgk");
wx.redirectTo({
url: '../project_info/index'
url: '../../project_info/index'
})
},
@ -120,14 +152,15 @@ Page({
AQGL: function () {
wx.setStorageSync('nav-menu', "aqgl");
wx.redirectTo({
url: '../project_safety/index'
url: '../../project_safety/index'
})
},
//跳转到进度管理
JDGL: function () {
//跳转到质量管理
ZLGL: function () {
wx.setStorageSync('nav-menu', "zlgl");
wx.redirectTo({
url: '../project_schedule/list/index'
url: '../project_quality/index'
})
},
@ -135,7 +168,7 @@ Page({
XMGL: function () {
wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({
url: '../project_more/index'
url: '../../project_more/index'
})
},

View File

@ -12,7 +12,7 @@
<user-infos></user-infos>
</van-col>
<van-col span="10">
<view class="header_name">进度管理</view>
<view class="header_name">进度计划管理</view>
</van-col>
</van-row>
</view>
@ -26,7 +26,9 @@
<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 class="module_title module_title_flex inspect_list_title_text">
填报时间:{{item.createDate}}
</view>
</view>
</view>
<view class="inspect_list_info">
@ -36,8 +38,7 @@
</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 class="inspect_list_info_data_prop safety_issue_number">完成进度:<text class="color_orange txtb">{{item.schedulePercent}} %</text></view>
</view>
</view>
<view class="inspect_list_info_position">
@ -52,7 +53,7 @@
<view style="color: #a5abbb;">暂无数据</view>
</view>
</view>
<view class="inspect_add_to" bindtap="skipAdd">
<view class="inspect_add_to_copy" bindtap="skipAdd">
<view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image>
<view>新增</view>

View File

@ -1 +1,20 @@
/* pages/project_schedule/list/index.wxss */
element.style {
}
.inspect_add_to_copy {
position: fixed;
right: 30rpx;
bottom: 250rpx;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background: #273252;
text-align: center;
font-size: 26rpx;
color: #b0ccf5;
}
.inspect_add_to_copy image {
width: 40rpx;
height: 40rpx;
}

View File

@ -68,7 +68,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
if (options && options.id) {

View File

@ -36,7 +36,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
if (options && options.id) {

View File

@ -38,7 +38,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
this.setData({

View File

@ -43,7 +43,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
if (options && options.id) {

View File

@ -35,7 +35,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();

View File

@ -40,7 +40,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();

View File

@ -44,7 +44,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
if (options && options.id) {

View File

@ -36,7 +36,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();

View File

@ -41,7 +41,7 @@ Page({
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../login/login',
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();

View File

@ -46,26 +46,6 @@ export function parseTime(time, pattern) {
return time_str
}
// 时间比较
export function compareDate(planFinishDate,finishDate) {
let _planFinishDate = new Date(planFinishDate).getTime();
let _finishDate = new Date(finishDate).getTime();
if(planFinishDate && !finishDate){
let date = new Date().getTime();
if(_planFinishDate>date){
return -2;
}else{
return 0;
}
}else{
if(_planFinishDate>_finishDate){
return 1;
}else{
return -1;
}
}
}
// 表单重置
export function resetForm(refName) {
if (this.$refs[refName]) {