dev_xd
姜玉琦 2024-11-02 11:07:32 +08:00
commit a2ad6bce52
84 changed files with 732 additions and 305 deletions

1
.gitignore vendored
View File

@ -35,7 +35,6 @@ nbbuild/
dist/
nbdist/
.nb-gradle/
*.css
*.css.map
######################################################################

View File

@ -0,0 +1,14 @@
@echo off
echo.
echo [ Ϣ] ʹ Jar Modules-System ̡
echo.
cd %~dp0
cd ../yanzhu-modules/yanzhu-manage/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar yanzhu-modules-manage.jar
cd bin
pause

View File

@ -82,7 +82,7 @@
<!--相当于Dockerfile的ENTRYPOINT指令-->
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!--是否跳过docker build-->
<!--<skipDockerBuild>true</skipDockerBuild>-->
<skipDockerBuild>true</skipDockerBuild>
<dockerHost>${configuration.docker-one-Host}</dockerHost>
<resources>
<resource>

View File

@ -98,7 +98,7 @@ public class ExcelUtil<T>
/**
*
*/
private Sheet sheet;
protected Sheet sheet;
/**
*
@ -108,7 +108,7 @@ public class ExcelUtil<T>
/**
*
*/
private List<T> list;
protected List<T> list;
/**
*

View File

@ -7,6 +7,7 @@ import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import java.util.Date;
import java.util.List;
/**
* attendance_ubi_data
@ -104,6 +105,26 @@ public class AttendanceUbiData extends BaseEntity
private String comName;
private List<Long> userIds;
public List<Long> getUserIds() {
return userIds;
}
private List<String> days;
public List<String> getDays() {
return days;
}
public void setDays(List<String> days) {
this.days = days;
}
public void setUserIds(List<Long> userIds) {
this.userIds = userIds;
}
public String getComName() {
return comName;
}

View File

@ -59,4 +59,8 @@ public interface AttendanceUbiDataMapper
* @return
*/
public int deleteAttendanceUbiDataByIds(Long[] ids);
List<AttendanceUbiData> queryStatistics(AttendanceUbiData attendanceUbiData);
List<AttendanceUbiData> queryStatisticsByUserIds(AttendanceUbiData attendanceUbiData);
}

View File

