开发举牌验收小程序
parent
5c51c1400d
commit
e9653574d6
|
@ -195,6 +195,7 @@ public class SysLoginService
|
||||||
if(Objects.nonNull(user.getActiveProjectName())){
|
if(Objects.nonNull(user.getActiveProjectName())){
|
||||||
userInfo.setProjectName(user.getActiveProjectName());
|
userInfo.setProjectName(user.getActiveProjectName());
|
||||||
}
|
}
|
||||||
|
userInfo.getPermissions().add("wxapp:*:*");
|
||||||
return userInfo;
|
return userInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="isDel != null "> and ppc.is_del = #{isDel}</if>
|
<if test="isDel != null "> and ppc.is_del = #{isDel}</if>
|
||||||
<if test="approveStatus != null and approveStatus != ''"> and ppc.approve_status = #{approveStatus}</if>
|
<if test="approveStatus != null and approveStatus != ''"> and ppc.approve_status = #{approveStatus}</if>
|
||||||
<if test="activeTags != null">
|
<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 test='activeTags == "jwc"'> and ppc.approve_status = '100' and ppc.check_result = '1'</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="remark!=null and remark=='lastWeek'">
|
<if test="remark!=null and remark=='lastWeek'">
|
||||||
|
|
|
@ -29,6 +29,7 @@ public class AuthLogic
|
||||||
/** 所有权限标识 */
|
/** 所有权限标识 */
|
||||||
private static final String ALL_PERMISSION = "*:*:*";
|
private static final String ALL_PERMISSION = "*:*:*";
|
||||||
|
|
||||||
|
private static final String WX_ROLES = "wxapp:*:*";
|
||||||
/** 管理员角色权限标识 */
|
/** 管理员角色权限标识 */
|
||||||
private static final String SUPER_ADMIN = "admin";
|
private static final String SUPER_ADMIN = "admin";
|
||||||
|
|
||||||
|
@ -356,7 +357,7 @@ public class AuthLogic
|
||||||
public boolean hasPermi(Collection<String> authorities, String permission)
|
public boolean hasPermi(Collection<String> authorities, String permission)
|
||||||
{
|
{
|
||||||
return authorities.stream().filter(StringUtils::hasText)
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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']
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
]
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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样式"
|
||||||
|
}
|
||||||
|
}
|
|
@ -2027,13 +2027,14 @@ swiper-item video {
|
||||||
.top-5 {
|
.top-5 {
|
||||||
margin-top: -5rpx;
|
margin-top: -5rpx;
|
||||||
}
|
}
|
||||||
.in-img-div image{
|
|
||||||
|
.in-img-div image {
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
height: 180rpx;
|
height: 180rpx;
|
||||||
padding-right: 15rpx;
|
padding-right: 15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markers{
|
.markers {
|
||||||
background: url("https://xiangguan.sxyanzhu.com/profile/icon/req.png") no-repeat left/40rpx;
|
background: url("https://xiangguan.sxyanzhu.com/profile/icon/req.png") no-repeat left/40rpx;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -2051,6 +2052,6 @@ swiper-item video {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.txtb{
|
.txtb {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
// 应用全局配置
|
// 应用全局配置
|
||||||
module.exports = {
|
module.exports = {
|
||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
appId: "wx46466c7828eede2b",
|
appId: "wx46466c7828eede2b",
|
||||||
baseUrl: 'https://xiangguan.sxyanzhu.com/wechat',
|
//baseUrl: 'https://xiangguan.sxyanzhu.com/wechat',
|
||||||
//baseUrl: 'http://127.0.0.1:8080',
|
baseUrl: 'http://127.0.0.1:8080',
|
||||||
baseImgUrl: 'https://xiangguan.sxyanzhu.com',
|
baseImgUrl: 'https://xiangguan.sxyanzhu.com',
|
||||||
//baseImgUrl: 'http://127.0.0.1:9300',
|
//baseImgUrl: 'http://127.0.0.1:9300',
|
||||||
noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin']
|
noSecuritys: ['/code', '/auth/wxLogin', '/auth/getMaOpenId', '/auth/getMaPhoneNumber', '/auth/maLogin']
|
||||||
};
|
};
|
|
@ -4,8 +4,8 @@ import {
|
||||||
getUserInfo
|
getUserInfo
|
||||||
} from '../../../utils/auth'
|
} from '../../../utils/auth'
|
||||||
import {
|
import {
|
||||||
projectCheckedList,
|
projectCheckedList,
|
||||||
projectCheckedListCount
|
projectCheckedListCount
|
||||||
} from '../../../api/project'
|
} from '../../../api/project'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
@ -27,7 +27,9 @@ Page({
|
||||||
jxzCount: 0,
|
jxzCount: 0,
|
||||||
ywcCount: 0,
|
ywcCount: 0,
|
||||||
imgBaseUrl: config.baseImgUrl,
|
imgBaseUrl: config.baseImgUrl,
|
||||||
projectUserInfo: {}
|
projectUserInfo: {},
|
||||||
|
isTechnician: false,//是否是技术员
|
||||||
|
isGroup: false,//是否是班组长
|
||||||
},
|
},
|
||||||
|
|
||||||
//项目切换 返回值
|
//项目切换 返回值
|
||||||
|
@ -48,6 +50,7 @@ Page({
|
||||||
url: '../../../pages/login/login',
|
url: '../../../pages/login/login',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.data.isTechnician = app.globalData.userData.isTechnician
|
||||||
const proUserInfo = getUserInfo();
|
const proUserInfo = getUserInfo();
|
||||||
this.setData({
|
this.setData({
|
||||||
addFlag: proUserInfo.projectUserInfo.subDeptType == "1",
|
addFlag: proUserInfo.projectUserInfo.subDeptType == "1",
|
||||||
|
@ -61,8 +64,10 @@ Page({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
listData: [],
|
listData: [],
|
||||||
total: 0
|
total: 0,
|
||||||
|
isGroup: proUserInfo.projectUserInfo.userPost == "3"
|
||||||
});
|
});
|
||||||
|
|
||||||
this.getListData(this.data.activeState);
|
this.getListData(this.data.activeState);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -74,7 +79,6 @@ Page({
|
||||||
url: `../add/index`,
|
url: `../add/index`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getInfo(e) {
|
getInfo(e) {
|
||||||
let {
|
let {
|
||||||
id,
|
id,
|
||||||
|
@ -103,7 +107,11 @@ Page({
|
||||||
* 查询项目举牌验收数据
|
* 查询项目举牌验收数据
|
||||||
*/
|
*/
|
||||||
getListData(activeState) {
|
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 => {
|
projectCheckedList(params).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.setData({
|
this.setData({
|
||||||
|
@ -115,12 +123,12 @@ Page({
|
||||||
// 统计列表
|
// 统计列表
|
||||||
projectCheckedListCount(params).then(res => {
|
projectCheckedListCount(params).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let _qb=0,_jxz=0,_ywc=0;
|
let _qb = 0, _jxz = 0, _ywc = 0;
|
||||||
res.data.forEach(item =>{
|
res.data.forEach(item => {
|
||||||
if(item.approve_status=='100' && item.check_result=='1'){
|
if (item.approve_status == '100' && item.check_result == '1') {
|
||||||
_qb += item.total;
|
_qb += item.total;
|
||||||
_ywc += item.total;
|
_ywc += item.total;
|
||||||
}else{
|
} else {
|
||||||
_qb += item.total;
|
_qb += item.total;
|
||||||
_jxz += item.total;
|
_jxz += item.total;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"usingComponents": {},
|
"usingComponents": {},
|
||||||
"navigationStyle":"custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
|
@ -14,22 +14,22 @@
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
<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=='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=='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 class="{{activeState=='ywc'?'active':''}}" bindtap="trainJump" data-index="3"><text>已完成({{ywcCount}})</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_max_scroll">
|
<view class="inspect_max_scroll">
|
||||||
<!--专项检查样式zxjc-->
|
<!--专项检查样式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_for_bgd">
|
||||||
<view class="inspect_list_title">
|
<view class="inspect_list_title">
|
||||||
<view class="inspect_list_title_label inspect_list_title_width">
|
<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">
|
<view class="module_title module_title_flex inspect_list_title_text_2">
|
||||||
{{item.createTime}}
|
{{item.createTime}}
|
||||||
</view>
|
</view>
|
||||||
<text class="timeline_for_state_1">常规验收</text>
|
<!-- <text class="timeline_for_state_1">常规验收</text> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_list_info">
|
<view class="inspect_list_info">
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<view style="color: #a5abbb;">暂无数据</view>
|
<view style="color: #a5abbb;">暂无数据</view>
|
||||||
</view>
|
</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;">
|
<view style="padding-top: 22rpx;">
|
||||||
<image src="/images/new_add.png"></image>
|
<image src="/images/new_add.png"></image>
|
||||||
<view>新增</view>
|
<view>新增</view>
|
||||||
|
|
|
@ -78,7 +78,7 @@ Page({
|
||||||
getMaOpenId: function () {
|
getMaOpenId: function () {
|
||||||
wx.login({
|
wx.login({
|
||||||
success: res => {
|
success: res => {
|
||||||
getMaOpenId({'code':res.code}).then(response => {
|
getMaOpenId({ 'code': res.code }).then(response => {
|
||||||
setOpenId(response.data.openid);
|
setOpenId(response.data.openid);
|
||||||
setSessionKey(response.data.sessionKey);
|
setSessionKey(response.data.sessionKey);
|
||||||
});
|
});
|
||||||
|
@ -135,18 +135,18 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
getPhoneNumber(e) {
|
getPhoneNumber(e) {
|
||||||
if(e.detail.code){
|
if (e.detail.code) {
|
||||||
let data = {
|
let data = {
|
||||||
openId:getOpenId(),
|
openId: getOpenId(),
|
||||||
sessionKey:getSessionKey(),
|
sessionKey: getSessionKey(),
|
||||||
iv: e.detail.iv,
|
iv: e.detail.iv,
|
||||||
encryptedData: e.detail.encryptedData
|
encryptedData: e.detail.encryptedData
|
||||||
}
|
}
|
||||||
maLogin(data).then(res =>{
|
maLogin(data).then(res => {
|
||||||
setToken(res.data.access_token);
|
setToken(res.data.access_token);
|
||||||
this.getUserInfoByCache();
|
this.getUserInfoByCache();
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
//用户决绝授权
|
//用户决绝授权
|
||||||
app.toast("请允许微信手机号一键登录");
|
app.toast("请允许微信手机号一键登录");
|
||||||
}
|
}
|
||||||
|
@ -158,8 +158,9 @@ Page({
|
||||||
* @param {*} e
|
* @param {*} e
|
||||||
*/
|
*/
|
||||||
getUserInfoByCache: function () {
|
getUserInfoByCache: function () {
|
||||||
findUserInfoByCache().then(res=>{
|
findUserInfoByCache().then(res => {
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
|
res.user.isTechnician = (res.user.roles || []).find(role => role.roleKey.indexOf("zbjsy_") >= 0) != null;
|
||||||
setUserInfo(res.user);
|
setUserInfo(res.user);
|
||||||
app.globalData.userData = res.user;
|
app.globalData.userData = res.user;
|
||||||
this.getMyProjectList();
|
this.getMyProjectList();
|
||||||
|
@ -173,15 +174,15 @@ Page({
|
||||||
* 根据项目配置进入不同页面...
|
* 根据项目配置进入不同页面...
|
||||||
*/
|
*/
|
||||||
getMyProjectList: function () {
|
getMyProjectList: function () {
|
||||||
findMyProjectList().then(res=>{
|
findMyProjectList().then(res => {
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
app.globalData.projectInfoList = res.rows;
|
app.globalData.projectInfoList = res.rows;
|
||||||
if(res.rows.length>0){
|
if (res.rows.length > 0) {
|
||||||
if(res.rows.length==1){
|
if (res.rows.length == 1) {
|
||||||
app.globalData.useProjectId = res.rows[0].id;
|
app.globalData.useProjectId = res.rows[0].id;
|
||||||
app.globalData.useProjectName = res.rows[0].projectName;
|
app.globalData.useProjectName = res.rows[0].projectName;
|
||||||
findProSubDeptsUserInfo(app.globalData.useProjectId).then(detail=>{
|
findProSubDeptsUserInfo(app.globalData.useProjectId).then(detail => {
|
||||||
if(detail.code==200){
|
if (detail.code == 200) {
|
||||||
let userInfo = getUserInfo();
|
let userInfo = getUserInfo();
|
||||||
userInfo.projectUserInfo = detail.data;
|
userInfo.projectUserInfo = detail.data;
|
||||||
setUserInfo(userInfo);
|
setUserInfo(userInfo);
|
||||||
|
@ -191,13 +192,13 @@ Page({
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
//多项目进入项目切换页面
|
//多项目进入项目切换页面
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../../pageage/project_list/index',
|
url: '../../pageage/project_list/index',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
app.toast("未查询到当前用户项目,信息审核中或人员已离场");
|
app.toast("未查询到当前用户项目,信息审核中或人员已离场");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1731,31 +1731,7 @@ Page({
|
||||||
app.toast("请选择文化程度!");
|
app.toast("请选择文化程度!");
|
||||||
return false;
|
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;
|
let that = this;
|
||||||
//弹出确认
|
|
||||||
wx.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '是否确认保存单位人员信息登记?',
|
|
||||||
success: function (sm) {
|
|
||||||
if (sm.confirm) {
|
|
||||||
that.submitSubUserForm();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2059,7 +2035,7 @@ Page({
|
||||||
* 重新登记
|
* 重新登记
|
||||||
*/
|
*/
|
||||||
wxSignBack() {
|
wxSignBack() {
|
||||||
let _form = {
|
let _form = {
|
||||||
subDeptType: null,
|
subDeptType: null,
|
||||||
craftType: null,
|
craftType: null,
|
||||||
craftPost: null,
|
craftPost: null,
|
||||||
|
@ -2071,7 +2047,7 @@ Page({
|
||||||
};
|
};
|
||||||
let _subDeptNameTemp = this.data.form.subDeptName;
|
let _subDeptNameTemp = this.data.form.subDeptName;
|
||||||
this.setData({
|
this.setData({
|
||||||
form:_form,
|
form: _form,
|
||||||
active: 0,
|
active: 0,
|
||||||
"parForm.subDeptName": _subDeptNameTemp
|
"parForm.subDeptName": _subDeptNameTemp
|
||||||
});
|
});
|
||||||
|
@ -2085,6 +2061,7 @@ Page({
|
||||||
getUserInfoByCache: function () {
|
getUserInfoByCache: function () {
|
||||||
findUserInfoByCache().then(res => {
|
findUserInfoByCache().then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
res.user.isTechnician = (res.user.roles || []).find(role => role.roleKey.indexOf("zbjsy_") >= 0) != null;
|
||||||
setUserInfo(res.user);
|
setUserInfo(res.user);
|
||||||
app.globalData.userData = res.user;
|
app.globalData.userData = res.user;
|
||||||
this.getMyProjectList();
|
this.getMyProjectList();
|
||||||
|
@ -2162,9 +2139,9 @@ Page({
|
||||||
handleOpenPrivacyContract() {
|
handleOpenPrivacyContract() {
|
||||||
// 打开隐私协议页面
|
// 打开隐私协议页面
|
||||||
wx.openPrivacyContract({
|
wx.openPrivacyContract({
|
||||||
success: () => {}, // 打开成功
|
success: () => { }, // 打开成功
|
||||||
fail: () => {}, // 打开失败
|
fail: () => { }, // 打开失败
|
||||||
complete: () => {}
|
complete: () => { }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
|
@ -1,30 +1,41 @@
|
||||||
{
|
{
|
||||||
"appid": "wx46466c7828eede2b",
|
"appid": "wx46466c7828eede2b",
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram",
|
||||||
"libVersion": "3.8.9",
|
"libVersion": "3.8.9",
|
||||||
"packOptions": {
|
"packOptions": {
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"include": []
|
"include": []
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"coverView": true,
|
||||||
|
"es6": true,
|
||||||
|
"postcss": true,
|
||||||
|
"minified": true,
|
||||||
|
"enhance": true,
|
||||||
|
"showShadowRootInWxmlPanel": true,
|
||||||
|
"packNpmRelationList": [],
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
},
|
},
|
||||||
"setting": {
|
"condition": false,
|
||||||
"coverView": true,
|
"compileWorklet": false,
|
||||||
"es6": true,
|
"uglifyFileName": false,
|
||||||
"postcss": true,
|
"uploadWithSourceMap": true,
|
||||||
"minified": true,
|
"packNpmManually": false,
|
||||||
"enhance": true,
|
"minifyWXSS": true,
|
||||||
"showShadowRootInWxmlPanel": true,
|
"minifyWXML": true,
|
||||||
"packNpmRelationList": [],
|
"localPlugins": false,
|
||||||
"babelSetting": {
|
"disableUseStrict": false,
|
||||||
"ignore": [],
|
"useCompilerPlugins": false,
|
||||||
"disablePlugins": [],
|
"swc": false,
|
||||||
"outputPath": ""
|
"disableSWC": true
|
||||||
},
|
},
|
||||||
"condition": false
|
"condition": {},
|
||||||
},
|
"editorSetting": {
|
||||||
"condition": {},
|
"tabIndent": "auto",
|
||||||
"editorSetting": {
|
"tabSize": 4
|
||||||
"tabIndent": "auto",
|
},
|
||||||
"tabSize": 4
|
"simulatorPluginLibVersion": {}
|
||||||
},
|
|
||||||
"simulatorPluginLibVersion": {}
|
|
||||||
}
|
}
|
|
@ -1,28 +1,43 @@
|
||||||
{
|
{
|
||||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
"projectname": "miniprogram",
|
"projectname": "miniprogram",
|
||||||
"setting": {
|
"setting": {
|
||||||
"compileHotReLoad": true,
|
"compileHotReLoad": true,
|
||||||
"urlCheck": false
|
"urlCheck": false,
|
||||||
},
|
"coverView": true,
|
||||||
"condition": {
|
"lazyloadPlaceholderEnable": false,
|
||||||
"miniprogram": {
|
"skylineRenderEnable": false,
|
||||||
"list": [
|
"preloadBackgroundData": false,
|
||||||
{
|
"autoAudits": false,
|
||||||
"name": "pages/project_qr/index",
|
"useApiHook": true,
|
||||||
"pathName": "pages/project_qr/index",
|
"useApiHostProcess": true,
|
||||||
"query": "QRPID=133&SIGID=3&PARID=109",
|
"showShadowRootInWxmlPanel": true,
|
||||||
"launchMode": "default",
|
"useStaticServer": false,
|
||||||
"scene": null
|
"useLanDebug": false,
|
||||||
},
|
"showES6CompileOption": false,
|
||||||
{
|
"checkInvalidKey": true,
|
||||||
"name": "",
|
"ignoreDevUnusedFiles": true,
|
||||||
"pathName": "pages/login/login",
|
"bigPackageSizeSupport": false
|
||||||
"query": "proId=1",
|
},
|
||||||
"launchMode": "default",
|
"condition": {
|
||||||
"scene": null
|
"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"
|
||||||
}
|
}
|
Loading…
Reference in New Issue