提交代码

dev_xd
姜玉琦 2025-02-13 00:20:07 +08:00
parent 41f8cfcd35
commit 1c6c543523
16 changed files with 112 additions and 107 deletions

View File

@ -226,7 +226,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="statsAttendanceDays" parameterType="AttendanceUbiData" resultType="Map"> <select id="statsAttendanceDays" parameterType="AttendanceUbiData" resultType="Map">
select u.craft_type as craftType, count(1) as total from attendance_ubi_data d select u.craft_type as craftType, count(1) as total from attendance_ubi_data d
left join pro_project_info_subdepts_users u on u.user_id = d.userId left join pro_project_info_subdepts_users u on u.user_id = d.userId
where u.id is not null and u.use_status = '1' where u.id is not null and u.use_status = '0'
<if test="comId != null "> and d.comId = #{comId}</if> <if test="comId != null "> and d.comId = #{comId}</if>
<if test="projectId != null "> and d.projectId = #{projectId}</if> <if test="projectId != null "> and d.projectId = #{projectId}</if>
<if test="subDeptId != null "> and d.sub_dept_id = #{subDeptId}</if> <if test="subDeptId != null "> and d.sub_dept_id = #{subDeptId}</if>

View File

@ -11,6 +11,7 @@ import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.domain.AttendanceUbiData; import com.yanzhu.manage.domain.AttendanceUbiData;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers; import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
import com.yanzhu.manage.enums.SubDeptsEnums;
import com.yanzhu.manage.enums.UserPostEnums; import com.yanzhu.manage.enums.UserPostEnums;
import com.yanzhu.manage.mapper.AttendanceUbiDataMapper; import com.yanzhu.manage.mapper.AttendanceUbiDataMapper;
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper; import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
@ -213,19 +214,13 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
*/ */
@Override @Override
public List<Map<String,Object>> statsAttendanceDaysByProId(Long proId){ public List<Map<String,Object>> statsAttendanceDaysByProId(Long proId){
ProProjectInfoSubdeptsUsers myInfos = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proId,SecurityUtils.getLoginUser().getUserid());
AttendanceUbiData attendanceQuery = new AttendanceUbiData(); AttendanceUbiData attendanceQuery = new AttendanceUbiData();
attendanceQuery.setProjectId(proId); attendanceQuery.setProjectId(proId);
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser(); if(Objects.equals(myInfos.getSubDeptType(), SubDeptsEnums.LWFB.getCode()) || Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.ZYFB.getCode())){
if(!Objects.equals(sysUser.getUserType(), UserTypeEnums.ZSRY.getCode()) && !Objects.equals(sysUser.getUserType(),UserTypeEnums.LSRY.getCode())){ attendanceQuery.setSubDeptId(myInfos.getSubDeptId());
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); if(Objects.equals(myInfos.getUserPost(),UserPostEnums.BZZ.getCode())){
query.setProjectId(proId); attendanceQuery.setSubDeptGroup(myInfos.getSubDeptGroup());
query.setUserId(sysUser.getUserId());
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
if(StringUtils.isNotEmpty(users)){
attendanceQuery.setSubDeptId(users.get(0).getSubDeptId());
if(Objects.equals(users.get(0).getUserPost(), UserPostEnums.BZZ.getCode())){
attendanceQuery.setSubDeptGroup(users.get(0).getSubDeptGroup());
}
} }
} }
return attendanceUbiDataMapper.statsAttendanceDays(attendanceQuery); return attendanceUbiDataMapper.statsAttendanceDays(attendanceQuery);
@ -237,19 +232,13 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
*/ */
@Override @Override
public List<Map<String,Object>> statsAttendanceViewByProId(Long proId){ public List<Map<String,Object>> statsAttendanceViewByProId(Long proId){
ProProjectInfoSubdeptsUsers myInfos = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proId,SecurityUtils.getLoginUser().getUserid());
AttendanceUbiData attendanceQuery = new AttendanceUbiData(); AttendanceUbiData attendanceQuery = new AttendanceUbiData();
attendanceQuery.setProjectId(proId); attendanceQuery.setProjectId(proId);
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser(); if(Objects.equals(myInfos.getSubDeptType(), SubDeptsEnums.LWFB.getCode()) || Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.ZYFB.getCode())){
if(!Objects.equals(sysUser.getUserType(), UserTypeEnums.ZSRY.getCode()) && !Objects.equals(sysUser.getUserType(),UserTypeEnums.LSRY.getCode())){ attendanceQuery.setSubDeptId(myInfos.getSubDeptId());
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); if(Objects.equals(myInfos.getUserPost(),UserPostEnums.BZZ.getCode())){
query.setProjectId(proId); attendanceQuery.setSubDeptGroup(myInfos.getSubDeptGroup());
query.setUserId(sysUser.getUserId());
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
if(StringUtils.isNotEmpty(users)){
attendanceQuery.setSubDeptId(users.get(0).getSubDeptId());
if(Objects.equals(users.get(0).getUserPost(), UserPostEnums.BZZ.getCode())){
attendanceQuery.setSubDeptGroup(users.get(0).getSubDeptGroup());
}
} }
} }
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();

