first commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
.gitignore
|
||||
README.md
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
unpackage/
|
||||
dist/
|
||||
.svn/
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.project
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw*
|
||||
@@ -0,0 +1,37 @@
|
||||
stages:
|
||||
- build
|
||||
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image: docker:20.10.12
|
||||
|
||||
services:
|
||||
- name: docker:20.10.12-dind
|
||||
command:
|
||||
- "--registry-mirror=https://docker.210.30.200.148.nip.io/"
|
||||
- "--max-concurrent-downloads=1"
|
||||
|
||||
before_script:
|
||||
- docker info
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
||||
|
||||
script:
|
||||
- |
|
||||
# Git Tag 流水线使用版本号;main 分支流水线使用短提交号,避免生成过长的镜像标签。
|
||||
if [ -n "$CI_COMMIT_TAG" ]; then
|
||||
IMAGE_TAG="$CI_COMMIT_TAG"
|
||||
else
|
||||
IMAGE_TAG="$CI_COMMIT_SHORT_SHA"
|
||||
fi
|
||||
docker build -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" .
|
||||
docker tag "$CI_REGISTRY_IMAGE:$IMAGE_TAG" "$CI_REGISTRY_IMAGE:latest"
|
||||
docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
|
||||
docker push "$CI_REGISTRY_IMAGE:latest"
|
||||
|
||||
only:
|
||||
- main
|
||||
- tags
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
FROM node:20.18.3-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
|
||||
RUN npm config set registry https://registry.npmmirror.com \
|
||||
&& npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build \
|
||||
&& test -f /app/dist/build/h5/index.html
|
||||
|
||||
FROM nginx:1.29-alpine
|
||||
|
||||
# 清除 Nginx 自带欢迎页,只保留本次构建的 H5 静态文件。
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
COPY --from=builder /app/dist/build/h5/ /usr/share/nginx/html/
|
||||
|
||||
# 直接生成与原 static.json 核心规则等价的 Nginx 配置:
|
||||
# 1. 监听线上服务使用的 5000 端口。
|
||||
# 2. 支持外层代理保留或剥离 /h5 前缀。
|
||||
# 3. 未匹配的页面路由统一回退到 index.html。
|
||||
# 4. index.html 禁用缓存,避免发布后继续读取旧页面。
|
||||
RUN test -f /usr/share/nginx/html/index.html \
|
||||
&& printf '%s\n' \
|
||||
'server {' \
|
||||
' listen 5000;' \
|
||||
' listen [::]:5000;' \
|
||||
' server_name _;' \
|
||||
'' \
|
||||
' root /usr/share/nginx/html;' \
|
||||
' index index.html;' \
|
||||
'' \
|
||||
' location = /h5 {' \
|
||||
' return 301 /h5/;' \
|
||||
' }' \
|
||||
'' \
|
||||
' location = /h5/ {' \
|
||||
' rewrite ^ /index.html last;' \
|
||||
' }' \
|
||||
'' \
|
||||
' location /h5/ {' \
|
||||
' rewrite ^/h5/(.*)$ /$1 last;' \
|
||||
' }' \
|
||||
'' \
|
||||
' location / {' \
|
||||
' try_files $uri $uri/ /index.html;' \
|
||||
' }' \
|
||||
'' \
|
||||
' location = /index.html {' \
|
||||
' add_header Cache-Control "no-store, no-cache" always;' \
|
||||
' try_files $uri =404;' \
|
||||
' }' \
|
||||
'}' \
|
||||
> /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -0,0 +1,19 @@
|
||||
# my-project
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
@@ -0,0 +1,81 @@
|
||||
const webpack = require('webpack')
|
||||
const plugins = []
|
||||
|
||||
if (process.env.UNI_OPT_TREESHAKINGNG) {
|
||||
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js'))
|
||||
}
|
||||
|
||||
if (
|
||||
(
|
||||
process.env.UNI_PLATFORM === 'app-plus' &&
|
||||
process.env.UNI_USING_V8
|
||||
) ||
|
||||
(
|
||||
process.env.UNI_PLATFORM === 'h5' &&
|
||||
process.env.UNI_H5_BROWSER === 'builtin'
|
||||
)
|
||||
) {
|
||||
const path = require('path')
|
||||
|
||||
const isWin = /^win/.test(process.platform)
|
||||
|
||||
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
|
||||
|
||||
const input = normalizePath(process.env.UNI_INPUT_DIR)
|
||||
try {
|
||||
plugins.push([
|
||||
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'),
|
||||
{
|
||||
file (file) {
|
||||
file = normalizePath(file)
|
||||
if (file.indexOf(input) === 0) {
|
||||
return path.relative(input, file)
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
])
|
||||
} catch (e) { }
|
||||
}
|
||||
|
||||
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
|
||||
process.UNI_LIBRARIES.forEach(libraryName => {
|
||||
plugins.push([
|
||||
'import',
|
||||
{
|
||||
'libraryName': libraryName,
|
||||
'customName': (name) => {
|
||||
return `${libraryName}/lib/${name}/${name}`
|
||||
}
|
||||
}
|
||||
])
|
||||
})
|
||||
|
||||
if (process.env.UNI_PLATFORM !== 'h5') {
|
||||
plugins.push('@babel/plugin-transform-runtime')
|
||||
}
|
||||
|
||||
const config = {
|
||||
presets: [
|
||||
[
|
||||
'@vue/app',
|
||||
{
|
||||
modules: webpack.version[0] > 4 ? 'auto' : 'commonjs',
|
||||
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry'
|
||||
}
|
||||
]
|
||||
],
|
||||
plugins
|
||||
}
|
||||
|
||||
const UNI_H5_TEST = '**/@dcloudio/uni-h5/dist/index.umd.min.js'
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
config.overrides = [{
|
||||
test: UNI_H5_TEST,
|
||||
compact: true,
|
||||
}]
|
||||
} else {
|
||||
config.ignore = [UNI_H5_TEST]
|
||||
}
|
||||
|
||||
module.exports = config
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"types": [
|
||||
"@dcloudio/types",
|
||||
"miniprogram-api-typings",
|
||||
"mini-types"
|
||||
]
|
||||
}
|
||||
}
|
||||
Generated
+40776
File diff suppressed because it is too large
Load Diff
+121
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"name": "gh-h5",
|
||||
"version": "0.1.0",
|
||||
"engines": {
|
||||
"node": "16.14.0",
|
||||
"npm": "8.3.1"
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "npm run dev:h5",
|
||||
"build": "npm run build:h5",
|
||||
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
|
||||
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
|
||||
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
|
||||
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
|
||||
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
|
||||
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
|
||||
"build:mp-jd": "cross-env NODE_ENV=production UNI_PLATFORM=mp-jd vue-cli-service uni-build",
|
||||
"build:mp-kuaishou": "cross-env NODE_ENV=production UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build",
|
||||
"build:mp-lark": "cross-env NODE_ENV=production UNI_PLATFORM=mp-lark vue-cli-service uni-build",
|
||||
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
|
||||
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
|
||||
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
|
||||
"build:mp-xhs": "cross-env NODE_ENV=production UNI_PLATFORM=mp-xhs vue-cli-service uni-build",
|
||||
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
|
||||
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
|
||||
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
|
||||
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
|
||||
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
|
||||
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
|
||||
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
|
||||
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
|
||||
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
|
||||
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
|
||||
"dev:mp-jd": "cross-env NODE_ENV=development UNI_PLATFORM=mp-jd vue-cli-service uni-build --watch",
|
||||
"dev:mp-kuaishou": "cross-env NODE_ENV=development UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build --watch",
|
||||
"dev:mp-lark": "cross-env NODE_ENV=development UNI_PLATFORM=mp-lark vue-cli-service uni-build --watch",
|
||||
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
|
||||
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
|
||||
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch",
|
||||
"dev:mp-xhs": "cross-env NODE_ENV=development UNI_PLATFORM=mp-xhs vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch",
|
||||
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
|
||||
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
|
||||
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
|
||||
"test": "npm run test:h5",
|
||||
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
|
||||
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
|
||||
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
|
||||
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@antv/f2": "^3.7.0",
|
||||
"@dcloudio/uni-app": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-app-plus": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-h5": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-i18n": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-360": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-alipay": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-baidu": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-jd": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-kuaishou": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-lark": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-qq": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-toutiao": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-vue": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-weixin": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-mp-xhs": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-quickapp-native": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-quickapp-webview": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-stacktracey": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-stat": "^2.0.2-3070820230322001",
|
||||
"@vue/shared": "^3.0.0",
|
||||
"axios": "^1.3.4",
|
||||
"core-js": "^3.8.3",
|
||||
"flyio": "^0.6.2",
|
||||
"html5-qrcode": "^2.3.8",
|
||||
"jr-qrcode": "^1.1.4",
|
||||
"moment": "^2.29.4",
|
||||
"smooth-signature": "^1.0.15",
|
||||
"vant": "2.13.2",
|
||||
"vue": ">= 2.6.14 < 2.7",
|
||||
"vuex": "^3.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dcloudio/types": "^3.3.2",
|
||||
"@dcloudio/uni-automator": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-cli-i18n": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-cli-shared": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-helper-json": "*",
|
||||
"@dcloudio/uni-migration": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/uni-template-compiler": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/vue-cli-plugin-uni": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/webpack-uni-mp-loader": "^2.0.2-3070820230322001",
|
||||
"@dcloudio/webpack-uni-pages-loader": "^2.0.2-3070820230322001",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"babel-plugin-import": "^1.11.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"jest": "^25.4.0",
|
||||
"mini-types": "*",
|
||||
"miniprogram-api-typings": "*",
|
||||
"postcss-comment": "^2.0.0",
|
||||
"sass": "^1.60.0",
|
||||
"sass-loader": "^10.4.1",
|
||||
"vue-template-compiler": ">= 2.6.14 < 2.7"
|
||||
},
|
||||
"browserslist": [
|
||||
"Android >= 4.4",
|
||||
"ios >= 9"
|
||||
],
|
||||
"uni-app": {
|
||||
"scripts": {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const config = {
|
||||
parser: require('postcss-comment'),
|
||||
plugins: [
|
||||
require('postcss-import')({
|
||||
resolve (id, basedir, importOptions) {
|
||||
if (id.startsWith('~@/')) {
|
||||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3))
|
||||
} else if (id.startsWith('@/')) {
|
||||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2))
|
||||
} else if (id.startsWith('/') && !id.startsWith('//')) {
|
||||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1))
|
||||
}
|
||||
return id
|
||||
}
|
||||
}),
|
||||
require('autoprefixer')({
|
||||
remove: process.env.UNI_PLATFORM !== 'h5'
|
||||
}),
|
||||
require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
|
||||
]
|
||||
}
|
||||
if (webpack.version[0] > 4) {
|
||||
delete config.parser
|
||||
}
|
||||
module.exports = config
|
||||
@@ -0,0 +1,5 @@
|
||||
[[build.buildpacks]]
|
||||
uri = "https://cnb-shim.wuweixin.com/v1/heroku/nodejs"
|
||||
|
||||
[[build.buildpacks]]
|
||||
uri = "https://cnb-shim.wuweixin.com/v1/heroku-community/static"
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>
|
||||
<%= htmlWebpackPlugin.options.title %>
|
||||
</title>
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>Please enable JavaScript to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
import Vue from 'vue'
|
||||
declare module "vue/types/options" {
|
||||
type Hooks = App.AppInstance & Page.PageInstance;
|
||||
interface ComponentOptions<V extends Vue> extends Hooks {
|
||||
/**
|
||||
* 组件类型
|
||||
*/
|
||||
mpType?: string;
|
||||
}
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
declare module "*.vue" {
|
||||
import Vue from 'vue'
|
||||
export default Vue
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<script>
|
||||
import config from './config'
|
||||
import store from '@/store'
|
||||
import {getToken} from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
this.initApp()
|
||||
},
|
||||
methods: {
|
||||
// 初始化应用
|
||||
initApp() {
|
||||
// 初始化应用配置
|
||||
this.initConfig()
|
||||
// 检查用户登录状态
|
||||
//#ifdef H5
|
||||
this.checkLogin()
|
||||
//#endif
|
||||
},
|
||||
initConfig() {
|
||||
this.globalData.config = config
|
||||
},
|
||||
checkLogin() {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '@/static/scss/index.scss';
|
||||
@import '../node_modules/vant/lib/index.css';
|
||||
</style>
|
||||
@@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取所有的教代会
|
||||
export const getAllJdh = async () => {
|
||||
const { data } = await request.get('/jdh/common/getAllJdhxx')
|
||||
return data
|
||||
}
|
||||
|
||||
// 获取教代会工作资料类型
|
||||
export const getGzzllx = async () => {
|
||||
const { data } = await request.get('/jdh/common/getGzzllx')
|
||||
return data
|
||||
}
|
||||
|
||||
//获取二级教代会(双代会)工作资料类型
|
||||
export const getJdh2Gzzllx = async () => {
|
||||
const {data} = await request.get("/jdh/common/getJdh2Gzzllx")
|
||||
return data
|
||||
}
|
||||
|
||||
//获取所有开启的教代会
|
||||
export const getOpenJdh = async () => {
|
||||
const {data} = await request.get("/jdh/common/getOpenJdhxx")
|
||||
return data
|
||||
}
|
||||
|
||||
//获取代表团
|
||||
export const getDbt = async (jdhId) => {
|
||||
const {data} = await request.get("/jdh/common/getDbt", {params: {jdhId: jdhId}})
|
||||
return data
|
||||
}
|
||||
|
||||
//根据代表团查询工会
|
||||
export const getUnionsByDelegationId = async (delegationId) => {
|
||||
const {data} = await request.get("/jdh/common/getUnionsByDelegationId", {params: {delegationId: delegationId}})
|
||||
return data
|
||||
}
|
||||
|
||||
//获取所有开启的工代会
|
||||
export const getOpenGdh = async () => {
|
||||
const {data} = await request.get("/jdh/gdh/common/getOpenGdh")
|
||||
return data
|
||||
}
|
||||
|
||||
//获取工代会代表团
|
||||
export const getGdhDbt = async (jdhId) => {
|
||||
const {data} = await request.get("/jdh/gdh/common/getDbt", {params: {jdhId: jdhId}})
|
||||
return data
|
||||
}
|
||||
|
||||
//获取代表可以操作的教代会
|
||||
export const getJdhByDb = async () => {
|
||||
const {data} = await request.get("/jdh/common/getJdhByDb")
|
||||
return data
|
||||
}
|
||||
|
||||
//获取代表可以操作的开启的教代会
|
||||
export const getOpenJdhByDb = async () => {
|
||||
const {data} = await request.get("/jdh/common/getOpenMeeting")
|
||||
return data
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 登录方法
|
||||
export function login(username, password, code, uuid) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
code,
|
||||
uuid
|
||||
}
|
||||
return request({
|
||||
'url': '/auth/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
'method': 'post',
|
||||
'data': data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//cas登录
|
||||
export function casLogin(params) {
|
||||
return request({
|
||||
url: '/auth/casLogin',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
data: {},
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
return request({
|
||||
'url': '/system/user/getInfo',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
'url': '/auth/logout',
|
||||
'method': 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
'url': '/code',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询参数列表
|
||||
export function listConfig(query) {
|
||||
return request({
|
||||
url: '/system/config/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询参数详细
|
||||
export function getConfig(configId) {
|
||||
return request({
|
||||
url: '/system/config/' + configId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据参数键名查询参数值
|
||||
export function getConfigKey(configKey) {
|
||||
return request({
|
||||
url: '/system/config/configKey/' + configKey,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增参数配置
|
||||
export function addConfig(data) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改参数配置
|
||||
export function updateConfig(data) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除参数配置
|
||||
export function delConfig(configId) {
|
||||
return request({
|
||||
url: '/system/config/' + configId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 刷新参数缓存
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/config/refreshCache',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典数据列表
|
||||
export function listData(query) {
|
||||
return request({
|
||||
url: '/system/dict/data/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export function getData(dictCode) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType) {
|
||||
return request({
|
||||
url: '/system/dict/data/type/' + dictType,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export function addData(data) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export function updateData(data) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export function delData(dictCode) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import upload from '@/utils/upload'
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) {
|
||||
const data = {
|
||||
oldPassword,
|
||||
newPassword
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/profile/updatePwd',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) {
|
||||
return upload({
|
||||
url: '/system/user/profile/avatar',
|
||||
name: data.name,
|
||||
filePath: data.filePath
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export const API_UPLOAD_FILE = '/file/uploadFiles'
|
||||
export const API_DELETE_FILE = '/file/removeFiles'
|
||||
export const API_CONVERT_PDF = '/file/convertToPdf'
|
||||
export const API_FILE_STREAM = '/file/fileStream'
|
||||
|
||||
//手机端扫码上传
|
||||
export const API_UPLOAD_FILE_H5_QRCODE = '/system/uploadByQrCode/uploads'
|
||||
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-for="(item, index) in options">
|
||||
<template v-if="values.includes(item.value)">
|
||||
<span
|
||||
v-if="item.raw.listClass == 'default' || item.raw.listClass == ''"
|
||||
:key="item.value"
|
||||
:index="index"
|
||||
:class="item.raw.cssClass"
|
||||
>{{ item.label }}</span
|
||||
>
|
||||
<van-tag
|
||||
v-else
|
||||
:disable-transitions="true"
|
||||
:key="item.value"
|
||||
:index="index"
|
||||
:type="item.raw.listClass == 'primary' ? '' : item.raw.listClass"
|
||||
:class="item.raw.cssClass"
|
||||
>
|
||||
{{ item.label }}
|
||||
</van-tag>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "DictTag",
|
||||
props: {
|
||||
options: {
|
||||
type: Array,
|
||||
default: null,
|
||||
},
|
||||
value: [Number, String, Array],
|
||||
},
|
||||
computed: {
|
||||
values() {
|
||||
if (this.value !== null && typeof this.value !== 'undefined') {
|
||||
return Array.isArray(this.value) ? this.value : [String(this.value)];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-tag + .el-tag {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="viewFile" v-if="fileList && fileList.length>0">
|
||||
<view v-for="item in fileList" :key="item.link" title="点击查看" class="viewFileItem" @click="showSource(item)">
|
||||
<template v-if="isImg(item.name)">
|
||||
<image :src="item.link" fit="cover" style="width: 100%; height: 100%;"></image>
|
||||
</template>
|
||||
<template v-else>
|
||||
<image :src="`../../static/svg/file/${getIconClass(item.name)}.svg`" fit="cover"
|
||||
style="width: 100%; height: 100%;"></image>
|
||||
<!-- <svg-icon :icon-class="getIconClass(item.name)"/> -->
|
||||
</template>
|
||||
<view :title="item.name" class="viewFileName">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="text-center mt10 mb10">
|
||||
{{ emptyTips }}
|
||||
</view>
|
||||
|
||||
<van-popup v-model="videoPoupu" :style="{ height: '225px',width:'300px','overflow-y':'visible' }" closeable
|
||||
@close="videoContext.pause()">
|
||||
<video id="myVideo" v-if="videoSrc" :src="videoSrc" controls></video>
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model="audioPoupu" :style="{ height: '225px',width:'300px','overflow-y':'visible' }" closeable
|
||||
@close="audioContext.pause()">
|
||||
<audio id="myAudio" v-if="audioSrc" :src="audioSrc" controls></audio>
|
||||
</van-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
wpUploadFileTools,
|
||||
wpUploadFileTypeResolving
|
||||
} from '@/utils/fileTool'
|
||||
import {
|
||||
API_CONVERT_PDF
|
||||
} from "@/api/upload/upload";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
props: {
|
||||
files: {
|
||||
type: Array | String,
|
||||
required: true
|
||||
},
|
||||
emptyTips: {
|
||||
type: String,
|
||||
default: '暂无附件'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
videoSrc: null,
|
||||
audioSrc: null,
|
||||
videoPoupu: false,
|
||||
audioPoupu: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imgs() {
|
||||
return this.fileList.filter(v => this.isImg(v.name)).map(v => v.link)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
files: {
|
||||
handler: function (val) {
|
||||
if (val == null) {
|
||||
this.fileList = []
|
||||
} else {
|
||||
const t = typeof val
|
||||
if (t === 'string') {
|
||||
this.fileList = JSON.parse(val)
|
||||
} else if (t === 'object') {
|
||||
if (Array.isArray(val)) {
|
||||
this.fileList = val
|
||||
} else {
|
||||
this.fileList = [val]
|
||||
}
|
||||
} else if (t === 'undefined') {
|
||||
this.fileList = []
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isImg(name) {
|
||||
return wpUploadFileTools.resolvingShowByFileName(name) === 1
|
||||
},
|
||||
isVideo(name) {
|
||||
return wpUploadFileTools.resolvingShowByFileName(name) === 2
|
||||
},
|
||||
isAudio(name) {
|
||||
return wpUploadFileTools.resolvingShowByFileName(name) === 3
|
||||
},
|
||||
showSource(file) {
|
||||
if (this.isImg(file.name)) {
|
||||
const imgIndex = this.imgs.findIndex(v => v === file.link)
|
||||
uni.previewImage({
|
||||
current: imgIndex,
|
||||
urls: this.imgs
|
||||
})
|
||||
} else if (this.isVideo(file.name)) {
|
||||
this.videoPoupu = true
|
||||
this.videoSrc = file.link
|
||||
this.videoContext = uni.createVideoContext('myVideo')
|
||||
|
||||
} else if (this.isAudio(file.name)) {
|
||||
this.audioPoupu = true
|
||||
this.audioSrc = file.link
|
||||
this.audioContext = uni.createAudioContext('myAudio')
|
||||
|
||||
} else {
|
||||
const isDoc = wpUploadFileTypeResolving.isDoc(file.name)
|
||||
const isExcel = wpUploadFileTypeResolving.isExcel(file.name)
|
||||
const isPPT = wpUploadFileTypeResolving.isPPT(file.name)
|
||||
const isPdf = wpUploadFileTypeResolving.isPdf(file.name)
|
||||
const isTxt = wpUploadFileTypeResolving.isTxt(file.name)
|
||||
|
||||
//这些都可以转pdf吧
|
||||
if (isDoc || isExcel || isPPT || isPdf || isTxt) {
|
||||
this.$modal.loading('加载中')
|
||||
this.$http.get(API_CONVERT_PDF, {
|
||||
params: {
|
||||
link: file.link
|
||||
},
|
||||
responseType: 'blob'
|
||||
}).then(resp => {
|
||||
this.$modal.closeLoading()
|
||||
window.open(window.URL.createObjectURL(new Blob([resp], {
|
||||
type: "application/pdf"
|
||||
})))
|
||||
})
|
||||
} else {
|
||||
this.$modal.msg('你下载下来看吧')
|
||||
}
|
||||
}
|
||||
},
|
||||
getIconClass(name) {
|
||||
if (wpUploadFileTypeResolving.isDoc(name)) {
|
||||
return 'word'
|
||||
} else if (wpUploadFileTypeResolving.isExcel(name)) {
|
||||
return 'excel'
|
||||
} else if (wpUploadFileTypeResolving.isPdf(name)) {
|
||||
return 'pdf'
|
||||
} else if (wpUploadFileTypeResolving.isVideoByName(name)) {
|
||||
return 'video'
|
||||
} else if (wpUploadFileTypeResolving.isAudioByName(name)) {
|
||||
return 'audio'
|
||||
}
|
||||
return 'file'
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.viewFile {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin: 20rpx 0;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.viewFileItem {
|
||||
width: calc((100% - 20rpx * 2) / 3);
|
||||
height: 236rpx;
|
||||
margin-right: 20rpx;
|
||||
position: relative;
|
||||
transition: all 500ms;
|
||||
cursor: pointer;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
img {
|
||||
//padding: 10px 10px;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.viewFileItem:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
|
||||
.viewFileItem:hover {
|
||||
background-color: rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.viewFileName {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
padding: 0 20rpx;
|
||||
color: white;
|
||||
background-color: rgb(160, 160, 160);
|
||||
border-radius: 4rpx;
|
||||
opacity: .95;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<view style="width: 100%;min-height: 200rpx">
|
||||
<uni-file-picker
|
||||
ref="upload"
|
||||
v-model="fileList"
|
||||
fileMediatype="image"
|
||||
:del-icon="isDelete"
|
||||
@delete="delFile"
|
||||
:limit="limit"
|
||||
return-type="array"
|
||||
:auto-upload="false"
|
||||
mode="grid"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {API_UPLOAD_FILE} from "../../api/upload/upload";
|
||||
import upload from "../../utils/upload";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
model: {
|
||||
prop: 'files',
|
||||
event: 'change'
|
||||
},
|
||||
props: {
|
||||
files: {
|
||||
type: Array | Object,
|
||||
required: false,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 5
|
||||
},
|
||||
isDelete: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//fileList 点击删除后组件会改变数据结构 再搞个cloneFiles同步数据
|
||||
fileList: [],
|
||||
cloneFiles: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
files(val) {
|
||||
if (val === null) {
|
||||
this.fileList = []
|
||||
this.cloneFiles = []
|
||||
} else {
|
||||
// 深度克隆原始数据(两种独立方式)
|
||||
const rawData = Array.isArray(val) ? [...val] : JSON.parse(val);
|
||||
|
||||
// 创建完全独立的 cloneFiles
|
||||
this.cloneFiles = rawData.map(item => ({
|
||||
...JSON.parse(JSON.stringify(item)), // 深度克隆
|
||||
}));
|
||||
|
||||
// 创建完全独立的 fileList(带URL转换)
|
||||
this.fileList = rawData.map(item => ({
|
||||
...JSON.parse(JSON.stringify(item)), // 深度克隆
|
||||
url: this.$filePreview(item.link) // 转换URL
|
||||
}));
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
upload() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let files = this.$refs.upload.filesList
|
||||
files = files.filter(v => !this.cloneFiles.map(v => v.url).includes(v.url))
|
||||
const uploads = files.filter(v => v.status === 'ready').map(v => {
|
||||
return upload({filePath: v.path, url: API_UPLOAD_FILE})
|
||||
})
|
||||
console.log(uploads.length)
|
||||
if (uploads && uploads.length > 0) {
|
||||
Promise.all(uploads).then((res) => {
|
||||
const r = res.flatMap(r => r.data)
|
||||
this.fileList = [...this.fileList.concat(r)]
|
||||
this.cloneFiles = [...this.cloneFiles.concat(r)]
|
||||
console.log(this.fileList)
|
||||
console.log(this.cloneFiles)
|
||||
debugger
|
||||
// 还原url
|
||||
const newCloneFiles = this.cloneFiles.map(v => ({
|
||||
...v,
|
||||
url: v.link
|
||||
}))
|
||||
this.$emit('change', newCloneFiles)
|
||||
resolve()
|
||||
}).catch((err) => {
|
||||
reject(err)
|
||||
})
|
||||
} else {
|
||||
this.$emit('change', this.cloneFiles)
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* template 剩余的文件
|
||||
* @param tempFile
|
||||
* @param tempFilePath
|
||||
*/
|
||||
delFile({tempFile, tempFilePath}) {
|
||||
const index = this.cloneFiles.findIndex(v => v.url === tempFile.url)
|
||||
this.cloneFiles.splice(index, 1)
|
||||
console.log(this.fileList)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<image
|
||||
:src="$filePreview(src)"
|
||||
mode="cover"
|
||||
:style="`width:${realWidth};height:${realHeight};`"
|
||||
>
|
||||
</image>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ImagePreview",
|
||||
props: {
|
||||
src: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
width: {
|
||||
type: [Number, String],
|
||||
default: ""
|
||||
},
|
||||
height: {
|
||||
type: [Number, String],
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
realWidth() {
|
||||
return typeof this.width == "string" ? this.width : `${this.width}px`;
|
||||
},
|
||||
realHeight() {
|
||||
return typeof this.height == "string" ? this.height : `${this.height}px`;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created() {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-image {
|
||||
border-radius: 5px;
|
||||
background-color: #ebeef5;
|
||||
box-shadow: 0 0 5px 1px #ccc;
|
||||
|
||||
::v-deep .el-image__inner {
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .image-slot {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #909399;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
*Desc:
|
||||
*Create by: jug
|
||||
*Create time:2023/10/12/14:45
|
||||
*/
|
||||
<template>
|
||||
<div id="qr-code-full-region"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Html5Qrcode, Html5QrcodeScanner} from "html5-qrcode";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
props: {
|
||||
qrbox: {
|
||||
type: Number,
|
||||
default: 250
|
||||
},
|
||||
fps: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
const config = {
|
||||
fps: this.fps,
|
||||
qrbox: this.qrbox,
|
||||
};
|
||||
const html5QrcodeScanner = new Html5QrcodeScanner('qr-code-full-region', config);
|
||||
html5QrcodeScanner.render(this.onScanSuccess);
|
||||
console.log(this)
|
||||
|
||||
},
|
||||
methods: {
|
||||
onScanSuccess(decodedText, decodedResult) {
|
||||
this.$emit('result', decodedText, decodedResult);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-show="!showCanvas" @click="showCanvas = true" class="open-signature-text">打开签字板</view>
|
||||
<image :src="value" style="width: 100%;height: 300rpx"></image>
|
||||
<van-popup v-model="showCanvas"
|
||||
position="bottom"
|
||||
:close-on-click-overlay="false"
|
||||
:style="{ height: '100%',width:'100%' }">
|
||||
<div class="signature-wrap">
|
||||
<div class="action">
|
||||
<div class="action-buttons">
|
||||
<button @click="clear" class="action-button-danger">清空</button>
|
||||
<button @click="undo" class="action-button-warning">撤销</button>
|
||||
<button @click="save" class="action-button-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="border: 2px dashed #ccc;border-radius: 10px">
|
||||
<l-signature disableScroll ref="signatureRef" open-smooth :pen-size="4" landscape prefer-to-data-u-r-l background-color="#f6f6f6"></l-signature>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import LSignature from "@/uni_modules/lime-sginature/components/l-signature/l-signature.vue";
|
||||
|
||||
let signature = null
|
||||
export default {
|
||||
name: "index",
|
||||
components: {LSignature},
|
||||
props: {
|
||||
value: String,
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'input'
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showCanvas:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clear() {
|
||||
this.$refs.signatureRef.clear()
|
||||
},
|
||||
undo() {
|
||||
this.$refs.signatureRef.undo()
|
||||
},
|
||||
rotate() {
|
||||
|
||||
},
|
||||
save() {
|
||||
this.$refs.signatureRef.canvasToTempFilePath({
|
||||
success: (res) => {
|
||||
// 是否为空画板 无签名
|
||||
this.showCanvas = false
|
||||
if (res.isEmpty) {
|
||||
this.$emit('input',null)
|
||||
}else{
|
||||
this.$emit('input',res.tempFilePath)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.signature-wrap {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.open-signature-text{
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.signature-wrap .action {
|
||||
width: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.signature-wrap .action .action-buttons {
|
||||
white-space: nowrap;
|
||||
transform: rotate(90deg);
|
||||
display: flex;
|
||||
column-gap: 10px;
|
||||
}
|
||||
|
||||
.signature-wrap .action .action-buttons button {
|
||||
color: #ffffff;
|
||||
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
height: auto;
|
||||
padding: 3px 12px;
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.4;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.15s ease;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.action-button-primary {
|
||||
background-color: #1677ff;
|
||||
border: 1px solid #1677ff;
|
||||
}
|
||||
|
||||
.action-button-danger {
|
||||
background-color: #ff3141;
|
||||
border: 1px solid #ff3141;
|
||||
}
|
||||
|
||||
.action-button-warning {
|
||||
background-color: #ff8f1f;
|
||||
border: 1px solid #ff8f1f;
|
||||
}
|
||||
|
||||
.signature-wrap canvas {
|
||||
flex: 1;
|
||||
border-radius: 10px;
|
||||
border: 2px dashed #ccc;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
||||
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
||||
<use :xlink:href="iconName" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { isExternal } from '@/plugins/validate'
|
||||
|
||||
export default {
|
||||
name: 'SvgIcon',
|
||||
props: {
|
||||
iconClass: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isExternal() {
|
||||
return isExternal(this.iconClass)
|
||||
},
|
||||
iconName() {
|
||||
return `#icon-${this.iconClass}`
|
||||
},
|
||||
svgClass() {
|
||||
if (this.className) {
|
||||
return 'svg-icon ' + this.className
|
||||
} else {
|
||||
return 'svg-icon'
|
||||
}
|
||||
},
|
||||
styleExternalIcon() {
|
||||
return {
|
||||
mask: `url(${this.iconClass}) no-repeat 50% 50%`,
|
||||
'-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.svg-external-icon {
|
||||
background-color: currentColor;
|
||||
mask-size: cover!important;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
*Desc: 系统参数获取
|
||||
*Create by: jug
|
||||
*Create time:2023/1/13/14:29
|
||||
*/
|
||||
import {getConfigKey} from "@/api/system/config";
|
||||
import Vue from 'vue'
|
||||
|
||||
class SysConfig {
|
||||
constructor(config) {
|
||||
this.config = config
|
||||
}
|
||||
|
||||
async init(configNames) {
|
||||
const ps = [];
|
||||
configNames.forEach((name) => {
|
||||
Vue.set(this.config, name, null)
|
||||
ps.push(
|
||||
getConfigKey(name).then((res) => {
|
||||
this.config[name] = Object.freeze(res.msg)
|
||||
})
|
||||
)
|
||||
})
|
||||
await Promise.all(ps)
|
||||
}
|
||||
}
|
||||
|
||||
const install = function (Vue) {
|
||||
Vue.mixin({
|
||||
data() {
|
||||
if (this.$options.configs instanceof Array && this.$options.configs.length > 0) {
|
||||
return {config: {}};
|
||||
} else {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$options.configs instanceof Array && this.$options.configs.length > 0) {
|
||||
new SysConfig(this.config).init(this.$options.configs);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default {install}
|
||||
@@ -0,0 +1,48 @@
|
||||
import Vue from 'vue'
|
||||
import {getDicts} from '@/api/system/dict/data'
|
||||
|
||||
class SysDict {
|
||||
constructor(dict) {
|
||||
this.dict = dict
|
||||
}
|
||||
|
||||
async init(dictNames) {
|
||||
const ps = [];
|
||||
dictNames.forEach((name) => {
|
||||
Vue.set(this.dict.type, name, null)
|
||||
ps.push(
|
||||
getDicts(name).then((res) => {
|
||||
const dictValue = res.data.map(v => {
|
||||
return {
|
||||
text:v.dictLabel,
|
||||
label: v.dictLabel,
|
||||
value: v.dictValue,
|
||||
raw: v
|
||||
}
|
||||
})
|
||||
this.dict.type[name] = Object.freeze(dictValue)
|
||||
})
|
||||
)
|
||||
})
|
||||
await Promise.all(ps)
|
||||
}
|
||||
}
|
||||
|
||||
const install = function (Vue) {
|
||||
Vue.mixin({
|
||||
data() {
|
||||
if (this.$options.dicts instanceof Array && this.$options.dicts.length > 0) {
|
||||
return {dict: {type: {}}};
|
||||
} else {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$options.dicts instanceof Array && this.$options.dicts.length > 0) {
|
||||
new SysDict(this.dict).init(this.$options.dicts);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default {install}
|
||||
@@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<div>
|
||||
<van-form @submit="onSubmit" ref="form">
|
||||
<template v-for="column in dynamicData">
|
||||
<!-- 文本、数值、时间 -->
|
||||
<template v-if="['VARCHAR','TEXT','INT','DATE','DATETIME'].includes(column.columnType)">
|
||||
<van-field class="field" v-model="column.columnValue"
|
||||
:clickable="['SELECT'].includes(column.columnFormType)" :label="column.columnName"
|
||||
:name="column.columnCode"
|
||||
:placeholder="(['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName"
|
||||
:readonly="['SELECT'].includes(column.columnFormType)"
|
||||
:rules="[{ required: column.isRequired, message: (['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName }]"
|
||||
:required="column.isRequired" @click="selectFieldClick(column)"></van-field>
|
||||
|
||||
<van-popup v-if="['SELECT'].includes(column.columnFormType)"
|
||||
v-model="pickerStates[column.columnCode + 'Picker']" position="bottom">
|
||||
<template v-if="['DATETIME','DATE'].includes(column.columnType)">
|
||||
<van-datetime-picker :title="column.columnName"
|
||||
:type="column.columnType.toLocaleLowerCase()" show-toolbar
|
||||
@cancel="pickerStates[column.columnCode + 'Picker'] = false; column.columnValue = ''"
|
||||
@confirm="(time)=>{dateTimePickerConfirm(time,column)}" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-picker :columns="column.selectValues" :title="column.columnName" show-toolbar
|
||||
@cancel="pickerStates[column.columnCode + 'Picker'] = false; column.columnValue = ''"
|
||||
@confirm="(value)=>{ordinaryPickerConfirm(value,column)}" />
|
||||
</template>
|
||||
</van-popup>
|
||||
</template>
|
||||
<!-- 单选框 -->
|
||||
<template v-else-if="['BOOLEAN'].includes(column.columnType)">
|
||||
|
||||
</template>
|
||||
<!-- 文件 -->
|
||||
<template v-else-if="['JSON'].includes(column.columnType)">
|
||||
<van-field :required="column.isRequired" :label="column.columnName"
|
||||
:rules="[{ required: column.isRequired, message: '请上传' + column.columnName }]">
|
||||
<template #input>
|
||||
<!-- <vant_file_upload :files.sync="column.columnValue" :max="column.fileNumber"
|
||||
:type="column.fileType"></vant_file_upload> -->
|
||||
</template>
|
||||
</van-field>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</van-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TrainDynamicForm',
|
||||
props: {
|
||||
dynamicData: {
|
||||
type: Array, default: () => {return []}
|
||||
}
|
||||
},
|
||||
model: {
|
||||
prop: 'dynamicData',
|
||||
event: 'updateDynamicData'
|
||||
},
|
||||
watch: {
|
||||
dynamicData: {
|
||||
handler: function(newValue, oldValue) {
|
||||
this.$emit('updateDynamicData', newValue)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//所有的picker状态
|
||||
pickerStates: {},
|
||||
fileList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validForm() {
|
||||
try {
|
||||
this.$refs.form.validate().then(() => {
|
||||
return true
|
||||
}).catch(() => {
|
||||
return false
|
||||
})
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
|
||||
/*return new Promise(resolve => {
|
||||
this.$refs.form.validate().then(() => {
|
||||
resolve(true)
|
||||
}).catch(() => {
|
||||
resolve(false)
|
||||
})
|
||||
})*/
|
||||
|
||||
},
|
||||
onSubmit() {
|
||||
|
||||
},
|
||||
selectFieldClick(column) {
|
||||
console.log(column)
|
||||
this.$set(this.pickerStates, column.columnCode + 'Picker', true)
|
||||
if (!['DATE', 'DATETIME'].includes(column.columnType)) {
|
||||
//说明是普通的下拉框
|
||||
// column.selectValues = ['1', '2', '3']
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 时间picker确认
|
||||
* @param time
|
||||
* @param column
|
||||
*/
|
||||
dateTimePickerConfirm(time, column) {
|
||||
if (column.columnType === 'DATE') {
|
||||
column.columnValue = moment(time).format('YYYY-MM-DD')
|
||||
} else if (column.columnType === 'DATETIME') {
|
||||
column.columnValue = moment(time).format('YYYY-MM-DD HH:mm:ss')
|
||||
} else {
|
||||
//预留别的类型
|
||||
column.columnValue = moment(time).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
this.pickerStates[column.columnCode + 'Picker'] = false
|
||||
},
|
||||
/**
|
||||
* 普通picker确认
|
||||
* @param value
|
||||
* @param column
|
||||
*/
|
||||
ordinaryPickerConfirm(value, column) {
|
||||
column.columnValue = value
|
||||
this.pickerStates[column.columnCode + 'Picker'] = false
|
||||
},
|
||||
/**
|
||||
* 文件读取
|
||||
*/
|
||||
fileAfterRead(file, column) {
|
||||
|
||||
|
||||
console.log(file)
|
||||
console.log(column)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.dynamicData)
|
||||
// this.dynamicData.forEach(v => {
|
||||
// if (v.columnFormType === 'SELECT') {
|
||||
// v.columnPickerName = v.columnCode+'Picker'
|
||||
// }
|
||||
// })
|
||||
// console.log(this.dynamicData)
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.field .van-field__error-message {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<view class="uni-section">
|
||||
<view class="uni-section-header" @click="onClick">
|
||||
<view class="uni-section-header__decoration" v-if="type" :class="type" />
|
||||
<slot v-else name="decoration"></slot>
|
||||
|
||||
<view class="uni-section-header__content">
|
||||
<text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
|
||||
<text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
|
||||
</view>
|
||||
|
||||
<view class="uni-section-header__slot-right">
|
||||
<slot name="right"></slot>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="uni-section-content" :style="{padding: _padding}">
|
||||
<slot />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
* Section 标题栏
|
||||
* @description 标题栏
|
||||
* @property {String} type = [line|circle|square] 标题装饰类型
|
||||
* @value line 竖线
|
||||
* @value circle 圆形
|
||||
* @value square 正方形
|
||||
* @property {String} title 主标题
|
||||
* @property {String} titleFontSize 主标题字体大小
|
||||
* @property {String} titleColor 主标题字体颜色
|
||||
* @property {String} subTitle 副标题
|
||||
* @property {String} subTitleFontSize 副标题字体大小
|
||||
* @property {String} subTitleColor 副标题字体颜色
|
||||
* @property {String} padding 默认插槽 padding
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'UniSection',
|
||||
emits:['click'],
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: ''
|
||||
},
|
||||
titleFontSize: {
|
||||
type: String,
|
||||
default: '14px'
|
||||
},
|
||||
titleColor:{
|
||||
type: String,
|
||||
default: '#333'
|
||||
},
|
||||
subTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
subTitleFontSize: {
|
||||
type: String,
|
||||
default: '12px'
|
||||
},
|
||||
subTitleColor: {
|
||||
type: String,
|
||||
default: '#999'
|
||||
},
|
||||
padding: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
_padding(){
|
||||
if(typeof this.padding === 'string'){
|
||||
return this.padding
|
||||
}
|
||||
|
||||
return this.padding?'10px':''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
title(newVal) {
|
||||
if (uni.report && newVal !== '') {
|
||||
uni.report('title', newVal)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
this.$emit('click')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
$uni-primary: #2979ff !default;
|
||||
|
||||
.uni-section {
|
||||
background-color: #fff;
|
||||
.uni-section-header {
|
||||
position: relative;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 12px 10px;
|
||||
font-weight: normal;
|
||||
|
||||
&__decoration{
|
||||
margin-right: 6px;
|
||||
background-color: $uni-primary;
|
||||
&.line {
|
||||
width: 4px;
|
||||
height: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
&.circle {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-top-right-radius: 50px;
|
||||
border-top-left-radius: 50px;
|
||||
border-bottom-left-radius: 50px;
|
||||
border-bottom-right-radius: 50px;
|
||||
}
|
||||
|
||||
&.square {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
&__content {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
color: #333;
|
||||
|
||||
.distraction {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
&-sub {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
&__slot-right{
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-section-content{
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,27 @@
|
||||
// 应用全局配置
|
||||
module.exports = {
|
||||
baseUrl: 'http://192.168.21.212:8080',
|
||||
// baseUrl: 'https://zhgh.neu.edu.cn/prod-api',
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
name: "gh-app",
|
||||
// 应用版本
|
||||
version: "1.1.0",
|
||||
// 应用logo
|
||||
logo: "/static/img.png",
|
||||
// 官方网站
|
||||
site_url: "",
|
||||
// 政策协议
|
||||
agreements: [{
|
||||
title: "隐私政策",
|
||||
url: ""
|
||||
},
|
||||
{
|
||||
title: "用户服务协议",
|
||||
url: ""
|
||||
}
|
||||
]
|
||||
},
|
||||
sso: false
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import store from './store' // store
|
||||
import plugins from './plugins' // plugins
|
||||
import './permission' // permission
|
||||
import request from './utils/request.js' // http
|
||||
import Vant from 'vant'
|
||||
import AMapLoader from '@amap/amap-jsapi-loader'
|
||||
import moment from 'moment'
|
||||
// 字典标签组件
|
||||
import DictTag from '@/components/DictTag'
|
||||
import FileUpload from '@/components/FileUpload/index'
|
||||
import FilePreview from '@/components/FilePreview/index'
|
||||
import ImagePreview from "@/components/ImagePreview/index";
|
||||
|
||||
Vue.component('DictTag', DictTag)
|
||||
Vue.component('FileUpload', FileUpload)
|
||||
Vue.component('FilePreview', FilePreview)
|
||||
Vue.component('ImagePreview', ImagePreview)
|
||||
|
||||
//字典
|
||||
import sysDictData from './components/SysDictData'
|
||||
//系统参数
|
||||
import SysConfigData from './components/SysConfigData/index'
|
||||
|
||||
AMapLoader.load({
|
||||
key: "6ab3452804ba35050880b5e047436853", // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||
plugins: ['AMap.PolylineEditor'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
||||
})
|
||||
|
||||
Vue.use(plugins)
|
||||
Vue.use(Vant)
|
||||
Vue.use(sysDictData)
|
||||
Vue.use(SysConfigData)
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$store = store
|
||||
Vue.prototype.$http = request
|
||||
Vue.prototype.$moment = moment
|
||||
|
||||
App.mpType = 'app'
|
||||
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
|
||||
app.$mount()
|
||||
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"name": "东北大学H5",
|
||||
"appid": "__UNI__80BF281",
|
||||
"description": "",
|
||||
"versionName": "1.1.0",
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueCompiler": "uni-app",
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
"modules": {},
|
||||
"distribute": {
|
||||
"android": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
"ios": {},
|
||||
"sdkConfigs": {}
|
||||
}
|
||||
},
|
||||
"quickapp": {},
|
||||
"mp-weixin": {
|
||||
"appid": "wxccd7e2a0911b3397",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": false,
|
||||
"minified": true,
|
||||
"postcss": true
|
||||
},
|
||||
"optimization": {
|
||||
"subPackages": true
|
||||
},
|
||||
"usingComponents": true
|
||||
},
|
||||
"vueVersion": "2",
|
||||
"h5": {
|
||||
"template": "static/index.html",
|
||||
"devServer": {
|
||||
"port": 9090,
|
||||
"https": false,
|
||||
"allowedHosts": "all"
|
||||
},
|
||||
"title": "智慧工会",
|
||||
"router": {
|
||||
"mode": "hash",
|
||||
"base": "./"
|
||||
},
|
||||
"sdkConfigs": {
|
||||
"maps": {
|
||||
// "qqmap": {
|
||||
// "key": "VVZBZ-MO7RO-TRQW5-SR3EI-2TG3T-DKFCV"
|
||||
// }
|
||||
"amap": {
|
||||
"key" : "ba9840237e36e1347614f2e72752dba2",
|
||||
"securityJsCode" : "1d6ea7b36deab00846dbebcbc6be8e71",
|
||||
"serviceHost" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
unionLimitNum: 0,
|
||||
geolocation: null,
|
||||
//已报名人数
|
||||
hasRegUserNum: 0,
|
||||
unionId: null,
|
||||
isRegisterFull: false,
|
||||
appMapCenterPointX: 0,
|
||||
appMapCenterPointY: 0,
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getConfigKey(configKey) {
|
||||
const {msg} = await this.$http.get("/system/config/configKey/" + configKey)
|
||||
return msg
|
||||
},
|
||||
async getActivityInfo() {
|
||||
const {data} = await this.$http.get("activity/mobile/culture/manage/findOne", {params: {id: this.activityId}})
|
||||
if (data.cover) data.cover = JSON.parse(data.cover)
|
||||
if (data.location) data.location = JSON.parse(data.location)
|
||||
if (data.unionUserNumberLimit) data.unionUserNumberLimit = JSON.parse(data.unionUserNumberLimit)
|
||||
this.o = data
|
||||
if (data.signUpMethod === 3) {
|
||||
uni.setNavigationBarTitle({ title: "组队报名"})
|
||||
}
|
||||
const unionId = this.$store.getters.userInfo.union.id
|
||||
if (!unionId) {
|
||||
this.$toast.fail('您的所属工会信息缺失,请联系管理员')
|
||||
return
|
||||
}
|
||||
if (data.userNumberLimit === 2) {
|
||||
const unionLimit = data.unionUserNumberLimit.find(v => v.id === unionId)
|
||||
this.unionLimitNum = unionLimit.limitCount
|
||||
}
|
||||
await this.getHasRegUserNum()
|
||||
|
||||
},
|
||||
async getHasRegUserNum() {
|
||||
const resp = await this.$http.get('activity/mobile/culture/manage/getHasRegUserNum', {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
})
|
||||
this.hasRegUserNum = resp.data
|
||||
if (this.o.signUpMethod === 1) {
|
||||
if (this.o.userNumberLimit === 1) {
|
||||
if (this.hasRegUserNum === this.o.totalUserNumberLimit) {
|
||||
this.isRegisterFull = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,306 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
submitLoading: false,
|
||||
searchMore: false,
|
||||
tableSize: '',
|
||||
tableKey: '',
|
||||
formData: {},
|
||||
formRules: {},
|
||||
formLoading: false,
|
||||
tableLoading: false,
|
||||
finished: false,
|
||||
tableData: [],
|
||||
tableColumns: [],
|
||||
pageForm: {
|
||||
searchName: "",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
queryForm: {
|
||||
unionId: null,
|
||||
unitId: null,
|
||||
unionGroupId: null,
|
||||
threeUnitId: null
|
||||
},
|
||||
guavaIndex: 'index',
|
||||
unions: [],
|
||||
units: [],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
unionGroups: [],
|
||||
threeUnits: [],
|
||||
themeColor: '#1867b0',
|
||||
}
|
||||
},
|
||||
filters: {},
|
||||
watch: {
|
||||
tableColumns: {
|
||||
handler: function (val) {
|
||||
// this.tableColumns = JSON.parse(JSON.stringify(val.filter(v=>v.exist !== false)))
|
||||
// console.log(JSON.parse(JSON.stringify(val.filter(v => v.exist !== false))))
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.tableColumns)
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand({action, value}) {
|
||||
if (action) action(value)
|
||||
},
|
||||
|
||||
fileHandleRemove(file, fileList) {
|
||||
return fileList;
|
||||
},
|
||||
fileHandleChange(file, fileList, {type, size}) {
|
||||
const removeFile = () => {
|
||||
fileList.splice(fileList.findIndex(v => v === file))
|
||||
}
|
||||
|
||||
if (!file.size) {
|
||||
this.notifyWarning('您选择的是空文件!')
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (type && type.length && !type.includes(file.name.split('.').pop().toLowerCase())) {
|
||||
this.notifyWarning(`文件只能是 ${type.map(v => v.toUpperCase()).join('/')} 格式!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (size && !file.size < size) {
|
||||
this.notifyWarning(`文件大小不能超过 ${size / 1024 / 1024}MB!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
return fileList;
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
const isJPG = file.type === 'image/jpeg';
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isJPG) {
|
||||
this.$message.error('上传头像图片只能是 JPG 格式!');
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传头像图片大小不能超过 2MB!');
|
||||
}
|
||||
return isJPG && isLt2M;
|
||||
},
|
||||
columnChange(val) {
|
||||
this.tableLoading = true
|
||||
this.tableColumns = val
|
||||
this.tableLoading = false
|
||||
},
|
||||
tableSizeChange(size) {
|
||||
this.tableSize = size
|
||||
},
|
||||
indexMethod(index) {
|
||||
return index + (this.pageForm.pageNumber - 1) * this.pageForm.pageSize + 1
|
||||
},
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
pageOrder(column) {
|
||||
const myColumn = this.tableColumns.find(v => v.prop === column.prop)
|
||||
if (myColumn.sortProp) {
|
||||
this.pageForm.pageOrderName = myColumn.sortProp;
|
||||
} else {
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
}
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageData() {
|
||||
|
||||
},
|
||||
notifySuccess(msg) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: msg,
|
||||
type: 'success'
|
||||
});
|
||||
},
|
||||
notifyWarning(msg) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: msg,
|
||||
type: 'warning'
|
||||
});
|
||||
},
|
||||
notifyError(msg) {
|
||||
this.$notify.error({
|
||||
title: '错误',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
//获取分工会信息根据权限
|
||||
getUnions() {
|
||||
this.$http.get('/system/union/listUnionByRole').then(res => {
|
||||
res.data.forEach(v=>{
|
||||
v['text'] = v.unionName
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.unions = res.data
|
||||
this.unionList = res.data
|
||||
})
|
||||
},
|
||||
//获取二级单位信息根据权限
|
||||
getUnits() {
|
||||
this.$http.get('/system/dept/listUnitByRole').then(res => {
|
||||
res.data.forEach(v=>{
|
||||
v['text'] = v.deptName
|
||||
v['value'] = v.deptId
|
||||
})
|
||||
this.units = res.data
|
||||
this.unitList = res.data
|
||||
})
|
||||
},
|
||||
//根据分工会id获取二级单位信息
|
||||
getUnitsByUnionId(unionId) {
|
||||
this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
}).then(res => {
|
||||
res.data.forEach(v=>{
|
||||
v['text'] = v.deptName
|
||||
v['value'] = v.deptId
|
||||
})
|
||||
this.units = res.data
|
||||
this.unitList = res.data
|
||||
})
|
||||
},
|
||||
async getUnitsByUnionIdSync(unionId) {
|
||||
const {data} = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
return data
|
||||
},
|
||||
|
||||
//根据分工会id或者二级单位id获取工会小组信息
|
||||
getUnionGroups() {
|
||||
const {unionId, unitId} = this.queryForm
|
||||
if (unionId || unitId) {
|
||||
this.$http.get('/system/union/listUnionGroupByRole', {
|
||||
params: {
|
||||
unionId,
|
||||
unitId
|
||||
}
|
||||
}).then(res => {
|
||||
res.data.forEach(v=>{
|
||||
v['text'] = v.groupName
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.unionGroups = res.data
|
||||
})
|
||||
} else {
|
||||
this.unionGroups = []
|
||||
}
|
||||
},
|
||||
//根据分工会小组获取三级单位
|
||||
getThreeUnits() {
|
||||
const {unitId, unionGroupId} = this.queryForm
|
||||
if (unionGroupId || unitId) {
|
||||
this.$http.get('/system/dept/listThreeUnitByUnionGroupId', {
|
||||
params: {
|
||||
unitId,
|
||||
unionGroupId
|
||||
}
|
||||
}).then(res => {
|
||||
res.data.forEach(v=>{
|
||||
v['text'] = v.deptName
|
||||
v['value'] = v.deptId
|
||||
})
|
||||
this.threeUnits = res.data
|
||||
})
|
||||
} else {
|
||||
this.threeUnits = []
|
||||
}
|
||||
},
|
||||
//分工会change
|
||||
flushUnits(val) {
|
||||
this.$set(this.queryForm, 'unitId', null)
|
||||
this.$set(this.queryForm, 'unionGroupId', null)
|
||||
this.$set(this.queryForm, 'threeUnitId', null)
|
||||
if (val) {
|
||||
this.getUnitsByUnionId(val)
|
||||
this.getUnionGroups()
|
||||
} else {
|
||||
this.units = []
|
||||
this.unionGroups = []
|
||||
this.threeUnits = []
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
//分工会change
|
||||
unionIdChange(val) {
|
||||
this.$set(this.queryForm, 'unitId', null)
|
||||
this.$set(this.queryForm, 'unionGroupId', null)
|
||||
this.$set(this.queryForm, 'threeUnitId', null)
|
||||
if (val) {
|
||||
this.getUnitsByUnionId(val)
|
||||
this.getUnionGroups()
|
||||
} else {
|
||||
this.units = []
|
||||
this.unionGroups = []
|
||||
this.threeUnits = []
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
//二级单位change
|
||||
unitIdChange(val) {
|
||||
this.getUnionGroups()
|
||||
this.$set(this.queryForm, 'unionGroupId', null)
|
||||
this.$set(this.queryForm, 'threeUnitId', null)
|
||||
if (val) {
|
||||
this.getThreeUnits()
|
||||
} else {
|
||||
this.threeUnits = []
|
||||
}
|
||||
},
|
||||
//工会小组change
|
||||
unionGroupChange(val) {
|
||||
this.$set(this.queryForm, 'threeUnitId', null)
|
||||
this.getThreeUnits()
|
||||
},
|
||||
clone(obj) {
|
||||
return JSON.parse(JSON.stringify(obj))
|
||||
},
|
||||
//查询当前用户管理的院级工会
|
||||
getCurrentUserManageUnion() {
|
||||
this.$http.get('/system/union/getCurrentUserManageUnion').then(res => {
|
||||
this.unions = res.data
|
||||
this.unionList = res.data
|
||||
})
|
||||
},
|
||||
//查询所有工会或根据id查询工会
|
||||
async getUnionList(id) {
|
||||
const res = await this.$http.get('/system/union/getUnionList', {
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
return res.data
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
mLoading: false,
|
||||
finished: false,
|
||||
loading: false,
|
||||
refreshing: false,
|
||||
formData: {},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
themeColor: '#1867b0',
|
||||
pageDataUrl: null,
|
||||
yearList: [],
|
||||
unions: [],
|
||||
unionList: [],
|
||||
units: [],
|
||||
unitList: [],
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
date(value) {
|
||||
return value ? moment(value).format('YYYY-MM-DD') : ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.refreshing = true;
|
||||
this.finished = false;
|
||||
this.pageForm.pageNumber = 0
|
||||
this.loading = true;
|
||||
await this.pageData();
|
||||
},
|
||||
GetQueryString(name) {
|
||||
const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
const r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return unescape(r[2]);
|
||||
return "";
|
||||
},
|
||||
createYearList() {
|
||||
for (let i = new Date().getFullYear() - 50; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
},
|
||||
startLoading() {
|
||||
this.vLoading = this.$toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
duration: 0
|
||||
})
|
||||
},
|
||||
closeLoading() {
|
||||
setTimeout(() => {
|
||||
this.vLoading.close()
|
||||
}, 500)
|
||||
},
|
||||
//获取分工会信息根据权限
|
||||
async getUnions() {
|
||||
const resp = await this.$http.get('/system/union/listUnionByRole')
|
||||
this.unions = resp.data
|
||||
this.unionList = resp.data
|
||||
},
|
||||
//获取二级单位信息根据权限
|
||||
async getUnits() {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByRole')
|
||||
this.units = resp.data
|
||||
this.unitList = resp.data
|
||||
},
|
||||
//根据分工会id获取二级单位信息
|
||||
async getUnitsByUnionId(unionId) {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
this.units = resp.data
|
||||
this.unitList = resp.data
|
||||
},
|
||||
async getUnitsByUnionIdSync(unionId) {
|
||||
const {data} = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
return data
|
||||
},
|
||||
|
||||
//根据分工会id或者二级单位id获取工会小组信息
|
||||
getUnionGroups() {
|
||||
const {unionId, unitId} = this.queryForm
|
||||
if (unionId || unitId) {
|
||||
this.$http.get('/system/union/listUnionGroupByRole', {
|
||||
params: {
|
||||
unionId,
|
||||
unitId
|
||||
}
|
||||
}).then(res => {
|
||||
this.unionGroups = res.data
|
||||
})
|
||||
} else {
|
||||
this.unionGroups = []
|
||||
}
|
||||
},
|
||||
//根据分工会小组获取三级单位
|
||||
getThreeUnits() {
|
||||
const {unitId, unionGroupId} = this.queryForm
|
||||
if (unionGroupId || unitId) {
|
||||
this.$http.get('/system/dept/listThreeUnitByUnionGroupId', {
|
||||
params: {
|
||||
unitId,
|
||||
unionGroupId
|
||||
}
|
||||
}).then(res => {
|
||||
this.threeUnits = res.data
|
||||
})
|
||||
} else {
|
||||
this.threeUnits = []
|
||||
}
|
||||
},
|
||||
//分工会change
|
||||
flushUnits(val) {
|
||||
this.$set(this.queryForm, 'unitId', null)
|
||||
this.$set(this.queryForm, 'unionGroupId', null)
|
||||
this.$set(this.queryForm, 'threeUnitId', null)
|
||||
if (val) {
|
||||
this.getUnitsByUnionId(val)
|
||||
this.getUnionGroups()
|
||||
} else {
|
||||
this.units = []
|
||||
this.unionGroups = []
|
||||
this.threeUnits = []
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
//分工会change
|
||||
unionIdChange(val) {
|
||||
this.$set(this.queryForm, 'unitId', null)
|
||||
this.$set(this.queryForm, 'unionGroupId', null)
|
||||
this.$set(this.queryForm, 'threeUnitId', null)
|
||||
if (val) {
|
||||
this.getUnitsByUnionId(val)
|
||||
this.getUnionGroups()
|
||||
} else {
|
||||
this.units = []
|
||||
this.unionGroups = []
|
||||
this.threeUnits = []
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
//二级单位change
|
||||
unitIdChange(val) {
|
||||
this.getUnionGroups()
|
||||
this.$set(this.queryForm, 'unionGroupId', null)
|
||||
this.$set(this.queryForm, 'threeUnitId', null)
|
||||
if (val) {
|
||||
this.getThreeUnits()
|
||||
} else {
|
||||
this.threeUnits = []
|
||||
}
|
||||
},
|
||||
//工会小组change
|
||||
unionGroupChange(val) {
|
||||
this.$set(this.queryForm, 'threeUnitId', null)
|
||||
this.getThreeUnits()
|
||||
},
|
||||
clone(obj) {
|
||||
return JSON.parse(JSON.stringify(obj))
|
||||
},
|
||||
//查询当前用户管理的院级工会
|
||||
getCurrentUserManageUnion() {
|
||||
this.$http.get('/system/union/getCurrentUserManageUnion').then(res => {
|
||||
this.unions = res.data
|
||||
this.unionList = res.data
|
||||
})
|
||||
},
|
||||
//查询所有工会或根据id查询工会
|
||||
async getUnionList(id) {
|
||||
const res = await this.$http.get('/system/union/getUnionList', {
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
return res.data
|
||||
},
|
||||
toChinesNum(num) {
|
||||
let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
||||
let unit = ["", "十", "百", "千", "万"];
|
||||
num = parseInt(num);
|
||||
let getWan = (temp) => {
|
||||
let strArr = temp.toString().split("").reverse();
|
||||
let newNum = "";
|
||||
for (let i = 0; i < strArr.length; i++) {
|
||||
newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum;
|
||||
}
|
||||
return newNum;
|
||||
}
|
||||
let overWan = Math.floor(num / 10000);
|
||||
let noWan = num % 10000;
|
||||
if (noWan.toString().length < 4) {
|
||||
noWan = "0" + noWan;
|
||||
}
|
||||
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.createYearList()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
import {getOpenJdh, getAllJdh, getDbt} from '@/api/jdh/index'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
proposalConfig: {
|
||||
slaveUnitConfig: {
|
||||
isNeedReply: false
|
||||
}
|
||||
},
|
||||
proposalState: {},
|
||||
proposalFlow: {},
|
||||
auditResultType: [],
|
||||
proposalTypes: [],
|
||||
openTeacherMeets: [],
|
||||
allTeacherMeets: [],
|
||||
delegations: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
proposalId: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
proposalStates() {
|
||||
const states = []
|
||||
const keys = Object.keys(this.proposalFlow)
|
||||
if (keys) {
|
||||
keys.forEach(k => {
|
||||
states.push({text: this.proposalFlow[k]['stateName'], value: k})
|
||||
})
|
||||
}
|
||||
return states
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getProposalTypes() {
|
||||
this.$http.get('/proposal/basicConfig/type/list').then(res => {
|
||||
res.data.forEach(v => {
|
||||
v['text'] = v.typeName
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.proposalTypes = res.data
|
||||
})
|
||||
},
|
||||
getAuditResultType() {
|
||||
this.$http.get('/proposal/common/auditResultType').then(res => {
|
||||
this.auditResultType = res.data
|
||||
})
|
||||
},
|
||||
async getOpenTeacherMeets() {
|
||||
return getOpenJdh().then(res => {
|
||||
res.forEach(v => {
|
||||
v['text'] = v.jdhallname
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.openTeacherMeets = res
|
||||
return res
|
||||
})
|
||||
},
|
||||
getAllTeacherMeets() {
|
||||
return getAllJdh().then(res => {
|
||||
res.forEach(v => {
|
||||
v['text'] = v['jdhallname']
|
||||
v['value'] = v['id']
|
||||
})
|
||||
this.allTeacherMeets = res
|
||||
return res
|
||||
})
|
||||
},
|
||||
getDelegation(teacherMeetId) {
|
||||
getDbt(teacherMeetId).then(res => {
|
||||
res.forEach(v => {
|
||||
v['text'] = v['dbtname']
|
||||
v['value'] = v['id']
|
||||
})
|
||||
this.delegations = res
|
||||
})
|
||||
},
|
||||
getStateMap() {
|
||||
this.$http.get('/proposal/common/state').then(res => {
|
||||
this.proposalState = res.data
|
||||
})
|
||||
},
|
||||
getFlowMap() {
|
||||
this.$http.get('/proposal/common/flow').then(res => {
|
||||
this.proposalFlow = res.data
|
||||
})
|
||||
},
|
||||
getUnions() {
|
||||
this.$http.get('/proposal/common/unions', {
|
||||
params: {
|
||||
delegationId: this.queryForm.delegationId
|
||||
}
|
||||
}).then(res => {
|
||||
this.unions = res.data
|
||||
})
|
||||
},
|
||||
getUnits() {
|
||||
this.$http.get('/proposal/common/units', {
|
||||
params: {
|
||||
unionId: this.queryForm.unionId
|
||||
}
|
||||
}).then(res => {
|
||||
this.units = res.data
|
||||
})
|
||||
},
|
||||
getProposalConfig() {
|
||||
this.$http.get('/proposal/common/config').then(res => {
|
||||
this.proposalConfig = res.data
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
}
|
||||
}
|
||||
+650
@@ -0,0 +1,650 @@
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工作台"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/avatar/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改头像"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/info/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/info/edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编辑资料"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/pwd/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/setting/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "应用设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/help/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "常见问题"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/about/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于我们"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/common/webview/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览网页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/common/textview/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览文本"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/trainSignUp/trainList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "品牌活动列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/trainSignUp/activityInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "活动详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/trainSignUp/trainInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "活动详情列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/cultureActivity/cultureActivityList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "活动列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/cultureActivity/cultureActivityMyList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的活动"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/cultureActivity/singleReg",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人报名"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/cultureActivity/unionReg",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分工会报名"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/cultureActivity/sign",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/sports/sportsActivityEventList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "项目列表",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/meeting/myMeeting",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的会议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/meeting/meetingAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会议审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/site/siteList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "场地预约"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/site/siteMy",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的预约"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/site/siteAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "预约审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/site/siteReserve",
|
||||
"style": {
|
||||
"navigationBarTitleText": "场地预约"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/club/applyInClub",
|
||||
"style": {
|
||||
"navigationBarTitleText": "加入协会"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/club/userApplyClubAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "协会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/club/userApplySchoolAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "慰问申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/record",
|
||||
"style": {
|
||||
"navigationBarTitleText": "慰问记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/difficulty/difficultyApply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "困难补助申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/difficulty/difficultyRecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "困难补助记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/difficulty/difficultyUnionGroupAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工会小组审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/difficulty/difficultyUnionGroupAuditList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工会小组审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/difficulty/difficultyUnionAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/difficulty/difficultyUnionAuditList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/difficulty/difficultySchoolAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/difficulty/difficultySchoolAuditList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/opusLevy/activityList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "活动列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/opusLevy/opusApply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "教工作品征集"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/opusLevy/opusMine",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的作品"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/opusLevy/opusUnionAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/opusLevy/opusUnionAuditList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/opusLevy/opusSchoolAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/opusLevy/opusSchoolAuditList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member/memberRecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员档案"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member/memberApply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请入会"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member/memberUnionAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member/memberSchoolAudit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member/memberBoard",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员看板"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member/memberQuery",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员查询"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/proposalInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提案详细信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/myProposal",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的提案"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/writeProposal",
|
||||
"style": {
|
||||
"navigationBarTitleText": "撰写提案"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/seconded/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "附议提案"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/seconded/audit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "附议提案"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/delegation/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "团长审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/delegation/audit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "团长审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/proposalQuery",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提案查询",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/deputy/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "代表查询",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/proposal/deputy/info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "代表详细信息",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/unionGroupAudit/audit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工会小组审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/unionGroupAudit/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工会小组审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/branchUnionAudit/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分工会审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/branchUnionAudit/audit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分工会审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/schoolUnionAccountingAudit/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会会计审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/schoolUnionAccountingAudit/audit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会会计审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/schoolUnionAudit/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/schoolUnionAudit/audit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会审核",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/welfare/list/welfareListIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "福利列表",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/welfare/list/welfareReceive",
|
||||
"style": {
|
||||
"navigationBarTitleText": "福利详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/welfare/list/welfareSelect",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择福利",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/welfare/mine/welfareAddress",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/welfare/mine/welfareIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的福利",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/welfare/mine/myWelfare",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的福利",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/condolenceInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/evaluate/evaluateSummary",
|
||||
"style": {
|
||||
"navigationBarTitleText": "评优评先",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/honor/honorSummary",
|
||||
"style": {
|
||||
"navigationBarTitleText": "荣誉统计",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/condolence/summary/condolenceSummary",
|
||||
"style": {
|
||||
"navigationBarTitleText": "慰问统计",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/trainSignUp/trainSummary",
|
||||
"style": {
|
||||
"navigationBarTitleText": "品牌活动统计",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/club/clubSummary",
|
||||
"style": {
|
||||
"navigationBarTitleText": "协会统计",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/fitnesswalk/activity"
|
||||
},
|
||||
{
|
||||
"path": "pages/fitnesswalk/enroll"
|
||||
},
|
||||
{
|
||||
"path": "pages/fitnesswalk/sign"
|
||||
},
|
||||
{
|
||||
"path": "pages/fitnesswalk/gift/receive"
|
||||
},
|
||||
{
|
||||
"path": "pages/fitnesswalk/gift/list"
|
||||
},
|
||||
{
|
||||
"path": "pages/fitnesswalk/gps/index"
|
||||
},
|
||||
{
|
||||
"path": "pages/fitnesswalk/gps/history"
|
||||
},
|
||||
{
|
||||
"path": "pages/fitnesswalk/gps/info"
|
||||
},
|
||||
{
|
||||
"path": "pages/staffService/questionNaire/inlet"
|
||||
},
|
||||
{
|
||||
"path": "pages/staffService/questionNaire/list"
|
||||
},
|
||||
{
|
||||
"path": "pages/staffService/questionNaire/poll/index"
|
||||
},
|
||||
{
|
||||
"path": "pages/staffService/questionNaire/answer/index"
|
||||
},
|
||||
{
|
||||
"path": "pages/staffService/questionNaire/shop/index"
|
||||
},
|
||||
{
|
||||
"path": "pages/staffService/questionNaire/cake/index"
|
||||
},
|
||||
{
|
||||
"path": "pages/staffService/inclusive/index"
|
||||
},
|
||||
{
|
||||
"path": "pages/meeting/signIn"
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/common/activityInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "活动通知",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/sports/summary",
|
||||
"style": {
|
||||
"navigationBarTitleText": "体育活动报名统计",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/cultureActivity/summary/school",
|
||||
"style": {
|
||||
"navigationBarTitleText": "校工会文化活动报名统计",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/cultureActivity/summary/union",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分工会文化活动报名统计",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/cultureActivity/summary/club",
|
||||
"style": {
|
||||
"navigationBarTitleText": "协会文化活动报名统计",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#000000",
|
||||
"selectedColor": "#000000",
|
||||
"borderStyle": "white",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
// {
|
||||
// "pagePath": "pages/index",
|
||||
// "iconPath": "static/images/tabbar/home.png",
|
||||
// "selectedIconPath": "static/images/tabbar/home_.png",
|
||||
// "text": "首页"
|
||||
// },
|
||||
{
|
||||
"pagePath": "pages/work/index",
|
||||
"iconPath": "static/images/tabbar/work.png",
|
||||
"selectedIconPath": "static/images/tabbar/work_.png",
|
||||
"text": "工作台"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/mine/index",
|
||||
"iconPath": "static/images/tabbar/mine.png",
|
||||
"selectedIconPath": "static/images/tabbar/mine_.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "智慧工会",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div >
|
||||
<div style="margin: 20px;padding-bottom: 30px">
|
||||
<div v-html="activityData.eventNotification" v-if="activityData.eventNotification"></div>
|
||||
<div v-else>暂无通知</div>
|
||||
</div>
|
||||
<van-button type="primary" block @click="openReg"
|
||||
style="position: fixed; bottom: 0; ">进入报名
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "activityInfo",
|
||||
data() {
|
||||
return {
|
||||
activityData: {},
|
||||
projectTypeCode: "",
|
||||
signUpMethod: null,
|
||||
activityId: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findActivityData() {
|
||||
const {data} = await this.$http.get("activity/mobile/sports/activityApply/findActivityData", {
|
||||
params: {
|
||||
activityId: this.activityId,
|
||||
projectTypeCode: this.projectTypeCode
|
||||
}
|
||||
})
|
||||
if (this.projectTypeCode !== '50004') {
|
||||
data.eventNotification = data.activityContent
|
||||
}
|
||||
this.activityData = data
|
||||
},
|
||||
openReg() {
|
||||
if (this.projectTypeCode === '50004') {
|
||||
this.$tab.navigateTo("/pages/activity/sports/sportsActivityEventList?id=" + this.activityId)
|
||||
} else {
|
||||
if (this.signUpMethod === 1) {
|
||||
this.$tab.navigateTo("/pages/activity/cultureActivity/singleReg?id=" + this.activityId)
|
||||
} else {
|
||||
this.$tab.navigateTo("/pages/activity/cultureActivity/unionReg?id=" + this.activityId)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
||||
},
|
||||
async onLoad(option) {
|
||||
this.projectTypeCode = option.projectTypeCode
|
||||
this.signUpMethod = option.signUpMethod
|
||||
this.activityId = option.activityId
|
||||
await this.findActivityData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<div class="activity_img_back">
|
||||
<image style="height: 200px; width: 100%;" :src="o.cover?$filePreview(o.cover[0].url):''"></image>
|
||||
</div>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-cell title="活动名称" :value="o.name"></van-cell>
|
||||
<van-cell title="活动地址" :value="o.address"></van-cell>
|
||||
<van-cell title="报名时间">
|
||||
<template #label>
|
||||
{{ moment(o.applyStartTime).format('YYYY/MM/DD HH-mm') }} 至
|
||||
{{ moment(o.applyEndTime).format('YYYY/MM/DD HH-mm') }}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="活动时间">
|
||||
<template #label>
|
||||
{{ moment(o.startTime).format('YYYY/MM/DD HH-mm') }} 至
|
||||
{{ moment(o.endTime).format('YYYY/MM/DD HH-mm') }}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell v-if="o.userNumberLimit!=null">
|
||||
<template #title>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
活动人数
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
本工会名额
|
||||
</span>
|
||||
</template>
|
||||
<template>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
<span style="color: orange">{{ o.totalUserNumberLimit }}</span>人
|
||||
</span>
|
||||
<span v-else="o.userNumberLimit===2">
|
||||
<span style="color: orange">{{ unionLimitNum }}</span>人
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="当前报名" v-if="o.signUpMethod!=null">
|
||||
<template>
|
||||
<span style="color: red">{{ hasRegUserNum }}</span>人
|
||||
</template>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="负  责  人">-->
|
||||
<!-- <template>-->
|
||||
<!-- {{o.createUserName}}({{o.createUserMobile}})-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
<van-cell title="报名方式" v-if="o.signUpMethod">
|
||||
<template>
|
||||
<span v-if="o.signUpMethod===1">个人报名</span>
|
||||
<span v-if="o.signUpMethod===2">分工会报名</span>
|
||||
<span v-if="o.signUpMethod===3">组队报名</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="活动内容" v-if="o.projectTypeCode!=='50004'">
|
||||
<template #label>
|
||||
{{ o.activityContent }}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="签到点位" v-if="o.needSign">
|
||||
<template #label>
|
||||
<MapContainer :position.sync="o.location" isCircle view
|
||||
:radius="o.rangeMeter"></MapContainer>
|
||||
<div style="margin-top: 10px;color: orange">
|
||||
活动开始后,请前往签到点位半径({{ o.rangeMeter }})米内进行签到。
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from "moment";
|
||||
import MapContainer from "../../../common/MapContainer";
|
||||
export default {
|
||||
name: "cultureActivityInfo",
|
||||
components: {MapContainer},
|
||||
props: {
|
||||
o: {
|
||||
type: Object
|
||||
},
|
||||
hasRegUserNum: {
|
||||
type: Number,
|
||||
default:0
|
||||
},
|
||||
unionLimitNum: {
|
||||
type: Number,
|
||||
default:0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
|
||||
async created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="tabChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityStatus" :options="activityStatusList"
|
||||
@change="tabChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityLevel" :options="activityLevelList"
|
||||
@change="tabChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" v-model="loading" @load="pageData">
|
||||
<div v-for="o in tableData"
|
||||
:key="o.id"
|
||||
class="van-doc-card">
|
||||
|
||||
|
||||
<div @click="openReg(o)">
|
||||
<image style="height: 200px; width: 100%;" :src="$filePreview(o.cover[0].url)">
|
||||
|
||||
</image>
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
{{ o.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="train-title"><span
|
||||
style="color: grey">年  度:</span>{{ moment(o.startTime).format('YYYY') }}
|
||||
</div>
|
||||
<div class="right">
|
||||
<span
|
||||
|
||||
v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
||||
style="color: forestgreen">报名中
|
||||
</span>
|
||||
<span
|
||||
v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"
|
||||
style="color: #ee1919">报名结束
|
||||
</span>
|
||||
<span
|
||||
v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"
|
||||
style="color: forestgreen">活动进行中
|
||||
</span>
|
||||
<span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"
|
||||
style="color: #ee1919">活动结束
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">报名时间:</span>
|
||||
{{
|
||||
moment(o.applyStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.applyEndTime).format('YYYY-MM-DD HH:mm')
|
||||
}}
|
||||
</div>
|
||||
<div style="margin-top: 6px"><span style="color: grey">活动时间:</span>
|
||||
{{ o.startTime + ' ~ ' + o.endTime }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tabBarIndex">
|
||||
<van-tabbar-item icon="home-o"
|
||||
@click="tabClick('/pages/activity/cultureActivity/cultureActivityList')">
|
||||
全部活动
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o"
|
||||
@click="tabClick('/pages/activity/cultureActivity/cultureActivityMyList')">
|
||||
我的活动
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mobileMixins from "../../../mixins/mobileMixins";
|
||||
import moment from "moment";
|
||||
|
||||
export default {
|
||||
name: "cultureActivityList",
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
pageForm: {
|
||||
year: '',
|
||||
activityStatus: null,
|
||||
activityLevel: null
|
||||
},
|
||||
tabBarIndex: 0,
|
||||
activityLevelList: [],
|
||||
activityStatusList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '进行中', value: 3},
|
||||
{text: '已结束', value: 4}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tabClick(url) {
|
||||
this.$tab.redirectTo(url)
|
||||
},
|
||||
openReg(o) {
|
||||
this.$tab.navigateTo("/pages/activity/common/activityInfo?activityId=" + o.id +
|
||||
"&projectTypeCode=" + o.projectTypeCode + "&signUpMethod=" + o.signUpMethod)
|
||||
},
|
||||
tabChange() {
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$http.post('/activity/mobile/culture/manage/pageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
activityStatus: this.pageForm.activityStatus,
|
||||
activityLevel: this.pageForm.activityLevel,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
resp.data.list.forEach(v => {
|
||||
if (v.cover) {
|
||||
v.cover = JSON.parse(v.cover)
|
||||
}
|
||||
})
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.startLoading()
|
||||
this.$set(this.pageForm, "activityStatus", 2)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
this.activityLevelList.push({value: null, text: "全部类别"})
|
||||
const {data} = await this.$http.get('/activity/common/getActivityTwoLevelType', {
|
||||
params: {
|
||||
code: "40000"
|
||||
}
|
||||
})
|
||||
data.forEach(v => {
|
||||
this.activityLevelList.push({value: v.code, text: v.name})
|
||||
})
|
||||
this.$set(this.pageForm, "activityLevel", this.activityLevelList[0].value)
|
||||
await this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin: 10px auto 0;
|
||||
width: 96%;
|
||||
border-radius: 10px;
|
||||
padding: 14px 12px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
flex: 0.6;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.right {
|
||||
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 5px 0px;
|
||||
border-color: #1867b0;
|
||||
}
|
||||
|
||||
.van-image__img {
|
||||
max-height: 200px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,191 @@
|
||||
<template>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<div>
|
||||
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" v-model="loading" @load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
|
||||
|
||||
<div @click="openReg(o)">
|
||||
<image style="height: 200px; width: 100%;" :src="o.cover && o.cover[0].url ? $filePreview(o.cover[0].url) : ''">
|
||||
|
||||
</image>
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
{{ o.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="train-title"><span
|
||||
style="color: grey">年  度:</span>{{ moment(o.startTime).format('YYYY') }}
|
||||
</div>
|
||||
<div class="right">
|
||||
<span
|
||||
|
||||
v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
||||
style="color: forestgreen">报名中
|
||||
</span>
|
||||
<span
|
||||
v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"
|
||||
style="color: #ee1919">报名结束
|
||||
</span>
|
||||
<span
|
||||
v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"
|
||||
style="color: forestgreen">活动进行中
|
||||
</span>
|
||||
<span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"
|
||||
style="color: #ee1919">活动结束
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">报名时间:</span>
|
||||
{{
|
||||
moment(o.applyStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.applyEndTime).format('YYYY-MM-DD HH:mm')
|
||||
}}
|
||||
</div>
|
||||
<div style="margin-top: 6px"><span style="color: grey">活动时间:</span>
|
||||
{{ o.startTime + ' ~ ' + o.endTime }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tabBarIndex">
|
||||
<van-tabbar-item icon="home-o"
|
||||
@click="tabClick('/pages/activity/cultureActivity/cultureActivityList')">
|
||||
全部活动
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o"
|
||||
@click="tabClick('/pages/activity/cultureActivity/cultureActivityMyList')">
|
||||
我的活动
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mobileMixins from "../../../mixins/mobileMixins";
|
||||
import moment from "moment";
|
||||
|
||||
export default {
|
||||
name: "cultureActivityMyList",
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
tabBarIndex: 1,
|
||||
activityLevelList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openReg(o) {
|
||||
this.$tab.navigateTo("/pages/activity/common/activityInfo?activityId=" + o.id +
|
||||
"&projectTypeCode=" + o.projectTypeCode + "&signUpMethod=" + o.signUpMethod)
|
||||
/* if (o.projectTypeCode === '50004') {
|
||||
this.$tab.navigateTo("/pages/activity/sports/sportsActivityEventList?id="+o.id)
|
||||
} else {
|
||||
this.$tab.navigateTo("/pages/activity/cultureActivity/sign?id=" + o.id)
|
||||
|
||||
}*/
|
||||
},
|
||||
tabClick(url) {
|
||||
this.$tab.redirectTo(url)
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$http.post('/activity/mobile/culture/manage/myPageData', this.pageForm)
|
||||
if (resp.code === 200) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
resp.data.list.forEach(v => {
|
||||
if (v.cover) {
|
||||
v.cover = JSON.parse(v.cover)
|
||||
}
|
||||
})
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.startLoading()
|
||||
await this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin: 10px auto 0;
|
||||
width: 96%;
|
||||
border-radius: 10px;
|
||||
padding: 14px 12px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
flex: 0.6;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.right {
|
||||
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 5px 0px;
|
||||
border-color: #1867b0;
|
||||
}
|
||||
|
||||
.van-image__img {
|
||||
max-height: 200px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<culture-activity-info :o="o" :isRegister="isRegister" :isSign="isSign"
|
||||
:hasRegUserNum="hasRegUserNum"></culture-activity-info>
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="o.needSign">
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" style="border-radius: 10px" block type="info">
|
||||
{{ isSign ? '签到成功' : '立即签到' }}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initMap from "../../../mixins/activity/culture/initMap";
|
||||
import cultureActivityInfo from "./common/cultureActivityInfo";
|
||||
import moment from "moment";
|
||||
import mobileMixins from "../../../mixins/mobileMixins";
|
||||
|
||||
export default {
|
||||
mixins: [initMap, mobileMixins],
|
||||
components: {cultureActivityInfo},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
o: {},
|
||||
isRegister: false,
|
||||
isSign: false,
|
||||
activityId: "",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSign() {
|
||||
const {location, rangeMeter} = this.o
|
||||
console.log()
|
||||
AMap.plugin('AMap.Geolocation', () => {
|
||||
var geolocation = new AMap.Geolocation({
|
||||
// 是否使用高精度定位,默认:true
|
||||
enableHighAccuracy: true,
|
||||
// 设置定位超时时间,默认:无穷大
|
||||
timeout: 10000,
|
||||
// 定位按钮的停靠位置的偏移量
|
||||
offset: [10, 20],
|
||||
// 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
|
||||
zoomToAccuracy: true,
|
||||
// 定位按钮的排放位置, RB表示右下
|
||||
position: 'RB'
|
||||
})
|
||||
|
||||
geolocation.getCurrentPosition((status, result) => {
|
||||
if (status === 'complete') {
|
||||
const {lng, lat} = result.position
|
||||
let p1 = [lng, lat];
|
||||
var dis = AMap.GeometryUtil.distance(p1, location);
|
||||
if (dis > rangeMeter) {
|
||||
this.$dialog.alert({
|
||||
title: '',
|
||||
message: '距离活动打卡点还有大约' + Math.ceil(dis) + '米',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
}).then(() => {
|
||||
this.startLoading()
|
||||
this.$http.post('activity/mobile/culture/manage/singleSignUp', {}, {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
}).then(resp => {
|
||||
if (resp.code === 200) {
|
||||
this.getSignStatus()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
})
|
||||
this.closeLoading()
|
||||
})
|
||||
} else {
|
||||
this.$toast.fail('获取定位失败!')
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
async isRegisterForMe() {
|
||||
const resp = await this.$http.get('activity/mobile/culture/manage/isRegisterForMe', {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.isRegister = resp.data
|
||||
}
|
||||
},
|
||||
async getSignStatus() {
|
||||
const resp = await this.$http.get('activity/mobile/culture/manage/isSign', {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if (this.activityId) {
|
||||
this.getActivityInfo()
|
||||
this.isRegisterForMe()
|
||||
this.getSignStatus()
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.activityId = option.id
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<culture-activity-info :o="o" :isRegister="isRegister" :isSign="isSign"
|
||||
:hasRegUserNum="hasRegUserNum":unionLimitNum="unionLimitNum"></culture-activity-info>
|
||||
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="!isRegister && !isRegisterFull" @click="doSave()"
|
||||
style="border-radius: 10px" block
|
||||
type="info">
|
||||
立即报名
|
||||
</van-button>
|
||||
<van-button v-else-if="!isRegister && isRegisterFull" @click="doSave()"
|
||||
style="border-radius: 10px" block
|
||||
disabled
|
||||
type="info">
|
||||
名额已满
|
||||
</van-button>
|
||||
<van-button v-else-if="isRegister && moment().valueOf() < moment(o.applyEndTime).valueOf()"
|
||||
@click="doCancel"
|
||||
style="border-radius: 10px" block type="info"
|
||||
color="red">
|
||||
取消报名
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="isRegister && moment().valueOf() < moment(o.endTime).valueOf() && moment().valueOf() > moment(o.startTime).valueOf()">
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" style="border-radius: 10px" block type="info">
|
||||
{{ isSign ? '签到成功' : '立即签到' }}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cultureActivityInfo from "./common/cultureActivityInfo";
|
||||
import initMap from "../../../mixins/activity/culture/initMap";
|
||||
import moment from "moment";
|
||||
|
||||
let geolocation = null
|
||||
export default {
|
||||
name: "singleReg",
|
||||
mixins: [initMap],
|
||||
components: {cultureActivityInfo},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
activityId: '',
|
||||
o: {},
|
||||
tagCloseable: true,
|
||||
isRegister: false,
|
||||
isSign: false,
|
||||
isRegisterFull: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async isRegisterForMe() {
|
||||
const resp = await this.$http.get('activity/mobile/culture/manage/isRegisterForMe', {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.isRegister = resp.data
|
||||
}
|
||||
},
|
||||
async getSignStatus() {
|
||||
const resp = await this.$http.get('activity/mobile/culture/manage/isSign', {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
async doSave() {
|
||||
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '报名后若未参加,将有可能影响到其它活动的报名,同时活动开启了现场签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要报名吗?' + message,
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await this.$http.post('activity/mobile/culture/manage/doSingleRegister', {}, {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 200) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.$tab.navigateBack()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doCancel() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消报名吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await this.$http.post('activity/mobile/culture/manage/doSingleCancelRegister', {}, {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 200) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.$tab.navigateBack()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
const {location, rangeMeter} = this.o
|
||||
AMap.plugin('AMap.Geolocation', () => {
|
||||
var geolocation = new AMap.Geolocation({
|
||||
// 是否使用高精度定位,默认:true
|
||||
enableHighAccuracy: true,
|
||||
// 设置定位超时时间,默认:无穷大
|
||||
timeout: 10000,
|
||||
// 定位按钮的停靠位置的偏移量
|
||||
offset: [10, 20],
|
||||
// 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
|
||||
zoomToAccuracy: true,
|
||||
// 定位按钮的排放位置, RB表示右下
|
||||
position: 'RB'
|
||||
})
|
||||
|
||||
geolocation.getCurrentPosition((status, result) => {
|
||||
if (status === 'complete') {
|
||||
const {lng, lat} = result.position
|
||||
let p1 = [lng, lat];
|
||||
var dis = AMap.GeometryUtil.distance(p1, location);
|
||||
if (dis > rangeMeter) {
|
||||
this.$dialog.alert({
|
||||
title: '',
|
||||
message: '距离活动打卡点还有大约' + Math.ceil(dis) + '米',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
}).then(() => {
|
||||
|
||||
this.startLoading()
|
||||
this.$http.post('activity/mobile/culture/manage/singleSignUp', {}, {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
}).then(resp => {
|
||||
if (resp.code === 200) {
|
||||
this.getSignStatus()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
})
|
||||
this.closeLoading()
|
||||
})
|
||||
} else {
|
||||
this.$toast.fail('获取定位失败!')
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if (this.activityId) {
|
||||
this.getActivityInfo()
|
||||
this.isRegisterForMe()
|
||||
this.getSignStatus()
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.activityId = option.id
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<index :activity-type="40003"></index>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import index from "./index.vue";
|
||||
|
||||
export default {
|
||||
name: "club",
|
||||
props: {},
|
||||
components:{
|
||||
index
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="search-wrap">
|
||||
<van-search
|
||||
@search="onRefresh"
|
||||
maxlength="10"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"/>
|
||||
<van-dropdown-menu class="proposal-dropdown-menu">
|
||||
<van-dropdown-item v-model="queryForm.year" :options="yearList"
|
||||
@change="getActivityByYearOrType"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.activityId" :options="activityOptions"
|
||||
@change="onRefresh"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.unionId" :options="unionList"
|
||||
@change="onRefresh"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</view>
|
||||
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<view v-for="row in tableData" :key="row.id" class="van-doc-card">
|
||||
<view>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名" :value="row.userName"></van-cell>
|
||||
<van-cell title="工号" :value="row.loginName"/>
|
||||
<van-cell title="性别" :value="row.sex"/>
|
||||
<van-cell title="联系方式" :value="row.mobile || '无'"/>
|
||||
<van-cell title="所属单位" :value="row.unitName || '无'"/>
|
||||
<van-cell title="所属工会" :value="row.unionName"/>
|
||||
<van-cell title="报名人" :value="row.applyUserName"/>
|
||||
<van-cell title="报名时间" :value="row.applyDateTime"/>
|
||||
<div style="display: flex;justify-content: flex-end">
|
||||
<van-button size="small" round type="danger" @click="doDelete(row)"style="width: 65px;">删除</van-button>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
</view>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="!loading && tableData.length===0"
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mobileMixins from "@/mixins/mobileMixins";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
mixins: [mobileMixins],
|
||||
props: {
|
||||
activityType: {
|
||||
type: Number, default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activityList: [],
|
||||
pageForm: {
|
||||
searchName: ''
|
||||
},
|
||||
queryForm: {
|
||||
unionId: '',
|
||||
activityType: this.activityType,
|
||||
year: new Date().getFullYear()
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
activityOptions() {
|
||||
if (this.activityList) {
|
||||
return this.activityList.map(v => {
|
||||
return {
|
||||
value: v.id,
|
||||
text: v.name
|
||||
}
|
||||
})
|
||||
}
|
||||
return []
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
doDelete(row) {
|
||||
this.$modal.confirm('确认要删除吗?').then(async () => {
|
||||
const resp = await this.$http.delete('/activity/culture/applyUser/statistics/doDeleteActivityUser', {
|
||||
params: {
|
||||
activityId: row.tissueId,
|
||||
applyUserId: row.applyUserId,
|
||||
id: row.id
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msgSuccess(resp.msg)
|
||||
this.onRefresh()
|
||||
} else {
|
||||
this.$modal.msgError(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.loading = true
|
||||
this.$http.post('/activity/culture/applyUser/statistics/pageData', {...this.pageForm}, {
|
||||
params: this.queryForm
|
||||
}).then(res => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.$modal.closeLoading()
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
async getActivityByYearOrType() {
|
||||
const resp = await this.$http.get('/activity/culture/applyUser/statistics/getActivityByYearOrType', {
|
||||
params: {
|
||||
activityType: this.queryForm.activityType,
|
||||
year: this.queryForm.year
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.activityList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.queryForm, 'activityId', resp.data[0].id)
|
||||
} else {
|
||||
this.$set(this.queryForm, 'activityId', null)
|
||||
}
|
||||
await this.onRefresh()
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getActivityByYearOrType()
|
||||
this.unionList = await this.getUnionList(null)
|
||||
this.unionList.map(v => {
|
||||
v.value = v.id,
|
||||
v.text = v.unionName
|
||||
})
|
||||
this.unionList.unshift({text: '全部工会', value: ""})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<index :activity-type="40001"></index>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import index from "./index.vue";
|
||||
|
||||
export default {
|
||||
name: "summarySchool",
|
||||
props: {},
|
||||
components:{
|
||||
index
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<index :activity-type="40002"></index>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import index from "./index.vue";
|
||||
|
||||
export default {
|
||||
name: "union",
|
||||
props: {},
|
||||
components:{
|
||||
index
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,334 @@
|
||||
<template>
|
||||
|
||||
<view class="uni-padding-wrap" ref="navbar">
|
||||
<div>
|
||||
<culture-activity-info :o="o" :isRegister="isRegister" :isSign="isSign"
|
||||
:hasRegUserNum="hasRegUserNum"
|
||||
:unionLimitNum="unionLimitNum"></culture-activity-info>
|
||||
|
||||
<van-cell-group inset class="mt5">
|
||||
<van-cell title="报名人员" class="regCell">
|
||||
<template #label>
|
||||
<div>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
本活动限制总报名人数:({{ o.totalUserNumberLimit }})人
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
当前分工会报名限额<span
|
||||
style="color: orange">({{ o.limitUnion ? o.limitUnion.limitCount : 0 }})人</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt5">
|
||||
<div v-if="registerList && registerList.length>0">
|
||||
<template v-for="item in registerList">
|
||||
<van-tag type="primary" :closeable="tagCloseable" size="medium"
|
||||
@close="removeRegUser(item)">
|
||||
{{ item.userName }}
|
||||
</van-tag>
|
||||
</template>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div style="text-align: center;margin-top: 20px;">
|
||||
无报名人员
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt5" style="text-align: right"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="tagCloseable" size="mini" type="info" @click="openUserActionSheet">
|
||||
选择报名人员
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
<van-action-sheet v-model="userActionSheet" title="选择报名人员" class="userActionPopup">
|
||||
<van-search v-model="searchKey" @search="onSearchUser" show-action placeholder="请输入姓名搜索">
|
||||
<template #action>
|
||||
<div @click="onSearchUser">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
|
||||
<div class="van-action-sheet__content mt5" v-if="searchUserList && searchUserList.length>0">
|
||||
<template v-if="searchLoading">
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
<template v-if="!searchLoading">
|
||||
<template v-for="item in searchUserList"
|
||||
v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)"
|
||||
class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{ item.userName }}-{{ item.loginName }}</span>
|
||||
</button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty v-else description=""></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button v-if="tagCloseable" @click="doSave()" style="border-radius: 10px" block
|
||||
type="info"
|
||||
:color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
<template v-else="!tagCloseable">
|
||||
<van-button @click="tagCloseable = true"
|
||||
style="border-radius: 10px"
|
||||
block type="info"
|
||||
:color="themeColor">
|
||||
修 改
|
||||
</van-button>
|
||||
<van-button @click="doDelete()" style="border-radius: 10px;margin-top: 10px" block
|
||||
type="info"
|
||||
color="red">
|
||||
取消报名
|
||||
</van-button>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cultureActivityInfo from "./common/cultureActivityInfo";
|
||||
import moment from "moment";
|
||||
import initMap from "../../../mixins/activity/culture/initMap";
|
||||
import mobileMixins from "../../../mixins/mobileMixins";
|
||||
|
||||
export default {
|
||||
name: "unionReg",
|
||||
components: {cultureActivityInfo},
|
||||
mixins: [initMap, mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
activityId: '',
|
||||
o: {},
|
||||
registerList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: '',
|
||||
searchUserList: [],
|
||||
tagCloseable: true,
|
||||
searchLoading: false,
|
||||
isRegister: false,
|
||||
isSign: false,
|
||||
hasRegUserNum: 0,
|
||||
unionLimitNum: 0,
|
||||
|
||||
userId: '',
|
||||
userName: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doDelete() {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '活动火爆,取消报名后将重新排队。确定要取消报名吗?',
|
||||
}).then(async () => {
|
||||
this.$modal.loading('取消报名中,请稍后...')
|
||||
const resp = await this.$http.delete('/activity/culture/applyUser/doSingleCancelRegister', {
|
||||
params:{activityId: this.activityId}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
await this.getRegisterUser()
|
||||
await this.getHasRegUserNum()
|
||||
setTimeout(()=>{
|
||||
this.$toast.success(resp.msg)
|
||||
},1000)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
async doSave() {
|
||||
if (this.registerList.length === 0) {
|
||||
this.$toast('请添加报名人员后再提交!')
|
||||
return
|
||||
}
|
||||
if (this.o.signUpMethod === 3) {
|
||||
if (this.registerList.length !== this.o.teamNum) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是组队模式请您找朋友一起报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
this.addRegisterList = await this.selectRegisterList()
|
||||
let arr = []
|
||||
if (this.addRegisterList && this.addRegisterList.length > 0) {
|
||||
this.addRegisterList.forEach(v => {
|
||||
this.registerList.forEach(r => {
|
||||
if (v.id === r.id && v.applyUserId !== this.userId.toString()) {
|
||||
arr.push(r.userName)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
if (arr && arr.length > 0) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '【' + arr.toString() + '】已成功报名,您无法添加其组队!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '此活动开启了签到,需要您活动当天前往签到点位核实活动报名人员后进行签到!'
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: message + '您确认要报名吗?',
|
||||
}).then(async () => {
|
||||
this.$modal.loading('报名中...')
|
||||
const resp = await this.$http.post('activity/culture/applyUser/doSaveUnionRegister', {}, {
|
||||
params: {
|
||||
activityId: this.activityId,
|
||||
personIds: this.registerList.map(v => v.id)
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
await this.getRegisterUser()
|
||||
await this.getHasRegUserNum()
|
||||
setTimeout(()=>{
|
||||
this.$toast.success(resp.msg)
|
||||
},1000)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
|
||||
},
|
||||
async selectRegisterList() {
|
||||
const resp = await this.$http.get('activity/mobile/culture/manage/selectRegisterList', {
|
||||
params: {
|
||||
activityId: this.activityId
|
||||
}
|
||||
})
|
||||
return resp.data
|
||||
|
||||
},
|
||||
async getRegisterUser() {
|
||||
this.registerList = await this.selectRegisterList()
|
||||
|
||||
if (this.registerList.length > 0) {
|
||||
this.tagCloseable = false
|
||||
} else {
|
||||
this.tagCloseable = true
|
||||
}
|
||||
if (this.o.signUpMethod === 3 && this.registerList.length === 0) {
|
||||
this.registerList.push({id: this.userId, userName: this.userName})
|
||||
}
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ''
|
||||
this.searchUserList = []
|
||||
this.onSearchUser()
|
||||
this.userActionSheet = true
|
||||
},
|
||||
async onSearchUser() {
|
||||
this.searchLoading = true
|
||||
const resp = await this.$http.get('activity/mobile/culture/manage/searchNoRegisterUser', {
|
||||
params: {
|
||||
activityId: this.activityId,
|
||||
searchKey: this.searchKey
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {id, userName} = item
|
||||
this.registerList.push({id, userName})
|
||||
this.$modal.msgSuccess('添加成功')
|
||||
},
|
||||
async removeRegUser(item) {
|
||||
if (this.userId === item.id) {
|
||||
this.$toast.fail("因为是组队报名,自己不能删除")
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要移除吗?',
|
||||
}).then(() => {
|
||||
const index = this.registerList.findIndex(v => v.id === item.id)
|
||||
this.registerList.splice(index, 1)
|
||||
}).catch(() => {
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.startLoading()
|
||||
this.userId = this.$store.getters.userId
|
||||
this.userName = this.$store.getters.userInfo.nickName
|
||||
if (this.activityId) {
|
||||
this.getActivityInfo()
|
||||
setTimeout(() => {
|
||||
this.getRegisterUser()
|
||||
}, 300)
|
||||
}
|
||||
this.closeLoading()
|
||||
},
|
||||
onLoad(option) {
|
||||
this.activityId = option.id
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.regCell .van-cell__label .van-tag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.userActionPopup {
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
.userActionPopup .van-cell__value {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.userActionPopup .addBtn {
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.userActionPopup .van-action-sheet__item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userActionPopup .userSelSuccess {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,162 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-list v-model="tableLoading" :finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" @load="load">
|
||||
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openView(o)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{ o.activityName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{ o.type === 1 ? '教工作品' : '亲子作品' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">创 建 人:</span>
|
||||
{{o.createUserName}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">创建时间:</span>
|
||||
{{o.createTime}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">开始时间:</span>
|
||||
{{o.startTime}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">结束时间:</span>
|
||||
{{o.endTime}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'activityList',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
},
|
||||
typeOption: [
|
||||
{text: '全部类型', value: null},
|
||||
{text: '教工作品', value: 1},
|
||||
{text: '亲子作品', value: 2},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.load()
|
||||
},
|
||||
async load() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('/activity/opusLevy/activityManage/mobilePageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
type: this.pageForm.type,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
openView(o) {
|
||||
const {id, startTime, endTime} = o
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") < startTime) {
|
||||
this.$modal.msg('报名暂未开始')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > endTime) {
|
||||
this.$modal.msg('报名已结束')
|
||||
return
|
||||
}
|
||||
this.$tab.navigateTo('/pages/activity/opusLevy/opusApply?id=' + id)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.$set(this.pageForm, "type", this.typeOption[0].value)
|
||||
await this.load()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
|
||||
<div style="padding-bottom: 20px;">
|
||||
|
||||
<van-form readonly input-align="right">
|
||||
<div class="van-cell-group__title">
|
||||
基础信息
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field readonly :value="viewData.userName" label="姓名">
|
||||
<template #label>
|
||||
<span v-html="'姓  名'"></span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field readonly :value="viewData.loginName" label="工号">
|
||||
<template #label>
|
||||
<span v-html="'工  号'"></span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field readonly :value="viewData.deptName" label="所属单位"></van-field>
|
||||
<van-field readonly :value="viewData.unionName" label="所属工会"></van-field>
|
||||
</van-cell-group>
|
||||
<div class="van-cell-group__title">
|
||||
作品信息
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field readonly name="type" :value="viewData.type === 1 ? '教工作品' : '亲子作品'" label="类型">
|
||||
<template #label>
|
||||
<span v-html="'类  型'"></span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field readonly name="type" :value="viewData.parentTypeName" label="活动类别"></van-field>
|
||||
<van-field readonly name="type" :value="viewData.childTypeName" label="作品类别"></van-field>
|
||||
<van-field readonly :value="viewData.opusDescribe" label="作品描述"
|
||||
input-align="left"
|
||||
style="flex-flow: column"
|
||||
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
|
||||
|
||||
<van-cell v-if="viewData.fileType.includes('photo')" class="column-cell">
|
||||
<template #title>
|
||||
<div>照  片</div>
|
||||
</template>
|
||||
<FilePreview :files="viewData.photoFiles"></FilePreview>
|
||||
</van-cell>
|
||||
|
||||
<van-cell v-if="viewData.fileType.includes('media')" class="column-cell">
|
||||
<template #title>
|
||||
<div>音  频</div>
|
||||
</template>
|
||||
<FilePreview :files="viewData.mediaFiles"></FilePreview>
|
||||
</van-cell>
|
||||
|
||||
<van-cell v-if="viewData.fileType.includes('video')" class="column-cell">
|
||||
<template #title>
|
||||
<div>视  频</div>
|
||||
</template>
|
||||
<FilePreview :files="viewData.videoFiles"></FilePreview>
|
||||
</van-cell>
|
||||
|
||||
<van-cell v-if="viewData.fileType.includes('word')" class="column-cell">
|
||||
<template #title>
|
||||
<div>文  档</div>
|
||||
</template>
|
||||
<FilePreview :files="viewData.wordFiles"></FilePreview>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
<template v-if="viewData.unionAuditId">
|
||||
<div class="van-cell-group__title">
|
||||
分工会审核信息
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div>
|
||||
<van-field label="审核人员" :value="viewData.unionAudit.userName" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.unionAudit.auditTime" left-icon="clock-o" readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.unionAudit.auditOpinion ? viewData.unionAudit.auditOpinion : '暂无'" readonly></van-field>
|
||||
<van-field left-icon="orders-o" name="sign" label="签字">
|
||||
<template #label>
|
||||
<span v-html="'签  字'"></span>
|
||||
</template>
|
||||
<template #input>
|
||||
<image :src="viewData.unionAudit.auditSign"
|
||||
v-if="viewData.unionAudit.auditSign"></image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="viewData.schoolAuditId">
|
||||
<div class="van-cell-group__title">
|
||||
校工会审核信息
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div>
|
||||
<van-field label="审核人员" :value="viewData.schoolAudit.userName" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.schoolAudit.auditTime" left-icon="clock-o" readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.schoolAudit.auditOpinion ? viewData.schoolAudit.auditOpinion : '暂无'" readonly></van-field>
|
||||
<van-field left-icon="orders-o" name="sign" label="签字">
|
||||
<template #label>
|
||||
<span v-html="'签  字'"></span>
|
||||
</template>
|
||||
<template #input>
|
||||
<image :src="viewData.schoolAudit.auditSign"
|
||||
v-if="viewData.schoolAudit.auditSign"></image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'opusInfo',
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getInfo(id) {
|
||||
const {data, code, msg} = await this.$http.get("/activity/opusLevy/opusInfo/findOne/" + id)
|
||||
if (data) {
|
||||
this.viewData = data
|
||||
this.viewData.fileType = JSON.parse(this.viewData.fileType)
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
::v-deep .van-field__control {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 16px !important;
|
||||
text-indent: 4px !important;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
left: 5px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,418 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div>
|
||||
<image style="height: 200px; width: 100%;" :src="imgUrl">
|
||||
|
||||
</image>
|
||||
</div>
|
||||
|
||||
<div v-if="active === 0" class="page-v">
|
||||
<div class="detail-v">
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<span :style="'color: ' + boxData.color">活动介绍</span>
|
||||
<van-divider></van-divider>
|
||||
<div v-html="boxData.introduce" style="line-height:24px;"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<span :style="'color: '+boxData.color">参加人员</span>
|
||||
<van-divider></van-divider>
|
||||
<div v-html="boxData.joinUser" style="line-height:24px;"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<span :style="'color: '+boxData.color">奖励方式</span>
|
||||
<van-divider></van-divider>
|
||||
<div v-html="boxData.awardMethod" style="line-height:24px;"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<span :style="'color: '+boxData.color">活动内容</span>
|
||||
<van-divider></van-divider>
|
||||
<div v-html="boxData.content" style="line-height:24px;"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<span :style="'color: '+boxData.color">活动联系人</span>
|
||||
<van-divider></van-divider>
|
||||
<div v-html="boxData.concatPerson" style="line-height:24px;"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<span :style="'color: '+boxData.color">其他</span>
|
||||
<van-divider></van-divider>
|
||||
<div v-html="boxData.other" style="line-height:24px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="active === 1" class="page-v">
|
||||
<van-form @submit="doSubmit" style="padding-bottom: 60px">
|
||||
<div class="van-cell-group__title">
|
||||
基本信息
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field v-model="formData.loginName" readonly name="loginName" label="工号" placeholder="工号">
|
||||
<template #label>
|
||||
<span>工  号</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field readonly v-model="formData.userName" name="userName" label="姓名">
|
||||
<template #label>
|
||||
<span>姓  名</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field readonly v-model="formData.unitName" name="unitName" label="所属单位"></van-field>
|
||||
<van-field
|
||||
required
|
||||
v-model="formData.mobile"
|
||||
name="mobile"
|
||||
label="手机号码" type="tel"
|
||||
placeholder="手机号码"
|
||||
:rules="[{ required: true, message: '请填写手机号码' }]"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<template v-if="boxData.type === 2">
|
||||
<div class="van-cell-group__title">
|
||||
子女信息
|
||||
</div>
|
||||
<van-field v-model="formData.childName" name="childName" label="子女姓名" placeholder="请填写子女姓名"
|
||||
required :rules="[{ required: true, message: '请填写子女姓名' }]"></van-field>
|
||||
<van-field v-model="formData.childAge" type="digit" name="childName" label="子女年龄" placeholder="请填写子女年龄"
|
||||
required :rules="[{ required: true, message: '请填写子女年龄' }]"></van-field>
|
||||
<van-field readonly v-model="formData.childSex" name="childName" label="子女性别"
|
||||
required @click="sexPicker = true" placeholder="请点击选择子女性别"
|
||||
:rules="[{ required: true, message: '请点击选择子女性别' }]"></van-field>
|
||||
<van-popup v-model="sexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男', '女']"
|
||||
@confirm="function(val){ formData.childSex = val; sexPicker=false }"
|
||||
@cancel="sexPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field readonly v-model="formData.childRelation" name="childRelation" label="子女关系"
|
||||
required @click="relationPicker = true" placeholder="请点击选择子女关系"
|
||||
:rules="[{ required: true, message: '请点击选择子女关系' }]"></van-field>
|
||||
<van-popup v-model="relationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['父亲', '母亲', '第三代']"
|
||||
@confirm="function(val){ formData.childRelation = val; relationPicker=false }"
|
||||
@cancel="relationPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
作品信息
|
||||
</div>
|
||||
|
||||
<van-field
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
name="picker"
|
||||
:value="formData.parentTypeName"
|
||||
label="活动类别"
|
||||
placeholder="请点击选择活动类别"
|
||||
@click="parentTypePicker = true"
|
||||
:rules="[{ required: true, message: '请选择活动类别' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="parentTypePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
value-key="parentTypeName"
|
||||
:columns="boxData.parentTypeList"
|
||||
@confirm="parentTypeClick"
|
||||
@cancel="parentTypePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
name="picker"
|
||||
:value="formData.childTypeName"
|
||||
label="作品类别"
|
||||
placeholder="请点击选择作品类别"
|
||||
@click="showPicker = true"
|
||||
:rules="[{ required: true, message: '请选择作品类别' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
value-key="childTypeName"
|
||||
:columns="childTypeList"
|
||||
@confirm="function(val){ formData.childTypeId = val.id; formData.childTypeName = val.childTypeName; showPicker=false }"
|
||||
@cancel="showPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field type="textarea" show-word-limit maxlength="100" autosize
|
||||
v-model="formData.opusDescribe"
|
||||
label="作品介绍"
|
||||
placeholder="请填写作品介绍"></van-field>
|
||||
|
||||
<template v-if="boxData.fileType.includes('photo')">
|
||||
<van-field label="图片" readonly style="border: none;" input-align="right">
|
||||
<template #label>
|
||||
<span>图  片</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field>
|
||||
<template #input>
|
||||
<FileUpload v-model="formData.photoFiles" ref="photoFilesUpload"/>
|
||||
</template>
|
||||
</van-field>
|
||||
</template>
|
||||
|
||||
<template v-if="boxData.fileType.includes('media')">
|
||||
<van-field label="音频" readonly style="border: none;" input-align="right">
|
||||
<template #label>
|
||||
<span>音  频</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field>
|
||||
<template #input>
|
||||
<FileUpload v-model="formData.mediaFiles" ref="mediaFilesUpload"/>
|
||||
</template>
|
||||
</van-field>
|
||||
</template>
|
||||
|
||||
<template v-if="boxData.fileType.includes('video')">
|
||||
<van-field label="视频" readonly style="border: none;" input-align="right">
|
||||
<template #label>
|
||||
<span>视  频</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field>
|
||||
<template #input>
|
||||
<van-uploader></van-uploader>
|
||||
<FileUpload v-model="formData.videoFiles" ref="videoFilesUpload"/>
|
||||
</template>
|
||||
</van-field>
|
||||
</template>
|
||||
|
||||
<template v-if="boxData.fileType.includes('word')">
|
||||
<van-field label="文档" readonly style="border: none;" input-align="right">
|
||||
<template #label>
|
||||
<span>文  档</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field>
|
||||
<template #input>
|
||||
<FileUpload v-model="formData.wordFiles" ref="wordFilesUpload"/>
|
||||
</template>
|
||||
</van-field>
|
||||
</template>
|
||||
|
||||
<div style="margin: 16px;">
|
||||
<van-button round block :color="boxData.hdcolor" type="info"
|
||||
native-type="submit">
|
||||
提交
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<van-tabbar
|
||||
style="max-width: 600px;position: fixed;left: 0;bottom: 0;right: 0;margin: auto"
|
||||
v-model="active"
|
||||
:active-color="boxData.hdcolor"
|
||||
inactive-color="#000"
|
||||
>
|
||||
<van-tabbar-item icon="label-o">介绍</van-tabbar-item>
|
||||
<van-tabbar-item icon="edit">报名</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
<van-number-keyboard safe-area-inset-bottom/>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from "moment";
|
||||
|
||||
export default {
|
||||
name: 'opusApply',
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
this.zpId = option.zpId
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
id: '',
|
||||
zpId: '',
|
||||
active: 0,
|
||||
boxData: {},
|
||||
showPicker: false,
|
||||
imgUrl: '',
|
||||
sexPicker: false,
|
||||
relationPicker: false,
|
||||
parentTypePicker: false,
|
||||
childTypeList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
parentTypeClick(val) {
|
||||
this.formData.parentTypeId = val.id
|
||||
this.formData.parentTypeName = val.parentTypeName
|
||||
this.childTypeList = val.childTypeList
|
||||
this.formData.childTypeId = ''
|
||||
this.formData.childTypeName = ''
|
||||
this.parentTypePicker=false
|
||||
},
|
||||
async doSubmit() {
|
||||
try {
|
||||
if(this.$refs.photoFilesUpload) {
|
||||
await this.$refs.photoFilesUpload.upload()
|
||||
if(this.formData.photoFiles.length === 0) {
|
||||
this.$modal.msg('请上传图片')
|
||||
return
|
||||
}
|
||||
}
|
||||
if(this.$refs.mediaFilesUpload) {
|
||||
await this.$refs.mediaFilesUpload.upload()
|
||||
if(this.formData.mediaFiles.length === 0) {
|
||||
this.$modal.msg('请上传音频')
|
||||
return
|
||||
}
|
||||
}
|
||||
if(this.$refs.videoFilesUpload) {
|
||||
await this.$refs.videoFilesUpload.upload()
|
||||
if(this.formData.videoFiles.length === 0) {
|
||||
this.$modal.msg('请上传视频')
|
||||
return
|
||||
}
|
||||
}
|
||||
if(this.$refs.wordFilesUpload) {
|
||||
await this.$refs.wordFilesUpload.upload()
|
||||
if(this.formData.wordFiles.length === 0) {
|
||||
this.$modal.msg('请上传文档')
|
||||
return
|
||||
}
|
||||
}
|
||||
this.$modal.confirm('您当前选择的是“' + this.formData.parentTypeName + '”,是否确认上传?').then(async () => {
|
||||
let vLoading = this.$toast.loading({
|
||||
message: '努力提交中',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
})
|
||||
this.formData.activityId = this.id
|
||||
const resp = await this.$http.post('activity/opusLevy/opusUpload/doHandle', this.formData)
|
||||
if (resp.code === 200) {
|
||||
vLoading.message = resp.msg
|
||||
setTimeout(() => {
|
||||
vLoading.close()
|
||||
if (this.id) {
|
||||
this.$tab.navigateBack()
|
||||
} else {
|
||||
this.$tab.redirectTo('/pages/activity/opusLevy/opusMine')
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
initUserInfo() {
|
||||
this.$set(this.formData, 'loginName', this.$store.state.user.loginname)
|
||||
this.$set(this.formData, 'userName', this.$store.state.user.name)
|
||||
this.$set(this.formData, 'unitName', this.$store.state.user.userInfo.dept.deptName)
|
||||
this.$set(this.formData, 'userId', this.$store.state.user.id)
|
||||
this.$set(this.formData, 'mobile', this.$store.state.user.userInfo.mobile)
|
||||
},
|
||||
async findOne() {
|
||||
const resp = await this.$http.get("/activity/opusLevy/activityManage/findOne/" + this.id)
|
||||
if (resp.code === 200) {
|
||||
this.boxData = resp.data
|
||||
this.imgUrl = this.boxData.files[0].link
|
||||
}
|
||||
},
|
||||
async findZpInfo() {
|
||||
const resp = await this.$http.get('activity/opusLevy/opusUpload/findOne/' + this.zpId)
|
||||
this.formData = { ...resp.data }
|
||||
this.childTypeList = resp.data.childTypeList
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initUserInfo()
|
||||
if (this.id !== '' && this.id !== undefined) {
|
||||
this.findOne()
|
||||
}
|
||||
if (this.zpId !== '' && this.zpId !== undefined) {
|
||||
this.findZpInfo()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 14px !important;
|
||||
text-indent: 4px !important;
|
||||
padding: 10px 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-overlay {
|
||||
position: absolute !important;
|
||||
}
|
||||
|
||||
.page-v {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.detail-v {
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
|
||||
.p15 {
|
||||
padding: 0 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-v {
|
||||
|
||||
}
|
||||
|
||||
.title-v span {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-doc-demo-block__title {
|
||||
margin: 0;
|
||||
padding: 0 16px;
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.goods-card {
|
||||
margin: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.van-swipe-cell__wrapper {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-list v-model="tableLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" @load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openView(o)">
|
||||
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<uni-icons type="person-filled" size="26"
|
||||
style="background-color: #44b887; border-radius: 50%; color: white"></uni-icons>
|
||||
</van-col>
|
||||
<van-col span="11" class="username">
|
||||
{{ o.submitUserName + '(' + o.loginName + ')' }}
|
||||
</van-col>
|
||||
<van-col span="10" class="applyTime">
|
||||
<span>上传时间:{{ o.submitTime }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" style="margin-top: 8px">
|
||||
<van-col span="12">
|
||||
<span>活动类别:</span>
|
||||
<span>{{ o.parentTypeName }}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span>作品类别:</span>
|
||||
<span>{{ o.childTypeName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属单位:</span>
|
||||
<span>{{ o.deptName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属工会:</span>
|
||||
<span>{{ o.unionName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>审核状态:</span>
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div style="position: absolute; right: 8px; bottom: 10px">
|
||||
<van-button @click.stop="doDelete(o)" v-if="[200,210,220,250].includes(o.state)" color="#f56c6c" size="small" round style="margin-right: 6px">删除</van-button>
|
||||
<van-button @click.stop="openEdit(o)" v-if="[200,210,220,250].includes(o.state)" color="#1867b0" size="small" round>编辑</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" style="height: 100%; width: 100%; background-color: #f6f7f9">
|
||||
<van-nav-bar title="作品信息" left-arrow placeholder fixed
|
||||
@click-left="infoShow = false"></van-nav-bar>
|
||||
<OpusInfo ref="info"></OpusInfo>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import OpusInfo from "./common/opusInfo.vue";
|
||||
export default {
|
||||
name: 'opusMine',
|
||||
components: {OpusInfo},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
},
|
||||
typeOption: [
|
||||
{text: '全部类型', value: null},
|
||||
{text: '教工作品', value: 1},
|
||||
{text: '亲子作品', value: 2},
|
||||
],
|
||||
infoShow: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.load()
|
||||
},
|
||||
openEdit(o) {
|
||||
this.$tab.navigateTo('/pages/activity/opusLevy/opusApply?id=' + o.activityId + '&zpId=' + o.id)
|
||||
},
|
||||
async doDelete(o) {
|
||||
this.$modal.confirm('确定要删除此次作品吗?').then(async () => {
|
||||
const resp = await this.$http.post("/activity/opusLevy/opusUpload/doDelete/" + o.id)
|
||||
if (resp.code === 200) {
|
||||
await this.yearChange()
|
||||
this.$modal.msg(resp.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
async load() {
|
||||
const resp = await this.$http.post('/activity/opusLevy/opusUpload/pageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
activityType: this.pageForm.type,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
openView(o) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getInfo(o.id)
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.$set(this.pageForm, "type", this.typeOption[0].value)
|
||||
await this.load()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
::v-deep .van-nav-bar__title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__left .van-icon{
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 22px;
|
||||
}
|
||||
::v-deep .van-nav-bar__left {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
.info {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info span:nth-of-type(1) {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 12px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<OpusInfo ref="info" :id.sync="id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
校工会审核
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly left-icon="contact"
|
||||
:value="formData.userName"
|
||||
name="userName"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize left-icon="chat-o"
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" left-icon="orders-o" required>
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<v-sign v-model="formData.auditSign"></v-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">退回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</OpusInfo>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import OpusInfo from "./common/opusInfo.vue";
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'opusUnionAudit',
|
||||
components: {OpusInfo},
|
||||
mixins: [initTableMixins],
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
show: false,
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$modal.msg('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.pass = pass
|
||||
const resp = await this.$http.post('/activity/opusLevy/opusSchoolAudit/doReview', this.formData, {
|
||||
params: {
|
||||
id: this.id,
|
||||
pass: pass,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg(resp.msg)
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.navigateBack()
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
userName: this.$store.state.user.name,
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: '',
|
||||
auditSign: ""
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getInfo(this.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange" :options="unionList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange" :options="unitList">
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-list v-model="tableLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" @load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openView(o)">
|
||||
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<uni-icons type="person-filled" size="26"
|
||||
style="background-color: #44b887; border-radius: 50%; color: white"></uni-icons>
|
||||
</van-col>
|
||||
<van-col span="11" class="username">
|
||||
{{ o.userName + '(' + o.loginName + ')' }}
|
||||
</van-col>
|
||||
<van-col span="10" class="applyTime">
|
||||
<span>上传时间:{{ o.submitTime }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" style="margin-top: 8px">
|
||||
<van-col span="12">
|
||||
<span>活动类别:</span>
|
||||
<span>{{ o.parentTypeName }}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span>作品类别:</span>
|
||||
<span>{{ o.childTypeName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属单位:</span>
|
||||
<span>{{ o.deptName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属工会:</span>
|
||||
<span>{{ o.unionName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>审核状态:</span>
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div v-if="[250,260,270].includes(o.state)" style="position: absolute; right: 8px; bottom: 10px">
|
||||
<van-button @click.stop="rollBack(o)" color="#1867b0" size="small" round>撤 回</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" style="height: 100%; width: 100%; background-color: #f6f7f9">
|
||||
<van-nav-bar title="作品信息" left-arrow placeholder fixed
|
||||
@click-left="infoShow = false"></van-nav-bar>
|
||||
<OpusInfo ref="viewInfo"></OpusInfo>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import OpusInfo from "./common/opusInfo.vue";
|
||||
export default {
|
||||
name: 'opusUnionAuditList',
|
||||
components: {OpusInfo},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
yearList: [],
|
||||
auditList: [{
|
||||
text: '未审核',
|
||||
value: false
|
||||
},
|
||||
{
|
||||
text: '已审核',
|
||||
value: true
|
||||
},
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
typeOption: [
|
||||
{text: '全部类型', value: null},
|
||||
{text: '教工作品', value: 1},
|
||||
{text: '亲子作品', value: 2},
|
||||
],
|
||||
id: '',
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async rollBack(o) {
|
||||
this.$modal.confirm('您确定要撤回吗?').then(async () => {
|
||||
const resp = await this.$http.post('activity/opusLevy/opusSchoolAudit/rollBack/' + o.id);
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
this.id = o.id
|
||||
if(o.state === 240) {
|
||||
this.$tab.navigateTo('/pages/activity/opusLevy/opusSchoolAudit?id=' + o.id)
|
||||
} else {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.viewInfo.getInfo(o.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$http.post('/activity/opusLevy/opusSchoolAudit/pageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
activityType: this.pageForm.type,
|
||||
unitId: this.pageForm.unitId,
|
||||
unionId: this.pageForm.unionId,
|
||||
isAudit: this.pageForm.isAudit,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
yearChange() {
|
||||
this.finished = false
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async getUnions() {
|
||||
const resp = await this.$http.get('/system/union/listUnionByRole')
|
||||
this.unionList = resp.data
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionName
|
||||
v.value = v.id
|
||||
})
|
||||
this.unionList.unshift({
|
||||
text: "全部工会",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
//获取二级单位信息根据权限
|
||||
async getUnits() {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByRole')
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getUnitsByUnionId(unionId) {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
if (this.unitList) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.$auth.hasRoleOr(['admin', 'A06', 'H03'])) {
|
||||
await this.getUnitsByUnionId(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.getUnitsByUnionId(this.$store.state.user.userInfo.union.id)
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({
|
||||
text: i,
|
||||
value: i
|
||||
})
|
||||
}
|
||||
await this.getUnions()
|
||||
await this.getUnits()
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
await this.pageData()
|
||||
this.$set(this.pageForm, "type", this.typeOption[0].value)
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
.info {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info span:nth-of-type(1) {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 12px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__left .van-icon{
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 22px;
|
||||
}
|
||||
::v-deep .van-nav-bar__left {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<OpusInfo ref="info" :id.sync="id" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
分工会审核
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly left-icon="contact"
|
||||
:value="formData.userName"
|
||||
name="userName"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize left-icon="chat-o"
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" left-icon="orders-o" required>
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<v-sign v-model="formData.auditSign"></v-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">退回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</OpusInfo>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import OpusInfo from "./common/opusInfo.vue";
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'opusUnionAudit',
|
||||
components: {OpusInfo},
|
||||
mixins: [initTableMixins],
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
show: false,
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$modal.msg('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.pass = pass
|
||||
const resp = await this.$http.post('/activity/opusLevy/opusUnionAudit/doReview', this.formData, {
|
||||
params: {
|
||||
id: this.id,
|
||||
pass: pass,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg(resp.msg)
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.navigateBack()
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
userName: this.$store.state.user.name,
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: '',
|
||||
auditSign: ""
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getInfo(this.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange" :options="unionList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange" :options="unitList">
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-list v-model="tableLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" @load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openView(o)">
|
||||
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<uni-icons type="person-filled" size="26"
|
||||
style="background-color: #44b887; border-radius: 50%; color: white"></uni-icons>
|
||||
</van-col>
|
||||
<van-col span="11" class="username">
|
||||
{{ o.userName + '(' + o.loginName + ')' }}
|
||||
</van-col>
|
||||
<van-col span="10" class="applyTime">
|
||||
<span>上传时间:{{ o.submitTime }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" style="margin-top: 8px">
|
||||
<van-col span="12">
|
||||
<span>活动类别:</span>
|
||||
<span>{{ o.parentTypeName }}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span>作品类别:</span>
|
||||
<span>{{ o.childTypeName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属单位:</span>
|
||||
<span>{{ o.deptName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属工会:</span>
|
||||
<span>{{ o.unionName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>审核状态:</span>
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div v-if="[220,230,240].includes(o.state)" style="position: absolute; right: 8px; bottom: 10px">
|
||||
<van-button @click.stop="rollBack(o)" color="#1867b0" size="small" round>撤 回</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" style="height: 100%; width: 100%; background-color: #f6f7f9">
|
||||
<van-nav-bar title="作品信息" left-arrow placeholder fixed
|
||||
@click-left="infoShow = false"></van-nav-bar>
|
||||
<OpusInfo ref="viewInfo"></OpusInfo>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import OpusInfo from "./common/opusInfo.vue";
|
||||
export default {
|
||||
name: 'opusUnionAudit',
|
||||
components: {OpusInfo},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
yearList: [],
|
||||
auditList: [{
|
||||
text: '未审核',
|
||||
value: false
|
||||
},
|
||||
{
|
||||
text: '已审核',
|
||||
value: true
|
||||
},
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
typeOption: [
|
||||
{text: '全部类型', value: null},
|
||||
{text: '教工作品', value: 1},
|
||||
{text: '亲子作品', value: 2},
|
||||
],
|
||||
id: '',
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async rollBack(o) {
|
||||
this.$modal.confirm('您确定要撤回吗?').then(async () => {
|
||||
const resp = await this.$http.post('activity/opusLevy/opusUnionAudit/rollBack/' + o.id);
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
this.id = o.id
|
||||
if(o.state === 210) {
|
||||
this.$tab.navigateTo('/pages/activity/opusLevy/opusUnionAudit?id=' + o.id)
|
||||
} else {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.viewInfo.getInfo(o.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$http.post('/activity/opusLevy/opusUnionAudit/pageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
activityType: this.pageForm.type,
|
||||
unitId: this.pageForm.unitId,
|
||||
unionId: this.pageForm.unionId,
|
||||
isAudit: this.pageForm.isAudit,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
yearChange() {
|
||||
this.finished = false
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async getUnions() {
|
||||
const resp = await this.$http.get('/system/union/listUnionByRole')
|
||||
this.unionList = resp.data
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionName
|
||||
v.value = v.id
|
||||
})
|
||||
this.unionList.unshift({
|
||||
text: "全部工会",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
//获取二级单位信息根据权限
|
||||
async getUnits() {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByRole')
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getUnitsByUnionId(unionId) {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
if (this.unitList) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.$auth.hasRoleOr(['admin', 'A06', 'H03'])) {
|
||||
await this.getUnitsByUnionId(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.getUnitsByUnionId(this.$store.state.user.userInfo.union.id)
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({
|
||||
text: i,
|
||||
value: i
|
||||
})
|
||||
}
|
||||
await this.getUnions()
|
||||
await this.getUnits()
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
await this.pageData()
|
||||
this.$set(this.pageForm, "type", this.typeOption[0].value)
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
.info {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info span:nth-of-type(1) {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 12px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__left .van-icon{
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 22px;
|
||||
}
|
||||
::v-deep .van-nav-bar__left {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,522 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<!--<van-dropdown-item v-model="pageForm.meetingTime" :options="meetingTimeList"
|
||||
@change="doSearch"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div>
|
||||
<van-list
|
||||
v-model="tableLoading" v-if="tableData && tableData.length>0"
|
||||
:finished="finished" :immediate-check="false"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="load">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{ o.name }}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{ o.address }}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{ o.typename }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey"> 联系人:</span>
|
||||
{{o.contact_person}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联系方式:</span>{{ o.contact_phone }}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<!--<div class="cus_overflow" style="line-height: 20px; width: 83%">
|
||||
<span style="color: grey">开放时段:</span>
|
||||
{{o.meetingdescription}}
|
||||
</div>-->
|
||||
<!--<span class="showMore" @click.stop="desc = o.meetingdescription; popupShow = true">查看更多</span>-->
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">已审{{ o.audit }}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">未审{{ o.no_audit }}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<!--弹出框-->
|
||||
<van-popup v-model:show="popupShow" class="cus_popup">
|
||||
<pre style="margin: 0; white-space: break-spaces">{{ desc }}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-icon @click="popupShow = false" class="cus_icon" v-if="popupShow" name="close"></van-icon>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet v-model:show="userShow" :title="queryType === 'notAudit' ? '预约列表' : '预约列表'"
|
||||
class="userPopup" @close="popClose">
|
||||
<div :class="queryType === 'notAudit' ? 'content' : 'no_content'">
|
||||
<div v-if="queryType === 'notAudit'" style="text-align: right; width: 96%">
|
||||
<van-tag color="#1867b0" style="margin-right: 10px" @click="cancelAll" size="large" type="primary">
|
||||
取消选中
|
||||
</van-tag>
|
||||
<van-tag color="#1867b0" @click="allIn" size="large" type="primary">全选</van-tag>
|
||||
</div>
|
||||
<div class="van-doc-card in-sheet-card" v-for="(item, i) in userList">
|
||||
<div style="width: 90%">
|
||||
<div>
|
||||
<span style="display: inline-block; min-width: 50px; max-width: 76px">{{ item.username }}</span>
|
||||
<span style="display: inline-block; width: 20px">{{ item.sex === '0' ? '男' : '女' }}</span>
|
||||
<span style="display: inline-block; width: 76px">{{ item.loginname }}</span>
|
||||
<span class="unit">{{ item.unitname }}</span>
|
||||
</div>
|
||||
<div style="width: 94%; display: flex">
|
||||
<div style="color: grey;">预约时间:</div>
|
||||
<div>
|
||||
<div v-for="(d,index) in item.concat_day.split(',')">{{ getTime(item, d) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">参加人员:</span><span>{{ item.joinUser }}</span>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">预约事由:</span><span>{{ item.reserve_cause }}</span>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">审核状态:</span><span>{{ item.stateName }}</span>
|
||||
</div>
|
||||
<div v-if="$auth.hasRoleOr(['admin', 'xghng', 'A06'])"
|
||||
style="width: 94%;">
|
||||
<span style="color: grey">反馈意见:</span><span>{{ item.back_option }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
clickable class="cus_cell"
|
||||
:key="item.id"
|
||||
@click="toggle(i)">
|
||||
|
||||
<van-icon class="audit_icon" color="green"
|
||||
v-if="queryType === 'hasAudit' && item.auditState === true"
|
||||
name="passed"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
v-if="queryType === 'hasAudit' && item.auditState === false"
|
||||
name="close"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="item.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
<!--<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: fixed; bottom: 50px; width: 95%">
|
||||
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回</van-button>
|
||||
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过</van-button>
|
||||
</div>-->
|
||||
</div>
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: absolute; bottom: 10px; width: 100%">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small"
|
||||
style="height: 38px;border-radius: 10px;margin-right: 20px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small"
|
||||
style="height: 38px;border-radius: 10px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</van-action-sheet>
|
||||
|
||||
<!--审核弹框-->
|
||||
<van-dialog v-model:show="auditShow" @confirm="auditDo" title="温馨提示" show-cancel-button>
|
||||
<div style="padding-top: 8px; text-align: center; font-size: 14px; color: #646566">{{ str }}</div>
|
||||
<van-divider style="margin: 12px 0 1px 0px;"></van-divider>
|
||||
<van-field
|
||||
v-model="reason"
|
||||
rows="2"
|
||||
label="审核意见:"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入审核意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'siteAudit',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
desc: '',
|
||||
list: ['a', 'b'],
|
||||
result: [],
|
||||
reason: '',
|
||||
auditShow: false,
|
||||
popupShow: false,
|
||||
userShow: false,
|
||||
userList: [],
|
||||
userClickList: [],
|
||||
str: '',
|
||||
type: '',
|
||||
auditType: '',
|
||||
queryType: '',
|
||||
typeList: [],
|
||||
meetingTimeList: [{text: '全部时间', value: null}, {text: '即将开始', value: 0}, {text: '已结束', value: 1}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await this.$http.get('/activity/site/mobile/audit/getLeaveUser', {
|
||||
params: {
|
||||
siteId: o.id,
|
||||
type: 'hasAudit',
|
||||
},
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.userList = resp.data
|
||||
|
||||
this.userList.sort((a, b) => {
|
||||
return b.auditState - a.auditState
|
||||
})
|
||||
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
cancelAll() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false))
|
||||
},
|
||||
allIn() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(true))
|
||||
},
|
||||
checkAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(i) {
|
||||
this.$refs.checkboxes[i].toggle();
|
||||
},
|
||||
async auditDo() {
|
||||
let idList = this.result
|
||||
if (this.type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await this.$http.post('/activity/site/mobile/audit/audit', {auditOpinion: this.reason}, {
|
||||
params: {
|
||||
ids: idList,
|
||||
isPass: this.auditType === 'pass'
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$modal.msg('操作失败')
|
||||
}
|
||||
this.userShow = false
|
||||
},
|
||||
audit(type, auditType) {
|
||||
this.type = type
|
||||
this.auditType = auditType
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
this.$modal.msg('请先选择人员')
|
||||
return
|
||||
}
|
||||
this.str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择' : '您确定要一键全部审核吗?'
|
||||
this.reason = auditType === 'pass' ? '同意' : '拒绝'
|
||||
this.auditShow = true
|
||||
},
|
||||
async openView(o) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await this.$http.get('/activity/site/mobile/audit/getLeaveUser', {
|
||||
params: {
|
||||
siteId: o.id,
|
||||
type: 'canAudit',
|
||||
auditType: o.audittype,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
this.$modal.msg('暂无预约数据')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
return
|
||||
}
|
||||
this.$modal.msg('系统错误,请联系管理员')
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.load()
|
||||
},
|
||||
async load() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('/activity/site/mobile/audit/pageData', this.pageForm, {
|
||||
typeId: this.pageForm.typeId,
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await this.$http.get('/activity/site/type/findAll')
|
||||
if (resp.code === 200) {
|
||||
resp.data.forEach(v => {
|
||||
v['text'] = v['typeName']
|
||||
v['value'] = v['id']
|
||||
})
|
||||
return resp.data
|
||||
}
|
||||
return
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await this.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.$set(this.pageForm, "meetingTime", this.meetingTimeList[1].value)
|
||||
await this.load()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.in-sheet-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
max-height: 96%;
|
||||
height: 96%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 86%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.no_content {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-action-sheet__content {
|
||||
height: 88%;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 6em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
/*position: absolute;*/
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.van-cell__value--alone {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,302 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search v-model="pageForm.searchKeyword" shape="round" maxlength="10" @search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询">
|
||||
</van-search>
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList" @change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div>
|
||||
<van-list v-model="tableLoading" v-if="tableData && tableData.length>0" :finished="finished"
|
||||
:immediate-check="false" :finished-text="tableData.length > 0?'没有更多了':''" @load="load">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{ o.name }}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{ o.address }}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{ o.typename }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">联 系 人:</span>
|
||||
{{o.contact_person}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">联系方式:</span>{{ o.contact_phone }}</van-col>
|
||||
</van-row>
|
||||
<!--<van-row>
|
||||
<van-col span="24"><span style="color: grey">已预约人数:</span>{{o.count}}</van-col>
|
||||
</van-row>-->
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">开放时间:</span><span
|
||||
v-if="o.workday === true">工作日</span>
|
||||
{{ o.open_time }}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'siteList',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
show: false,
|
||||
siteId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
this.siteId = o.id
|
||||
if (o.sexlimit !== 2) {
|
||||
const sex = o.sexlimit === 0 ? '男' : '女'
|
||||
if (Number(this.$store.state.user.userInfo.sex) === o.sexlimit) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/site/siteReserve?id=' + o.id
|
||||
})
|
||||
} else {
|
||||
this.$modal.msg('抱歉,该场地仅限' + sex + '性会员预约')
|
||||
}
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/site/siteReserve?id=' + o.id
|
||||
})
|
||||
}
|
||||
},
|
||||
toReserve() {},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.load()
|
||||
},
|
||||
async load() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('/activity/site/mobile/info/pageData', this.pageForm, {
|
||||
params: {
|
||||
typeId: this.pageForm.typeId
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await this.$http.get('/activity/site/type/findAll')
|
||||
if (resp.code === 200) {
|
||||
resp.data.forEach(v => {
|
||||
v['text'] = v['typeName']
|
||||
v['value'] = v['id']
|
||||
})
|
||||
return resp.data
|
||||
}
|
||||
return []
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await this.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
await this.load()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 84%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.pop {
|
||||
max-height: 70%;
|
||||
width: 90%;
|
||||
padding: 0px 10px 10px 10px;
|
||||
}
|
||||
|
||||
.pop h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pop h4 {
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,415 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item :title="pageForm.time" ref="item" @open="">
|
||||
<van-cell center title="查询全部">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="pageForm.timeSwitch" size="24" active-color="#246fb4"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-datetime-picker v-show="pageForm.timeSwitch === false"
|
||||
v-model="time" cancel-button-text=" " confirm-button-text=" "
|
||||
type="year-month"
|
||||
title="选择年月"
|
||||
:formatter="timeFormatter"
|
||||
></van-datetime-picker>
|
||||
<div style="padding: 5px 16px;margin-top: 6px">
|
||||
<van-button type="danger" color="#246fb4" block round @click="onConfirm" style="height: 36px">
|
||||
确认
|
||||
</van-button>
|
||||
</div>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div>
|
||||
<van-list
|
||||
v-model="tableLoading" v-if="tableData && tableData.length>0"
|
||||
:finished="finished" :immediate-check="false"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="load">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id, o.modulename)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{ o.name }}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{ o.address }}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{ o.typename }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">预约天数:</span>
|
||||
<span>{{ o.days }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">预约时间:</span>
|
||||
<span v-for="(item,index) in o.concat_day.split(',')">
|
||||
<div :style="index !== 0 ? 'text-indent: 5em' : ''">{{ getTime(o, item) }}</div>
|
||||
</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span v-if="[0].includes(o.stateaudittype)"
|
||||
style="color: #e6a23c">{{ o.statename }}</span>
|
||||
<span v-if="o.stateaudittype==3" style="color: #67c23a">{{ o.statename }}</span>
|
||||
<span v-if="o.stateaudittype==1" style="color: #f56c6c">{{ o.statename }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.stateaudittype == '1'">
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核意见:</span>
|
||||
<span>{{ JSON.parse(o.auditlist).find(x => x.auditState === false).auditOption }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="rollback(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">撤销预约
|
||||
</van-button>
|
||||
<van-button @click.stop="backOption(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">反馈意见
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
<van-dialog v-model="show" title="反馈意见" show-cancel-button @confirm="backDo">
|
||||
<van-field
|
||||
v-model="option"
|
||||
rows="4"
|
||||
label="反馈意见:"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入反馈意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'siteMy',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
time: new Date(),
|
||||
option: '',
|
||||
show: false,
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
timeList: [],
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onConfirm() {
|
||||
if (this.pageForm.timeSwitch === true) {
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
} else {
|
||||
this.timeList = [{
|
||||
text: moment(this.time).format('YYYY-MM'),
|
||||
value: moment(this.time).format('YYYY-MM')
|
||||
}]
|
||||
}
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$refs.item.toggle()
|
||||
this.doSearch()
|
||||
},
|
||||
timeFormatter(type, val) {
|
||||
if (type === 'year') {
|
||||
return val + `年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return val + `月`;
|
||||
}
|
||||
return val;
|
||||
},
|
||||
async rollback(o) {
|
||||
const self = this
|
||||
const res = await this.$http.get("/activity/site/siteReserve/isCanRollBack", {
|
||||
params: {id: o.id}
|
||||
})
|
||||
if (res === true) {
|
||||
this.$modal.msg('此预约状态下不能进行撤回操作!')
|
||||
return
|
||||
}
|
||||
this.$modal.confirm('您是否要撤销此预约?').then(async () => {
|
||||
const resp = await this.$http.post('/activity/site/mobile/info/rollback', {}, {
|
||||
params: {id: o.id}
|
||||
})
|
||||
this.$modal.msg(resp.msg)
|
||||
if (resp.code === 200) {
|
||||
self.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
backOption(o) {
|
||||
this.info = o
|
||||
this.option = o.back_option ? o.back_option : ''
|
||||
this.show = true
|
||||
},
|
||||
async backDo() {
|
||||
if (this.option === '') {
|
||||
this.$modal.msg('请填写反馈意见')
|
||||
return
|
||||
}
|
||||
const res = await this.$http.post('/activity/site/mobile/info/backOption', {}, {
|
||||
params: {
|
||||
id: this.info.id,
|
||||
option: this.option
|
||||
}
|
||||
})
|
||||
if (res.code === 200) {
|
||||
this.doSearch()
|
||||
this.$modal.msg(res.msg)
|
||||
} else {
|
||||
this.$modal.msg('操作失败')
|
||||
}
|
||||
},
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.load()
|
||||
},
|
||||
async load() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('/activity/site/mobile/info/myReserve', this.pageForm, {
|
||||
params: {
|
||||
timeSwitch: this.pageForm.timeSwitch,
|
||||
time: this.pageForm.time,
|
||||
typeId: this.pageForm.typeId,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await this.$http.get('/activity/site/type/findAll')
|
||||
if (resp.code === 200) {
|
||||
resp.data.forEach(v => {
|
||||
v['text'] = v['typeName']
|
||||
v['value'] = v['id']
|
||||
})
|
||||
return resp.data
|
||||
}
|
||||
return []
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await this.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
//this.timeList.unshift({text: moment().format('YYYY-MM'), value: moment().format('YYYY-MM')})
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$set(this.pageForm, "timeSwitch", true)
|
||||
await this.load()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 84%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,434 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="top-calendar">
|
||||
<div class="calendar-left">
|
||||
<div class="calendar-left-day" :class="moment(item).unix() === selectDate.unix() ? 'left-day-active':''"
|
||||
@click="dayClick(item)" v-for="item in weekList">
|
||||
<div class="day-info-week">
|
||||
{{getWeekTextByDate(item)}}
|
||||
</div>
|
||||
<div class="day-info-month">
|
||||
{{moment(item).format('MM-DD')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="calendar-right">
|
||||
<van-icon size="16" color="white" name="arrow-down" @click="calendarVisible = true"></van-icon>
|
||||
<van-calendar class="top_pop" v-model="calendarVisible" color="#246fb4" position="top"
|
||||
@confirm="onConfirm" :default-date="selectDate.toDate()" :formatter="calendarFormatter"
|
||||
title="选择开始日期"></van-calendar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<table>
|
||||
<tr v-for="item in timeData">
|
||||
<td class="time">{{item.start_time + '-' + item.end_time}}</td>
|
||||
|
||||
<td>
|
||||
<div v-if="isCanRe(item)===3" class="state" style="background-color: #0e78c5;color: #fff3f3">
|
||||
已预约
|
||||
</div>
|
||||
<div v-if="isCanRe(item) === 2" class="state" style="background-color: #fff4f2; color: #cc5a45">
|
||||
约满
|
||||
</div>
|
||||
<div @click="chooseTime(item)" v-if="isCanRe(item) === 1" class="state"
|
||||
style="background-color: #e8ffef; color: #52986a">
|
||||
<span
|
||||
v-if="!times.map(o => o.fullDay).includes(selectDate.format('YYYY-MM-DD') + ' ' + item.start_time + '-' + item.end_time)">可预约</span>
|
||||
<span v-else>
|
||||
<van-icon name="passed" size="26" style="line-height: 36px;position: unset"></van-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="isCanRe(item) === 0" class="state">已过期</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="position: fixed; bottom: 0; width: 100%">
|
||||
<van-button @click="reserve" type="primary" color="#246fb4" style="width: 100%">确定预约</van-button>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="show" title="确认预约信息">
|
||||
|
||||
<van-cell title="预约人">{{person}}</van-cell>
|
||||
<van-cell title="性别">{{ $store.state.user.userInfo.sex === '0' ? '男' : '女' }}</van-cell>
|
||||
<van-cell title="工号">{{ $store.state.user.loginname }}</van-cell>
|
||||
<van-cell title="所属单位">{{unit}}</van-cell>
|
||||
<van-cell title="联系电话">{{phone}}</van-cell>
|
||||
<van-cell title="预约时间">
|
||||
<div v-for="time in times">
|
||||
<van-tag closeable size="medium" type="primary" @close="close(time.fullDay)">
|
||||
{{time.fullDay}}
|
||||
</van-tag>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="预约地点">{{site.name}}</van-cell>
|
||||
|
||||
<van-field v-model="joinUser" rows="2" autosize label="参加人员" type="textarea" maxlength="50"
|
||||
placeholder="请输入参加人员" show-word-limit></van-field>
|
||||
<van-field v-model="message" rows="4" autosize label="预约事由" type="textarea" maxlength="50"
|
||||
placeholder="请输入预约事由" show-word-limit></van-field>
|
||||
|
||||
<div style="margin: 20px 0px; display: flex; justify-content: space-between;padding: 0px 22px;">
|
||||
<van-button @click="message = '';show = false" color="#246fb4" style="width: 47%" size="small" plain
|
||||
type="info">关闭
|
||||
</van-button>
|
||||
<van-button @click="reserveDo" color="#246fb4" style="width: 47%" size="small" type="info">确认
|
||||
</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'siteReserve',
|
||||
mixins: [initTableMixins],
|
||||
onLoad(option) {
|
||||
this.site_id = option.id
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
person: this.$store.state.user.name,
|
||||
unit: this.$store.state.user.userInfo.dept.deptName,
|
||||
phone: this.$store.state.user.userInfo.mobile,
|
||||
message: '',
|
||||
show: false,
|
||||
site_id: '',
|
||||
site: {},
|
||||
timeData: [],
|
||||
times: [],
|
||||
weekList: [],
|
||||
joinUser: '',
|
||||
calendarVisible: false,
|
||||
selectDate: null,
|
||||
//已经预约的记录
|
||||
alreadyReserveRecord: [],
|
||||
holidays: ['2022-06-03', '2022-06-04', '2022-06-05', '2022-09-10', '2022-09-11', '2022-09-12',
|
||||
'2022-10-01', '2022-10-02', '2022-10-03', '2022-10-04', '2022-10-05', '2022-10-06', '2022-10-07',
|
||||
],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getWeekTextByDate() {
|
||||
return (date) => {
|
||||
const weekNum = moment(date).day()
|
||||
switch (weekNum) {
|
||||
case 0:
|
||||
return '周日'
|
||||
case 1:
|
||||
return '周一'
|
||||
case 2:
|
||||
return '周二'
|
||||
case 3:
|
||||
return '周三'
|
||||
case 4:
|
||||
return '周四'
|
||||
case 5:
|
||||
return '周五'
|
||||
case 6:
|
||||
return '周六'
|
||||
}
|
||||
}
|
||||
},
|
||||
calendarFormatter() {
|
||||
return (day) => {
|
||||
// 休息日不能选择
|
||||
let week = day.date.getDay()
|
||||
if (week === 0 || week === 6) {
|
||||
day.type = 'disabled'
|
||||
}
|
||||
return day
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close(f) {
|
||||
if (this.times.length === 1) {
|
||||
this.$modal.msg('必须保留一个时间段')
|
||||
return
|
||||
}
|
||||
const index = this.times.findIndex(v => v.fullDay === f)
|
||||
this.times.splice(index, 1)
|
||||
},
|
||||
onConfirm(date) {
|
||||
this.selectDate = moment(date)
|
||||
this.setWeekList(this.selectDate)
|
||||
this.calendarVisible = false
|
||||
},
|
||||
//这里要排除掉休息日
|
||||
setWeekList(startDate) {
|
||||
const wk = []
|
||||
wk.push(moment(startDate))
|
||||
let count = 1
|
||||
while (wk.length < 7) {
|
||||
const addDate = moment(startDate).add(count, 'd')
|
||||
//这里不是休息日才能加到数组里
|
||||
if (addDate.day() !== 0 && addDate.day() !== 6) {
|
||||
wk.push(addDate)
|
||||
}
|
||||
count++
|
||||
}
|
||||
this.weekList = wk
|
||||
},
|
||||
dayClick(date) {
|
||||
this.selectDate = date
|
||||
this.getReserve()
|
||||
},
|
||||
reserve() {
|
||||
if (this.times.length === 0) {
|
||||
this.$modal.msg('请选择要预约的时段')
|
||||
return
|
||||
}
|
||||
this.show = true
|
||||
},
|
||||
async reserveDo() {
|
||||
const resp = await this.$http.post('/activity/site/mobile/info/reserveDo', this.times, {
|
||||
params: {
|
||||
siteId: this.site_id,
|
||||
message: this.message,
|
||||
joinUser: this.joinUser,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.show = false
|
||||
this.times = []
|
||||
this.message = null
|
||||
await this.getMyReservation()
|
||||
await this.getReserve()
|
||||
await this.load()
|
||||
this.$modal.msg('预约成功')
|
||||
} else {
|
||||
this.$modal.msg('预约失败')
|
||||
}
|
||||
},
|
||||
chooseTime(item) {
|
||||
const cloneItem = this.clone(item)
|
||||
const map = this.times.map(o => o.fullDay)
|
||||
const index = map.indexOf(this.selectDate.format('YYYY-MM-DD') + ' ' + cloneItem.start_time + '-' +
|
||||
cloneItem.end_time)
|
||||
if (index > -1) {
|
||||
this.times.splice(index, 1)
|
||||
} else {
|
||||
cloneItem.day = this.selectDate.format('YYYY-MM-DD')
|
||||
cloneItem.fullDay = cloneItem.day + ' ' + cloneItem.start_time + '-' + cloneItem.end_time
|
||||
this.times.push(cloneItem)
|
||||
}
|
||||
},
|
||||
isCanRe(item) {
|
||||
const now = new Date()
|
||||
const end = moment().format('YYYY-MM-DD') + ' ' + item.end_time + ':00'
|
||||
|
||||
const itemFullTime = this.selectDate.format('YYYY-MM-DD') + " " + item.start_time + "-" + item.end_time
|
||||
|
||||
if (this.alreadyReserveRecord.includes(itemFullTime)) {
|
||||
return 3
|
||||
}
|
||||
|
||||
if (now.getTime() >= new Date(end).getTime() && this.selectDate.format('YYYY-MM-DD') === moment().format(
|
||||
'YYYY-MM-DD')) {
|
||||
return 0
|
||||
} else {
|
||||
if (this.site.multiple) {
|
||||
return 1
|
||||
} else {
|
||||
return item.hasReserve === true ? 2 : 1
|
||||
}
|
||||
}
|
||||
},
|
||||
async load() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.get('/activity/site/mobile/info/getDetail', {
|
||||
params: {
|
||||
id: this.site_id
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.site = resp.data
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
async getReserve() {
|
||||
const resp = await this.$http.get('/activity/site/mobile/info/getReserve', {
|
||||
params: {
|
||||
siteId: this.site_id,
|
||||
day: moment(this.selectDate).format('YYYY-MM-DD'),
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
resp.data.forEach(item => {
|
||||
item.isClick = true
|
||||
})
|
||||
this.timeData = resp.data
|
||||
}
|
||||
},
|
||||
async getMyReservation() {
|
||||
const resp = await this.$http.get('/activity/site/mobile/info/getMyReservation', {
|
||||
params: {
|
||||
site_id: this.site_id
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.alreadyReserveRecord = resp.data.map(v => v.reserve_day + " " + v.start_time + "-" + v
|
||||
.end_time)
|
||||
}
|
||||
},
|
||||
//获取最新的一个工作日设为当前时间
|
||||
getLatestWorkDay() {
|
||||
//1.首先判断今天是不是工作日
|
||||
const weekNum = moment().day()
|
||||
let selectDate = null
|
||||
if (weekNum === 0) {
|
||||
//周日
|
||||
selectDate = moment().add(1, 'd')
|
||||
} else if (weekNum === 6) {
|
||||
//周六
|
||||
selectDate = moment().add(2, 'd')
|
||||
} else {
|
||||
selectDate = moment()
|
||||
}
|
||||
return selectDate
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.selectDate = this.getLatestWorkDay()
|
||||
this.setWeekList(this.selectDate)
|
||||
await this.getReserve()
|
||||
await this.load()
|
||||
await this.getMyReservation()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.my_calendar {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #0e78c5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.day {
|
||||
background-color: #14497e;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
padding: 5px 6px;
|
||||
line-height: 22px;
|
||||
border-radius: 4px;
|
||||
margin-right: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 72%;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.state {
|
||||
width: 80px;
|
||||
height: 36px;
|
||||
text-align: center;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 2px;
|
||||
color: #929292;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 10px 0px;
|
||||
background-color: white;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
border-radius: 6px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
tr {
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.van-action-sheet__content {
|
||||
padding: 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 10px 0px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.top-calendar {
|
||||
height: 70px;
|
||||
max-height: 70px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #0e78c5;
|
||||
}
|
||||
|
||||
.calendar-left {
|
||||
width: calc(100% - 20px);
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
.calendar-left-day {
|
||||
min-width: 65px;
|
||||
height: 100%;
|
||||
margin: 0 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.left-day-active {
|
||||
background-color: #0000cc;
|
||||
}
|
||||
|
||||
.day-info-month {
|
||||
|
||||
}
|
||||
|
||||
.day-info-week {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.calendar-right {
|
||||
width: 30px;
|
||||
max-width: 30px;
|
||||
text-align: center;
|
||||
height: 60%;
|
||||
border-left: 1px solid #fff3f3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.top_pop .van-popup {
|
||||
top: 46px;
|
||||
}
|
||||
|
||||
.van-action-sheet {
|
||||
max-height: 90%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,867 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.groupName" @change="onRefresh"
|
||||
:options="groupList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.eventId" @change="onRefresh"
|
||||
:options="eventList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="onRefresh"
|
||||
:options="auditList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<van-notice-bar
|
||||
left-icon="volume-o"
|
||||
mode="closeable"
|
||||
text="自己报名的项目如要修改请点击取消报名后再重新报名,若其他人帮助报名则联系报名人取消!"
|
||||
/>
|
||||
<van-list v-model="loading" :finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" @load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
|
||||
<van-row>
|
||||
<van-col span="24" class="username">
|
||||
{{ o.allName }}
|
||||
<div v-if="o.status"
|
||||
style="display: flex;justify-content: flex-end">
|
||||
<span v-if="o.status===1">待审核</span>
|
||||
<span v-if="o.status===2">已成功报名</span>
|
||||
<span v-if="o.status===3">审核不通过</span>
|
||||
</div>
|
||||
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<!-- <van-row class="info" style="margin-top: 8px">
|
||||
<van-col span="24">
|
||||
<span>项目类型:</span>
|
||||
<span>{{ o.projectType == 1 ? '单项' : '团体' }}</span>
|
||||
</van-col>
|
||||
</van-row>-->
|
||||
|
||||
<!-- <van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>您报队伍:</span>
|
||||
<span>{{ o.activityTeamName ? o.activityTeamName : '暂无' }}</span>
|
||||
</van-col>
|
||||
</van-row>-->
|
||||
|
||||
<!-- <van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>年龄限制:</span>
|
||||
<span v-if="o.startAgeDate!=null">{{ o.startAgeDate }}至{{ o.endAgeDate }}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-col>
|
||||
</van-row>-->
|
||||
|
||||
<van-row class="info" v-if="o.projectType==2">
|
||||
<van-col span="24">
|
||||
<van-cell title="可报队数:">
|
||||
{{ o.restrictTotalTeam }}队
|
||||
</van-cell>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" v-if="o.athletesMaxNum<=99">
|
||||
<van-col span="24">
|
||||
<span>每队可报人数:</span>
|
||||
<span v-if="o.athletesMaxNum">{{ o.athletesMaxNum }}人</span>
|
||||
<span v-else-if="o.applyType===1">{{
|
||||
o.athletesMaxNum * o.restrictTotalTeam
|
||||
}}人</span>
|
||||
<span v-else-if="o.applyType===2&&o.eveProjectType==='1'">{{
|
||||
o.athletesMaxNum
|
||||
}}人</span>
|
||||
<span
|
||||
v-else-if="o.applyType===2&&o.eveProjectType==='2'">{{
|
||||
(o.restrictGirlNum ? o.restrictGirlNum : 0) + (o.restrictBoyNum ? o.restrictBoyNum : 0)
|
||||
}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>已报名总人数:</span>
|
||||
<span v-if="o.successUserApply>0&&o.applyType!==3">{{ o.successUserApply }}人</span>
|
||||
<span v-else-if="JSON.parse(o.applyWay).length===2&&o.applyWay.includes(1)">{{
|
||||
o.totalApplyNum
|
||||
}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType===3">{{ o.totalApplyNum }}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" v-if="JSON.parse(o.applyWay).length===1">
|
||||
<van-col span="24">
|
||||
<span>已报名人员:</span>
|
||||
<span v-if="o.userApplyNames" style="color: #0e78c5" @click="openApplyUser(o)">{{
|
||||
o.userApplyNames
|
||||
}}</span>
|
||||
<span v-else>未报名</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<div class="register-icon">
|
||||
<img v-if="o.userApply==0&&o.applyWay.includes(1)"
|
||||
@click="openActivity(o)"
|
||||
src="@/static/svg/sports/wbm.svg"/>
|
||||
<img v-if="o.userApply>0&&o.applyWay.includes(1)"
|
||||
@click="openActivity(o)"
|
||||
src="@/static/svg/sports/qxbm.svg"/>
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
<van-dialog v-model="activityDialog" title="温馨提示" message="您确定要报名此项目吗?" show-cancel-button
|
||||
@confirm="doActivityConfirm"
|
||||
@cancel="activityDialog = false" :before-close="onBeforeClose">
|
||||
<van-radio-group v-model="formData.teamId" v-if="projectType==='2'">
|
||||
|
||||
<van-cell-group>
|
||||
<template v-for="i in teams">
|
||||
<van-cell :title="i.name" clickable>
|
||||
<template #right-icon>
|
||||
<van-radio :name="i.id"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</van-dialog>
|
||||
|
||||
|
||||
<van-action-sheet v-model="teamSignUpShow" :close-on-click-overlay="false"
|
||||
:style="{ height: '100%',width:'100%' ,'overflow-y':'visible'}"
|
||||
:title="isView?'查看报名信息':'组队报名'">
|
||||
<div class="van-card-header">
|
||||
本人信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="$store.state.user.userInfo.nickName"></van-field>
|
||||
<van-field label="工号" readonly v-model="$store.state.user.userInfo.userName"></van-field>
|
||||
<van-field label="性别" readonly>
|
||||
<template #input>
|
||||
<dict-tag :options="dict.type.sys_user_sex"
|
||||
:value="$store.state.user.userInfo.sex"></dict-tag>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="所在单位" readonly
|
||||
v-model="$store.state.user.userInfo.dept.deptName"></van-field>
|
||||
<van-field label="所属工会" readonly
|
||||
v-model="$store.state.user.userInfo.union.unionName"></van-field>
|
||||
</div>
|
||||
|
||||
<template
|
||||
v-for="(item,index) in registerList.filter(v=>v.loginName !== $store.state.user.userInfo.userName)">
|
||||
<div class="van-card-header">
|
||||
队友信息{{ index + 1 }}
|
||||
<span style="color:red;" @click="removeRegUser(item)" v-if="!isView">删除</span>
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="item.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="item.loginName"></van-field>
|
||||
<van-field label="性别" readonly>
|
||||
<template #input>
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="item.sex"></dict-tag>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="所在单位" readonly v-model="item.unitName"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="item.unionName"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div
|
||||
v-if="registerList.filter(v=>v.loginName !== $store.state.user.userInfo.userName).length === 0">
|
||||
<div style="padding: 10px 10px;text-align: center;color: #9b9999;">
|
||||
暂无队友信息,请点击添加队友按钮
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="!isView">
|
||||
<van-button @click="openUserActionSheet" style="border-radius: 10px" block
|
||||
type="info">
|
||||
添加队友
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="!isView">
|
||||
<van-button @click="doTeamSignUp()" style="border-radius: 10px" block
|
||||
type="info">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-action-sheet v-model="userActionSheet" title="选择人员" class="userActionPopup">
|
||||
<van-search v-model="searchKey" @search="onSearchUser" show-action placeholder="请输入姓名或者工号搜索">
|
||||
<template #action>
|
||||
<div @click="onSearchUser">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
|
||||
<div class="van-action-sheet__content mt5 user-select-sheet"
|
||||
v-if="searchUserList && searchUserList.length>0">
|
||||
<template v-if="searchLoading">
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
<template v-if="!searchLoading">
|
||||
<template v-for="item in searchUserList"
|
||||
v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)"
|
||||
class="van-action-sheet__item">
|
||||
<span class="van-action-sheet__name"
|
||||
style="display: flex;flex-direction: column">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
{{ item.userName }}-{{ item.loginName }}-
|
||||
<dict-tag :options="dict.type.sys_user_sex"
|
||||
:value="item.sex"></dict-tag>
|
||||
</div>
|
||||
<div>
|
||||
{{ item.unitName }}
|
||||
</div>
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty v-else image="search" description="请输入姓名或者工号搜索"></van-empty>
|
||||
</van-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mobileMixins from "../../../mixins/mobileMixins";
|
||||
import moment from "moment";
|
||||
|
||||
export default {
|
||||
name: "sportsActivityEventList",
|
||||
mixins: [mobileMixins],
|
||||
dicts: ['sys_user_sex'],
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
formData: {
|
||||
teamId: null,
|
||||
teamName: null,
|
||||
activityId: "",
|
||||
eventId: ""
|
||||
},
|
||||
title: "",
|
||||
projectType: "",
|
||||
applyType: "",
|
||||
activityDialog: false,
|
||||
restrictBoyNum: "",
|
||||
restrictGirlNum: "",
|
||||
athletesMaxNum: "",
|
||||
isManGirlNum: null,
|
||||
events: [],
|
||||
eventList: [],
|
||||
groupList: [
|
||||
{text: '按组别', value: null},
|
||||
{text: '甲组', value: '甲组'},
|
||||
{text: '乙组', value: '乙组'},
|
||||
{text: '丙组', value: '丙组'},
|
||||
{text: '丁组', value: '丁组'},
|
||||
],
|
||||
sexList: [
|
||||
{text: '按性别', value: 1},
|
||||
{text: '男子', value: 2},
|
||||
{text: '女子', value: 3},
|
||||
{text: '团体', value: 4},
|
||||
],
|
||||
auditList: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已报名', value: "true"},
|
||||
{text: '未报名', value: "false"},
|
||||
],
|
||||
teams: [],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
isMenWomen: "1"
|
||||
},
|
||||
teamSignUpShow: false,
|
||||
registerList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: "",
|
||||
searchUserList: [],
|
||||
searchLoading: false,
|
||||
addRegisterList: [],
|
||||
isView: false,
|
||||
activityData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openApplyUser(item) {
|
||||
this.isView = true
|
||||
this.formData.activityId = item.activityId
|
||||
const resp = await this.selectRegisterList()
|
||||
|
||||
if (resp) {
|
||||
const selfInfo = resp.find(v => Number(v.id) === this.$store.state.user.id && v.eventId === item.eventId)
|
||||
if (selfInfo) {
|
||||
this.registerList = resp.filter(v => v.eventId == item.eventId && v.applyUser === selfInfo.applyUser)
|
||||
}
|
||||
this.teamSignUpShow = true
|
||||
}
|
||||
},
|
||||
async selectRegisterList() {
|
||||
const resp = await this.$http.get('activity/mobile/sports/activityApply/selectRegisterList', {
|
||||
params: {
|
||||
activityId: this.formData.activityId
|
||||
}
|
||||
})
|
||||
return resp.data
|
||||
|
||||
},
|
||||
async doTeamSignUp() {
|
||||
// if (this.registerList.length !== 2) {
|
||||
// this.$dialog.alert({
|
||||
// title: '温馨提示',
|
||||
// message: '此活动是组队模式只需一位队友!',
|
||||
// }).then(() => {
|
||||
//
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
|
||||
const {
|
||||
athletesMaxNum,
|
||||
startAgeDate,
|
||||
endAgeDate,
|
||||
isMenWomen,
|
||||
restrictBoyNum,
|
||||
restrictGirlNum,
|
||||
} = this.events.find(v => v.eventId === this.formData.eventId)
|
||||
|
||||
if (restrictBoyNum > 0) {
|
||||
if (this.registerList.filter(v => v.sex === '0').length !== restrictBoyNum) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '男运动员需要报名' + restrictBoyNum + '人才能提交!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
}
|
||||
if (restrictGirlNum > 0) {
|
||||
if (this.registerList.filter(v => v.sex === '1').length !== restrictGirlNum) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '女运动员需要报名' + restrictGirlNum + '人才能提交!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.addRegisterList = await this.selectRegisterList()
|
||||
let arr = []
|
||||
if (this.addRegisterList && this.addRegisterList.length > 0) {
|
||||
this.registerList.forEach(r => {
|
||||
const num = this.addRegisterList.filter(a => Number(a.id) === r.id).length
|
||||
if (num === this.formData.restrictRegNumber) {
|
||||
arr.push(r.userName)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (arr && arr.length > 0) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '【' + arr.toString() + '】已达到限报数量,您无法添加其组队!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
this.$modal.confirm('您确定要提交吗?').then(async () => {
|
||||
if (this.formData.teamId) {
|
||||
this.$set(this.formData, "teamName", this.teams.find(v => v.id === this.formData.teamId).name)
|
||||
}
|
||||
const userIds = this.registerList.map(v => v.id)
|
||||
await this.$http.post("activity/mobile/sports/activityApply/doTeamSignUp", {
|
||||
activityId: this.formData.activityId,
|
||||
eventId: this.formData.eventId,
|
||||
teamId: this.formData.teamId,
|
||||
teamName: this.formData.teamName,
|
||||
userIds: userIds,
|
||||
}, {
|
||||
params: {
|
||||
activityId: this.formData.activityId,
|
||||
eventId: this.formData.eventId,
|
||||
teamId: this.formData.teamId,
|
||||
teamName: this.formData.teamName,
|
||||
userIds: JSON.stringify(userIds),
|
||||
}
|
||||
})
|
||||
await this.onRefresh()
|
||||
this.teamSignUpShow = false
|
||||
this.$modal.msgSuccess('报名成功')
|
||||
})
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {
|
||||
restrictBoyNum,
|
||||
restrictGirlNum,
|
||||
} = this.events.find(v => v.eventId === this.formData.eventId)
|
||||
|
||||
if (this.registerList.length === restrictBoyNum + restrictGirlNum) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '报名人数已满',
|
||||
}).then(() => {
|
||||
this.userActionSheet = false
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
this.registerList.push(item)
|
||||
this.searchKey = null
|
||||
this.$modal.msgSuccess('添加成功')
|
||||
},
|
||||
async onSearchUser() {
|
||||
if (this.searchKey) {
|
||||
this.searchLoading = true
|
||||
const resp = await this.$http.get('activity/mobile/sports/activityApply/searchNoRegisterUser', {
|
||||
params: {
|
||||
activityId: this.formData.activityId,
|
||||
isTeamSignUp: this.formData.isTeamSignUp,
|
||||
isMenWomen: this.formData.isMenWomen,
|
||||
eventId: this.formData.eventId,
|
||||
searchKey: this.searchKey,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
} else {
|
||||
this.searchUserList = []
|
||||
}
|
||||
},
|
||||
removeRegUser(item) {
|
||||
if (this.$store.state.user.id === item.id) {
|
||||
this.$toast.fail("因为是组队报名,自己不能删除")
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要删除吗?',
|
||||
}).then(() => {
|
||||
const index = this.registerList.findIndex(v => v.id === item.id)
|
||||
this.registerList.splice(index, 1)
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ''
|
||||
this.searchUserList = []
|
||||
this.onSearchUser()
|
||||
this.userActionSheet = true
|
||||
},
|
||||
onBeforeClose(action, done) {
|
||||
return done(false)
|
||||
},
|
||||
async doActivityConfirm() {
|
||||
if (this.formData.teamId == null && this.projectType === "2") {
|
||||
this.$toast("请选择报名的小队")
|
||||
return
|
||||
} else {
|
||||
|
||||
|
||||
const {data} = await this.$http.get("activity/mobile/sports/activityApply/getTeamUserData", {
|
||||
params: {
|
||||
teamId: this.formData.teamId,
|
||||
activityId: this.formData.activityId,
|
||||
eventId: this.formData.eventId,
|
||||
applyType: this.applyType
|
||||
}
|
||||
})
|
||||
|
||||
const nv = data.filter(v => v.sex === '1')
|
||||
const nan = data.filter(v => v.sex === '0')
|
||||
let title = this.projectType === "1" ? "项目" : "小队"
|
||||
|
||||
if (this.applyType !== 3) {
|
||||
|
||||
if (this.isManGirlNum === false &&
|
||||
this.$store.state.user.userInfo.sex === '0' &&
|
||||
nan.length === (this.applyType === 1 ? (this.athletesMaxNum - this.restrictGirlNum) : this.restrictBoyNum)) {
|
||||
this.$toast("该" + title + "男运动员已报满!")
|
||||
return
|
||||
}
|
||||
if (this.isManGirlNum === false &&
|
||||
this.$store.state.user.userInfo.sex === '1' &&
|
||||
nv.length === (this.applyType === 1 ? (this.athletesMaxNum - this.restrictBoyNum) : this.restrictGirlNum)) {
|
||||
this.$toast("该" + title + "女运动员已报满!")
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.athletesMaxNum && (data.length >= this.athletesMaxNum)) {
|
||||
this.$toast("该" + title + "人员已报满!")
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formData.teamId) {
|
||||
this.$set(this.formData, "teamName", this.teams.find(v => v.id === this.formData.teamId).name)
|
||||
}
|
||||
|
||||
await this.$http.post("activity/mobile/sports/activityApply/doActivityUser", {}, {
|
||||
params: {
|
||||
activityId: this.formData.activityId,
|
||||
eventId: this.formData.eventId,
|
||||
teamId: this.formData.teamId,
|
||||
teamName: this.formData.teamName
|
||||
}
|
||||
})
|
||||
this.$modal.msgSuccess('报名成功')
|
||||
await this.onRefresh()
|
||||
this.activityDialog = false
|
||||
}
|
||||
},
|
||||
|
||||
async openActivity(o) {
|
||||
|
||||
this.isView = false
|
||||
|
||||
let {
|
||||
isManGirlNum,
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
eveProjectType,
|
||||
successUserApply,
|
||||
userApply,
|
||||
applyWay,
|
||||
restrictRegNumber,
|
||||
isTeamSignUp
|
||||
} = o
|
||||
if (JSON.parse(applyWay).length === 2 && eveProjectType === "2") {
|
||||
this.$modal.msg("当前活动是单项为自己报名分工会审核,团体为分工会报名!")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
this.projectType = eveProjectType
|
||||
this.formData.activityId = activityId
|
||||
this.formData.isTeamSignUp = isTeamSignUp
|
||||
this.formData.restrictRegNumber = restrictRegNumber
|
||||
this.formData.eventId = eventId
|
||||
this.applyType = applyType
|
||||
this.isManGirlNum = isManGirlNum
|
||||
this.registerList = []
|
||||
|
||||
if (!this.$store.state.user.userInfo.union.id) {
|
||||
this.$toast("您的工会信息有误,无法报名,请联系工会管理员!")
|
||||
return
|
||||
}
|
||||
if (successUserApply !== 0 && JSON.parse(applyWay).length === 2) {
|
||||
this.$modal.msg("分工会审核已通过,自己暂不能取消。请联系分工会负责人取消!")
|
||||
return
|
||||
}
|
||||
if (userApply !== 0) {
|
||||
if (o.applyUser && Number(o.applyUser) !== this.$store.state.user.id) {
|
||||
this.$modal.msg("请联系报名人取消")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定取消此项目报名吗?',
|
||||
}).then(async () => {
|
||||
const data = await this.$http.delete("activity/mobile/sports/activityApply/doDeleteApply", {
|
||||
params: {
|
||||
userId: this.$store.state.user.id,
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
}
|
||||
})
|
||||
if (data.code === 200) {
|
||||
this.$modal.msgSuccess("取消成功")
|
||||
}
|
||||
this.onRefresh()
|
||||
this.teamSignUpShow = false
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
const {
|
||||
athletesMaxNum,
|
||||
startAgeDate,
|
||||
endAgeDate,
|
||||
isMenWomen,
|
||||
restrictBoyNum,
|
||||
restrictGirlNum,
|
||||
} = this.events.find(v => v.eventId === eventId)
|
||||
|
||||
|
||||
if (isMenWomen) {
|
||||
if (eveProjectType === '2') {
|
||||
this.restrictBoyNum = restrictBoyNum ? restrictBoyNum : 0
|
||||
this.restrictGirlNum = restrictGirlNum ? restrictGirlNum : 0
|
||||
} else {
|
||||
this.restrictBoyNum = athletesMaxNum ? athletesMaxNum : 0
|
||||
this.restrictGirlNum = athletesMaxNum ? athletesMaxNum : 0
|
||||
}
|
||||
} else {
|
||||
this.restrictBoyNum = restrictBoyNum ? restrictBoyNum : 0
|
||||
this.restrictGirlNum = restrictGirlNum ? restrictGirlNum : 0
|
||||
}
|
||||
this.athletesMaxNum = athletesMaxNum ? athletesMaxNum : (this.restrictBoyNum + this.restrictGirlNum)
|
||||
if (isMenWomen != null && isMenWomen === 1 && this.$store.state.user.userInfo.sex !== '0') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen === 2 && this.$store.state.user.userInfo.sex !== '1') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
//如果大于0就判断每人报几个!
|
||||
if (restrictRegNumber > 0) {
|
||||
const {data} = await this.$http.get("activity/mobile/sports/activityApply/getActivityData", {
|
||||
params: {
|
||||
activityId: activityId
|
||||
}
|
||||
})
|
||||
let userApplyList = data.filter(v => Number(v.userId) === this.$store.state.user.id)
|
||||
if (userApplyList.length >= restrictRegNumber) {
|
||||
this.$toast('每人限报' + restrictRegNumber + '个!')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
//如果是组队报名
|
||||
if (isTeamSignUp) {
|
||||
this.formData.isMenWomen = isMenWomen
|
||||
if (this.registerList.length === 0) {
|
||||
this.registerList.push({
|
||||
id: this.$store.state.user.id,
|
||||
loginName: this.$store.state.user.userInfo.userName,
|
||||
userName: this.$store.state.user.userInfo.nickName,
|
||||
sex: this.$store.state.user.userInfo.sex
|
||||
})
|
||||
}
|
||||
if (eveProjectType === "2") {
|
||||
const {data} = await this.$http.get("activity/mobile/sports/activityApply/getActivityTeamId", {
|
||||
params: {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
}
|
||||
})
|
||||
this.teams = data
|
||||
if (data.length && data.length > 0) this.$set(this.formData, "teamId", data[0].id)
|
||||
}
|
||||
this.teamSignUpShow = true
|
||||
return
|
||||
}
|
||||
|
||||
//如果是单项
|
||||
if (eveProjectType === "1") {
|
||||
|
||||
if (athletesMaxNum != null) {
|
||||
const {data} = await this.$http.get("activity/mobile/sports/activityApply/getTeamUserData", {
|
||||
params: {
|
||||
activityId: this.formData.activityId,
|
||||
applyType: applyType,
|
||||
eventId: eventId
|
||||
}
|
||||
})
|
||||
if (data.length >= athletesMaxNum) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + athletesMaxNum + "人")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (startAgeDate != null) {
|
||||
const birthday = moment(this.$store.state.user.userInfo.birthday).valueOf()
|
||||
if (birthday < moment(startAgeDate).valueOf() || birthday > moment(endAgeDate).valueOf()) {
|
||||
this.$toast("您的年龄不在限制范围內!")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (eveProjectType === "2") {
|
||||
const {data} = await this.$http.get("activity/mobile/sports/activityApply/getActivityTeamId", {
|
||||
params: {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
}
|
||||
})
|
||||
this.teams = data
|
||||
if (data.length && data.length > 0) this.$set(this.formData, "teamId", data[0].id)
|
||||
|
||||
}
|
||||
this.activityDialog = true
|
||||
|
||||
|
||||
},
|
||||
|
||||
async pageData() {
|
||||
const resp = await this.$http.post('activity/sports/activityApply/pageData', this.pageForm, {
|
||||
params: {
|
||||
groupName: this.pageForm.groupName,
|
||||
activityId: this.pageForm.activityId,
|
||||
eventId: this.pageForm.eventId,
|
||||
year: this.pageForm.year,
|
||||
isAudit: this.pageForm.isAudit,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
async getEvents() {
|
||||
const {data} = await this.$http.get("activity/sports/activityApply/getEvents", {
|
||||
params: {
|
||||
activityId: this.pageForm.activityId
|
||||
}
|
||||
})
|
||||
return data;
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
async created() {
|
||||
this.events = await this.getEvents()
|
||||
this.events.forEach(v => {
|
||||
this.eventList.push({value: v.eventId, text: v.allName})
|
||||
})
|
||||
this.eventList.unshift({value: null, text: "按项目"})
|
||||
this.$set(this.pageForm, "eventId", this.eventList[0].value)
|
||||
this.$set(this.pageForm, "isMenWomen", 1)
|
||||
this.$set(this.pageForm, "groupName", null)
|
||||
this.$set(this.pageForm, "isAudit", null)
|
||||
await this.pageData()
|
||||
},
|
||||
async onLoad(option) {
|
||||
this.pageForm.activityId = option.id
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.info {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info span:nth-of-type(1) {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
color: #0e78c5;
|
||||
}
|
||||
|
||||
.register-icon {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.regCell .van-cell__label .van-tag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.userActionPopup {
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
.userActionPopup .van-cell__value {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.userActionPopup .addBtn {
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.userActionPopup .van-action-sheet__item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userActionPopup .userSelSuccess {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.teamCell .van-cell__value {
|
||||
color: #323233;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.user-select-sheet {
|
||||
height: calc(100% - 54px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,396 @@
|
||||
<template>
|
||||
<view>
|
||||
<van-sticky class="van-sticky van-sticky--fixed" style="top: 40px">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityLevel" :options="activityTypeOptions"
|
||||
@change="getNearActivity()"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.id" :options="activityOptions"
|
||||
@change="onRefresh"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionid" :options="unionOptions"
|
||||
@change="onRefresh"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
<div style="margin-top: 50px;">
|
||||
<van-list v-model="loading" :finished="finished"
|
||||
:finished-text="apply.length>0?'没有更多了':''"
|
||||
v-if="apply && apply.length>0" @load="pageData">
|
||||
<van-collapse v-model="oneCollapseName" accordion @change="changeCollapse">
|
||||
<template v-for="item in apply">
|
||||
<van-collapse-item :title="item.unionCode+'-'+item.unionName+'('+item.num+'人)'"
|
||||
:name="item.unionCode">
|
||||
|
||||
|
||||
<van-collapse v-model="twoCollapseName" accordion>
|
||||
<van-collapse-item title="领队" name="1" v-if="item.leader">
|
||||
<van-cell title="姓名" :value="item.leader.username"/>
|
||||
<van-cell title="教工号" :value="item.leader.loginname"/>
|
||||
<van-cell title="性别">
|
||||
{{ item.leader.sex == '0' ? '男' : item.leader.sex == '1' ? '女' : '暂无' }}
|
||||
</van-cell>
|
||||
<van-cell title="单位" :value="item.coach.unitname"/>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="教练" name="2" v-if="item.coach">
|
||||
<van-cell title="姓名" :value="item.coach.username"/>
|
||||
<van-cell title="教工号" :value="item.coach.loginname"/>
|
||||
<van-cell title="性别">
|
||||
{{ item.coach.sex == '0' ? '男' : item.coach.sex == '1' ? '女' : '暂无' }}
|
||||
</van-cell>
|
||||
<van-cell title="单位" :value="item.coach.unitname"/>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="团长" name="3" v-if="item.head">
|
||||
<van-cell title="姓名" :value="item.head.username"/>
|
||||
<van-cell title="教工号" :value="item.head.loginname"/>
|
||||
<van-cell title="性别">
|
||||
{{ item.head.sex == '0' ? '男' : item.head.sex == '1' ? '女' : '暂无' }}
|
||||
</van-cell>
|
||||
<van-cell title="单位" :value="item.head.unitname"/>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="工作人员" name="4" v-if=" item.staff">
|
||||
<van-cell title="姓名" :value="item.staff.username"/>
|
||||
<van-cell title="教工号" :value="item.staff.loginname"/>
|
||||
<van-cell title="性别">
|
||||
{{ item.staff.sex == '0' ? '男' : item.staff.sex == '1' ? '女' : '暂无' }}
|
||||
</van-cell>
|
||||
<van-cell title="单位" :value="item.staff.unitname"/>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item title="项目报名信息" name="5">
|
||||
<template v-if="item.apply2">
|
||||
<van-cell-group inset v-for="userItem in item.apply2">
|
||||
<van-cell title="项目名称" :value="userItem.allName"/>
|
||||
<van-cell title="所属队" :value="userItem.team?userItem.team.team:'暂无'"/>
|
||||
<van-cell title="姓名" :value="userItem.username"/>
|
||||
<van-cell title="教工号" :value="userItem.loginname"/>
|
||||
<van-cell title="性别">
|
||||
{{ userItem.sex == '0' ? '男' : userItem.sex == '1' ? '女' : '暂无' }}
|
||||
</van-cell>
|
||||
<van-cell title="单位" :value="userItem.unitname"/>
|
||||
<van-cell title="身份">
|
||||
<van-tag type="primary" v-if="userItem.identity.includes('1')"
|
||||
style="margin-right: 5px">运动员
|
||||
</van-tag>
|
||||
<van-tag type="success" v-if="userItem.identity.includes('2')"
|
||||
style="margin-right: 5px">教练
|
||||
</van-tag>
|
||||
<van-tag type="warning" v-if="userItem.identity.includes('3')"
|
||||
style="margin-right: 5px">领队
|
||||
</van-tag>
|
||||
<van-tag type="danger" v-if="userItem.identity.includes('4')"
|
||||
style="margin-right: 5px">处级领导
|
||||
</van-tag>
|
||||
<van-tag type="danger" v-if="userItem.identity.includes('5')"
|
||||
style="margin-right: 5px">替补
|
||||
</van-tag>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="备注" :value="userItem.bz"/>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<template v-else>暂无</template>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
|
||||
|
||||
</van-collapse-item>
|
||||
</template>
|
||||
|
||||
</van-collapse>
|
||||
|
||||
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mobileMixins from "@/mixins/mobileMixins";
|
||||
|
||||
export default {
|
||||
mixins: [mobileMixins],
|
||||
name: "summary",
|
||||
filters: {
|
||||
money(val) {
|
||||
return val || 0
|
||||
},
|
||||
str(val) {
|
||||
return val || '暂无'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
activityTypeOptions() {
|
||||
if (this.activityTypeList) {
|
||||
return this.activityTypeList.map(v => {
|
||||
return {
|
||||
value: v.code,
|
||||
text: v.name
|
||||
}
|
||||
})
|
||||
}
|
||||
return []
|
||||
},
|
||||
activityOptions() {
|
||||
if (this.activities) {
|
||||
return this.activities.map(v => {
|
||||
return {
|
||||
value: v.id,
|
||||
text: v.name
|
||||
}
|
||||
})
|
||||
}
|
||||
return []
|
||||
},
|
||||
unionOptions() {
|
||||
if (this.unions) {
|
||||
return this.unions.map(v => {
|
||||
return {
|
||||
value: v.id,
|
||||
text: v.unionName
|
||||
}
|
||||
})
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isH04: this.$auth.hasRole('H04'),
|
||||
events: [],
|
||||
activityTypeList: [],
|
||||
activities: [],
|
||||
apply: [],
|
||||
apply2: [],
|
||||
unions: [],
|
||||
rootData: [],
|
||||
pageForm: {
|
||||
pageSize: 10,
|
||||
id: '',
|
||||
unionid: '',
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
projectTypeList: [
|
||||
{id: '1', name: '单项'},
|
||||
{id: '2', name: '团体'}
|
||||
],
|
||||
|
||||
//年份列表
|
||||
yearOptions: [],
|
||||
oneCollapseName: "",
|
||||
twoCollapseName: "",
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeCollapse(){
|
||||
this.twoCollapseName=""
|
||||
},
|
||||
async onRefresh() {
|
||||
this.apply = []
|
||||
this.refreshing = true;
|
||||
this.finished = false;
|
||||
this.pageForm.pageNumber = 0
|
||||
this.loading = true;
|
||||
this.oneCollapseName = ""
|
||||
this.twoCollapseName = ""
|
||||
await this.pageData();
|
||||
},
|
||||
async changeActivity() {
|
||||
const resp = await this.$http.get('/activity/sports/activityApply/getEvents', {
|
||||
params: {
|
||||
activityId: this.pageForm.id
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.events = resp.data
|
||||
}
|
||||
},
|
||||
async yearChange() {
|
||||
this.pageForm.id = null
|
||||
await this.getNearActivity()
|
||||
},
|
||||
async getNearActivity() {
|
||||
const resp = await this.$http.get('/activity/sports/reading/getNearActivity', {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
activityLevel: this.pageForm.activityLevel
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.activities = resp.data
|
||||
if (resp.data.length) {
|
||||
this.pageForm.id = resp.data[0].id
|
||||
await this.onRefresh()
|
||||
} else {
|
||||
this.pageForm.unionid = ''
|
||||
this.unions = []
|
||||
this.apply = []
|
||||
this.pageForm.pageNumber = 0
|
||||
}
|
||||
}
|
||||
},
|
||||
async changeActivit() {
|
||||
const resp = await this.$http.get('/activity/sports/activityApply/getEvents', {
|
||||
params: {
|
||||
activityId: this.pageForm.id
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.events = resp.data
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
this.$modal.loading()
|
||||
this.loading = true
|
||||
await this.changeActivit()
|
||||
|
||||
const activity = this.activities.filter(v => {
|
||||
return v.id === this.pageForm.id
|
||||
})
|
||||
|
||||
this.pageForm.activityName = activity.length > 0 ? activity[0].name : null
|
||||
this.pageForm.applyType = activity[0].applyType
|
||||
|
||||
const resp = await this.$http.post('/activity/sports/reading/getData', this.pageForm, {
|
||||
params: {
|
||||
id: this.pageForm.id,
|
||||
activityLevel: this.pageForm.activityLevel,
|
||||
applyed: this.pageForm.applyed,
|
||||
unionid: this.pageForm.unionid
|
||||
}
|
||||
})
|
||||
|
||||
if (resp.code === 200) {
|
||||
const v = resp.data.list
|
||||
if (v.length) {
|
||||
v.forEach(x => {
|
||||
const leaders = x.apply.filter(i => {
|
||||
return i.unionLeader
|
||||
})
|
||||
|
||||
x.leader = null
|
||||
if (leaders.length) {
|
||||
x.leader = leaders[0]
|
||||
}
|
||||
|
||||
const coachs = x.apply.filter(i => {
|
||||
return i.unionCoach
|
||||
})
|
||||
|
||||
x.coach = null
|
||||
if (coachs.length) {
|
||||
x.coach = coachs[0]
|
||||
}
|
||||
|
||||
const heads = x.apply.filter(i => {
|
||||
return i.unionHead
|
||||
})
|
||||
|
||||
x.head = null
|
||||
if (heads.length) {
|
||||
x.head = heads[0]
|
||||
}
|
||||
|
||||
const staffs = x.apply.filter(i => {
|
||||
return i.unionStaff
|
||||
})
|
||||
|
||||
x.staff = null
|
||||
if (staffs.length) {
|
||||
x.staff = staffs[0]
|
||||
}
|
||||
|
||||
x.apply = x.apply.filter(i => {
|
||||
return !i.unionLeader && !i.unionCoach && !i.unionHead && !i.unionStaff
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
this.rootData = JSON.parse(JSON.stringify(v))
|
||||
this.rootData.forEach(x => {
|
||||
if (x.apply&&x.apply.length>0){
|
||||
x.apply2 = this.clone(x.apply)
|
||||
}else{
|
||||
x.apply2 = null
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.unions = []
|
||||
this.pageForm.unionid = ''
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
this.$modal.closeLoading()
|
||||
}
|
||||
if (this.pageForm.activityLevel !== '40001' && this.rootData && this.rootData.length > 0) {
|
||||
this.$set(this.rootData[0], 'show', true)
|
||||
}
|
||||
this.apply = this.apply.concat(this.rootData)
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
if (this.apply.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
this.unions = this.apply.map(v => {
|
||||
return {id: v.id, unionName: v.unionName}
|
||||
})
|
||||
this.unions.unshift({id: '', unionName: '全部'})
|
||||
|
||||
if (this.unions.length === 2) {
|
||||
this.pageForm.unionid = this.unions[1].id
|
||||
}
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.$modal.closeLoading()
|
||||
} else {
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
this.$modal.closeLoading()
|
||||
}
|
||||
},
|
||||
async getActivityTypeList(code) {
|
||||
const {data} = await this.$http.get('/activity/common/getActivityTwoLevelType', {
|
||||
params: {
|
||||
code: code
|
||||
}
|
||||
})
|
||||
return data
|
||||
},
|
||||
doEventType(app) {
|
||||
const {apply, projectType} = app
|
||||
if (!app.projectType) {
|
||||
this.$set(app, 'apply2', apply)
|
||||
} else {
|
||||
const arr = apply.filter(i => {
|
||||
return i.projectType === projectType
|
||||
})
|
||||
this.$set(app, 'apply2', arr)
|
||||
}
|
||||
},
|
||||
doEvent(app) {
|
||||
const {apply, eventId} = app
|
||||
|
||||
if (!app.eventId) {
|
||||
this.$set(app, 'apply2', apply)
|
||||
} else {
|
||||
const arr = apply.filter(i => {
|
||||
return !i.unionLeader && !i.unionCoach && i.evid === eventId
|
||||
})
|
||||
this.$set(app, 'apply2', arr)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.changeActivity()
|
||||
const activityType = await this.getActivityTypeList('40000')
|
||||
this.activityTypeList = activityType
|
||||
this.$set(this.pageForm, 'activityLevel', this.activityTypeList[0].code)
|
||||
await this.getNearActivity()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,241 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search v-model="pageForm.searchKeyword" shape="round" maxlength="10" @search="doSearch"
|
||||
placeholder="请输入协会名称进行查询">
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.state" :options="clubType" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions" @change="doSearch">
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div>
|
||||
<van-list v-model="tableLoading" :finished="finished" :immediate-check="false" @load="load"
|
||||
v-if="tableData && tableData.length>0" :finished-text="tableData.length>0?'没有更多了':''">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status === 1">待协会审核</span>
|
||||
<span v-if="o.status === 2" style="color: red">协会拒绝</span>
|
||||
<span v-if="o.status === 3">待校工会审核</span>
|
||||
<span v-if="o.status === 4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status === 5" style="color: green">审核通过</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}
|
||||
</van-col>
|
||||
<van-col span="12"><span style="color: grey">电  话:</span>{{o.fzr_mobile}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<!--<van-col span="12"><span style="color: grey">会费标准:</span>{{o.dues_standard}}</van-col>-->
|
||||
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
|
||||
<van-col span="12"><span style="color: grey">当前人数:</span>{{o.cynum}}人</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24" class="cus_overflow">
|
||||
<span style="color: grey">介绍链接:</span>
|
||||
<uni-link v-if="o.introduce_href" style="color: #236eb4"
|
||||
:href="o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href"
|
||||
:text="o.introduce_href">
|
||||
</uni-link>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click="rollback(o)" v-if="o.joincount > 0 && o.status === 1" type="primary"
|
||||
size="small" color="#1867b0" style="margin-right: 8px">撤销申请
|
||||
</van-button>
|
||||
<van-button @click="needJoin(o)"
|
||||
v-if="(o.cynum + o.approvalnum) < o.number && o.joincount === 0" type="primary"
|
||||
size="small" color="#1867b0" style="margin-right: 8px">我要加入
|
||||
</van-button>
|
||||
<van-button @click="needJoin(o)"
|
||||
v-if="(o.cynum + o.approvalnum) >= o.number && pageForm.state !== 2"
|
||||
:disabled="(o.cynum + o.approvalnum) >= o.number" type="primary" size="small"
|
||||
color="#1867b0" style="margin-right: 8px">人数已满
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import {getDicts} from "../../api/system/dict/data";
|
||||
export default {
|
||||
name: 'applyInClub',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
clubType: [{
|
||||
text: '已加入',
|
||||
value: 2
|
||||
}, {
|
||||
text: '待加入',
|
||||
value: 3
|
||||
}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.load()
|
||||
},
|
||||
async load() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('/system/club/applyInClub/pageData', this.pageForm, {
|
||||
params: {
|
||||
state: this.pageForm.state,
|
||||
clubType: this.pageForm.clubType,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
async needJoin(o) {
|
||||
this.clickRow = o
|
||||
const {code, data} = await this.$http.get('/system/club/applyInClub/getInClubByCurUser')
|
||||
let str = '您还没有参加协会'
|
||||
if (data && data.length > 0) {
|
||||
str = '您已经加入了'
|
||||
data.forEach((item) => {
|
||||
str += '【' + item.name + '】'
|
||||
})
|
||||
}
|
||||
str += ',请确认是否申请加入【' + o.name + '】?'
|
||||
this.$modal.confirm(str).then(async () => {
|
||||
const id = o.id
|
||||
const resp = await this.$http.post("/system/club/applyInClub/submit", {}, {
|
||||
params: {id: id}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg('提交申请成功')
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
async rollback(o) {
|
||||
this.$modal.confirm('请确定是否撤销申请?').then(async () => {
|
||||
const id = o.id
|
||||
const resp = await this.$http.post("/system/club/applyInClub/revocation", {}, {
|
||||
params: {id: id}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg('撤销申请成功')
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
async getClubType() {
|
||||
const resp = await getDicts("club_type")
|
||||
return resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const data = await this.getClubType()
|
||||
console.log(data)
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({
|
||||
text: item.dictLabel,
|
||||
value: item.dictValue
|
||||
})
|
||||
})
|
||||
this.typeOptions.unshift({
|
||||
text: '全部类型'
|
||||
})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
this.$set(this.pageForm, "state", this.clubType[0].value)
|
||||
this.pageForm.searchName = 'club.name'
|
||||
await this.load()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search @search="doSearch" v-model="pageForm.name" placeholder="可输入协会名称查询" />
|
||||
</div>
|
||||
|
||||
<div style="overflow: scroll; height: 100%">
|
||||
<van-list v-model="tableLoading" :finished="finished" @load="pageData"
|
||||
v-if="tableData && tableData.length>0" :finished-text="tableData.length > 0 ? '没有更多了' : ''">
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div class="title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{ o.name }}</span>
|
||||
</div>
|
||||
<van-row style="margin-top: 10px">
|
||||
<van-col span="8">
|
||||
<span style="color: grey">协会总人数:</span>
|
||||
<span>{{ o.total }}</span>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<span style="color: grey">在职成员数:</span>
|
||||
<span>{{o.work}}</span>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<span style="color: grey">退休成员数:</span>
|
||||
<span>{{o.retire}}</span>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<span style="color: grey">协会待确认:</span>
|
||||
<span>{{o.club_no_confirm}}</span>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<span style="color: grey">协会已确认:</span>
|
||||
<span>{{o.club_has_confirm}}</span>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<span style="color: grey">男性成员数:</span>
|
||||
<span>{{o.man}}</span>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<span style="color: grey">校级待确认:</span>
|
||||
<span>{{o.school_has_confirm}}</span>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<span style="color: grey">校级已确认:</span>
|
||||
<span>{{o.school_has_confirm}}</span>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<span style="color: grey">女性成员数:</span>
|
||||
<span>{{o.woman}}</span>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<span style="color: grey">理事机构数:</span>
|
||||
<span>{{o.governing_body}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
|
||||
export default {
|
||||
name: 'clubSummary',
|
||||
components: {},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('system/club/clubUserCount/pageData', this.pageForm, {
|
||||
params: {
|
||||
name: this.pageForm.name
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.pageData()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.van-button {
|
||||
width: 56px;
|
||||
height: 26px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,385 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入协会名称进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div>
|
||||
<van-list
|
||||
v-model="tableLoading" v-if="tableData && tableData.length>0"
|
||||
:finished="finished" :immediate-check="false" @load="load"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<!--<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status==1">待协会审核</span>
|
||||
<span v-if="o.status==2" style="color: red">协会拒绝</span>
|
||||
<span v-if="o.status==3">待校工会审核</span>
|
||||
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status==5" style="color: green">审核通过</span>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">电  话:</span>{{o.fzr_mobile}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
|
||||
<van-col span="12"><span style="color: grey">当前人数:</span>{{o.people_num}}人</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24" class="cus_overflow">
|
||||
<span style="color: grey">介绍链接:</span>
|
||||
<uni-link v-if="o.introduce_href" style="color: #236eb4"
|
||||
:href="o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href"
|
||||
:text="o.introduce_href">
|
||||
</uni-link>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">已审{{o.has_audit}}</van-button>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">未审{{o.no_audit}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet v-model:show="userShow" title="申请人员列表" class="userPopup" @close="popClose">
|
||||
<div :class="queryType === 'notAudit' ? 'content' : 'no_content'">
|
||||
<div v-if="queryType === 'notAudit'" style="text-align: right; width: 96%">
|
||||
<van-tag color="#1867b0" style="margin-right: 10px" @click="cancelAll" size="large" type="primary">
|
||||
取消选中
|
||||
</van-tag>
|
||||
<van-tag color="#1867b0" @click="allIn" size="large" type="primary">全选</van-tag>
|
||||
</div>
|
||||
<div class="van-doc-card in-sheet-card" v-for="(obj, index) in userList">
|
||||
<div style="width: 90%">
|
||||
<div>
|
||||
<span style="color: grey">姓  名:</span>
|
||||
<span>{{ obj.username }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">工  号:</span>
|
||||
<span>{{ obj.loginname }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">单  位:</span>
|
||||
<span>{{ obj.unitname }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">性  别:</span>
|
||||
<span>{{ obj.sex === '0' ? '男' : '女' }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">联系方式:</span>
|
||||
<span>{{ obj.mobile }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span v-if="obj.status === 1">待协会审核</span>
|
||||
<span v-if="obj.status === 2">协会拒绝</span>
|
||||
<span v-if="obj.status === 3">待校工会审核</span>
|
||||
<span v-if="obj.status === 4">校工会拒绝</span>
|
||||
<span v-if="obj.status === 5">审核通过</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup" v-if="userList !== null && userList.length > 0">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
clickable class="cus_cell"
|
||||
:key="obj.id"
|
||||
@click="toggle(index)">
|
||||
|
||||
<van-icon class="audit_icon" color="green"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === true"
|
||||
name="passed"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === false"
|
||||
name="close"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
|
||||
<div v-else style="margin-top: 4px; text-align: center">暂无数据</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: absolute; bottom: 10px; width: 100%">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small"
|
||||
style="height: 38px;border-radius: 10px;margin-right: 20px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small"
|
||||
style="height: 38px;border-radius: 10px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import {getDicts} from "../../api/system/dict/data";
|
||||
export default {
|
||||
name: 'userApplyClubAudit',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
queryType: '',
|
||||
result: [],
|
||||
userList: [],
|
||||
userShow: false,
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async audit (type, auditType) {
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
this.$modal.msg('请先选择人员')
|
||||
return
|
||||
}
|
||||
const str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择!' : '您确定要一键全部审核吗?'
|
||||
this.$modal.confirm(str).then(async () => {
|
||||
let idList = this.result
|
||||
if (type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await this.$http.post('/system/club/userApplyClubAudit/check', idList, {
|
||||
params: {
|
||||
flag: auditType === 'pass',
|
||||
type: 1,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.doSearch()
|
||||
}
|
||||
this.$modal.msg(resp.msg)
|
||||
this.userShow = false
|
||||
})
|
||||
},
|
||||
cancelAll() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false))
|
||||
},
|
||||
allIn() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(true))
|
||||
},
|
||||
checkAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(index) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await this.$http.get('/system/club/userApplyClubAudit/getClubUser', {
|
||||
params: {
|
||||
id: o.id,
|
||||
auditType: 'hasAudit',
|
||||
type: 1,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.userList = resp.data
|
||||
this.userList.sort((a, b) => { return b.auditstate - a.auditstate })
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
async openView(o) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await this.$http.get('/system/club/userApplyClubAudit/getClubUser', {
|
||||
params: {
|
||||
id: o.id,
|
||||
auditType: 'notAudit',
|
||||
type: 1,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
this.$modal.msg('暂无申请人员')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.load()
|
||||
},
|
||||
async load() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('/system/club/userApplyClubAudit/getMyClub', this.pageForm, {
|
||||
params: {
|
||||
clubType: this.pageForm.clubType,
|
||||
type: 1,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
async getClubType() {
|
||||
const resp = await getDicts("club_type")
|
||||
return resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const data = await this.getClubType()
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({text: item.dictLabel, value: item.dictValue})
|
||||
})
|
||||
this.typeOptions.unshift({text: '全部类型'})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
await this.load()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-doc-card .van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.userPopup {
|
||||
max-height: 96%;
|
||||
height: 96%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
/*position: absolute;*/
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.userPopup .van-cell {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
.in-sheet-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,386 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入协会名称进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div>
|
||||
<van-list
|
||||
v-model="tableLoading" v-if="tableData && tableData.length>0"
|
||||
:finished="finished" :immediate-check="false" @load="load"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<!--<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status==1">待协会审核</span>
|
||||
<span v-if="o.status==2" style="color: red">协会拒绝</span>
|
||||
<span v-if="o.status==3">待校工会审核</span>
|
||||
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status==5" style="color: green">审核通过</span>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">电  话:</span>{{o.fzr_mobile}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
|
||||
<van-col span="12"><span style="color: grey">当前人数:</span>{{o.cynum}}人</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24" class="cus_overflow">
|
||||
<span style="color: grey">介绍链接:</span>
|
||||
<uni-link v-if="o.introduce_href" style="color: #236eb4"
|
||||
:href="o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href"
|
||||
:text="o.introduce_href">
|
||||
</uni-link>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">已审{{o.has_audit}}</van-button>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">未审{{o.no_audit}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet v-model:show="userShow" title="申请人员列表" class="userPopup" @close="popClose">
|
||||
<div :class="queryType === 'notAudit' ? 'content' : 'no_content'">
|
||||
<div v-if="queryType === 'notAudit'" style="text-align: right; width: 96%">
|
||||
<van-tag color="#1867b0" style="margin-right: 10px" @click="cancelAll" size="large" type="primary">
|
||||
取消选中
|
||||
</van-tag>
|
||||
<van-tag color="#1867b0" @click="allIn" size="large" type="primary">全选</van-tag>
|
||||
</div>
|
||||
<div class="van-doc-card in-sheet-card" v-for="(obj, index) in userList">
|
||||
<div style="width: 90%">
|
||||
<div>
|
||||
<span style="color: grey">姓  名:</span>
|
||||
<span>{{ obj.username }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">工  号:</span>
|
||||
<span>{{ obj.loginname }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">单  位:</span>
|
||||
<span>{{ obj.unitname }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">性  别:</span>
|
||||
<span>{{ obj.sex === '0' ? '男' : '女' }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">联系方式:</span>
|
||||
<span>{{ obj.mobile }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span v-if="obj.status === 1">待协会审核</span>
|
||||
<span v-if="obj.status === 2">协会拒绝</span>
|
||||
<span v-if="obj.status === 3">待校工会审核</span>
|
||||
<span v-if="obj.status === 4">校工会拒绝</span>
|
||||
<span v-if="obj.status === 5">审核通过</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup" v-if="userList !== null && userList.length > 0">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
clickable class="cus_cell"
|
||||
:key="obj.id"
|
||||
@click="toggle(index)">
|
||||
|
||||
<van-icon class="audit_icon" color="green"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === true"
|
||||
name="passed"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === false"
|
||||
name="close"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
|
||||
<div v-else style="margin-top: 4px; text-align: center">暂无数据</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: absolute; bottom: 10px; width: 100%">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small"
|
||||
style="height: 38px;border-radius: 10px;margin-right: 20px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small"
|
||||
style="height: 38px;border-radius: 10px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import {getDicts} from "../../api/system/dict/data";
|
||||
export default {
|
||||
name: 'userApplySchoolAudit',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
queryType: '',
|
||||
result: [],
|
||||
userList: [],
|
||||
userShow: false,
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async audit (type, auditType) {
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
this.$modal.msg('请先选择人员')
|
||||
return
|
||||
}
|
||||
const str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择!' : '您确定要一键全部审核吗?'
|
||||
await this.$modal.confirm(str).then(async () => {
|
||||
let idList = this.result
|
||||
if (type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await this.$http.post('/system/club/userApplyClubAudit/check', idList, {
|
||||
params: {
|
||||
flag: auditType === 'pass',
|
||||
type: 2,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.doSearch()
|
||||
}
|
||||
this.$modal.msg(resp.msg)
|
||||
this.userShow = false
|
||||
})
|
||||
},
|
||||
cancelAll() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false))
|
||||
},
|
||||
allIn() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(true))
|
||||
},
|
||||
checkAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(index) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await this.$http.get('/system/club/userApplyClubAudit/getClubUser', {
|
||||
params: {
|
||||
id: o.id,
|
||||
auditType: 'hasAudit',
|
||||
type: 2,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.userList = resp.data
|
||||
this.userList.sort((a, b) => { return b.auditstate - a.auditstate })
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
async openView(o) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await this.$http.get('/system/club/userApplyClubAudit/getClubUser', {
|
||||
params: {
|
||||
id: o.id,
|
||||
auditType: 'notAudit',
|
||||
type: 2,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
this.$modal.msg('暂无申请人员')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.load()
|
||||
},
|
||||
async load() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('/system/club/userApplyClubAudit/getMyClub', this.pageForm, {
|
||||
params: {
|
||||
clubType: this.pageForm.clubType,
|
||||
type: 2,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
async getClubType() {
|
||||
const resp = await getDicts("club_type")
|
||||
return resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const data = await this.getClubType()
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({text: item.dictLabel, value: item.dictValue})
|
||||
})
|
||||
this.typeOptions.unshift({text: '全部类型'})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
await this.load()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-doc-card .van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
max-height: 96%;
|
||||
height: 96%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
/*position: absolute;*/
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.userPopup .van-cell {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
.in-sheet-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<div id="container"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import AMapLoader from '@amap/amap-jsapi-loader';
|
||||
import request from '@/utils/request'
|
||||
|
||||
let marker = null
|
||||
let circle = null
|
||||
export default {
|
||||
props: {
|
||||
isCircle: {
|
||||
type: Boolean, default: false
|
||||
},
|
||||
radius: {
|
||||
type: Number, default: 50
|
||||
},
|
||||
position: {
|
||||
type: Array, default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
view: {type: Boolean, default: false}
|
||||
},
|
||||
name: 'MapContainer',
|
||||
data() {
|
||||
return {
|
||||
//此处不声明 map 对象,可以直接使用 this.map赋值或者采用非响应式的普通对象来存储。
|
||||
//map:null,
|
||||
poi: this.position,
|
||||
appMapCenterPointX: 0,
|
||||
appMapCenterPointY: 0,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
position(newVal) {
|
||||
this.poi = newVal
|
||||
},
|
||||
poi(newVal) {
|
||||
this.$emit('update:position', newVal)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initMap() {
|
||||
this.map = new AMap.Map("container", { //设置地图容器id
|
||||
resizeEnable: true,
|
||||
zoom: 16, //初始化地图级别
|
||||
center: [this.appMapCenterPointX, this.appMapCenterPointY], //初始化地图中心点位置
|
||||
});
|
||||
|
||||
this.clearMarker()
|
||||
if (this.poi && this.poi.length > 0) {
|
||||
const coordinateArray = this.poi
|
||||
this.createMarker(coordinateArray)
|
||||
} else {
|
||||
this.createMarker([this.appMapCenterPointX, this.appMapCenterPointY])
|
||||
}
|
||||
this.map.on('click', (e) => {
|
||||
if (!this.view) {
|
||||
this.clearMarker()
|
||||
const position = [e.lnglat.getLng(), e.lnglat.getLat()]
|
||||
this.createMarker(position)
|
||||
this.poi = position
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
//清楚签到点位
|
||||
clearMarker() {
|
||||
if (marker) {
|
||||
this.map.remove(marker)
|
||||
}
|
||||
if (circle && this.isCircle) {
|
||||
this.map.remove(circle)
|
||||
}
|
||||
},
|
||||
//创建签到点位
|
||||
createMarker(position) {
|
||||
if (this.isCircle) {
|
||||
circle = new AMap.Circle({
|
||||
center: new AMap.LngLat(position[0], position[1]), // 圆心位置
|
||||
radius: this.radius, //半径
|
||||
strokeColor: "#F33", //线颜色
|
||||
strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 1, //线粗细度
|
||||
fillColor: "#ee2200", //填充颜色
|
||||
fillOpacity: 0.35 //填充透明度
|
||||
})
|
||||
this.map.add(circle)
|
||||
this.getAddress(position)
|
||||
this.map.setFitView()
|
||||
}
|
||||
marker = new AMap.Marker({
|
||||
position: position,
|
||||
offset: new AMap.Pixel(0, 0)
|
||||
})
|
||||
this.map.add(marker)
|
||||
this.getAddress(position)
|
||||
this.map.setFitView(null, false, [150, 60, 100, 60]);
|
||||
},
|
||||
getAddress() {
|
||||
|
||||
},
|
||||
async getConfigKey(configKey) {
|
||||
const {msg} = await request.get("/system/config/configKey/" + configKey)
|
||||
return msg
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
this.appMapCenterPointX = await this.getConfigKey("sys.appMapCenterPointX")
|
||||
this.appMapCenterPointY = await this.getConfigKey("sys.appMapCenterPointY")
|
||||
//DOM初始化完成进行地图初始化
|
||||
this.initMap();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#container {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-card class="view-title" :title="title">
|
||||
<text class="uni-body view-content">{{ content }}</text>
|
||||
</uni-card>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.title = options.title
|
||||
this.content = options.content
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.title
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.view-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.view-content {
|
||||
font-size: 26rpx;
|
||||
padding: 12px 5px 0;
|
||||
color: #333;
|
||||
line-height: 24px;
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<view v-if="params.url">
|
||||
<web-view :webview-styles="webviewStyles" :src="`${params.url}`"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
params: {},
|
||||
webviewStyles: {
|
||||
progress: {
|
||||
color: "#FF3333"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
src: {
|
||||
type: [String],
|
||||
default: null
|
||||
}
|
||||
},
|
||||
onLoad(event) {
|
||||
this.params = event
|
||||
if (event.title) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: event.title
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,279 @@
|
||||
<template>
|
||||
<view>
|
||||
<van-form ref="form" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
|
||||
<van-field name="applyWay" label="申请方式" required :rules="[{ required:true, message: '请选择申请方式'}]">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.applyWay" direction="horizontal" @change="applyWayChange">
|
||||
<van-radio :name="1">本人申请</van-radio>
|
||||
<van-radio :name="2">代申请</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="经办人" name="agentUserName" readonly v-model="formData.agentUserName" />
|
||||
|
||||
<van-field label="申请时间" readonly :value="$moment().format('YYYY-MM-DD')" name="applyTime"></van-field>
|
||||
|
||||
<van-field @input="userRemoteMethod" name="comfortedPersonUserName" required
|
||||
v-model="formData.comfortedPersonUserName" label="慰问对象" placeholder="请输入慰问对象"
|
||||
:rules="[{ required: true, message: '请填写慰问对象' }]"></van-field>
|
||||
<van-action-sheet v-model="userActionSheet" :actions="users" cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="users = []" :close-on-click-overlay="false">
|
||||
<van-cell-group>
|
||||
<van-cell v-for="user in users" :key="user.comfortedPersonId"
|
||||
@click="userChange(user.comfortedPersonId)" :title="user.comfortedPersonUserName"
|
||||
:label="user.comfortedPersonUnitName" />
|
||||
</van-cell-group>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field label="分工会" readonly v-model="formData.comfortedPersonUnionName"
|
||||
name="comfortedPersonUnionName"></van-field>
|
||||
|
||||
<van-field label="工会小组" readonly v-model="formData.comfortedPersonUnionGroupName"
|
||||
name="comfortedPersonUnionGroupName"></van-field>
|
||||
|
||||
<van-field name="comfortedPersonSex" label="性别" required :rules="[{ required:true, message: '请选择性别'}]">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.comfortedPersonSex" direction="horizontal">
|
||||
<van-radio v-for="item in dict.type.sys_user_sex" :key="item.value" :name="item.value">
|
||||
{{ item.label }}
|
||||
</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="年龄" v-model="formData.comfortedPersonAge" name="comfortedPersonAge" required
|
||||
:rules="[{ required: true, message: '请填写慰问对象' }]" placeholder="请输入年龄"></van-field>
|
||||
|
||||
<van-field label="职称" v-model="formData.comfortedPersonJobTitle" required
|
||||
:rules="[{ required:true, message: '请输入'}]" placeholder="请输入职称"></van-field>
|
||||
|
||||
<van-field label="职务" v-model="formData.comfortedPersonPosition" name="comfortedPersonPosition" required
|
||||
:rules="[{ required:true, message: '请输入'}]" placeholder="请输入职务"></van-field>
|
||||
|
||||
<van-field label="职级" v-model="formData.comfortedPersonRankLevel" name="comfortedPersonRankLevel"
|
||||
required :rules="[{ required:true, message: '请输入'}]" placeholder="请输入职级"></van-field>
|
||||
|
||||
<van-field label="技术等级" v-model="formData.comfortedPersonTechnologyLevel"
|
||||
name="comfortedPersonTechnologyLevel" required :rules="[{ required:true, message: '请输入'}]"
|
||||
placeholder="请输入技术等级"></van-field>
|
||||
|
||||
<van-field name="comfortedPersonTwoEmployees" label="我校双职工" required
|
||||
:rules="[{ required:true, message: '请选择'}]" placeholder="请选择">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.comfortedPersonTwoEmployees" direction="horizontal">
|
||||
<van-radio :name="true">是</van-radio>
|
||||
<van-radio :name="false">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请选择慰问类型'}]" @click="showTypePicker = true" clickable
|
||||
label="慰问类型" name="typeName" placeholder="点击选择慰问类型" readonly required v-model="formData.typeName" />
|
||||
<van-popup position="bottom" round v-model:show="showTypePicker">
|
||||
<van-picker :columns="typeList" @cancel="showTypePicker = false"
|
||||
@confirm="({text,value})=>{formData.typeName = text;formData.type = value ;showTypePicker = false}"
|
||||
show-toolbar>
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请输入申请理由'}]" autosize label="申请理由" maxlength="5000"
|
||||
placeholder="请输入申请理由" required rows="5" show-word-limit type="textarea"
|
||||
v-model="formData.applyReason"></van-field>
|
||||
|
||||
<van-field name="files" label="附件">
|
||||
<template #input>
|
||||
<FileUpload ref="fileUpload" />
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="files" label="签字">
|
||||
<template #input>
|
||||
<v-sign v-model="formData.agentSign" />
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
<view class="audit-wrap">
|
||||
<van-button type="danger" @click="doSave">保存</van-button>
|
||||
<van-button type="primary" @click="doSubmit">提交</van-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "../../mixins/initTableMixins";
|
||||
|
||||
export default {
|
||||
name: 'apply',
|
||||
dicts: ['sys_user_sex'],
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
users: [],
|
||||
typeList: [],
|
||||
showTypePicker: false,
|
||||
userActionSheet: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"formData.money"(val) {
|
||||
if (val > this.money) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '金额超过规定金额' + this.money + "(元)",
|
||||
type: 'warning'
|
||||
});
|
||||
this.$set(this.formData, "money", this.money)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async applyWayChange(val) {
|
||||
if (val === 1) {
|
||||
const {
|
||||
data
|
||||
} = await this.$http.get('/staff/condolence/apply/queryUsers', {
|
||||
params: {
|
||||
userId: this.$store.getters.userId
|
||||
}
|
||||
})
|
||||
this.users = data
|
||||
this.userChange(this.$store.getters.userId)
|
||||
}
|
||||
},
|
||||
async userRemoteMethod(val) {
|
||||
if (val) {
|
||||
const {
|
||||
data
|
||||
} = await this.$http.get('/staff/condolence/apply/queryUsers', {
|
||||
params: {
|
||||
query: val
|
||||
}
|
||||
})
|
||||
this.users = data
|
||||
this.userActionSheet = true
|
||||
}
|
||||
},
|
||||
userChange(val) {
|
||||
this.userActionSheet = false
|
||||
if (val) {
|
||||
const user = this.users.find(v => v.comfortedPersonId === val)
|
||||
Object.keys(user).forEach(k => {
|
||||
this.$set(this.formData, k, user[k])
|
||||
})
|
||||
} else {
|
||||
// this.$set(this.formData, 'comfortedPersonUnionName', null)
|
||||
// this.$set(this.formData, 'comfortedPersonUnionGroupName', null)
|
||||
// this.$set(this.formData, 'comfortedPersonSex', null)
|
||||
// this.$set(this.formData, 'comfortedPersonAge', null)
|
||||
// this.$set(this.formData, 'comfortedPersonJobTitle', null)
|
||||
// this.$set(this.formData, 'comfortedPersonPosition', null)
|
||||
}
|
||||
},
|
||||
async getTypes() {
|
||||
const {
|
||||
data
|
||||
} = await this.$http.post('/staff/condolence/type/list', null)
|
||||
data.forEach(v => {
|
||||
v['text'] = v.typeName
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.typeList = data
|
||||
},
|
||||
async doSave() {
|
||||
const validFields = ['applyWay', 'comfortedPersonUserName']
|
||||
const valids = validFields.map(v => {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$refs.form.validateField(v).then(() => {
|
||||
resolve()
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
})
|
||||
Promise.all(valids).then(async () => {
|
||||
this.$refs.fileUpload.upload().then(async () => {
|
||||
const {
|
||||
data,
|
||||
msg
|
||||
} = await this.$http.post('/staff/condolence/apply/doSave', this
|
||||
.formData)
|
||||
this.$modal.msgSuccess(msg)
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.redirectTo('/pages/condolence/record')
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
doSubmit() {
|
||||
this.$refs.form.validate().then(() => {
|
||||
this.$modal.confirm("您确定要提交吗?").then(async () => {
|
||||
this.$modal.loading()
|
||||
this.$refs.fileUpload.upload().then(async () => {
|
||||
const {
|
||||
data,
|
||||
msg
|
||||
} = await this.$http.post('/staff/condolence/apply/doSubmit',
|
||||
this.formData)
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.$modal.closeLoading()
|
||||
this.$modal.msgSuccess(msg)
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.redirectTo('/pages/condolence/record')
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
async initForm(id) {
|
||||
if (id) {
|
||||
const {
|
||||
data: formData
|
||||
} = await this.$http.get('/staff/condolence/apply/findOne', {
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
const {
|
||||
data: users
|
||||
} = await this.$http.get('/staff/condolence/apply/queryUsers', {
|
||||
params: {
|
||||
userId: formData.comfortedPersonId
|
||||
}
|
||||
})
|
||||
this.users = users
|
||||
const type = this.typeList.find(v => v.value === formData.type)
|
||||
formData.typeName = type ? type.text : null
|
||||
|
||||
this.formData = formData
|
||||
} else {
|
||||
this.$set(this.formData, 'agentUserName', this.$store.getters.name)
|
||||
this.$set(this.formData, 'applyTime', this.$moment().format('YYYY-MM-DD HH:mm:ss'))
|
||||
}
|
||||
}
|
||||
},
|
||||
async onLoad({id}) {
|
||||
await this.getTypes()
|
||||
await this.initForm(id)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.audit-wrap {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 5px 0 20px 0;
|
||||
|
||||
.van-button {
|
||||
flex: 1;
|
||||
margin: 0 10px 0 10px
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<view>
|
||||
<info :id="formData.condolenceId">
|
||||
<view class="van-cell-group__title">
|
||||
分工会审核
|
||||
</view>
|
||||
<van-form :show-error-message="false" input-align="right" ref="auditForm">
|
||||
<van-cell-group inset>
|
||||
<van-field label="审核人" name="userName" readonly v-model="formData.userName"/>
|
||||
<van-field label="审核时间" name="auditTime" readonly :value="$moment().format('YYYY-MM-DD')"/>
|
||||
<van-field label="审核意见" name="auditOpinion" v-model="formData.opinion"
|
||||
:rules="[{required:true, message: '请输入审核意见'}]"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
placeholder="请输入审核意见"/>
|
||||
<!-- <van-field name="sign.signText" label="签字"-->
|
||||
<!-- :rules="[{required:true, message: '请签字'}]"-->
|
||||
<!-- v-model="formData.sign.signText">-->
|
||||
<!-- <template #input>-->
|
||||
<!-- <Signature v-model="formData.sign.signText"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-field>-->
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
<view class="operate">
|
||||
<template v-for="item in dict.type.sys_audit_result">
|
||||
<van-button @click="doAudit(item)" :type="item.raw.listClass">
|
||||
{{ item.label }}
|
||||
</van-button>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
</info>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import info from "../components/info";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
info
|
||||
},
|
||||
dicts: ['sys_audit_result'],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
condolenceId: null,
|
||||
userName: this.$store.getters.name,
|
||||
auditTime: this.$moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: null,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doAudit(item) {
|
||||
this.$refs.auditForm.validate().then(async () => {
|
||||
const formData = {...this.formData}
|
||||
let url = null
|
||||
switch (item.value) {
|
||||
case '1':
|
||||
url = '/staff/condolence/branchUnionAudit/doPass';
|
||||
break
|
||||
case '2':
|
||||
url = '/staff/condolence/branchUnionAudit/doReject';
|
||||
break
|
||||
case '3':
|
||||
url = '/staff/condolence/branchUnionAudit/doBackTo';
|
||||
break
|
||||
}
|
||||
|
||||
this.$modal.confirm(`您确定要${item.label}吗?`).then(async () => {
|
||||
this.$modal.loading()
|
||||
const {msg} = await this.$http.post(url, formData)
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.$modal.closeLoading()
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.navigateBack()
|
||||
}).finally(() => {
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad({id}) {
|
||||
this.formData.condolenceId = id
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="search-wrap">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入慰问对象的姓名及工号进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"/>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="queryForm.year" :options="yearOption" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.type" :options="[{text:'全部类型',value:null}].concat(typeList)"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs v-model="isAudit"
|
||||
@change="(name)=>{queryForm.isAudit = name==='0' ? null : name==='1';doSearch()}">
|
||||
<van-tab title="全部" name="0"></van-tab>
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="2"></van-tab>
|
||||
</van-tabs>
|
||||
</view>
|
||||
<van-list
|
||||
v-model="tableLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<view v-for="row in tableData" :key="row.id" class="van-doc-card">
|
||||
<view>
|
||||
<van-cell-group>
|
||||
<van-cell title="慰问对象" :value="row.comfortedPersonUserName"/>
|
||||
<van-cell title="经办人" :value="row.agentUserName"/>
|
||||
<van-cell title="申请时间" :value="row.applyTime"/>
|
||||
<van-cell title="慰问类型" :value="row.typeName"/>
|
||||
<!-- <van-cell title="所属工会" :value="row.comfortedPersonUnionName"/>-->
|
||||
<van-cell title="所属单位" :value="row.comfortedPersonUnitName"/>
|
||||
<van-cell title="工会小组" :value="row.comfortedPersonUnionGroupName"/>
|
||||
<van-cell title="申请状态" :value="row.stateName"/>
|
||||
</van-cell-group>
|
||||
|
||||
<view class="operate">
|
||||
<van-button type="info" size="small" plain
|
||||
@click="$tab.navigateTo(`/pages/condolence/branchUnionAudit/audit?id=${row.id}`)"
|
||||
v-if="[25].includes(row.stateId)">审核
|
||||
</van-button>
|
||||
<van-button type="danger" size="small" plain @click="doRevoke(row.id)"
|
||||
v-if="[30,35,40].includes(row.stateId)">撤回
|
||||
</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="!tableLoading && tableData.length===0"
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "../../../mixins/initTableMixins";
|
||||
|
||||
export default {
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
queryForm: {
|
||||
year: new Date().getFullYear(),
|
||||
type: null,
|
||||
isAudit: false
|
||||
},
|
||||
typeList: [],
|
||||
yearOption: [],
|
||||
isAudit: '2'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getTypes() {
|
||||
const {data} = await this.$http.post('/staff/condolence/type/list', null)
|
||||
data.forEach(v => {
|
||||
v['text'] = v.typeName
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.typeList = data
|
||||
},
|
||||
pageData() {
|
||||
this.$modal.loading()
|
||||
this.tableLoading = true
|
||||
this.$http.post('/staff/condolence/branchUnionAudit/pageData', {...this.pageForm, ...this.queryForm}).then(res => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
this.$modal.closeLoading()
|
||||
}).finally(() => {
|
||||
this.tableLoading = false
|
||||
this.finished = true
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
doRevoke(id) {
|
||||
this.$modal.confirm('您确定要撤销吗?').then(async () => {
|
||||
this.$modal.loading()
|
||||
const {msg} = await this.$http.post('/staff/condolence/branchUnionAudit/doRevoke', null, {
|
||||
params: {id}
|
||||
})
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.doSearch()
|
||||
}).finally(() => {
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.doSearch()
|
||||
this.getTypes()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
*Desc:
|
||||
*Create by: jug
|
||||
*Create time:2023/3/3/16:12
|
||||
*/
|
||||
<template>
|
||||
<view>
|
||||
<view class="van-cell-group__title">
|
||||
申请信息
|
||||
</view>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="姓名" :value="viewData.comfortedPersonUserName"/>
|
||||
<van-cell title="分工会" :value="viewData.comfortedPersonUnionName"/>
|
||||
<van-cell title="工会小组" :value="viewData.comfortedPersonUnionGroupName"/>
|
||||
<van-cell title="性别">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="viewData.comfortedPersonSex"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="年龄" :value="viewData.comfortedPersonAge"/>
|
||||
<van-cell title="职称" :value="viewData.comfortedPersonJobTitle"/>
|
||||
<van-cell title="职务" :value="viewData.comfortedPersonPosition"/>
|
||||
<van-cell title="职级" :value="viewData.comfortedPersonRankLevel"/>
|
||||
<van-cell title="技术等级" :value="viewData.comfortedPersonTechnologyLevel"/>
|
||||
<van-cell title="工资号" :value="viewData.comfortedPersonLoginName"/>
|
||||
<van-cell title="是否我校双职工" :value="viewData.comfortedPersonTwoEmployees ? '是' : '否'"/>
|
||||
<van-cell title="申请理由" :value="viewData.applyReason"></van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<slot/>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "info",
|
||||
dicts: ['sys_user_sex', 'sys_audit_result'],
|
||||
props: {
|
||||
id:{
|
||||
type:String,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
unionGroupAudits() {
|
||||
return this.viewData.unionGroupAudits
|
||||
},
|
||||
branchUnionAudits() {
|
||||
return this.viewData.branchUnionAudits
|
||||
},
|
||||
schoolUnionAccountingAudits() {
|
||||
return this.viewData.schoolUnionAccountingAudits
|
||||
},
|
||||
schoolUnionAudits() {
|
||||
return this.viewData.schoolUnionAudits
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openView() {
|
||||
if(this.id){
|
||||
this.loading = true
|
||||
const resp = await this.$http.get('/staff/condolence/apply/getApplyInfo', {params: {id:this.id}})
|
||||
this.viewData = resp.data
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.openView()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import info from './components/info.vue'
|
||||
export default {
|
||||
components: {
|
||||
info
|
||||
},
|
||||
dicts:['sys_audit_result'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="search-wrap">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="queryForm.year" :options="yearOption" @change="doSearch">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.type" :options="[{text:'全部类型',value:null}].concat(typeList)"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</view>
|
||||
|
||||
<van-list v-model="tableLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false" @load="pageData">
|
||||
<view v-for="row in tableData" :key="row.id" class="van-doc-card">
|
||||
<view>
|
||||
<van-cell-group @tap="">
|
||||
<van-cell title="慰问对象" :value="row.comfortedPersonUserName" />
|
||||
<van-cell title="经办人" :value="row.agentUserName" />
|
||||
<van-cell title="申请时间" :value="row.applyTime" />
|
||||
<van-cell title="慰问类型" :value="row.typeName" />
|
||||
<!-- <van-cell title="所属工会" :value="row.comfortedPersonUnionName"/>-->
|
||||
<van-cell title="所属单位" :value="row.comfortedPersonUnitName" />
|
||||
<van-cell title="工会小组" :value="row.comfortedPersonUnionGroupName" />
|
||||
<van-cell title="申请状态" :value="row.stateName" />
|
||||
</van-cell-group>
|
||||
|
||||
<view class="operate">
|
||||
<van-button type="info" size="small" plain
|
||||
@click="$tab.navigateTo(`/pages/condolence/apply?id=${row.id}`)"
|
||||
v-if="[5,10,15,30,45,60].includes(row.stateId)">编辑</van-button>
|
||||
<van-button type="danger" size="small" plain @click="doDelete(row.id)">删除</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-list>
|
||||
<van-empty v-if="!tableLoading && tableData.length===0" class="custom-image" description="暂无数据"></van-empty>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "../../mixins/initTableMixins";
|
||||
|
||||
export default {
|
||||
name: 'record',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
queryForm: {
|
||||
year: new Date().getFullYear(),
|
||||
type: null
|
||||
},
|
||||
typeList: [],
|
||||
yearOption: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pageData() {
|
||||
this.$modal.loading()
|
||||
this.tableLoading = true
|
||||
this.$http.post('/staff/condolence/applyRecord/pageData', {
|
||||
...this.pageForm,
|
||||
...this.queryForm
|
||||
}).then(res => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
this.$modal.closeLoading()
|
||||
}).finally(() => {
|
||||
this.tableLoading = false
|
||||
this.finished = true
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
async getTypes() {
|
||||
const {
|
||||
data
|
||||
} = await this.$http.post('/staff/condolence/type/list', null)
|
||||
data.forEach(v => {
|
||||
v['text'] = v.typeName
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.typeList = data
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$modal.confirm('您确定要删除吗?').then(async () => {
|
||||
const {
|
||||
msg
|
||||
} = await this.$http.post('/staff/condolence/applyRecord/doDelete', null, {
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.doSearch()
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
this.getTypes()
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({
|
||||
value: i,
|
||||
text: i + '年'
|
||||
}, )
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<view>
|
||||
<info :id="formData.condolenceId">
|
||||
<view class="van-cell-group__title">
|
||||
校工会会计审核
|
||||
</view>
|
||||
<van-form :show-error-message="false" input-align="right" ref="auditForm">
|
||||
<van-cell-group inset>
|
||||
<van-field label="审核人" name="userName" readonly v-model="formData.userName"/>
|
||||
<van-field label="审核时间" name="auditTime" readonly :value="$moment().format('YYYY-MM-DD')"/>
|
||||
<van-field label="审核意见" name="auditOpinion" v-model="formData.opinion"
|
||||
:rules="[{required:true, message: '请输入审核意见'}]"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
placeholder="请输入审核意见"/>
|
||||
<!-- <van-field name="sign.signText" label="签字"-->
|
||||
<!-- :rules="[{required:true, message: '请签字'}]"-->
|
||||
<!-- v-model="formData.sign.signText">-->
|
||||
<!-- <template #input>-->
|
||||
<!-- <Signature v-model="formData.sign.signText"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-field>-->
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
<view class="operate">
|
||||
<template v-for="item in dict.type.sys_audit_result">
|
||||
<van-button @click="doAudit(item)" :type="item.raw.listClass">
|
||||
{{ item.label }}
|
||||
</van-button>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
</info>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import info from "../components/info";
|
||||
export default {
|
||||
components: {
|
||||
info
|
||||
},
|
||||
dicts:['sys_audit_result'],
|
||||
data() {
|
||||
return {
|
||||
formData:{
|
||||
condolenceId:null,
|
||||
userName: this.$store.getters.name,
|
||||
auditTime: this.$moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: null,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doAudit(item){
|
||||
this.$refs.auditForm.validate().then(async () => {
|
||||
const formData = {...this.formData}
|
||||
let url = null
|
||||
switch (item.value){
|
||||
case '1': url = '/staff/condolence/schoolUnionAccountingAudit/doPass';break
|
||||
case '2': url = '/staff/condolence/schoolUnionAccountingAudit/doReject';break
|
||||
case '3': url = '/staff/condolence/schoolUnionAccountingAudit/doBackTo';break
|
||||
}
|
||||
|
||||
this.$modal.confirm(`您确定要${item.label}吗?`).then(async () => {
|
||||
this.$modal.loading()
|
||||
const {msg} = await this.$http.post(url, formData)
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.$modal.closeLoading()
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.navigateBack()
|
||||
}).finally(()=>{
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad({id}){
|
||||
this.formData.condolenceId = id
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="search-wrap">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入慰问对象的姓名及工号进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"/>
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="queryForm.year" :options="yearOption" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.type" :options="[{text:'全部类型',value:null}].concat(typeList)" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.unionId" :options="[{text:'全部分工会',value:null}].concat(unions)" @change="unionIdChange;doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.unionId" :options="[{text:'全部二级单位',value:null}].concat(units)" @change="unitIdChange;doSearch"></van-dropdown-item>
|
||||
<template v-if="config['sys.unionGroup']==='true'">
|
||||
<van-dropdown-item v-model="queryForm.unionGroupId" :options="[{text:'全部工会小组',value:null}].concat(unionGroups)" @change="unionGroupChange;doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.threeUnitId" :options="[{text:'全部三级单位',value:null}].concat(threeUnits)" @change="doSearch"></van-dropdown-item>
|
||||
</template>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs v-model="isAudit"
|
||||
@change="(name)=>{queryForm.isAudit = name==='0' ? null : name==='1';doSearch()}">
|
||||
<van-tab title="全部" name="0"></van-tab>
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="2"></van-tab>
|
||||
</van-tabs>
|
||||
</view>
|
||||
<van-list
|
||||
v-model="tableLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<view v-for="row in tableData" :key="row.id" class="van-doc-card">
|
||||
<view>
|
||||
<van-cell-group @click="$tab.navigateTo(`/pages/condolence/condolenceInfo?id=${row.id}`)">
|
||||
<van-cell title="慰问对象" :value="row.comfortedPersonUserName"/>
|
||||
<van-cell title="经办人" :value="row.agentUserName"/>
|
||||
<van-cell title="申请时间" :value="row.applyTime"/>
|
||||
<van-cell title="慰问类型" :value="row.typeName"/>
|
||||
<van-cell title="所属工会" :value="row.comfortedPersonUnionName"/>
|
||||
<van-cell title="所属单位" :value="row.comfortedPersonUnitName"/>
|
||||
<van-cell title="工会小组" :value="row.comfortedPersonUnionGroupName"/>
|
||||
<van-cell title="申请状态" :value="row.stateName"/>
|
||||
</van-cell-group>
|
||||
|
||||
<view class="operate">
|
||||
<van-button type="info" size="small" plain @click="$tab.navigateTo(`/pages/condolence/schoolUnionAccountingAudit/audit?id=${row.id}`)" v-if="[40].includes(row.stateId)">审核</van-button>
|
||||
<van-button type="danger" size="small" plain @click="doRevoke(row.id)" v-if="[45,50,55].includes(row.stateId)">撤回</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="!tableLoading && tableData.length===0"
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "../../../mixins/initTableMixins";
|
||||
|
||||
export default {
|
||||
mixins:[initTableMixins],
|
||||
configs: ['sys.unionGroup'],
|
||||
data() {
|
||||
return {
|
||||
queryForm: {
|
||||
year: new Date().getFullYear(),
|
||||
type:null,
|
||||
isAudit: false
|
||||
},
|
||||
typeList: [],
|
||||
yearOption:[],
|
||||
isAudit:'2'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getTypes() {
|
||||
const {data} = await this.$http.post('/staff/condolence/type/list', null)
|
||||
data.forEach(v=>{
|
||||
v['text'] = v.typeName
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.typeList = data
|
||||
},
|
||||
pageData() {
|
||||
this.$modal.loading()
|
||||
this.tableLoading = true
|
||||
this.$http.post('/staff/condolence/schoolUnionAccountingAudit/pageData', {...this.pageForm, ...this.queryForm}).then(res => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
this.$modal.closeLoading()
|
||||
}).finally(() => {
|
||||
this.tableLoading = false
|
||||
this.finished = true
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
doRevoke(id) {
|
||||
this.$modal.confirm('您确定要撤销吗?').then(async () => {
|
||||
this.$modal.loading()
|
||||
const {msg} = await this.$http.post('/staff/condolence/schoolUnionAccountingAudit/doRevoke', null, {
|
||||
params: {id}
|
||||
})
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.doSearch()
|
||||
}).finally(()=>{
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created(){
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.doSearch()
|
||||
this.getTypes()
|
||||
this.getUnions()
|
||||
this.getUnits()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<view>
|
||||
<info :id="formData.condolenceId">
|
||||
<view class="van-cell-group__title">
|
||||
校工会审核
|
||||
</view>
|
||||
<van-form :show-error-message="false" input-align="right" ref="auditForm">
|
||||
<van-cell-group inset>
|
||||
<van-field label="审核人" name="userName" readonly v-model="formData.userName"/>
|
||||
<van-field label="审核时间" name="auditTime" readonly :value="$moment().format('YYYY-MM-DD')"/>
|
||||
<van-field label="审核意见" name="auditOpinion" v-model="formData.opinion"
|
||||
:rules="[{required:true, message: '请输入审核意见'}]"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
placeholder="请输入审核意见"/>
|
||||
<!-- <van-field name="sign.signText" label="签字"-->
|
||||
<!-- :rules="[{required:true, message: '请签字'}]"-->
|
||||
<!-- v-model="formData.sign.signText">-->
|
||||
<!-- <template #input>-->
|
||||
<!-- <Signature v-model="formData.sign.signText"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-field>-->
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
<view class="operate">
|
||||
<template v-for="item in dict.type.sys_audit_result">
|
||||
<van-button @click="doAudit(item)" :type="item.raw.listClass">
|
||||
{{ item.label }}
|
||||
</van-button>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
</info>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import info from "../components/info";
|
||||
export default {
|
||||
components: {
|
||||
info
|
||||
},
|
||||
dicts:['sys_audit_result'],
|
||||
data() {
|
||||
return {
|
||||
formData:{
|
||||
condolenceId:null,
|
||||
userName: this.$store.getters.name,
|
||||
auditTime: this.$moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: null,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doAudit(item){
|
||||
this.$refs.auditForm.validate().then(async () => {
|
||||
const formData = {...this.formData}
|
||||
let url = null
|
||||
switch (item.value){
|
||||
case '1': url = '/staff/condolence/schoolUnionAudit/doPass';break
|
||||
case '2': url = '/staff/condolence/schoolUnionAudit/doReject';break
|
||||
case '3': url = '/staff/condolence/schoolUnionAudit/doBackTo';break
|
||||
}
|
||||
|
||||
this.$modal.confirm(`您确定要${item.label}吗?`).then(async () => {
|
||||
this.$modal.loading()
|
||||
const {msg} = await this.$http.post(url, formData)
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.$modal.closeLoading()
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.navigateBack()
|
||||
}).finally(()=>{
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad({id}){
|
||||
this.formData.condolenceId = id
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="search-wrap">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入慰问对象的姓名及工号进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"/>
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="queryForm.year" :options="yearOption" @change="doSearch"/>
|
||||
<van-dropdown-item v-model="queryForm.type" :options="[{text:'全部类型',value:null}].concat(typeList)" @change="doSearch"/>
|
||||
<van-dropdown-item v-model="queryForm.unionId" :options="[{text:'全部分工会',value:null}].concat(unions)" @change="unionIdChange"/>
|
||||
<van-dropdown-item v-model="queryForm.unitId" :options="[{text:'全部二级单位',value:null}].concat(this.units)" @change="()=>{unitIdChange();doSearch()}"/>
|
||||
<template v-if="config['sys.unionGroup']==='true'">
|
||||
<van-dropdown-item v-model="queryForm.unionGroupId" :options="[{text:'全部工会小组',value:null}].concat(unionGroups)" @change="()=>{unionGroupChange();doSearch()}"/>
|
||||
<van-dropdown-item v-model="queryForm.threeUnitId" :options="[{text:'全部三级单位',value:null}].concat(threeUnits)" @change="doSearch"/>
|
||||
</template>
|
||||
</van-dropdown-menu>
|
||||
{{dropDownUnits}}
|
||||
<van-tabs v-model="isAudit"
|
||||
@change="(name)=>{queryForm.isAudit = name==='0' ? null : name==='1';doSearch()}">
|
||||
<van-tab title="全部" name="0"></van-tab>
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="2"></van-tab>
|
||||
</van-tabs>
|
||||
</view>
|
||||
<van-list
|
||||
v-model="tableLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<view v-for="row in tableData" :key="row.id" class="van-doc-card">
|
||||
<view>
|
||||
<van-cell-group>
|
||||
<van-cell title="慰问对象" :value="row.comfortedPersonUserName"/>
|
||||
<van-cell title="经办人" :value="row.agentUserName"/>
|
||||
<van-cell title="申请时间" :value="row.applyTime"/>
|
||||
<van-cell title="慰问类型" :value="row.typeName"/>
|
||||
<van-cell title="所属工会" :value="row.comfortedPersonUnionName"/>
|
||||
<van-cell title="所属单位" :value="row.comfortedPersonUnitName"/>
|
||||
<van-cell title="工会小组" :value="row.comfortedPersonUnionGroupName"/>
|
||||
<van-cell title="申请状态" :value="row.stateName"/>
|
||||
</van-cell-group>
|
||||
|
||||
<view class="operate">
|
||||
<van-button type="info" size="small" plain @click="$tab.navigateTo(`/pages/condolence/schoolUnionAudit/audit?id=${row.id}`)" v-if="[55].includes(row.stateId)">审核</van-button>
|
||||
<van-button type="danger" size="small" plain @click="doRevoke(row.id)" v-if="[60,65,70].includes(row.stateId)">撤回</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="!tableLoading && tableData.length===0"
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "../../../mixins/initTableMixins";
|
||||
|
||||
export default {
|
||||
mixins:[initTableMixins],
|
||||
configs: ['sys.unionGroup'],
|
||||
data() {
|
||||
return {
|
||||
queryForm: {
|
||||
year: new Date().getFullYear(),
|
||||
type:null,
|
||||
isAudit: false
|
||||
},
|
||||
typeList: [],
|
||||
yearOption:[],
|
||||
isAudit:'2'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getTypes() {
|
||||
const {data} = await this.$http.post('/staff/condolence/type/list', null)
|
||||
data.forEach(v=>{
|
||||
v['text'] = v.typeName
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.typeList = data
|
||||
},
|
||||
pageData() {
|
||||
this.$modal.loading()
|
||||
this.tableLoading = true
|
||||
this.$http.post('/staff/condolence/schoolUnionAudit/pageData', {...this.pageForm, ...this.queryForm}).then(res => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
this.$modal.closeLoading()
|
||||
}).finally(() => {
|
||||
this.tableLoading = false
|
||||
this.finished = true
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
doRevoke(id) {
|
||||
this.$modal.confirm('您确定要撤销吗?').then(async () => {
|
||||
this.$modal.loading()
|
||||
const {msg} = await this.$http.post('/staff/condolence/schoolUnionAudit/doRevoke', null, {
|
||||
params: {id}
|
||||
})
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.doSearch()
|
||||
}).finally(()=>{
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created(){
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.doSearch()
|
||||
this.getTypes()
|
||||
this.getUnions()
|
||||
this.getUnits()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,225 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search @search="doSearch" v-model="queryForm.searchKeyword" placeholder="可输入慰问对象的姓名及工号查询" />
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="queryForm.year" :options="yearList" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.type" :options="typeList" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.unionId" :options="unionList" @change="unionChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.unitId" :options="unitList" @change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="overflow: scroll; height: 100%">
|
||||
<van-list v-model="tableLoading" :finished="finished" @load="pageData"
|
||||
v-if="tableData && tableData.length>0" :finished-text="tableData.length > 0 ? '没有更多了' : ''">
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div class="title" style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="title_span">|</span>
|
||||
<span>{{ o.agentUserName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: #236EB4">{{ o.typeName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<span class="text-grey">慰问对象:</span>
|
||||
<span>{{ o.comfortedPersonUserName + '(' + o.comfortedPersonLoginName + ')' }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-grey">所属工会:</span>
|
||||
<span>{{ o.comfortedPersonUnionName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-grey">工会小组:</span>
|
||||
<span>{{ o.comfortedPersonUnionGroupName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-grey">申请时间:</span>
|
||||
<span>{{ o.applyTime }}</span>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<van-button size="small" type="info" @click="openView(o)">查看</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" style="height: 100%; width: 100%; background-color: #f6f7f9">
|
||||
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="infoShow = false"></van-nav-bar>
|
||||
<info :id="condolenceId"></info>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import info from "../components/info";
|
||||
|
||||
export default {
|
||||
name: 'condolenceSummary',
|
||||
dicts: ['sys_nation', 'sys_user_sex', 'political_status'],
|
||||
components: {info},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
yearList: [],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
typeList: [],
|
||||
queryForm: {
|
||||
year: new Date().getFullYear()
|
||||
},
|
||||
condolenceId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.condolenceId = row.id
|
||||
this.infoShow = true
|
||||
},
|
||||
async pageData() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('/staff/condolence/statistics/query/pageData', { ...this.pageForm, ...this.queryForm })
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
async unionChange() {
|
||||
await this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async getUnions() {
|
||||
const resp = await this.$http.get('/system/union/listUnionByRole')
|
||||
this.unionList = resp.data
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionName
|
||||
v.value = v.id
|
||||
})
|
||||
this.unionList.unshift({
|
||||
text: "全部工会",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getUnits() {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByRole')
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getUnitsByUnionId(unionId) {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
if (this.unitList) {
|
||||
this.$set(this.queryForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.queryForm, "unitId", "")
|
||||
if (this.$auth.hasRoleOr(['admin', 'A06', 'H03'])) {
|
||||
await this.getUnitsByUnionId(this.queryForm.unionId)
|
||||
} else {
|
||||
await this.getUnitsByUnionId(this.$store.state.user.userInfo.union.id)
|
||||
}
|
||||
},
|
||||
async getTypes() {
|
||||
const { data } = await this.$http.post('/staff/condolence/type/list', null)
|
||||
this.typeList = data
|
||||
this.typeList.forEach(v => {
|
||||
v.text = v.typeName
|
||||
v.value = v.id
|
||||
})
|
||||
this.typeList.unshift({
|
||||
text: "全部类型",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({
|
||||
text: i,
|
||||
value: i
|
||||
})
|
||||
}
|
||||
await this.getUnions()
|
||||
await this.getUnits()
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.queryForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.queryForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
await this.getTypes()
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.queryForm, "type", this.typeList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
await this.pageData()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.van-button {
|
||||
width: 56px;
|
||||
height: 26px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<view>
|
||||
<info :id="formData.condolenceId">
|
||||
<view class="van-cell-group__title">
|
||||
工会小组审核
|
||||
</view>
|
||||
<van-form :show-error-message="false" input-align="right" ref="auditForm">
|
||||
<van-cell-group inset>
|
||||
<van-field label="审核人" name="userName" readonly v-model="formData.userName"/>
|
||||
<van-field label="审核时间" name="auditTime" readonly :value="$moment().format('YYYY-MM-DD')"/>
|
||||
<van-field label="审核意见" name="auditOpinion" v-model="formData.opinion"
|
||||
:rules="[{required:true, message: '请输入审核意见'}]"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
placeholder="请输入审核意见"/>
|
||||
<!-- <van-field name="sign.signText" label="签字"-->
|
||||
<!-- :rules="[{required:true, message: '请签字'}]"-->
|
||||
<!-- v-model="formData.sign.signText">-->
|
||||
<!-- <template #input>-->
|
||||
<!-- <Signature v-model="formData.sign.signText"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-field>-->
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
<view class="operate">
|
||||
<template v-for="item in dict.type.sys_audit_result">
|
||||
<van-button @click="doAudit(item)" :type="item.raw.listClass">
|
||||
{{ item.label }}
|
||||
</van-button>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
</info>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import info from "../components/info";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
info
|
||||
},
|
||||
dicts: ['sys_audit_result'],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
condolenceId: null,
|
||||
userName: this.$store.getters.name,
|
||||
auditTime: this.$moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: null,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doAudit(item) {
|
||||
this.$refs.auditForm.validate().then(async () => {
|
||||
const formData = {...this.formData}
|
||||
let url = null
|
||||
switch (item.value) {
|
||||
case '1':
|
||||
url = '/staff/condolence/unionGroupAudit/doPass';
|
||||
break
|
||||
case '2':
|
||||
url = '/staff/condolence/unionGroupAudit/doReject';
|
||||
break
|
||||
case '3':
|
||||
url = '/staff/condolence/unionGroupAudit/doBackTo';
|
||||
break
|
||||
}
|
||||
|
||||
this.$modal.confirm(`您确定要${item.label}吗?`).then(async () => {
|
||||
this.$modal.loading()
|
||||
const {msg} = await this.$http.post(url, formData)
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.$modal.closeLoading()
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.navigateBack()
|
||||
}).finally(() => {
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad({id}) {
|
||||
this.formData.condolenceId = id
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="search-wrap">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入慰问对象的姓名及工号进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"/>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="queryForm.year" :options="yearOption" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="queryForm.type" :options="[{text:'全部类型',value:null}].concat(typeList)"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-tabs v-model="isAudit"
|
||||
@change="(name)=>{queryForm.isAudit = name==='0' ? null : name==='1';doSearch()}">
|
||||
<van-tab title="全部" name="0"></van-tab>
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="2"></van-tab>
|
||||
</van-tabs>
|
||||
</view>
|
||||
<van-list
|
||||
v-model="tableLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<view v-for="row in tableData" :key="row.id" class="van-doc-card">
|
||||
<view>
|
||||
<van-cell-group>
|
||||
<van-cell title="慰问对象" :value="row.comfortedPersonUserName"/>
|
||||
<van-cell title="经办人" :value="row.agentUserName"/>
|
||||
<van-cell title="申请时间" :value="row.applyTime"/>
|
||||
<van-cell title="慰问类型" :value="row.typeName"/>
|
||||
<!-- <van-cell title="所属工会" :value="row.comfortedPersonUnionName"/>-->
|
||||
<van-cell title="所属单位" :value="row.comfortedPersonUnitName"/>
|
||||
<van-cell title="工会小组" :value="row.comfortedPersonUnionGroupName"/>
|
||||
<van-cell title="申请状态" :value="row.stateName"/>
|
||||
</van-cell-group>
|
||||
|
||||
<view class="operate">
|
||||
<van-button type="info" size="small" plain
|
||||
@click="$tab.navigateTo(`/pages/condolence/unionGroupAudit/audit?id=${row.id}`)"
|
||||
v-if="[10].includes(row.stateId)">审核
|
||||
</van-button>
|
||||
<van-button type="danger" size="small" plain @click="doRevoke(row.id)"
|
||||
v-if="[15,20,25].includes(row.stateId)">撤回
|
||||
</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="!tableLoading && tableData.length===0"
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "../../../mixins/initTableMixins";
|
||||
|
||||
export default {
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
queryForm: {
|
||||
year: new Date().getFullYear(),
|
||||
type: null,
|
||||
isAudit: false
|
||||
},
|
||||
typeList: [],
|
||||
yearOption: [],
|
||||
isAudit: '2'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getTypes() {
|
||||
const {data} = await this.$http.post('/staff/condolence/type/list', null)
|
||||
data.forEach(v => {
|
||||
v['text'] = v.typeName
|
||||
v['value'] = v.id
|
||||
})
|
||||
this.typeList = data
|
||||
},
|
||||
pageData() {
|
||||
this.$modal.loading()
|
||||
this.tableLoading = true
|
||||
this.$http.post('/staff/condolence/unionGroupAudit/pageData', {...this.pageForm, ...this.queryForm}).then(res => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length === this.pageForm.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
this.$modal.closeLoading()
|
||||
}).finally(() => {
|
||||
this.tableLoading = false
|
||||
this.finished = true
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
doRevoke(id) {
|
||||
this.$modal.confirm('您确定要撤销吗?').then(async () => {
|
||||
this.$modal.loading()
|
||||
const {msg} = await this.$http.post('/staff/condolence/unionGroupAudit/doRevoke', null, {
|
||||
params: {id}
|
||||
})
|
||||
this.$modal.msgSuccess(msg)
|
||||
this.doSearch()
|
||||
}).finally(() => {
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.getTypes()
|
||||
this.doSearch()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,228 @@
|
||||
<template>
|
||||
|
||||
<div style="padding-bottom: 20px;">
|
||||
|
||||
<van-form readonly input-align="right">
|
||||
<div class="van-cell-group__title">
|
||||
申请信息
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field readonly :value="viewData.applyUserName" label="申请人">
|
||||
<template #label>
|
||||
<span v-html="'申 请 人'"></span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field readonly :value="viewData.applyTime" label="申请时间"></van-field>
|
||||
<van-field readonly :value="viewData.helpUserName" label="受补助人"></van-field>
|
||||
<van-field readonly :value="viewData.idCard" label="身份证号"></van-field>
|
||||
<van-field readonly name="type" :value="viewData.helpSex === '0' ? '男' : '女'" label="性别">
|
||||
<template #label>
|
||||
<span v-html="'性  别'"></span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field readonly name="type" :value="viewData.jobTitle" label="职称">
|
||||
<template #label>
|
||||
<span v-html="'职  称'"></span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field readonly name="type" :value="viewData.position" label="职务">
|
||||
<template #label>
|
||||
<span v-html="'职  务'"></span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field readonly :value="viewData.helpDeptName" label="所属单位"></van-field>
|
||||
<van-field readonly name="way" :value="viewData.helpBirthday" label="出生日期"></van-field>
|
||||
<van-field readonly :value="viewData.mobile" label="手机号码"></van-field>
|
||||
<van-field readonly :value="subsidy[viewData.helpType]" label="补助类型"></van-field>
|
||||
<van-field readonly :value=" sq_knlx[viewData.difficultType] " label="困难类型"></van-field>
|
||||
<van-field readonly :value="viewData.applyReason" label="申请理由" input-align="left"
|
||||
style="flex-flow: column" rows="2" maxlength="200" type="textarea" show-word-limit autosize>
|
||||
</van-field>
|
||||
|
||||
<van-cell class="column-cell">
|
||||
<template #title>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
<FilePreview :files="viewData.files"></FilePreview>
|
||||
</van-cell>
|
||||
|
||||
<van-field name="sign" label="申请人签字">
|
||||
<template #input>
|
||||
<image :src="viewData.applySign" v-if="viewData.applySign !== null"></image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
<template v-if="viewData.unionGroupAuditId">
|
||||
<div class="van-cell-group__title">
|
||||
工会小组审核信息
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div>
|
||||
<van-field label="审核人员" :value="viewData.unionGroupAudit.userName" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.unionGroupAudit.auditTime" left-icon="clock-o" readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.unionGroupAudit.auditOpinion ? viewData.unionGroupAudit.auditOpinion : '暂无'" readonly></van-field>
|
||||
<van-field left-icon="orders-o" name="sign" label="签字">
|
||||
<template #label>
|
||||
<span v-html="'签  字'"></span>
|
||||
</template>
|
||||
<template #input>
|
||||
<image :src="viewData.unionGroupAudit.auditSign"
|
||||
v-if="viewData.unionGroupAudit.auditSign"></image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="viewData.unionAuditId">
|
||||
<div class="van-cell-group__title">
|
||||
分工会审核信息
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div>
|
||||
<van-field label="审核人员" :value="viewData.unionAudit.userName" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.unionAudit.auditTime" left-icon="clock-o" readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.unionAudit.auditOpinion ? viewData.unionAudit.auditOpinion : '暂无'" readonly></van-field>
|
||||
<van-field left-icon="orders-o" name="sign" label="签字">
|
||||
<template #label>
|
||||
<span v-html="'签  字'"></span>
|
||||
</template>
|
||||
<template #input>
|
||||
<image :src="viewData.unionAudit.auditSign"
|
||||
v-if="viewData.unionAudit.auditSign"></image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="viewData.schoolAuditId">
|
||||
<div class="van-cell-group__title">
|
||||
校工会审核信息
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div>
|
||||
<van-field label="审核人员" :value="viewData.schoolAudit.userName" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.schoolAudit.auditTime" left-icon="clock-o" readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.schoolAudit.auditOpinion ? viewData.schoolAudit.auditOpinion : '暂无'" readonly></van-field>
|
||||
<van-field left-icon="orders-o" name="sign" label="签字">
|
||||
<template #label>
|
||||
<span v-html="'签  字'"></span>
|
||||
</template>
|
||||
<template #input>
|
||||
<image :src="viewData.schoolAudit.auditSign"
|
||||
v-if="viewData.schoolAudit.auditSign"></image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'info',
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
sq_knlx: {
|
||||
1: "会员因病住院",
|
||||
2: "家庭重大意外事故",
|
||||
3: "会员去世",
|
||||
4: "重大疾病(癌症)",
|
||||
5: "困难家庭",
|
||||
6: "精神疾病",
|
||||
7: "长期病休",
|
||||
8: "其它"
|
||||
},
|
||||
subsidy: {
|
||||
1: "日常补助慰问",
|
||||
2: "“元旦、春节”困难补助慰问"
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toFormData: (formData) => {
|
||||
formData.type = formData.type + ""
|
||||
formData.way = formData.way + ""
|
||||
if (formData.files) {
|
||||
formData.files = JSON.parse(formData.files)
|
||||
}
|
||||
},
|
||||
async getInfo(id) {
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = await this.$http.get("/staff/difficulty/applyList/findOne/" + id)
|
||||
if (data) {
|
||||
this.toFormData(data)
|
||||
this.viewData = data
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
::v-deep .van-field__control {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 16px !important;
|
||||
text-indent: 4px !important;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
left: 5px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,327 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
:value="$store.state.user.name + '(' + $store.state.user.loginname + ')'"
|
||||
name="sqrname"
|
||||
label="申请人"></van-field>
|
||||
|
||||
<van-field name="apply_mode" label="申请模式">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.applyMode" direction="horizontal" @change="applyModeChange">
|
||||
<van-radio :name="1">本人申请</van-radio>
|
||||
<van-radio :name="2">替他人申请</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field @input="userRemoteMethod" name="helpUserName"
|
||||
v-model="formData.helpUserName" label="受补助人" placeholder="请输入受补助人姓名"
|
||||
:rules="[{ required: true, message: '请填写受补助人姓名' }]"></van-field>
|
||||
|
||||
<van-action-sheet v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = []"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect">
|
||||
</van-action-sheet>
|
||||
<van-field label="身份证号" placeholder="自动回显,如无回显请手动填写" v-model="formData.idCard"></van-field>
|
||||
|
||||
<van-field label="性别" placeholder="自动回显,如无回显请手动填写" v-model="formData.sex">
|
||||
<template #input>
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="formData.sex"></dict-tag>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="职称" placeholder="自动回显,如无回显请手动填写" v-model="formData.jobTitle"></van-field>
|
||||
<van-field label="职务" placeholder="自动回显,如无回显请手动填写" v-model="formData.position"></van-field>
|
||||
|
||||
<van-field label="单位" placeholder="自动回显,如无回显请手动填写" v-model="formData.deptName"></van-field>
|
||||
|
||||
<van-field label="出生日期" placeholder="自动回显,如无回显请手动填写" v-model="formData.birthday"></van-field>
|
||||
|
||||
<van-field label="手机号码" placeholder="自动回显,如无回显请手动填写" v-model="formData.mobile"
|
||||
type="tel"></van-field>
|
||||
|
||||
<van-field name="helpType"
|
||||
@click="sq_bzlxShow = true"
|
||||
:value="formData.helpTypeName" label="补助类型" placeholder="请选择补助类型"></van-field>
|
||||
<van-popup v-model:show="sq_bzlxShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="sq_bzlxList" @confirm="onSq_bzlxConfirm"
|
||||
@cancel="sq_bzlxShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field name="difficultType"
|
||||
@click="sq_knlxShow = true"
|
||||
:value="formData.difficultTypeName" label="困难类型" placeholder="请选择困难类型"></van-field>
|
||||
<van-popup v-model:show="sq_knlxShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="sq_knlxist" @confirm="onSq_knlxConfirm"
|
||||
@cancel="sq_knlxShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<template v-if="formData.difficultType === 1">
|
||||
<van-field label="所在医院" placeholder="请填写所在所在医院" v-model="formData.hospital"></van-field>
|
||||
<van-field label="住院时间" :value="formData.hospitalizedTimeName"
|
||||
placeholder="请填写住院时间"
|
||||
@click="hospitalized_timeShow = true"></van-field>
|
||||
<van-calendar v-model="hospitalized_timeShow" :min-date="new Date('1999-01-01')" :show-confirm="false"
|
||||
type="range"
|
||||
@confirm="onHospitalized_timeConfirm"></van-calendar>
|
||||
</template>
|
||||
|
||||
<van-field v-model="formData.applyReason" name="remark" label="申请理由" style="flex-flow: column"
|
||||
placeholder="请填写申请理由"
|
||||
input-align="left"
|
||||
rows="3" maxlength="200" type="textarea" show-word-limit autosize>
|
||||
<template #label>
|
||||
<div class="mb10">申请事由</div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field name="files" label="附  件" required style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<FileUpload v-model="formData.files" ref="fileUpload"/>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<v-sign v-model="formData.applySign"/>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button @click="onSubmit()" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'difficultyApply',
|
||||
dicts: ['sys_user_sex'],
|
||||
mixins: [initTableMixins],
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
id: '',
|
||||
hospitalized_timeShow: false,
|
||||
sq_bzlxShow: false,
|
||||
sq_bzlxList: [],
|
||||
minDate: {},
|
||||
sq_knlxShow: false,
|
||||
sq_knlxist: [],
|
||||
userList: [],
|
||||
formData: {
|
||||
applyMode: 1
|
||||
},
|
||||
sheetShow: false,
|
||||
files: [],
|
||||
hard1: {
|
||||
1: "会员因病住院",
|
||||
2: "家庭重大意外事故",
|
||||
3: "会员去世",
|
||||
},
|
||||
hard2: {
|
||||
4: "重大疾病(癌症)",
|
||||
5: "困难家庭",
|
||||
6: "精神疾病",
|
||||
7: "长期病休",
|
||||
8: "其它"
|
||||
},
|
||||
subsidy: {
|
||||
1: "日常补助慰问",
|
||||
2: "“元旦、春节”困难补助慰问"
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getHard(sid) {
|
||||
return Number(sid) === 1 ? this.hard1 : this.hard2
|
||||
},
|
||||
onHospitalized_timeConfirm(val) {
|
||||
this.$set(this.formData, "hospitalizedTimeName", moment(val[0]).format('YYYY-MM-DD') + "至" + moment(val[1]).format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, "hospitalizedTime", moment(val[0]).format('YYYY-MM-DD') + "至" + moment(val[1]).format('YYYY-MM-DD'))
|
||||
this.hospitalized_timeShow = false
|
||||
},
|
||||
onSq_bzlxConfirm(val) {
|
||||
this.$set(this.formData, "helpTypeName", val.text)
|
||||
this.$set(this.formData, "helpType", val.value)
|
||||
for (let i in this.getHard(val.value)) {
|
||||
this.sq_knlxist.push({value: i, text: this.getHard(val.value)[i]})
|
||||
}
|
||||
this.$set(this.formData, "difficultTypeName", null)
|
||||
this.$set(this.formData, "difficultType", null)
|
||||
this.sq_bzlxShow = false
|
||||
},
|
||||
onSq_knlxConfirm(val) {
|
||||
this.$set(this.formData, "difficultTypeName", val.text)
|
||||
this.$set(this.formData, "difficultType", val.value)
|
||||
this.sq_knlxShow = false
|
||||
},
|
||||
applyModeChange(val) {
|
||||
if (val === 1) {
|
||||
this.$set(this.formData, 'applyUserId', this.$store.state.user.id)
|
||||
this.$set(this.formData, 'helpUserName', this.$store.state.user.name)
|
||||
this.$set(this.formData, 'sex', this.$store.state.user.userInfo.sex)
|
||||
this.$set(this.formData, 'jobTitle', this.$store.state.user.userInfo.jobTitle)
|
||||
this.$set(this.formData, 'position', this.$store.state.user.userInfo.position)
|
||||
this.$set(this.formData, 'deptName', this.$store.state.user.userInfo.dept.deptName)
|
||||
this.$set(this.formData, 'birthday', this.$store.state.user.userInfo.birthday)
|
||||
this.$set(this.formData, 'mobile', this.$store.state.user.userInfo.mobile)
|
||||
this.$set(this.formData, 'idCard', this.$store.state.user.userInfo.idcard)
|
||||
} else if (val === 2) {
|
||||
if (!this.id) {
|
||||
this.formData = {}
|
||||
this.$set(this.formData, 'applyMode', 2)
|
||||
this.$set(this.formData, 'helpUserName', undefined)
|
||||
}
|
||||
}
|
||||
},
|
||||
async userRemoteMethod(query) {
|
||||
if (query) {
|
||||
const {data} = await this.$http.get("staff/difficulty/apply/querySqr", {
|
||||
params: {
|
||||
key: query
|
||||
}
|
||||
})
|
||||
data.forEach(v => {
|
||||
v.name = v.userName
|
||||
v.subname = v.loginName
|
||||
return v
|
||||
})
|
||||
this.userList = data
|
||||
this.sheetShow = true
|
||||
}
|
||||
},
|
||||
onUserSelect(val) {
|
||||
this.$set(this.formData, 'applyUserId', this.$store.state.user.id)
|
||||
this.$set(this.formData, 'helpUserId', val.id)
|
||||
this.$set(this.formData, 'helpUserName', val.name)
|
||||
this.$set(this.formData, 'mobile', val.mobile)
|
||||
this.$set(this.formData, 'sex', val.sex)
|
||||
this.$set(this.formData, 'idCard', val.idcard)
|
||||
this.$set(this.formData, 'deptName', val.deptName)
|
||||
this.$set(this.formData, 'jobTitle', val.jobTitle)
|
||||
this.$set(this.formData, 'position', val.position)
|
||||
this.$set(this.formData, 'birthday', val.birthday)
|
||||
this.$set(this.formData, "helpTypeName", this.sq_bzlxList[0].text)
|
||||
this.$set(this.formData, "helpType", this.sq_bzlxList[0].value)
|
||||
this.sheetShow = false
|
||||
},
|
||||
|
||||
async onSubmit() {
|
||||
this.$refs['addForm'].validate().then(() => {
|
||||
this.$modal.loading()
|
||||
if (this.formData.applyMode === 1) {
|
||||
this.formData.helpUserId = this.$store.state.user.id
|
||||
}
|
||||
this.$refs.fileUpload.upload().then(() => {
|
||||
this.$http.post('/staff/difficulty/apply/doSubmit', this.formData).then(resp => {
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msgSuccess(resp.msg)
|
||||
this.$modal.closeLoading()
|
||||
setTimeout(() => {
|
||||
if (this.id) {
|
||||
this.$tab.navigateBack()
|
||||
} else {
|
||||
this.$tab.redirectTo('/pages/difficulty/difficultyRecord')
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
})
|
||||
},
|
||||
async getApplyInfo(id) {
|
||||
const {data, code, msg} = await this.$http.get("/staff/difficulty/applyList/findOne/" + id)
|
||||
if (data) {
|
||||
data.applyMode = parseInt(data.applyMode)
|
||||
this.formData = data
|
||||
this.formData.deptName = this.formData.helpDeptName
|
||||
this.formData.helpTypeName = this.sq_bzlxList.find(o => o.value === this.formData.helpType).text
|
||||
const array = this.getHard(this.formData.helpType)
|
||||
for (let i in array) {
|
||||
this.sq_knlxist.push({value: i, text: this.getHard(this.formData.helpType)[i]})
|
||||
}
|
||||
this.formData.difficultTypeName = this.sq_knlxist.find(o => o.value === this.formData.difficultType).text
|
||||
if (this.formData.files && this.formData.files.length > 0) {
|
||||
this.formData.files = JSON.parse(data.files)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i in this.subsidy) {
|
||||
this.sq_bzlxList.push({value: i, text: this.subsidy[i]})
|
||||
}
|
||||
this.$set(this.formData, "helpTypeName", this.sq_bzlxList[0].text)
|
||||
this.$set(this.formData, "helpType", this.sq_bzlxList[0].value)
|
||||
for (let i in this.getHard(this.formData.helpType)) {
|
||||
this.sq_knlxist.push({value: i, text: this.getHard(this.formData.helpType)[i]})
|
||||
}
|
||||
this.formData.apply_time = moment().format('YYYY-MM-DD')
|
||||
if (this.id) {
|
||||
await this.getApplyInfo(this.id)
|
||||
} else {
|
||||
this.applyModeChange(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
::v-deep .van-field__control {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-list v-model="tableLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" @load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openInfo(o.id,o.zt)">
|
||||
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<uni-icons type="person-filled" size="26"
|
||||
style="background-color: #44b887; border-radius: 50%; color: white"></uni-icons>
|
||||
</van-col>
|
||||
<van-col span="11" class="username">
|
||||
{{ o.helpUserName + '(' + o.helpLoginName + ')' }}
|
||||
</van-col>
|
||||
<van-col span="10" class="applyTime">
|
||||
<span>申请时间:{{ o.applyTime }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" style="margin-top: 8px">
|
||||
<van-col span="12">
|
||||
<span>申 请 人:</span>
|
||||
<span>{{ o.applyUserName }}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span>联系方式:</span>
|
||||
<span>{{ o.mobile }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属单位:</span>
|
||||
<span>{{ o.helpDeptName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属工会:</span>
|
||||
<span>{{ o.helpUnionName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>审核状态:</span>
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div style="position: absolute; right: 8px; bottom: 10px">
|
||||
<van-button @click.stop="doDelete(o)" v-if="[200,220,250,280].includes(o.state)" color="#f56c6c" size="small" round style="margin-right: 6px">删除</van-button>
|
||||
<van-button @click.stop="openEdit(o)" v-if="[200,220,250,280].includes(o.state)" color="#1867b0" size="small" round>编辑</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" style="height: 100%; width: 100%; background-color: #f6f7f9">
|
||||
<van-nav-bar title="困难补助申请信息" left-arrow placeholder fixed
|
||||
@click-left="infoShow = false"></van-nav-bar>
|
||||
<info ref="viewInfo"></info>
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import Info from "./common/info.vue";
|
||||
export default {
|
||||
name: 'difficultyRecord',
|
||||
components: {Info},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
visible: true,
|
||||
typeOption: [
|
||||
{value: null, text: '全部'}
|
||||
],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openEdit(o) {
|
||||
this.$tab.navigateTo('/pages/difficulty/difficultyApply?id=' + o.id)
|
||||
},
|
||||
async doDelete(o) {
|
||||
this.$modal.confirm('确定要删除吗?').then(async () => {
|
||||
const resp = await this.$http.post("/staff/difficulty/applyList/doDelete/" + o.id)
|
||||
if (resp.code === 200) {
|
||||
await this.yearChange()
|
||||
this.$modal.msg(resp.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
openInfo(id, state) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.viewInfo.getInfo(id)
|
||||
})
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$http.post('/staff/difficulty/applyList/pageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
await this.pageData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
.info {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info span:nth-of-type(1) {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 12px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__left .van-icon{
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 22px;
|
||||
}
|
||||
::v-deep .van-nav-bar__left {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<info ref="info" :id.sync="id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
校工会审核
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly left-icon="contact"
|
||||
:value="formData.userName"
|
||||
name="userName"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize left-icon="chat-o"
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field required v-model="formData.helpMoney" type="number" label="补助金额"
|
||||
left-icon="gold-coin-o" placeholder="请输入补助金额"></van-field>
|
||||
|
||||
<van-field label="签字" left-icon="orders-o" required>
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<v-sign v-model="formData.auditSign"></v-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">退回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</info>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from 'moment'
|
||||
import Info from "./common/info.vue";
|
||||
|
||||
export default {
|
||||
name: 'difficultySchoolAudit',
|
||||
components: {Info},
|
||||
mixins: [initTableMixins],
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
show: false,
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$modal.msg('请填写审核意见');
|
||||
return
|
||||
}
|
||||
if (!this.formData.helpMoney) {
|
||||
this.$modal.msg('请填写补助金额');
|
||||
return
|
||||
}
|
||||
this.formData.pass = pass
|
||||
const resp = await this.$http.post('staff/difficulty/schoolAudit/doReview', this.formData, {
|
||||
params: {
|
||||
id: this.id,
|
||||
pass: pass,
|
||||
helpMoney: this.formData.helpMoney,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg('审核成功')
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.navigateBack()
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
userName: this.$store.state.user.name,
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: '',
|
||||
auditSign: ""
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getInfo(this.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,290 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange" :options="unionList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange" :options="unitList">
|
||||
</van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-list v-model="tableLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" @load="pageData">
|
||||
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openView(o)">
|
||||
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<uni-icons type="person-filled" size="26"
|
||||
style="background-color: #44b887; border-radius: 50%; color: white"></uni-icons>
|
||||
</van-col>
|
||||
<van-col span="11" class="username">
|
||||
{{ o.helpUserName + '(' + o.helpLoginName + ')' }}
|
||||
</van-col>
|
||||
<van-col span="10" class="applyTime">
|
||||
<span>申请时间:{{ o.applyTime }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" style="margin-top: 8px">
|
||||
<van-col span="12">
|
||||
<span>申 请 人:</span>
|
||||
<span>{{ o.applyUserName }}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span>联系方式:</span>
|
||||
<span>{{ o.mobile }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属单位:</span>
|
||||
<span>{{ o.helpDeptName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属工会:</span>
|
||||
<span>{{ o.helpUnionName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>审核状态:</span>
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div v-if="[280,290,300].includes(o.state)" style="position: absolute; right: 8px; bottom: 10px">
|
||||
<van-button @click.stop="rollBack(o)" color="#1867b0" size="small" round>撤 回</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" style="height: 100%; width: 100%; background-color: #f6f7f9">
|
||||
<van-nav-bar title="困难补助申请信息" left-arrow placeholder fixed
|
||||
@click-left="infoShow = false"></van-nav-bar>
|
||||
<info ref="viewInfo"></info>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import Info from "./common/info.vue";
|
||||
|
||||
export default {
|
||||
name: 'difficultySchoolAudit',
|
||||
components: {Info},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
yearList: [],
|
||||
auditList: [{
|
||||
text: '未审核',
|
||||
value: false
|
||||
},
|
||||
{
|
||||
text: '已审核',
|
||||
value: true
|
||||
},
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async rollBack(row) {
|
||||
this.$modal.confirm('您确定要撤回吗?').then(async () => {
|
||||
const resp = await this.$http.post("/staff/difficulty/schoolAudit/rollBack/" + row.id);
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
this.id = o.id
|
||||
if(o.state === 270) {
|
||||
this.$tab.navigateTo('/pages/difficulty/difficultySchoolAudit?id=' + o.id)
|
||||
} else {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.viewInfo.getInfo(o.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
yearChange() {
|
||||
this.finished = false
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$http.post('/staff/difficulty/schoolAudit/pageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
unitId: this.pageForm.unitId,
|
||||
unionId: this.pageForm.unionId,
|
||||
isAudit: this.pageForm.isAudit,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.$auth.hasRoleOr(['admin', 'A06', 'H03'])) {
|
||||
await this.getUnitsByUnionId(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.getUnitsByUnionId(this.$store.state.user.userInfo.union.id)
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({
|
||||
text: i,
|
||||
value: i
|
||||
})
|
||||
}
|
||||
await this.getUnions()
|
||||
await this.getUnits()
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async getUnions() {
|
||||
const resp = await this.$http.get('/system/union/listUnionByRole')
|
||||
this.unionList = resp.data
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionName
|
||||
v.value = v.id
|
||||
})
|
||||
this.unionList.unshift({
|
||||
text: "全部工会",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
//获取二级单位信息根据权限
|
||||
async getUnits() {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByRole')
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getUnitsByUnionId(unionId) {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
if (this.unitList) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
await this.pageData()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.info {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info span:nth-of-type(1) {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 12px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__left .van-icon{
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 22px;
|
||||
}
|
||||
::v-deep .van-nav-bar__left {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<info ref="info" :id.sync="id" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
分工会审核
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly left-icon="contact"
|
||||
:value="formData.userName"
|
||||
name="userName"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize left-icon="chat-o"
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" left-icon="orders-o" required>
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<v-sign v-model="formData.auditSign"></v-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">退回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</info>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from 'moment'
|
||||
import Info from "./common/info.vue";
|
||||
|
||||
export default {
|
||||
name: 'difficultyUnionAudit',
|
||||
components: {Info},
|
||||
mixins: [initTableMixins],
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
show: false,
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$modal.msg('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.pass = pass
|
||||
const resp = await this.$http.post('staff/difficulty/unionAudit/doReview', this.formData, {
|
||||
params: {
|
||||
id: this.id,
|
||||
pass: pass,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg('审核成功')
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.navigateBack()
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
userName: this.$store.state.user.name,
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: '',
|
||||
auditSign: ""
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getInfo(this.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,290 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange" :options="unionList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange" :options="unitList">
|
||||
</van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-list v-model="tableLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" @load="pageData">
|
||||
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openView(o)">
|
||||
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<uni-icons type="person-filled" size="26"
|
||||
style="background-color: #44b887; border-radius: 50%; color: white"></uni-icons>
|
||||
</van-col>
|
||||
<van-col span="11" class="username">
|
||||
{{ o.helpUserName + '(' + o.helpLoginName + ')' }}
|
||||
</van-col>
|
||||
<van-col span="10" class="applyTime">
|
||||
<span>申请时间:{{ o.applyTime }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" style="margin-top: 8px">
|
||||
<van-col span="12">
|
||||
<span>申 请 人:</span>
|
||||
<span>{{ o.applyUserName }}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span>联系方式:</span>
|
||||
<span>{{ o.mobile }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属单位:</span>
|
||||
<span>{{ o.helpDeptName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属工会:</span>
|
||||
<span>{{ o.helpUnionName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>审核状态:</span>
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div v-if="[250,260,270].includes(o.state)" style="position: absolute; right: 8px; bottom: 10px">
|
||||
<van-button @click.stop="rollBack(o)" color="#1867b0" size="small" round>撤 回</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" style="height: 100%; width: 100%; background-color: #f6f7f9">
|
||||
<van-nav-bar title="困难补助申请信息" left-arrow placeholder fixed
|
||||
@click-left="infoShow = false"></van-nav-bar>
|
||||
<info ref="viewInfo"></info>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import Info from "./common/info.vue";
|
||||
|
||||
export default {
|
||||
name: 'difficultyUnionAuditList',
|
||||
components: {Info},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
yearList: [],
|
||||
auditList: [{
|
||||
text: '未审核',
|
||||
value: false
|
||||
},
|
||||
{
|
||||
text: '已审核',
|
||||
value: true
|
||||
},
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async rollBack(row) {
|
||||
this.$modal.confirm('您确定要撤回吗?').then(async () => {
|
||||
const resp = await this.$http.post("/staff/difficulty/unionAudit/rollBack/" + row.id);
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
this.id = o.id
|
||||
if(o.state === 240) {
|
||||
this.$tab.navigateTo('/pages/difficulty/difficultyUnionAudit?id=' + o.id)
|
||||
} else {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.viewInfo.getInfo(o.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
yearChange() {
|
||||
this.finished = false
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$http.post('/staff/difficulty/unionAudit/pageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
unitId: this.pageForm.unitId,
|
||||
unionId: this.pageForm.unionId,
|
||||
isAudit: this.pageForm.isAudit,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.$auth.hasRoleOr(['admin', 'A06', 'H03'])) {
|
||||
await this.getUnitsByUnionId(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.getUnitsByUnionId(this.$store.state.user.userInfo.union.id)
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({
|
||||
text: i,
|
||||
value: i
|
||||
})
|
||||
}
|
||||
await this.getUnions()
|
||||
await this.getUnits()
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async getUnions() {
|
||||
const resp = await this.$http.get('/system/union/listUnionByRole')
|
||||
this.unionList = resp.data
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionName
|
||||
v.value = v.id
|
||||
})
|
||||
this.unionList.unshift({
|
||||
text: "全部工会",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
//获取二级单位信息根据权限
|
||||
async getUnits() {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByRole')
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getUnitsByUnionId(unionId) {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
if (this.unitList) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
await this.pageData()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.info {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info span:nth-of-type(1) {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 12px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__left .van-icon{
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 22px;
|
||||
}
|
||||
::v-deep .van-nav-bar__left {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<info ref="info" :id.sync="id" title="工会小组审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
工会小组审核
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly left-icon="contact"
|
||||
:value="formData.userName"
|
||||
name="userName"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" left-icon="clock-o" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize left-icon="chat-o"
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" left-icon="orders-o" required>
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<v-sign v-model="formData.auditSign"></v-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">退回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</info>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import moment from 'moment'
|
||||
import Info from "./common/info.vue";
|
||||
|
||||
export default {
|
||||
name: 'difficultyUnionGroupAudit',
|
||||
components: {Info},
|
||||
mixins: [initTableMixins],
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
show: false,
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$modal.msg('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.pass = pass
|
||||
const resp = await this.$http.post('/staff/difficulty/unionGroupAudit/doReview', this.formData, {
|
||||
params: {
|
||||
id: this.id,
|
||||
pass: pass,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg('审核成功')
|
||||
uni.$emit('refreshData', null)
|
||||
this.$tab.navigateBack()
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
userName: this.$store.state.user.name,
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: '',
|
||||
auditSign: ""
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getInfo(this.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,290 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange" :options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange" :options="auditList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange" :options="unionList">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange" :options="unitList">
|
||||
</van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-list v-model="tableLoading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0" @load="pageData">
|
||||
|
||||
<div v-for="o in tableData" class="van-doc-card" @click="openView(o)">
|
||||
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<uni-icons type="person-filled" size="26"
|
||||
style="background-color: #44b887; border-radius: 50%; color: white"></uni-icons>
|
||||
</van-col>
|
||||
<van-col span="11" class="username">
|
||||
{{ o.helpUserName + '(' + o.helpLoginName + ')' }}
|
||||
</van-col>
|
||||
<van-col span="10" class="applyTime">
|
||||
<span>申请时间:{{ o.applyTime }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" style="margin-top: 8px">
|
||||
<van-col span="12">
|
||||
<span>申 请 人:</span>
|
||||
<span>{{ o.applyUserName }}</span>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<span>联系方式:</span>
|
||||
<span>{{ o.mobile }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属单位:</span>
|
||||
<span>{{ o.helpDeptName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>所属工会:</span>
|
||||
<span>{{ o.helpUnionName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>审核状态:</span>
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div v-if="[220,230,240].includes(o.state)" style="position: absolute; right: 8px; bottom: 10px">
|
||||
<van-button @click.stop="rollBack(o)" color="#1867b0" size="small" round>撤 回</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" style="height: 100%; width: 100%; background-color: #f6f7f9">
|
||||
<van-nav-bar title="困难补助申请信息" left-arrow placeholder fixed
|
||||
@click-left="infoShow = false"></van-nav-bar>
|
||||
<info ref="viewInfo"></info>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import Info from "./common/info.vue";
|
||||
export default {
|
||||
name: 'difficultyUnionGroupAuditList',
|
||||
components: {Info},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
yearList: [],
|
||||
auditList: [{
|
||||
text: '未审核',
|
||||
value: false
|
||||
},
|
||||
{
|
||||
text: '已审核',
|
||||
value: true
|
||||
},
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async rollBack(row) {
|
||||
this.$modal.confirm('您确定要撤回吗?').then(async () => {
|
||||
const resp = await this.$http.post("/staff/difficulty/unionGroupAudit/rollBack/" + row.id);
|
||||
if (resp.code === 200) {
|
||||
this.$modal.msg(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
this.id = o.id
|
||||
if(o.state === 210) {
|
||||
this.$tab.navigateTo('/pages/difficulty/difficultyUnionGroupAudit?id=' + o.id)
|
||||
} else {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.viewInfo.getInfo(o.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
yearChange() {
|
||||
this.finished = false
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$http.post('/staff/difficulty/unionGroupAudit/pageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
unitId: this.pageForm.unitId,
|
||||
unionId: this.pageForm.unionId,
|
||||
isAudit: this.pageForm.isAudit,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.$auth.hasRoleOr(['admin', 'A06', 'H03'])) {
|
||||
await this.getUnitsByUnionId(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.getUnitsByUnionId(this.$store.state.user.userInfo.union.id)
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({
|
||||
text: i,
|
||||
value: i
|
||||
})
|
||||
}
|
||||
await this.getUnions()
|
||||
await this.getUnits()
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async getUnions() {
|
||||
const resp = await this.$http.get('/system/union/listUnionByRole')
|
||||
this.unionList = resp.data
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionName
|
||||
v.value = v.id
|
||||
})
|
||||
this.unionList.unshift({
|
||||
text: "全部工会",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
//获取二级单位信息根据权限
|
||||
async getUnits() {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByRole')
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getUnitsByUnionId(unionId) {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
if (this.unitList) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
await this.pageData()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.info {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info span:nth-of-type(1) {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.applyTime {
|
||||
font-size: 12px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
::v-deep .van-nav-bar__left .van-icon{
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 22px;
|
||||
}
|
||||
::v-deep .van-nav-bar__left {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
height: 28px;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<view>
|
||||
<view title="申请信息">
|
||||
<view class="van-cell-group__title">
|
||||
申请信息
|
||||
</view>
|
||||
<van-cell-group inset>
|
||||
|
||||
<template v-if="viewData.honorTypeId === honor_single_id">
|
||||
<van-cell title="申请人" :value="viewData.userName + '(' + viewData.loginname + ')'"/>
|
||||
<van-cell title="申请时间" :value="viewData.applyTime"/>
|
||||
<van-cell title="性别">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="viewData.userSex" />
|
||||
</van-cell>
|
||||
<van-cell title="民族">
|
||||
<dict-tag :options="dict.type.sys_nation" :value="viewData.nation" />
|
||||
</van-cell>
|
||||
<van-cell title="职称" :value="viewData.jobTitle"/>
|
||||
<van-cell title="职务" :value="viewData.position"/>
|
||||
<van-cell title="在职状态">
|
||||
<dict-tag :options="dict.type.user_state" :value="viewData.userState" />
|
||||
</van-cell>
|
||||
<van-cell title="政治面貌">
|
||||
<dict-tag :options="dict.type.political_status" :value="viewData.political" />
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
<van-cell title="所属单位" :value="viewData.unitName"/>
|
||||
<van-cell title="所属工会" :value="viewData.unionName"/>
|
||||
<van-cell title="荣誉类型">
|
||||
<label v-if="viewData.honorTypeId === honor_single_id">个人荣誉</label>
|
||||
<label v-else-if="viewData.honorTypeId === honor_list_id">集体荣誉</label>
|
||||
<label v-else-if="viewData.honorTypeId === honor_workRoom_id">创新工作室</label>
|
||||
</van-cell>
|
||||
|
||||
<template v-if="viewData.honorTypeId === honor_list_id">
|
||||
<van-cell title="申报院级工会" :value="viewData.applyUnionName"/>
|
||||
<van-cell title="工会主席" :value="viewData.unionLeader"/>
|
||||
<van-cell title="教职工总数人数" :value="viewData.unionPeoNum"/>
|
||||
<van-cell title="会员人数" :value="viewData.memberNumber"/>
|
||||
<van-cell title="工会小组数" :value="viewData.unionGroupNumber"/>
|
||||
<van-cell title="分工会委员人数" :value="viewData.leaderNumber"/>
|
||||
</template>
|
||||
|
||||
<van-cell title="审核状态" :value="viewData.stateName"/>
|
||||
<van-cell title="曾受何种奖励" class="long_text_cell" :value="viewData.award"/>
|
||||
<van-cell title="主要事迹" class="long_text_cell" :value="viewData.deeds"/>
|
||||
|
||||
<van-cell title="附件" class="column-cell">
|
||||
<FilePreview :files="viewData.files"/>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
||||
<view title="单位审核信息" v-if="viewData.unitAuditId">
|
||||
<view class="van-cell-group__title">
|
||||
单位审核信息
|
||||
</view>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="审核人" :value="viewData.unitAudit.userName + '-' + viewData.unitAudit.loginName"/>
|
||||
<van-cell title="审核时间" :value="$moment(viewData.unitAudit.auditTime).format('YYYY-MM-DD HH:mm:ss')"/>
|
||||
<van-cell title="审核意见" :value="viewData.unitAudit.auditOpinion"/>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
||||
<view title="分工会审核信息" v-if="viewData.unionAuditId">
|
||||
<view class="van-cell-group__title">
|
||||
分工会审核信息
|
||||
</view>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="审核人" :value="viewData.unionAudit.userName + '-' + viewData.unionAudit.loginName"/>
|
||||
<van-cell title="审核时间" :value="$moment(viewData.unionAudit.auditTime).format('YYYY-MM-DD HH:mm:ss')"/>
|
||||
<van-cell title="审核意见" :value="viewData.unionAudit.auditOpinion"/>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
||||
<view title="基层党组织审核信息" v-if="viewData.partyAuditId">
|
||||
<view class="van-cell-group__title">
|
||||
基层党组织审核信息
|
||||
</view>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="审核人" :value="viewData.partyAudit.userName + '-' + viewData.partyAudit.loginName"/>
|
||||
<van-cell title="审核时间" :value="$moment(viewData.partyAudit.auditTime).format('YYYY-MM-DD HH:mm:ss')"/>
|
||||
<van-cell title="审核意见" :value="viewData.partyAudit.auditOpinion"/>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
||||
<view title="校工会审核信息" v-if="viewData.schoolAuditId">
|
||||
<view class="van-cell-group__title">
|
||||
校工会审核信息
|
||||
</view>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="审核人" :value="viewData.schoolAudit.userName + '-' + viewData.schoolAudit.loginName"/>
|
||||
<van-cell title="审核时间" :value="$moment(viewData.schoolAudit.auditTime).format('YYYY-MM-DD HH:mm:ss')"/>
|
||||
<van-cell title="审核意见" :value="viewData.schoolAudit.auditOpinion"/>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
||||
<slot/>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "evaluateInfo",
|
||||
dicts: ['sys_nation', 'sys_user_sex', 'political_status', 'user_state'],
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabActive: 0,
|
||||
viewData: {},
|
||||
honor_single_id: '8a8b455b964a41f2bbf18a4896cbd83e',
|
||||
honor_list_id: '6b9e26a9467f49ae88fbd3951377e0f8',
|
||||
honor_workRoom_id: '103a47ed06e54dab8195f52741d1df07',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getInfo(id) {
|
||||
this.loading = true
|
||||
const { data } = await this.$http.get('additional/evaluate/applyEvaluate/findOne/' + id)
|
||||
this.loading = false
|
||||
if (data) {
|
||||
this.viewData = data
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
.long_text_cell {
|
||||
display: inline-block;
|
||||
}
|
||||
.long_text_cell .van-cell__value{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,263 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu class="slide-dropdown">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList" @change="getEvaluateByYear"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.evaluateId" :options="evaluateList" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" :options="unionList" @change="unionChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" :options="unitList" @change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.honorType" :options="honorTypeList" @change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<van-notice-bar
|
||||
left-icon="volume-o" mode="closeable"
|
||||
text="温馨提示:左滑上面的条件区域可根据更多的筛选条件查询。"
|
||||
/>
|
||||
|
||||
<div style="overflow: scroll; height: 100%">
|
||||
<van-list v-model="tableLoading" :finished="finished" @load="pageData"
|
||||
v-if="tableData && tableData.length>0" :finished-text="tableData.length > 0 ? '没有更多了' : ''">
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div class="title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{ o.userName + '(' + o.loginname + ')' }}</span>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<span class="text-grey">评优评先:</span>
|
||||
<span>{{ o.evaluateName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-grey">所属单位:</span>
|
||||
<span>{{ o.unitName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-grey">所属工会:</span>
|
||||
<span>{{ o.unionName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-grey">申请时间:</span>
|
||||
<span>{{ o.applyTime }}</span>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<van-button size="small" type="info" @click="openView(o)">查看</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" style="height: 100%; width: 100%; background-color: #f6f7f9">
|
||||
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="infoShow = false"></van-nav-bar>
|
||||
<EvaluateInfo ref="info"></EvaluateInfo>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initTableMixins from "@/mixins/initTableMixins";
|
||||
import EvaluateInfo from "./evaluateInfo.vue";
|
||||
|
||||
export default {
|
||||
name: 'evaluateSummary',
|
||||
dicts: ['sys_nation', 'sys_user_sex', 'political_status'],
|
||||
components: {EvaluateInfo},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
yearList: [],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
honorTypeList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
evaluateList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getInfo(row.id)
|
||||
})
|
||||
},
|
||||
async pageData() {
|
||||
this.tableLoading = true
|
||||
const resp = await this.$http.post('/additional/evaluate/evaluateSummary/pageData', this.pageForm, {
|
||||
params: {
|
||||
year: this.pageForm.year,
|
||||
unitId: this.pageForm.unitId,
|
||||
unionId: this.pageForm.unionId,
|
||||
honorType: this.pageForm.honorType,
|
||||
evaluateId: this.pageForm.evaluateId,
|
||||
}
|
||||
})
|
||||
if (resp.code === 200) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.tableLoading = false
|
||||
},
|
||||
async unionChange() {
|
||||
await this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async getHonorType() {
|
||||
const { data } = await this.$http.get('additional/honor/basicSetting/getData', {
|
||||
params: {
|
||||
parentId: '69dc3d774bf34ccd838a272d7272ae29'
|
||||
}
|
||||
})
|
||||
this.honorTypeList = data
|
||||
this.honorTypeList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
this.honorTypeList.unshift({
|
||||
text: "全部类型",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getEvaluateByYear() {
|
||||
this.evaluateList = []
|
||||
const { data } = await this.$http.get('additional/evaluate/evaluateManage/getEvaluateByYear', {
|
||||
params: {
|
||||
year: this.pageForm.year
|
||||
}
|
||||
})
|
||||
this.evaluateList = data
|
||||
this.evaluateList.forEach(v => {
|
||||
v.text = v.evaluateName
|
||||
v.value = v.evaluateId
|
||||
})
|
||||
this.evaluateList.unshift({
|
||||
text: "全部活动",
|
||||
value: null
|
||||
})
|
||||
if (this.evaluateList && this.evaluateList.length > 0) {
|
||||
this.$set(this.pageForm, 'evaluateId', this.evaluateList[0].value)
|
||||
}
|
||||
},
|
||||
async getUnions() {
|
||||
const resp = await this.$http.get('/system/union/listUnionByRole')
|
||||
this.unionList = resp.data
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionName
|
||||
v.value = v.id
|
||||
})
|
||||
this.unionList.unshift({
|
||||
text: "全部工会",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getUnits() {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByRole')
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
},
|
||||
async getUnitsByUnionId(unionId) {
|
||||
const resp = await this.$http.get('/system/dept/listUnitByUnionId', {
|
||||
params: {
|
||||
unionId
|
||||
}
|
||||
})
|
||||
this.unitList = resp.data
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.deptName
|
||||
v.value = v.deptId
|
||||
})
|
||||
this.unitList.unshift({
|
||||
text: "全部单位",
|
||||
value: null
|
||||
})
|
||||
if (this.unitList) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.$auth.hasRoleOr(['admin', 'A06', 'H03'])) {
|
||||
await this.getUnitsByUnionId(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.getUnitsByUnionId(this.$store.state.user.userInfo.union.id)
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({
|
||||
text: i,
|
||||
value: i
|
||||
})
|
||||
}
|
||||
await this.getUnions()
|
||||
await this.getUnits()
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
await this.getHonorType()
|
||||
if (this.honorTypeList && this.honorTypeList.length > 0) {
|
||||
this.$set(this.pageForm, 'honorType', this.honorTypeList[0].value)
|
||||
}
|
||||
await this.getEvaluateByYear()
|
||||
if (this.evaluateList && this.evaluateList.length > 0) {
|
||||
this.$set(this.pageForm, 'evaluateId', this.evaluateList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.init()
|
||||
await this.pageData()
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('refreshData', res => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.van-button {
|
||||
width: 56px;
|
||||
height: 26px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,184 @@
|
||||
/**
|
||||
*Desc:
|
||||
*Create by: jug
|
||||
*Create time:2023/4/9/17:18
|
||||
*/
|
||||
<template>
|
||||
<view>
|
||||
<van-tabs v-model="tabActive" animated swipeable @change="getActivity" class="tabs">
|
||||
<van-tab name="1" title="最新活动"/>
|
||||
<van-tab name="2" title="历史活动"/>
|
||||
</van-tabs>
|
||||
|
||||
<view class="list-content" v-if="list && list.length>0">
|
||||
<view v-for="item in list" :key="item.id" class="item" @tap="goActivity(item)">
|
||||
<view class="item_image">
|
||||
<image mode="aspectFill" :src="item.surface"></image>
|
||||
</view>
|
||||
<view class="item-name-wrap">
|
||||
<view class="item-icon">
|
||||
<van-icon name="fire-o" size="12px"/>
|
||||
</view>
|
||||
<span>
|
||||
{{ item.mainName }} {{item.branchName || null}}
|
||||
</span>
|
||||
</view>
|
||||
<view class="item-time">
|
||||
报名时间:{{ item.apply_start_time }} 至 {{ item.apply_end_time }}
|
||||
</view>
|
||||
<view class="item-time">
|
||||
活动时间:{{ item.start_time }} 至 {{ item.end_time }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-empty v-else description=""/>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "activity",
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
tabActive: 1,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getActivity() {
|
||||
this.$http.get('/activity/fitnessWalk/h5/activity/pageData', {params: {active: this.tabActive}}).then(res => {
|
||||
this.list = res.data
|
||||
})
|
||||
},
|
||||
goActivity(item) {
|
||||
const {activityModel} = item
|
||||
if(activityModel==='GPS'){
|
||||
this.$tab.navigateTo('/pages/fitnesswalk/gps/index?id=' + item.id)
|
||||
return
|
||||
}
|
||||
|
||||
if (item.enrollCount > 0) {
|
||||
this.$tab.navigateTo('/pages/fitnesswalk/sign?id=' + item.id)
|
||||
}else{
|
||||
this.$tab.navigateTo('/pages/fitnesswalk/enroll?id=' + item.id)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getActivity()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.tabs {
|
||||
position: sticky;
|
||||
top: 44px;
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
.list {
|
||||
width: 100%;
|
||||
min-height: calc(100vh - 300px);
|
||||
position: relative;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.list-content {
|
||||
position: relative;
|
||||
padding: 10px;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
border-radius: 10px;
|
||||
border: 2px solid rgb(245, 245, 245);
|
||||
transition: all 500ms;
|
||||
margin: 5px 0;
|
||||
padding: 20px 15px;
|
||||
background-color: #fff;
|
||||
|
||||
.item-time {
|
||||
font-size: 12px;
|
||||
color: rgb(120, 120, 120);
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.item:active {
|
||||
background-color: rgb(245, 245, 245);
|
||||
}
|
||||
|
||||
.item_left {
|
||||
width: 70%;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.item-name-wrap {
|
||||
display: flex;
|
||||
margin: 15px 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
.item-icon {
|
||||
width: 40px;
|
||||
|
||||
.van-icon-fire-o {
|
||||
vertical-align: text-bottom;
|
||||
height: 21px;
|
||||
border-radius: 10px;
|
||||
background-color: #ff4b5c;
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
color: white;
|
||||
box-sizing: border-box;
|
||||
line-height: 21px;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
width: calc(100% - 50px);
|
||||
max-width: calc(100% - 50px);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.item-desc {
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.item_right {
|
||||
font-size: 14px;
|
||||
float: right;
|
||||
top: -23px;
|
||||
}
|
||||
|
||||
.item_text {
|
||||
display: inline-block;
|
||||
top: -20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.item_image {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.item_image image {
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,314 @@
|
||||
/**
|
||||
*Desc:报名页面
|
||||
*Create by: jug
|
||||
*Create time:2023/4/10/9:41
|
||||
*/
|
||||
<template>
|
||||
<view class="content">
|
||||
<map id="map"
|
||||
class="map"
|
||||
scale="16"
|
||||
:show-location="false"
|
||||
:latitude="location.latitude"
|
||||
:longitude="location.longitude"
|
||||
:markers="markers"
|
||||
:circles="circles"
|
||||
:polyline="polyline"></map>
|
||||
|
||||
<view class="detailCon" :style="{height:`${detailExpand ? '80vh' : '5vh'}`}">
|
||||
<view @click=" detailExpand = !detailExpand"
|
||||
style="height:5vh"
|
||||
:style="{transform:`rotate(${detailExpand ? 0 : 180}deg)`}">
|
||||
<image src="/static/svg/fitnesswalk/down.svg" style="width: 100%;height: 100%"></image>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" style="height:75vh">
|
||||
<view class="detail">
|
||||
<view class="name detail-border">{{ this.activityInfo.name }}</view>
|
||||
<view class="detail-item detail-border">
|
||||
<view class="lh24">
|
||||
<text class="detail-title">报名时间</text>
|
||||
<view class="text">{{ this.activityInfo.apply_start_time }} - {{ this.activityInfo.apply_end_time }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-item detail-border">
|
||||
<view class="lh24">
|
||||
<text class="detail-title">活动时间</text>
|
||||
<view class="text">{{ this.activityInfo.start_time }} - {{ this.activityInfo.end_time }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="detail-item detail-border">
|
||||
<view class="lh24">
|
||||
<text class="detail-title">活动地址</text>
|
||||
<view class="text">{{ this.activityInfo.address }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="detail-item detail-border">
|
||||
<view class="lh24">
|
||||
<text class="detail-title">参与人数</text>
|
||||
<view class="text">{{ registerNum }}人参与</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="detail-item">
|
||||
<view class="lh24">
|
||||
<text class="detail-title">活动介绍</text>
|
||||
<view class="text">
|
||||
<rich-text :nodes="this.activityInfo.note"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view class="bottomCon">
|
||||
<view class="bottom">
|
||||
<van-button custom-class="subBtn" class="bottom-btn" type="info" size="large"
|
||||
:disabled="leaderDis"
|
||||
loading-text="提交中..." @click="subLeader">
|
||||
{{ leaderTxt }}
|
||||
</van-button>
|
||||
<van-button custom-class="subBtn" class="bottom-btn" :disabled="subDis"
|
||||
@tap="doEnroll" type="primary" size="large">
|
||||
{{ subTxt }}
|
||||
</van-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "enroll",
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
location: {
|
||||
latitude: null,
|
||||
longitude: null
|
||||
},
|
||||
markers: [],
|
||||
circles: [],
|
||||
polyline: [],
|
||||
activityInfo: {},
|
||||
leaderDis: false,
|
||||
leaderTxt: '领队请选择',
|
||||
subDis: false,
|
||||
subTxt: '立即报名',
|
||||
detailExpand: true,
|
||||
registerNum: 0,
|
||||
regInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getActivityInfo() {
|
||||
this.$http.get('/activity/fitnessWalk/h5/activity/activityInfo', {params: {id: this.id}}).then(res => {
|
||||
this.activityInfo = res.data
|
||||
this.initMapInfo()
|
||||
})
|
||||
},
|
||||
initMapInfo() {
|
||||
this.location.latitude = this.activityInfo.pts[0].latitude
|
||||
this.location.longitude = this.activityInfo.pts[0].longitude
|
||||
if(this.activityInfo.activityModel==='punch'){
|
||||
this.polyline = [{
|
||||
points: this.activityInfo.linePoints.flatMap(v => {
|
||||
return {longitude: v[0], latitude: v[1]}
|
||||
}),
|
||||
color: '#5192EEFF',
|
||||
width: 5,
|
||||
dottedLine: true,
|
||||
arrowLine: true,
|
||||
}]
|
||||
|
||||
let markers = []
|
||||
this.activityInfo.pts.forEach((pt, index) => {
|
||||
markers.push({
|
||||
id: index,
|
||||
iconPath: '/static/images/fitnesswalk/marker.png',
|
||||
width: 30,
|
||||
height: 30,
|
||||
joinCluster: true,
|
||||
latitude: pt.latitude,
|
||||
longitude: pt.longitude,
|
||||
callout: {
|
||||
content: pt.name,
|
||||
display: 'ALWAYS',
|
||||
padding: 10,
|
||||
borderRadius: 2
|
||||
}
|
||||
})
|
||||
})
|
||||
this.markers = markers
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
subLeader() {
|
||||
|
||||
},
|
||||
getRegisterNum() {
|
||||
this.$http.get('/activity/fitnessWalk/h5/activity/registerNum', {params: {id: this.id}}).then(res => {
|
||||
this.registerNum = res.data
|
||||
})
|
||||
},
|
||||
myRegisterInfo() {
|
||||
this.$http.get('/activity/fitnessWalk/h5/activity/myRegisterInfo', {params: {id: this.id}}).then(res => {
|
||||
this.regInfo = res.data
|
||||
this.subTxt = this.regInfo ? '报名成功' : '立即报名'
|
||||
// this.subDis = this.regInfo != null
|
||||
})
|
||||
},
|
||||
doEnroll() {
|
||||
// const msg = this.regInfo ? '您确定要取消报名吗?' : '您确定要报名吗?'
|
||||
this.$modal.confirm('您确定要报名吗').then(() => {
|
||||
this.$modal.loading()
|
||||
this.$http.get('/activity/fitnessWalk/h5/activity/doEnroll', {params: {id: this.id}}).then(res => {
|
||||
this.$modal.msgSuccess(res.msg)
|
||||
this.myRegisterInfo()
|
||||
this.getRegisterNum()
|
||||
}).finally(()=>{
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this._mapContext = uni.createMapContext("map", this)
|
||||
},
|
||||
onLoad({id}) {
|
||||
this.id = id
|
||||
this.getActivityInfo()
|
||||
this.getRegisterNum()
|
||||
this.myRegisterInfo()
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.detailCon {
|
||||
z-index: 999;
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
width: 100%;
|
||||
height: 80vh;
|
||||
border-radius: 20px 20px 0 0;
|
||||
background-color: #fff;
|
||||
transition: all .6s;
|
||||
}
|
||||
|
||||
.bottomCon {
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: #fff;
|
||||
box-shadow: 2px 2px 5px #000;
|
||||
}
|
||||
|
||||
.bottom-info {
|
||||
display: inline-flex;
|
||||
width: 70%;
|
||||
height: 10vh;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.detail {
|
||||
margin: 0 15px;
|
||||
background-color: #fff;
|
||||
color: black;
|
||||
border-radius: 5px;
|
||||
padding: 15px 15px;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: black;
|
||||
font-size: 20px;
|
||||
font-weight: bolder;
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.detail-border {
|
||||
border-width: 0 0 1px 0;
|
||||
border-style: solid;
|
||||
border-color: #eee;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
.icon,
|
||||
.text {
|
||||
color: black;
|
||||
font-size: 15px;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.lh24 {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.subBtn {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.detail-title {
|
||||
font-size: 13px;
|
||||
color: #38f;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.van-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.detail {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
rich-text .rich-img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,189 @@
|
||||
/**
|
||||
*Desc:
|
||||
*Create by: jug
|
||||
*Create time:2023/4/12/11:46
|
||||
*/
|
||||
<template>
|
||||
<view>
|
||||
<van-tabs v-model="tabActive" animated swipeable @change="listGifts" class="tabs">
|
||||
<van-tab name="1" title="未使用"/>
|
||||
<van-tab name="2" title="已使用"/>
|
||||
</van-tabs>
|
||||
<view class="item-list" v-if="list && list.length>0">
|
||||
<view v-for="item in list" :key="item.id">
|
||||
<view class="item-space">
|
||||
<view class="item-space-top">
|
||||
<view class="item-space-top-left">
|
||||
<image style="width: 3.5rem;height: 3.5rem" src="/static/svg/fitnesswalk/gift1.svg" />
|
||||
<view class="item-space-top-left-desc">
|
||||
<view class="item-space-top-left-name">{{ item.mainName + '-' + item.branchName}}</view>
|
||||
<view class="item-space-top-left-time">
|
||||
<van-tag type="danger" color="#ff6464" v-if="item.grantTime">
|
||||
{{ item.grantTime}}获取
|
||||
</van-tag>
|
||||
<van-tag type="danger" color="#ff6464" v-if="item.useTime">
|
||||
{{ item.useTime}}使用
|
||||
</van-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="dashed">
|
||||
<view class="dashed-left-round"></view>
|
||||
<view class="dashed-view"></view>
|
||||
<view class="dashed-right-round"></view>
|
||||
</view>
|
||||
<view class="item-space-bottom">
|
||||
<view class="item-space-bottom-left">
|
||||
{{item.gift_name}}
|
||||
</view>
|
||||
<view class="item-space-bottom-right">
|
||||
<van-button round type="info" size="small" @tap="goUsed(item)" color="#ff4646" :disabled="item.used">
|
||||
{{item.used?'已使用':'去使用'}}
|
||||
</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-empty v-else description="暂无礼品券"/>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "list",
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
tabActive: 1,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
listGifts() {
|
||||
this.$http.get('/activity/fitnessWalk/h5/gift/gifts', {params: {active: this.tabActive}}).then(res => {
|
||||
this.list = res.data
|
||||
})
|
||||
},
|
||||
goUsed({id,mainName,branchName,activityId}){
|
||||
this.$tab.navigateTo(`/pages/fitnesswalk/gift/receive?giftId=${id}&activityName=${mainName + branchName}&activityId=${activityId}`)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listGifts()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.tabs {
|
||||
position: sticky;
|
||||
top: 44px;
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
|
||||
.item-list {
|
||||
width: 100%;
|
||||
padding: 10px 20px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.item-list item>view {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.item-space {
|
||||
width: 100%;
|
||||
background-color: rgb(245, 245, 245);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.item-space-top {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.item-space-bottom {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.dashed {
|
||||
padding: 0 20px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.dashed .dashed-view {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-image: linear-gradient(to right, #ccc 0%, #ccc 50%, transparent 50%);
|
||||
background-size: 8px 1px;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.dashed-left-round,
|
||||
.dashed-right-round {
|
||||
position: absolute;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
top: -.5rem;
|
||||
border-radius: .5rem;
|
||||
background-color: rgb(245, 245, 245);
|
||||
}
|
||||
|
||||
.dashed-left-round {
|
||||
left: -.5rem;
|
||||
}
|
||||
|
||||
.dashed-right-round {
|
||||
right: -.5rem;
|
||||
}
|
||||
|
||||
|
||||
.item-space-bottom-left {
|
||||
color: rgb(150, 150, 150);
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
.item-space-top-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.item-space-top-left-desc {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.item-space-top-left-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.item-space-top-left-time {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.item-space-top-left-time van-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,254 @@
|
||||
/**
|
||||
*Desc: 领取礼品
|
||||
*Create by: jug
|
||||
*Create time:2023/4/12/8:54
|
||||
*/
|
||||
<template>
|
||||
<view>
|
||||
<view class="top_block">
|
||||
<view class="top_block_content" style="top:44px">
|
||||
<view class="content-top">
|
||||
<image style="width: 4rem;height: 4rem" src="/static/svg/fitnesswalk/qrcode.svg"/>
|
||||
<view class="content-val">
|
||||
<view class="activity_name">{{ activityName }}</view>
|
||||
<view class="grant_time">获取时间:{{ giftInfo.grantTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="content-msg">请前往礼品发放台,向工作人员出示二维码,领取礼品。</view>
|
||||
|
||||
<view class="code-view">
|
||||
<image :src="sellImg" class="code-img"></image>
|
||||
|
||||
<view class="suc-img" v-if="giftInfo.used">
|
||||
<image src="/static/images/fitnesswalk/success.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="dashed">
|
||||
<view class="dashed-left-round"></view>
|
||||
<view class="dashed-view"></view>
|
||||
<view class="dashed-right-round"></view>
|
||||
</view>
|
||||
|
||||
<view class="content-info">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="姓名" :value="userInfo.nickName"/>
|
||||
<van-cell title="工号" :value="userInfo.userName"/>
|
||||
<van-cell title="分工会" :value="userInfo.union ? userInfo.union.unionName : null"/>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="content-btn" v-if="!giftInfo.used">
|
||||
<view @tap="userGiftTicket">手动点击领取</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import jrQrcode from "jr-qrcode"
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "receive",
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
giftId: null,
|
||||
activityId: null,
|
||||
activityName: null,
|
||||
|
||||
giftInfo: {
|
||||
used: false
|
||||
},
|
||||
sellImg: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
methods: {
|
||||
getGiftTicketInfoById() {
|
||||
this.$http.get('/activity/fitnessWalk/h5/gift/giftTicketInfoById', {
|
||||
params: {
|
||||
giftId: this.giftId
|
||||
}
|
||||
}).then(res => {
|
||||
this.giftInfo = res.data
|
||||
})
|
||||
},
|
||||
createQrCode() {
|
||||
this.sellImg = jrQrcode.getQrBase64(this.giftId)
|
||||
},
|
||||
userGiftTicket() {
|
||||
this.$modal.confirm('请确认,是否马上使用?').then(() => {
|
||||
// this.$modal.loading('使用中')
|
||||
this.$http.get('/activity/fitnessWalk/h5/gift/userGiftTicket/' + this.giftId).then(res => {
|
||||
this.getGiftTicketInfoById()
|
||||
this.$modal.msgSuccess("使用成功")
|
||||
}).finally(() => {
|
||||
// setTimeout(() => {
|
||||
// this.$modal.closeLoading()
|
||||
// }, 1000)
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad({giftId, activityName, activityId}) {
|
||||
this.giftId = giftId
|
||||
this.activityId = activityId
|
||||
this.activityName = activityName
|
||||
this.getGiftTicketInfoById()
|
||||
this.createQrCode()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.top_block {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 18rem;
|
||||
background-color: rgb(106, 0, 95);
|
||||
}
|
||||
|
||||
.top_block_content {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
padding: 0 2rem 3rem;
|
||||
}
|
||||
|
||||
.content-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content-val {
|
||||
margin-left: 15px;
|
||||
width: calc(100% - 4rem - 15px);
|
||||
}
|
||||
|
||||
.activity_name {
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.grant_time {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
height: 2.5rem;
|
||||
line-height: 3rem;
|
||||
}
|
||||
|
||||
|
||||
.content {
|
||||
margin-top: 2rem;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 3rem 0 2rem;
|
||||
}
|
||||
|
||||
.content-msg {
|
||||
width: 200px;
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dashed {
|
||||
margin: 3rem 0 1.5rem;
|
||||
width: 100%;
|
||||
padding: 0 20px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dashed .dashed-view {
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background-image: linear-gradient(to right, #ccc 0%, #ccc 50%, transparent 50%);
|
||||
background-size: 8px 2px;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.dashed-left-round,
|
||||
.dashed-right-round {
|
||||
position: absolute;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
top: -1rem;
|
||||
border-radius: 1rem;
|
||||
background-color: rgb(245, 245, 245);
|
||||
}
|
||||
|
||||
.dashed-left-round {
|
||||
left: -1rem;
|
||||
}
|
||||
|
||||
.dashed-right-round {
|
||||
right: -1rem;
|
||||
}
|
||||
|
||||
|
||||
.content-info {
|
||||
width: 100%;
|
||||
line-height: 30px;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.content-btn {
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
color: rgb(106, 0, 95);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.code-view {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.suc-img {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: white;
|
||||
opacity: .95;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.suc-img image {
|
||||
width: 60%;
|
||||
height: 60%;
|
||||
}
|
||||
|
||||
.code-img {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user