@ -81,6 +81,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="queryStatistics" parameterType="AttendanceUbiData" resultMap="AttendanceUbiDataResult">
select * from (
select ad.`userId`
from attendance_ubi_data ad
where
date(ad.`inTime`)>=date(#{inTime}) and date(ad.`inTime`) &lt; date(#{outTime})
<if test="projectId != null "> and ad.projectId = #{projectId}</if>
<if test="subDeptId != null "> and ad.sub_dept_id = #{subDeptId}</if>
group by ad.`userId`
order by ad.userId) xx
</select>
<select id="queryStatisticsByUserIds" parameterType="AttendanceUbiData" resultMap="AttendanceUbiDataResult">
<include refid="selectAttendanceUbiDataVo"/>
where date(inTime)>=date(#{inTime}) and date(inTime) &lt; date(#{outTime})
<if test="userIds!=null">
and userId in
<foreach item="id" collection="userIds" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="selectAttendanceUbiDataById" parameterType="Long" resultMap="AttendanceUbiDataResult">
<include refid="selectAttendanceUbiDataVo"/>
where id = #{id}

View File

@ -118,7 +118,7 @@
<!--相当于Dockerfile的ENTRYPOINT指令-->
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!--是否跳过docker build-->
<!--<skipDockerBuild>true</skipDockerBuild>-->
<skipDockerBuild>true</skipDockerBuild>
<dockerHost>${configuration.docker-two-Host}</dockerHost>
<resources>
<resource>

View File

@ -96,7 +96,7 @@
<!--相当于Dockerfile的ENTRYPOINT指令-->
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!--是否跳过docker build-->
<!--<skipDockerBuild>true</skipDockerBuild>-->
<skipDockerBuild>true</skipDockerBuild>
<dockerHost>${configuration.docker-one-Host}</dockerHost>
<resources>
<resource>

View File

@ -141,7 +141,7 @@
<!--相当于Dockerfile的ENTRYPOINT指令-->
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!--是否跳过docker build-->
<!--<skipDockerBuild>true</skipDockerBuild>-->
<skipDockerBuild>true</skipDockerBuild>
<dockerHost>${configuration.docker-two-Host}</dockerHost>
<resources>
<resource>

View File

@ -102,7 +102,7 @@
<!--相当于Dockerfile的ENTRYPOINT指令-->
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!--是否跳过docker build-->
<!--<skipDockerBuild>true</skipDockerBuild>-->
<skipDockerBuild>true</skipDockerBuild>
<dockerHost>${configuration.docker-one-Host}</dockerHost>
<resources>
<resource>

View File

@ -108,7 +108,7 @@
<!--相当于Dockerfile的ENTRYPOINT指令-->
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!--是否跳过docker build-->
<!--<skipDockerBuild>true</skipDockerBuild>-->
<skipDockerBuild>true</skipDockerBuild>
<dockerHost>${configuration.docker-two-Host}</dockerHost>
<resources>
<resource>

View File

@ -1,5 +1,7 @@
package com.yanzhu.manage.controller;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
@ -9,11 +11,14 @@ import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.manage.domain.AttendanceUbiData;
import com.yanzhu.manage.service.IAttendanceUbiDataService;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.util.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.*;
/**
* Controller
@ -28,6 +33,7 @@ public class AttendanceUbiDataController extends BaseController
@Autowired
private IAttendanceUbiDataService attendanceUbiDataService;
/**
*
*/
@ -40,6 +46,95 @@ public class AttendanceUbiDataController extends BaseController
return getDataTable(list);
}
@RequiresPermissions("manage:attendanceUbiData:list")
@GetMapping("/statistics")
public TableDataInfo statistics(AttendanceUbiData attendanceUbiData){
startPage();
List<AttendanceUbiData> list = attendanceUbiDataService.queryStatistics(attendanceUbiData);
TableDataInfo data=getDataTable(list);
List<AttendanceUbiData> datas= (List<AttendanceUbiData>) data.getRows();
if(datas.size()>0){
List<Long> userIds=new ArrayList<>();
for(AttendanceUbiData ad:datas){
userIds.add(ad.getUserId());
}
attendanceUbiData.setUserIds(userIds);
List<AttendanceUbiData> userDatas=attendanceUbiDataService.queryStatisticsByUserIds(attendanceUbiData);
//处理汇总数据
List<AttendanceUbiData> retUsers= attendanceUbiDataService.procStatistics(attendanceUbiData.getInTime(), datas,userDatas,false);
data.setRows(retUsers);
}
return data;
}
@RequiresPermissions("manage:attendanceUbiData:list")
@PostMapping("/statisticsExport")
public void statisticsExport(HttpServletResponse response,AttendanceUbiData attendanceUbiData){
List<AttendanceUbiData> list = attendanceUbiDataService.queryStatistics(attendanceUbiData);
if(list.size()>0){
List<Long> userIds=new ArrayList<>();
for(AttendanceUbiData ad:list){
userIds.add(ad.getUserId());
}
attendanceUbiData.setUserIds(userIds);
List<AttendanceUbiData> userDatas=attendanceUbiDataService.queryStatisticsByUserIds(attendanceUbiData);
Date inTime=attendanceUbiData.getInTime();
Calendar calendar = new GregorianCalendar(inTime.getYear(), inTime.getMonth(), 1);
int daysInMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
//处理汇总数据
List<AttendanceUbiData> retUsers= attendanceUbiDataService.procStatistics(attendanceUbiData.getInTime(), list,userDatas,true);
ExcelUtil<AttendanceUbiData> util = new ExcelUtil<AttendanceUbiData>(AttendanceUbiData.class){
@Override
public void writeSheet() {
createSheet(0,0);
Row row = sheet.createRow(0);
Cell cell=row.createCell(0);
cell.setCellValue("公司");
cell=row.createCell(1);
cell.setCellValue("项目");
cell=row.createCell(2);
cell.setCellValue("用户");
cell=row.createCell(3);
cell.setCellValue("班组");
cell=row.createCell(4);
cell.setCellValue("工种类型");
cell=row.createCell(5);
cell.setCellValue("工种岗位");
for(int i=1;i<=daysInMonth;i++){
cell=row.createCell(i+5);
cell.setCellValue(i);
}
for(int i=0;i<this.list.size();i++){
AttendanceUbiData item=list.get(i);
row=sheet.createRow(i+1);
cell=row.createCell(0);
cell.setCellValue(item.getComName());
cell=row.createCell(1);
cell.setCellValue(item.getProjectName());
cell=row.createCell(2);
cell.setCellValue(item.getUserName());
cell=row.createCell(3);
cell.setCellValue(item.getSubDeptGroupName());
cell=row.createCell(4);
cell.setCellValue(item.getCraftType());
cell=row.createCell(5);
cell.setCellValue(item.getCraftPost());
for(int j=1;j<=daysInMonth;j++){
cell=row.createCell(5+j);
cell.setCellValue(item.getDays().get(j-1));
}
}
}
};
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
util.init(retUsers, "考勤管理数据", "", Excel.Type.EXPORT);
util.exportExcel(response);
}
}
/**
*
*/

View File

@ -7,6 +7,7 @@ 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.BusExamInfo;
import com.yanzhu.manage.service.IBusExamInfoService;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,5 +1,6 @@
package com.yanzhu.manage.service;
import java.util.Date;
import java.util.List;
import com.yanzhu.manage.domain.AttendanceUbiData;
@ -59,4 +60,20 @@ public interface IAttendanceUbiDataService
* @return
*/
public int deleteAttendanceUbiDataById(Long id);
/**
*
* @param attendanceUbiData
* @return
*/
List<AttendanceUbiData> queryStatistics(AttendanceUbiData attendanceUbiData);
/**
*
* @param userIds
* @return
*/
List<AttendanceUbiData> queryStatisticsByUserIds(AttendanceUbiData attendanceUbiData);
List<AttendanceUbiData> procStatistics(Date inTime, List<AttendanceUbiData> datas, List<AttendanceUbiData> userDatas,boolean updateCraft);
}

View File

