小程序代码质量整改

dev_xd
lj7788@126.com 2025-08-06 10:40:52 +08:00
parent f7ad0d2203
commit 9f80012423
21 changed files with 3946 additions and 3946 deletions

View File

@ -1,35 +0,0 @@
import {
request
} from '../utils/request'
// 统计劳务人员信息
export function findSubDeptsUsers(proId) {
return request({
url: '/manage/attendance/v1/findSubDeptsUsers/'+proId,
method: 'get'
})
}
// 统计今日出勤信息
export function findDaysAttendanceView(proId) {
return request({
url: '/manage/attendance/v1/findDaysAttendanceView/'+proId,
method: 'get'
})
}
// 统计人员出勤信息
export function findSubDeptsAttendanceView(proId) {
return request({
url: '/manage/attendance/v1/findSubDeptsAttendanceView/'+proId,
method: 'get'
})
}
// 查询人员出勤信息
export function findUsersAttendanceView(proId) {
return request({
url: '/manage/attendance/v1/findUsersAttendanceView/'+proId,
method: 'get'
})
}

View File

@ -1,197 +0,0 @@
import {request} from '../utils/request'
// 获取流程申请类型
export function myDefinitionList(data) {
return request({
url: '/flowable/businessKey/myDefinitionList',
method: 'get',
data: data
})
}
// 启动流程实例
export function startProcessInstance(data) {
return request({
url: '/flowable/businessKey/startProcessInstance',
method: 'post',
data: data
})
}
// 查询流程节点
export function readNotes(deployId) {
return request({
url: '/flowable/businessKey/readNotes/'+deployId,
method: 'get'
})
}
// 查询流程节点
export function readDeployNotes(deployId) {
return request({
url: '/flowable/businessKey/readDeployNotes/'+deployId,
method: 'get'
})
}
// 取消流程申请
export function stopProcess(data) {
return request({
url: '/flowable/businessKey/stopProcess',
method: 'post',
data: data
})
}
// 撤回流程办理
export function revokeProcess(data) {
return request({
url: '/flowable/businessKey/revokeProcess',
method: 'post',
data: data
})
}
// 审批任务流程
export function complete(data) {
return request({
url: '/flowable/task/complete',
method: 'post',
data: data
})
}
// 批量审批任务
export function batchComplete(data) {
return request({
url: '/flowable/task/batchComplete',
method: 'post',
data: data
})
}
// 驳回任务流程
export function reject(data) {
return request({
url: '/flowable/businessKey/reject',
method: 'post',
data: data
})
}
// 退回任务流程
export function returnTask(data) {
return request({
url: '/flowable/task/return',
method: 'post',
data: data
})
}
// 委派任务流程
export function delegateTask(data) {
return request({
url: '/flowable/businessKey/delegateTask',
method: 'post',
data: data
})
}
// 转办任务流程
export function assignTask(data) {
return request({
url: '/flowable/businessKey/assignTask',
method: 'post',
data: data
})
}
// 删除流程实例
export function deleteInstance(instanceId) {
return request({
url: '/flowable/businessKey/delete/'+instanceId,
method: 'get'
})
}
// 获取所有可回退的节点
export function returnList(data) {
return request({
url: '/flowable/task/returnList',
method: 'post',
data: data
})
}
// 根据流程Id查询操作日志
export function findCommentByProcInsId(data) {
return request({
url: '/flowable/businessKey/findCommentByProcInsId',
method: 'get',
data: data
})
}
// 根据条件统计分包单位审批
export function findMyTask(query) {
return request({
url: '/flowable/businessKey/findMyTask',
method: 'get',
params: query
})
}
// 根据条件统计分包单位审批
export function quueryCount(query) {
return request({
url: '/flowable/businessKey/queryCount',
method: 'get',
params: query
})
}
// 根据条件查询我的代办任务
export function myAwaitFlowTaskList(query) {
return request({
url: '/flowable/businessKey/myAwaitFlowTaskList',
method: 'get',
params: query
})
}
// 根据条件查询我的已办任务
export function myFinishedFlowTaskList(query) {
return request({
url: '/flowable/businessKey/myFinishedFlowTaskList',
method: 'get',
params: query
})
}
// 根据条件查询所有流申请
export function allInstanceList(data) {
return request({
url: '/flowable/businessKey/allList',
method: 'get',
data: data
})
}
// 根据条件查询所有流申请
export function myInstanceList(data) {
return request({
url: '/flowable/businessKey/myList',
method: 'get',
data: data
})
}
// 根据条件统计所有流程任务
export function queryTaskCount(data) {
return request({
url: '/flowable/businessKey/queryCount',
method: 'get',
data: data
})
}

