Compare commits

...

2 Commits

Author SHA1 Message Date
姜玉琦 dd32355b98 Merge branch 'dev_xd' of http://62.234.3.186:3000/jiangyq/YZProjectCloud into dev_xd 2025-03-30 22:04:23 +08:00
姜玉琦 5a580280a7 提交代码 2025-03-30 22:04:15 +08:00
21 changed files with 2760 additions and 1585 deletions

View File

@ -33,6 +33,14 @@ const attendanceUbiDataList = (data) => {
params: data, params: data,
}); });
}; };
const photographyList = (proId) => {
return request({
url: "/manage/photography/finaList/"+proId,
method: "get"
});
};
const updateItemState = (it) => { const updateItemState = (it) => {
let dt0 = +$dt($dt(new Date()).format("YYYY-MM-DD")); //当时时间 let dt0 = +$dt($dt(new Date()).format("YYYY-MM-DD")); //当时时间
let dt1 = it.planStartDate ? +$dt(it.planStartDate) : 0; //计划开始 let dt1 = it.planStartDate ? +$dt(it.planStartDate) : 0; //计划开始
@ -182,6 +190,7 @@ export default {
groupByCraftTypeByAttendance, groupByCraftTypeByAttendance,
subdeptsUsersList, subdeptsUsersList,
attendanceUbiDataList, attendanceUbiDataList,
photographyList,
milestoneList, milestoneList,
costOutputSelectYearAndMonth costOutputSelectYearAndMonth
}; };

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,193 @@
package com.yanzhu.manage.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* pro_photography
*
* @author yanzhu
* @date 2025-03-30
*/
public class ProPhotography extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 公司ID */
private Long comId;
/** 单位名称 */
@Excel(name = "单位名称")
private String comName;
/** 项目ID */
private Long projectId;
/** 项目名称 */
@Excel(name = "项目名称")
private String projectName;
/** 图片路径 */
@Excel(name = "图片路径")
private String imageUrl;
/** 视频路径 */
@Excel(name = "视频路径")
private String videoUrl;
/** 视频日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "视频日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date videoDate;
/** 状态 */
@Excel(name = "状态")
private Long state;
/** 是否有效 */
@Excel(name = "是否有效")
private Long isDel;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDate;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateDate;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setComId(Long comId)
{
this.comId = comId;
}
public Long getComId()
{
return comId;
}
public void setProjectId(Long projectId)
{
this.projectId = projectId;
}
public Long getProjectId()
{
return projectId;
}
public void setImageUrl(String imageUrl)
{
this.imageUrl = imageUrl;
}
public String getImageUrl()
{
return imageUrl;
}
public void setVideoUrl(String videoUrl)
{
this.videoUrl = videoUrl;
}
public String getVideoUrl()
{
return videoUrl;
}
public void setVideoDate(Date videoDate)
{
this.videoDate = videoDate;
}
public Date getVideoDate()
{
return videoDate;
}
public void setState(Long state)
{
this.state = state;
}
public Long getState()
{
return state;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
public void setCreateDate(Date createDate)
{
this.createDate = createDate;
}
public Date getCreateDate()
{
return createDate;
}
public void setUpdateDate(Date updateDate)
{
this.updateDate = updateDate;
}
public Date getUpdateDate()
{
return updateDate;
}
public String getComName() {
return comName;
}
public void setComName(String comName) {
this.comName = comName;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("comId", getComId())
.append("projectId", getProjectId())
.append("imageUrl", getImageUrl())
.append("videoUrl", getVideoUrl())
.append("videoDate", getVideoDate())
.append("state", getState())
.append("remark", getRemark())
.append("isDel", getIsDel())
.append("createBy", getCreateBy())
.append("createDate", getCreateDate())
.append("updateBy", getUpdateBy())
.append("updateDate", getUpdateDate())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.yanzhu.manage.mapper;
import java.util.List;
import com.yanzhu.manage.domain.ProPhotography;
/**
* Mapper
*
* @author yanzhu
* @date 2025-03-30
*/
public interface ProPhotographyMapper
{
/**
*
*
* @param id
* @return
*/
public ProPhotography selectProPhotographyById(Long id);
/**
*
*
* @param proPhotography
* @return
*/
public List<ProPhotography> selectProPhotographyList(ProPhotography proPhotography);
/**
*
*
* @param proPhotography
* @return
*/
public int insertProPhotography(ProPhotography proPhotography);
/**
*
*
* @param proPhotography
* @return
*/
public int updateProPhotography(ProPhotography proPhotography);
/**
*
*
* @param id
* @return
*/
public int deleteProPhotographyById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteProPhotographyByIds(Long[] ids);
}

View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.manage.mapper.ProPhotographyMapper">
<resultMap type="ProPhotography" id="ProPhotographyResult">
<result property="id" column="id" />
<result property="comId" column="com_id" />
<result property="comName" column="com_name" />
<result property="projectId" column="project_id" />
<result property="projectName" column="project_name" />
<result property="imageUrl" column="image_url" />
<result property="videoUrl" column="video_url" />
<result property="videoDate" column="video_date" />
<result property="state" column="state" />
<result property="remark" column="remark" />
<result property="isDel" column="is_del" />
<result property="createBy" column="create_by" />
<result property="createDate" column="create_date" />
<result property="updateBy" column="update_by" />
<result property="updateDate" column="update_date" />
</resultMap>
<sql id="selectProPhotographyVo">
select pp.id, pp.com_id, sd.dept_name as com_name, pp.project_id, pi.project_name, pp.image_url, pp.video_url, pp.video_date, pp.state, pp.remark, pp.is_del, pp.create_by, pp.create_date, pp.update_by, pp.update_date from pro_photography pp
left join pro_project_info pi on pi.id = pp.project_id
left join sys_dept sd on sd.dept_id = pp.com_id
</sql>
<select id="selectProPhotographyList" parameterType="ProPhotography" resultMap="ProPhotographyResult">
<include refid="selectProPhotographyVo"/>
<where>
<if test="comId != null "> and pp.com_id = #{comId}</if>
<if test="projectId != null "> and pp.project_id = #{projectId}</if>
<if test="activeComId != null "> and pp.com_id = #{activeComId}</if>
<if test="activeProjectId != null "> and pp.project_id = #{activeProjectId}</if>
<if test="state != null "> and pp.state = #{state}</if>
<if test="isDel != null "> and pp.is_del = #{isDel}</if>
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
and pp.is_del = 0
</where>
order by pp.id desc
</select>
<select id="selectProPhotographyById" parameterType="Long" resultMap="ProPhotographyResult">
<include refid="selectProPhotographyVo"/>
where pp.id = #{id}
</select>
<insert id="insertProPhotography" parameterType="ProPhotography" useGeneratedKeys="true" keyProperty="id">
insert into pro_photography
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="comId != null">com_id,</if>
<if test="projectId != null">project_id,</if>
<if test="imageUrl != null">image_url,</if>
<if test="videoUrl != null">video_url,</if>
<if test="videoDate != null">video_date,</if>
<if test="state != null">state,</if>
<if test="remark != null">remark,</if>
<if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if>
<if test="createDate != null">create_date,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateDate != null">update_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="comId != null">#{comId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="imageUrl != null">#{imageUrl},</if>
<if test="videoUrl != null">#{videoUrl},</if>
<if test="videoDate != null">#{videoDate},</if>
<if test="state != null">#{state},</if>
<if test="remark != null">#{remark},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createDate != null">#{createDate},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateDate != null">#{updateDate},</if>
</trim>
</insert>
<update id="updateProPhotography" parameterType="ProPhotography">
update pro_photography
<trim prefix="SET" suffixOverrides=",">
<if test="comId != null">com_id = #{comId},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="imageUrl != null">image_url = #{imageUrl},</if>
<if test="videoUrl != null">video_url = #{videoUrl},</if>
<if test="videoDate != null">video_date = #{videoDate},</if>
<if test="state != null">state = #{state},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createDate != null">create_date = #{createDate},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateDate != null">update_date = #{updateDate},</if>
</trim>
where id = #{id}
</update>
<update id="deleteProPhotographyById" parameterType="Long">
update pro_photography set is_del=2 where id = #{id}
</update>
<update id="deleteProPhotographyByIds" parameterType="String">
update pro_photography set is_del=2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,112 @@
package com.yanzhu.manage.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.manage.domain.ProPhotography;
import com.yanzhu.manage.service.IProPhotographyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author yanzhu
* @date 2025-03-30
*/
@RestController
@RequestMapping("/photography")
public class ProPhotographyController extends BaseController
{
@Autowired
private IProPhotographyService proPhotographyService;
/**
*
*/
@RequiresPermissions("manage:photography:list")
@GetMapping("/list")
public TableDataInfo list(ProPhotography proPhotography)
{
startPage();
List<ProPhotography> list = proPhotographyService.selectProPhotographyList(proPhotography);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("manage:photography:export")
@Log(title = "项目延时摄影", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProPhotography proPhotography)
{
List<ProPhotography> list = proPhotographyService.selectProPhotographyList(proPhotography);
ExcelUtil<ProPhotography> util = new ExcelUtil<ProPhotography>(ProPhotography.class);
util.exportExcel(response, list, "项目延时摄影数据");
}
/**
*
*/
@RequiresPermissions("manage:photography:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(proPhotographyService.selectProPhotographyById(id));
}
/**
*
*/
@RequiresPermissions("manage:photography:add")
@Log(title = "项目延时摄影", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProPhotography proPhotography)
{
return toAjax(proPhotographyService.insertProPhotography(proPhotography));
}
/**
*
*/
@RequiresPermissions("manage:photography:edit")
@Log(title = "项目延时摄影", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProPhotography proPhotography)
{
return toAjax(proPhotographyService.updateProPhotography(proPhotography));
}
/**
*
*/
@RequiresPermissions("manage:photography:remove")
@Log(title = "项目延时摄影", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(proPhotographyService.deleteProPhotographyByIds(ids));
}
/**
*
*/
@GetMapping("/finaList/{proId}")
public AjaxResult finaList(@PathVariable("proId") Long proId)
{
ProPhotography query = new ProPhotography();
query.setProjectId(proId);
query.setState(0L);
List<ProPhotography> list = proPhotographyService.selectProPhotographyList(query);
return success(list);
}
}

View File

@ -0,0 +1,61 @@
package com.yanzhu.manage.service;
import java.util.List;
import com.yanzhu.manage.domain.ProPhotography;
/**
* Service
*
* @author yanzhu
* @date 2025-03-30
*/
public interface IProPhotographyService
{
/**
*
*
* @param id
* @return
*/
public ProPhotography selectProPhotographyById(Long id);
/**
*
*
* @param proPhotography
* @return
*/
public List<ProPhotography> selectProPhotographyList(ProPhotography proPhotography);
/**
*
*
* @param proPhotography
* @return
*/
public int insertProPhotography(ProPhotography proPhotography);
/**
*
*
* @param proPhotography
* @return
*/
public int updateProPhotography(ProPhotography proPhotography);
/**
*
*
* @param ids
* @return
*/
public int deleteProPhotographyByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteProPhotographyById(Long id);
}

View File

@ -0,0 +1,97 @@
package com.yanzhu.manage.service.impl;
import java.util.List;
import com.yanzhu.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.manage.mapper.ProPhotographyMapper;
import com.yanzhu.manage.domain.ProPhotography;
import com.yanzhu.manage.service.IProPhotographyService;
/**
* Service
*
* @author yanzhu
* @date 2025-03-30
*/
@Service
public class ProPhotographyServiceImpl implements IProPhotographyService
{
@Autowired
private ProPhotographyMapper proPhotographyMapper;
/**
*
*
* @param id
* @return
*/
@Override
public ProPhotography selectProPhotographyById(Long id)
{
return proPhotographyMapper.selectProPhotographyById(id);
}
/**
*
*
* @param proPhotography
* @return
*/
@Override
public List<ProPhotography> selectProPhotographyList(ProPhotography proPhotography)
{
return proPhotographyMapper.selectProPhotographyList(proPhotography);
}
/**
*
*
* @param proPhotography
* @return
*/
@Override
public int insertProPhotography(ProPhotography proPhotography)
{
proPhotography.setCreateBy(SecurityUtils.getUsername());
return proPhotographyMapper.insertProPhotography(proPhotography);
}
/**
*
*
* @param proPhotography
* @return
*/
@Override
public int updateProPhotography(ProPhotography proPhotography)
{
proPhotography.setUpdateBy(SecurityUtils.getUsername());
return proPhotographyMapper.updateProPhotography(proPhotography);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteProPhotographyByIds(Long[] ids)
{
return proPhotographyMapper.deleteProPhotographyByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteProPhotographyById(Long id)
{
return proPhotographyMapper.deleteProPhotographyById(id);
}
}

View File

@ -81,10 +81,16 @@ Page({
}, },
goMenu: function (event) { goMenu: function (event) {
let _url = event.currentTarget.dataset.url;
if(!_url){
app.toast("正在建设中...")
return false;
}
wx.setStorageSync('nav-menu', "xmgl"); wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({ wx.redirectTo({
url: event.currentTarget.dataset.url url: _url
}) })
//跳转到其它小程序
//wx.navigateToMiniProgram({ //wx.navigateToMiniProgram({
// appId: 'wx7c39a25db91228f7', // appId: 'wx7c39a25db91228f7',
// path: 'pages/tabbar/order-new/index?type=0' // path: 'pages/tabbar/order-new/index?type=0'

View File

@ -126,13 +126,15 @@ Page({
}, },
goMenu: function (event) { goMenu: function (event) {
let _url = event.currentTarget.dataset.url;
if (!_url) {
app.toast("正在建设中...")
return false;
}
wx.setStorageSync('nav-menu', "zlgl");
wx.redirectTo({ wx.redirectTo({
url: event.currentTarget.dataset.url url: _url
}) })
//wx.navigateToMiniProgram({
// appId: 'wx7c39a25db91228f7',
// path: 'pages/tabbar/order-new/index?type=0'
//})
}, },
// 底部导航 // 底部导航

View File

@ -29,25 +29,25 @@ Page({
zlglDB: 0, zlglDB: 0,
todoDB: 0, todoDB: 0,
checkList: [{ checkList: [{
id:1, id: 1,
name: "日常巡检问题", name: "日常巡检问题",
rate: 0, //整改率 rate: 0, //整改率
total: 0, //问题总数 total: 0, //问题总数
number: 0, //检查次数 number: 0, //检查次数
},{ }, {
id:2, id: 2,
name: "周检隐患问题", name: "周检隐患问题",
rate: 0, //整改率 rate: 0, //整改率
total: 0, //问题总数 total: 0, //问题总数
number: 0, //检查次数 number: 0, //检查次数
},{ }, {
id:3, id: 3,
name: "月检隐患问题", name: "月检隐患问题",
rate: 0, //整改率 rate: 0, //整改率
total: 0, //问题总数 total: 0, //问题总数
number: 0, //检查次数 number: 0, //检查次数
},{ }, {
id:4, id: 4,
name: "专项检查问题", name: "专项检查问题",
rate: 0, //整改率 rate: 0, //整改率
total: 0, //问题总数 total: 0, //问题总数
@ -125,13 +125,15 @@ Page({
}, },
goMenu: function (event) { goMenu: function (event) {
let _url = event.currentTarget.dataset.url;
if (!_url) {
app.toast("正在建设中...")
return false;
}
wx.setStorageSync('nav-menu', "aqgl");
wx.redirectTo({ wx.redirectTo({
url: event.currentTarget.dataset.url url: _url
}) })
//wx.navigateToMiniProgram({
// appId: 'wx7c39a25db91228f7',
// path: 'pages/tabbar/order-new/index?type=0'
//})
}, },
// 底部导航 // 底部导航

View File

@ -1,5 +1,6 @@
import { import {
getToken getToken,
getUserInfo
} from '../../../utils/auth' } from '../../../utils/auth'
import { import {
updateGroupLeader, updateGroupLeader,
@ -23,6 +24,7 @@ Page({
text: '班组入场' text: '班组入场'
}], }],
form: {}, form: {},
editFlag:false,
isChange: false, isChange: false,
leaderUserList: [] leaderUserList: []
}, },
@ -36,6 +38,10 @@ Page({
url: '../../../login/login', url: '../../../login/login',
}) })
} }
const proUserInfo = getUserInfo();
this.setData({
editFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false
});
if (options && options.id) { if (options && options.id) {
//查询数据回填... //查询数据回填...
this.initData(options.id); this.initData(options.id);

View File

@ -131,9 +131,9 @@
</view> </view>
<view class="problem_submit_to"> <view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view> <view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view>
<view wx:if="{{!isChange}}" class="problem_submit_to_btn problem_submit_to_view_eq" bindtap="changeGroupLeader">变更组长</view> <view wx:if="{{editFlag && !isChange}}" class="problem_submit_to_btn problem_submit_to_view_eq" bindtap="changeGroupLeader">变更组长</view>
<view wx:if="{{isChange}}" class="problem_submit_to_btn problem_submit_to_view_save" bindtap="submitSubGroupLeader">提交保存</view> <view wx:if="{{editFlag && isChange}}" class="problem_submit_to_btn problem_submit_to_view_save" bindtap="submitSubGroupLeader">提交保存</view>
<view wx:if="{{form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">班组离场</view> <view wx:if="{{editFlag && form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">班组离场</view>
<view wx:if="{{form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">班组入场</view> <view wx:if="{{editFlag && form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">班组入场</view>
</view> </view>
</view> </view>

View File

@ -1,5 +1,6 @@
import { import {
getToken getToken,
getUserInfo
} from '../../../utils/auth' } from '../../../utils/auth'
import { import {
subgroupsList, subgroupsList,
@ -20,7 +21,8 @@ Page({
listData: [], listData: [],
activeState: "0", activeState: "0",
yrcCount: 0, yrcCount: 0,
ylcCount: 0 ylcCount: 0,
userInfo:{}
}, },
//项目切换 返回值 //项目切换 返回值
@ -41,8 +43,10 @@ Page({
url: '../../../login/login', url: '../../../login/login',
}) })
} }
const proUserInfo = getUserInfo();
this.setData({ this.setData({
addFlag: true, addFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false,
userInfo: proUserInfo.projectUserInfo,
initData: { initData: {
id: app.globalData.useProjectId, id: app.globalData.useProjectId,
text: app.globalData.useProjectName, text: app.globalData.useProjectName,
@ -53,8 +57,8 @@ Page({
total: 0 total: 0
}); });
//获取数据列表 //获取数据列表
this.getListData(); this.getListData(proUserInfo.projectUserInfo);
this.getListCount(); this.getListCount(proUserInfo.projectUserInfo);
}, },
/** /**
@ -91,8 +95,11 @@ Page({
/** /**
* 查询数据列表 * 查询数据列表
*/ */
getListData() { getListData(_userInfo) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished"; let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished";
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
params += "&subDeptId="+_userInfo.subDeptId;
}
subgroupsList(params).then(res => { subgroupsList(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
@ -106,8 +113,11 @@ Page({
/** /**
* 统计数据列表 * 统计数据列表
*/ */
getListCount() { getListCount(_userInfo) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished"; let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished";
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
params += "&subDeptId="+_userInfo.subDeptId;
}
subgroupsCount(params).then(res => { subgroupsCount(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
let _yrc = 0, let _yrc = 0,
@ -144,7 +154,7 @@ Page({
pageSize: 1000, pageSize: 1000,
listData: [], listData: [],
}); });
this.getListData(); this.getListData(this.data.userInfo);
}, },
/** /**
@ -177,7 +187,7 @@ Page({
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1
}); });
this.getListData(); this.getListData(this.data.userInfo);
} else { } else {
console.log("已经到底了,没有数据可加载!!!"); console.log("已经到底了,没有数据可加载!!!");
} }

View File

@ -33,7 +33,7 @@
<view class="inspect_list_info"> <view class="inspect_list_info">
<van-cell-group style="width: 100%;"> <van-cell-group style="width: 100%;">
<van-cell wx:for="{{item.groupList}}" wx:for-item="groupItem" wx:for-index="groupIndex" wx:key="groupIndex" title="{{groupItem.groupName}}" icon="qr" cell-class="switch-cell" data-set="{{groupItem.id}}" bindtap="getInfo"> <van-cell wx:for="{{item.groupList}}" wx:for-item="groupItem" wx:for-index="groupIndex" wx:key="groupIndex" title="{{groupItem.groupName}}" icon="qr" cell-class="switch-cell" data-set="{{groupItem.id}}" bindtap="getInfo">
<view class="module_see_info_edit" catchtap="editInfo" data-set="{{groupItem.id}}"><van-icon name="edit" /><text class="edit_text">修改</text></view> <view wx:if="{{addFlag}}" class="module_see_info_edit" catchtap="editInfo" data-set="{{groupItem.id}}"><van-icon name="edit" /><text class="edit_text">修改</text></view>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</view> </view>

View File

@ -1,6 +1,7 @@
import config from '../../../config' import config from '../../../config'
import { import {
getToken getToken,
getUserInfo
} from '../../../utils/auth' } from '../../../utils/auth'
import { import {
editSubUsersPhone, editSubUsersPhone,
@ -24,6 +25,7 @@ Page({
}], }],
form: {}, form: {},
newUserPhone:"", newUserPhone:"",
editFlag:false,
isChange: false, isChange: false,
imgBaseUrl: config.baseImgUrl imgBaseUrl: config.baseImgUrl
}, },
@ -37,6 +39,10 @@ Page({
url: '../../../login/login', url: '../../../login/login',
}) })
} }
const proUserInfo = getUserInfo();
this.setData({
editFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false
});
if (options && options.id) { if (options && options.id) {
//查询数据回填... //查询数据回填...
this.initData(options.id); this.initData(options.id);

View File

@ -236,9 +236,9 @@
</view> </view>
<view class="problem_submit_to"> <view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view> <view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view>
<view wx:if="{{!isChange}}" class="problem_submit_to_btn problem_submit_to_view_eq" bindtap="changeUserPhone">变更电话</view> <view wx:if="{{editFlag && !isChange}}" class="problem_submit_to_btn problem_submit_to_view_eq" bindtap="changeUserPhone">变更电话</view>
<view wx:if="{{isChange}}" class="problem_submit_to_btn problem_submit_to_view_save" bindtap="submitChangePhone">提交保存</view> <view wx:if="{{editFlag && isChange}}" class="problem_submit_to_btn problem_submit_to_view_save" bindtap="submitChangePhone">提交保存</view>
<view wx:if="{{form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">人员离场</view> <view wx:if="{{editFlag && form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">人员离场</view>
<view wx:if="{{form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">人员入场</view> <view wx:if="{{editFlag && form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">人员入场</view>
</view> </view>
</view> </view>

View File

@ -1,5 +1,6 @@
import { import {
getToken getToken,
getUserInfo
} from '../../../utils/auth' } from '../../../utils/auth'
import { import {
subusersList, subusersList,
@ -22,6 +23,7 @@ Page({
yrcCount: 0, yrcCount: 0,
ylcCount: 0, ylcCount: 0,
activeName: "", activeName: "",
userInfo:{}
}, },
//项目切换 返回值 //项目切换 返回值
@ -42,8 +44,10 @@ Page({
url: '../../../login/login', url: '../../../login/login',
}) })
} }
const proUserInfo = getUserInfo();
this.setData({ this.setData({
addFlag: true, addFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false,
userInfo: proUserInfo.projectUserInfo,
initData: { initData: {
id: app.globalData.useProjectId, id: app.globalData.useProjectId,
text: app.globalData.useProjectName, text: app.globalData.useProjectName,
@ -54,8 +58,8 @@ Page({
total: 0 total: 0
}); });
//获取数据列表 //获取数据列表
this.getListData(); this.getListData(proUserInfo.projectUserInfo);
this.getListCount(); this.getListCount(proUserInfo.projectUserInfo);
}, },
/** /**
@ -99,8 +103,11 @@ Page({
/** /**
* 查询数据列表 * 查询数据列表
*/ */
getListData() { getListData(_userInfo) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished&searchValue=subUsers"; let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished&searchValue=subUsers";
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
params += "&subDeptId="+_userInfo.subDeptId;
}
subusersList(params).then(res => { subusersList(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
@ -114,8 +121,11 @@ Page({
/** /**
* 统计数据列表 * 统计数据列表
*/ */
getListCount() { getListCount(_userInfo) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished&searchValue=subUsers"; let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished&searchValue=subUsers";
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
params += "&subDeptId="+_userInfo.subDeptId;
}
subusersCount(params).then(res => { subusersCount(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
let _yrc = 0, let _yrc = 0,
@ -152,7 +162,7 @@ Page({
pageSize: 10000, pageSize: 10000,
listData: [], listData: [],
}); });
this.getListData(); this.getListData(this.data.userInfo);
}, },
/** /**
@ -185,7 +195,7 @@ Page({
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1
}); });
this.getListData(); this.getListData(this.data.userInfo);
} else { } else {
console.log("已经到底了,没有数据可加载!!!"); console.log("已经到底了,没有数据可加载!!!");
} }

View File

@ -35,7 +35,7 @@
<van-collapse-item title="{{groupItem.subDeptGroupName+' ( '+groupItem.users.length+' )'}}" name="{{index+'_'+groupIndex}}" icon="qr"> <van-collapse-item title="{{groupItem.subDeptGroupName+' ( '+groupItem.users.length+' )'}}" name="{{index+'_'+groupIndex}}" icon="qr">
<van-cell-group style="width: 100%;"> <van-cell-group style="width: 100%;">
<van-cell wx:for="{{groupItem.users}}" wx:for-item="userItem" wx:for-index="userIndex" wx:key="userIndex" title="{{userItem.userName}}" cell-class="switch-cell" data-set="{{userItem.id}}" bindtap="getInfo" icon="vip-card-o"> <van-cell wx:for="{{groupItem.users}}" wx:for-item="userItem" wx:for-index="userIndex" wx:key="userIndex" title="{{userItem.userName}}" cell-class="switch-cell" data-set="{{userItem.id}}" bindtap="getInfo" icon="vip-card-o">
<view class="module_see_info_edit" catchtap="editInfo" data-set="{{userItem.id}}"> <view wx:if="{{addFlag}}" class="module_see_info_edit" catchtap="editInfo" data-set="{{userItem.id}}">
<van-icon name="edit" /><text class="edit_text">修改</text> <van-icon name="edit" /><text class="edit_text">修改</text>
</view> </view>
</van-cell> </van-cell>

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询项目延时摄影列表
export function listPhotography(query) {
return request({
url: '/manage/photography/list',
method: 'get',
params: query
})
}
// 查询项目延时摄影详细
export function getPhotography(id) {
return request({
url: '/manage/photography/' + id,
method: 'get'
})
}
// 新增项目延时摄影
export function addPhotography(data) {
return request({
url: '/manage/photography',
method: 'post',
data: data
})
}
// 修改项目延时摄影
export function updatePhotography(data) {
return request({
url: '/manage/photography',
method: 'put',
data: data
})
}
// 删除项目延时摄影
export function delPhotography(id) {
return request({
url: '/manage/photography/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,385 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" style="width: 308px">
<el-date-picker
v-model="daterangeCreateDate"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['manage:photography:add']"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['manage:photography:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['manage:photography:remove']"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['manage:photography:export']"
>导出</el-button
>
</el-col>
<right-toolbar
v-model:showSearch="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="photographyList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="所属公司" align="center" prop="comName" />
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="图片路径" align="center" prop="imageUrl" width="220">
<template #default="scope">
<ImagePreview :src="scope.row.imageUrl" :width="200" :height="100" />
</template>
</el-table-column>
<el-table-column label="视频路径" align="center" prop="videoUrl">
<template #default="scope">
<video height="100" controls :key="scope.row.videoUrl" v-if="scope.row.videoUrl">
<source :src="scope.row.videoUrl" type="video/mp4" />
您的浏览器不支持Video标签
</video>
</template>
</el-table-column>
<el-table-column label="是否启用" align="center" prop="state">
<template #default="scope">
<el-tooltip :content="scope.row.state == 0 ? '启用' : '停用'" placement="top">
<el-switch
:active-value="parseInt(0)"
:inactive-value="parseInt(1)"
v-model="scope.row.state"
@change="setStatus($event, scope.row)"
/>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="视频日期" align="center" prop="videoDate" width="150">
<template #default="scope">
<span>{{ parseTime(scope.row.videoDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
<template #default="scope">
<el-button
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['manage:photography:edit']"
>修改</el-button
>
<el-button
link
type="primary"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['manage:photography:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改项目全景对话框 -->
<el-dialog :title="title" v-model="open" width="680px" append-to-body>
<el-form ref="photographyRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="项目名称" v-if="form.projectId">
<el-tag effect="plain">{{ form.projectName }}</el-tag>
</el-form-item>
<el-form-item label="全景图片" prop="imageUrl">
<image-upload v-model="form.imageUrl" :limit="1" />
</el-form-item>
<el-form-item label="全景视频" prop="videoUrl">
<file-upload v-model="form.videoUrl" :limit="1" :fileType="['mp4']" :fileSize="500" />
</el-form-item>
<el-form-item label="视频日期" prop="videoDate">
<el-date-picker
clearable
v-model="form.videoDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择视频日期"
>
</el-date-picker>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Photography">
import {
listPhotography,
getPhotography,
delPhotography,
addPhotography,
updatePhotography,
} from "@/api/manage/photography";
import useUserStore from '@/store/modules/user'
const { proxy } = getCurrentInstance();
const userStore = useUserStore()
const photographyList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const daterangeCreateDate = ref([]);
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
comId: null,
projectId: null,
state: null,
isDel: null,
createDate: null,
},
rules: {
imageUrl: [{ required: true, message: "全景图片不能为空", trigger: "change" }],
videoUrl: [{ required: true, message: "全景视频不能为空", trigger: "change" }],
videoDate: [{ required: true, message: "视频日期不能为空", trigger: "change" }]
},
});
const { queryParams, form, rules } = toRefs(data);
/** 查询项目全景列表 */
function getList() {
loading.value = true;
queryParams.value.params = {};
if (null != daterangeCreateDate && "" != daterangeCreateDate) {
queryParams.value.params["beginCreateDate"] = daterangeCreateDate.value[0];
queryParams.value.params["endCreateDate"] = daterangeCreateDate.value[1];
}
listPhotography(queryParams.value).then((response) => {
photographyList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
id: null,
comId: null,
projectId: null,
imageUrl: null,
videoUrl: null,
videoDate: null,
state: null,
remark: null,
isDel: null,
createBy: null,
createDate: null,
updateBy: null,
updateDate: null,
};
proxy.resetForm("photographyRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
daterangeCreateDate.value = [];
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
if(!userStore.currentPrjId){
proxy.$modal.msgWarning("请切换到项目数据!!!");
return false;
}
reset();
form.value.comId = userStore.currentComId;
form.value.comName = userStore.currentComName;
form.value.projectId = userStore.currentPrjId;
form.value.projectName = userStore.currentProName;
open.value = true;
title.value = "添加项目全景";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value;
getPhotography(_id).then((response) => {
form.value = response.data;
open.value = true;
title.value = "修改项目全景";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["photographyRef"].validate((valid) => {
if (valid) {
if (form.value.id != null) {
updatePhotography(form.value).then((response) => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addPhotography(form.value).then((response) => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 状态滑块控制 */
function setStatus(val, row) {
proxy.$modal
.confirm(`是否确认${val == 0 ? "启用" : "停用"}当前数据项?`)
.then(function () {
let _data = { id: row.id, state: val };
return updatePhotography(_data);
})
.then(() => {
getList();
proxy.$modal.msgSuccess("修改成功");
})
.catch(() => {
//
if (val == 0) {
row.state = 1;
} else {
row.state = 0;
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal
.confirm('是否确认删除项目全景编号为"' + _ids + '"的数据项?')
.then(function () {
return delPhotography(_ids);
})
.then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download(
"manage/photography/export",
{
...queryParams.value,
},
`photography_${new Date().getTime()}.xlsx`
);
}
getList();
</script>