@ -1,12 +1,16 @@
package com.yanzhu.manage.service.impl;
import java.util.List;
import java.util.*;
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import com.yanzhu.common.core.context.SecurityContextHolder;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.manage.domain.AttendanceUbiData;
import com.yanzhu.manage.mapper.AttendanceUbiDataMapper;
import com.yanzhu.manage.service.IAttendanceUbiDataService;
import com.yanzhu.system.api.domain.SysDictData;
import com.yanzhu.system.mapper.SysDictDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -22,6 +26,9 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
@Autowired
private AttendanceUbiDataMapper attendanceUbiDataMapper;
@Autowired
private SysDictDataMapper dictDataMapper;
/**
*
*
@ -102,4 +109,90 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
{
return attendanceUbiDataMapper.deleteAttendanceUbiDataById(id);
}
@Override
public List<AttendanceUbiData> queryStatistics(AttendanceUbiData attendanceUbiData) {
return attendanceUbiDataMapper.queryStatistics(attendanceUbiData);
}
@Override
public List<AttendanceUbiData> queryStatisticsByUserIds(AttendanceUbiData attendanceUbiData) {
return attendanceUbiDataMapper.queryStatisticsByUserIds(attendanceUbiData);
}
@Override
public List<AttendanceUbiData> procStatistics(Date inTime, List<AttendanceUbiData> datas, List<AttendanceUbiData> userDatas,boolean updateCraft) {
List<AttendanceUbiData> users=new ArrayList<>();
List<SysDictData> craftTypes=null;
List<SysDictData> craftPosts=null;
if(updateCraft) {
SysDictData where=new SysDictData();
where.setDictType("pro_craft_type");
craftTypes = dictDataMapper.selectDictDataList(where);
where.setDictType("pro_craft_post");
craftPosts = dictDataMapper.selectDictDataList(where);
}
if(datas.size()==0){
return users;
}
Calendar calendar = new GregorianCalendar(inTime.getYear(), inTime.getMonth(), 1);
int daysInMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
for(AttendanceUbiData ad :datas){
List<String> days=makeEmptyDays(daysInMonth);
List<AttendanceUbiData> findDatas=findUserDatas(ad,userDatas);
int j=0;
for(AttendanceUbiData fd:findDatas){
if(j==0){
fd.setDays(days);
users.add(fd);
if(updateCraft){
fd.setCraftType(getUserCraft(fd.getCraftType(),craftTypes));
fd.setCraftPost(getUserCraft(fd.getCraftPost(),craftPosts));
}
}
j++;
Date dt=fd.getInTime();
String inStr=fd.getInTime()!=null?DateUtils.parseDateToStr("HH:MM:SS",fd.getInTime()):"";
String outStr=fd.getOutTime()!=null?DateUtils.parseDateToStr("HH:MM:SS",fd.getOutTime()):"";
if(dt==null){
dt=fd.getOutTime();
}
if(dt==null){
continue;
}
int day=dt.getDate();
if(StringUtils.isNotEmpty(inStr) || StringUtils.isNotEmpty(outStr)){
days.set(day-1,inStr+"-"+outStr);
}
}
}
return users;
}
private String getUserCraft(String val, List<SysDictData> dicts) {
for(SysDictData dic:dicts){
if(val.equals(dic.getDictValue())){
return dic.getDictLabel();
}
}
return val;
}
private List<AttendanceUbiData> findUserDatas(AttendanceUbiData ad, List<AttendanceUbiData> userDatas) {
List<AttendanceUbiData> list=new ArrayList<>();
for(AttendanceUbiData it :userDatas){
if(it.getUserId().equals(ad.getUserId())){
list.add(it);
}
}
return list;
}
private List<String> makeEmptyDays(int daysInMonth) {
List<String> days=new ArrayList<>();
for(int i=0;i<daysInMonth;i++){
days.add("");
}
return days;
}
}

View File

@ -84,6 +84,12 @@
<groupId>com.yanzhu</groupId>
<artifactId>yanzhu-common-datascope</artifactId>
</dependency>
<dependency>
<groupId>com.yanzhu</groupId>
<artifactId>yanzhu-common-mapper</artifactId>
<version>3.6.2</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -234,17 +234,23 @@ public class SysUserController extends BaseController {
List<SysRole> roles = roleService.selectRoleAll();
ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
ajax.put("posts", postService.selectPostAll());
SysUser user=null;
if (StringUtils.isNotNull(userId)) {
SysUser sysUser;
if (SysUser.isAdmin(userId)) {
sysUser = userService.selectUserById(userId);
} else {
SysUser user = userService.selectUserByUserId(userId);
user = userService.selectUserByUserId(userId);
sysUser = userService.selectUserByIdAndDept(userId, user.getDeptId());
}
if(sysUser!=null) {
ajax.put(AjaxResult.DATA_TAG, sysUser);
ajax.put("postIds", postService.selectPostListByUserId(userId));
ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList()));
}else{
ajax.put(AjaxResult.DATA_TAG,user);
}
ajax.put("postIds", postService.selectPostListByUserId(userId));
}
return ajax;
}

View File

@ -2,10 +2,10 @@ package com.yanzhu.system.service.impl;
import java.util.List;
import com.yanzhu.common.security.utils.DictUtils;
import com.yanzhu.system.mapper.SysDictDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.common.security.utils.DictUtils;
import com.yanzhu.system.api.domain.SysDictData;
import com.yanzhu.system.service.ISysDictDataService;

View File

@ -6,6 +6,7 @@ import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import com.yanzhu.common.security.utils.DictUtils;
import com.yanzhu.system.mapper.SysDictDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -13,7 +14,6 @@ import org.springframework.transaction.annotation.Transactional;
import com.yanzhu.common.core.constant.UserConstants;
import com.yanzhu.common.core.exception.ServiceException;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.DictUtils;
import com.yanzhu.system.api.domain.SysDictData;
import com.yanzhu.system.api.domain.SysDictType;
import com.yanzhu.system.mapper.SysDictTypeMapper;

View File

@ -120,7 +120,7 @@
<!--相当于Dockerfile的ENTRYPOINT指令-->
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!--是否跳过docker build-->
<!--<skipDockerBuild>true</skipDockerBuild>-->
<skipDockerBuild>true</skipDockerBuild>
<dockerHost>${configuration.docker-one-Host}</dockerHost>
<resources>
<resource>

View File

@ -83,7 +83,7 @@
<!--相当于Dockerfile的ENTRYPOINT指令-->
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!--是否跳过docker build-->
<!--<skipDockerBuild>true</skipDockerBuild>-->
<skipDockerBuild>true</skipDockerBuild>
<!--suppress UnresolvedMavenProperty -->
<dockerHost>${configuration.docker-one-Host}</dockerHost>
<resources>

View File

@ -109,7 +109,7 @@
<!--相当于Dockerfile的ENTRYPOINT指令-->
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!--是否跳过docker build-->
<!--<skipDockerBuild>true</skipDockerBuild>-->
<skipDockerBuild>true</skipDockerBuild>
<dockerHost>${configuration.docker-one-Host}</dockerHost>
<resources>
<resource>

View File

@ -18,7 +18,6 @@ selenium-debug.log
*.njsproj
*.sln
*.local
*.css
*.css.map
package-lock.json

View File

@ -3,6 +3,7 @@
"version": "3.6.3",
"description": "若依管理系统",
"author": "若依",
"type": "module",
"license": "MIT",
"scripts": {
"dev": "vite",
@ -23,7 +24,7 @@
"bpmn-js": "^11.4.1",
"diagram-js": "^11.9.1",
"echarts": "5.5.1",
"element-plus": "2.7.6",
"element-plus": "^2.8.5",
"file-saver": "2.0.5",
"fuse.js": "6.6.2",
"highlight.js": "11.7.0",

View File

@ -42,3 +42,19 @@ export function delAttendanceUbiData(id) {
method: 'delete'
})
}
export function statisticsAttendanceUbiData(query) {
return request({
url: '/manage/attendanceUbiData/statistics',
method: 'get',
params: query
})
}
export function statisticsExportAttendanceUbiData(query) {
return request({
url: '/manage/attendanceUbiData/statisticsExport',
method: 'get',
params: query
})
}

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5630"><path d="M638.296 461L751.304 348a39.36 39.36 0 0 0 0-55.664L708.16 249.2a39.36 39.36 0 0 0-55.656 0L539.504 362.192 426.488 249.184a39.36 39.36 0 0 0-55.664 0.008l-43.136 43.128a39.352 39.352 0 0 0 0 55.664l113.008 113.008-113.008 113.016a39.352 39.352 0 0 0 0 55.664l43.136 43.152a39.384 39.384 0 0 0 55.664 0l113.008-113.016 113 113.016a39.392 39.392 0 0 0 55.672 0l43.144-43.152a39.376 39.376 0 0 0 0-55.672L638.296 461z" fill="#E22D2D" p-id="5631"></path><path d="M680.336 692.336a47.12 47.12 0 0 1-33.496-13.856L539.504 571.12l-107.36 107.36c-8.944 8.936-20.832 13.856-33.488 13.856s-24.544-4.92-33.488-13.856l-43.144-43.152a47.04 47.04 0 0 1-13.872-33.496c0-12.648 4.928-24.544 13.872-33.488l107.352-107.36-107.344-107.344a47.04 47.04 0 0 1-13.872-33.488c0-12.656 4.928-24.544 13.872-33.496l43.136-43.128a47.024 47.024 0 0 1 33.496-13.872c12.648 0 24.536 4.928 33.48 13.864l107.36 107.36 107.344-107.336c8.936-8.944 20.832-13.864 33.488-13.864s24.544 4.92 33.488 13.864l43.152 43.136a47.416 47.416 0 0 1 0 66.976L649.608 461l107.36 107.344a47.408 47.408 0 0 1 0 66.984l-43.144 43.152a47.088 47.088 0 0 1-33.488 13.856z m-140.832-143.84L658.16 667.168c11.84 11.832 32.512 11.832 44.36 0l43.144-43.152a31.416 31.416 0 0 0 0-44.36L626.984 461l118.664-118.656a31.408 31.408 0 0 0 0-44.352l-43.152-43.136c-11.832-11.84-32.512-11.84-44.344 0L539.504 373.504 420.832 254.84c-11.848-11.848-32.504-11.848-44.352 0.008l-43.136 43.128a31.144 31.144 0 0 0-9.184 22.176c0 8.376 3.264 16.248 9.184 22.168l118.664 118.664-118.664 118.68a31.12 31.12 0 0 0-9.184 22.168c0 8.384 3.264 16.256 9.184 22.176l43.136 43.152c11.84 11.832 32.504 11.832 44.352 0l118.672-118.664z" fill="#AF3737" p-id="5632"></path></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1 @@
<svg class="icon" style="width: 1.427734375em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1462 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3756"><path d="M1211.65168072 141.21142578c15.15642473 0 27.76323626 5.00034897 37.89106111 15.0081093C1259.59287778 166.37561011 1264.60735221 179.03186035 1264.60735221 194.181222c0 14.85979388-5.06391242 27.36772796-15.27648926 37.5238037l-635.69405708 635.63755601C603.47366774 877.63284745 590.90216949 882.78857422 575.99999999 882.78857422c-14.88804405 0-27.47366775-5.15572678-37.66505678-15.45305559L220.48791502 549.67211914C210.29652601 539.36772796 205.21142577 526.85979388 205.21142577 512c0-15.15642473 5.00034897-27.81267425 15.11404838-37.96168763C230.38973556 464.03055277 243.01067253 459.03020379 258.15297181 459.03020379c14.92335732 0 27.4877932 5.00034897 37.68624386 15.30473943L575.99999999 754.92654838l597.97956159-598.41744552C1184.1780137 146.21883713 1196.75657431 141.21142578 1211.65168072 141.21142578" p-id="3757"></path></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,40 @@
<template>
<div v-if="mode==0">
{{ getInfo(row,it) }}
</div>
<div v-else>
<svg class="icon icon-success" v-if="getInfo(row,it)" style="width: 1.427734375em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1462 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3756"><path d="M1211.65168072 141.21142578c15.15642473 0 27.76323626 5.00034897 37.89106111 15.0081093C1259.59287778 166.37561011 1264.60735221 179.03186035 1264.60735221 194.181222c0 14.85979388-5.06391242 27.36772796-15.27648926 37.5238037l-635.69405708 635.63755601C603.47366774 877.63284745 590.90216949 882.78857422 575.99999999 882.78857422c-14.88804405 0-27.47366775-5.15572678-37.66505678-15.45305559L220.48791502 549.67211914C210.29652601 539.36772796 205.21142577 526.85979388 205.21142577 512c0-15.15642473 5.00034897-27.81267425 15.11404838-37.96168763C230.38973556 464.03055277 243.01067253 459.03020379 258.15297181 459.03020379c14.92335732 0 27.4877932 5.00034897 37.68624386 15.30473943L575.99999999 754.92654838l597.97956159-598.41744552C1184.1780137 146.21883713 1196.75657431 141.21142578 1211.65168072 141.21142578" p-id="3757"></path></svg>
<svg class="icon icon-error" v-else style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5630"><path d="M638.296 461L751.304 348a39.36 39.36 0 0 0 0-55.664L708.16 249.2a39.36 39.36 0 0 0-55.656 0L539.504 362.192 426.488 249.184a39.36 39.36 0 0 0-55.664 0.008l-43.136 43.128a39.352 39.352 0 0 0 0 55.664l113.008 113.008-113.008 113.016a39.352 39.352 0 0 0 0 55.664l43.136 43.152a39.384 39.384 0 0 0 55.664 0l113.008-113.016 113 113.016a39.392 39.392 0 0 0 55.672 0l43.144-43.152a39.376 39.376 0 0 0 0-55.672L638.296 461z" fill="#E22D2D" p-id="5631"></path><path d="M680.336 692.336a47.12 47.12 0 0 1-33.496-13.856L539.504 571.12l-107.36 107.36c-8.944 8.936-20.832 13.856-33.488 13.856s-24.544-4.92-33.488-13.856l-43.144-43.152a47.04 47.04 0 0 1-13.872-33.496c0-12.648 4.928-24.544 13.872-33.488l107.352-107.36-107.344-107.344a47.04 47.04 0 0 1-13.872-33.488c0-12.656 4.928-24.544 13.872-33.496l43.136-43.128a47.024 47.024 0 0 1 33.496-13.872c12.648 0 24.536 4.928 33.48 13.864l107.36 107.36 107.344-107.336c8.936-8.944 20.832-13.864 33.488-13.864s24.544 4.92 33.488 13.864l43.152 43.136a47.416 47.416 0 0 1 0 66.976L649.608 461l107.36 107.344a47.408 47.408 0 0 1 0 66.984l-43.144 43.152a47.088 47.088 0 0 1-33.488 13.856z m-140.832-143.84L658.16 667.168c11.84 11.832 32.512 11.832 44.36 0l43.144-43.152a31.416 31.416 0 0 0 0-44.36L626.984 461l118.664-118.656a31.408 31.408 0 0 0 0-44.352l-43.152-43.136c-11.832-11.84-32.512-11.84-44.344 0L539.504 373.504 420.832 254.84c-11.848-11.848-32.504-11.848-44.352 0.008l-43.136 43.128a31.144 31.144 0 0 0-9.184 22.176c0 8.376 3.264 16.248 9.184 22.168l118.664 118.664-118.664 118.68a31.12 31.12 0 0 0-9.184 22.168c0 8.384 3.264 16.256 9.184 22.176l43.136 43.152c11.84 11.832 32.504 11.832 44.352 0l118.672-118.664z" fill="#AF3737" p-id="5632"></path></svg>
</div>
</template>
<script setup>
const { proxy } = getCurrentInstance();
const props = defineProps({
row: {
type: Object,
default: null,
},
it:{
type:[Number,String]
},
mode:{
type:String
}
});
function getInfo(row,it){
return row.days[it-1];
}
</script>
<style lang="scss" scoped>
.icon-success{
height:24px !important;
width:24px !important;
fill:#409eff !important;
}
.icon-error{
height:24px !important;
width:24px !important;
}
</style>

View File

@ -0,0 +1,203 @@
<template>
<div class="app-container attendance-ubi-data-statistics">
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
<el-form-item label="项目" prop="projectId">
<el-select :disabled="data.currentProId != ''" style="width:150px;" v-model="queryParams.projectId"
placeholder="请选择项目" clearable @change="() => { handleQuery(); projectChange(); }">
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属单位" prop="subDeptId">
<el-select v-model="queryParams.subDeptId" style="width:150px;" placeholder="请选择所属单位" clearable
@change="() => { handleQuery(); }">
<el-option v-for="(it, idx) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
</el-select>
</el-form-item>
<el-form-item label="显示方式" prop="showType">
<el-select v-model="queryParams.showType" style="width:150px;" placeholder="请选择显示方式">
<el-option label="按考勤时间显示" value="0" />
<el-option label="按是否考勤显示" value="1" />
</el-select>
</el-form-item>
<el-form-item label="月份" prop="inTime">
<el-date-picker v-model="queryParams.inTime" type="month" placeholder="选择月份" />
</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-button type="primary" icon="Search" @click="handleExport"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="data.loading" :data="data.attendanceUbiDataList" class="data-list" :key="data.elkey">
<el-table-column label="姓名" align="center" prop="userName" />
<el-table-column label="项目" align="center" prop="projectName" />
<el-table-column label="单位" align="center" prop="subDeptName" />
<el-table-column label="班组" align="center" prop="subDeptGroupName" />
<el-table-column label="工种类型" align="center" prop="craftType">
<template #default="scope">
<dict-tag :options="pro_craft_type" :value="scope.row.craftType" class="dict-tag" />
</template>
</el-table-column>
<el-table-column label="工种岗位" align="center" prop="craftPost">
<template #default="scope">
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" class="dict-tag" />
</template>
</el-table-column>
<template v-for="(it,idx) in data.tdDays" :key="idx+'-'+it" >
<el-table-column :label="it" align="center" :prop="it">
<template v-slot:default="scope">
<attItem :row="scope.row" :it="it" :mode="queryParams.showType"/>
</template>
</el-table-column>
</template>
</el-table>
<pagination v-show="data.total > 0" :total="data.total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList" />
</div>
</template>
<script setup>
import { findMyProjectList } from "@/api/publics";
import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
import {statisticsAttendanceUbiData,statisticsExportAttendanceUbiData} from '@/api/manage/attendanceUbiData.js'
import useUserStore from '@/store/modules/user'
import attItem from './item.vue'
const { proxy } = getCurrentInstance();
const { pro_craft_type, pro_craft_post } = proxy.useDict( 'pro_craft_type', 'pro_craft_post');
const userStore = useUserStore()
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
inTime: '',
projectId: '',
subDeptId: '',
showType: '0'
},
rules: {
},
projects: [],
subdepts: [],
currentProId: '',
attendanceUbiDataList: [],
loading: false,
total: 0,
tdDays:[],
elkey:0,
});
const { queryParams, form, rules } = toRefs(data);
/*项目改变事件 */
function projectChange() {
listProProjectInfoSubdepts({ projectId: queryParams.value.projectId, pageNum: 1, pageSize: 100 }).then(d => {
data.subdepts = d.rows || [];
});
}
/** 查询项目列表 */
function getProjectList() {
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
data.projects = response.rows;
if (userStore.currentProId) {
queryParams.value.projectId = userStore.currentProId
data.currentProId = userStore.currentProId;
projectChange();
}
});
}
function handleExport(){
let queryData={
projectId:queryParams.value.projectId,
subDeptId:queryParams.value.subDeptId
}
let dt1=proxy.$dt(queryParams.value.inTime);
let dt2=dt1.month(dt1.month()+1);
queryData.inTime=dt1.format("YYYY-MM-01");
queryData.outTime=dt2.format("YYYY-MM-01");
proxy.download('manage/attendanceUbiData/statisticsExport', {
...queryData
}, `attendanceUbiData_${new Date().getTime()}.xlsx`)
}
function getList() {
let queryData={
pageNum:queryParams.value.pageNum,
pageSize:queryParams.value.pageSize,
projectId:queryParams.value.projectId,
subDeptId:queryParams.value.subDeptId
}
let dt1=proxy.$dt(queryParams.value.inTime);
let dt2=dt1.month(dt1.month()+1);
queryData.inTime=dt1.format("YYYY-MM-01");
queryData.outTime=dt2.format("YYYY-MM-01");
dt1=proxy.$dt(dt1.format("YYYY-MM-01"));
data.tdDays=[];
for(let i=1;i<=dt1.daysInMonth();i++){
if(i<10){
data.tdDays.push(""+i);
}else{
data.tdDays.push(""+i);
}
}
data.loading=true;
statisticsAttendanceUbiData(queryData).then(d=>{
data.loading=false;
data.total=d.total||0;
let tmps=d.rows||[];
let obj={};
tmps.forEach(it=>{
let userId=it.userId;
if(!obj[userId]){
obj[userId]={
...it
}
}
let day="";
if(it.inTime){
day=""+proxy.$dt(it.inTime).format("D");
}
if(it.outTime && !day){
day=""+proxy.$dt(it.outTime).format("D");
}
obj[userId][day]={
in:it.inTime,
out:it.outTime
};
});
let retDatas=[];
for(let k in obj){
retDatas.push(obj[k]);
}
data.attendanceUbiDataList=retDatas;
data.elkey++;
});
}
/*查询数据*/
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/*重置*/
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
queryParams.value.inTime = proxy.$dt(new Date()).format("YYYY-MM-DD");
getProjectList();
handleQuery();
</script>
<style lang="scss"></style>