View File

@ -1,97 +0,0 @@
import {
request
} from '../utils/request'
// 查询隐患列表
export function list(query) {
return request({
url: '/manage/problemmodify/wxList',
method: 'get',
params: query
})
}
// 统计隐患列表
export function listCount(query) {
return request({
url: '/manage/problemmodify/wxListCount',
method: 'get',
params: query
})
}
// 查询隐患详情
export function findInfo(id) {
return request({
url: '/manage/problemmodify/'+id,
method: 'get'
})
}
// 查询隐患审批详情
export function findAuditInfos(id) {
return request({
url: '/manage/problemmodify/findAuditInfos/'+id,
method: 'get'
})
}
// 新增隐患问题
export function add(data) {
return request({
url: '/manage/problemmodify',
method: 'post',
data: data
})
}
// 新增隐患草稿
export function addDraft(data) {
return request({
url: '/manage/problemmodifyDraft/addDraft',
method: 'post',
data: data
})
}
// 删除隐患详情
export function remove(id) {
return request({
url: '/manage/problemmodify/wxRemove/'+id,
method: 'delete'
})
}
// 提交隐患整改
export function modifyProblemmodify(data) {
return request({
url: '/manage/problemmodify/modifyProblemmodify',
method: 'post',
data: data
})
}
// 提交问题复检
export function checkProblemmodify(data) {
return request({
url: '/manage/problemmodify/checkProblemmodify',
method: 'post',
data: data
})
}
// 查询我上次提交的隐患信息
export function findMyLastProblemmodify(proId,type) {
return request({
url: '/manage/problemmodify/findMyLastProblemmodify/'+proId+'?infoType='+type,
method: 'get'
})
}
// 项目分组查询统计
export function findGroupCountView(proId,type) {
return request({
url: '/manage/problemmodify/getWxGroupCountView/'+proId+'?infoType='+type,
method: 'get'
})
}

View File

@ -0,0 +1,35 @@
import {
request
} from '../../utils/request'
// 统计劳务人员信息
export function findSubDeptsUsers(proId) {
return request({
url: '/manage/attendance/v1/findSubDeptsUsers/' + proId,
method: 'get'
})
}
// 统计今日出勤信息
export function findDaysAttendanceView(proId) {
return request({
url: '/manage/attendance/v1/findDaysAttendanceView/' + proId,
method: 'get'
})
}
// 统计人员出勤信息
export function findSubDeptsAttendanceView(proId) {
return request({
url: '/manage/attendance/v1/findSubDeptsAttendanceView/' + proId,
method: 'get'
})
}
// 查询人员出勤信息
export function findUsersAttendanceView(proId) {
return request({
url: '/manage/attendance/v1/findUsersAttendanceView/' + proId,
method: 'get'
})
}

View File

