diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 13566b8..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/construction.iml b/.idea/construction.iml
deleted file mode 100644
index d6ebd48..0000000
--- a/.idea/construction.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 22b3b03..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1dd..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cloudfunctions/callback/config.json b/cloudfunctions/callback/config.json
deleted file mode 100644
index 43aa5fc..0000000
--- a/cloudfunctions/callback/config.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "permissions": {
- "openapi": [
- "customerServiceMessage.send"
- ]
- }
-}
\ No newline at end of file
diff --git a/cloudfunctions/callback/index.js b/cloudfunctions/callback/index.js
deleted file mode 100644
index c80f887..0000000
--- a/cloudfunctions/callback/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-const cloud = require('wx-server-sdk')
-
-cloud.init({
- // API 调用都保持和云函数当前所在环境一致
- env: cloud.DYNAMIC_CURRENT_ENV
-})
-
-// 云函数入口函数
-exports.main = async (event, context) => {
-
- console.log(event)
-
- const { OPENID } = cloud.getWXContext()
-
- const result = await cloud.openapi.customerServiceMessage.send({
- touser: OPENID,
- msgtype: 'text',
- text: {
- content: '收到:' + event.Content,
- }
- })
-
- console.log(result)
-
- return result
-}
diff --git a/cloudfunctions/callback/package.json b/cloudfunctions/callback/package.json
deleted file mode 100644
index dd8f14a..0000000
--- a/cloudfunctions/callback/package.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "callback",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "",
- "license": "ISC",
- "dependencies": {
- "wx-server-sdk": "~2.1.2"
- }
-}
\ No newline at end of file
diff --git a/cloudfunctions/echo/config.json b/cloudfunctions/echo/config.json
deleted file mode 100644
index 16348ce..0000000
--- a/cloudfunctions/echo/config.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "permissions": {
- "openapi": []
- }
-}
diff --git a/cloudfunctions/echo/index.js b/cloudfunctions/echo/index.js
deleted file mode 100644
index 4f83878..0000000
--- a/cloudfunctions/echo/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-const cloud = require('wx-server-sdk')
-
-exports.main = async (event, context) => {
- // event.userInfo 是已废弃的保留字段,在此不做展示
- // 获取 OPENID 等微信上下文请使用 cloud.getWXContext()
- delete event.userInfo
- return event
-}
diff --git a/cloudfunctions/echo/package.json b/cloudfunctions/echo/package.json
deleted file mode 100644
index 1e62da3..0000000
--- a/cloudfunctions/echo/package.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "echo",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "",
- "license": "ISC",
- "dependencies": {
- "wx-server-sdk": "~2.1.2"
- }
-}
\ No newline at end of file
diff --git a/cloudfunctions/login/config.json b/cloudfunctions/login/config.json
deleted file mode 100644
index 16348ce..0000000
--- a/cloudfunctions/login/config.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "permissions": {
- "openapi": []
- }
-}
diff --git a/cloudfunctions/login/index.js b/cloudfunctions/login/index.js
deleted file mode 100644
index 46c44aa..0000000
--- a/cloudfunctions/login/index.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// 云函数模板
-// 部署:在 cloud-functions/login 文件夹右击选择 “上传并部署”
-
-const cloud = require('wx-server-sdk')
-
-// 初始化 cloud
-cloud.init({
- // API 调用都保持和云函数当前所在环境一致
- env: cloud.DYNAMIC_CURRENT_ENV
-})
-
-/**
- * 这个示例将经自动鉴权过的小程序用户 openid 返回给小程序端
- *
- * event 参数包含小程序端调用传入的 data
- *
- */
-exports.main = async (event, context) => {
- console.log(event)
- console.log(context)
-
- // 可执行其他自定义逻辑
- // console.log 的内容可以在云开发云函数调用日志查看
-
- // 获取 WX Context (微信调用上下文),包括 OPENID、APPID、及 UNIONID(需满足 UNIONID 获取条件)等信息
- const wxContext = cloud.getWXContext()
-
- return {
- event,
- openid: wxContext.OPENID,
- appid: wxContext.APPID,
- unionid: wxContext.UNIONID,
- env: wxContext.ENV,
- }
-}
-
diff --git a/cloudfunctions/login/package.json b/cloudfunctions/login/package.json
deleted file mode 100644
index 3c5d61a..0000000
--- a/cloudfunctions/login/package.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "login",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "",
- "license": "ISC",
- "dependencies": {
- "wx-server-sdk": "~2.1.2"
- }
-}
diff --git a/cloudfunctions/openapi/config.json b/cloudfunctions/openapi/config.json
deleted file mode 100644
index 0074569..0000000
--- a/cloudfunctions/openapi/config.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "permissions": {
- "openapi": [
- "wxacode.get",
- "subscribeMessage.send",
- "subscribeMessage.addTemplate",
- "templateMessage.send",
- "templateMessage.addTemplate",
- "templateMessage.deleteTemplate",
- "templateMessage.getTemplateList",
- "templateMessage.getTemplateLibraryById",
- "templateMessage.getTemplateLibraryList"
- ]
- }
-}
\ No newline at end of file
diff --git a/cloudfunctions/openapi/index.js b/cloudfunctions/openapi/index.js
deleted file mode 100644
index 1ae21a4..0000000
--- a/cloudfunctions/openapi/index.js
+++ /dev/null
@@ -1,87 +0,0 @@
-// 云函数入口文件
-const cloud = require('wx-server-sdk')
-
-cloud.init()
-
-// 云函数入口函数
-exports.main = async (event, context) => {
- console.log(event)
- switch (event.action) {
- case 'requestSubscribeMessage': {
- return requestSubscribeMessage(event)
- }
- case 'sendSubscribeMessage': {
- return sendSubscribeMessage(event)
- }
- case 'getWXACode': {
- return getWXACode(event)
- }
- case 'getOpenData': {
- return getOpenData(event)
- }
- default: {
- return
- }
- }
-}
-
-async function requestSubscribeMessage(event) {
- // 此处为模板 ID,开发者需要到小程序管理后台 - 订阅消息 - 公共模板库中添加模板,
- // 然后在我的模板中找到对应模板的 ID,填入此处
- return '请到管理后台申请模板 ID 然后在此替换' // 如 'N_J6F05_bjhqd6zh2h1LHJ9TAv9IpkCiAJEpSw0PrmQ'
-}
-
-async function sendSubscribeMessage(event) {
- const { OPENID } = cloud.getWXContext()
-
- const { templateId } = event
-
- const sendResult = await cloud.openapi.subscribeMessage.send({
- touser: OPENID,
- templateId,
- miniprogram_state: 'developer',
- page: 'pages/openapi/openapi',
- // 此处字段应修改为所申请模板所要求的字段
- data: {
- thing1: {
- value: '咖啡',
- },
- time3: {
- value: '2020-01-01 00:00',
- },
- }
- })
-
- return sendResult
-}
-
-async function getWXACode(event) {
-
- // 此处将获取永久有效的小程序码,并将其保存在云文件存储中,最后返回云文件 ID 给前端使用
-
- const wxacodeResult = await cloud.openapi.wxacode.get({
- path: 'pages/openapi/openapi',
- })
-
- const fileExtensionMatches = wxacodeResult.contentType.match(/\/([^\/]+)/)
- const fileExtension = (fileExtensionMatches && fileExtensionMatches[1]) || 'jpg'
-
- const uploadResult = await cloud.uploadFile({
- // 云文件路径,此处为演示采用一个固定名称
- cloudPath: `wxacode_default_openapi_page.${fileExtension}`,
- // 要上传的文件内容可直接传入图片 Buffer
- fileContent: wxacodeResult.buffer,
- })
-
- if (!uploadResult.fileID) {
- throw new Error(`upload failed with empty fileID and storage server status code ${uploadResult.statusCode}`)
- }
-
- return uploadResult.fileID
-}
-
-async function getOpenData(event) {
- return cloud.getOpenData({
- list: event.openData.list,
- })
-}
diff --git a/cloudfunctions/openapi/package.json b/cloudfunctions/openapi/package.json
deleted file mode 100644
index fc486e1..0000000
--- a/cloudfunctions/openapi/package.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "openapi",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "",
- "license": "ISC",
- "dependencies": {
- "wx-server-sdk": "~2.1.2"
- }
-}
diff --git a/miniprogram/api/flowable.js b/miniprogram/api/flowable.js
new file mode 100644
index 0000000..d9750ee
--- /dev/null
+++ b/miniprogram/api/flowable.js
@@ -0,0 +1,161 @@
+import {request} from '../utils/request'
+
+// 获取流程申请类型
+export function myDefinitionList(data) {
+ return request({
+ url: '/wxApi/flowTask/myDefinitionList',
+ method: 'get',
+ data: data
+ })
+}
+
+// 启动流程实例
+export function startProcessInstance(data) {
+ return request({
+ url: '/wxApi/flowTask/startProcessInstance',
+ method: 'post',
+ data: data
+ })
+}
+
+// 查询流程节点
+export function readDeployNotes(deployId) {
+ return request({
+ url: '/wxApi/flowTask/readNotes/'+deployId,
+ method: 'get'
+ })
+}
+
+// 取消流程申请
+export function stopProcess(data) {
+ return request({
+ url: '/wxApi/flowTask/stopProcess',
+ method: 'post',
+ data: data
+ })
+}
+
+// 撤回流程办理
+export function revokeProcess(data) {
+ return request({
+ url: '/wxApi/flowTask/revokeProcess',
+ method: 'post',
+ data: data
+ })
+}
+
+// 审批任务流程
+export function complete(data) {
+ return request({
+ url: '/wxApi/flowTask/complete',
+ method: 'post',
+ data: data
+ })
+}
+
+// 驳回任务流程
+export function reject(data) {
+ return request({
+ url: '/wxApi/flowTask/reject',
+ method: 'post',
+ data: data
+ })
+}
+
+// 退回任务流程
+export function returnTask(data) {
+ return request({
+ url: '/wxApi/flowTask/return',
+ method: 'post',
+ data: data
+ })
+}
+
+// 委派任务流程
+export function delegateTask(data) {
+ return request({
+ url: '/wxApi/flowTask/delegateTask',
+ method: 'post',
+ data: data
+ })
+}
+
+// 转办任务流程
+export function assignTask(data) {
+ return request({
+ url: '/wxApi/flowTask/assignTask',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除流程实例
+export function deleteInstance(instanceId) {
+ return request({
+ url: '/wxApi/flowTask/delete/'+instanceId,
+ method: 'get'
+ })
+}
+
+// 获取所有可回退的节点
+export function returnList(data) {
+ return request({
+ url: '/wxApi/flowTask/returnList',
+ method: 'post',
+ data: data
+ })
+}
+
+// 根据流程Id查询操作日志
+export function findCommentByProcInsId(data) {
+ return request({
+ url: '/wxApi/flowTask/findCommentByProcInsId',
+ method: 'get',
+ data: data
+ })
+}
+
+// 根据条件查询我的代办任务
+export function myAwaitFlowTaskList(data) {
+ return request({
+ url: '/wxApi/flowTask/myAwaitFlowTaskList',
+ method: 'post',
+ data: data
+ })
+}
+
+// 根据条件查询我的已办任务
+export function myFinishedFlowTaskList(data) {
+ return request({
+ url: '/wxApi/flowTask/myFinishedFlowTaskList',
+ method: 'get',
+ data: data
+ })
+}
+
+// 根据条件查询所有流申请
+export function allInstanceList(data) {
+ return request({
+ url: '/wxApi/flowTask/allList',
+ method: 'get',
+ data: data
+ })
+}
+
+// 根据条件统计所有流程任务
+export function queryTaskCount(data) {
+ return request({
+ url: '/wxApi/flowTask/queryCount',
+ method: 'get',
+ data: data
+ })
+}
+
+// 根据条件统计分类流程任务
+export function queryTaskCountByCategory(data){
+ return request({
+ url: '/wechat/flowTask/findAwaitCountGroupByCategory',
+ method: 'post',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/miniprogram/api/login.js b/miniprogram/api/login.js
new file mode 100644
index 0000000..9e00f76
--- /dev/null
+++ b/miniprogram/api/login.js
@@ -0,0 +1,35 @@
+import {request} from '../utils/request'
+
+// 获取验证码
+export function getCodeImg() {
+ return request({
+ url: '/wechat/captchaImage',
+ method: 'get',
+ })
+}
+
+// 登录方法
+export function login(data) {
+ return request({
+ url: '/wxApi/login',
+ method: 'post',
+ data: data,
+ })
+}
+
+// 登录方法
+export function updatePwd(data) {
+ return request({
+ url: '/wxApi/updatePwd',
+ method: 'post',
+ data: data,
+ })
+}
+
+// 用户退出方法
+export function loginOut() {
+ return request({
+ 'url': '/wxApi/loginOut',
+ 'method': 'get'
+ })
+}
diff --git a/miniprogram/api/projectStandard.js b/miniprogram/api/projectStandard.js
new file mode 100644
index 0000000..fab6c01
--- /dev/null
+++ b/miniprogram/api/projectStandard.js
@@ -0,0 +1,10 @@
+import {request} from '../utils/request'
+
+// 根据条件统计项目标准化类型
+export function queryCountByType(data){
+ return request({
+ url: '/wechat/projectStandard/findCountByType',
+ method: 'get',
+ data: data
+ })
+}
diff --git a/miniprogram/api/publics.js b/miniprogram/api/publics.js
new file mode 100644
index 0000000..ba00d99
--- /dev/null
+++ b/miniprogram/api/publics.js
@@ -0,0 +1,59 @@
+import {request} from '../utils/request'
+
+// 获取用户详细信息
+export function getUserInfo() {
+ return request({
+ url: '/wxApi/publics/user/info',
+ method: 'get'
+ })
+}
+
+// 查询用户菜单信息
+export function selectRoleMenuList(data) {
+ return request({
+ url: '/wxApi/publics/v1/selectRoleMenuList',
+ method: 'get',
+ data: data
+ })
+}
+
+// 查询用户待办信息
+export function findMyTask(data) {
+ return request({
+ url: '/wxApi/flowTask/myAwaitFlowTaskListCount',
+ method: 'post',
+ data:data
+ })
+}
+
+// 查询用户部门信息
+export function findMyDeptList(){
+ return request({
+ url: '/wxApi/publics/v1/findMyDeptList',
+ method: 'get'
+ })
+}
+
+// 查询用户项目信息
+export function findMyProjectList(){
+ return request({
+ url: '/wxApi/publics/v1/findMyProjectList',
+ method: 'get'
+ })
+}
+
+// 查询部门资产列表信息
+export function findAllByCategory(category){
+ return request({
+ url: '/wxApi/publics/v1/findAllByCategory/'+category,
+ method: 'get'
+ })
+}
+
+// 获取项目申请详细信息
+export function findProjectApplyData(id){
+ return request({
+ url: '/wxApi/publics/projectApply/'+id,
+ method: 'get'
+ })
+}
\ No newline at end of file
diff --git a/miniprogram/app.js b/miniprogram/app.js
index 3802ede..dadc49d 100644
--- a/miniprogram/app.js
+++ b/miniprogram/app.js
@@ -23,17 +23,16 @@
App({
globalData: {
+ category:'',
+ standard:'',
paramDeptId:'',
userProjectId:'',
- appId: "wxc44b5d588f599758",
+ appId: "wx9997d071b4996f23",
// 智慧工地后台接口访问域名
- // reqUrl:"http://wxw.ngrok.makalu.cc",
- //reqUrl:'https://jaapplets.makalu.cc',
- //reqUrl:'https://sxyanzhu.com/jhwxapp',
- reqUrl:'https://cf.makalu.cc',
- //reqUrl:'http://127.0.0.1:8091',
- uploadUrl:"https://cf.makalu.cc/wechat",
- //uploadUrl:'http://127.0.0.1:8091/wechat',
+ //reqUrl:'https://szgcwx.jhncidg.com',
+ reqUrl:'http://127.0.0.1:8091',
+ //uploadUrl:"https://szgcwx.jhncidg.com/wechat",
+ uploadUrl:'http://192.168.43.53:8091/wechat',
//御景路数字化集成管控平台接口访问域名
szhUrl:'https://szh.makalu.cc',
diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss
index eecc1ed..3408813 100644
--- a/miniprogram/app.wxss
+++ b/miniprogram/app.wxss
@@ -1462,6 +1462,14 @@ swiper-item video{
align-items: center;
}
+.module_see_info_switct{
+ font-size: 26rpx;
+ font-weight: 600;
+ color: greenyellow;
+ display: flex;
+ align-items: center;
+}
+
.inspect_new_issues_max{
padding: 30rpx 0;
}
@@ -1630,6 +1638,20 @@ swiper-item video{
margin-left: 110rpx;
margin-top: 16rpx;
}
+.tabNum_defalut{
+ position: absolute;
+ background-color: blueviolet;
+ border-radius: 10px;
+ color: #fff;
+ display: inline-block;
+ font-size: 12px;
+ height: 18px;
+ line-height: 18px;
+ padding: 0 6px;
+ text-align: center;
+ white-space: nowrap;
+ margin-left: 110rpx;
+}
.van-col--18{
word-wrap:break-word;
}
diff --git a/miniprogram/config.js b/miniprogram/config.js
new file mode 100644
index 0000000..17e3de7
--- /dev/null
+++ b/miniprogram/config.js
@@ -0,0 +1,8 @@
+// 应用全局配置
+module.exports = {
+ timeout: 60000,
+ appId: "wx9997d071b4996f23",
+ //baseUrl: 'https://szgcwx.jhncidg.com',
+ baseUrl: 'http://127.0.0.1:8091',
+ noSecuritys:['/wechat/captchaImage','/wxApi/login']
+};
\ No newline at end of file
diff --git a/miniprogram/images/dingwei.png b/miniprogram/images/dingwei.png
deleted file mode 100644
index 9fb08c3..0000000
Binary files a/miniprogram/images/dingwei.png and /dev/null differ
diff --git a/miniprogram/images/i_location.png b/miniprogram/images/i_location.png
deleted file mode 100644
index 5ef39fe..0000000
Binary files a/miniprogram/images/i_location.png and /dev/null differ
diff --git a/miniprogram/images/i_mechanics.png b/miniprogram/images/i_mechanics.png
deleted file mode 100644
index 957fa4a..0000000
Binary files a/miniprogram/images/i_mechanics.png and /dev/null differ
diff --git a/miniprogram/images/i_personnel.png b/miniprogram/images/i_personnel.png
deleted file mode 100644
index 216695b..0000000
Binary files a/miniprogram/images/i_personnel.png and /dev/null differ
diff --git a/miniprogram/images/icon_1.png b/miniprogram/images/icon_1.png
deleted file mode 100644
index 17a6290..0000000
Binary files a/miniprogram/images/icon_1.png and /dev/null differ
diff --git a/miniprogram/images/icon_2.png b/miniprogram/images/icon_2.png
deleted file mode 100644
index d46f8f4..0000000
Binary files a/miniprogram/images/icon_2.png and /dev/null differ
diff --git a/miniprogram/images/icon_3.png b/miniprogram/images/icon_3.png
deleted file mode 100644
index 7b59453..0000000
Binary files a/miniprogram/images/icon_3.png and /dev/null differ
diff --git a/miniprogram/images/icon_4.png b/miniprogram/images/icon_4.png
deleted file mode 100644
index c682c6e..0000000
Binary files a/miniprogram/images/icon_4.png and /dev/null differ
diff --git a/miniprogram/images/icon_5.png b/miniprogram/images/icon_5.png
deleted file mode 100644
index f701503..0000000
Binary files a/miniprogram/images/icon_5.png and /dev/null differ
diff --git a/miniprogram/images/icons_1.png b/miniprogram/images/icons_1.png
deleted file mode 100644
index 4a01a1e..0000000
Binary files a/miniprogram/images/icons_1.png and /dev/null differ
diff --git a/miniprogram/images/icons_2.png b/miniprogram/images/icons_2.png
deleted file mode 100644
index 22f8ff2..0000000
Binary files a/miniprogram/images/icons_2.png and /dev/null differ
diff --git a/miniprogram/images/icons_3.png b/miniprogram/images/icons_3.png
deleted file mode 100644
index 81e04f9..0000000
Binary files a/miniprogram/images/icons_3.png and /dev/null differ
diff --git a/miniprogram/images/icons_4.png b/miniprogram/images/icons_4.png
deleted file mode 100644
index e71a750..0000000
Binary files a/miniprogram/images/icons_4.png and /dev/null differ
diff --git a/miniprogram/images/icons_5.png b/miniprogram/images/icons_5.png
deleted file mode 100644
index cd75a41..0000000
Binary files a/miniprogram/images/icons_5.png and /dev/null differ
diff --git a/miniprogram/images/nodata.png b/miniprogram/images/nodata.png
deleted file mode 100644
index 17d832c..0000000
Binary files a/miniprogram/images/nodata.png and /dev/null differ
diff --git a/miniprogram/images/user_3.png b/miniprogram/images/user_3.png
deleted file mode 100644
index cc37d23..0000000
Binary files a/miniprogram/images/user_3.png and /dev/null differ
diff --git a/miniprogram/images/wl_fg.png b/miniprogram/images/wl_fg.png
deleted file mode 100644
index 9d4e45c..0000000
Binary files a/miniprogram/images/wl_fg.png and /dev/null differ
diff --git a/miniprogram/newComponents/select-group-person/index.wxss b/miniprogram/newComponents/select-group-person/index.wxss
index 3c4d8af..3e7240e 100644
--- a/miniprogram/newComponents/select-group-person/index.wxss
+++ b/miniprogram/newComponents/select-group-person/index.wxss
@@ -1,7 +1,3 @@
-/* newComponents/select-person/index.wxss */
-page{
- height:100%
-}
.rectifier_add_to{
width: 100rpx;
height: 100rpx;
@@ -16,10 +12,11 @@ page{
}
.rectifier_max{
width: 100%;
+ height: 100%;
background: #232a44;
border-radius: 15rpx;
position: relative;
- height: 100%;
+ margin-bottom: -57rpx;
}
.rectifier_title{
position: relative;
diff --git a/miniprogram/pageage/project_checkDetection/list/index.wxml b/miniprogram/pageage/project_checkDetection/list/index.wxml
index 61cf213..f13a709 100644
--- a/miniprogram/pageage/project_checkDetection/list/index.wxml
+++ b/miniprogram/pageage/project_checkDetection/list/index.wxml
@@ -43,7 +43,7 @@
-
+
暂无数据
diff --git a/miniprogram/pageage/project_checking/add/index.wxml b/miniprogram/pageage/project_checking/add/index.wxml
index 1821840..870c7c4 100644
--- a/miniprogram/pageage/project_checking/add/index.wxml
+++ b/miniprogram/pageage/project_checking/add/index.wxml
@@ -82,7 +82,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_checking/edit/index.wxml b/miniprogram/pageage/project_checking/edit/index.wxml
index 9553155..7ded209 100644
--- a/miniprogram/pageage/project_checking/edit/index.wxml
+++ b/miniprogram/pageage/project_checking/edit/index.wxml
@@ -106,7 +106,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_checking/list/index.wxml b/miniprogram/pageage/project_checking/list/index.wxml
index 123c1e9..698225c 100644
--- a/miniprogram/pageage/project_checking/list/index.wxml
+++ b/miniprogram/pageage/project_checking/list/index.wxml
@@ -50,7 +50,7 @@
-
+
暂无数据
@@ -58,7 +58,7 @@
-
+
新增
diff --git a/miniprogram/pageage/project_deptWorks/add/index.wxml b/miniprogram/pageage/project_deptWorks/add/index.wxml
index f02015b..2fc675d 100644
--- a/miniprogram/pageage/project_deptWorks/add/index.wxml
+++ b/miniprogram/pageage/project_deptWorks/add/index.wxml
@@ -42,7 +42,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_deptWorks/list/index.wxml b/miniprogram/pageage/project_deptWorks/list/index.wxml
index eb621ce..3674d63 100644
--- a/miniprogram/pageage/project_deptWorks/list/index.wxml
+++ b/miniprogram/pageage/project_deptWorks/list/index.wxml
@@ -41,7 +41,7 @@
-
+
暂无数据
@@ -49,7 +49,7 @@
-
+
变更
diff --git a/miniprogram/pageage/project_insurance/add/index.wxml b/miniprogram/pageage/project_insurance/add/index.wxml
index cec967c..9686428 100644
--- a/miniprogram/pageage/project_insurance/add/index.wxml
+++ b/miniprogram/pageage/project_insurance/add/index.wxml
@@ -50,7 +50,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_insurance/list/index.wxml b/miniprogram/pageage/project_insurance/list/index.wxml
index 06f5d6d..2f80a0e 100644
--- a/miniprogram/pageage/project_insurance/list/index.wxml
+++ b/miniprogram/pageage/project_insurance/list/index.wxml
@@ -39,7 +39,7 @@
-
+
暂无数据
@@ -47,7 +47,7 @@
-
+
新增
diff --git a/miniprogram/pageage/project_materialSeal/add/index.wxml b/miniprogram/pageage/project_materialSeal/add/index.wxml
index e5d2203..a64c2dd 100644
--- a/miniprogram/pageage/project_materialSeal/add/index.wxml
+++ b/miniprogram/pageage/project_materialSeal/add/index.wxml
@@ -83,7 +83,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_materialSeal/edit/index.wxml b/miniprogram/pageage/project_materialSeal/edit/index.wxml
index 0332861..9df6b1b 100644
--- a/miniprogram/pageage/project_materialSeal/edit/index.wxml
+++ b/miniprogram/pageage/project_materialSeal/edit/index.wxml
@@ -112,7 +112,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_materialSeal/list/index.wxml b/miniprogram/pageage/project_materialSeal/list/index.wxml
index 42bc58c..dae8cb6 100644
--- a/miniprogram/pageage/project_materialSeal/list/index.wxml
+++ b/miniprogram/pageage/project_materialSeal/list/index.wxml
@@ -46,7 +46,7 @@
-
+
暂无数据
@@ -54,7 +54,7 @@
-
+
新增
diff --git a/miniprogram/pageage/project_measure/add/index.wxml b/miniprogram/pageage/project_measure/add/index.wxml
index c7637e7..a0f8329 100644
--- a/miniprogram/pageage/project_measure/add/index.wxml
+++ b/miniprogram/pageage/project_measure/add/index.wxml
@@ -84,7 +84,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_measure/edit/index.wxml b/miniprogram/pageage/project_measure/edit/index.wxml
index be3b819..7fb925a 100644
--- a/miniprogram/pageage/project_measure/edit/index.wxml
+++ b/miniprogram/pageage/project_measure/edit/index.wxml
@@ -105,7 +105,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_measure/list/index.wxml b/miniprogram/pageage/project_measure/list/index.wxml
index c3cebcc..5c10e66 100644
--- a/miniprogram/pageage/project_measure/list/index.wxml
+++ b/miniprogram/pageage/project_measure/list/index.wxml
@@ -46,7 +46,7 @@
-
+
暂无数据
@@ -54,7 +54,7 @@
-
+
新增
diff --git a/miniprogram/pageage/project_problemmodify/quality/add/index.wxml b/miniprogram/pageage/project_problemmodify/quality/add/index.wxml
index cee4f47..d6e4bd0 100644
--- a/miniprogram/pageage/project_problemmodify/quality/add/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/add/index.wxml
@@ -87,7 +87,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_problemmodify/quality/check/index.wxml b/miniprogram/pageage/project_problemmodify/quality/check/index.wxml
index 5305cdd..87efd61 100644
--- a/miniprogram/pageage/project_problemmodify/quality/check/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/check/index.wxml
@@ -152,7 +152,7 @@
-
+
数据加载中!请稍后...
\ No newline at end of file
diff --git a/miniprogram/pageage/project_problemmodify/quality/draft/index.wxml b/miniprogram/pageage/project_problemmodify/quality/draft/index.wxml
index 3a01b16..f51ab9e 100644
--- a/miniprogram/pageage/project_problemmodify/quality/draft/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/draft/index.wxml
@@ -53,7 +53,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_problemmodify/quality/list/index.wxml b/miniprogram/pageage/project_problemmodify/quality/list/index.wxml
index 9755e08..8cc9618 100644
--- a/miniprogram/pageage/project_problemmodify/quality/list/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/list/index.wxml
@@ -57,19 +57,19 @@
-
+
暂无数据
-
+
草稿
-
+
新增
diff --git a/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml b/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml
index 765246b..a0d3b94 100644
--- a/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml
@@ -148,7 +148,7 @@
-
+
数据加载中!请稍后...
\ No newline at end of file
diff --git a/miniprogram/pageage/project_problemmodify/security/add/index.wxml b/miniprogram/pageage/project_problemmodify/security/add/index.wxml
index 26a7047..a357cfb 100644
--- a/miniprogram/pageage/project_problemmodify/security/add/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/add/index.wxml
@@ -87,7 +87,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_problemmodify/security/check/index.wxml b/miniprogram/pageage/project_problemmodify/security/check/index.wxml
index bfe9101..37104ee 100644
--- a/miniprogram/pageage/project_problemmodify/security/check/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/check/index.wxml
@@ -152,7 +152,7 @@
-
+
数据加载中!请稍后...
\ No newline at end of file
diff --git a/miniprogram/pageage/project_problemmodify/security/draft/index.wxml b/miniprogram/pageage/project_problemmodify/security/draft/index.wxml
index 379ba42..d9cf564 100644
--- a/miniprogram/pageage/project_problemmodify/security/draft/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/draft/index.wxml
@@ -53,7 +53,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_problemmodify/security/list/index.wxml b/miniprogram/pageage/project_problemmodify/security/list/index.wxml
index 8d5874a..0c6436c 100644
--- a/miniprogram/pageage/project_problemmodify/security/list/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/list/index.wxml
@@ -56,19 +56,19 @@
-
+
暂无数据
-
+
草稿
-
+
新增
diff --git a/miniprogram/pageage/project_problemmodify/security/modify/index.wxml b/miniprogram/pageage/project_problemmodify/security/modify/index.wxml
index 649e892..358c622 100644
--- a/miniprogram/pageage/project_problemmodify/security/modify/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/modify/index.wxml
@@ -147,7 +147,7 @@
-
+
数据加载中!请稍后...
\ No newline at end of file
diff --git a/miniprogram/pageage/project_schedule/add/index.wxml b/miniprogram/pageage/project_schedule/add/index.wxml
index b1f3ca4..d62ca5e 100644
--- a/miniprogram/pageage/project_schedule/add/index.wxml
+++ b/miniprogram/pageage/project_schedule/add/index.wxml
@@ -112,7 +112,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_schedule/list/index.wxml b/miniprogram/pageage/project_schedule/list/index.wxml
index bd5887a..7e54e99 100644
--- a/miniprogram/pageage/project_schedule/list/index.wxml
+++ b/miniprogram/pageage/project_schedule/list/index.wxml
@@ -39,7 +39,7 @@
-
+
暂无数据
@@ -47,7 +47,7 @@
-
+
新增
diff --git a/miniprogram/pageage/project_special/add/index.wxml b/miniprogram/pageage/project_special/add/index.wxml
index 725d460..be8348a 100644
--- a/miniprogram/pageage/project_special/add/index.wxml
+++ b/miniprogram/pageage/project_special/add/index.wxml
@@ -68,7 +68,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_special/list/index.wxml b/miniprogram/pageage/project_special/list/index.wxml
index 4e5fb9c..f194b25 100644
--- a/miniprogram/pageage/project_special/list/index.wxml
+++ b/miniprogram/pageage/project_special/list/index.wxml
@@ -40,7 +40,7 @@
-
+
暂无数据
@@ -48,7 +48,7 @@
-
+
新增
diff --git a/miniprogram/pageage/project_standard/add/index.wxml b/miniprogram/pageage/project_standard/add/index.wxml
index 8373cc4..dc6f4bf 100644
--- a/miniprogram/pageage/project_standard/add/index.wxml
+++ b/miniprogram/pageage/project_standard/add/index.wxml
@@ -47,7 +47,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_standard/list/index.js b/miniprogram/pageage/project_standard/list/index.js
index 231ee47..47c946b 100644
--- a/miniprogram/pageage/project_standard/list/index.js
+++ b/miniprogram/pageage/project_standard/list/index.js
@@ -1,143 +1,238 @@
-// pageage/safetyManagement/securityCheckGR/index.js
+import config from '../../../config'
+import {
+ queryCountByType
+} from '../../../api/projectStandard'
const app = getApp()
Page({
- /**
- * 页面的初始数据
- */
- data: {
- deptId:"",
- loginName:"",
- projectId:"",
- minRoleId:"",
- projectData:{},
- initData: {},
- show:false,
- listData:[],
- request:app.globalData.reqUrl
- },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ deptId: "",
+ loginName: "",
+ projectId: "",
+ minRoleId: "",
+ projectData: {},
+ initData: {},
+ show: false,
+ listData: [],
+ standard: null,
+ standardName: '',
+ standardActive: '',
+ typeList: [{
+ id: 1,
+ name: '作业标准化',
+ icon: config.baseUrl + '/staticFiles/img/zybzh.png',
+ count: 0,
+ }, {
+ id: 2,
+ name: '现场管理标准',
+ icon: config.baseUrl + '/staticFiles/img/xcglbzh.png',
+ count: 0,
+ },
+ {
+ id: 3,
+ name: '安全技术标准',
+ icon: config.baseUrl + '/staticFiles/img/aqjsbzh.png',
+ count: 0,
+ }, {
+ id: 4,
+ name: '设备管理标准',
+ icon: config.baseUrl + '/staticFiles/img/sbglbzh.png',
+ count: 0,
+ }, {
+ id: 5,
+ name: '文明施工标准',
+ icon: config.baseUrl + '/staticFiles/img/wmsgbzh.png',
+ count: 0,
+ }, {
+ id: 6,
+ name: '环境保护标准',
+ icon: config.baseUrl + '/staticFiles/img/hjbhbzh.png',
+ count: 0,
+ }
+ ],
+ },
- skipAdd(){
- wx.redirectTo({
- url: `../add/index?projectId=${this.data.initData.id}&projectName=`+this.data.initData.text,
- })
- },
+ skipAdd() {
+ wx.redirectTo({
+ url: `../add/index?projectId=${this.data.initData.id}&projectName=` + this.data.initData.text,
+ })
+ },
- getInfo(e){
- let {id} = e.currentTarget.dataset.set
- wx.redirectTo({
- url: `../info/index?id=${id}`
- })
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- //获取缓存数据
- wx.getStorage({
- key: 'userinfo',
- success:res=>{
- this.setData({
- deptId:res.data.deptId,
- loginName:res.data.loginName,
- userName:res.data.userName,
- projectId:app.globalData.projectId,
- minRoleId:res.data.minRoleId,
- initData:{text:app.globalData.projectName,id:app.globalData.projectId}
- })
- this.getListData(app.globalData.projectId,res.data.deptId,res.data.minRoleId);
- }
- })
- },
+ getInfo(e) {
+ let {
+ id
+ } = e.currentTarget.dataset.set
+ wx.redirectTo({
+ url: `../info/index?id=${id}`
+ })
+ },
/**
- * 查询项目举牌验收数据
- */
- getListData(projectId,deptId,minRoleId) {
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let standard;
+ if (options && options.standard) {
+ standard = options.standard;
+ app.globalData.standard = options.standard;
+ } else {
+ standard = app.globalData.standard;
+ }
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success: res => {
+ this.setData({
+ deptId: res.data.deptId,
+ loginName: res.data.loginName,
+ userName: res.data.userName,
+ projectId: app.globalData.projectId,
+ minRoleId: res.data.minRoleId,
+ initData: {
+ text: app.globalData.projectName,
+ id: app.globalData.projectId
+ },
+ standard: standard,
+ standardName: this.data.typeList[standard - 1].name,
+ standardActive: this.data.typeList[standard - 1].id,
+ listData: [],
+ })
+ this.getListData(app.globalData.projectId, res.data.deptId, res.data.minRoleId);
+ }
+ })
+ },
+
+ /**
+ * 切换页签
+ * @param {*} e
+ */
+ standardActive: function (e) {
+ let {
+ id,
+ name
+ } = e.currentTarget.dataset.set
+ this.setData({
+ standard: id,
+ standardName: name,
+ standardActive: id
+ })
+ app.globalData.standard = id;
+ this.onLoad()
+ },
+
+ /**
+ * 查询项目举牌验收数据
+ */
+ getListData(projectId, deptId, minRoleId) {
var that = this;
- //判断角色,
- if(minRoleId==2||minRoleId==3||minRoleId==4){
- deptId=0;
+ //判断角色,
+ if (minRoleId == 2 || minRoleId == 3 || minRoleId == 4) {
+ deptId = 0;
}
let param = {
- "projectId": projectId,
- "deptId":deptId,
+ "standardType": this.data.standard,
+ "projectId": projectId,
+ "deptId": deptId,
}
+ this.queryCountByType(param);
wx.request({
url: app.globalData.reqUrl + '/wechat/projectStandard/list',
- data:param,
+ data: param,
method: "get",
success: function (res) {
that.setData({
- listData:res.data.data
+ listData: res.data.data
})
}
});
- },
+ },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- returnToPage: function () {
- /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.redirectTo({
- url: '../../../pages/gengduogongneng/gengduogongneng',
+ /**
+ * 根据条件查询类型数量统计
+ */
+ queryCountByType: function (data) {
+ queryCountByType(data).then(res => {
+ let typeList = this.data.typeList;
+ typeList.forEach(type => {
+ res.data.forEach(item => {
+ if (type.id == item.standardType) {
+ if (item.total) {
+ type.count = item.total;
+ }
+ }
+ })
+ });
+ this.setData({
+ typeList
})
- },
+ });
+ },
- //项目切换 返回值
- onProjectSelect(e){
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../../pages/gengduogongneng/gengduogongneng',
+ })
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.projectId = projectId;
- app.globalData.projectName = projectName;
+ app.globalData.projectName = projectName;
this.onLoad();
},
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
- },
+ },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
- },
+ },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
- },
+ },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
- },
+ },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
- }
+ }
})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_standard/list/index.json b/miniprogram/pageage/project_standard/list/index.json
index c38e268..11580d5 100644
--- a/miniprogram/pageage/project_standard/list/index.json
+++ b/miniprogram/pageage/project_standard/list/index.json
@@ -1,7 +1,8 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index" ,
- "van-popup": "@vant/weapp/popup/index"
+ "van-popup": "@vant/weapp/popup/index",
+ "van-divider":"@vant/weapp/divider/index"
},
"navigationStyle":"custom"
}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_standard/list/index.wxml b/miniprogram/pageage/project_standard/list/index.wxml
index 9313471..ce56779 100644
--- a/miniprogram/pageage/project_standard/list/index.wxml
+++ b/miniprogram/pageage/project_standard/list/index.wxml
@@ -12,6 +12,20 @@
+
+
+
+
+ {{item.count}}
+
+ {{item.name}}
+
+
+
+
+
+ {{standardName}}
+
@@ -19,24 +33,17 @@
{{index < 9 ?'0'+(index+1):(index+1)}}
- {{item.standardTypeName}}
+ {{item.standardDesc}}
-
-
-
-
-
- {{item.standardDesc}}
-
-
+
-
+
暂无数据
@@ -44,7 +51,7 @@
-
+
新增
diff --git a/miniprogram/pageage/project_standard/list/index.wxss b/miniprogram/pageage/project_standard/list/index.wxss
index f370194..e393717 100644
--- a/miniprogram/pageage/project_standard/list/index.wxss
+++ b/miniprogram/pageage/project_standard/list/index.wxss
@@ -1 +1,36 @@
/* pageage/project_checking_list/project_checking_list.wxss */
+.inspect_list_info_imgs{
+ width: 100%;
+ height: 250rpx;
+}
+.gd_max{
+ padding:10rpx 50rpx 0;
+ }
+ .gd_min{
+ padding: 30rpx 0;
+ text-align: center;
+ }
+ .gd_min image{
+ width: 150rpx;
+ height: 150rpx;
+ }
+ .gd_min view{
+ padding: 10rpx;
+ color: #89a4eb;
+ }
+ .van-divider--left{
+ padding: 0 35rpx !important;
+ color: #866cff !important;
+ border-color: #89a4eb !important;
+ }
+ .gd_img{
+ width: 100rpx !important;
+ height: 100rpx !important;
+ }
+ .gd_min_active image{
+ background: #513abdb0;
+ border-radius: 80rpx;
+ }
+ .gd_min_active view{
+ color: #866cff;
+ }
\ No newline at end of file
diff --git a/miniprogram/pageage/project_train/add/index.wxml b/miniprogram/pageage/project_train/add/index.wxml
index b8b0258..7a2fb16 100644
--- a/miniprogram/pageage/project_train/add/index.wxml
+++ b/miniprogram/pageage/project_train/add/index.wxml
@@ -85,7 +85,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/project_train/list/index.wxml b/miniprogram/pageage/project_train/list/index.wxml
index 7bbc491..798201e 100644
--- a/miniprogram/pageage/project_train/list/index.wxml
+++ b/miniprogram/pageage/project_train/list/index.wxml
@@ -41,7 +41,7 @@
-
+
暂无数据
@@ -49,7 +49,7 @@
-
+
新增
diff --git a/miniprogram/pageage/safetyManagement/addSafetyInspect/index.wxml b/miniprogram/pageage/safetyManagement/addSafetyInspect/index.wxml
index 9bc7186..09c9c15 100644
--- a/miniprogram/pageage/safetyManagement/addSafetyInspect/index.wxml
+++ b/miniprogram/pageage/safetyManagement/addSafetyInspect/index.wxml
@@ -79,7 +79,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pageage/safetyManagement/problemRectificationGR/index.wxml b/miniprogram/pageage/safetyManagement/problemRectificationGR/index.wxml
index 54b0c3f..7bd6498 100644
--- a/miniprogram/pageage/safetyManagement/problemRectificationGR/index.wxml
+++ b/miniprogram/pageage/safetyManagement/problemRectificationGR/index.wxml
@@ -116,7 +116,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pages/components/file-uploader-all/index.js b/miniprogram/pages/components/file-uploader-all/index.js
index bda7132..4b84d0e 100644
--- a/miniprogram/pages/components/file-uploader-all/index.js
+++ b/miniprogram/pages/components/file-uploader-all/index.js
@@ -5,6 +5,10 @@ Component({
* 组件的属性列表
*/
properties: {
+ fileType:{
+ type:String,
+ value:"all",
+ },
fileUrlArray:{
type:Array
},
@@ -63,6 +67,7 @@ Component({
}
var that = this;
wx.chooseMessageFile({
+ type:that.data.fileType,
count: that.data.quantity - that.data.uploaderNum, // 默认9
success: function(res) {
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
diff --git a/miniprogram/pages/components/voucher-date/index.wxml b/miniprogram/pages/components/voucher-date/index.wxml
index 5f5d7a5..6961baf 100644
--- a/miniprogram/pages/components/voucher-date/index.wxml
+++ b/miniprogram/pages/components/voucher-date/index.wxml
@@ -5,7 +5,7 @@
-
+
diff --git a/miniprogram/pages/components/voucher-date/index.wxss b/miniprogram/pages/components/voucher-date/index.wxss
index 0a6d8ec..90cfa54 100644
--- a/miniprogram/pages/components/voucher-date/index.wxss
+++ b/miniprogram/pages/components/voucher-date/index.wxss
@@ -65,4 +65,3 @@
-
diff --git a/miniprogram/pages/components/voucher-datetime/index.wxml b/miniprogram/pages/components/voucher-datetime/index.wxml
index 50fee91..f0c0c0e 100644
--- a/miniprogram/pages/components/voucher-datetime/index.wxml
+++ b/miniprogram/pages/components/voucher-datetime/index.wxml
@@ -5,7 +5,7 @@
-
+
diff --git a/miniprogram/pages/gengduogongneng/gengduogongneng.wxml b/miniprogram/pages/gengduogongneng/gengduogongneng.wxml
index ba0f552..19294aa 100644
--- a/miniprogram/pages/gengduogongneng/gengduogongneng.wxml
+++ b/miniprogram/pages/gengduogongneng/gengduogongneng.wxml
@@ -26,7 +26,7 @@
{{deptName}}
-
+
diff --git a/miniprogram/pages/login/login.js b/miniprogram/pages/login/login.js
index 8b8c17f..b6ab980 100644
--- a/miniprogram/pages/login/login.js
+++ b/miniprogram/pages/login/login.js
@@ -1,4 +1,12 @@
-// pages/login/login.js
+import {
+ getToken,
+ setToken
+} from '../../utils/auth'
+import {
+ login,
+ getCodeImg,
+} from '../../api/login'
+
const app = getApp();
Page({
@@ -6,89 +14,104 @@ Page({
* 页面的初始数据
*/
data: {
- username:'',
- password:'',
- show:false,
- openId:'',
+ username: '',
+ password: '',
+ show: false,
+ openId: '',
+ code: '',
+ uuid: '',
+ usercode: '',
},
//获取填写的账号信息
- name:function(even){
+ name: function (even) {
this.setData({
- username:even.detail.value
+ username: even.detail.value
})
},
//获取填写的密码信息
- psw:function(even){
+ pass: function (even) {
this.setData({
- password:even.detail.value
+ password: even.detail.value
+ })
+ },
+
+ //获取填写的密码信息
+ code: function (even) {
+ this.setData({
+ usercode: even.detail.value
})
},
onClickShow() {
- this.setData({ show: true });
+ this.setData({
+ show: true
+ });
},
onClickHide() {
- this.setData({ show: false });
+ this.setData({
+ show: false
+ });
},
onLoad: function (option) {
- this.getOPenId();
+ this.loadCodeImage();
+ this.getOPenId();
},
/**
* 获取用户openid
*/
- getOPenId:function () {
+ getOPenId: function () {
wx.login({
- success :res=>{
- //启动蒙版
- let oid = wx.getStorageSync("openId");
- if(!oid){
- this.onClickShow();
- wx.request({
- url: app.globalData.reqUrl+'/wechat/getOpenId',
- data:{
- "code": res.code,
- "appId": app.globalData.appId,
- },
- success:(res)=>{
- res = res.data;
- this.onClickHide();
- this.setData({
- openId:res.data.openid,
- })
- wx.setStorageSync('openId', res.data.openid)
- //验证登录用户
- this.selectUserInfoByOpenId(res.data.openid);
- }
+ success: res => {
+ //启动蒙版
+ let oid = wx.getStorageSync("openId");
+ if (!oid) {
+ this.onClickShow();
+ wx.request({
+ url: app.globalData.reqUrl + '/wechat/getOpenId',
+ data: {
+ "code": res.code,
+ "appId": app.globalData.appId,
+ },
+ success: (res) => {
+ res = res.data;
+ this.onClickHide();
+ this.setData({
+ openId: res.data.openid,
+ })
+ wx.setStorageSync('openId', res.data.openid)
+ //验证登录用户
+ this.selectUserInfoByOpenId(res.data.openid);
+ }
})
- }else{
- //验证登录用户
- this.selectUserInfoByOpenId(oid);
- }
+ } else {
+ //验证登录用户
+ this.selectUserInfoByOpenId(oid);
+ }
}
})
-},
-
+ },
+
//验证用户是否是第一次登陆
- selectUserInfoByOpenId:function(openId){
+ selectUserInfoByOpenId: function (openId) {
//跳转页面
- let isRelogin=wx.getStorageSync("isReload");
- if(isRelogin){
+ let isRelogin = wx.getStorageSync("isReload");
+ if (isRelogin) {
return;
}
this.onClickShow();
var that = this;
wx.request({
- url: app.globalData.reqUrl+'/wechat/openIdLogin',
- data:{
- "openId":openId
+ url: app.globalData.reqUrl + '/wechat/openIdLogin',
+ data: {
+ "openId": openId
},
- method:"POST",
- success:function(res){
- if(res.data.code == '200'){
+ method: "POST",
+ success: function (res) {
+ if (res.data.code == '200') {
//把数据存到缓存中
wx.setStorage({
key: 'userinfo',
@@ -101,48 +124,68 @@ Page({
that.onClickHide();
let rd = res.data.data;
//只有一个项目时直接跳转详情页
- if(rd.projectInfo!=null || rd.projectInfo!=undefined){
+ if (rd.projectInfo != null || rd.projectInfo != undefined) {
//赋值到公共参数
app.globalData.projectId = rd.projectInfo.projectId;
app.globalData.projectName = rd.projectInfo.projectName;
app.globalData.projectInfoList = [];
app.globalData.projectInfoList.push(rd.projectInfo);
app.globalData.value1 = rd.projectInfo.shengName;
- app.globalData.value2 = rd.projectInfo.shiName+'/'+rd.projectInfo.quName;
+ app.globalData.value2 = rd.projectInfo.shiName + '/' + rd.projectInfo.quName;
app.globalData.value3 = rd.projectInfo.logCompanyName;
wx.redirectTo({
url: '../xiangmugaikuang/xiangmugaikuang',
})
- }else{
+ } else {
//跳转页面
wx.redirectTo({
url: '../map/map',
})
}
- }else{
+ } else {
that.onClickHide();
}
}
})
- },
-
+ },
+
+ /**
+ * 获取验证码
+ */
+ loadCodeImage: function () {
+ getCodeImg().then(res => {
+ let captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
+ if (captchaEnabled) {
+ this.setData({
+ code: 'data:image/gif;base64,' + res.img,
+ uuid: res.uuid
+ })
+ }
+ });
+ },
+
//登录
- userLogin:function(openid){
+ userLogin: function (openid) {
var that = this;
var username = that.data.username;
var password = that.data.password;
- if(username == ""){
+ var usercode = this.data.usercode;
+ if (username == "") {
app.toast("账号不能为空");
return;
}
- if(password == ""){
+ if (password == "") {
app.toast("密码不能为空");
return;
}
+ if (usercode == "") {
+ app.toast("验证码不能为空");
+ return;
+ }
let openId = that.data.openId
- if(openId==""){
+ if (openId == "") {
openId = wx.getStorageSync("openId");
- if(openId==""){
+ if (openId == "") {
app.toast("获取微信授权失败,请卸载后重新进入应用!!");
return;
}
@@ -151,50 +194,50 @@ Page({
that.onClickShow();
//发送请求
wx.request({
- url: app.globalData.reqUrl+'/wechat/login',
- data:{
- "username":username,
- "password":password,
- "openId":openId,
+ url: app.globalData.reqUrl + '/wechat/login',
+ data: {
+ "username": username,
+ "password": password,
+ "openId": openId,
+ "code": usercode,
+ "uuid": this.data.uuid,
},
- method:"POST",
- success(res){
- //关闭蒙版
- that.onClickHide();
- if(res.data.code=='200'){
- //把数据存到缓存中
- wx.setStorage({
- key: 'userinfo',
- data: res.data.data.userinfo
- });
- // wx.setStorageSync({
- // key: 'token',
- // data: res.data.token
- // });
- wx.setStorageSync('isReload', "");
- let rd = res.data.data;
- //只有一个项目时直接跳转详情页
- if(rd.projectInfo!=null || rd.projectInfo!=undefined){
- //赋值到公共参数
- app.globalData.projectId = rd.projectInfo.projectId;
- app.globalData.projectName = rd.projectInfo.projectName;
- app.globalData.projectInfoList = [];
- app.globalData.projectInfoList.push(rd.projectInfo);
- app.globalData.value1 = rd.projectInfo.shengName;
- app.globalData.value2 = rd.projectInfo.shiName+'/'+rd.projectInfo.quName;
- app.globalData.value3 = rd.projectInfo.logCompanyName;
- wx.redirectTo({
- url: '../xiangmugaikuang/xiangmugaikuang',
- })
- }else{
- //跳转页面
- wx.redirectTo({
- url: '../map/map',
- })
- }
- }else{
- app.toast(res.data.msg);
+ method: "POST",
+ success(res) {
+ //关闭蒙版
+ that.onClickHide();
+ if (res.data.code == '200') {
+ //把数据存到缓存中
+ wx.setStorage({
+ key: 'userinfo',
+ data: res.data.data.userinfo
+ });
+ setToken(res.data.token);
+ let rd = res.data.data;
+ wx.setStorageSync('isReload', "");
+ //只有一个项目时直接跳转详情页
+ if (rd.projectInfo != null || rd.projectInfo != undefined) {
+ //赋值到公共参数
+ app.globalData.projectId = rd.projectInfo.projectId;
+ app.globalData.projectName = rd.projectInfo.projectName;
+ app.globalData.projectInfoList = [];
+ app.globalData.projectInfoList.push(rd.projectInfo);
+ app.globalData.value1 = rd.projectInfo.shengName;
+ app.globalData.value2 = rd.projectInfo.shiName + '/' + rd.projectInfo.quName;
+ app.globalData.value3 = rd.projectInfo.logCompanyName;
+ wx.redirectTo({
+ url: '../xiangmugaikuang/xiangmugaikuang',
+ })
+ } else {
+ //跳转页面
+ wx.redirectTo({
+ url: '../map/map',
+ })
}
+ } else {
+ that.loadCodeImage();
+ app.toast(res.data.msg);
+ }
}
})
},
diff --git a/miniprogram/pages/login/login.wxml b/miniprogram/pages/login/login.wxml
index c4b6255..f8f0656 100644
--- a/miniprogram/pages/login/login.wxml
+++ b/miniprogram/pages/login/login.wxml
@@ -2,60 +2,39 @@
-
-
产发工程数字管理平台
+
请使用手机号登录
-
+
-
+
-
-
-
- 确 定
-
-
-
-
-
- 正在登陆中!请稍后...
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确 定
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+ 正在登陆中!请稍后...
+
+
\ No newline at end of file
diff --git a/miniprogram/pages/login/login.wxss b/miniprogram/pages/login/login.wxss
index da2c88f..34c06c3 100644
--- a/miniprogram/pages/login/login.wxss
+++ b/miniprogram/pages/login/login.wxss
@@ -5,10 +5,11 @@ page{
.login_title{
height: 180rpx;
line-height: 180rpx;
- color: #728ce3;
+ color: #DDDDDD;
font-size: 41rpx;
font-weight: bold;
text-align: center;
+ background: url("http://62.234.3.186/profile/static/yanzhu_title.png") no-repeat left/100% 100%;
}
.login_title text{
border-bottom: 3px solid #728ce3;
@@ -20,28 +21,29 @@ page{
margin-top: 10rpx;
}
.login_dl{
- color: #ffffff;
+ color: #728ce3;
font-size: 40rpx;
font-weight: bold;
}
.login_ex{
padding:20rpx 0;
font-size: 30rpx;
- border-bottom: 20rpx dashed #ffffff;
+ border-bottom: 20rpx dashed #728ce3;
width: 50%;
}
.login_input{
margin-top: 50rpx;
}
-.login_input input{
+.login_input .name{
+ background: url("http://62.234.3.186/profile/static/login_name.png") no-repeat left/40rpx;
border-bottom: 1px solid #5e6ea2;
height: 100rpx;
width: 93%;
color: #728ce3;
- padding: 0 20rpx;
+ padding: 0 50rpx;
}
.login_btn{
- margin:80rpx 50rpx 0;
+ margin:80rpx;
height: 80rpx;
background-image: linear-gradient(#5b9fff, #7655fc);
border-radius: 80rpx;
@@ -62,6 +64,31 @@ page{
height: 65rpx;
}
+.login_input .pass {
+ background: url("http://62.234.3.186/profile/static/login_pass.png") no-repeat left/40rpx;
+ border-bottom: 1px solid #5e6ea2;
+ height: 100rpx;
+ width: 85%;
+ color: #728ce3;
+ padding: 0 50rpx;
+}
+
+.login_input .code {
+ background: url("http://62.234.3.186/profile/static/login_code.png") no-repeat left/40rpx;
+ border-bottom: 1px solid #5e6ea2;
+ height: 100rpx;
+ width: 74%;
+ color: #728ce3;
+ padding: 0 50rpx;
+}
+
+.login_code image{
+ margin-top: 50rpx;
+ margin-left: 12rpx;
+ width: 100%;
+ height: 100rpx;
+}
+
diff --git a/miniprogram/pages/map/map.wxml b/miniprogram/pages/map/map.wxml
index 099a2f9..d38d36c 100644
--- a/miniprogram/pages/map/map.wxml
+++ b/miniprogram/pages/map/map.wxml
@@ -219,7 +219,7 @@
diff --git a/miniprogram/pages/project_approve/index.wxml b/miniprogram/pages/project_approve/index.wxml
index e827220..79cdddd 100644
--- a/miniprogram/pages/project_approve/index.wxml
+++ b/miniprogram/pages/project_approve/index.wxml
@@ -43,7 +43,7 @@
-
+
暂无数据
diff --git a/miniprogram/pages/project_flowable/approveLeaveTask/index.wxml b/miniprogram/pages/project_flowable/approveLeaveTask/index.wxml
index 03c9c85..00fd2f6 100644
--- a/miniprogram/pages/project_flowable/approveLeaveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/approveLeaveTask/index.wxml
@@ -113,7 +113,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pages/project_flowable/approveTask/index.js b/miniprogram/pages/project_flowable/approveTask/index.js
index f11044a..1ab2128 100644
--- a/miniprogram/pages/project_flowable/approveTask/index.js
+++ b/miniprogram/pages/project_flowable/approveTask/index.js
@@ -1,4 +1,4 @@
-// pageage/safetyManagement/addSafetyInspect/index.js
+import config from '../../../config'
const app = getApp()
Page({
@@ -20,8 +20,8 @@ Page({
activeName:"",
flowNodeList:[],
flowNodes:[],
- fileNames:[],
- fileUrls:[],
+ imageList:[],
+ filesData:[],
comment:"",
taskId:"",
procInsId:"",
@@ -31,6 +31,8 @@ Page({
taskName:"",
passState:true,
backName:"",
+ imageType:["png","jpg","jpeg"],
+ fileType:["pdf"],
},
/**
@@ -177,19 +179,23 @@ Page({
that.setData({
infoData:res.data
})
- let fileNames = [];
- let fileUrls = [];
+ let filesData = [];
+ let imageList = [];
//判断附件
if(res.data.files){
res.data.files.split(',').forEach(element => {
- let it = element.split('/');
- fileNames.push(it[it.length-1]);
- fileUrls.push(element);
+ let ft = element.split('.');
+ if(that.data.imageType.indexOf(ft[ft.length-1].toLowerCase())>-1){
+ imageList.push({minPath:config.baseUrl+element,path:element});
+ }else{
+ let it = element.split('/');
+ filesData.push({name:it[it.length-1],path:element});
+ }
});
}
that.setData({
- fileNames,
- fileUrls
+ filesData,
+ imageList
})
}else{
app.toast(res.msg);
@@ -521,12 +527,24 @@ Page({
})
},
+ //展示图片详细
+ showImg:function(e){
+ let {path} = e.currentTarget.dataset.set
+ wx.previewImage({
+ urls: this.data.imageList,
+ current: path
+ })
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
downFile:function(e){
- let idx = e.currentTarget.dataset['index'];
- let that = this;
+ let {path} = e.currentTarget.dataset.set
wx.downloadFile({
// 示例 url,并非真实存在
- url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[idx],
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+path,
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
diff --git a/miniprogram/pages/project_flowable/approveTask/index.wxml b/miniprogram/pages/project_flowable/approveTask/index.wxml
index ae54f26..4651115 100644
--- a/miniprogram/pages/project_flowable/approveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/approveTask/index.wxml
@@ -1,162 +1,138 @@
-
-
-
- {{projectName}}
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
- {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
- {{item.taskName}}{{item.commentResult}}
- {{item.commentResult}}
- {{item.commentResult}}
-
-
-
-
- 办理用户:{{item.assigneeName}}
- 办理单位:{{item.deptName}}
- 候选办理:{{item.candidate}}
- 驳回节点:{{item.deleteReason}}
- 接收时间:{{item.startTime}}
- 处理时间:{{item.endTime}}
- 处理耗时:{{item.duration}}
- 处理意见:{{item.message}}
-
-
-
-
-
-
-
-
-
- 发起单位
- {{deptName}}
-
-
-
-
- 发起用户
- {{nickName}}
-
-
-
-
- 审批事项
- {{procDefName}}
-
-
-
-
- 审批内容
-
-
- {{item}}
+
-
-
- 申请说明
- {{infoData.remark}}
-
-
-
- 审批意见
-
-
+
+
+
+
+ {{projectName}}
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+ {{item.taskName}}{{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+
+
+
+
+
+ 办理用户:{{item.assigneeName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 候选办理:{{item.candidate}}
+
+
+ 驳回节点:{{item.deleteReason}}
+
+
+ 接收时间:{{item.startTime}}
+
+
+ 处理时间:{{item.endTime}}
+
+
+ 处理耗时:{{item.duration}}
+
+
+ 处理意见:{{item.message}}
+
+
+
+
+
+
+
+
+
+
+ 发起单位
+ {{deptName}}
+
+
+
+
+ 发起用户
+ {{nickName}}
+
+
+
+
+ 审批事项
+ {{procDefName}}
+
+
+
+
+ 审批内容
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ 申请说明
+ {{infoData.remark}}
+
+
+
+ 审批意见
+
+
-
-
+
+
退回节点
-
+
+
+
+
+ 审批退回
+ 审批驳回
+ 审批通过
-
-
- 审批退回
- 审批驳回
- 审批通过
-
-
+
数据加载中!请稍后...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/miniprogram/pages/project_flowable/approveTask/index.wxss b/miniprogram/pages/project_flowable/approveTask/index.wxss
index 1e95f3c..9df048b 100644
--- a/miniprogram/pages/project_flowable/approveTask/index.wxss
+++ b/miniprogram/pages/project_flowable/approveTask/index.wxss
@@ -1,4 +1,28 @@
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
+.problem_list_info_con{
+ padding-right: 10rpx !important;
+}
+.in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+}
+.in-img-max{
+ width: auto;
+ zoom:1
+}
+.in-img-div{
+ position: relative;
+ float: left;
+}
+.in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+}
.van-popup{
background: none !important;
}
diff --git a/miniprogram/pages/project_flowable/await/index.js b/miniprogram/pages/project_flowable/await/index.js
index 8c1f1d3..ff0beae 100644
--- a/miniprogram/pages/project_flowable/await/index.js
+++ b/miniprogram/pages/project_flowable/await/index.js
@@ -1,180 +1,282 @@
-// pageage/safetyManagement/securityCheckGR/index.js
+import config from '../../../config'
+import { queryTaskCountByCategory } from '../../../api/flowable'
const app = getApp()
Page({
- /**
- * 页面的初始数据
- */
- data: {
- deptId:"",
- userId:"",
- loginName:"",
- projectId:"",
- minRoleId:"",
- projectData:{},
- initData: {},
- show:false,
- listData:[],
- request:app.globalData.reqUrl
- },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ deptId: "",
+ userId: "",
+ loginName: "",
+ projectId: "",
+ minRoleId: "",
+ projectData: {},
+ initData: {},
+ show: false,
+ listData: [],
+ category: null,
+ categoryName: '',
+ categoryActive:'',
+ request: app.globalData.reqUrl,
+ typeList: [{
+ id: 1,
+ name: '程序及质量类',
+ icon: config.baseUrl + '/staticFiles/img/cxjzll.png',
+ todoDB:0,
+ }, {
+ id: 2,
+ name: '安全类',
+ icon: config.baseUrl + '/staticFiles/img/aql.png',
+ todoDB:0,
+ },
+ {
+ id: 3,
+ name: '认价类',
+ icon: config.baseUrl + '/staticFiles/img/rjl.png',
+ todoDB:0,
+ }, {
+ id: 4,
+ name: '图纸类',
+ icon: config.baseUrl + '/staticFiles/img/tzl.png',
+ todoDB:0,
+ }, {
+ id: 5,
+ name: '项目管理制度',
+ icon: config.baseUrl + '/staticFiles/img/xmglzdl.png',
+ todoDB:0,
+ }, {
+ id: 6,
+ name: '索赔类',
+ icon: config.baseUrl + '/staticFiles/img/spl.png',
+ todoDB:0,
+ }, {
+ id: 7,
+ name: '特殊事项确认',
+ icon: config.baseUrl + '/staticFiles/img/tssxqrl.png',
+ todoDB:0,
+ }
+ ],
+ },
- getInfo(e){
- let {deployId,procInsId,taskId,taskName,procDefKey,startDeptName,startUserName,procDefName,businessKeyName} = e.currentTarget.dataset.set
- if(taskName=="提交申请"){
- if(procDefKey=="flow_xmglzdl_qjspb"){
- wx.redirectTo({
- url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await`,
- })
- }else{
- wx.redirectTo({
- url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await`,
- })
- }
- }else{
- //根据不同业务跳转不同表单
- if(procDefKey=="flow_xmglzdl_qjspb"){
- wx.redirectTo({
- url: `../approveLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}`,
- })
- }else{
- wx.redirectTo({
- url: `../approveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}`,
- })
- }
- }
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- //获取缓存数据
- wx.getStorage({
- key: 'userinfo',
- success:res=>{
- this.setData({
- loginName:res.data.loginName,
- userId:res.data.userId,
- projectId:app.globalData.projectId,
- minRoleId:res.data.minRoleId,
- deptId:res.data.deptId,
- initData:{text:app.globalData.projectName,id:app.globalData.projectId}
- })
- this.getListData(res.data.loginName,res.data.userId,res.data.deptId,res.data.minRoleId);
- }
- })
- },
+ getInfo(e) {
+ let {
+ deployId,
+ procInsId,
+ taskId,
+ taskName,
+ procDefKey,
+ startDeptName,
+ startUserName,
+ procDefName,
+ businessKeyName
+ } = e.currentTarget.dataset.set
+ if (taskName == "提交申请") {
+ if (procDefKey == "flow_xmglzdl_qjspb") {
+ wx.redirectTo({
+ url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await`,
+ })
+ } else {
+ wx.redirectTo({
+ url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await`,
+ })
+ }
+ } else {
+ //根据不同业务跳转不同表单
+ if (procDefKey == "flow_xmglzdl_qjspb") {
+ wx.redirectTo({
+ url: `../approveLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}`,
+ })
+ } else {
+ wx.redirectTo({
+ url: `../approveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}`,
+ })
+ }
+ }
+ },
/**
- * 查询项目举牌验收数据
- */
- getListData(loginName,userId,deptId,minRoleId) {
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let category;
+ if(options && options.category){
+ category = options.category;
+ app.globalData.category = options.category;
+ }else{
+ category = app.globalData.category;
+ }
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success: res => {
+ this.setData({
+ loginName: res.data.loginName,
+ userId: res.data.userId,
+ projectId: app.globalData.projectId,
+ minRoleId: res.data.minRoleId,
+ deptId: res.data.deptId,
+ initData: {
+ text: app.globalData.projectName,
+ id: app.globalData.projectId
+ },
+ category:category,
+ categoryName:this.data.typeList[category-1].name,
+ categoryActive:this.data.typeList[category-1].id
+ })
+ this.getListData(res.data.loginName, res.data.userId, res.data.deptId, res.data.minRoleId);
+ }
+ })
+ },
+
+ /**
+ * 查询审批代办数据
+ */
+ getListData(loginName, userId, deptId, minRoleId) {
var that = this;
//businessKey注解掉可以跨项目审批
let param = {
- //"businessKey":this.data.projectId,
- "nowRole":minRoleId,
- "nowDept":deptId,
- "nowUserName":loginName,
- "nowUser":userId
+ "businessKey": this.data.projectId,
+ "nowRole": minRoleId,
+ "nowDept": deptId,
+ "nowUserName": loginName,
+ "nowUser": userId,
+ "category": this.data.category
}
+ this.queryCountByCategory(param);
wx.request({
url: app.globalData.reqUrl + '/wechat/flowTask/myAwaitFlowTaskList',
- data:param,
+ data: param,
method: "post",
success: function (res) {
res = res.data;
- if(res.code=="200"){
+ if (res.code == "200") {
that.setData({
- listData:res.rows
+ listData: res.rows
})
- }else{
+ } else {
app.toast(res.msg);
}
}
});
- },
+ },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
- },
+ },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
- },
+ },
- returnToPage: function () {
- /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.redirectTo({
- url: '../../gengduogongneng/gengduogongneng',
- })
- },
-
- goFQLC:function(){
- wx.redirectTo({
- url: '../myFlowDefinition/index',
+ /**
+ * 根据条件查询我的代办分组数量统计
+ */
+ queryCountByCategory:function(data){
+ queryTaskCountByCategory(data).then(res =>{
+ let typeList = this.data.typeList;
+ typeList.forEach(type =>{
+ res.data.forEach(item =>{
+ if(type.id==item.category){
+ if(item.total){
+ type.todoDB = item.total;
+ }
+ }
})
- },
-
- goWDSQ:function(){
- wx.redirectTo({
- url: '../myProcessIns/index',
+ });
+ this.setData({
+ typeList
})
- },
+ });
+ },
- goBLWC:function(){
- wx.redirectTo({
- url: '../finished/index',
- })
- },
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../gengduogongneng/gengduogongneng',
+ })
+ },
- //项目切换 返回值
- onProjectSelect(e){
+ /**
+ * 切换页签
+ * @param {*} e
+ */
+ categoryActive:function(e){
+ let {id} = e.currentTarget.dataset.set
+ this.setData({
+ category:id,
+ categoryActive: id
+ })
+ app.globalData.category = id;
+ this.onLoad()
+ },
+
+ goFQLC: function () {
+ wx.redirectTo({
+ url: '../myFlowDefinition/index?category=' + this.data.category,
+ })
+ },
+
+ goWDSQ: function () {
+ wx.redirectTo({
+ url: '../myProcessIns/index?category=' + this.data.category,
+ })
+ },
+
+ goBLWC: function () {
+ wx.redirectTo({
+ url: '../finished/index?category=' + this.data.category,
+ })
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.projectId = projectId;
- app.globalData.projectName = projectName;
+ app.globalData.projectName = projectName;
this.onLoad();
},
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
- },
+ },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
- },
+ },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
- },
+ },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
- },
+ },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
- }
+ }
})
\ No newline at end of file
diff --git a/miniprogram/pages/project_flowable/await/index.json b/miniprogram/pages/project_flowable/await/index.json
index c38e268..f41332f 100644
--- a/miniprogram/pages/project_flowable/await/index.json
+++ b/miniprogram/pages/project_flowable/await/index.json
@@ -1,7 +1,10 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index" ,
- "van-popup": "@vant/weapp/popup/index"
+ "van-popup": "@vant/weapp/popup/index",
+ "van-divider":"@vant/weapp/divider/index",
+ "van-sidebar":"@vant/weapp/sidebar/index",
+ "van-sidebar-item":"@vant/weapp/sidebar-item/index"
},
"navigationStyle":"custom"
}
\ No newline at end of file
diff --git a/miniprogram/pages/project_flowable/await/index.wxml b/miniprogram/pages/project_flowable/await/index.wxml
index c6fa530..8a519c6 100644
--- a/miniprogram/pages/project_flowable/await/index.wxml
+++ b/miniprogram/pages/project_flowable/await/index.wxml
@@ -2,7 +2,9 @@
-
-
-
+
+
+
+
+
+
+ {{item.todoDB}}
+
+ {{item.name}}
+
+
+
+
+
+ {{categoryName}}
+
+
@@ -33,41 +49,40 @@
-
-
-
-
-
-
-
- {{index < 9 ?'0'+(index+1):(index+1)}}
- {{item.taskName}}
- 待审批
- 审批驳回
-
-
-
-
- 项目名称:{{item.businessKeyName}}
- 审批事项:{{item.procDefName}}
- 接收时间:{{item.createTime}}
- 申请用户:{{item.startUserName}}
- 申请单位:{{item.startDeptName}}
-
-
-
-
-
-
-
- 暂无数据
+
+
+
+
+
+
+
+
+ {{index < 9 ?'0'+(index+1):(index+1)}}
+ {{item.taskName}}
+ 待审批
+ 审批驳回
+
+
-
-
-
-
-
-
-
-
-
+
+ 项目名称:{{item.businessKeyName}}
+ 审批事项:{{item.procDefName}}
+ 接收时间:{{item.createTime}}
+ 申请用户:{{item.startUserName}}
+ 申请单位:{{item.startDeptName}}
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
\ No newline at end of file
diff --git a/miniprogram/pages/project_flowable/await/index.wxss b/miniprogram/pages/project_flowable/await/index.wxss
index 838c698..77762a5 100644
--- a/miniprogram/pages/project_flowable/await/index.wxss
+++ b/miniprogram/pages/project_flowable/await/index.wxss
@@ -13,4 +13,28 @@
.gd_min view{
padding: 10rpx;
color: #89a4eb;
- }
\ No newline at end of file
+ }
+ .van-divider--left{
+ padding: 0 35rpx !important;
+ color: #866cff !important;
+ border-color: #89a4eb !important;
+ }
+ .gd_img{
+ width: 100rpx !important;
+ height: 100rpx !important;
+ }
+ .gd_min_active image{
+ background: #513abdb0;
+ border-radius: 80rpx;
+ }
+ .gd_min_active view{
+ color: #866cff;
+ }
+ .van-sidebar-item{
+ background: #4b5a8291 !important;
+ color: #89a4eb !important;
+ }
+ .van-sidebar-item--selected{
+ border-color: var(--sidebar-selected-border-color,#866cff) !important;
+ color: #866cff !important;
+ }
diff --git a/miniprogram/pages/project_flowable/detailLeaveTask/index.js b/miniprogram/pages/project_flowable/detailLeaveTask/index.js
index d2c4f1c..9581372 100644
--- a/miniprogram/pages/project_flowable/detailLeaveTask/index.js
+++ b/miniprogram/pages/project_flowable/detailLeaveTask/index.js
@@ -332,7 +332,7 @@ Page({
procInsId: this.data.procInsId,
instanceId: this.data.procInsId,
taskId:this.data.taskId,
- userId:this.data.startUserId,
+ userId:this.data.myUserId,
assignee:this.data.nickName
}
//弹出确认
diff --git a/miniprogram/pages/project_flowable/detailLeaveTask/index.wxml b/miniprogram/pages/project_flowable/detailLeaveTask/index.wxml
index 02a4c4e..ad51270 100644
--- a/miniprogram/pages/project_flowable/detailLeaveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/detailLeaveTask/index.wxml
@@ -107,7 +107,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pages/project_flowable/detailTask/index.js b/miniprogram/pages/project_flowable/detailTask/index.js
index bb38337..14ace72 100644
--- a/miniprogram/pages/project_flowable/detailTask/index.js
+++ b/miniprogram/pages/project_flowable/detailTask/index.js
@@ -1,4 +1,4 @@
-// pageage/safetyManagement/addSafetyInspect/index.js
+import config from '../../../config'
const app = getApp()
Page({
@@ -21,8 +21,8 @@ Page({
activeName:"",
flowNodeList:[],
flowNodes:[],
- fileNames:[],
- fileUrls:[],
+ imageList:[],
+ filesData:[],
taskId:"",
procInsId:"",
taskName:"",
@@ -34,7 +34,9 @@ Page({
finishTime:"",
ret:"",
comment:"",
- stopBtnShow:false
+ stopBtnShow:false,
+ imageType:["png","jpg","jpeg"],
+ fileType:["pdf"],
},
/**
@@ -183,19 +185,23 @@ Page({
that.setData({
infoData:res.data
})
- let fileNames = [];
- let fileUrls = [];
+ let filesData = [];
+ let imageList = [];
//判断附件
if(res.data.files){
res.data.files.split(',').forEach(element => {
- let it = element.split('/');
- fileNames.push(it[it.length-1]);
- fileUrls.push(element);
+ let ft = element.split('.');
+ if(that.data.imageType.indexOf(ft[ft.length-1].toLowerCase())>-1){
+ imageList.push({minPath:config.baseUrl+element,path:element});
+ }else{
+ let it = element.split('/');
+ filesData.push({name:it[it.length-1],path:element});
+ }
});
}
that.setData({
- fileNames,
- fileUrls,
+ filesData,
+ imageList,
stopShow:!that.data.finishTime && that.data.userId==that.myUserId,
deleteShow:!that.data.finishTime && that.data.userId==that.myUserId,
revocationShow:!that.data.finishTime
@@ -348,7 +354,7 @@ Page({
procInsId: this.data.procInsId,
instanceId: this.data.procInsId,
taskId:this.data.taskId,
- userId:this.data.startUserId,
+ userId:this.data.myUserId,
assignee:this.data.nickName
}
//弹出确认
@@ -474,16 +480,30 @@ Page({
}
},
+ //展示图片详细
+ showImg:function(e){
+ let {path} = e.currentTarget.dataset.set
+ wx.previewImage({
+ urls: this.data.imageList,
+ current: path
+ })
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
downFile:function(e){
- let idx = e.currentTarget.dataset['index'];
- let that = this;
+ let {path} = e.currentTarget.dataset.set
wx.downloadFile({
// 示例 url,并非真实存在
- url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[idx],
+ url: app.globalData.uploadUrl+'/common/download/resource?resource='+path,
success: function (res) {
const filePath = res.tempFilePath
+ let fpt = filePath.split(".");
wx.openDocument({
filePath: filePath,
+ fileType: fpt[fpt.length-1],
success: function (res) {
console.log('打开文档成功')
},
diff --git a/miniprogram/pages/project_flowable/detailTask/index.wxml b/miniprogram/pages/project_flowable/detailTask/index.wxml
index d348acd..fb1ec82 100644
--- a/miniprogram/pages/project_flowable/detailTask/index.wxml
+++ b/miniprogram/pages/project_flowable/detailTask/index.wxml
@@ -1,156 +1,132 @@
-
-
-
- {{projectName}}
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
- {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
- {{item.taskName}}{{item.commentResult}}
- {{item.commentResult}}
- {{item.commentResult}}
-
-
-
-
- 办理用户:{{item.assigneeName}}
- 办理单位:{{item.deptName}}
- 候选办理:{{item.candidate}}
- 驳回节点:{{item.deleteReason}}
- 接收时间:{{item.startTime}}
- 处理时间:{{item.endTime}}
- 处理耗时:{{item.duration}}
- 处理意见:{{item.message}}
-
-
-
-
-
-
-
-
-
- 发起单位
- {{deptName}}
-
-
-
-
- 发起用户
- {{nickName}}
-
-
-
-
- 审批事项
- {{procDefName}}
-
-
-
-
- 审批内容
-
-
- {{item}}
+
-
-
- 申请说明
- {{infoData.remark}}
-
-
-
- 终止原因
-
-
+
+
+
+
+ {{projectName}}
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+ {{item.taskName}}{{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+
+
+
+
+
+ 办理用户:{{item.assigneeName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 候选办理:{{item.candidate}}
+
+
+ 驳回节点:{{item.deleteReason}}
+
+
+ 接收时间:{{item.startTime}}
+
+
+ 处理时间:{{item.endTime}}
+
+
+ 处理耗时:{{item.duration}}
+
+
+ 处理意见:{{item.message}}
+
+
+
+
+
+
+
+
+
+
+ 发起单位
+ {{deptName}}
+
+
+
+
+ 发起用户
+ {{nickName}}
+
+
+
+
+ 审批事项
+ {{procDefName}}
+
+
+
+
+ 审批内容
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ 申请说明
+ {{infoData.remark}}
+
+
+
+ 终止原因
+
+
+
+
+
+ 终止
+ 删除
+ 撤回
-
-
- 终止
- 删除
- 撤回
-
-
+
数据加载中!请稍后...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/miniprogram/pages/project_flowable/detailTask/index.wxss b/miniprogram/pages/project_flowable/detailTask/index.wxss
index 1e95f3c..9df048b 100644
--- a/miniprogram/pages/project_flowable/detailTask/index.wxss
+++ b/miniprogram/pages/project_flowable/detailTask/index.wxss
@@ -1,4 +1,28 @@
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
+.problem_list_info_con{
+ padding-right: 10rpx !important;
+}
+.in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+}
+.in-img-max{
+ width: auto;
+ zoom:1
+}
+.in-img-div{
+ position: relative;
+ float: left;
+}
+.in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+}
.van-popup{
background: none !important;
}
diff --git a/miniprogram/pages/project_flowable/editLeaveTask/index.wxml b/miniprogram/pages/project_flowable/editLeaveTask/index.wxml
index f4aa1b7..f6d8559 100644
--- a/miniprogram/pages/project_flowable/editLeaveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/editLeaveTask/index.wxml
@@ -104,7 +104,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pages/project_flowable/editTask/index.js b/miniprogram/pages/project_flowable/editTask/index.js
index aef4a9c..21ff18d 100644
--- a/miniprogram/pages/project_flowable/editTask/index.js
+++ b/miniprogram/pages/project_flowable/editTask/index.js
@@ -1,4 +1,4 @@
-// pageage/safetyManagement/addSafetyInspect/index.js
+import config from '../../../config'
const app = getApp()
Page({
@@ -20,8 +20,6 @@ Page({
activeName:"",
flowNodeList:[],
flowNodes:[],
- fileNames:[],
- fileUrls:[],
comment:"",
taskId:"",
procInsId:"",
@@ -31,12 +29,15 @@ Page({
taskName:"",
passState:true,
backName:"",
- fileUrlArray:[],
+ filesData:[],
ret:"",
remark:"",
filesData:[],
limit:9,
- fileType:["doc","docx","xls","xlsx","ppt","pptx","txt","pdf","png","jpg","jpeg","mp4"],
+ fileType:["pdf"],
+ imageType:["png","jpg","jpeg"],
+ imageInfoData:[],
+ isFiles: null,
},
/**
@@ -184,24 +185,26 @@ Page({
that.setData({
infoData:res.data
})
- let fileNames = [];
- let fileUrls = [];
- let fileUrlArray = [];
+ let filesData = [];
+ let imageList = [];
//判断附件
if(res.data.files){
res.data.files.split(',').forEach(element => {
- let it = element.split('/');
- fileNames.push(it[it.length-1]);
- fileUrls.push(element);
- fileUrlArray.push({name:it[it.length-1],path:element});
+ let ft = element.split('.');
+ if(that.data.imageType.indexOf(ft[ft.length-1].toLowerCase())>-1){
+ imageList.push(config.baseUrl+element);
+ }else{
+ let it = element.split('/');
+ filesData.push({name:it[it.length-1],path:element});
+ }
});
}
that.setData({
- fileNames,
- fileUrls,
- fileUrlArray,
+ filesData,
+ imageInfoData:imageList,
+ isFiles:filesData.length>0?true:false,
remark:res.data.remark,
- filesData:fileUrlArray
+ filesData:filesData
})
}else{
app.toast(res.msg);
@@ -260,7 +263,7 @@ Page({
})
return;
}
- if(filesData.length==0){
+ if(filesData.length==0 && this.data.imageInfoData.length==0){
app.toast("请上传审批内容!")
this.setData({
loadShow:false
@@ -272,7 +275,7 @@ Page({
_fileType = _fileType[_fileType.length-1].toLowerCase();
//判断附件类型,如果是图片直接展示,非图片则显示附件
if(this.data.fileType.indexOf(_fileType)==-1){
- app.toast("申批内容不支持 [ "+_fileType+" ] 格式!请检查第"+(i+1)+"个附件")
+ app.toast("申批内容不支持 [ "+_fileType+" ] 格式!请上传PDF文件。")
this.setData({
loadShow:false
});
@@ -299,20 +302,25 @@ Page({
submit(){
let that = this
- let {taskId,procInsId,projectId,projectName,userId,loginName,nickName,remark,filesData} = that.data;
+ let {taskId,procInsId,projectId,projectName,userId,loginName,nickName,remark,filesData,imageInfoData} = that.data;
let fileUrls = [];
- filesData.forEach(async (item)=>{
+ filesData.forEach( f =>{
+ imageInfoData.push(f.path);
+ });
+ imageInfoData.forEach(async (item)=>{
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
let name = "file"
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
- if(item.path.indexOf("/profile/")>-1){
- fileUrls.push(item.path);
+ if(item.indexOf(config.baseUrl)>-1){
+ fileUrls.push(item.replace(config.baseUrl,''));
+ }else if(item.indexOf("/profile/")>-1){
+ fileUrls.push(item);
}else{
- let obj = await that.syncUploadImage(uploadUrl,item.path,name);
+ let obj = await that.syncUploadImage(uploadUrl,item,name);
fileUrls.push(obj.data.fileName);
}
//验证图片上传完毕
- if(fileUrls.length == filesData.length){
+ if(fileUrls.length == imageInfoData.length){
let params = {
taskId,
instanceId:procInsId,
@@ -402,6 +410,19 @@ Page({
this.data.remark = options.detail.value;
},
+ // list 上传图片
+ onImagesArr(e) {
+ var data = this.data.imageInfoData
+ data = e.detail
+ this.setData({
+ imageInfoData: data
+ })
+ },
+
+ /**
+ * 上传文件
+ * @param {*} options
+ */
fileUpload(options){
let file=options.detail;
this.setData({
@@ -416,6 +437,10 @@ Page({
});
},
+ /**
+ * 计算驳回节点
+ * @param {*} val
+ */
getDeleteReason(val){
val = val.replace("Change activity to ","");
let flowRecordList = this.data.flowRecordList;
@@ -483,6 +508,27 @@ Page({
}
},
+ /**
+ * 切换上传文件类型
+ * @param {*} e
+ */
+ switchFiles(e) {
+ this.setData({
+ isFiles: !this.data.isFiles,
+ });
+ if(this.data.isFiles){
+ if(this.data.filesData.length==0){
+ let myImages = this.selectComponent("#myImage");
+ myImages.upload();
+ }
+ }else{
+ if(this.data.imageInfoData.length==0){
+ let myFiles = this.selectComponent("#myFiles");
+ myFiles.upload();
+ }
+ }
+ },
+
//取消页面
cancelSaveView(){
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
diff --git a/miniprogram/pages/project_flowable/editTask/index.wxml b/miniprogram/pages/project_flowable/editTask/index.wxml
index c653662..6e9a8b6 100644
--- a/miniprogram/pages/project_flowable/editTask/index.wxml
+++ b/miniprogram/pages/project_flowable/editTask/index.wxml
@@ -1,147 +1,132 @@
-
- {{projectName}}
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
- {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
- {{item.taskName}}{{item.commentResult}}
- {{item.commentResult}}
- {{item.commentResult}}
+
+ {{projectName}}
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+ {{item.taskName}}{{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+
+
+
+
+
+ 办理用户:{{item.assigneeName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 候选办理:{{item.candidate}}
+
+
+ 驳回节点:{{item.deleteReason}}
+
+
+ 接收时间:{{item.startTime}}
+
+
+ 处理时间:{{item.endTime}}
+
+
+ 处理耗时:{{item.duration}}
+
+
+ 处理意见:{{item.message}}
+
-
- 办理用户:{{item.assigneeName}}
- 办理单位:{{item.deptName}}
- 候选办理:{{item.candidate}}
- 驳回节点:{{item.deleteReason}}
- 接收时间:{{item.startTime}}
- 处理时间:{{item.endTime}}
- 处理耗时:{{item.duration}}
- 处理意见:{{item.message}}
-
-
-
-
-
-
-
- 发起单位
-
- {{deptName}}
+
+
-
-
- 发起用户
-
- {{nickName}}
-
-
-
- 审批事项
-
- {{procDefName}}
-
-
-
- 审批内容
- [可上传PDF/图片/WORD/PPT/XLS格式]
-
-
-
-
-
-
- 申请说明
-
-
+
+ 发起单位
+
+ {{deptName}}
+
+
+ 发起用户
+
+ {{nickName}}
+
+
+
+ 审批事项
+
+ {{procDefName}}
+
+
+
+ 审批内容 [仅可上传图片]
+
+ 从微信上传文件
+
+
+
+
+
+
+
+ 审批内容 [仅可上传PDF文件]
+
+
+ 从相册上传图片
+
+
+
+
+
+
+
+ 已同时选择PDF文件和图片,将上传已选择的文件和图片。
+
+
+ 申请说明
+
+
+
+
+
+
+ 取消
+ 提交申请
-
-
- 取消
- 提交申请
-
-
+
数据加载中!请稍后...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/miniprogram/pages/project_flowable/finished/index.js b/miniprogram/pages/project_flowable/finished/index.js
index 0051c02..953cc33 100644
--- a/miniprogram/pages/project_flowable/finished/index.js
+++ b/miniprogram/pages/project_flowable/finished/index.js
@@ -16,6 +16,7 @@ Page({
pageNum:1,
pageSize:10,
lastDataSize:10,
+ category:null,
},
getInfo(e){
@@ -46,7 +47,12 @@ Page({
this.setData({
userId:res.data.userId,
projectId:app.globalData.projectId,
- initData:{text:app.globalData.projectName,id:app.globalData.projectId}
+ category:app.globalData.category,
+ initData:{text:app.globalData.projectName,id:app.globalData.projectId},
+ pageNum:1,
+ pageSize:10,
+ lastDataSize:10,
+ listData:[]
})
this.getListData(res.data.userId);
}
@@ -63,9 +69,11 @@ Page({
return;
}
var that = this;
- //businessKey注解掉可以跨项目审批
+ //businessKey注解掉可以查看当前用户所有已完成数据【跨项目】
let param = {
- "nowUser":userId
+ "businessKey":this.data.projectId,
+ "nowUser":userId,
+ "category":this.data.category
}
param.pageNum=that.data.pageNum;
param.pageSize=that.data.pageSize;
diff --git a/miniprogram/pages/project_flowable/finished/index.wxml b/miniprogram/pages/project_flowable/finished/index.wxml
index 98cd657..8ddecd2 100644
--- a/miniprogram/pages/project_flowable/finished/index.wxml
+++ b/miniprogram/pages/project_flowable/finished/index.wxml
@@ -40,7 +40,7 @@
-
+
暂无数据
diff --git a/miniprogram/pages/project_flowable/initLeaveTask/index.wxml b/miniprogram/pages/project_flowable/initLeaveTask/index.wxml
index f922830..fcfe241 100644
--- a/miniprogram/pages/project_flowable/initLeaveTask/index.wxml
+++ b/miniprogram/pages/project_flowable/initLeaveTask/index.wxml
@@ -77,7 +77,7 @@
-
+
数据加载中!请稍后...
diff --git a/miniprogram/pages/project_flowable/initTask/index.js b/miniprogram/pages/project_flowable/initTask/index.js
index 290e384..6838bf4 100644
--- a/miniprogram/pages/project_flowable/initTask/index.js
+++ b/miniprogram/pages/project_flowable/initTask/index.js
@@ -6,70 +6,79 @@ Page({
* 页面的初始数据
*/
data: {
- maxDate:new Date(2088,1,1).getTime(),
- deptId:"",
- deptName:"",
- userId:"",
- nickName:"",
- loginName:"",
- projectId:"",
- projectName:"",
- remark:"",
- filesData:[],
- limit:9,
- fileType:["doc","docx","xls","xlsx","ppt","pptx","txt","pdf","png","jpg","jpeg","mp4"],
- procDefId:"",
- approveTitle:"",
- deploymentId:"",
- activeName:"",
- flowNodeList:[],
- flowNodes:[]
+ maxDate: new Date(2088, 1, 1).getTime(),
+ deptId: "",
+ deptName: "",
+ userId: "",
+ nickName: "",
+ loginName: "",
+ projectId: "",
+ projectName: "",
+ remark: "",
+ filesData: [],
+ limit: 9,
+ fileType: ["pdf", "png", "jpg", "jpeg"],
+ procDefId: "",
+ approveTitle: "",
+ deploymentId: "",
+ activeName: "",
+ flowNodeList: [],
+ flowNodes: [],
+ isFiles: false,
+ imageInfoData:[],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
- let {procDefId,approveTitle,deploymentId} = options
+ let {
+ procDefId,
+ approveTitle,
+ deploymentId
+ } = options
//获取缓存数据
wx.getStorage({
- key: 'userinfo',
- success:res=>{
- this.setData({
- projectId:app.globalData.projectId,
- projectName:app.globalData.projectName,
- procDefId,
- approveTitle,
- deploymentId,
- deptId:res.data.deptId,
- deptName:res.data.deptName,
- userId:res.data.userId,
- nickName:res.data.nickName,
- loginName:res.data.loginName
- })
- this.getFlowNodes();
- }
- })
+ key: 'userinfo',
+ success: res => {
+ this.setData({
+ projectId: app.globalData.projectId,
+ projectName: app.globalData.projectName,
+ procDefId,
+ approveTitle,
+ deploymentId,
+ deptId: res.data.deptId,
+ deptName: res.data.deptName,
+ userId: res.data.userId,
+ nickName: res.data.nickName,
+ loginName: res.data.loginName
+ })
+ this.getFlowNodes();
+ }
+ })
},
//取消页面
- cancelSaveView(){
- /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.redirectTo({
+ cancelSaveView() {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
url: '../myFlowDefinition/index'
})
},
- getFlowNode(val){
+ getFlowNode(val) {
let flowNodeList = this.data.flowNodeList;
- for(let i=0;i0){
+ if (flowNodeList[i].outgoingFlows && flowNodeList[i].outgoingFlows.length > 0) {
return this.getFlowNode(flowNodeList[i].outgoingFlows[0].targetRef);
}
}
@@ -77,30 +86,33 @@ Page({
},
//查询工作流节点
- getFlowNodes(){
+ getFlowNodes() {
let that = this;
wx.request({
- url: app.globalData.reqUrl + '/wechat/flowTask/readNotes/'+this.data.deploymentId,
- method:"get",
- data:{},
+ url: app.globalData.reqUrl + '/wechat/flowTask/readNotes/' + this.data.deploymentId,
+ method: "get",
+ data: {},
header: {
"Content-Type": "application/json"
},
- success(res){
+ success(res) {
res = res.data
- if(res.code == 200){
+ if (res.code == 200) {
that.setData({
- flowNodeList:res.data
+ flowNodeList: res.data
})
- if(res.data.length>0){
+ if (res.data.length > 0) {
let list = that.data.flowNodes;
- list.push({id:res.data[0].id,name:res.data[0].name});
+ list.push({
+ id: res.data[0].id,
+ name: res.data[0].name
+ });
that.setData({
- flowNodes:list
+ flowNodes: list
})
return that.getFlowNode(res.data[0].outgoingFlows[0].targetRef);
}
- }else{
+ } else {
app.toast(res.msg);
}
}
@@ -108,41 +120,48 @@ Page({
},
//保存
- onSave(){
+ onSave() {
this.setData({
- loadShow:true
+ loadShow: true
})
- let {procDefId,projectId,userId,loginName,remark,filesData} = this.data;
+ let {
+ procDefId,
+ projectId,
+ userId,
+ loginName,
+ remark,
+ filesData
+ } = this.data;
//数据效验
- if(projectId==""||loginName==""||userId==""||procDefId==""){
+ if (projectId == "" || loginName == "" || userId == "" || procDefId == "") {
app.toast("数据异常,请刷新页面重试!")
this.setData({
- loadShow:false
+ loadShow: false
})
return;
}
- if(remark==""){
+ if (remark == "") {
app.toast("请填写申请说明!")
this.setData({
- loadShow:false
+ loadShow: false
})
return;
}
- if(filesData.length==0){
+ if (filesData.length == 0 && this.data.imageInfoData.length == 0) {
app.toast("请上传审批内容!")
this.setData({
- loadShow:false
+ loadShow: false
});
return;
}
- for(let i=0;i{
- let uploadUrl = app.globalData.uploadUrl+'/common/upload'
- let name = "file"
+ filesData.forEach( f =>{
+ imageInfoData.push(f.path);
+ });
+ imageInfoData.forEach(async (item) => {
+ let uploadUrl = app.globalData.uploadUrl + '/common/upload'
+ let name = "file"
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
- let obj = await that.syncUploadImage(uploadUrl,item.path,name);
+ let obj = await that.syncUploadImage(uploadUrl, item, name);
fileUrls.push(obj.data.fileName);
//验证图片上传完毕
- if(fileUrls.length == filesData.length){
+ if (fileUrls.length == imageInfoData.length) {
let params = {
procDefId,
userId,
- userName:loginName,
+ userName: loginName,
nickName,
- variables:{
- businessKey:projectId,
+ variables: {
+ businessKey: projectId,
projectName,
- files:fileUrls.toString(),
+ files: fileUrls.toString(),
remark,
}
}
wx.request({
url: app.globalData.reqUrl + '/wechat/flowTask/startProcessInstance',
- method:"POST",
- data:params,
+ method: "POST",
+ data: params,
header: {
"Username": loginName,
"Content-Type": "application/json"
},
- success(res){
+ success(res) {
that.setData({
- loadShow:false
+ loadShow: false
})
- res =res.data
- if(res.code == 200){
+ res = res.data
+ if (res.code == 200) {
app.toast("提交申请成功!")
- setTimeout(()=>{
- wx.redirectTo({
- url: '../myProcessIns/index',
- })
- },200)
- }else{
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../myProcessIns/index',
+ })
+ }, 200)
+ } else {
app.toast(res.msg);
}
}
})
- }
+ }
})
},
/**
* 这里考虑上传图片异步问题,封装为同步
*/
- syncUploadImage(url,uploadFile,name) {
+ syncUploadImage(url, uploadFile, name) {
return new Promise((resolve, reject) => {
wx.uploadFile({
- url, // 上传的服务器接口地址
- filePath: uploadFile,
- header: {
- "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
- },
- name, //上传的所需字段,后端提供
- formData: { user: 'test' },
- success: (res) => {
- // 上传完成操作
- const data = JSON.parse(res.data)
- resolve({
- data: data
- })
- },
- fail: (err) => {
- //上传失败:修改pedding为reject
- console.log("访问接口失败", err);
- wx.showToast({
- title: "网络出错,上传失败",
- icon: 'none',
- duration: 1000
- });
- reject(err)
- }
+ url, // 上传的服务器接口地址
+ filePath: uploadFile,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
+ },
+ name, //上传的所需字段,后端提供
+ formData: {
+ user: 'test'
+ },
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
});
})
},
@@ -258,20 +292,54 @@ Page({
this.data.remark = options.detail.value;
},
- fileUpload(options){
- let file=options.detail;
+ /**
+ * 上传文件
+ * @param {*} options
+ */
+ fileUpload(options) {
+ let file = options.detail;
this.setData({
filesData: file
});
},
- // 手风琴
- onChange(event) {
- this.setData({
- activeName: event.detail,
- });
- },
-
+ // list 上传图片
+ onImagesArr(e) {
+ var data = this.data.imageInfoData
+ data = e.detail
+ this.setData({
+ imageInfoData: data
+ })
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ /**
+ * 切换上传文件类型
+ * @param {*} e
+ */
+ switchFiles(e) {
+ this.setData({
+ isFiles: !this.data.isFiles,
+ });
+ if(this.data.isFiles){
+ if(this.data.filesData.length==0){
+ let myImages = this.selectComponent("#myImage");
+ myImages.upload();
+ }
+ }else{
+ if(this.data.imageInfoData.length==0){
+ let myFiles = this.selectComponent("#myFiles");
+ myFiles.upload();
+ }
+ }
+ },
+
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
diff --git a/miniprogram/pages/project_flowable/initTask/index.wxml b/miniprogram/pages/project_flowable/initTask/index.wxml
index 5430243..2cb157f 100644
--- a/miniprogram/pages/project_flowable/initTask/index.wxml
+++ b/miniprogram/pages/project_flowable/initTask/index.wxml
@@ -1,120 +1,89 @@
-
- {{projectName}}
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
- 发起单位
-
- {{deptName}}
+
+ {{projectName}}
-
-
- 发起人
-
- {{nickName}}
+
+
+
+
+ {{item.name}}
+
+
+
-
-
- 审批事项
-
- {{approveTitle}}
-
-
-
- 审批内容
- [可上传PDF/图片/WORD/PPT/XLS格式]
-
-
-
-
-
-
- 申请说明
-
-
+
+ 发起单位
+
+ {{deptName}}
+
+
+ 发起人
+
+ {{nickName}}
+
+
+
+ 审批事项
+
+ {{approveTitle}}
+
+
+
+ 审批内容 [仅可上传图片]
+
+ 从微信上传文件
+
+
+
+
+
+
+
+ 审批内容 [仅可上传PDF文件]
+
+
+ 从相册上传图片
+
+
+
+
+
+
+
+ 已同时选择PDF文件和图片,将上传已选择的文件和图片。
+
+
+ 申请说明
+
+
+
+
+
+
+ 取消
+ 提交申请
-
-
- 取消
- 提交申请
-
-
+
数据加载中!请稍后...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/miniprogram/pages/project_flowable/myFlowDefinition/index.js b/miniprogram/pages/project_flowable/myFlowDefinition/index.js
index 515a4ef..30ff4c1 100644
--- a/miniprogram/pages/project_flowable/myFlowDefinition/index.js
+++ b/miniprogram/pages/project_flowable/myFlowDefinition/index.js
@@ -14,6 +14,7 @@ Page({
initData: {},
show:false,
listData:[],
+ category:null,
request:app.globalData.reqUrl
},
@@ -41,7 +42,8 @@ Page({
this.setData({
loginName:res.data.loginName,
projectId:app.globalData.projectId,
- initData:{text:app.globalData.projectName,id:app.globalData.projectId}
+ initData:{text:app.globalData.projectName,id:app.globalData.projectId},
+ category:app.globalData.category,
})
this.getListData(res.data.loginName);
}
@@ -49,12 +51,13 @@ Page({
},
/**
- * 查询项目举牌验收数据
+ * 查询申请类型列表
*/
getListData(loginName) {
var that = this;
let param = {
- "username": loginName
+ "username": loginName,
+ "category":this.data.category
}
wx.request({
url: app.globalData.reqUrl + '/wechat/flowTask/myFlowDefinitionList',
diff --git a/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml b/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
index e693a92..1f5beb5 100644
--- a/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
+++ b/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
@@ -32,7 +32,7 @@
-
+
暂无数据
diff --git a/miniprogram/pages/project_flowable/myProcessIns/index.js b/miniprogram/pages/project_flowable/myProcessIns/index.js
index 1a42815..a573091 100644
--- a/miniprogram/pages/project_flowable/myProcessIns/index.js
+++ b/miniprogram/pages/project_flowable/myProcessIns/index.js
@@ -20,6 +20,7 @@ Page({
allCount:0,
awaitCount:0,
finishedCount:0,
+ category:null,
},
/**
@@ -87,8 +88,13 @@ Page({
this.setData({
userId:res.data.userId,
projectId:app.globalData.projectId,
- initData:{text:app.globalData.projectName,id:app.globalData.projectId}
- })
+ category:app.globalData.category,
+ initData:{text:app.globalData.projectName,id:app.globalData.projectId},
+ pageNum:1,
+ pageSize:10,
+ lastDataSize:10,
+ listData:[]
+ })
this.getListData(res.data.userId);
}
})
@@ -104,11 +110,13 @@ Page({
return;
}
var that = this;
- //businessKey注解掉可以跨项目审批
+ //businessKey注解掉可以查询所有项目数据【跨项目】
let param = {
+ "businessKey":this.data.projectId,
"activeName":this.data.activeState,
"nowRole":"99",//这里只能查看自己的数据
- "nowUser":userId
+ "nowUser":userId,
+ "category":this.data.category
}
this.queryCount(param);
param.pageNum=that.data.pageNum;
diff --git a/miniprogram/pages/project_flowable/myProcessIns/index.wxml b/miniprogram/pages/project_flowable/myProcessIns/index.wxml
index 3e328df..e92a6d7 100644
--- a/miniprogram/pages/project_flowable/myProcessIns/index.wxml
+++ b/miniprogram/pages/project_flowable/myProcessIns/index.wxml
@@ -44,7 +44,7 @@
-
+
暂无数据
diff --git a/miniprogram/pages/quality_manage/index.wxml b/miniprogram/pages/quality_manage/index.wxml
index b022630..d38ef90 100644
--- a/miniprogram/pages/quality_manage/index.wxml
+++ b/miniprogram/pages/quality_manage/index.wxml
@@ -25,7 +25,7 @@
{{deptName}}
-
+
diff --git a/miniprogram/pages/safety_manage/index.wxml b/miniprogram/pages/safety_manage/index.wxml
index c8b6161..0e7d06d 100644
--- a/miniprogram/pages/safety_manage/index.wxml
+++ b/miniprogram/pages/safety_manage/index.wxml
@@ -25,7 +25,7 @@
{{deptName}}
-
+
diff --git a/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.wxml b/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.wxml
index 9d4a0e1..c702c19 100644
--- a/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.wxml
+++ b/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.wxml
@@ -26,7 +26,7 @@
{{deptName}}
-
+
diff --git a/miniprogram/utils/auth.js b/miniprogram/utils/auth.js
new file mode 100644
index 0000000..ce904f0
--- /dev/null
+++ b/miniprogram/utils/auth.js
@@ -0,0 +1,12 @@
+const TokenKey = 'YanZhu-App-Token'
+export function getToken() {
+ return wx.getStorageSync(TokenKey)
+}
+
+export function setToken(token) {
+ return wx.setStorageSync(TokenKey, token)
+}
+
+export function removeToken() {
+ return wx.removeStorageSync(TokenKey)
+}
\ No newline at end of file
diff --git a/miniprogram/utils/format.wxs b/miniprogram/utils/format.wxs
new file mode 100644
index 0000000..ca667c3
--- /dev/null
+++ b/miniprogram/utils/format.wxs
@@ -0,0 +1,36 @@
+function indexNumFormat(num) {
+ switch (num) {
+ case 0:
+ num = "Ⅰ";
+ break;
+ case 1:
+ num = "Ⅱ";
+ break;
+ case 2:
+ num = "Ⅲ";
+ break;
+ case 3:
+ num = "Ⅳ";
+ break;
+ case 4:
+ num = "Ⅴ";
+ break;
+ case 5:
+ num = "Ⅵ";
+ break;
+ case 6:
+ num = "Ⅶ";
+ break;
+ case 7:
+ num = "Ⅷ";
+ break;
+ case 8:
+ num = "Ⅸ";
+ break;
+ }
+ return num;
+}
+
+module.exports = {
+ indexNumFormat: indexNumFormat
+}
\ No newline at end of file
diff --git a/miniprogram/utils/request.js b/miniprogram/utils/request.js
new file mode 100644
index 0000000..c73b56e
--- /dev/null
+++ b/miniprogram/utils/request.js
@@ -0,0 +1,113 @@
+import config from '../config'
+import {
+ getToken,
+ removeToken
+} from './auth'
+
+const app = getApp()
+
+function doRequest(url, method = 'GET', data, header = {}) {
+ //安全白名单判断
+ if (config.noSecuritys.indexOf(url) == -1 && !getToken()) {
+ removeToken();
+ wx.redirectTo({
+ url: '../login/login',
+ });
+ }
+ wx.showLoading({
+ mask: true,
+ title: url == config.noSecuritys[1] ? '登录中' : '请等待'
+ })
+ return new Promise((resolve, reject) => {
+ wx.request({
+ url: config.baseUrl + url,
+ method: method,
+ data: data,
+ header: {
+ 'content-type': 'application/json',
+ 'Authorization': 'Bearer ' + getToken(),
+ ...header
+ },
+ timeout: config.timeOut,
+ success: function (res) {
+ wx.hideLoading()
+ const code = res.data.code || 200
+ if (code === 401) {
+ removeToken();
+ wx.redirectTo({
+ url: '../login/login',
+ });
+ } else if (code === 500 || code === 403) {
+ app.toast(res.data.msg);
+ setTimeout(() => {
+ resolve(res.data);
+ }, 800)
+ } else {
+ resolve(res.data);
+ }
+ },
+ fail: function (error) {
+ wx.hideLoading()
+ app.toast(error);
+ reject(error)
+ }
+ })
+ })
+}
+
+/**
+ * 这里考虑上传异步问题,封装为同步
+ */
+export function syncFileUpload(file) {
+ if (!getToken()) {
+ removeToken();
+ wx.redirectTo({
+ url: '../login/login',
+ });
+ }
+ wx.showLoading({
+ mask: true,
+ title: '正在上传资源'
+ })
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url: config.baseUrl + '/common/upload', // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ name: "file", //上传的所需字段,后端提供
+ formData: {},
+ success: (res) => {
+ // 上传完成操作
+ wx.hideLoading()
+ const code = res.data.code || 200
+ if (code === 401) {
+ removeToken();
+ wx.redirectTo({
+ url: '../login/login',
+ });
+ } else if (code === 500 || code === 403) {
+ app.toast(res.data.msg);
+ setTimeout(() => {
+ resolve(res.data);
+ }, 800)
+ resolve(res.data);
+ } else {
+ resolve(res.data);
+ }
+ },
+ fail: (error) => {
+ wx.hideLoading()
+ //上传失败:修改pedding为reject
+ app.toast("网络出错,上传失败")
+ reject(error)
+ }
+ });
+ })
+}
+
+export function request(options) {
+ return doRequest(options.url, options.method, options.data, options.header)
+}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index d0e773b..8738cf7 100644
--- a/project.config.json
+++ b/project.config.json
@@ -21,8 +21,6 @@
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": false,
- "useApiHook": false,
- "useApiHostProcess": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
@@ -38,11 +36,11 @@
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
- "condition": false
+ "condition": false,
+ "ignoreUploadUnusedFiles": true,
+ "useApiHook": false,
+ "useApiHostProcess": false
},
- "appid": "wxc44b5d588f599758",
- "projectname": "construction",
- "libVersion": "2.12.0",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
@@ -275,12 +273,14 @@
}
},
"srcMiniprogramRoot": "miniprogram/",
+ "editorSetting": {
+ "tabIndent": "auto",
+ "tabSize": 4
+ },
+ "libVersion": "2.12.0",
"packOptions": {
"ignore": [],
"include": []
},
- "editorSetting": {
- "tabIndent": "auto",
- "tabSize": 4
- }
+ "appid": "wx9997d071b4996f23"
}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index 0116ea0..c2b7548 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -1,7 +1,8 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "projectname": "jhwxapp",
+ "projectname": "jhwxapp-cf",
"setting": {
- "compileHotReLoad": true
+ "compileHotReLoad": true,
+ "urlCheck": false
}
}
\ No newline at end of file