View File

@ -5,14 +5,14 @@
<el-input v-model="queryParams.comId" placeholder="请输入公司主键" clearable @keyup.enter="handleQuery"/>
</el-form-item>
<el-form-item label="项目" prop="projectId">
<el-select :disabled="data.currentProId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable
<el-select :disabled="data.currentProId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable style="width:150px;"
@change="handleQuery">
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="考勤厂商" prop="vendorsCode">
<el-select v-model="queryParams.vendorsCode" placeholder="请选择厂商" clearable @change="handleQuery">
<el-select v-model="queryParams.vendorsCode" placeholder="请选择厂商" clearable @change="handleQuery" style="width:150px;">
<el-option v-for="dict in attendance_vendors" :key="dict.value" :label="dict.label" :value="dict.value">
</el-option>
</el-select>

View File

@ -2,40 +2,21 @@
<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.currentProId">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter="handleQuery"
/>
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="单位类型" prop="subDeptType">
<el-select v-model="queryParams.subDeptType" placeholder="请选择参建单位类型" clearable>
<el-option
v-for="dict in sub_dept_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<el-select v-model="queryParams.subDeptType" placeholder="请选择参建单位类型" clearable style="width:150px;">
<el-option v-for="dict in sub_dept_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="进场状态" prop="useStatus">
<el-select v-model="queryParams.useStatus" placeholder="请选择进场状态" clearable>
<el-option
v-for="dict in sys_use_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
<el-select v-model="queryParams.useStatus" placeholder="请选择进场状态" clearable style="width:150px;">
<el-option v-for="dict in sys_use_status" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="单位名称" prop="subDeptName">
<el-input
v-model="queryParams.subDeptName"
placeholder="请输入参建单位名称"
clearable
@keyup.enter="handleQuery"
/>
<el-input v-model="queryParams.subDeptName" placeholder="请输入参建单位名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
@ -45,42 +26,20 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['manage:proProjectInfoSubdepts:add']"
>新增</el-button>
<el-button type="primary" plain icon="Plus" @click="handleAdd"
v-hasPermi="['manage:proProjectInfoSubdepts:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['manage:proProjectInfoSubdepts:edit']"
>修改</el-button>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
v-hasPermi="['manage:proProjectInfoSubdepts:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['manage:proProjectInfoSubdepts:remove']"
>删除</el-button>
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
v-hasPermi="['manage:proProjectInfoSubdepts:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['manage:proProjectInfoSubdepts:export']"
>导出</el-button>
<el-button type="warning" plain icon="Download" @click="handleExport"
v-hasPermi="['manage:proProjectInfoSubdepts:export']">导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -119,41 +78,31 @@
</el-table-column>
<el-table-column label="操作" fixed="right" width="150" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:edit']"></el-button>
<el-button v-if="scope.row.useStatus=='1'" link type="primary" icon="Setting" @click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:remove']"></el-button>
<el-button v-if="scope.row.useStatus=='2'" link type="primary" icon="Setting" @click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:remove']"></el-button>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:proProjectInfoSubdepts:edit']">修改</el-button>
<el-button v-if="scope.row.useStatus == '1'" link type="primary" icon="Setting"
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:remove']">离场</el-button>
<el-button v-if="scope.row.useStatus == '2'" link type="primary" icon="Setting"
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts: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"
/>
<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 modal-class="SubdeptsDlg">
<el-form ref="proProjectInfoSubdeptsRef" :model="form" :rules="rules" label-width="88px">
<el-tabs
v-model="activeTabs"
type="card"
class="demo-tabs"
>
<el-tabs v-model="activeTabs" type="card" class="demo-tabs">
<el-tab-pane label="基本信息" name="base">
<el-form-item label="项目名称" v-if="form.projectId">
<el-tag effect="plain">{{ form.projectName }}</el-tag>
</el-form-item>
<el-form-item label="单位类型" prop="subDeptType">
<el-select v-model="form.subDeptType" placeholder="请选择单位类型" style="width:100%">
<el-option
v-for="dict in sub_dept_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
<el-option v-for="dict in sub_dept_type" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="单位名称" prop="subDeptName">
@ -163,41 +112,31 @@
<el-input v-model="form.subDeptCode" placeholder="请输入信用代码" maxlength="64" show-word-limit />
</el-form-item>
<el-form-item label="进场时间" prop="useDates">
<el-date-picker
v-model="form.useDates"
type="date"
placeholder="请选择进场时间"
style="width:100%"
/>
<el-date-picker v-model="form.useDates" type="date" placeholder="请选择进场时间" style="width:100%" />
</el-form-item>
<el-form-item label="进场状态" prop="useStatus">
<el-select v-model="form.useStatus" placeholder="请选择进场状态" style="width:100%">
<el-option
v-for="dict in sys_use_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
<el-option v-for="dict in sys_use_status" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="承包范围" prop="contractInfos" v-if="form.subDeptType == '4' || form.subDeptType == '5'">
<el-input v-model="form.contractInfos" maxlength="2000" show-word-limit type="textarea" rows="4" placeholder="请输入承包范围" />
<el-input v-model="form.contractInfos" maxlength="2000" show-word-limit type="textarea" rows="4"
placeholder="请输入承包范围" />
</el-form-item>
</el-tab-pane>
<el-tab-pane label="单位信息" name="infos">
<el-form-item label="经营范围">
<el-input v-model="form.subDeptInfos.busScope" maxlength="2000" show-word-limit type="textarea" rows="3" placeholder="请输入经营范围" />
<el-input v-model="form.subDeptInfos.busScope" maxlength="2000" show-word-limit type="textarea" rows="3"
placeholder="请输入经营范围" />
</el-form-item>
<el-form-item label="注册日期">
<el-date-picker
v-model="form.subDeptInfos.signDate"
type="date"
placeholder="请选择注册日期"
style="width:100%"
/>
<el-date-picker v-model="form.subDeptInfos.signDate" type="date" placeholder="请选择注册日期"
style="width:100%" />
</el-form-item>
<el-form-item label="公司地址">
<el-input v-model="form.subDeptInfos.address" maxlength="200" show-word-limit type="textarea" rows="2" placeholder="请输入公司地址" />
<el-input v-model="form.subDeptInfos.address" maxlength="200" show-word-limit type="textarea" rows="2"
placeholder="请输入公司地址" />
</el-form-item>
<el-form-item label="营业执照" prop="businessLicensePath">
<image-upload v-model="form.businessLicensePath" :limit="1" />
@ -212,10 +151,12 @@
<el-input v-model="form.subDeptInfos.legalPerson" maxlength="10" show-word-limit placeholder="请输入法定代表人" />
</el-form-item>
<el-form-item label="法人身份证">
<el-input v-model="form.subDeptInfos.legalPersonCard" maxlength="18" show-word-limit placeholder="请输入法人身份证" />
<el-input v-model="form.subDeptInfos.legalPersonCard" maxlength="18" show-word-limit
placeholder="请输入法人身份证" />
</el-form-item>
<el-form-item label="获得奖项">
<el-input v-model="form.subDeptInfos.awards" maxlength="999" show-word-limit type="textarea" rows="3" placeholder="请输入获得奖项" />
<el-input v-model="form.subDeptInfos.awards" maxlength="999" show-word-limit type="textarea" rows="3"
placeholder="请输入获得奖项" />
</el-form-item>
<el-form-item label="企业评分">
<el-input v-model="form.subDeptInfos.mark" maxlength="10" show-word-limit placeholder="请输入企业评分" />
@ -467,6 +408,7 @@ getList();
color: #409eff;
font-weight: 800;
}
.SubdeptsDlg {
.el-dialog__body {
margin-top: -25px;

View File

@ -2,57 +2,27 @@
<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.currentProId">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter="handleQuery"
/>
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="单位名称" prop="subDeptName">
<el-input
v-model="queryParams.subDeptName"
placeholder="请输入单位名称"
clearable
@keyup.enter="handleQuery"
/>
<el-input v-model="queryParams.subDeptName" placeholder="请输入单位名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="单位类型" prop="subDeptType">
<el-select v-model="queryParams.subDeptType" placeholder="请选择单位类型" clearable>
<el-option
v-for="dict in sub_dept_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<el-select v-model="queryParams.subDeptType" placeholder="请选择单位类型" clearable style="width:150px;">
<el-option v-for="dict in sub_dept_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="班组名称" prop="groupName">
<el-input
v-model="queryParams.groupName"
placeholder="请输入班组名称"
clearable
@keyup.enter="handleQuery"
/>
<el-input v-model="queryParams.groupName" placeholder="请输入班组名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="工种类型" prop="craftType">
<el-select v-model="queryParams.craftType" placeholder="请选择工种类型" clearable>
<el-option
v-for="dict in pro_craft_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<el-select v-model="queryParams.craftType" placeholder="请选择工种类型" clearable style="width:150px;">
<el-option v-for="dict in pro_craft_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="工种岗位" prop="craftPost">
<el-select v-model="queryParams.craftPost" placeholder="请选择工种岗位" clearable>
<el-option
v-for="dict in pro_craft_post"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<el-select v-model="queryParams.craftPost" placeholder="请选择工种岗位" clearable style="width:150px;">
<el-option v-for="dict in pro_craft_post" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
@ -63,42 +33,20 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:add']"
>新增</el-button>
<el-button type="primary" plain icon="Plus" @click="handleAdd"
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']"
>修改</el-button>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:remove']"
>删除</el-button>
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:export']"
>导出</el-button>
<el-button type="warning" plain icon="Download" @click="handleExport"
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:export']">导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -137,59 +85,39 @@
</el-table-column>
<el-table-column label="操作" fixed="right" width="120" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']"></el-button>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']">修改</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"
/>
<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 modal-class="SubdeptsGroupDlg">
<el-form ref="proProjectInfoSubdeptsGroupRef" :model="form" :rules="rules" label-width="88px">
<el-tabs
v-model="activeTabs"
type="card"
class="demo-tabs"
>
<el-tabs v-model="activeTabs" type="card" class="demo-tabs">
<el-tab-pane label="基本信息" name="base">
<el-form-item label="项目名称" v-if="form.projectId">
<el-tag effect="plain">{{ form.projectName }}</el-tag>
</el-form-item>
<el-form-item label="所属单位" prop="subDeptId">
<el-select v-model="form.subDeptId" placeholder="请选择所属单位" style="width:100%">
<el-option
v-for="dept in subDeptOptions"
:key="dept.id"
:label="dept.subDeptName"
:value="dept.id"
></el-option>
<el-option v-for="dept in subDeptOptions" :key="dept.id" :label="dept.subDeptName"
:value="dept.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="工种类型" prop="craftType">
<el-select v-model="form.craftType" placeholder="请选择工种类型" style="width:100%">
<el-option
v-for="dict in pro_craft_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
<el-option v-for="dict in pro_craft_type" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="工种岗位" prop="craftPost">
<el-select v-model="form.craftPost" placeholder="请选择工种岗位" style="width:100%">
<el-option
v-for="dict in pro_craft_post"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
<el-option v-for="dict in pro_craft_post" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="班组名称" prop="groupName">
@ -424,6 +352,7 @@ getList();
color: #409eff;
font-weight: 800;
}
.SubdeptsDlg {
.el-dialog__body {
margin-top: -25px;

View File

@ -3,12 +3,12 @@
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="所属单位" prop="subDeptId">
<el-select v-model="queryParams.subDeptId" placeholder="请选择所属单位" @change="doSubDeptChange('query')" clearable>
<el-select v-model="queryParams.subDeptId" placeholder="请选择所属单位" @change="doSubDeptChange('query')" clearable style="width:150px;">
<el-option v-for="(it, idx) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
</el-select>
</el-form-item>
<el-form-item label="班组" prop="subDeptName">
<el-select v-model="queryParams.subDeptGroup" placeholder="请选择班组" @change="doDeptGroupChange" clearable>
<el-select v-model="queryParams.subDeptGroup" placeholder="请选择班组" @change="doDeptGroupChange" clearable style="width:150px;">
<el-option v-for="(it, idx) in data.queryDeptGroups" :key="idx" :label="it.groupName" :value="it.id" />
</el-select>
</el-form-item>
@ -19,12 +19,12 @@
<el-input v-model="queryParams.userPhone" placeholder="请输入联系电话" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="工种类型" prop="craftType">
<el-select v-model="queryParams.craftType" placeholder="请选择工种类型" clearable>
<el-select v-model="queryParams.craftType" placeholder="请选择工种类型" clearable style="width:150px;">
<el-option v-for="dict in pro_craft_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="工种岗位" prop="craftPost">
<el-select v-model="queryParams.craftPost" placeholder="请选择工种岗位" clearable>
<el-select v-model="queryParams.craftPost" placeholder="请选择工种岗位" clearable style="width:150px;">
<el-option
v-for="dict in (queryParams.craftType ? pro_craft_post.filter(d => d.remark == queryParams.craftType) : [])"
:key="dict.value" :label="dict.label" :value="dict.value" />

View File

@ -32,6 +32,7 @@ export default defineConfig(({ mode, command }) => {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'http://localhost:8080',
//target: 'http://62.234.3.186/prod-api/',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
},