@ -0,0 +1,197 @@
import { request } from '../../utils/request'
// 获取流程申请类型
export function myDefinitionList(data) {
return request({
url: '/flowable/businessKey/myDefinitionList',
method: 'get',
data: data
})
}
// 启动流程实例
export function startProcessInstance(data) {
return request({
url: '/flowable/businessKey/startProcessInstance',
method: 'post',
data: data
})
}
// 查询流程节点
export function readNotes(deployId) {
return request({
url: '/flowable/businessKey/readNotes/' + deployId,
method: 'get'
})
}
// 查询流程节点
export function readDeployNotes(deployId) {
return request({
url: '/flowable/businessKey/readDeployNotes/' + deployId,
method: 'get'
})
}
// 取消流程申请
export function stopProcess(data) {
return request({
url: '/flowable/businessKey/stopProcess',
method: 'post',
data: data
})
}
// 撤回流程办理
export function revokeProcess(data) {
return request({
url: '/flowable/businessKey/revokeProcess',
method: 'post',
data: data
})
}
// 审批任务流程
export function complete(data) {
return request({
url: '/flowable/task/complete',
method: 'post',
data: data
})
}
// 批量审批任务
export function batchComplete(data) {
return request({
url: '/flowable/task/batchComplete',
method: 'post',
data: data
})
}
// 驳回任务流程
export function reject(data) {
return request({
url: '/flowable/businessKey/reject',
method: 'post',
data: data
})
}
// 退回任务流程
export function returnTask(data) {
return request({
url: '/flowable/task/return',
method: 'post',
data: data
})
}
// 委派任务流程
export function delegateTask(data) {
return request({
url: '/flowable/businessKey/delegateTask',
method: 'post',
data: data
})
}
// 转办任务流程
export function assignTask(data) {
return request({
url: '/flowable/businessKey/assignTask',
method: 'post',
data: data
})
}
// 删除流程实例
export function deleteInstance(instanceId) {
return request({
url: '/flowable/businessKey/delete/' + instanceId,
method: 'get'
})
}
// 获取所有可回退的节点
export function returnList(data) {
return request({
url: '/flowable/task/returnList',
method: 'post',
data: data
})
}
// 根据流程Id查询操作日志
export function findCommentByProcInsId(data) {
return request({
url: '/flowable/businessKey/findCommentByProcInsId',
method: 'get',
data: data
})
}
// 根据条件统计分包单位审批
export function findMyTask(query) {
return request({
url: '/flowable/businessKey/findMyTask',
method: 'get',
params: query
})
}
// 根据条件统计分包单位审批
export function quueryCount(query) {
return request({
url: '/flowable/businessKey/queryCount',
method: 'get',
params: query
})
}
// 根据条件查询我的代办任务
export function myAwaitFlowTaskList(query) {
return request({
url: '/flowable/businessKey/myAwaitFlowTaskList',
method: 'get',
params: query
})
}
// 根据条件查询我的已办任务
export function myFinishedFlowTaskList(query) {
return request({
url: '/flowable/businessKey/myFinishedFlowTaskList',
method: 'get',
params: query
})
}
// 根据条件查询所有流申请
export function allInstanceList(data) {
return request({
url: '/flowable/businessKey/allList',
method: 'get',
data: data
})
}
// 根据条件查询所有流申请
export function myInstanceList(data) {
return request({
url: '/flowable/businessKey/myList',
method: 'get',
data: data
})
}
// 根据条件统计所有流程任务
export function queryTaskCount(data) {
return request({
url: '/flowable/businessKey/queryCount',
method: 'get',
data: data
})
}

View File

