开发举牌验收小程序

dev_xd
lj7788@126.com 2025-08-01 18:25:02 +08:00
parent 5c51c1400d
commit e9653574d6
19 changed files with 1098 additions and 832 deletions

View File

@ -195,6 +195,7 @@ public class SysLoginService
if(Objects.nonNull(user.getActiveProjectName())){
userInfo.setProjectName(user.getActiveProjectName());
}
userInfo.getPermissions().add("wxapp:*:*");
return userInfo;
}

File diff suppressed because it is too large Load Diff

View File

@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null "> and ppc.is_del = #{isDel}</if>
<if test="approveStatus != null and approveStatus != ''"> and ppc.approve_status = #{approveStatus}</if>
<if test="activeTags != null">
<if test='activeTags == "jxz"'> and (ppc.approve_status != '100' or ppc.check_result is null or ppc.check_result != '1')</if>
<if test='activeTags == "jxz"'> and not (ppc.approve_status = '100' and ppc.check_result = '1')</if>
<if test='activeTags == "jwc"'> and ppc.approve_status = '100' and ppc.check_result = '1'</if>
</if>
<if test="remark!=null and remark=='lastWeek'">

View File

@ -29,6 +29,7 @@ public class AuthLogic
/** 所有权限标识 */
private static final String ALL_PERMISSION = "*:*:*";
private static final String WX_ROLES = "wxapp:*:*";
/** 管理员角色权限标识 */
private static final String SUPER_ADMIN = "admin";
@ -356,7 +357,7 @@ public class AuthLogic
public boolean hasPermi(Collection<String> authorities, String permission)
{
return authorities.stream().filter(StringUtils::hasText)
.anyMatch(x -> ALL_PERMISSION.contains(x) || PatternMatchUtils.simpleMatch(x, permission));
.anyMatch(x -> ALL_PERMISSION.contains(x) || WX_ROLES.contains(x) || PatternMatchUtils.simpleMatch(x, permission));
}
/**

View File

@ -0,0 +1,47 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'eslint:recommended'
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module'
},
globals: {
// 微信小程序全局变量
App: 'readonly',
Page: 'readonly',
Component: 'readonly',
Behavior: 'readonly',
wx: 'readonly',
getApp: 'readonly',
getCurrentPages: 'readonly',
// 支付宝小程序全局变量
my: 'readonly',
// 百度小程序全局变量
swan: 'readonly',
// 字节跳动小程序全局变量
tt: 'readonly',
// QQ小程序全局变量
qq: 'readonly',
// 通用小程序全局变量
uni: 'readonly'
},
rules: {
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'no-unused-vars': ['warn'],
'no-console': ['warn']
}
}

View File

@ -0,0 +1,10 @@
{
"recommendations": [
"coderfee.minapp-snippet",
"qiu8310.minapp-vscode",
"mrmlnc.vscode-json",
"formulahendry.auto-rename-tag",
"bradlc.vscode-tailwindcss",
"ms-vscode.vscode-json"
]
}

View File

@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "微信小程序调试",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/miniprogram/app.js",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**"],
"preLaunchTask": "miniprogram-dev"
}
]
}

View File

@ -0,0 +1,26 @@
{
"files.associations": {
"*.wxml": "xml",
"*.wxss": "css",
"*.wxs": "javascript"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"minapp-vscode.disableAutoConfig": false,
"minapp-vscode.formatMaxLineCharacters": 120,
"minapp-vscode.format.bracketSpacing": true,
"minapp-vscode.format.semicolon": false,
"minapp-vscode.format.singleQuote": true,
"minapp-vscode.format.printWidth": 100,
"minapp-vscode.format.useTabs": false,
"minapp-vscode.disableCustomComponentAutocompletion": false,
"minapp-vscode.disableAutoWxssCompelte": false
}

View File

@ -0,0 +1,34 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "miniprogram-dev",
"type": "shell",
"command": "echo",
"args": ["启动微信小程序开发模式"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
}
},
{
"label": "miniprogram-build",
"type": "shell",
"command": "echo",
"args": ["构建微信小程序"],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
}
}
]
}

View File

@ -0,0 +1,77 @@
{
"Page": {
"prefix": "page",
"body": [
"Page({",
" data: {",
" $1",
" },",
" onLoad(options) {",
" $2",
" },",
" onReady() {",
" $3",
" },",
" onShow() {",
" $4",
" },",
" onHide() {",
" $5",
" },",
" onUnload() {",
" $6",
" }",
"})"
],
"description": "创建小程序Page页面"
},
"Component": {
"prefix": "component",
"body": [
"Component({",
" properties: {",
" $1",
" },",
" data: {",
" $2",
" },",
" methods: {",
" $3",
" },",
" lifetimes: {",
" attached() {",
" $4",
" },",
" detached() {",
" $5",
" }",
" }",
"})"
],
"description": "创建小程序Component组件"
},
"WXML Template": {
"prefix": "wxml",
"body": [
"<view class='container'>",
" <text>{{title}}</text>",
" $1",
"</view>"
],
"description": "创建WXML模板"
},
"WXSS Style": {
"prefix": "wxss",
"body": [
".container {",
" display: flex;",
" flex-direction: column;",
" align-items: center;",
" justify-content: center;",
" padding: 20rpx;",
" $1",
"}"
],
"description": "创建WXSS样式"
}
}

View File

@ -2027,13 +2027,14 @@ swiper-item video {
.top-5 {
margin-top: -5rpx;
}
.in-img-div image{
.in-img-div image {
width: 180rpx;
height: 180rpx;
padding-right: 15rpx;
}
.markers{
.markers {
background: url("https://xiangguan.sxyanzhu.com/profile/icon/req.png") no-repeat left/40rpx;
height: 20px;
line-height: 20px;
@ -2051,6 +2052,6 @@ swiper-item video {
padding: 0 30rpx;
}
.txtb{
.txtb {
font-weight: 600;
}
}

View File

@ -1,10 +1,10 @@
// 应用全局配置
module.exports = {
timeout: 60000,
appId: "wx46466c7828eede2b",
baseUrl: 'https://xiangguan.sxyanzhu.com/wechat',
//baseUrl: 'http://127.0.0.1:8080',
baseImgUrl: 'https://xiangguan.sxyanzhu.com',
//baseImgUrl: 'http://127.0.0.1:9300',
noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin']
timeout: 60000,
appId: "wx46466c7828eede2b",
//baseUrl: 'https://xiangguan.sxyanzhu.com/wechat',
baseUrl: 'http://127.0.0.1:8080',
baseImgUrl: 'https://xiangguan.sxyanzhu.com',
//baseImgUrl: 'http://127.0.0.1:9300',
noSecuritys: ['/code', '/auth/wxLogin', '/auth/getMaOpenId', '/auth/getMaPhoneNumber', '/auth/maLogin']
};

View File

@ -4,8 +4,8 @@ import {
getUserInfo
} from '../../../utils/auth'
import {
projectCheckedList,
projectCheckedListCount
projectCheckedList,
projectCheckedListCount
} from '../../../api/project'
const app = getApp()
Page({
@ -27,7 +27,9 @@ Page({
jxzCount: 0,
ywcCount: 0,
imgBaseUrl: config.baseImgUrl,
projectUserInfo: {}
projectUserInfo: {},
isTechnician: false,//是否是技术员
isGroup: false,//是否是班组长
},
//项目切换 返回值
@ -48,6 +50,7 @@ Page({
url: '../../../pages/login/login',
})
}
this.data.isTechnician = app.globalData.userData.isTechnician
const proUserInfo = getUserInfo();
this.setData({
addFlag: proUserInfo.projectUserInfo.subDeptType == "1",
@ -61,8 +64,10 @@ Page({
pageNum: 1,
pageSize: 10,
listData: [],
total: 0
total: 0,
isGroup: proUserInfo.projectUserInfo.userPost == "3"
});
this.getListData(this.data.activeState);
},
@ -74,7 +79,6 @@ Page({
url: `../add/index`,
})
},
getInfo(e) {
let {
id,
@ -103,7 +107,11 @@ Page({
* 查询项目举牌验收数据
*/
getListData(activeState) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "activeTags=" + activeState;
let params = `pageNum=${this.data.pageNum}&pageSize=${this.data.pageSize}&projectId=${app.globalData.useProjectId}&activeTags=${activeState}`
if (this.isGroup) {
params += `&groupDeptUser=${this.data.projectUserInfo.userPhone}`
}
projectCheckedList(params).then(res => {
if (res.code == 200) {
this.setData({
@ -115,12 +123,12 @@ Page({
// 统计列表
projectCheckedListCount(params).then(res => {
if (res.code == 200) {
let _qb=0,_jxz=0,_ywc=0;
res.data.forEach(item =>{
if(item.approve_status=='100' && item.check_result=='1'){
let _qb = 0, _jxz = 0, _ywc = 0;
res.data.forEach(item => {
if (item.approve_status == '100' && item.check_result == '1') {
_qb += item.total;
_ywc += item.total;
}else{
} else {
_qb += item.total;
_jxz += item.total;
}

View File

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

View File

@ -14,22 +14,22 @@
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view wx:if="{{projectUserInfo.subDeptType=='1'}}" class="modify_video_nav" style="margin-top: 5rpx;">
<view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='qb'?'active':''}}" bindtap="trainJump" data-index="1"><text>全部({{qbCount}}</text></view>
<view class="{{activeState=='jxz'?'active':''}}" bindtap="trainJump" data-index="2"><text>进行中({{jxzCount}}</text></view>
<view class="{{activeState=='ywc'?'active':''}}" bindtap="trainJump" data-index="3"><text>已完成({{ywcCount}}</text></view>
</view>
<view class="inspect_max_scroll">
<!--专项检查样式zxjc-->
<view class="inspect_for_scroll" v-if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
<view class="inspect_for_scroll" wx:if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="inspect_list_title_number">{{index < 10 ? '0' + (index+1) : index+1}}</view>
<view class="module_title module_title_flex inspect_list_title_text_2">
{{item.createTime}}
</view>
<text class="timeline_for_state_1">常规验收</text>
<!-- <text class="timeline_for_state_1">常规验收</text> -->
</view>
</view>
<view class="inspect_list_info">
@ -59,7 +59,7 @@
<view style="color: #a5abbb;">暂无数据</view>
</view>
</view>
<view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd">
<view wx:if="{{isGroup}}" class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image>
<view>新增</view>

View File

@ -78,7 +78,7 @@ Page({
getMaOpenId: function () {
wx.login({
success: res => {
getMaOpenId({'code':res.code}).then(response => {
getMaOpenId({ 'code': res.code }).then(response => {
setOpenId(response.data.openid);
setSessionKey(response.data.sessionKey);
});
@ -135,18 +135,18 @@ Page({
},
getPhoneNumber(e) {
if(e.detail.code){
if (e.detail.code) {
let data = {
openId:getOpenId(),
sessionKey:getSessionKey(),
openId: getOpenId(),
sessionKey: getSessionKey(),
iv: e.detail.iv,
encryptedData: e.detail.encryptedData
}
maLogin(data).then(res =>{
maLogin(data).then(res => {
setToken(res.data.access_token);
this.getUserInfoByCache();
})
}else{
} else {
//用户决绝授权
app.toast("请允许微信手机号一键登录");
}
@ -158,8 +158,9 @@ Page({
* @param {*} e
*/
getUserInfoByCache: function () {
findUserInfoByCache().then(res=>{
if(res.code==200){
findUserInfoByCache().then(res => {
if (res.code == 200) {
res.user.isTechnician = (res.user.roles || []).find(role => role.roleKey.indexOf("zbjsy_") >= 0) != null;
setUserInfo(res.user);
app.globalData.userData = res.user;
this.getMyProjectList();
@ -173,15 +174,15 @@ Page({
* 根据项目配置进入不同页面...
*/
getMyProjectList: function () {
findMyProjectList().then(res=>{
if(res.code==200){
findMyProjectList().then(res => {
if (res.code == 200) {
app.globalData.projectInfoList = res.rows;
if(res.rows.length>0){
if(res.rows.length==1){
if (res.rows.length > 0) {
if (res.rows.length == 1) {
app.globalData.useProjectId = res.rows[0].id;
app.globalData.useProjectName = res.rows[0].projectName;
findProSubDeptsUserInfo(app.globalData.useProjectId).then(detail=>{
if(detail.code==200){
findProSubDeptsUserInfo(app.globalData.useProjectId).then(detail => {
if (detail.code == 200) {
let userInfo = getUserInfo();
userInfo.projectUserInfo = detail.data;
setUserInfo(userInfo);
@ -191,13 +192,13 @@ Page({
})
}
});
}else{
} else {
//多项目进入项目切换页面
wx.redirectTo({
url: '../../pageage/project_list/index',
})
}
}else{
} else {
app.toast("未查询到当前用户项目,信息审核中或人员已离场");
return false;
}

View File

@ -1731,31 +1731,7 @@ Page({
app.toast("请选择文化程度!");
return false;
}
if (false) {
if (!form.bankName) {
app.toast("请填写开户银行名称!");
return false;
}
if (!form.bankOffice) {
app.toast("请填写开户银行网点!");
return false;
}
if (!form.bankCardNo) {
app.toast("请填写工资银行卡号!");
return false;
}
}
let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认保存单位人员信息登记?',
success: function (sm) {
if (sm.confirm) {
that.submitSubUserForm();
}
}
})
},
/**
@ -2059,7 +2035,7 @@ Page({
* 重新登记
*/
wxSignBack() {
let _form = {
let _form = {
subDeptType: null,
craftType: null,
craftPost: null,
@ -2071,7 +2047,7 @@ Page({
};
let _subDeptNameTemp = this.data.form.subDeptName;
this.setData({
form:_form,
form: _form,
active: 0,
"parForm.subDeptName": _subDeptNameTemp
});
@ -2085,6 +2061,7 @@ Page({
getUserInfoByCache: function () {
findUserInfoByCache().then(res => {
if (res.code == 200) {
res.user.isTechnician = (res.user.roles || []).find(role => role.roleKey.indexOf("zbjsy_") >= 0) != null;
setUserInfo(res.user);
app.globalData.userData = res.user;
this.getMyProjectList();
@ -2162,9 +2139,9 @@ Page({
handleOpenPrivacyContract() {
// 打开隐私协议页面
wx.openPrivacyContract({
success: () => {}, // 打开成功
fail: () => {}, // 打开失败
complete: () => {}
success: () => { }, // 打开成功
fail: () => { }, // 打开失败
complete: () => { }
})
}
})

View File

@ -1,30 +1,41 @@
{
"appid": "wx46466c7828eede2b",
"compileType": "miniprogram",
"libVersion": "3.8.9",
"packOptions": {
"ignore": [],
"include": []
"appid": "wx46466c7828eede2b",
"compileType": "miniprogram",
"libVersion": "3.8.9",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"setting": {
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"condition": false
},
"condition": {},
"editorSetting": {
"tabIndent": "auto",
"tabSize": 4
},
"simulatorPluginLibVersion": {}
"condition": false,
"compileWorklet": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"packNpmManually": false,
"minifyWXSS": true,
"minifyWXML": true,
"localPlugins": false,
"disableUseStrict": false,
"useCompilerPlugins": false,
"swc": false,
"disableSWC": true
},
"condition": {},
"editorSetting": {
"tabIndent": "auto",
"tabSize": 4
},
"simulatorPluginLibVersion": {}
}

View File

@ -1,28 +1,43 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "miniprogram",
"setting": {
"compileHotReLoad": true,
"urlCheck": false
},
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/project_qr/index",
"pathName": "pages/project_qr/index",
"query": "QRPID=133&SIGID=3&PARID=109",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/login/login",
"query": "proId=1",
"launchMode": "default",
"scene": null
}
]
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "miniprogram",
"setting": {
"compileHotReLoad": true,
"urlCheck": false,
"coverView": true,
"lazyloadPlaceholderEnable": false,
"skylineRenderEnable": false,
"preloadBackgroundData": false,
"autoAudits": false,
"useApiHook": true,
"useApiHostProcess": true,
"showShadowRootInWxmlPanel": true,
"useStaticServer": false,
"useLanDebug": false,
"showES6CompileOption": false,
"checkInvalidKey": true,
"ignoreDevUnusedFiles": true,
"bigPackageSizeSupport": false
},
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/project_qr/index",
"pathName": "pages/project_qr/index",
"query": "QRPID=133&SIGID=3&PARID=109",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/login/login",
"query": "proId=1",
"launchMode": "default",
"scene": null
}
]
}
},
"libVersion": "3.8.9"
}