View File

@ -805,11 +805,13 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
String saveWordFilePath = rootSavePath + "/" +filePath + "/" + fileName; String saveWordFilePath = rootSavePath + "/" +filePath + "/" + fileName;
String saveEdusFilePath = ProfileConfig.profile + "/" + filePath + "/" + fileName; String saveEdusFilePath = ProfileConfig.profile + "/" + filePath + "/" + fileName;
// 生成文件夹 // 生成文件夹
File dirFile = FileUtils.getFile(rootSavePath + filePath); File dirFile = FileUtils.getFile(rootSavePath + "/" +filePath);
if (!dirFile.exists()) { if (!dirFile.exists()) {
dirFile.mkdirs(); dirFile.mkdirs();
} }
proSubdeptsUser.setSubStep(100L); proSubdeptsUser.setSubStep(100L);
proSubdeptsUser.setEduStatus("1");
proSubdeptsUser.setEduDate(DateUtils.getNowDate());
proSubdeptsUser.setEduFilePath(saveEdusFilePath); proSubdeptsUser.setEduFilePath(saveEdusFilePath);
// word文件转PDF文件 // word文件转PDF文件
Map<String, Object> dataMap = getUserDataMap(proSubdeptsUser, signetFileVo.getImgPath()); Map<String, Object> dataMap = getUserDataMap(proSubdeptsUser, signetFileVo.getImgPath());
@ -1179,18 +1181,13 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
*/ */
@Override @Override
public List<Map<String,Object>> statsSubDeptsUsersByProId(Long proId){ public List<Map<String,Object>> statsSubDeptsUsersByProId(Long proId){
ProProjectInfoSubdeptsUsers myInfos = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proId,SecurityUtils.getLoginUser().getUserid());
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
query.setProjectId(proId); query.setProjectId(proId);
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser(); if(Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.LWFB.getCode()) || Objects.equals(myInfos.getSubDeptType(),SubDeptsEnums.ZYFB.getCode())){
if(!Objects.equals(sysUser.getUserType(),UserTypeEnums.ZSRY.getCode()) && !Objects.equals(sysUser.getUserType(),UserTypeEnums.LSRY.getCode())){ query.setSubDeptId(myInfos.getSubDeptId());
query.setUserId(sysUser.getUserId()); if(Objects.equals(myInfos.getUserPost(),UserPostEnums.BZZ.getCode())){
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); query.setSubDeptGroup(myInfos.getSubDeptGroup());
query.setUserId(null);
if(StringUtils.isNotEmpty(users)){
query.setSubDeptId(users.get(0).getSubDeptId());
if(Objects.equals(users.get(0).getUserPost(),UserPostEnums.BZZ.getCode())){
query.setSubDeptGroup(users.get(0).getSubDeptGroup());
}
} }
} }
return proProjectInfoSubdeptsUsersMapper.statsSubDeptsUsersByProId(query); return proProjectInfoSubdeptsUsersMapper.statsSubDeptsUsersByProId(query);
@ -1264,8 +1261,10 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
if(StringUtils.isNotEmpty(signets)){ if(StringUtils.isNotEmpty(signets)){
String newFilePath = filePath.replace(".pdf","-g.pdf"); String newFilePath = filePath.replace(".pdf","-g.pdf");
String signPath = signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath); String signPath = signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signPath, SignetKeyEnums.GROUP_SIGN.getCode()); boolean flag = PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signPath, SignetKeyEnums.GROUP_SIGN.getCode());
filePath = newFilePath; if(flag){
filePath = newFilePath;
}
}else{ }else{
throw new ServiceException("未查询到班组长签名信息..."); throw new ServiceException("未查询到班组长签名信息...");
} }
@ -1292,8 +1291,10 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
if(StringUtils.isNotEmpty(signets)){ if(StringUtils.isNotEmpty(signets)){
String newFilePath = filePath.replace(".pdf","-p.pdf"); String newFilePath = filePath.replace(".pdf","-p.pdf");
String signPath = signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath); String signPath = signets.get(0).getSignetPath().replace(ProfileConfig.profile, ProfileConfig.profilePath);
PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signPath,SignetKeyEnums.PROJECT_SIGN.getCode()); boolean flag = PdfImageSignetUtil.imageWaterMark(filePath, newFilePath, signPath,SignetKeyEnums.PROJECT_SIGN.getCode());
filePath = newFilePath; if(flag){
filePath = newFilePath;
}
}else{ }else{
throw new ServiceException("未查询安质部部长签名信息..."); throw new ServiceException("未查询安质部部长签名信息...");
} }