@ -0,0 +1,97 @@
import {
request
} from '../../utils/request'
// 查询隐患列表
export function list(query) {
return request({
url: '/manage/problemmodify/wxList',
method: 'get',
params: query
})
}
// 统计隐患列表
export function listCount(query) {
return request({
url: '/manage/problemmodify/wxListCount',
method: 'get',
params: query
})
}
// 查询隐患详情
export function findInfo(id) {
return request({
url: '/manage/problemmodify/' + id,
method: 'get'
})
}
// 查询隐患审批详情
export function findAuditInfos(id) {
return request({
url: '/manage/problemmodify/findAuditInfos/' + id,
method: 'get'
})
}
// 新增隐患问题
export function add(data) {
return request({
url: '/manage/problemmodify',
method: 'post',
data: data
})
}
// 新增隐患草稿
export function addDraft(data) {
return request({
url: '/manage/problemmodifyDraft/addDraft',
method: 'post',
data: data
})
}
// 删除隐患详情
export function remove(id) {
return request({
url: '/manage/problemmodify/wxRemove/' + id,
method: 'delete'
})
}
// 提交隐患整改
export function modifyProblemmodify(data) {
return request({
url: '/manage/problemmodify/modifyProblemmodify',
method: 'post',
data: data
})
}
// 提交问题复检
export function checkProblemmodify(data) {
return request({
url: '/manage/problemmodify/checkProblemmodify',
method: 'post',
data: data
})
}
// 查询我上次提交的隐患信息
export function findMyLastProblemmodify(proId, type) {
return request({
url: '/manage/problemmodify/findMyLastProblemmodify/' + proId + '?infoType=' + type,
method: 'get'
})
}
// 项目分组查询统计
export function findGroupCountView(proId, type) {
return request({
url: '/manage/problemmodify/getWxGroupCountView/' + proId + '?infoType=' + type,
method: 'get'
})
}

View File

@ -6,7 +6,7 @@ import {
returnList,
readDeployNotes,
findCommentByProcInsId
} from '../../../api/flowable'
} from '../../api/flowable'
import {
editApproveStatus,
findProSubDeptsInfoById,
@ -64,7 +64,7 @@ Page({
index = idx + 1;
}
list.push({
text: item.name.substr(0,5),
text: item.name.substr(0, 5),
desc: ''
});
});
@ -114,7 +114,7 @@ Page({
let files = res.data.eduFilePath.split('/');
res.data.eduFileName = files[files.length - 1];
}
if(res.data.userInfos){
if (res.data.userInfos) {
res.data.userInfos = JSON.parse(res.data.userInfos);
}
this.setData({

View File

@ -2,7 +2,7 @@ import config from '../../../config'
import {
readDeployNotes,
findCommentByProcInsId
} from '../../../api/flowable'
} from '../../api/flowable'
import {
findProSubDeptsInfoById,
findProSubDeptsUserInfoById
@ -58,14 +58,14 @@ Page({
text: '开始'
}];
let index = this.data.active;
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){
index = idx+1;
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) {
index = idx + 1;
}
list.push({
text: item.name.substr(0,5),
text: item.name.substr(0, 5),
desc: ''
});
});
@ -115,7 +115,7 @@ Page({
let files = res.data.eduFilePath.split('/');
res.data.eduFileName = files[files.length - 1];
}
if(res.data.userInfos){
if (res.data.userInfos) {
res.data.userInfos = JSON.parse(res.data.userInfos);
}
this.setData({
@ -328,7 +328,7 @@ Page({
},
//展示图片
showImg:function(e){
showImg: function (e) {
let paths = e.target.dataset.set;
let path = [];
paths.split(',').forEach(url => {

View File

@ -6,7 +6,7 @@ import {
quueryCount,
myAwaitFlowTaskList,
myFinishedFlowTaskList,
} from '../../../api/flowable'
} from '../../api/flowable'
const app = getApp()
Page({

View File

@ -8,7 +8,7 @@ import {
batchComplete,
myAwaitFlowTaskList,
myFinishedFlowTaskList,
} from '../../../api/flowable'
} from '../../api/flowable'
const app = getApp()
Page({
@ -26,8 +26,8 @@ Page({
pageNum: 1,
pageSize: 10,
total: 0,
checkedAll:false,
showChecked:false,
checkedAll: false,
showChecked: false,
imgBaseUrl: config.baseImgUrl
},
@ -62,9 +62,9 @@ Page({
}
});
let userInfo = getUserInfo();
if(userInfo && userInfo.projectUserInfo && userInfo.projectUserInfo.subDeptType=="1"){
if (userInfo && userInfo.projectUserInfo && userInfo.projectUserInfo.subDeptType == "1") {
this.setData({
showChecked:true
showChecked: true
});
}
this.getListData();
@ -175,7 +175,7 @@ Page({
businessKey
} = e.currentTarget.dataset.set
wx.setStorageSync('nav-types', "users");
if (this.data.activeState=="ysh") {
if (this.data.activeState == "ysh") {
//详情页面
wx.redirectTo({
url: `../detailTask/index?taskId=${taskId}&taskName=${taskName}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}`
@ -192,13 +192,13 @@ Page({
* 选中节点
* @param {*} e
*/
selectItem: function(event){
selectItem: function (event) {
let procInsId = event.currentTarget.dataset.set;
console.log("procInsId==>",procInsId)
console.log("procInsId==>", procInsId)
let _listData = this.data.listData;
_listData.forEach(item =>{
if(procInsId==item.procInsId){
item.selected=!item.selected;
_listData.forEach(item => {
if (procInsId == item.procInsId) {
item.selected = !item.selected;
}
})
this.setData({
@ -209,11 +209,11 @@ Page({
/**
* 全选
*/
onCheckedAll(){
onCheckedAll() {
let _checked = !this.data.checkedAll;
let _listData = this.data.listData;
_listData.forEach(item =>{
item.selected=_checked;
_listData.forEach(item => {
item.selected = _checked;
});
this.setData({
listData: _listData,
@ -225,16 +225,16 @@ Page({
* 批量
* 审核通过
*/
onBatchPass(){
onBatchPass() {
let taskIds = [];
let _listData = this.data.listData;
_listData.forEach(item =>{
if(item.selected){
_listData.forEach(item => {
if (item.selected) {
taskIds.push(item.taskId);
}
});
if(taskIds.length==0){
app.toast("请选择要审批的数据项!","none",1500);
if (taskIds.length == 0) {
app.toast("请选择要审批的数据项!", "none", 1500);
return false;
}
let that = this;
@ -253,21 +253,21 @@ Page({
/**
* 提交审批
*/
submitBatchPass(){
submitBatchPass() {
let taskIds = [];
let instanceIds = [];
let _listData = this.data.listData;
_listData.forEach(item =>{
if(item.selected){
_listData.forEach(item => {
if (item.selected) {
taskIds.push(item.taskId);
instanceIds.push(item.procInsId);
}
});
let _data = {
'taskIds':taskIds,
'instanceIds':instanceIds
'taskIds': taskIds,
'instanceIds': instanceIds
}
batchComplete(_data).then(res =>{
batchComplete(_data).then(res => {
app.toast("批量审批通过成功!");
this.onLoad();
});

View File

@ -12,10 +12,10 @@ import {
findDaysAttendanceView,
findUsersAttendanceView,
findSubDeptsAttendanceView
} from '../../api/attendance'
} from '../api/attendance'
import {
findMyTask
} from '../../api/flowable'
} from '../api/flowable'
const app = getApp();
Page({
/**
@ -474,7 +474,7 @@ Page({
// 页签选中事件
selectedTab(e) {
if(e.target.dataset.set!==undefined){
if (e.target.dataset.set !== undefined) {
this.setData({
nactive: e.target.dataset.set,
labourImg: this.data.labourTypeList[e.target.dataset.set].img,
@ -609,9 +609,9 @@ Page({
if (res.code == 200) {
let proUserInfo = this.data.subDeptUserInfo;
this.setData({
todoDb: proUserInfo.subDeptType=="1"?(res.data.dwsh+res.data.rysh):res.data.todo,
aqglDb: proUserInfo.subDeptType=="1"?res.data.aqgl:0,
zlglDb: proUserInfo.subDeptType=="1"?res.data.zlgl:0
todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo,
aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0
})
}
});

View File

@ -7,7 +7,7 @@ import {
} from '../../api/publics'
import {
findMyTask
} from '../../api/flowable'
} from '../api/flowable'
const app = getApp()
Page({

View File

@ -12,7 +12,7 @@ import {
import {
add,
findMyLastProblemmodify
} from '../../../api/problemmodify'
} from '../../api/problemmodify'
const app = getApp()
Page({
@ -21,7 +21,7 @@ Page({
*/
data: {
maxDate: new Date(2088, 1, 1).getTime(),
minDate: new Date().getTime()+(3600*48*1000),
minDate: new Date().getTime() + (3600 * 48 * 1000),
type: "",
typeName: "",
problemTypeList: [],
@ -112,7 +112,7 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(item => {
if(item.remark==type){
if (item.remark == type) {
list.push({
"id": item.dictValue,
"text": item.dictLabel

View File

@ -6,7 +6,7 @@ import {
findInfo,
findAuditInfos,
checkProblemmodify
} from '../../../api/problemmodify'
} from '../../api/problemmodify'
const app = getApp()
Page({
@ -123,7 +123,7 @@ Page({
this.setData({
loadShow: true
});
checkProblemmodify(_form).then(res =>{
checkProblemmodify(_form).then(res => {
this.setData({
loadShow: false
});

View File

@ -12,7 +12,7 @@ import {
import {
addDraft,
findMyLastProblemmodify
} from '../../../api/problemmodify'
} from '../../api/problemmodify'
const app = getApp()
Page({

View File

@ -7,7 +7,7 @@ import {
remove,
findInfo,
findAuditInfos
} from '../../../api/problemmodify'
} from '../../api/problemmodify'
const app = getApp()
Page({

View File

@ -6,7 +6,7 @@ import {
import {
list,
listCount
} from '../../../api/problemmodify'
} from '../../api/problemmodify'
const app = getApp()
Page({

View File

@ -6,7 +6,7 @@ import {
findInfo,
findAuditInfos,
modifyProblemmodify
} from '../../../api/problemmodify'
} from '../../api/problemmodify'
const app = getApp()
Page({

View File

@ -7,10 +7,10 @@ import {
} from '../../api/publics'
import {
findMyTask
} from '../../api/flowable'
} from '../api/flowable'
import {
findGroupCountView
} from '../../api/problemmodify'
} from '../api/problemmodify'
const app = getApp()
Page({
@ -53,7 +53,7 @@ Page({
total: 0, //问题总数
number: 0, //检查次数
}],
showZlyhpcDetail:false
showZlyhpcDetail: false
},
@ -98,8 +98,8 @@ Page({
getUserMenuList: function (proId) {
findUserMenuList(proId, 'zlgl').then(res => {
if (res.code == 200) {
res.data.forEach(item =>{
if(item.menuIdenti=='ZLYHPC'){
res.data.forEach(item => {
if (item.menuIdenti == 'ZLYHPC') {
this.setData({
showZlyhpcDetail: true
})

View File

@ -7,10 +7,10 @@ import {
} from '../../api/publics'
import {
findMyTask
} from '../../api/flowable'
} from '../api/flowable'
import {
findGroupCountView
} from '../../api/problemmodify'
} from '../api/problemmodify'
const app = getApp()
Page({
@ -53,7 +53,7 @@ Page({
total: 0, //问题总数
number: 0, //检查次数
}],
showAqyhpcDetail:false,
showAqyhpcDetail: false,
},
//项目切换 返回值
@ -97,8 +97,8 @@ Page({
getUserMenuList: function (proId) {
findUserMenuList(proId, 'aqgl').then(res => {
if (res.code == 200) {
res.data.forEach(item =>{
if(item.menuIdenti=='AQYHPC'){
res.data.forEach(item => {
if (item.menuIdenti == 'AQYHPC') {
this.setData({
showAqyhpcDetail: true
})

View File

@ -5,7 +5,7 @@ import {
} from '../../../utils/auth'
import {
findMyTask
} from '../../../api/flowable'
} from '../../api/flowable'
import {
planScheduleList
} from '../../../api/project'
@ -29,7 +29,7 @@ Page({
pageSize: 10,
total: 0,
listData: [],
imgBaseUrl:config.baseImgUrl
imgBaseUrl: config.baseImgUrl
},
@ -70,8 +70,8 @@ Page({
},
/**
* 添加进度计划
*/
* 添加进度计划
*/
skipAdd() {
wx.redirectTo({
url: `../add/index`,