View File

@ -31,7 +31,7 @@ public class PdfImageSignetUtil {
* @param imagePath * @param imagePath
* @param keyWord * @param keyWord
*/ */
public static void imageWaterMark(String templatePath,String targetPath,String imagePath,String keyWord){ public static boolean imageWaterMark(String templatePath,String targetPath,String imagePath,String keyWord){
log.error("imageWaterMark...PDF...PATH{}" + templatePath); log.error("imageWaterMark...PDF...PATH{}" + templatePath);
log.error("imageWaterMark...NEWPDF...PATH{}" + targetPath); log.error("imageWaterMark...NEWPDF...PATH{}" + targetPath);
try { try {
@ -59,6 +59,7 @@ public class PdfImageSignetUtil {
log.info("最后一次出现关键字的位置信息:页码=" + (int)positions.get(positions.size()-1)[0] + log.info("最后一次出现关键字的位置信息:页码=" + (int)positions.get(positions.size()-1)[0] +
"X轴=" + positions.get(positions.size()-1)[1] + "Y轴=" + positions.get(positions.size()-1)[2]); "X轴=" + positions.get(positions.size()-1)[1] + "Y轴=" + positions.get(positions.size()-1)[2]);
PdfImage(targetPath,input,imagePath,positions); PdfImage(targetPath,input,imagePath,positions);
return true;
}else { }else {
log.info("未发现关键字信息"); log.info("未发现关键字信息");
} }
@ -67,6 +68,7 @@ public class PdfImageSignetUtil {
log.error("PDF插入图片发生意外异常" + e); log.error("PDF插入图片发生意外异常" + e);
throw new RuntimeException(); throw new RuntimeException();
} }
return false;
} }
/** /**

View File

@ -16,7 +16,7 @@ spring:
# 服务注册地址 # 服务注册地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@
# 服务分组 # 服务分组
group: lijun group: JiangYuQi
config: config:
# 配置中心地址 # 配置中心地址
server-addr: @discovery.server-addr@ server-addr: @discovery.server-addr@

View File

@ -205,7 +205,8 @@ Component({
formatter: function (data) { formatter: function (data) {
//富文本固定格式{colorName|这里填你想要写的内容} //富文本固定格式{colorName|这里填你想要写的内容}
//return '{arrow|}' //return '{arrow|}'
return '{index|No.' + (nameData.length - data.dataIndex) + '}{name|' + nameData[data.dataIndex] + '}{prop|' + totalData[data.dataIndex] + '}{unit| ' + unitData[data.dataIndex] + '}{prop|} {yes|' + yesMonitor[data.dataIndex] + '}{unit| ' + unitData[data.dataIndex] + '/}{not|' + notMonitor[data.dataIndex] + '}{unit| ' + unitData[data.dataIndex] + '}{prop|} '; return '{index|No.' + (nameData.length - data.dataIndex) + '}{name|' + nameData[data.dataIndex] + '}{prop|' + totalData[data.dataIndex] + '}{unit| ' + unitData[data.dataIndex] + '}';
//{prop|} {yes|' + yesMonitor[data.dataIndex] + '}{unit| ' + unitData[data.dataIndex] + '/}{not|' + notMonitor[data.dataIndex] + '}{unit| ' + unitData[data.dataIndex] + '}{prop|}
}, },
} }
}, },

View File

@ -1,6 +1,6 @@
<!--pages/login/login.wxml--> <!--pages/login/login.wxml-->
<view class="login_logo"> <view class="login_logo">
<image wx:if="false" src="https://xiangguan.sxyanzhu.com/profile/xmgl/static/sys_logo.png"></image> <image wx:if="{{false}}" src="https://xiangguan.sxyanzhu.com/profile/xmgl/static/sys_logo.png"></image>
</view> </view>
<view class="login_title"> <view class="login_title">
<text>数字工程项目管理系统</text> <text>数字工程项目管理系统</text>
@ -11,7 +11,7 @@
<view class="login_bg"> <view class="login_bg">
<view class="login_ex">请使用手机号登录</view> <view class="login_ex">请使用手机号登录</view>
<view class="login_input"> <view class="login_input">
<input placeholder="输入登录手机" placeholder-style="color:#5e6ea2" bindinput="name" class="name" maxlength="11"/> <input placeholder="输入登录手机" placeholder-style="color:#5e6ea2" bindinput="name" class="name" maxlength="21"/>
</view> </view>
<view class="login_input"> <view class="login_input">
<input placeholder="输入登录密码" placeholder-style="color:#5e6ea2" password="true" bindinput="psw" class="pass" maxlength="20" /> <input placeholder="输入登录密码" placeholder-style="color:#5e6ea2" password="true" bindinput="psw" class="pass" maxlength="20" />

View File

@ -11,6 +11,9 @@ import {
findProSubDeptsInfoById, findProSubDeptsInfoById,
findProSubDeptsUserInfoById findProSubDeptsUserInfoById
} from '../../../api/project' } from '../../../api/project'
import {
getToken
} from '../../../utils/auth'
const app = getApp() const app = getApp()
Page({ Page({
/** /**
@ -60,7 +63,7 @@ Page({
index = idx + 1; index = idx + 1;
} }
list.push({ list.push({
text: item.name, text: item.name.substr(0,6),
desc: '' desc: ''
}); });
}); });
@ -362,6 +365,9 @@ Page({
wx.downloadFile({ wx.downloadFile({
// 示例 url并非真实存在 // 示例 url并非真实存在
url: config.baseUrl + '/file/download?fileName=' + path, url: config.baseUrl + '/file/download?fileName=' + path,
header: {
'Authorization': 'Bearer ' + getToken()
},
success: function (res) { success: function (res) {
const filePath = res.tempFilePath const filePath = res.tempFilePath
let fpt = filePath.split("."); let fpt = filePath.split(".");

View File

@ -71,12 +71,12 @@
<view>{{subDeptData.projectName}}</view> <view>{{subDeptData.projectName}}</view>
</view> </view>
<view class="inspect_info" wx:if="{{options.category=='1' || options.category=='2' || options.category=='3' || options.category=='4' || options.category=='5' || options.category=='6' || options.category=='8'}}"> <view class="inspect_info" wx:if="{{options.category=='1' || options.category=='2' || options.category=='3' || options.category=='4' || options.category=='5' || options.category=='6' || options.category=='8'}}">
<view class="inspect_overview_list"> <!-- <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="8"><text class="color_purple">项目单位</text></van-col> <van-col span="8"><text class="color_purple">项目单位</text></van-col>
<van-col span="16" class="color_orange">{{ subDeptData.projectName}}</van-col> <van-col span="16" class="color_orange">{{ subDeptData.projectName}}</van-col>
</van-row> </van-row>
</view> </view> -->
<view class="inspect_overview_list"> <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="8"><text class="color_purple">单位类型</text></van-col> <van-col span="8"><text class="color_purple">单位类型</text></van-col>

View File

@ -7,6 +7,9 @@ import {
findProSubDeptsInfoById, findProSubDeptsInfoById,
findProSubDeptsUserInfoById findProSubDeptsUserInfoById
} from '../../../api/project' } from '../../../api/project'
import {
getToken
} from '../../../utils/auth'
const app = getApp() const app = getApp()
Page({ Page({
/** /**
@ -32,7 +35,8 @@ Page({
minImageList: [], minImageList: [],
imgTypes: ["png", "jpg", "jpeg"], imgTypes: ["png", "jpg", "jpeg"],
stopBtnShow: false, stopBtnShow: false,
comment: "" comment: "",
imgBaseUrl: config.baseImgUrl
}, },
/** /**
@ -55,11 +59,13 @@ Page({
}]; }];
let index = this.data.active; let index = this.data.active;
res.data.forEach((item,idx) => { res.data.forEach((item,idx) => {
console.log("this.data.options.taskName",this.data.options.taskName)
console.log("item.name",item.name)
if(this.data.options.taskName==item.name){ if(this.data.options.taskName==item.name){
index = idx+1; index = idx+1;
} }
list.push({ list.push({
text: item.name, text: item.name.substr(0,6),
desc: '' desc: ''
}); });
}); });
@ -282,6 +288,9 @@ Page({
wx.downloadFile({ wx.downloadFile({
// 示例 url并非真实存在 // 示例 url并非真实存在
url: config.baseUrl + '/file/download?fileName=' + path, url: config.baseUrl + '/file/download?fileName=' + path,
header: {
'Authorization': 'Bearer ' + getToken()
},
success: function (res) { success: function (res) {
const filePath = res.tempFilePath const filePath = res.tempFilePath
let fpt = filePath.split("."); let fpt = filePath.split(".");

View File

@ -71,12 +71,12 @@
<view>{{subDeptData.projectName}}</view> <view>{{subDeptData.projectName}}</view>
</view> </view>
<view class="inspect_info" wx:if="{{options.category=='1' || options.category=='2' || options.category=='3' || options.category=='4' || options.category=='5' || options.category=='6' || options.category=='8'}}"> <view class="inspect_info" wx:if="{{options.category=='1' || options.category=='2' || options.category=='3' || options.category=='4' || options.category=='5' || options.category=='6' || options.category=='8'}}">
<view class="inspect_overview_list"> <!-- <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="8"><text class="color_purple">项目单位</text></van-col> <van-col span="8"><text class="color_purple">项目单位</text></van-col>
<van-col span="16" class="color_orange">{{ subDeptData.projectName}}</van-col> <van-col span="16" class="color_orange">{{ subDeptData.projectName}}</van-col>
</van-row> </van-row>
</view> </view> -->
<view class="inspect_overview_list"> <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="8"><text class="color_purple">单位类型</text></van-col> <van-col span="8"><text class="color_purple">单位类型</text></van-col>
@ -211,8 +211,8 @@
<van-col span="16"> <van-col span="16">
<view class="problem_list_info_con in-img-max"> <view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index"> <view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptUserData.cardImgPos}}" src="{{imgBaseUrl+subDeptUserData.cardImgPos+'.min.jpg'}}"></image> <image bindtap='showImg' data-set="{{subDeptUserData.userInfos.cardImgPos}}" src="{{imgBaseUrl+subDeptUserData.userInfos.cardImgPos+'.min.jpg'}}"></image>
<image bindtap='showImg' data-set="{{subDeptUserData.cardImgInv}}" src="{{imgBaseUrl+subDeptUserData.cardImgInv+'.min.jpg'}}"></image> <image bindtap='showImg' data-set="{{subDeptUserData.userInfos.cardImgInv}}" src="{{imgBaseUrl+subDeptUserData.userInfos.cardImgInv+'.min.jpg'}}"></image>
</view> </view>
</view> </view>
</van-col> </van-col>

View File

@ -166,7 +166,7 @@ Page({
let zg = 0; let zg = 0;
let lg = 0; let lg = 0;
res.data.forEach(item => { res.data.forEach(item => {
if (item.useStatus == '1') { if (item.useStatus == '0') {
zg += item.total; zg += item.total;
} else { } else {
lg += item.total; lg += item.total;
@ -217,7 +217,7 @@ Page({
let lw = 0; let lw = 0;
labourDataList.forEach(item => { labourDataList.forEach(item => {
if (this.data.nactive == 0) { if (this.data.nactive == 0) {
if (item.useStatus == '1') { if (item.useStatus == '0') {
if (item.craftType == '2') { if (item.craftType == '2') {
ts += item.total; ts += item.total;
} else if (item.craftType == '3') { } else if (item.craftType == '3') {
@ -227,7 +227,7 @@ Page({
} }
} }
} else { } else {
if (item.useStatus != '1') { if (item.useStatus != '0') {
if (item.craftType == '2') { if (item.craftType == '2') {
ts += item.total; ts += item.total;
} else if (item.craftType == '3') { } else if (item.craftType == '3') {
@ -351,7 +351,7 @@ Page({
*/ */
getProSubDeptsUserInfo(proId) { getProSubDeptsUserInfo(proId) {
findProSubDeptsUserByParams(proId).then(res => { findProSubDeptsUserByParams(proId).then(res => {
app.globalData.subDeptUserData = res.data; app.globalData.subDeptUserData = res.data[0];
this.setData({ this.setData({
subDeptUserInfo: res.data[0] subDeptUserInfo: res.data[0]
}); });

View File

@ -674,38 +674,17 @@ if (this.data.userPost == "1") {
}); });
}, },
/**
* 签名..
*/
startSignFile_0(){
this.initData(this.data.userPhoneNumber);
},
/** /**
* 开始签署文件 * 开始签署文件
* @param {*} skip * @param {*} skip
*/ */
startSignFile(skip) { startSignFile(skip) {
let _fileForm = {}; let _fileForm = {};
let currDate = new Date().toLocaleString().substring(0, 10).split("/"); _fileForm.fName = "";
currDate[2] = currDate[2].replace("上","").replace("下","").replace("午",""); _fileForm.fCardId = "";
if (this.data.form.userPost == 1) { _fileForm.fSex = "";
_fileForm.fName = this.data.form.subDeptLeaderName; _fileForm.fPost = "";
_fileForm.fCardId = this.data.form.subDeptLeaderCode; _fileForm.fDate = "";
_fileForm.fSex = this.getGenderFromIdCard(this.data.form.subDeptLeaderCode);
_fileForm.fPost = "委托人";
_fileForm.fDate = currDate[0] + "年" + currDate[1] + "月" + currDate[2] + "日";
} else {
_fileForm.fName = this.data.form.userName;
_fileForm.fCardId = this.data.form.cardCode;
_fileForm.fSex = this.getGenderFromIdCard(this.data.form.cardCode);
this.data.craftPostAllOrginList.forEach(item => {
if (this.data.form.craftPost == item.dictValue) {
_fileForm.fPost = item.dictLabel;
}
});
_fileForm.fDate = currDate[0] + "年" + currDate[1] + "月" + currDate[2] + "日";
}
this.setData({ this.setData({
active: skip ? (this.data.active + 1) : this.data.active, active: skip ? (this.data.active + 1) : this.data.active,
fileForm: _fileForm, fileForm: _fileForm,
@ -1221,7 +1200,7 @@ if (this.data.userPost == "1") {
this.setData({ this.setData({
"form.userName": res.data.name, "form.userName": res.data.name,
"form.cardCode": res.data.cardId, "form.cardCode": res.data.cardId,
"form.nativePlace": res.data.native, "form.nativePlace": res.data.nation,
"form.address": res.data.address "form.address": res.data.address
}) })
if(!res.data.name || !res.data.cardId){ if(!res.data.name || !res.data.cardId){

View File

@ -688,7 +688,7 @@
<project-select init="{{initProject}}"></project-select> <project-select init="{{initProject}}"></project-select>
<van-steps steps="{{ flowNodes }}" active="{{ active }}" /> <van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="kaoshimianban"> <view class="kaoshimianban">
<jyq-result wx:if="{{busExamInfos.passMark<=busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/cg.png" title="恭喜!考试通过" description="本次考试已顺利完成,您可以去签署安全承诺文件了。" actionText="立 即 签 署" bind:action="startSignFile_0" /> <jyq-result wx:if="{{busExamInfos.passMark<=busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/cg.png" title="恭喜!考试通过" description="本次考试已顺利完成,您可以去签署安全承诺文件了。" actionText="立 即 签 署" bind:action="startSignFile" />
<jyq-result wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/sb.png" title="很遗憾!考试未通过" description="本次考试未通过,重新考试通过后您才可以签署安全承诺文件,请返回学习或继续考试。" actionText="继 续 考 试" bind:action="anewBusEduQuestion" descActionText="返 回 学 习" bind:descAction="onClickPreviousNode" /> <jyq-result wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/sb.png" title="很遗憾!考试未通过" description="本次考试未通过,重新考试通过后您才可以签署安全承诺文件,请返回学习或继续考试。" actionText="继 续 考 试" bind:action="anewBusEduQuestion" descActionText="返 回 学 习" bind:descAction="onClickPreviousNode" />
<!-- <view class="time-unit"> <!-- <view class="time-unit">
<text class="timeline_for_state_2 timeline_for_state_6" wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}">很 遗 憾 考 试 不 通 过</text><text class="timeline_for_state_1 timeline_for_state_6" wx:if="{{busExamInfos.passMark<=busExamInfos.userMark}}">恭 喜 考 试 通 过</text> <text class="timeline_for_state_2 timeline_for_state_6" wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}">很 遗 憾 考 试 不 通 过</text><text class="timeline_for_state_1 timeline_for_state_6" wx:if="{{busExamInfos.passMark<=busExamInfos.userMark}}">恭 喜 考 试 通 过</text>

View File

@ -68,3 +68,11 @@ export function changeDefaultProject(id) {
method: 'get' method: 'get'
}) })
} }
// 文件签署
export function fileSign(id) {
return request({
url: '/manage/proProjectInfoSubdeptsUsers/fileSign/' + id,
method: 'get'
})
}

View File

@ -124,7 +124,7 @@
<el-button link type="primary" icon="Delete" @click="handleEnter(scope.row)" v-if="scope.row.useStatus == 0" <el-button link type="primary" icon="Delete" @click="handleEnter(scope.row)" v-if="scope.row.useStatus == 0"
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:remove']">离场</el-button> v-hasPermi="['manage:proProjectInfoSubdeptsUsers:remove']">离场</el-button>
<el-button link type="primary" icon="Delete" @click="handleEnter(scope.row)" v-else <el-button link type="primary" icon="Delete" @click="handleEnter(scope.row)" v-else
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:remove']">进场</el-button><el-icon>< /></el-icon> v-hasPermi="['manage:proProjectInfoSubdeptsUsers:remove']">进场</el-button>
<el-button v-if="isSign(scope.row)" link type="primary" icon="StarFilled" @click="handleFileSign(scope.row)" <el-button v-if="isSign(scope.row)" link type="primary" icon="StarFilled" @click="handleFileSign(scope.row)"
v-hasPermi="['manage:proProjectInfoSubdeptsUsers:edit']">签名</el-button> v-hasPermi="['manage:proProjectInfoSubdeptsUsers:edit']">签名</el-button>
</template> </template>
@ -297,7 +297,7 @@
</template> </template>
<script setup name="ProProjectInfoSubdeptsUsers"> <script setup name="ProProjectInfoSubdeptsUsers">
import { listProProjectInfoSubdeptsUsers, getProProjectInfoSubdeptsUsers, updateEnterState, delProProjectInfoSubdeptsUsers, addProProjectInfoSubdeptsUsers, updateProProjectInfoSubdeptsUsers } from "@/api/manage/proProjectInfoSubdeptsUsers"; import { listProProjectInfoSubdeptsUsers, getProProjectInfoSubdeptsUsers, updateEnterState, delProProjectInfoSubdeptsUsers, addProProjectInfoSubdeptsUsers, updateProProjectInfoSubdeptsUsers, fileSign } from "@/api/manage/proProjectInfoSubdeptsUsers";
import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts"; import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
import { listProProjectInfoSubdeptsGroup } from "@/api/manage/proProjectInfoSubdeptsGroup"; import { listProProjectInfoSubdeptsGroup } from "@/api/manage/proProjectInfoSubdeptsGroup";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
@ -512,27 +512,7 @@ function getList() {
}); });
} }
function isSign(row){
if(row.approveStatus==100){
if(row.userPost=='1' || row.userPost=='2' || row.userPost=='3' || row.userPost=='6' || row.userPost=='8'){
if(row.eduFilePath.indexOf("-p")>-1 && row.eduFilePath.indexOf("-c")>-1){
return false;
}else{
return true;
}
}else if(row.userPost=='4' || row.userPost=='5'){
if(row.eduFilePath.indexOf("-g")>-1 && row.eduFilePath.indexOf("-p")>-1 && row.eduFilePath.indexOf("-c")>-1){
return false;
}else{
return true;
}
}else{
return false;
}
}else{
return false;
}
}
// //
function cancel() { function cancel() {
@ -774,6 +754,36 @@ function handleUpdate(row) {
}); });
} }
function isSign(row){
if(row.approveStatus==100){
if(row.userPost=='1' || row.userPost=='2' || row.userPost=='3' || row.userPost=='6' || row.userPost=='8'){
if(row.eduFilePath.indexOf("-p")>-1 && row.eduFilePath.indexOf("-c")>-1){
return false;
}else{
return true;
}
}else if(row.userPost=='4' || row.userPost=='5'){
if(row.eduFilePath.indexOf("-g")>-1 && row.eduFilePath.indexOf("-p")>-1 && row.eduFilePath.indexOf("-c")>-1){
return false;
}else{
return true;
}
}else{
return false;
}
}else{
return false;
}
}
function handleFileSign(row){
fileSign(row.id).then(res =>{
if(res.code==200){
getList();
}
});
}
function getWorkType(wt) { function getWorkType(wt) {
if (wt) { if (wt) {
let tmps = user_work_type.value.filter(d => d.value == wt); let tmps = user_work_type.value.filter(d => d.value == wt);