初始化仓库:导入叫乘管理系统前后端既有代码
- YktVue:Vue 2 + Element UI 前端工程(叫乘、记录管理、征创等模块) - yktgl:Spring Boot + MyBatis 后端服务,含手动数据库变更脚本、WSDL 与静态资源 - 新增根目录 .gitignore,排除 node_modules、target 等依赖与构建产物
This commit is contained in:
commit
135a1925ac
1100 files changed
+124559
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# 告诉EditorConfig插件,这是根文件,不用继续往上查找
|
||||
root = true
|
||||
|
||||
# 匹配全部文件
|
||||
[*]
|
||||
# 设置字符集
|
||||
charset = utf-8
|
||||
# 缩进风格,可选space、tab
|
||||
indent_style = space
|
||||
# 缩进的空格数
|
||||
indent_size = 2
|
||||
# 结尾换行符,可选lf、cr、crlf
|
||||
end_of_line = lf
|
||||
# 在文件结尾插入新行
|
||||
insert_final_newline = true
|
||||
# 删除一行中的前后空格
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# 匹配md结尾的文件
|
||||
[*.md]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
||||
@@ -0,0 +1,12 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 叫乘系统
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
# 开发环境接口
|
||||
# VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_BASE_API = '/yktgl'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
@@ -0,0 +1,8 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 叫乘系统
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 生产环境接口
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
@@ -0,0 +1,10 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 叫乘系统
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# 测试环境接口
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
@@ -0,0 +1,10 @@
|
||||
# 忽略build目录下类型为js的文件的语法检查
|
||||
build/*.js
|
||||
# 忽略src/assets目录下文件的语法检查
|
||||
src/assets
|
||||
# 忽略public目录下文件的语法检查
|
||||
public
|
||||
# 忽略当前目录下为js的文件的语法检查
|
||||
*.js
|
||||
# 忽略当前目录下为vue的文件的语法检查
|
||||
*.vue
|
||||
@@ -0,0 +1,199 @@
|
||||
// ESlint 检查配置
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true,
|
||||
},
|
||||
extends: ['plugin:vue/recommended', 'eslint:recommended'],
|
||||
|
||||
// add your custom rules here
|
||||
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||
rules: {
|
||||
"vue/max-attributes-per-line": [2, {
|
||||
"singleline": 10,
|
||||
"multiline": {
|
||||
"max": 1,
|
||||
"allowFirstLine": false
|
||||
}
|
||||
}],
|
||||
"vue/singleline-html-element-content-newline": "off",
|
||||
"vue/multiline-html-element-content-newline":"off",
|
||||
"vue/name-property-casing": ["error", "PascalCase"],
|
||||
"vue/no-v-html": "off",
|
||||
'accessor-pairs': 2,
|
||||
'arrow-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'block-spacing': [2, 'always'],
|
||||
'brace-style': [2, '1tbs', {
|
||||
'allowSingleLine': true
|
||||
}],
|
||||
'camelcase': [0, {
|
||||
'properties': 'always'
|
||||
}],
|
||||
'comma-dangle': [2, 'never'],
|
||||
'comma-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'comma-style': [2, 'last'],
|
||||
'constructor-super': 2,
|
||||
'curly': [2, 'multi-line'],
|
||||
'dot-location': [2, 'property'],
|
||||
'eol-last': 2,
|
||||
'eqeqeq': ["error", "always", {"null": "ignore"}],
|
||||
'generator-star-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'handle-callback-err': [2, '^(err|error)$'],
|
||||
'indent': [2, 2, {
|
||||
'SwitchCase': 1
|
||||
}],
|
||||
'jsx-quotes': [2, 'prefer-single'],
|
||||
'key-spacing': [2, {
|
||||
'beforeColon': false,
|
||||
'afterColon': true
|
||||
}],
|
||||
'keyword-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'new-cap': [2, {
|
||||
'newIsCap': true,
|
||||
'capIsNew': false
|
||||
}],
|
||||
'new-parens': 2,
|
||||
'no-array-constructor': 2,
|
||||
'no-caller': 2,
|
||||
'no-console': 'off',
|
||||
'no-class-assign': 2,
|
||||
'no-cond-assign': 2,
|
||||
'no-const-assign': 2,
|
||||
'no-control-regex': 0,
|
||||
'no-delete-var': 2,
|
||||
'no-dupe-args': 2,
|
||||
'no-dupe-class-members': 2,
|
||||
'no-dupe-keys': 2,
|
||||
'no-duplicate-case': 2,
|
||||
'no-empty-character-class': 2,
|
||||
'no-empty-pattern': 2,
|
||||
'no-eval': 2,
|
||||
'no-ex-assign': 2,
|
||||
'no-extend-native': 2,
|
||||
'no-extra-bind': 2,
|
||||
'no-extra-boolean-cast': 2,
|
||||
'no-extra-parens': [2, 'functions'],
|
||||
'no-fallthrough': 2,
|
||||
'no-floating-decimal': 2,
|
||||
'no-func-assign': 2,
|
||||
'no-implied-eval': 2,
|
||||
'no-inner-declarations': [2, 'functions'],
|
||||
'no-invalid-regexp': 2,
|
||||
'no-irregular-whitespace': 2,
|
||||
'no-iterator': 2,
|
||||
'no-label-var': 2,
|
||||
'no-labels': [2, {
|
||||
'allowLoop': false,
|
||||
'allowSwitch': false
|
||||
}],
|
||||
'no-lone-blocks': 2,
|
||||
'no-mixed-spaces-and-tabs': 2,
|
||||
'no-multi-spaces': 2,
|
||||
'no-multi-str': 2,
|
||||
'no-multiple-empty-lines': [2, {
|
||||
'max': 1
|
||||
}],
|
||||
'no-native-reassign': 2,
|
||||
'no-negated-in-lhs': 2,
|
||||
'no-new-object': 2,
|
||||
'no-new-require': 2,
|
||||
'no-new-symbol': 2,
|
||||
'no-new-wrappers': 2,
|
||||
'no-obj-calls': 2,
|
||||
'no-octal': 2,
|
||||
'no-octal-escape': 2,
|
||||
'no-path-concat': 2,
|
||||
'no-proto': 2,
|
||||
'no-redeclare': 2,
|
||||
'no-regex-spaces': 2,
|
||||
'no-return-assign': [2, 'except-parens'],
|
||||
'no-self-assign': 2,
|
||||
'no-self-compare': 2,
|
||||
'no-sequences': 2,
|
||||
'no-shadow-restricted-names': 2,
|
||||
'no-spaced-func': 2,
|
||||
'no-sparse-arrays': 2,
|
||||
'no-this-before-super': 2,
|
||||
'no-throw-literal': 2,
|
||||
'no-trailing-spaces': 2,
|
||||
'no-undef': 2,
|
||||
'no-undef-init': 2,
|
||||
'no-unexpected-multiline': 2,
|
||||
'no-unmodified-loop-condition': 2,
|
||||
'no-unneeded-ternary': [2, {
|
||||
'defaultAssignment': false
|
||||
}],
|
||||
'no-unreachable': 2,
|
||||
'no-unsafe-finally': 2,
|
||||
'no-unused-vars': [2, {
|
||||
'vars': 'all',
|
||||
'args': 'none'
|
||||
}],
|
||||
'no-useless-call': 2,
|
||||
'no-useless-computed-key': 2,
|
||||
'no-useless-constructor': 2,
|
||||
'no-useless-escape': 0,
|
||||
'no-whitespace-before-property': 2,
|
||||
'no-with': 2,
|
||||
'one-var': [2, {
|
||||
'initialized': 'never'
|
||||
}],
|
||||
'operator-linebreak': [2, 'after', {
|
||||
'overrides': {
|
||||
'?': 'before',
|
||||
':': 'before'
|
||||
}
|
||||
}],
|
||||
'padded-blocks': [2, 'never'],
|
||||
'quotes': [2, 'single', {
|
||||
'avoidEscape': true,
|
||||
'allowTemplateLiterals': true
|
||||
}],
|
||||
'semi': [2, 'never'],
|
||||
'semi-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'space-before-blocks': [2, 'always'],
|
||||
'space-before-function-paren': [2, 'never'],
|
||||
'space-in-parens': [2, 'never'],
|
||||
'space-infix-ops': 2,
|
||||
'space-unary-ops': [2, {
|
||||
'words': true,
|
||||
'nonwords': false
|
||||
}],
|
||||
'spaced-comment': [2, 'always', {
|
||||
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
|
||||
}],
|
||||
'template-curly-spacing': [2, 'never'],
|
||||
'use-isnan': 2,
|
||||
'valid-typeof': 2,
|
||||
'wrap-iife': [2, 'any'],
|
||||
'yield-star-spacing': [2, 'both'],
|
||||
'yoda': [2, 'never'],
|
||||
'prefer-const': 2,
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'object-curly-spacing': [2, 'always', {
|
||||
objectsInObjects: false
|
||||
}],
|
||||
'array-bracket-spacing': [2, 'never']
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
@@ -0,0 +1,24 @@
|
||||
# ykt
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
||||
Generated
+33260
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"name": "ykt",
|
||||
"version": "3.8.6",
|
||||
"description": "ykt",
|
||||
"author": "yanfa",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "node --openssl-legacy-provider ./node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
|
||||
"build:prod": "node --openssl-legacy-provider ./node_modules/@vue/cli-service/bin/vue-cli-service.js build",
|
||||
"build:stage": "node --openssl-legacy-provider ./node_modules/@vue/cli-service/bin/vue-cli-service.js build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{js,vue}": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
"admin",
|
||||
"dashboard",
|
||||
"element-ui",
|
||||
"boilerplate",
|
||||
"admin-template",
|
||||
"management-system"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"axios": "0.24.0",
|
||||
"clipboard": "2.0.8",
|
||||
"core-js": "3.25.3",
|
||||
"echarts": "5.4.0",
|
||||
"element-ui": "2.15.13",
|
||||
"file-saver": "2.0.5",
|
||||
"fuse.js": "6.4.3",
|
||||
"highlight.js": "9.18.5",
|
||||
"js-beautify": "1.13.0",
|
||||
"js-cookie": "3.0.1",
|
||||
"jsencrypt": "3.0.0-rc.1",
|
||||
"nprogress": "0.2.0",
|
||||
"quill": "1.3.7",
|
||||
"screenfull": "5.0.2",
|
||||
"sortablejs": "1.10.2",
|
||||
"vue": "2.6.12",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-cropper": "0.5.5",
|
||||
"vue-meta": "2.4.0",
|
||||
"vue-router": "3.4.9",
|
||||
"vuedraggable": "2.24.3",
|
||||
"vuex": "3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "4.4.6",
|
||||
"@vue/cli-plugin-eslint": "4.4.6",
|
||||
"@vue/cli-service": "4.4.6",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||
"chalk": "4.1.0",
|
||||
"compression-webpack-plugin": "5.0.2",
|
||||
"connect": "3.6.6",
|
||||
"eslint": "7.15.0",
|
||||
"eslint-plugin-vue": "7.2.0",
|
||||
"lint-staged": "10.5.3",
|
||||
"runjs": "4.4.2",
|
||||
"sass": "1.32.13",
|
||||
"sass-loader": "10.1.1",
|
||||
"script-ext-html-webpack-plugin": "2.1.5",
|
||||
"svg-sprite-loader": "5.1.1",
|
||||
"vue-template-compiler": "2.6.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16 <19",
|
||||
"npm": ">=8 <11"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// 自动获取当前访问的域名和端口,适配所有部署环境
|
||||
// 打包后部署,自动使用当前访问的地址(本地或远程都适用)
|
||||
apiRoot = window.location.host; // 自动使用当前访问的服务器地址和端口
|
||||
// apiRoot = '127.0.0.1:8081'; // 本地调试时可手动启用
|
||||
//apiRoot = '127.0.0.1:8081';
|
||||
|
||||
// 如果需要手动指定地址(仅开发调试时使用),取消下面某行注释
|
||||
// apiRoot='10.32.72.211:8081';
|
||||
// apiRoot='10.32.72.165:8081';
|
||||
// apiRoot='10.32.205.183:8081';
|
||||
|
||||
// 动态获取gyid,优先从localStorage读取登录用户名,否则使用默认值
|
||||
gyid = localStorage.getItem('gyid') || 'TLXC';
|
||||
|
||||
// WebSocket URL 生成函数
|
||||
// 根据当前页面协议(http/https)自动选择 ws/wss
|
||||
// 使用方法:getWebSocketUrl('/yktgl/jlwebsocket/TLXC')
|
||||
function getWebSocketUrl(path) {
|
||||
var wsProtocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
|
||||
return wsProtocol + window.location.host + path;
|
||||
}
|
||||
|
||||
// 盘锦行车公寓
|
||||
// apiRoot='10.32.9.26:8082';
|
||||
// gyid = 'PJXC';
|
||||
|
||||
// 苏家屯行车公寓
|
||||
// apiRoot='10.32.115.216:8083';
|
||||
// gyid = 'SJTXC';
|
||||
|
||||
// 苏家屯行车公寓
|
||||
// apiRoot='10.32.115.166:8083';
|
||||
// gyid = 'SJTXC';
|
||||
|
||||
// 盘锦行车公寓
|
||||
// apiRoot='10.32.115.166:8084';
|
||||
// gyid = 'PJXC';
|
||||
|
||||
// 鲅鱼圈行车公寓
|
||||
// apiRoot='10.32.115.166:8085';
|
||||
// gyid = 'BYQXC';
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<script src="<%= BASE_URL %>config.js?v=<%=new Date().getTime()%>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<!-- 各跳转界面 -->
|
||||
<!-- 例子如下 -->
|
||||
<!-- <el-button type="primary" @click="gotoAboutPage">media</el-button>
|
||||
<el-button type="primary" @click="gotoAbout">mediaAudio</el-button>
|
||||
<el-button type="primary" @click="gotoHome">Home</el-button>
|
||||
<el-button type="primary" @click="gotoTest">Test</el-button> -->
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
// name: 'App'
|
||||
methods:{
|
||||
gotoAboutPage(){
|
||||
this.$router.push('/media');
|
||||
},
|
||||
gotoAbout() {
|
||||
this.$router.push('/mediaAudio');
|
||||
},
|
||||
gotoHome() {
|
||||
this.$router.push('/home');
|
||||
},
|
||||
gotoTest() {
|
||||
this.$router.push('/test');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
3
|
||||
@@ -0,0 +1,407 @@
|
||||
import request from '@/utils/request'
|
||||
import fileRequest from '@/utils/fileRequest'
|
||||
|
||||
export function getLatestSyncTime() {
|
||||
return request({
|
||||
url: '/jcgl/getLatestSyncTime',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getRecordingConfig() {
|
||||
return request({
|
||||
url: '/jcgl/getRecordingConfig',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getJcxxByRyid(ryid) {
|
||||
return request({
|
||||
url: '/jcgl/getJcxxByRyid',
|
||||
method: 'post',
|
||||
params: {
|
||||
ryid:ryid
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getJlxxList(params) {
|
||||
return request({
|
||||
url: '/jcgl/getJlxxList',
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
export function updateMeal3(params) {
|
||||
return request({
|
||||
url: '/jcgl/updateMeal3',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export function getRoomList(params) {
|
||||
return request({
|
||||
url: '/jcgl/getRoomList',
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
export function getRoomRecommendations(params) {
|
||||
return request({
|
||||
url: '/jcgl/getRoomRecommendations',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export function startRoomCleaning(roomno, gyid) {
|
||||
var date = new Date();
|
||||
const y = date.getFullYear();
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const d = String(date.getDate()).padStart(2, '0');
|
||||
const h = String(date.getHours()).padStart(2, '0');
|
||||
const mm = String(date.getMinutes()).padStart(2, '0');
|
||||
const s = String(date.getSeconds()).padStart(2, '0');
|
||||
return request({
|
||||
url: '/clean/startCleaning',
|
||||
method: 'post',
|
||||
data: {
|
||||
'roomNumber': roomno,
|
||||
'ryid': gyid,
|
||||
'startTime': `${y}-${m}-${d} ${h}:${mm}:${s}`,
|
||||
'deviceCode': "123123"
|
||||
}
|
||||
})
|
||||
}
|
||||
export function endRoomCleaning(roomno, gyid) {
|
||||
var date = new Date();
|
||||
const y = date.getFullYear();
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const d = String(date.getDate()).padStart(2, '0');
|
||||
const h = String(date.getHours()).padStart(2, '0');
|
||||
const mm = String(date.getMinutes()).padStart(2, '0');
|
||||
const s = String(date.getSeconds()).padStart(2, '0');
|
||||
return request({
|
||||
url: '/clean/endCleaning',
|
||||
method: 'post',
|
||||
data: {
|
||||
'roomNumber': roomno,
|
||||
'ryid': gyid,
|
||||
'endTime': `${y}-${m}-${d} ${h}:${mm}:${s}`,
|
||||
'deviceCode': "123123"
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
export function submitAll(params) {
|
||||
return request({
|
||||
url: '/jcgl/submitAll',
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
export function getBtje_info(params) {
|
||||
return request({
|
||||
url: '/jcgl/getBtje_info',
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
export function getRyXxByRyId(ryid) {
|
||||
return request({
|
||||
url: '/jcgl/getRyxxByRyId',
|
||||
method: 'post',
|
||||
params:{
|
||||
ryid:ryid
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getBtje_infoMeal3(ryid) {
|
||||
return request({
|
||||
url: '/jcgl/getBtje_infoMeal3',
|
||||
method: 'post',
|
||||
params:{
|
||||
ryid:ryid
|
||||
}
|
||||
})
|
||||
}
|
||||
export function jcAlarm(data,gyid) {
|
||||
return request({
|
||||
url: '/jcgl/jcAlarm',
|
||||
method: 'post',
|
||||
data: data,
|
||||
params: {'gyid': gyid}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function login(username,password) {
|
||||
return request({
|
||||
url: '/auth/login',
|
||||
method: 'get',
|
||||
params: {'username': username,'password': password}
|
||||
})
|
||||
}
|
||||
|
||||
export function getJcXxList(data){
|
||||
return request({
|
||||
url: '/jcgl/getCcJcXx',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getJcXxList_Ls(data){
|
||||
return request({
|
||||
url: '/jcgl/getCcJcXx_Ls',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function modifyJcXx(data){
|
||||
return request({
|
||||
url: '/jcgl/modifyJcXx',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function handleCheckOut(data){
|
||||
return request({
|
||||
url: '/jcgl/handleCheckOut',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function cancelTrainAssignment(data){
|
||||
return request({
|
||||
url: '/jcgl/cancelTrainAssignment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getZbyList(){
|
||||
return request({
|
||||
url: '/jcgl/getZbyList',
|
||||
method: 'get',
|
||||
params: {}
|
||||
})
|
||||
}
|
||||
|
||||
export function getGzList(){
|
||||
return request({
|
||||
url: '/jcgl/getGzList',
|
||||
method: 'get',
|
||||
params: {}
|
||||
})
|
||||
}
|
||||
|
||||
export function modifyRyXx(data,code){
|
||||
return request({
|
||||
url: '/jcgl/modifyRyXx',
|
||||
method: 'post',
|
||||
data: data,
|
||||
params:{code:code}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteRyXx(ryid){
|
||||
return request({
|
||||
url: '/jcgl/deleteRyXx',
|
||||
method: 'post',
|
||||
params:{ryid:ryid}
|
||||
})
|
||||
}
|
||||
|
||||
export function isHoliday(){
|
||||
return request({
|
||||
url: '/jcgl/isHoliday',
|
||||
method: 'get',
|
||||
params: {}
|
||||
})
|
||||
}
|
||||
|
||||
export function modifyRoomStatus(gyid,fjh,zt){
|
||||
return request({
|
||||
url: '/jcgl/modifyRoomStatus',
|
||||
method: 'get',
|
||||
params: {
|
||||
gyid: gyid,
|
||||
fjh: fjh,
|
||||
zt: zt
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function handleRecharge(data){
|
||||
return request({
|
||||
url: '/recharge/handleRecharge',
|
||||
method: 'get',
|
||||
params: {
|
||||
id: data.id,
|
||||
ryid: data.ryid,
|
||||
czje: data.czje,
|
||||
deviceCode:data.deviceCode
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getSynJcXx(pageNum,pageSize,cc,jch,jhcqdd,ryxm,jcfs){
|
||||
return request({
|
||||
url: '/jcgl/getSynJcXx',
|
||||
method: 'get',
|
||||
params: {
|
||||
pageNum: pageNum,
|
||||
pageSize: pageSize,
|
||||
cc:cc,
|
||||
jch:jch,
|
||||
jhcqdd:jhcqdd,
|
||||
ryxm:ryxm,
|
||||
jcfs:jcfs
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function handleTempCalling(data){
|
||||
return request({
|
||||
url: '/jcgl/handleTempCalling',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function handleRoomCall(data, method=1) {
|
||||
if (method == 1){
|
||||
return request(
|
||||
{
|
||||
url: "/jcgl/handleRoomCall",
|
||||
method: 'post',
|
||||
data:data
|
||||
}
|
||||
);
|
||||
}else if (method == 2){
|
||||
return request(
|
||||
{
|
||||
url: "/jcgl/handleRoomCall2",
|
||||
method: 'post',
|
||||
data:data
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export function handleMultiRoomCall(roomNos) {
|
||||
return request({
|
||||
url: '/jcgl/handleMultiRoomCall',
|
||||
method: 'post',
|
||||
data: roomNos
|
||||
})
|
||||
}
|
||||
|
||||
export function handleMultiRoomCallEnd(roomNos) {
|
||||
return request({
|
||||
url: '/jcgl/handleMultiRoomCallEnd',
|
||||
method: 'post',
|
||||
data: roomNos
|
||||
})
|
||||
}
|
||||
|
||||
export function handleRoomCallEnd(data, method) {
|
||||
if (method == 2){
|
||||
return request({
|
||||
url: '/jcgl/handleRoomCallEnd2',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}else{
|
||||
return request({
|
||||
url: '/jcgl/handleRoomCallEnd',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function getWslRyXx(data){
|
||||
return request({
|
||||
url: '/jcgl/getWslRyXx',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getRyFjXx(data){
|
||||
return request({
|
||||
url: '/jcgl/getRyFjXx',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function exchangeRoom(data){
|
||||
return request({
|
||||
url: '/jcgl/exchangeRoom',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function handleStopCalling(data){
|
||||
return request({
|
||||
url: '/jcgl/handleStopCalling',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDeviceStatusInfo(data) {
|
||||
return request({
|
||||
url: '/heartBeat/getDeviceStatusInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function exportJcXxExcell() {
|
||||
return fileRequest({
|
||||
url: '/excel/exportJcXxExcell',
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
params:{}
|
||||
})
|
||||
}
|
||||
|
||||
export function getSynJcXxIsOffline(data) {
|
||||
return request({
|
||||
url: '/jwDataLog/getSynJcXxIsOffline',
|
||||
method: 'post',
|
||||
data: {}
|
||||
})
|
||||
}
|
||||
|
||||
export function getSjgz() {
|
||||
return request({
|
||||
url: '/jcgl/getSjgz',
|
||||
method: 'get',
|
||||
params: {}
|
||||
})
|
||||
}
|
||||
|
||||
export function getJlXxJcsjList(kcrq) {
|
||||
return request({
|
||||
url: '/jlgl/getJlXxJcsjList',
|
||||
method: 'post',
|
||||
params: {
|
||||
kcrq: kcrq
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import request from '@/utils/request'
|
||||
export function addJlXx(data) {
|
||||
return request({
|
||||
url: '/jlgl/addJlXx',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function modifyJlXx(data) {
|
||||
return request({
|
||||
url: '/jlgl/modifyJlXx',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getJlXxList(data) {
|
||||
return request({
|
||||
url: '/jlgl/getJlXxList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function delJlXx(data) {
|
||||
return request({
|
||||
url: '/jlgl/delJlXx',
|
||||
method: 'post',
|
||||
params: {id:data}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteJlXx(data) {
|
||||
return request({
|
||||
url: '/jlgl/deleteJlXx',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function uploadFileDate(formdata) {
|
||||
const t1 = formdata.entries();
|
||||
const t2 = Array.from(t1);
|
||||
return request({
|
||||
url: "/jlgl/uploadJlXx",
|
||||
method: "post",
|
||||
data:formdata
|
||||
});
|
||||
}
|
||||
|
||||
export function confirmJlXx(ids) {
|
||||
return request({
|
||||
url: "/jlgl/confirmJlXx",
|
||||
method: "get",
|
||||
params: {
|
||||
ids: ids,
|
||||
qr_fcd: '',
|
||||
qr_gy: '1'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
url: '/auth/captchaImage',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000
|
||||
})
|
||||
}
|
||||
|
||||
// 用户登录
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: '/auth/logon',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
params: {
|
||||
username: data.username,
|
||||
password: data.password
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//查询数据
|
||||
export function getMeals(query) {
|
||||
return request({
|
||||
url: "/Meals/getMeals",
|
||||
method: "get",
|
||||
params:
|
||||
query,
|
||||
});
|
||||
}
|
||||
|
||||
//订单===============================================================================
|
||||
export function createOrder(form) {
|
||||
return request({
|
||||
url: "/Meals/createOrder",
|
||||
method: "post",
|
||||
params: form
|
||||
});
|
||||
}
|
||||
|
||||
export function addOrders_MX(form) {
|
||||
return request({
|
||||
url: "/Meals/addOrders_MX",
|
||||
method: "post",
|
||||
params: form
|
||||
});
|
||||
}
|
||||
|
||||
export function OrdersSearch(query) {
|
||||
return request({
|
||||
url: "/Meals/OrdersSearch",
|
||||
method: "get",
|
||||
params:
|
||||
query,
|
||||
});
|
||||
}
|
||||
|
||||
export function OrderMX_search(lsh) {
|
||||
return request({
|
||||
url: "/Meals/OrderMX_search",
|
||||
method: "get",
|
||||
params:{
|
||||
lsh:lsh,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function updateStatus(order_id) {
|
||||
return request({
|
||||
url: "/Meals/updateStatus",
|
||||
method: "post",
|
||||
params: {
|
||||
order_id: order_id,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function getRooms(query) {
|
||||
return request({
|
||||
url: "/Meals/getRooms",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function consume(idNum,allPrice) {
|
||||
return request({
|
||||
url: "/Meals/consume",
|
||||
method: "post",
|
||||
params: {
|
||||
ryid: idNum,
|
||||
xfje: allPrice
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function getCsLb(){
|
||||
return request({
|
||||
url: "/Meals/getCsLb",
|
||||
method: "get",
|
||||
params: {}
|
||||
})
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<el-button @click="testvue">测试</el-button>
|
||||
<Test1 msg="Welcome to Your Vue.js App"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg } from "@/api/login";
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
data () {
|
||||
return {
|
||||
showSearch: true
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
testvue () {
|
||||
getCodeImg()
|
||||
.then(response => {
|
||||
console.log(response)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-menu-vertical-demo:not(.el-menu--collapse) {
|
||||
width: 200px;
|
||||
min-height: 400px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,332 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-aside width="70%" class="el-aside-room">
|
||||
<div class="scroll-container">
|
||||
<el-card width="100%">
|
||||
<el-row v-for="(group, index) in roomListGroup" :key="index" :style="setFlootStyle(index)">
|
||||
<el-col v-for="item in group" :key="item.room_no" :span="2" class="room-tile-col">
|
||||
<el-button class="room-tile-button" icon="el-icon-price-tag" :type="setRoomStyle(item.room_status)"
|
||||
@click="select_room(item)" :plain="!item.plain">{{ item.room_no }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header class="roomHeader">房屋信息快速预览</el-header>
|
||||
<el-main>
|
||||
<el-form label-width="80px">
|
||||
<el-alert v-if="recommendations.length" type="info" :closable="false"
|
||||
title="推荐房间仅供快速选择;提交时仍会校验房态和床位。" show-icon>
|
||||
</el-alert>
|
||||
<div v-if="recommendations.length" class="room-recommendations">
|
||||
<el-button v-for="item in recommendations" :key="item.room_no" type="primary" plain size="small"
|
||||
@click="selectRecommendedRoom(item)">
|
||||
{{ item.room_no }}({{ item.recommend_reason }})
|
||||
</el-button>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-button type="success" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(1)" plain>空闲房屋: <span style="font-weight: bold">{{
|
||||
statusCount.one
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="info" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(2)" plain>住满房屋: <span style="font-weight: bold">{{
|
||||
statusCount.two
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="warning" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(3)" plain>待清扫房屋: <span style="font-weight: bold">{{
|
||||
statusCount.three
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="danger" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(4)" plain>不能入住房屋: <span style="font-weight: bold">{{
|
||||
statusCount.four
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="primary" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(5)" plain>未满房屋: <span style="font-weight: bold">{{
|
||||
statusCount.five
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button size="small" style="width: 90%; margin-bottom: 4px" @click="changRoomPlain(6)"
|
||||
plain>房屋总计: <span style="font-weight: bold">{{
|
||||
roomList.length
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-form-item label="房间号码 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.room_no"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="房屋状态 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.room_status_ch"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="房间人数 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.personTotal"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="入住人员 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.person_name"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<div class="middleDiv">
|
||||
<el-button type="primary" @click="checkRoom" style="margin-right: 20px">确认</el-button>
|
||||
<!-- <el-button @click="roomVisible = false">取消</el-button> -->
|
||||
</div>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRoomList } from "@/api/jcgl/jcgl";
|
||||
export default {
|
||||
name: "Room",
|
||||
props: {
|
||||
recommendations: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
roomListGroup: [],
|
||||
roomList: [],
|
||||
room: {},
|
||||
statusCount: {
|
||||
one: 0,
|
||||
two: 0,
|
||||
three: 0,
|
||||
four: 0,
|
||||
five: 0,
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getRoomList_init();
|
||||
},
|
||||
methods: {
|
||||
getRoomList_init(){
|
||||
|
||||
getRoomList().then((r) => {
|
||||
this.roomList = r.data;
|
||||
let group = this.roomList.reduce((acc, item) => {
|
||||
let groupValue = item["room_floor"];
|
||||
if (!acc[groupValue]) {
|
||||
acc[groupValue] = [];
|
||||
}
|
||||
acc[groupValue].push(item);
|
||||
return acc;
|
||||
}, {});
|
||||
this.roomListGroup = Object.values(group);
|
||||
this.statusCount = { one: 0, two: 0, three: 0, four: 0, five: 0, };
|
||||
this.roomList.forEach((entity) => {
|
||||
let fieldValue = entity.room_status;
|
||||
let groupNanme = this.zd_roomStatus_groupName(fieldValue);
|
||||
this.statusCount[groupNanme] = this.statusCount[groupNanme] + 1;
|
||||
});
|
||||
});
|
||||
},
|
||||
setFlootStyle(index) {
|
||||
if (index != this.roomListGroup.length - 1) {
|
||||
return "padding-bottom:10px;border-bottom:1px solid black;padding-top:10px";
|
||||
}else {
|
||||
return "padding-top:10px;padding-bottom:10px";
|
||||
}
|
||||
// if (index % 2 == 1 && index != this.roomListGroup.length - 1) {
|
||||
// return "padding-bottom:10px;border-bottom:1px solid black";
|
||||
// } else if (index % 2 == 1 && index == this.roomListGroup.length - 1) {
|
||||
// return "padding-bottom:10px";
|
||||
// } else {
|
||||
// return "padding-top:10px;padding-bottom:10px";
|
||||
// }
|
||||
},
|
||||
changRoomPlain(fieldValue) {
|
||||
this.roomListGroup.forEach((group) => {
|
||||
group.forEach((room) => {
|
||||
if (room.room_status == fieldValue && fieldValue != 6) {
|
||||
room.plain = true;
|
||||
} else {
|
||||
room.plain = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.$forceUpdate();
|
||||
},
|
||||
setRoomStyle(room_status) {
|
||||
return this.zd_roomStatus_buttonType(room_status);
|
||||
},
|
||||
zd_roomStatus_buttonType(room_status) {
|
||||
if (room_status == 1) {
|
||||
return "success";
|
||||
} else if (room_status == 2) {
|
||||
return "info";
|
||||
} else if (room_status == 3) {
|
||||
return "warning";
|
||||
} else if (room_status == 4) {
|
||||
return "danger";
|
||||
} else if (room_status == 5) {
|
||||
return "primary";
|
||||
}
|
||||
},
|
||||
zd_roomStatus_groupName(room_status) {
|
||||
if (room_status == 1) {
|
||||
return "one";
|
||||
} else if (room_status == 2) {
|
||||
return "two";
|
||||
} else if (room_status == 3) {
|
||||
return "three";
|
||||
} else if (room_status == 4) {
|
||||
return "four";
|
||||
} else if (room_status == 5) {
|
||||
return "five";
|
||||
}
|
||||
},
|
||||
select_room(item) {
|
||||
if (!['1', '3', '5', '6'].includes(String(item.room_status))) {
|
||||
this.$message.error("仅状态为 1、3、5、6 的房间可选择入住");
|
||||
return;
|
||||
}
|
||||
this.room = item;
|
||||
this.roomSelected = true;
|
||||
let fieldValue = this.room.room_status;
|
||||
this.room.room_status_ch = this.zd_roomStatus_statusName(fieldValue);
|
||||
this.room.personTotal =
|
||||
this.room.live_person + " / " + this.room.bed_numbers;
|
||||
},
|
||||
selectRecommendedRoom(item) {
|
||||
const currentRoom = this.roomList.find(room => room.room_no === item.room_no);
|
||||
if (!currentRoom) {
|
||||
this.$message.error("推荐房间已不存在,请从房间列表重新选择");
|
||||
return;
|
||||
}
|
||||
this.select_room(currentRoom);
|
||||
},
|
||||
zd_roomStatus_statusName(room_status) {
|
||||
if (room_status == 1) {
|
||||
return "空闲";
|
||||
} else if (room_status == 2) {
|
||||
return "住满";
|
||||
} else if (room_status == 3) {
|
||||
return "待清扫";
|
||||
} else if (room_status == 4) {
|
||||
return "不能入住";
|
||||
} else if (room_status == 5) {
|
||||
return "未满";
|
||||
}
|
||||
},
|
||||
checkRoom() {
|
||||
|
||||
if (this.roomSelected) {
|
||||
let fieldValue = this.room.room_status;
|
||||
if (!['1', '3', '5', '6'].includes(String(fieldValue))) {
|
||||
this.$message.error("当前房屋不可入住!");
|
||||
return;
|
||||
}
|
||||
let tmp = this.zd_roomStatus_statusName(fieldValue);
|
||||
let message_tmp =
|
||||
"当前房号:" +
|
||||
this.room.room_no +
|
||||
",房屋状态:" +
|
||||
tmp +
|
||||
",是否确认?";
|
||||
this.$confirm(message_tmp, "提示", {
|
||||
cancelButtonClass: "btn-custom-cancel",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
}).then(() => {
|
||||
// this.jcxx = { ...this.jcxx, ...this.room };
|
||||
this.roomVisible = false;
|
||||
this.$emit('childByValue',this.room);
|
||||
});
|
||||
} else {
|
||||
this.$message.error("请先选择房间!");
|
||||
|
||||
return;
|
||||
}
|
||||
},
|
||||
refreshData(){
|
||||
this.getRoomList_init();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-aside-room {
|
||||
height: 535px;
|
||||
}
|
||||
|
||||
.room-recommendations {
|
||||
margin: 10px 0 14px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.roomHeader {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: cadetblue;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disabled-input .el-input__inner {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
.room-tile-col {
|
||||
padding: 10px 4px 0;
|
||||
}
|
||||
|
||||
.room-tile-button {
|
||||
width: 100%;
|
||||
min-height: 36px;
|
||||
padding: 8px 4px !important;
|
||||
display: inline-flex !important;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
font-size: 13px !important;
|
||||
line-height: 1.2;
|
||||
box-sizing: border-box;
|
||||
overflow: visible !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.room-tile-button .el-icon-price-tag {
|
||||
margin-right: 0 !important;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,291 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-aside width="70%" class="el-aside-room">
|
||||
<div class="scroll-container">
|
||||
<el-card width="100%">
|
||||
<el-row v-for="(group, index) in roomListGroup" :key="index" :style="setFlootStyle(index)">
|
||||
<el-col v-for="item in group" :key="item.room_no" :span="2" style="padding-top:10px">
|
||||
<!-- 明确绑定type和class,确保没有冲突 -->
|
||||
<el-button
|
||||
icon="el-icon-price-tag"
|
||||
:type="item.room_status === '6' ? 'default' : setRoomStyle(item.room_status)"
|
||||
:class="item.room_status === '6' ? 'btn-purple' : ''"
|
||||
@click="select_room(item)"
|
||||
:plain="!item.plain">
|
||||
{{ item.room_no }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header class="roomHeader">房屋信息快速预览</el-header>
|
||||
<el-main>
|
||||
<el-form label-width="80px">
|
||||
<el-row>
|
||||
<!-- 其他状态按钮 -->
|
||||
<el-col :span="12">
|
||||
<el-button type="success" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(1)" plain>空闲房屋: <span style="font-weight: bold">{{
|
||||
statusCount.one
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="info" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(2)" plain>住满房屋: <span style="font-weight: bold">{{
|
||||
statusCount.two
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="warning" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(3)" plain>待清扫房屋: <span style="font-weight: bold">{{
|
||||
statusCount.three
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="danger" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(4)" plain>不能入住房屋: <span style="font-weight: bold">{{
|
||||
statusCount.four
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="primary" size="small" style="width: 90%; margin-bottom: 4px"
|
||||
@click="changRoomPlain(5)" plain>未满房屋: <span style="font-weight: bold">{{
|
||||
statusCount.five
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<!-- 正在保洁统计按钮 -->
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
type="default"
|
||||
size="small"
|
||||
style="width: 90%; margin-bottom: 4px"
|
||||
class="btn-purple"
|
||||
@click="changRoomPlain(6)"
|
||||
plain>
|
||||
正在保洁房屋: <span style="font-weight: bold">{{
|
||||
statusCount.six
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-button size="small" style="width: 45%; margin-bottom: 4px" @click="changRoomPlain(7)"
|
||||
plain>房屋总计: <span style="font-weight: bold">{{
|
||||
roomList.length
|
||||
}}</span> 间
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 房间信息表单 -->
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-form-item label="房间号码 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.room_no"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="房屋状态 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.room_status_ch"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="房间人数 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.personTotal"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="入住人员 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.person_name"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRoomList } from "@/api/jcgl/jcgl";
|
||||
export default {
|
||||
name: "Room",
|
||||
data() {
|
||||
return {
|
||||
roomListGroup: [],
|
||||
roomList: [],
|
||||
room: {},
|
||||
roomSelected: false,
|
||||
statusCount: {
|
||||
one: 0,
|
||||
two: 0,
|
||||
three: 0,
|
||||
four: 0,
|
||||
five: 0,
|
||||
six: 0, // 正在保洁
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getRoomList_init();
|
||||
},
|
||||
methods: {
|
||||
getRoomList_init(){
|
||||
getRoomList().then((r) => {
|
||||
this.roomList = r.data;
|
||||
console.log(this.roomList);
|
||||
let group = this.roomList.reduce((acc, item) => {
|
||||
let groupValue = item["room_floor"];
|
||||
if (!acc[groupValue]) {
|
||||
acc[groupValue] = [];
|
||||
}
|
||||
acc[groupValue].push(item);
|
||||
return acc;
|
||||
}, {});
|
||||
this.roomListGroup = Object.values(group);
|
||||
// 初始化状态计数
|
||||
this.statusCount = {
|
||||
one: 0, two: 0, three: 0, four: 0, five: 0, six: 0
|
||||
};
|
||||
this.roomList.forEach((entity) => {
|
||||
let fieldValue = entity.room_status;
|
||||
let groupNanme = this.zd_roomStatus_groupName(fieldValue);
|
||||
if (groupNanme) {
|
||||
this.statusCount[groupNanme]++;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
setFlootStyle(index) {
|
||||
return index !== this.roomListGroup.length - 1
|
||||
? "padding-bottom:10px;border-bottom:1px solid black;padding-top:10px"
|
||||
: "padding-top:10px;padding-bottom:10px";
|
||||
},
|
||||
changRoomPlain(fieldValue) {
|
||||
this.roomListGroup.forEach(group => {
|
||||
group.forEach(room => {
|
||||
room.plain = room.room_status === fieldValue && fieldValue !== 7;
|
||||
});
|
||||
});
|
||||
this.$forceUpdate();
|
||||
},
|
||||
setRoomStyle(room_status) {
|
||||
return this.zd_roomStatus_buttonType(room_status);
|
||||
},
|
||||
zd_roomStatus_buttonType(room_status) {
|
||||
const types = {
|
||||
1: 'success',
|
||||
2: 'info',
|
||||
3: 'warning',
|
||||
4: 'danger',
|
||||
5: 'primary',
|
||||
};
|
||||
return types[room_status] || 'default';
|
||||
},
|
||||
zd_roomStatus_groupName(room_status) {
|
||||
const groups = {
|
||||
1: 'one',
|
||||
2: 'two',
|
||||
3: 'three',
|
||||
4: 'four',
|
||||
5: 'five',
|
||||
6: 'six'
|
||||
};
|
||||
return groups[room_status];
|
||||
},
|
||||
select_room(item) {
|
||||
this.room = { ...item };
|
||||
this.roomSelected = true;
|
||||
this.room.room_status_ch = this.zd_roomStatus_statusName(item.room_status);
|
||||
this.room.personTotal = `${item.live_person} / ${item.bed_numbers}`;
|
||||
},
|
||||
zd_roomStatus_statusName(room_status) {
|
||||
const names = {
|
||||
1: '空闲',
|
||||
2: '住满',
|
||||
3: '待清扫',
|
||||
4: '不能入住',
|
||||
5: '未满',
|
||||
6: '正在保洁'
|
||||
};
|
||||
return names[room_status] || '';
|
||||
},
|
||||
checkRoom() {
|
||||
if (!this.roomSelected) {
|
||||
this.$message.error("请先选择房间!");
|
||||
return;
|
||||
}
|
||||
if ([4, 6].includes(this.room.room_status)) {
|
||||
this.$message.error("当前房屋不能入住!");
|
||||
return;
|
||||
}
|
||||
this.$confirm(
|
||||
`当前房号:${this.room.room_no},房屋状态:${this.zd_roomStatus_statusName(this.room.room_status)},是否确认?`,
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
}
|
||||
).then(() => {
|
||||
this.roomVisible = false;
|
||||
this.$emit('childByValue', this.room);
|
||||
});
|
||||
},
|
||||
refreshData() {
|
||||
this.getRoomList_init();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 使用深度选择器确保样式能穿透到子组件 */
|
||||
::v-deep .btn-purple {
|
||||
color: #722ed1 !important;
|
||||
border-color: #722ed1 !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
::v-deep .btn-purple:not(.is-plain) {
|
||||
background-color: #722ed1 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
::v-deep .btn-purple:hover {
|
||||
background-color: #8640e3 !important;
|
||||
border-color: #8640e3 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
::v-deep .btn-purple.is-plain {
|
||||
background-color: transparent !important;
|
||||
color: #722ed1 !important;
|
||||
}
|
||||
|
||||
/* 原有样式 */
|
||||
.el-aside-room {
|
||||
height: 535px;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
overflow-y: auto;
|
||||
height: 480px; /* 固定高度确保滚动正常 */
|
||||
}
|
||||
|
||||
.roomHeader {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: cadetblue;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disabled-input .el-input__inner {
|
||||
color: black !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,618 @@
|
||||
<template>
|
||||
<div class="room-look">
|
||||
<el-container>
|
||||
<el-aside width="70%" class="el-aside-room">
|
||||
<div class="scroll-container">
|
||||
<el-card shadow="never">
|
||||
<el-row v-for="(group, index) in roomListGroup" :key="index" :style="setFlootStyle(index)">
|
||||
<el-col v-for="item in group" :key="item.room_no" :span="2" class="room-tile-col">
|
||||
<el-button
|
||||
class="room-tile-button"
|
||||
icon="el-icon-price-tag"
|
||||
:type="String(item.room_status) === '6' ? 'default' : setRoomStyle(item.room_status)"
|
||||
:class="getRoomButtonClass(item)"
|
||||
:plain="!item.plain"
|
||||
@click="select_room(item)">
|
||||
{{ item.room_no }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header class="roomHeader">房间信息维护</el-header>
|
||||
<el-main>
|
||||
<div class="status-grid">
|
||||
<el-button type="success" size="small" plain @click="changRoomPlain(1)">空闲 {{ statusCount.one }}</el-button>
|
||||
<el-button type="info" size="small" plain @click="changRoomPlain(2)">住满 {{ statusCount.two }}</el-button>
|
||||
<el-button type="warning" size="small" plain @click="changRoomPlain(3)">待清扫 {{ statusCount.three }}</el-button>
|
||||
<el-button type="danger" size="small" plain @click="changRoomPlain(4)">不能入住 {{ statusCount.four }}</el-button>
|
||||
<el-button type="primary" size="small" plain @click="changRoomPlain(5)">未满 {{ statusCount.five }}</el-button>
|
||||
<el-button type="default" size="small" plain class="btn-purple" @click="changRoomPlain(6)">正在保洁 {{ statusCount.six }}</el-button>
|
||||
<el-button size="small" plain @click="changRoomPlain(7)">全部 {{ roomList.length }}</el-button>
|
||||
</div>
|
||||
|
||||
<div class="selection-panel">
|
||||
<div class="panel-top">
|
||||
<div>
|
||||
<div class="panel-title">已选房间</div>
|
||||
<div class="panel-tip">只能选择相同状态的房间后再执行操作</div>
|
||||
</div>
|
||||
<el-button size="mini" @click="clearSelection" :disabled="selectedRooms.length === 0">清空选择</el-button>
|
||||
</div>
|
||||
|
||||
<div class="selection-summary">
|
||||
<div class="summary-item">
|
||||
<span class="summary-label">数量</span>
|
||||
<span class="summary-value">{{ selectedRooms.length }} 间</span>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<span class="summary-label">状态</span>
|
||||
<span class="summary-value">{{ selectedStatusLabel }}</span>
|
||||
</div>
|
||||
<div class="summary-item" v-if="selectedRooms.length === 1 && room.cleaningDuration">
|
||||
<span class="summary-label">保洁时长</span>
|
||||
<span class="summary-value">{{ room.cleaningDuration }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="selected-rooms-box" v-if="selectedRooms.length > 0">
|
||||
{{ selectedRoomNosText }}
|
||||
</div>
|
||||
<div class="empty-selection" v-else>
|
||||
请先在左侧选择房间
|
||||
</div>
|
||||
|
||||
<div class="single-room-panel" v-if="selectedRooms.length === 1">
|
||||
<div class="panel-title">房间状态信息</div>
|
||||
<div class="single-room-grid">
|
||||
<div class="single-room-item">
|
||||
<span class="single-room-label">房间号码</span>
|
||||
<span class="single-room-value">{{ room.room_no || '-' }}</span>
|
||||
</div>
|
||||
<div class="single-room-item">
|
||||
<span class="single-room-label">房屋状态</span>
|
||||
<span class="single-room-value">{{ room.room_status_ch || '-' }}</span>
|
||||
</div>
|
||||
<div class="single-room-item">
|
||||
<span class="single-room-label">房间人数</span>
|
||||
<span class="single-room-value">{{ room.personTotal || '-' }}</span>
|
||||
</div>
|
||||
<div class="single-room-item">
|
||||
<span class="single-room-label">入住人员</span>
|
||||
<span class="single-room-value">{{ room.person_name || '-' }}</span>
|
||||
</div>
|
||||
<div class="single-room-item" v-if="room.cleaningDuration">
|
||||
<span class="single-room-label">保洁时长</span>
|
||||
<span class="single-room-value">{{ room.cleaningDuration }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="action-group" v-if="selectedRooms.length > 0">
|
||||
<el-button
|
||||
v-if="canBatchStartClean"
|
||||
type="success"
|
||||
size="small"
|
||||
@click="startCleanSelected">
|
||||
开始保洁
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="canBatchSetUnavailable"
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="setSelectedRoomsUnavailable">
|
||||
设为不能入住
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="canBatchEndClean"
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="endCleanSelected">
|
||||
结束保洁
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="canBatchRestoreAvailable"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="restoreSelectedRoomsAvailable">
|
||||
恢复可入住
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRoomList, startRoomCleaning, endRoomCleaning, modifyRoomStatus } from "@/api/jcgl/jcgl";
|
||||
|
||||
export default {
|
||||
name: "Room",
|
||||
data() {
|
||||
return {
|
||||
roomListGroup: [],
|
||||
roomList: [],
|
||||
room: {},
|
||||
selectedRooms: [],
|
||||
statusCount: {
|
||||
one: 0,
|
||||
two: 0,
|
||||
three: 0,
|
||||
four: 0,
|
||||
five: 0,
|
||||
six: 0,
|
||||
},
|
||||
cleaningTimer: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
selectedRoomStatus() {
|
||||
if (this.selectedRooms.length === 0) {
|
||||
return "";
|
||||
}
|
||||
return String(this.selectedRooms[0].room_status);
|
||||
},
|
||||
selectedStatusLabel() {
|
||||
if (!this.selectedRoomStatus) {
|
||||
return "未选择";
|
||||
}
|
||||
return this.zd_roomStatus_statusName(this.selectedRoomStatus);
|
||||
},
|
||||
selectedRoomNosText() {
|
||||
return this.selectedRooms.map(room => room.room_no).join("、");
|
||||
},
|
||||
canBatchStartClean() {
|
||||
return this.selectedRoomStatus === "3";
|
||||
},
|
||||
canBatchEndClean() {
|
||||
return this.selectedRoomStatus === "6";
|
||||
},
|
||||
canBatchRestoreAvailable() {
|
||||
return this.selectedRoomStatus === "4";
|
||||
},
|
||||
canBatchSetUnavailable() {
|
||||
return this.selectedRooms.length > 0 && ["1", "2", "3", "5"].includes(this.selectedRoomStatus);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getRoomList_init();
|
||||
this.cleaningTimer = setInterval(() => {
|
||||
if (String(this.room.room_status) === '6' && this.room.bjkssj) {
|
||||
this.room.cleaningDuration = this.calculateCleaningDuration(this.room.bjkssj);
|
||||
}
|
||||
}, 6000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.cleaningTimer) {
|
||||
clearInterval(this.cleaningTimer);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getRoomList_init() {
|
||||
getRoomList().then((r) => {
|
||||
this.roomList = r.data;
|
||||
const group = this.roomList.reduce((acc, item) => {
|
||||
const groupValue = item["room_floor"];
|
||||
if (!acc[groupValue]) {
|
||||
acc[groupValue] = [];
|
||||
}
|
||||
acc[groupValue].push(item);
|
||||
return acc;
|
||||
}, {});
|
||||
this.roomListGroup = Object.values(group);
|
||||
this.statusCount = {
|
||||
one: 0,
|
||||
two: 0,
|
||||
three: 0,
|
||||
four: 0,
|
||||
five: 0,
|
||||
six: 0
|
||||
};
|
||||
this.roomList.forEach((entity) => {
|
||||
const groupName = this.zd_roomStatus_groupName(entity.room_status);
|
||||
if (groupName) {
|
||||
this.statusCount[groupName]++;
|
||||
}
|
||||
});
|
||||
this.clearSelection();
|
||||
});
|
||||
},
|
||||
setFlootStyle(index) {
|
||||
return index !== this.roomListGroup.length - 1
|
||||
? "padding-bottom:10px;border-bottom:1px solid black;padding-top:10px"
|
||||
: "padding-top:10px;padding-bottom:10px";
|
||||
},
|
||||
changRoomPlain(fieldValue) {
|
||||
this.clearSelection();
|
||||
this.roomListGroup.forEach(group => {
|
||||
group.forEach(room => {
|
||||
room.plain = room.room_status === fieldValue && fieldValue !== 7;
|
||||
});
|
||||
});
|
||||
this.$forceUpdate();
|
||||
},
|
||||
getRoomButtonClass(item) {
|
||||
return {
|
||||
"btn-purple": this.isRoomStatus(item, 6),
|
||||
"room-selected": this.isSelectedRoom(item)
|
||||
};
|
||||
},
|
||||
setRoomStyle(room_status) {
|
||||
return this.zd_roomStatus_buttonType(room_status);
|
||||
},
|
||||
zd_roomStatus_buttonType(room_status) {
|
||||
const types = {
|
||||
1: "success",
|
||||
2: "info",
|
||||
3: "warning",
|
||||
4: "danger",
|
||||
5: "primary",
|
||||
};
|
||||
return types[room_status] || "default";
|
||||
},
|
||||
zd_roomStatus_groupName(room_status) {
|
||||
const groups = {
|
||||
1: "one",
|
||||
2: "two",
|
||||
3: "three",
|
||||
4: "four",
|
||||
5: "five",
|
||||
6: "six"
|
||||
};
|
||||
return groups[room_status];
|
||||
},
|
||||
zd_roomStatus_statusName(room_status) {
|
||||
const names = {
|
||||
1: "空闲",
|
||||
2: "住满",
|
||||
3: "待清扫",
|
||||
4: "不能入住",
|
||||
5: "未满",
|
||||
6: "正在保洁"
|
||||
};
|
||||
return names[room_status] || "";
|
||||
},
|
||||
select_room(item) {
|
||||
const status = String(item.room_status);
|
||||
const existingIndex = this.selectedRooms.findIndex(room => room.room_no === item.room_no);
|
||||
if (existingIndex !== -1) {
|
||||
this.selectedRooms.splice(existingIndex, 1);
|
||||
this.syncSelectedRoomPreview();
|
||||
return;
|
||||
}
|
||||
if (this.selectedRooms.length > 0 && this.selectedRoomStatus !== status) {
|
||||
this.$message.warning("只能选择相同状态的房间");
|
||||
return;
|
||||
}
|
||||
this.selectedRooms.push({ ...item });
|
||||
this.syncSelectedRoomPreview(item);
|
||||
},
|
||||
syncSelectedRoomPreview(preferredRoom) {
|
||||
if (this.selectedRooms.length === 0) {
|
||||
this.room = {};
|
||||
return;
|
||||
}
|
||||
const activeRoom = preferredRoom || this.selectedRooms[this.selectedRooms.length - 1];
|
||||
this.room = { ...activeRoom };
|
||||
this.room.room_status_ch = this.zd_roomStatus_statusName(activeRoom.room_status);
|
||||
this.room.personTotal = `${activeRoom.live_person} / ${activeRoom.bed_numbers}`;
|
||||
if (String(activeRoom.room_status) === "6" && activeRoom.bjkssj) {
|
||||
this.room.cleaningDuration = this.calculateCleaningDuration(activeRoom.bjkssj);
|
||||
} else {
|
||||
this.room.cleaningDuration = "";
|
||||
}
|
||||
},
|
||||
clearSelection() {
|
||||
this.selectedRooms = [];
|
||||
this.room = {};
|
||||
},
|
||||
async batchRun(rooms, handler, successMessage) {
|
||||
await Promise.all(rooms.map(room => handler(room)));
|
||||
this.$message.success(successMessage);
|
||||
this.getRoomList_init();
|
||||
},
|
||||
async startCleanSelected() {
|
||||
if (!this.canBatchStartClean) {
|
||||
return;
|
||||
}
|
||||
const roomNos = this.selectedRoomNosText;
|
||||
try {
|
||||
await this.$confirm(`确认对以下房间开始保洁:${roomNos}?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
});
|
||||
await this.batchRun(
|
||||
this.selectedRooms,
|
||||
(room) => startRoomCleaning(room.room_no, room.gyid),
|
||||
`已开始保洁:${roomNos}`
|
||||
);
|
||||
} catch (e) {
|
||||
// Ignore cancel action from confirm.
|
||||
}
|
||||
},
|
||||
async endCleanSelected() {
|
||||
if (!this.canBatchEndClean) {
|
||||
return;
|
||||
}
|
||||
const roomNos = this.selectedRoomNosText;
|
||||
try {
|
||||
await this.$confirm(`确认对以下房间结束保洁:${roomNos}?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
});
|
||||
await this.batchRun(
|
||||
this.selectedRooms,
|
||||
(room) => endRoomCleaning(room.room_no, room.gyid),
|
||||
`已结束保洁:${roomNos}`
|
||||
);
|
||||
} catch (e) {
|
||||
// Ignore cancel action from confirm.
|
||||
}
|
||||
},
|
||||
async setSelectedRoomsUnavailable() {
|
||||
if (!this.canBatchSetUnavailable) {
|
||||
return;
|
||||
}
|
||||
const occupiedRooms = this.selectedRooms.filter(room => this.getRoomLivePerson(room) > 0);
|
||||
if (occupiedRooms.length > 0) {
|
||||
this.$message.warning(`以下房间有人入住,不能设为不能入住:${occupiedRooms.map(room => room.room_no).join("、")}`);
|
||||
return;
|
||||
}
|
||||
const roomNos = this.selectedRoomNosText;
|
||||
try {
|
||||
await this.$confirm(`确认将以下房间设为不能入住:${roomNos}?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
});
|
||||
await this.batchRun(
|
||||
this.selectedRooms,
|
||||
(room) => modifyRoomStatus(room.gyid, room.room_no, "4"),
|
||||
`已设为不能入住:${roomNos}`
|
||||
);
|
||||
} catch (e) {
|
||||
// Ignore cancel action from confirm.
|
||||
}
|
||||
},
|
||||
async restoreSelectedRoomsAvailable() {
|
||||
if (!this.canBatchRestoreAvailable) {
|
||||
return;
|
||||
}
|
||||
const roomNos = this.selectedRoomNosText;
|
||||
try {
|
||||
await this.$confirm(`确认将以下房间恢复为可入住:${roomNos}?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
});
|
||||
await this.batchRun(
|
||||
this.selectedRooms,
|
||||
(room) => modifyRoomStatus(room.gyid, room.room_no, "1"),
|
||||
`已恢复可入住:${roomNos}`
|
||||
);
|
||||
} catch (e) {
|
||||
// Ignore cancel action from confirm.
|
||||
}
|
||||
},
|
||||
isRoomStatus(room, status) {
|
||||
return String(room && room.room_status) === String(status);
|
||||
},
|
||||
isSelectedRoom(room) {
|
||||
return this.selectedRooms.some(item => item.room_no === room.room_no);
|
||||
},
|
||||
getRoomLivePerson(room) {
|
||||
const livePerson = Number(room && room.live_person);
|
||||
return Number.isNaN(livePerson) ? 0 : livePerson;
|
||||
},
|
||||
calculateCleaningDuration(startTime) {
|
||||
if (!startTime) return "";
|
||||
const start = new Date(startTime);
|
||||
const now = new Date();
|
||||
const diffMs = now - start;
|
||||
const hours = Math.floor(diffMs / (1000 * 60 * 60));
|
||||
const minutes = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60));
|
||||
return `${hours}小时${minutes}分钟`;
|
||||
},
|
||||
refreshData() {
|
||||
this.getRoomList_init();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.room-look {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
::v-deep .btn-purple {
|
||||
color: #722ed1 !important;
|
||||
border-color: #722ed1 !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
::v-deep .btn-purple:not(.is-plain) {
|
||||
background-color: #722ed1 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
::v-deep .btn-purple:hover {
|
||||
background-color: #8640e3 !important;
|
||||
border-color: #8640e3 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
::v-deep .btn-purple.is-plain {
|
||||
background-color: transparent !important;
|
||||
color: #722ed1 !important;
|
||||
}
|
||||
|
||||
::v-deep .room-selected {
|
||||
box-shadow: 0 0 0 3px #409eff !important;
|
||||
border-color: #409eff !important;
|
||||
}
|
||||
|
||||
.room-tile-col {
|
||||
padding: 10px 4px 0;
|
||||
}
|
||||
|
||||
::v-deep .room-tile-button {
|
||||
width: 100%;
|
||||
min-height: 36px;
|
||||
padding: 8px 4px !important;
|
||||
display: inline-flex !important;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
font-size: 13px !important;
|
||||
line-height: 1.2;
|
||||
box-sizing: border-box;
|
||||
overflow: visible !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
::v-deep .room-tile-button .el-icon-price-tag {
|
||||
margin-right: 0 !important;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.el-aside-room {
|
||||
height: 535px;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
overflow-y: auto;
|
||||
height: 480px;
|
||||
}
|
||||
|
||||
.roomHeader {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: cadetblue;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.status-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.selection-panel {
|
||||
margin-top: 18px;
|
||||
padding: 16px;
|
||||
border-radius: 10px;
|
||||
background: #f7fafc;
|
||||
border: 1px solid #dfe7ef;
|
||||
}
|
||||
|
||||
.panel-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.panel-tip {
|
||||
margin-top: 4px;
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.selection-summary {
|
||||
margin-top: 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.summary-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.summary-label {
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.summary-value {
|
||||
color: #303133;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.selected-rooms-box,
|
||||
.empty-selection {
|
||||
margin-top: 14px;
|
||||
min-height: 74px;
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
border: 1px dashed #c0d3eb;
|
||||
color: #303133;
|
||||
line-height: 1.7;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.empty-selection {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.action-group {
|
||||
margin-top: 16px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.single-room-panel {
|
||||
margin-top: 16px;
|
||||
padding: 14px;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
border: 1px solid #e4ebf3;
|
||||
}
|
||||
|
||||
.single-room-grid {
|
||||
margin-top: 12px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 10px 16px;
|
||||
}
|
||||
|
||||
.single-room-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.single-room-label {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.single-room-value {
|
||||
color: #303133;
|
||||
font-weight: 600;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,213 @@
|
||||
|
||||
<template>
|
||||
<div class="record-page">
|
||||
<div style="margin-bottom: 15px;">
|
||||
<!-- <el-button @click="startRecording" :disabled="videoStart" size="small">开始录制</el-button> -->
|
||||
<el-button @click="stopRecording" :disabled="!videoStart" size="small" id="btn-stop-recording">结束录制</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="video-container">
|
||||
<video controls autoplay playsinline ref="video" width="400" height="300">
|
||||
<!-- <button id="fullscreen-button" onclick="toggleFullscreen()">Fullscreen</button> -->
|
||||
</video>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
import RecordRTC from 'recordrtc';
|
||||
import router from '@/router';
|
||||
export default {
|
||||
name: "screenRecord",
|
||||
data() {
|
||||
return {
|
||||
video: null,
|
||||
videoStart: false,
|
||||
recorder: null,
|
||||
//全屏显示
|
||||
fullscreen: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log('中国');
|
||||
if (!navigator.getDisplayMedia && !navigator.mediaDevices.getDisplayMedia) {
|
||||
let error = 'Your browser does NOT support the getDisplayMedia API.';
|
||||
throw new Error(error);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.video = document.querySelector('video');
|
||||
this.startRecording();
|
||||
const channelObj = new BroadcastChannel("channel_lp");
|
||||
channelObj.addEventListener("message", this.handleStop);
|
||||
},
|
||||
methods: {
|
||||
handleStop() {
|
||||
this.stopRecording();
|
||||
// this.$forceUpdate();
|
||||
},
|
||||
invokeGetDisplayMedia(success, error) {
|
||||
let displaymediastreamconstraints = {
|
||||
video: {
|
||||
displaySurface: 'monitor', // monitor, window, application, browser
|
||||
logicalSurface: true,
|
||||
cursor: 'always' // never, always, motion
|
||||
}
|
||||
};
|
||||
// above constraints are NOT supported YET
|
||||
// that's why overridnig them
|
||||
displaymediastreamconstraints = {
|
||||
video: true
|
||||
};
|
||||
if (navigator.mediaDevices.getDisplayMedia) {
|
||||
navigator.mediaDevices.getDisplayMedia(displaymediastreamconstraints).then(success).catch(error);
|
||||
}
|
||||
else {
|
||||
navigator.getDisplayMedia(displaymediastreamconstraints).then(success).catch(error);
|
||||
}
|
||||
},
|
||||
captureScreen(callback) {
|
||||
this.invokeGetDisplayMedia((screen) => {
|
||||
this.addStreamStopListener(screen, () => {
|
||||
//
|
||||
});
|
||||
callback(screen);
|
||||
}, function (error) {
|
||||
console.error(error);
|
||||
alert('Unable to capture your screen. Please check console logs.\n' + error);
|
||||
});
|
||||
},
|
||||
addStreamStopListener(stream, callback) {
|
||||
stream.addEventListener('ended', function () {
|
||||
callback();
|
||||
callback = function () { };
|
||||
}, false);
|
||||
stream.addEventListener('inactive', function () {
|
||||
callback();
|
||||
callback = function () { };
|
||||
}, false);
|
||||
stream.getTracks().forEach((track) => {
|
||||
track.addEventListener('ended', () => {
|
||||
this.stopRecording()
|
||||
callback();
|
||||
callback = function () { };
|
||||
}, false);
|
||||
track.addEventListener('inactive', function () {
|
||||
callback();
|
||||
callback = function () { };
|
||||
}, false);
|
||||
});
|
||||
},
|
||||
startRecording() {
|
||||
this.captureScreen(screen => {
|
||||
this.video.srcObject = screen;
|
||||
this.recorder = RecordRTC(screen, {
|
||||
type: 'video'
|
||||
});
|
||||
this.recorder.startRecording();
|
||||
// release screen on stopRecording
|
||||
this.recorder.screen = screen;
|
||||
this.videoStart = true;
|
||||
});
|
||||
},
|
||||
stopRecordingCallback() {
|
||||
this.video.src = this.video.srcObject = null;
|
||||
this.video.src = URL.createObjectURL(this.recorder.getBlob());
|
||||
// 如果需要下载录屏文件可加上下面代码
|
||||
let url = URL.createObjectURL(this.recorder.getBlob())
|
||||
const a = document.createElement("a");
|
||||
document.body.appendChild(a);
|
||||
a.style.display = "none";
|
||||
a.href = url;
|
||||
a.download = new Date() + ".mp4";
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
//以上是下载所需代码
|
||||
this.recorder.screen.stop();
|
||||
this.recorder.destroy();
|
||||
this.recorder = null;
|
||||
this.videoStart = false;
|
||||
},
|
||||
stopRecording() {
|
||||
this.recorder.stopRecording(this.stopRecordingCallback);
|
||||
},
|
||||
showScreen() {
|
||||
|
||||
let element = document.getElementById('allScreen');//id为allScreen的容器全屏现实
|
||||
|
||||
if (this.fullscreen) {
|
||||
|
||||
if (document.exitFullscreen) {
|
||||
|
||||
document.exitFullscreen();
|
||||
|
||||
} else if (document.webkitCancelFullScreen) {
|
||||
|
||||
document.webkitCancelFullScreen();
|
||||
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
|
||||
document.mozCancelFullScreen();
|
||||
|
||||
} else if (document.msExitFullscreen) {
|
||||
|
||||
document.msExitFullscreen();
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (element.requestFullscreen) {
|
||||
|
||||
element.requestFullscreen();
|
||||
|
||||
} else if (element.webkitRequestFullScreen) {
|
||||
|
||||
element.webkitRequestFullScreen();
|
||||
|
||||
} else if (element.mozRequestFullScreen) {
|
||||
|
||||
element.mozRequestFullScreen();
|
||||
|
||||
} else if (element.msRequestFullscreen) {
|
||||
|
||||
// IE11
|
||||
|
||||
element.msRequestFullscreen();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.fullscreen = !this.fullscreen;
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#video-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
video {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#fullscreen-button {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 9999;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,14 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import axios from 'axios'
|
||||
import ElementUI from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
|
||||
Vue.use(ElementUI)
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$axios = axios
|
||||
new Vue({
|
||||
router,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
@@ -0,0 +1,60 @@
|
||||
import store from '@/store'
|
||||
|
||||
function authPermission(permission) {
|
||||
const all_permission = "*:*:*";
|
||||
const permissions = store.getters && store.getters.permissions
|
||||
if (permission && permission.length > 0) {
|
||||
return permissions.some(v => {
|
||||
return all_permission === v || v === permission
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
function authRole(role) {
|
||||
const super_admin = "admin";
|
||||
const roles = store.getters && store.getters.roles
|
||||
if (role && role.length > 0) {
|
||||
return roles.some(v => {
|
||||
return super_admin === v || v === role
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
// 验证用户是否具备某权限
|
||||
hasPermi(permission) {
|
||||
return authPermission(permission);
|
||||
},
|
||||
// 验证用户是否含有指定权限,只需包含其中一个
|
||||
hasPermiOr(permissions) {
|
||||
return permissions.some(item => {
|
||||
return authPermission(item)
|
||||
})
|
||||
},
|
||||
// 验证用户是否含有指定权限,必须全部拥有
|
||||
hasPermiAnd(permissions) {
|
||||
return permissions.every(item => {
|
||||
return authPermission(item)
|
||||
})
|
||||
},
|
||||
// 验证用户是否具备某角色
|
||||
hasRole(role) {
|
||||
return authRole(role);
|
||||
},
|
||||
// 验证用户是否含有指定角色,只需包含其中一个
|
||||
hasRoleOr(roles) {
|
||||
return roles.some(item => {
|
||||
return authRole(item)
|
||||
})
|
||||
},
|
||||
// 验证用户是否含有指定角色,必须全部拥有
|
||||
hasRoleAnd(roles) {
|
||||
return roles.every(item => {
|
||||
return authRole(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
const sessionCache = {
|
||||
set (key, value) {
|
||||
if (!sessionStorage) {
|
||||
return
|
||||
}
|
||||
if (key != null && value != null) {
|
||||
sessionStorage.setItem(key, value)
|
||||
}
|
||||
},
|
||||
get (key) {
|
||||
if (!sessionStorage) {
|
||||
return null
|
||||
}
|
||||
if (key == null) {
|
||||
return null
|
||||
}
|
||||
return sessionStorage.getItem(key)
|
||||
},
|
||||
setJSON (key, jsonValue) {
|
||||
if (jsonValue != null) {
|
||||
this.set(key, JSON.stringify(jsonValue))
|
||||
}
|
||||
},
|
||||
getJSON (key) {
|
||||
const value = this.get(key)
|
||||
if (value != null) {
|
||||
return JSON.parse(value)
|
||||
}
|
||||
},
|
||||
remove (key) {
|
||||
sessionStorage.removeItem(key);
|
||||
}
|
||||
}
|
||||
const localCache = {
|
||||
set (key, value) {
|
||||
if (!localStorage) {
|
||||
return
|
||||
}
|
||||
if (key != null && value != null) {
|
||||
localStorage.setItem(key, value)
|
||||
}
|
||||
},
|
||||
get (key) {
|
||||
if (!localStorage) {
|
||||
return null
|
||||
}
|
||||
if (key == null) {
|
||||
return null
|
||||
}
|
||||
return localStorage.getItem(key)
|
||||
},
|
||||
setJSON (key, jsonValue) {
|
||||
if (jsonValue != null) {
|
||||
this.set(key, JSON.stringify(jsonValue))
|
||||
}
|
||||
},
|
||||
getJSON (key) {
|
||||
const value = this.get(key)
|
||||
if (value != null) {
|
||||
return JSON.parse(value)
|
||||
}
|
||||
},
|
||||
remove (key) {
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
/**
|
||||
* 会话级缓存
|
||||
*/
|
||||
session: sessionCache,
|
||||
/**
|
||||
* 本地缓存
|
||||
*/
|
||||
local: localCache
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
import axios from 'axios'
|
||||
import { Message } from 'element-ui'
|
||||
import { saveAs } from 'file-saver'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
import { blobValidate } from "@/utils/ruoyi";
|
||||
|
||||
const baseURL = process.env.VUE_APP_BASE_API
|
||||
|
||||
export default {
|
||||
name(name, isDelete = true) {
|
||||
var url = baseURL + "/common/download?fileName=" + encodeURIComponent(name) + "&delete=" + isDelete
|
||||
axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
responseType: 'blob',
|
||||
headers: { 'Authorization': 'Bearer ' + getToken() }
|
||||
}).then((res) => {
|
||||
const isBlob = blobValidate(res.data);
|
||||
if (isBlob) {
|
||||
const blob = new Blob([res.data])
|
||||
this.saveAs(blob, decodeURIComponent(res.headers['download-filename']))
|
||||
} else {
|
||||
this.printErrMsg(res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
resource(resource) {
|
||||
var url = baseURL + "/common/download/resource?resource=" + encodeURIComponent(resource);
|
||||
axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
responseType: 'blob',
|
||||
headers: { 'Authorization': 'Bearer ' + getToken() }
|
||||
}).then((res) => {
|
||||
const isBlob = blobValidate(res.data);
|
||||
if (isBlob) {
|
||||
const blob = new Blob([res.data])
|
||||
this.saveAs(blob, decodeURIComponent(res.headers['download-filename']))
|
||||
} else {
|
||||
this.printErrMsg(res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
zip(url, name) {
|
||||
var url = baseURL + url
|
||||
axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
responseType: 'blob',
|
||||
headers: { 'Authorization': 'Bearer ' + getToken() }
|
||||
}).then((res) => {
|
||||
const isBlob = blobValidate(res.data);
|
||||
if (isBlob) {
|
||||
const blob = new Blob([res.data], { type: 'application/zip' })
|
||||
this.saveAs(blob, name)
|
||||
} else {
|
||||
this.printErrMsg(res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
saveAs(text, name, opts) {
|
||||
saveAs(text, name, opts);
|
||||
},
|
||||
async printErrMsg(data) {
|
||||
const resText = await data.text();
|
||||
const rspObj = JSON.parse(resText);
|
||||
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
|
||||
Message.error(errMsg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import tab from './tab'
|
||||
import auth from './auth'
|
||||
import cache from './cache'
|
||||
import modal from './modal'
|
||||
import download from './download'
|
||||
|
||||
export default {
|
||||
install(Vue) {
|
||||
// 页签操作
|
||||
Vue.prototype.$tab = tab
|
||||
// 认证对象
|
||||
Vue.prototype.$auth = auth
|
||||
// 缓存对象
|
||||
Vue.prototype.$cache = cache
|
||||
// 模态框对象
|
||||
Vue.prototype.$modal = modal
|
||||
// 下载文件
|
||||
Vue.prototype.$download = download
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
import { Message, MessageBox, Notification, Loading } from 'element-ui'
|
||||
|
||||
let loadingInstance;
|
||||
|
||||
export default {
|
||||
// 消息提示
|
||||
msg(content) {
|
||||
Message.info(content)
|
||||
},
|
||||
// 错误消息
|
||||
msgError(content) {
|
||||
Message.error(content)
|
||||
},
|
||||
// 成功消息
|
||||
msgSuccess(content) {
|
||||
Message.success(content)
|
||||
},
|
||||
// 警告消息
|
||||
msgWarning(content) {
|
||||
Message.warning(content)
|
||||
},
|
||||
// 弹出提示
|
||||
alert(content) {
|
||||
MessageBox.alert(content, "系统提示")
|
||||
},
|
||||
// 错误提示
|
||||
alertError(content) {
|
||||
MessageBox.alert(content, "系统提示", { type: 'error' })
|
||||
},
|
||||
// 成功提示
|
||||
alertSuccess(content) {
|
||||
MessageBox.alert(content, "系统提示", { type: 'success' })
|
||||
},
|
||||
// 警告提示
|
||||
alertWarning(content) {
|
||||
MessageBox.alert(content, "系统提示", { type: 'warning' })
|
||||
},
|
||||
// 通知提示
|
||||
notify(content) {
|
||||
Notification.info(content)
|
||||
},
|
||||
// 错误通知
|
||||
notifyError(content) {
|
||||
Notification.error(content);
|
||||
},
|
||||
// 成功通知
|
||||
notifySuccess(content) {
|
||||
Notification.success(content)
|
||||
},
|
||||
// 警告通知
|
||||
notifyWarning(content) {
|
||||
Notification.warning(content)
|
||||
},
|
||||
// 确认窗体
|
||||
confirm(content) {
|
||||
return MessageBox.confirm(content, "系统提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: "warning",
|
||||
})
|
||||
},
|
||||
// 提交内容
|
||||
prompt(content) {
|
||||
return MessageBox.prompt(content, "系统提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: "warning",
|
||||
})
|
||||
},
|
||||
// 打开遮罩层
|
||||
loading(content) {
|
||||
loadingInstance = Loading.service({
|
||||
lock: true,
|
||||
text: content,
|
||||
spinner: "el-icon-loading",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
})
|
||||
},
|
||||
// 关闭遮罩层
|
||||
closeLoading() {
|
||||
loadingInstance.close();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import store from '@/store'
|
||||
import router from '@/router';
|
||||
|
||||
export default {
|
||||
// 刷新当前tab页签
|
||||
refreshPage(obj) {
|
||||
const { path, query, matched } = router.currentRoute;
|
||||
if (obj === undefined) {
|
||||
matched.forEach((m) => {
|
||||
if (m.components && m.components.default && m.components.default.name) {
|
||||
if (!['Layout', 'ParentView'].includes(m.components.default.name)) {
|
||||
obj = { name: m.components.default.name, path: path, query: query };
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return store.dispatch('tagsView/delCachedView', obj).then(() => {
|
||||
const { path, query } = obj
|
||||
router.replace({
|
||||
path: '/redirect' + path,
|
||||
query: query
|
||||
})
|
||||
})
|
||||
},
|
||||
// 关闭当前tab页签,打开新页签
|
||||
closeOpenPage(obj) {
|
||||
store.dispatch("tagsView/delView", router.currentRoute);
|
||||
if (obj !== undefined) {
|
||||
return router.push(obj);
|
||||
}
|
||||
},
|
||||
// 关闭指定tab页签
|
||||
closePage(obj) {
|
||||
if (obj === undefined) {
|
||||
return store.dispatch('tagsView/delView', router.currentRoute).then(({ visitedViews }) => {
|
||||
const latestView = visitedViews.slice(-1)[0]
|
||||
if (latestView) {
|
||||
return router.push(latestView.fullPath)
|
||||
}
|
||||
return router.push('/');
|
||||
});
|
||||
}
|
||||
return store.dispatch('tagsView/delView', obj);
|
||||
},
|
||||
// 关闭所有tab页签
|
||||
closeAllPage() {
|
||||
return store.dispatch('tagsView/delAllViews');
|
||||
},
|
||||
// 关闭左侧tab页签
|
||||
closeLeftPage(obj) {
|
||||
return store.dispatch('tagsView/delLeftTags', obj || router.currentRoute);
|
||||
},
|
||||
// 关闭右侧tab页签
|
||||
closeRightPage(obj) {
|
||||
return store.dispatch('tagsView/delRightTags', obj || router.currentRoute);
|
||||
},
|
||||
// 关闭其他tab页签
|
||||
closeOtherPage(obj) {
|
||||
return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
|
||||
},
|
||||
// 添加tab页签
|
||||
openPage(title, url, params) {
|
||||
var obj = { path: url, meta: { title: title } }
|
||||
store.dispatch('tagsView/addView', obj);
|
||||
return router.push({ path: url, query: params });
|
||||
},
|
||||
// 修改tab页签
|
||||
updatePage(obj) {
|
||||
return store.dispatch('tagsView/updateVisitedView', obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/login'
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: 'Login',
|
||||
component: () => import('../views/Login.vue')
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
name: 'Home',
|
||||
component: Home
|
||||
},
|
||||
{
|
||||
path: '/MealsOrdering',
|
||||
name: 'MealsOrdering',
|
||||
component: () => import('../zhengchuang/views/MealsOrdering.vue')
|
||||
},
|
||||
{
|
||||
path: '/paymentPlatform',
|
||||
name: 'paymentPlatform',
|
||||
component: () => import('../zhengchuang/views/paymentPlatform.vue')
|
||||
},
|
||||
{
|
||||
path: '/chefOrders',
|
||||
name: 'chefOrders',
|
||||
component: () => import('../zhengchuang/views/chefOrders.vue')
|
||||
},
|
||||
{
|
||||
path: '/roomService',
|
||||
name: 'roomService',
|
||||
component: () => import('../zhengchuang/views/roomService.vue')
|
||||
},
|
||||
{
|
||||
path: '/jcxx',
|
||||
name: 'JcXx',
|
||||
component: () => import('../views/JcXx.vue')
|
||||
},
|
||||
{
|
||||
path: '/JcXx',
|
||||
redirect: '/jcxx'
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
component: () => import('../views/About.vue')
|
||||
}
|
||||
,
|
||||
{
|
||||
path: '/ykt_main',
|
||||
name: 'ykt_main',
|
||||
component: () => import('../shijinpeng/main.vue')
|
||||
},
|
||||
{
|
||||
path: '/room',
|
||||
name: 'room',
|
||||
component: () => import('../components/Room.vue')
|
||||
},
|
||||
{
|
||||
path: '/synJcXx',
|
||||
name: 'synJcXx',
|
||||
component: () => import('../views/SynJcXx.vue')
|
||||
}
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
routes
|
||||
})
|
||||
|
||||
// 路由守卫
|
||||
router.beforeEach((to, from, next) => {
|
||||
const token = getToken()
|
||||
const loginAccount = localStorage.getItem('loginAccount')
|
||||
|
||||
// 如果有登录账号信息,认为已登录
|
||||
const isLoggedIn = token || loginAccount
|
||||
|
||||
if (to.path === '/login') {
|
||||
// 如果已经登录,直接跳转到主页
|
||||
if (isLoggedIn) {
|
||||
next('/jcxx')
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
} else {
|
||||
// 其他页面需要登录
|
||||
if (isLoggedIn) {
|
||||
next()
|
||||
} else {
|
||||
next('/login')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export default router
|
||||
@@ -0,0 +1,943 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form label-width="80px">
|
||||
<el-container>
|
||||
<el-aside width="30%" class="el-aside-main">
|
||||
<div class="aside-button-container">
|
||||
<el-button @click="rydj" class="aside-button-container-bn" style="margin-left: 0px; margin-bottom: 20px"
|
||||
round>入寓登记</el-button>
|
||||
|
||||
<el-button @click="ccly" class="aside-button-container-bn" style="margin-left: 0px; margin-bottom: 20px"
|
||||
round>出乘离寓</el-button>
|
||||
|
||||
<el-button @click="jcbz" class="aside-button-container-bn" style="margin-left: 0px; margin-bottom: 20px"
|
||||
round>就餐补助</el-button>
|
||||
</div>
|
||||
</el-aside>
|
||||
|
||||
<el-container>
|
||||
<el-header class="el-header-main"> {{ gymc }} </el-header>
|
||||
|
||||
<el-main>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名:">
|
||||
<el-input v-model="jcxx.rymc" style="width: 60%" disabled class="disabled-input"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位:">
|
||||
<el-input v-model="jcxx.rydw" style="width: 60%" disabled class="disabled-input"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入寓时间:">
|
||||
<el-input v-model="jcxx.sjrysj" style="width: 60%" disabled class="disabled-input"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="离寓时间:">
|
||||
<el-input v-model="jcxx.sjlysj" style="width: 60%" disabled class="disabled-input"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车号:">
|
||||
<el-select v-model="jcxx.jch" filterable @change="jch_handleOption" placeholder="请输入机车号">
|
||||
<el-option v-for="option in jlxxList" :value="option.id" :label="option.jch" :key="option.id"
|
||||
v-show="option.jch" style="width: 100%"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车次:">
|
||||
<el-select v-model="jcxx.cc" filterable @change="cc_handleOption" placeholder="请输入车次号">
|
||||
<el-option v-for="option in jlxxList" :value="option.id" :label="option.cc" :key="option.id"
|
||||
v-show="option.cc"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="jcxx.cc" style="width: 60%"></el-input> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开车日期:">
|
||||
<el-date-picker type="date" placeholder="请选择开车日期" v-model="jcxx.kcrq"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
<!-- <el-input v-model="jcxx.jcsj" style="width: 60%" disabled class="disabled-input"></el-input> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开车时间:">
|
||||
<el-input v-model="jcxx.kcsj_hm" style="width: 60%" disabled class="disabled-input"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入住房号:">
|
||||
<el-input
|
||||
v-model="jcxx.room_no"
|
||||
style="width: 90%"
|
||||
disabled
|
||||
class="disabled-input"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="openRoomDialog"
|
||||
style="margin-left: 0px"
|
||||
:disabled="ryzt != '1'"
|
||||
>选择房间</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="房间人数:">
|
||||
<el-input
|
||||
v-model="jcxx.personTotal"
|
||||
style="width: 60%"
|
||||
disabled
|
||||
class="disabled-input"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="餐补金额:">
|
||||
<el-input v-model="jcxx.cbje" style="width: 60%" disabled class="disabled-input"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
|
||||
<el-footer>
|
||||
<el-button type="primary" @click="finalCheck" style="margin-right: 20px; margin-left: 20px">确认</el-button>
|
||||
<el-button @click="roomVisible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</el-form>
|
||||
|
||||
<el-dialog :visible.sync="djVisible" :title="djVisibleTitle" class="myDialog" width="30%">
|
||||
<el-form label-width="40px">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="rymc" style="width: 70%"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工号">
|
||||
<el-input v-model="ryid" style="width: 70%"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="照片" style="text-align: center;">
|
||||
<img :src="imageSrc" style="height: 200px;width: 150px" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="单位">
|
||||
<el-input v-model="rydw" style="width: 50%"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工种">
|
||||
<el-input v-model="rygz" style="width: 50%"></el-input>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="rydj_submit" v-if="ryzt == '1'">确定</el-button>
|
||||
<el-button type="primary" @click="ccly_submit" v-if="ryzt == '3'">确定</el-button>
|
||||
<el-button type="primary" @click="jcbz_submit" v-if="ryzt == '5'">确定</el-button>
|
||||
<el-button @click="djVisible = false">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="meal3Visible" title="就餐补助" class="myDialog" width="30%">
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="员工姓名">
|
||||
<el-input v-model="rymc" style="width: 70%"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工工号">
|
||||
<el-input v-model="ryid" style="width: 70%"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="餐补金额">
|
||||
<el-input v-model="cbjeMeal3" style="width: 70%"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="meal3_submit">确定</el-button>
|
||||
<el-button @click="ClosedjVisible">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="roomVisible" title="选择房间" class="myDialog" width="90%">
|
||||
<el-container>
|
||||
<el-aside width="70%" class="el-aside-room">
|
||||
<div class="scroll-container">
|
||||
<el-card>
|
||||
<el-row v-for="(group, index) in roomListGroup" :key="index" :style="setFlootStyle(index)">
|
||||
<!-- <el-col :span="1">1</el-col > -->
|
||||
<!-- :class="{'is-plain':!item.plain}" -->
|
||||
|
||||
<el-col v-for="item in group" :key="item.room_no" :span="2">
|
||||
<el-button icon="el-icon-price-tag" :type="setRoomStyle(item.room_status)" @click="select_room(item)"
|
||||
:plain="!item.plain">{{ item.room_no }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header class="roomHeader">房屋信息快速预览</el-header>
|
||||
<el-main>
|
||||
<el-form label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-button type="success" size="small" style="width: 90%; margin-bottom: 4px" @click="changRoomPlain(1)"
|
||||
plain>空闲房屋: <span style="font-weight: bold">{{
|
||||
statusCount.one
|
||||
}}</span> 间</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="info" size="small" style="width: 90%; margin-bottom: 4px" @click="changRoomPlain(2)"
|
||||
plain>住满房屋: <span style="font-weight: bold">{{
|
||||
statusCount.two
|
||||
}}</span> 间</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="warning" size="small" style="width: 90%; margin-bottom: 4px" @click="changRoomPlain(3)"
|
||||
plain>待清扫房屋: <span style="font-weight: bold">{{
|
||||
statusCount.three
|
||||
}}</span> 间</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="danger" size="small" style="width: 90%; margin-bottom: 4px" @click="changRoomPlain(4)"
|
||||
plain>不能入住房屋: <span style="font-weight: bold">{{
|
||||
statusCount.four
|
||||
}}</span> 间</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button type="primary" size="small" style="width: 90%; margin-bottom: 4px" @click="changRoomPlain(5)"
|
||||
plain>未满房屋: <span style="font-weight: bold">{{
|
||||
statusCount.five
|
||||
}}</span> 间</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button size="small" style="width: 90%; margin-bottom: 4px" @click="changRoomPlain(6)"
|
||||
plain>房屋总计: <span style="font-weight: bold">{{
|
||||
roomList.length
|
||||
}}</span> 间</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-form-item label="房间号码 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.room_no" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="房屋状态 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.room_status_ch" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="房间人数 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.personTotal" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="入住人员 :">
|
||||
<el-input class="disabled-input" style="width: 75%" v-model="room.person_name" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<div class="middleDiv">
|
||||
<el-button type="primary" @click="checkRoom" style="margin-right: 20px">确认</el-button>
|
||||
<el-button @click="roomVisible = false">取消</el-button>
|
||||
</div>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-container>
|
||||
|
||||
<!-- <template #footer>
|
||||
<el-button type="primary" @click="rydj_submit">确定</el-button>
|
||||
<el-button @click="roomVisible = false">取消</el-button>
|
||||
</template> -->
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getJcxxByRyid,
|
||||
getJlxxList,
|
||||
getRoomList,
|
||||
submitAll,
|
||||
getBtje_info,
|
||||
getRyxx,
|
||||
updateMeal3,
|
||||
getBtje_infoMeal3,
|
||||
} from "@/api/jcgl/jcgl";
|
||||
|
||||
const channelObj = new BroadcastChannel("channel_rly_jc");
|
||||
|
||||
export default {
|
||||
name: "main",
|
||||
data() {
|
||||
return {
|
||||
gyid: "SYBXC",
|
||||
gymc: "沈阳站公寓",
|
||||
ryzt: "",
|
||||
ryid: undefined,
|
||||
rymc: undefined,
|
||||
cbjeMeal3: undefined,
|
||||
rydw: undefined,
|
||||
rygz: undefined,
|
||||
djVisible: false,
|
||||
djVisibleTitle: "",
|
||||
imageSrc: '',
|
||||
roomVisible: false,
|
||||
meal3Visible: false,
|
||||
jcxx: {},
|
||||
jlxxList: [],
|
||||
jlxxParams: {},
|
||||
roomList: [],
|
||||
roomListGroup: [],
|
||||
room: {},
|
||||
roomSelected: false,
|
||||
statusCount: {
|
||||
one: 0,
|
||||
two: 0,
|
||||
three: 0,
|
||||
four: 0,
|
||||
five: 0,
|
||||
},
|
||||
video: null,
|
||||
videoStart: false,
|
||||
recorder: null,
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
if (!navigator.getDisplayMedia && !navigator.mediaDevices.getDisplayMedia) {
|
||||
let error = "Your browser does NOT support the getDisplayMedia API.";
|
||||
throw new Error(error);
|
||||
}
|
||||
this.video = document.querySelector("video");
|
||||
},
|
||||
|
||||
destroyed: function () {
|
||||
// 离开页面生命周期函数
|
||||
this.websocketclose();
|
||||
},
|
||||
/////////////////////
|
||||
|
||||
mounted() {
|
||||
console.log("mount");
|
||||
this.get_jlxxList();
|
||||
this.initWebSocket();
|
||||
|
||||
getRoomList().then((r) => {
|
||||
this.roomList = r.data;
|
||||
let group = this.roomList.reduce((acc, item) => {
|
||||
let groupValue = item["row_sort"];
|
||||
if (!acc[groupValue]) {
|
||||
acc[groupValue] = [];
|
||||
}
|
||||
acc[groupValue].push(item);
|
||||
return acc;
|
||||
}, {});
|
||||
this.roomListGroup = Object.values(group);
|
||||
this.roomList.forEach((entity) => {
|
||||
let fieldValue = entity.room_status;
|
||||
let groupNanme = this.zd_roomStatus_groupName(fieldValue);
|
||||
this.statusCount[groupNanme] = this.statusCount[groupNanme] + 1;
|
||||
});
|
||||
console.log(this.roomListGroup, "statusCount");
|
||||
});
|
||||
},
|
||||
// watch:{
|
||||
// roomListGroup:{
|
||||
// handler:function(){
|
||||
// this.updateButtonStyles();
|
||||
// },
|
||||
// deep:true
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
// updateButtonStyles(){
|
||||
|
||||
// },
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
initWebSocket: function () {
|
||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||
this.websock = new WebSocket(
|
||||
"ws://"+apiRoot+"/yktgl/rlywebsocket/test33"
|
||||
);
|
||||
this.websock.onopen = this.websocketonopen;
|
||||
this.websock.onerror = this.websocketonerror;
|
||||
this.websock.onmessage = this.websocketonmessage;
|
||||
this.websock.onclose = this.websocketclose;
|
||||
},
|
||||
websocketonopen: function () {
|
||||
console.log("WebSocket连接成功");
|
||||
},
|
||||
websocketonerror: function () {
|
||||
console.log("WebSocket连接发生错误" + 11);
|
||||
},
|
||||
websocketonmessage: function (e) {
|
||||
// this.visible_badge = false;
|
||||
// this.visible_jlxxtx = true;
|
||||
// this.playVoice();
|
||||
// console.log(e.data); // console.log(e);
|
||||
|
||||
var messageObj = JSON.parse(e.data);
|
||||
console.log(messageObj);
|
||||
|
||||
this.ryid = messageObj.icNum;
|
||||
this.rymc = messageObj.icName;
|
||||
this.imageSrc = this.stringToBase64BinaryArrayToImage(messageObj.pic);
|
||||
console.log(this.ryid);
|
||||
},
|
||||
websocketclose: function (e) {
|
||||
location.reload();
|
||||
console.log("connection closed (" + e.code + ")");
|
||||
},
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
resetRYXX() {
|
||||
this.ryid = undefined;
|
||||
this.rymc = undefined;
|
||||
this.cbjeMeal3 = undefined;
|
||||
this.rygz = undefined;
|
||||
},
|
||||
rydj() {
|
||||
this.resetRYXX();
|
||||
this.djVisible = true;
|
||||
this.ryzt = "1";
|
||||
this.djVisibleTitle = "入寓登记,请刷脸!";
|
||||
this.startRecording();
|
||||
},
|
||||
rydj_submit() {
|
||||
let sj_temp = this.get_now_string();
|
||||
getRyxx(this.ryid).then((r) => {
|
||||
console.log(r, "852258");
|
||||
if (r.code == "11111") {
|
||||
this.$message.error(r.msg);
|
||||
return;
|
||||
}
|
||||
this.jcxx.rymc = r.data.xm;
|
||||
this.jcxx.rydw = r.data.dw;
|
||||
this.jcxx.ryid = r.data.ryid;
|
||||
this.jcxx.sjrysj = sj_temp;
|
||||
this.jcxx.sfjc = r.data.sfjc;
|
||||
// this.$forceUpdate();
|
||||
let tmp = {};
|
||||
tmp.sjrysj = sj_temp;
|
||||
tmp.gyid = this.gyid;
|
||||
console.log(tmp, "78788");
|
||||
getBtje_info(tmp).then((r) => {
|
||||
this.jcxx.cbje = r.data;
|
||||
this.djVisible = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
ccly() {
|
||||
this.resetRYXX();
|
||||
this.djVisible = true;
|
||||
this.ryzt = "3";
|
||||
this.djVisibleTitle = "出乘离寓,请刷脸!";
|
||||
// this.startRecording();
|
||||
},
|
||||
ccly_submit() {
|
||||
// let tmp = {};
|
||||
// tmp.ryid = ;
|
||||
// console.log(tmp);
|
||||
getJcxxByRyid(this.ryid).then((r) => {
|
||||
if (r.code == "11111") {
|
||||
this.$message.error(r.msg);
|
||||
return;
|
||||
}
|
||||
this.jcxx = r.data;
|
||||
this.jcxx.kcrq = this.jcxx.kcsj.split(" ")[0];
|
||||
this.jcxx.kcsj_hm = this.jcxx.kcsj.split(" ")[1].substr(0, 5);
|
||||
console.log(this.roomList, "88888");
|
||||
|
||||
console.log(this.jcxx, "25852");
|
||||
this.roomList.forEach((room) => {
|
||||
if (room.room_no == this.jcxx.fjh) {
|
||||
this.jcxx = { ...this.jcxx, ...room };
|
||||
this.jcxx.personTotal = room.live_person + " / " + room.bed_numbers;
|
||||
}
|
||||
});
|
||||
console.log(this.jcxx, "98989898");
|
||||
|
||||
// 更新数据中的当前日期时间
|
||||
this.jcxx.sjlysj = this.get_now_string();
|
||||
this.djVisible = false;
|
||||
});
|
||||
},
|
||||
jcbz() {
|
||||
this.resetRYXX();
|
||||
this.djVisible = true;
|
||||
this.ryzt = "5";
|
||||
this.djVisibleTitle = "就餐补助,请刷脸!";
|
||||
// this.startRecording();
|
||||
},
|
||||
jcbz_submit() {
|
||||
getBtje_infoMeal3(this.ryid).then((r) => {
|
||||
if (r.code == "11111") {
|
||||
this.$message.error(r.msg);
|
||||
return;
|
||||
}
|
||||
this.djVisible = false;
|
||||
this.meal3Visible = true;
|
||||
this.cbjeMeal3 = r.data;
|
||||
});
|
||||
},
|
||||
meal3_submit() {
|
||||
let temp = {};
|
||||
temp.ryid = this.ryid;
|
||||
temp.cbjeMeal3 = this.cbjeMeal3;
|
||||
updateMeal3(temp).then((r) => {
|
||||
console.log(r, "第三餐补");
|
||||
if (r.data == "1") {
|
||||
this.$message.success("补助获取成功!");
|
||||
// this.$router.go(0);
|
||||
} else {
|
||||
this.$message.error("补助获取失败!");
|
||||
}
|
||||
});
|
||||
},
|
||||
get_now_string() {
|
||||
let now = new Date();
|
||||
let year = now.getFullYear();
|
||||
let month = (now.getMonth() + 1).toString().padStart(2, "0");
|
||||
let day = now.getDate().toString().padStart(2, "0");
|
||||
let hours = now.getHours().toString().padStart(2, "0");
|
||||
let minutes = now.getMinutes().toString().padStart(2, "0");
|
||||
let seconds = now.getSeconds().toString().padStart(2, "0");
|
||||
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
},
|
||||
get_jlxxList() {
|
||||
// console.log(this.jlxxParams, "get_jlxxList");
|
||||
getJlxxList(this.jlxxParams).then((r) => {
|
||||
// console.log(r, "r_getJlXxList");
|
||||
this.jlxxList = r.data;
|
||||
console.log(this.jlxxList, "jlxxList");
|
||||
});
|
||||
},
|
||||
jch_handleOption() {
|
||||
// console.log(this.jcxx.jch, "选中的select_jch");
|
||||
const option = this.jlxxList.find(
|
||||
(option) => option.id === this.jcxx.jch
|
||||
);
|
||||
// console.log(option, "选中后的option");
|
||||
this.jcxx = { ...this.jcxx, ...option };
|
||||
|
||||
// 执行后续连带操作,包括给开始时间和餐补金额赋值
|
||||
this.handleOption_demo();
|
||||
},
|
||||
cc_handleOption() {
|
||||
// console.log(this.jcxx.cc, "选中的select_cc");
|
||||
const option = this.jlxxList.find((option) => option.id === this.jcxx.cc);
|
||||
// console.log(option, "选中后的option");
|
||||
this.jcxx = { ...this.jcxx, ...option };
|
||||
// console.log(this.jcxx, "合并后的jcxx");
|
||||
this.handleOption_demo();
|
||||
},
|
||||
handleOption_demo() {
|
||||
let temp = {};
|
||||
temp.sjrysj = this.jcxx.sjrysj;
|
||||
temp.gyid = this.gyid;
|
||||
// 餐补
|
||||
getBtje_info(temp).then((r) => {
|
||||
this.jcxx.cbje = r.data;
|
||||
});
|
||||
// 要给开车时间赋值
|
||||
this.jcxx.kcsj_hm = this.jcxx.kcsj;
|
||||
},
|
||||
ClosedjVisible() {
|
||||
this.djVisible = false;
|
||||
// this.stopRecording();
|
||||
},
|
||||
// get_RoomList() {
|
||||
// getRoomList().then((r) => {
|
||||
// console.log(r, "r_getgetRoomList");
|
||||
// this.roomList = r.data;
|
||||
// console.log(this.roomList, "roomlist");
|
||||
// });
|
||||
// },
|
||||
// get_RoomList() {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// getRoomList().then((r) => {
|
||||
// console.log(r, "r_getgetRoomList");
|
||||
// this.roomList = r.data;
|
||||
// console.log(this.roomList, "roomlist");
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
openRoomDialog() {
|
||||
this.roomVisible = true;
|
||||
},
|
||||
|
||||
setRoomStyle(room_status) {
|
||||
return this.zd_roomStatus_buttonType(room_status);
|
||||
},
|
||||
setFlootStyle(index) {
|
||||
if (index % 2 == 1 && index != this.roomListGroup.length - 1) {
|
||||
return "padding-bottom:10px;border-bottom:1px solid black";
|
||||
} else if (index % 2 == 1 && index == this.roomListGroup.length - 1) {
|
||||
return "padding-bottom:10px";
|
||||
} else {
|
||||
return "padding-top:10px;padding-bottom:10px";
|
||||
}
|
||||
},
|
||||
// setRoomButtonPlain(item) {
|
||||
// if (item.plaiLabel == 1) {
|
||||
// return false;
|
||||
// } else {
|
||||
// return true;
|
||||
// }
|
||||
// },
|
||||
changRoomPlain(fieldValue) {
|
||||
this.roomListGroup.forEach((group) => {
|
||||
group.forEach((room) => {
|
||||
if (room.room_status == fieldValue && fieldValue != 6) {
|
||||
room.plain = true;
|
||||
} else {
|
||||
room.plain = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.$forceUpdate();
|
||||
},
|
||||
select_room(item) {
|
||||
if (!['1', '3', '5', '6'].includes(String(item.room_status))) {
|
||||
this.$message.error("仅状态为 1、3、5、6 的房间可选择入住");
|
||||
return;
|
||||
}
|
||||
this.room = item;
|
||||
this.roomSelected = true;
|
||||
let fieldValue = this.room.room_status;
|
||||
this.room.room_status_ch = this.zd_roomStatus_statusName(fieldValue);
|
||||
this.room.personTotal =
|
||||
this.room.live_person + " / " + this.room.bed_numbers;
|
||||
console.log(this.room, "选择后的房间");
|
||||
},
|
||||
checkRoom() {
|
||||
if (this.roomSelected) {
|
||||
let fieldValue = this.room.room_status;
|
||||
if (!['1', '3', '5', '6'].includes(String(fieldValue))) {
|
||||
this.$message.error("当前房屋不可入住!");
|
||||
return;
|
||||
}
|
||||
let tmp = this.zd_roomStatus_statusName(fieldValue);
|
||||
let message_tmp =
|
||||
"当前房号:" +
|
||||
this.room.room_no +
|
||||
",房屋状态:" +
|
||||
tmp +
|
||||
",是否确认?";
|
||||
this.$confirm(message_tmp, "提示", {
|
||||
cancelButtonClass: "btn-custom-cancel",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
}).then(() => {
|
||||
this.jcxx = { ...this.jcxx, ...this.room };
|
||||
this.roomVisible = false;
|
||||
});
|
||||
} else {
|
||||
this.$message.error("请先选择房间!");
|
||||
|
||||
return;
|
||||
}
|
||||
},
|
||||
finalCheck() {
|
||||
if (this.jcxx.kcsj == null) {
|
||||
this.$message.error("请填写车号/车次!");
|
||||
return;
|
||||
}
|
||||
if (this.jcxx.kcrq == null) {
|
||||
this.$message.error("请填写开车日期!");
|
||||
return;
|
||||
}
|
||||
this.jcxx.kcsj = this.jcxx.kcrq + " " + this.jcxx.kcsj_hm;
|
||||
this.jcxx.ryzt = this.ryzt;
|
||||
this.jcxx.ylysj = this.jcxx.lysj;
|
||||
console.log('提交jcxx',this.jcxx);
|
||||
if(this.jcxx.ryzt == '1'){
|
||||
channelObj.postMessage(JSON.stringify(this.jcxx));
|
||||
this.$router.go(0);
|
||||
}
|
||||
if (this.jcxx.ryzt == '3') {
|
||||
console.log(34567);
|
||||
submitAll(this.jcxx).then((r) => {
|
||||
if (r.data == "1") {
|
||||
this.$message.success("离寓成功!");
|
||||
console.log('离寓');
|
||||
channelObj.postMessage(JSON.stringify(this.jcxx));
|
||||
this.$router.go(0);
|
||||
} else {
|
||||
this.$message.error(r.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// this.$router.go(0);
|
||||
}
|
||||
// submitAll(this.jcxx).then((r) => {
|
||||
// console.log(r, "最终提交结果");
|
||||
// if (r.data == "1") {
|
||||
// this.$message.success("保存成功!");
|
||||
// if(this.jcxx.ryzt == '1'){
|
||||
// channelObj.postMessage(this.jcxx.ryid);
|
||||
// }else if(this.jcxx.ryzt == '3'){
|
||||
// console.log('离寓');
|
||||
// channelObj.postMessage('message');
|
||||
// }
|
||||
// this.$router.go(0);
|
||||
// } else {
|
||||
// this.$message.error(r.msg);
|
||||
// }
|
||||
// });
|
||||
// this.stopRecording();
|
||||
},
|
||||
zd_roomStatus_buttonType(room_status) {
|
||||
if (room_status == 1) {
|
||||
return "success";
|
||||
} else if (room_status == 2) {
|
||||
return "info";
|
||||
} else if (room_status == 3) {
|
||||
return "warning";
|
||||
} else if (room_status == 4) {
|
||||
return "danger";
|
||||
} else if (room_status == 5) {
|
||||
return "primary";
|
||||
}
|
||||
},
|
||||
zd_roomStatus_groupName(room_status) {
|
||||
if (room_status == 1) {
|
||||
return "one";
|
||||
} else if (room_status == 2) {
|
||||
return "two";
|
||||
} else if (room_status == 3) {
|
||||
return "three";
|
||||
} else if (room_status == 4) {
|
||||
return "four";
|
||||
} else if (room_status == 5) {
|
||||
return "five";
|
||||
}
|
||||
},
|
||||
zd_roomStatus_statusName(room_status) {
|
||||
if (room_status == 1) {
|
||||
return "空闲";
|
||||
} else if (room_status == 2) {
|
||||
return "住满";
|
||||
} else if (room_status == 3) {
|
||||
return "待清扫";
|
||||
} else if (room_status == 4) {
|
||||
return "不能入住";
|
||||
} else if (room_status == 5) {
|
||||
return "未满";
|
||||
}
|
||||
},
|
||||
|
||||
invokeGetDisplayMedia(success, error) {
|
||||
let displaymediastreamconstraints = {
|
||||
video: {
|
||||
displaySurface: "monitor", // monitor, window, application, browser
|
||||
logicalSurface: true,
|
||||
cursor: "always", // never, always, motion
|
||||
},
|
||||
};
|
||||
// above constraints are NOT supported YET
|
||||
// that's why overridnig them
|
||||
displaymediastreamconstraints = {
|
||||
video: true,
|
||||
};
|
||||
if (navigator.mediaDevices.getDisplayMedia) {
|
||||
navigator.mediaDevices
|
||||
.getDisplayMedia(displaymediastreamconstraints)
|
||||
.then(success)
|
||||
.catch(error);
|
||||
} else {
|
||||
navigator
|
||||
.getDisplayMedia(displaymediastreamconstraints)
|
||||
.then(success)
|
||||
.catch(error);
|
||||
}
|
||||
},
|
||||
captureScreen(callback) {
|
||||
this.invokeGetDisplayMedia(
|
||||
(screen) => {
|
||||
this.addStreamStopListener(screen, () => {
|
||||
//
|
||||
});
|
||||
callback(screen);
|
||||
},
|
||||
function (error) {
|
||||
console.error(error);
|
||||
alert(
|
||||
"Unable to capture your screen. Please check console logs.\n" +
|
||||
error
|
||||
);
|
||||
}
|
||||
);
|
||||
},
|
||||
addStreamStopListener(stream, callback) {
|
||||
stream.addEventListener(
|
||||
"ended",
|
||||
function () {
|
||||
callback();
|
||||
callback = function () { };
|
||||
},
|
||||
false
|
||||
);
|
||||
stream.addEventListener(
|
||||
"inactive",
|
||||
function () {
|
||||
callback();
|
||||
callback = function () { };
|
||||
},
|
||||
false
|
||||
);
|
||||
stream.getTracks().forEach((track) => {
|
||||
track.addEventListener(
|
||||
"ended",
|
||||
() => {
|
||||
this.stopRecording();
|
||||
callback();
|
||||
callback = function () { };
|
||||
},
|
||||
false
|
||||
);
|
||||
track.addEventListener(
|
||||
"inactive",
|
||||
function () {
|
||||
callback();
|
||||
callback = function () { };
|
||||
},
|
||||
false
|
||||
);
|
||||
});
|
||||
},
|
||||
startRecording() {
|
||||
this.captureScreen((screen) => {
|
||||
this.video.srcObject = screen;
|
||||
this.recorder = RecordRTC(screen, {
|
||||
type: "video",
|
||||
});
|
||||
this.recorder.startRecording();
|
||||
// release screen on stopRecording
|
||||
this.recorder.screen = screen;
|
||||
this.videoStart = true;
|
||||
});
|
||||
},
|
||||
stopRecordingCallback() {
|
||||
this.video.src = this.video.srcObject = null;
|
||||
this.video.src = URL.createObjectURL(this.recorder.getBlob());
|
||||
// 如果需要下载录屏文件可加上下面代码
|
||||
let url = URL.createObjectURL(this.recorder.getBlob());
|
||||
const a = document.createElement("a");
|
||||
document.body.appendChild(a);
|
||||
a.style.display = "none";
|
||||
a.href = url;
|
||||
a.download = new Date() + ".mp4";
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
//以上是下载所需代码
|
||||
this.recorder.screen.stop();
|
||||
this.recorder.destroy();
|
||||
this.recorder = null;
|
||||
this.videoStart = false;
|
||||
},
|
||||
stopRecording() {
|
||||
this.recorder.stopRecording(this.stopRecordingCallback);
|
||||
},
|
||||
|
||||
stringToBase64BinaryArrayToImage(str) {
|
||||
var newStr = str.replace(/[^A-Za-z0-9+/]/g, '');
|
||||
var binaryString = atob(newStr);
|
||||
var byteArray = new Uint8Array(binaryString.length);
|
||||
for (var i = 0; i < binaryString.length; i++) {
|
||||
byteArray[i] = binaryString.charCodeAt(i);
|
||||
}
|
||||
var blob = new Blob([byteArray], { type: 'image/jpeg' });
|
||||
var imageUrl = URL.createObjectURL(blob);
|
||||
return imageUrl;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.myDialog .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.el-aside-main {
|
||||
background-color: #d3dce6;
|
||||
color: #333;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-header-main {
|
||||
background-color: bisque;
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-aside-room {
|
||||
height: 535px;
|
||||
}
|
||||
|
||||
.aside-button-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.aside-button-container-bn {
|
||||
font-size: 40px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.middleDiv {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.roomHeader {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: cadetblue;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disabled-input .el-input__inner {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
.btn-custom-cancel {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,22 @@
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
const TokenKey = 'Admin-Token'
|
||||
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
}
|
||||
|
||||
export function setToken(token) {
|
||||
return Cookies.set(TokenKey, token)
|
||||
}
|
||||
|
||||
export function removeToken() {
|
||||
return Cookies.remove(TokenKey)
|
||||
}
|
||||
|
||||
// 清除所有登录信息
|
||||
export function clearLoginInfo() {
|
||||
removeToken()
|
||||
localStorage.removeItem('gyid')
|
||||
localStorage.removeItem('loginAccount')
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
import Vue from 'vue'
|
||||
import { mergeRecursive } from "@/utils/ruoyi";
|
||||
import DictMeta from './DictMeta'
|
||||
import DictData from './DictData'
|
||||
|
||||
const DEFAULT_DICT_OPTIONS = {
|
||||
types: [],
|
||||
}
|
||||
|
||||
/**
|
||||
* @classdesc 字典
|
||||
* @property {Object} label 标签对象,内部属性名为字典类型名称
|
||||
* @property {Object} dict 字段数组,内部属性名为字典类型名称
|
||||
* @property {Array.<DictMeta>} _dictMetas 字典元数据数组
|
||||
*/
|
||||
export default class Dict {
|
||||
constructor() {
|
||||
this.owner = null
|
||||
this.label = {}
|
||||
this.type = {}
|
||||
}
|
||||
|
||||
init(options) {
|
||||
if (options instanceof Array) {
|
||||
options = { types: options }
|
||||
}
|
||||
const opts = mergeRecursive(DEFAULT_DICT_OPTIONS, options)
|
||||
if (opts.types === undefined) {
|
||||
throw new Error('need dict types')
|
||||
}
|
||||
const ps = []
|
||||
this._dictMetas = opts.types.map(t => DictMeta.parse(t))
|
||||
this._dictMetas.forEach(dictMeta => {
|
||||
const type = dictMeta.type
|
||||
Vue.set(this.label, type, {})
|
||||
Vue.set(this.type, type, [])
|
||||
if (dictMeta.lazy) {
|
||||
return
|
||||
}
|
||||
ps.push(loadDict(this, dictMeta))
|
||||
})
|
||||
return Promise.all(ps)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新加载字典
|
||||
* @param {String} type 字典类型
|
||||
*/
|
||||
reloadDict(type) {
|
||||
const dictMeta = this._dictMetas.find(e => e.type === type)
|
||||
if (dictMeta === undefined) {
|
||||
return Promise.reject(`the dict meta of ${type} was not found`)
|
||||
}
|
||||
return loadDict(this, dictMeta)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载字典
|
||||
* @param {Dict} dict 字典
|
||||
* @param {DictMeta} dictMeta 字典元数据
|
||||
* @returns {Promise}
|
||||
*/
|
||||
function loadDict(dict, dictMeta) {
|
||||
return dictMeta.request(dictMeta)
|
||||
.then(response => {
|
||||
const type = dictMeta.type
|
||||
let dicts = dictMeta.responseConverter(response, dictMeta)
|
||||
if (!(dicts instanceof Array)) {
|
||||
console.error('the return of responseConverter must be Array.<DictData>')
|
||||
dicts = []
|
||||
} else if (dicts.filter(d => d instanceof DictData).length !== dicts.length) {
|
||||
console.error('the type of elements in dicts must be DictData')
|
||||
dicts = []
|
||||
}
|
||||
dict.type[type].splice(0, Number.MAX_SAFE_INTEGER, ...dicts)
|
||||
dicts.forEach(d => {
|
||||
Vue.set(dict.label[type], d.value, d.label)
|
||||
})
|
||||
return dicts
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import DictOptions from './DictOptions'
|
||||
import DictData from './DictData'
|
||||
|
||||
export default function(dict, dictMeta) {
|
||||
const label = determineDictField(dict, dictMeta.labelField, ...DictOptions.DEFAULT_LABEL_FIELDS)
|
||||
const value = determineDictField(dict, dictMeta.valueField, ...DictOptions.DEFAULT_VALUE_FIELDS)
|
||||
return new DictData(dict[label], dict[value], dict)
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定字典字段
|
||||
* @param {DictData} dict
|
||||
* @param {...String} fields
|
||||
*/
|
||||
function determineDictField(dict, ...fields) {
|
||||
return fields.find(f => Object.prototype.hasOwnProperty.call(dict, f))
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @classdesc 字典数据
|
||||
* @property {String} label 标签
|
||||
* @property {*} value 标签
|
||||
* @property {Object} raw 原始数据
|
||||
*/
|
||||
export default class DictData {
|
||||
constructor(label, value, raw) {
|
||||
this.label = label
|
||||
this.value = value
|
||||
this.raw = raw
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import { mergeRecursive } from "@/utils/ruoyi";
|
||||
import DictOptions from './DictOptions'
|
||||
|
||||
/**
|
||||
* @classdesc 字典元数据
|
||||
* @property {String} type 类型
|
||||
* @property {Function} request 请求
|
||||
* @property {String} label 标签字段
|
||||
* @property {String} value 值字段
|
||||
*/
|
||||
export default class DictMeta {
|
||||
constructor(options) {
|
||||
this.type = options.type
|
||||
this.request = options.request
|
||||
this.responseConverter = options.responseConverter
|
||||
this.labelField = options.labelField
|
||||
this.valueField = options.valueField
|
||||
this.lazy = options.lazy === true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解析字典元数据
|
||||
* @param {Object} options
|
||||
* @returns {DictMeta}
|
||||
*/
|
||||
DictMeta.parse= function(options) {
|
||||
let opts = null
|
||||
if (typeof options === 'string') {
|
||||
opts = DictOptions.metas[options] || {}
|
||||
opts.type = options
|
||||
} else if (typeof options === 'object') {
|
||||
opts = options
|
||||
}
|
||||
opts = mergeRecursive(DictOptions.metas['*'], opts)
|
||||
return new DictMeta(opts)
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import { mergeRecursive } from "@/utils/ruoyi";
|
||||
import dictConverter from './DictConverter'
|
||||
|
||||
export const options = {
|
||||
metas: {
|
||||
'*': {
|
||||
/**
|
||||
* 字典请求,方法签名为function(dictMeta: DictMeta): Promise
|
||||
*/
|
||||
request: (dictMeta) => {
|
||||
console.log(`load dict ${dictMeta.type}`)
|
||||
return Promise.resolve([])
|
||||
},
|
||||
/**
|
||||
* 字典响应数据转换器,方法签名为function(response: Object, dictMeta: DictMeta): DictData
|
||||
*/
|
||||
responseConverter,
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 默认标签字段
|
||||
*/
|
||||
DEFAULT_LABEL_FIELDS: ['label', 'name', 'title'],
|
||||
/**
|
||||
* 默认值字段
|
||||
*/
|
||||
DEFAULT_VALUE_FIELDS: ['value', 'id', 'uid', 'key'],
|
||||
}
|
||||
|
||||
/**
|
||||
* 映射字典
|
||||
* @param {Object} response 字典数据
|
||||
* @param {DictMeta} dictMeta 字典元数据
|
||||
* @returns {DictData}
|
||||
*/
|
||||
function responseConverter(response, dictMeta) {
|
||||
const dicts = response.content instanceof Array ? response.content : response
|
||||
if (dicts === undefined) {
|
||||
console.warn(`no dict data of "${dictMeta.type}" found in the response`)
|
||||
return []
|
||||
}
|
||||
return dicts.map(d => dictConverter(d, dictMeta))
|
||||
}
|
||||
|
||||
export function mergeOptions(src) {
|
||||
mergeRecursive(options, src)
|
||||
}
|
||||
|
||||
export default options
|
||||
@@ -0,0 +1,33 @@
|
||||
import Dict from './Dict'
|
||||
import { mergeOptions } from './DictOptions'
|
||||
|
||||
export default function(Vue, options) {
|
||||
mergeOptions(options)
|
||||
Vue.mixin({
|
||||
data() {
|
||||
if (this.$options === undefined || this.$options.dicts === undefined || this.$options.dicts === null) {
|
||||
return {}
|
||||
}
|
||||
const dict = new Dict()
|
||||
dict.owner = this
|
||||
return {
|
||||
dict
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!(this.dict instanceof Dict)) {
|
||||
return
|
||||
}
|
||||
options.onCreated && options.onCreated(this.dict)
|
||||
this.dict.init(this.$options.dicts).then(() => {
|
||||
options.onReady && options.onReady(this.dict)
|
||||
this.$nextTick(() => {
|
||||
this.$emit('dictReady', this.dict)
|
||||
if (this.$options.methods && this.$options.methods.onDictReady instanceof Function) {
|
||||
this.$options.methods.onDictReady.call(this, this.dict)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
'401': '认证失败,无法访问系统资源',
|
||||
'403': '当前操作没有权限',
|
||||
'404': '访问资源不存在',
|
||||
'default': '系统未知错误,请反馈给管理员'
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import axios from 'axios';
|
||||
|
||||
// 创建 axios 实例
|
||||
const service = axios.create({
|
||||
// 使用相对路径,自动适配部署环境
|
||||
baseURL: '/yktgl',
|
||||
// 如果需要手动指定地址(仅开发调试时使用),取消下面某行注释
|
||||
// baseURL: 'http://10.32.72.165:8081/yktgl',
|
||||
// baseURL: 'http://10.32.205.183:8081/yktgl',
|
||||
timeout: 50000
|
||||
});
|
||||
|
||||
// 导出 axios 实例
|
||||
export default service;
|
||||
@@ -0,0 +1,438 @@
|
||||
export const formConf = {
|
||||
formRef: 'elForm',
|
||||
formModel: 'formData',
|
||||
size: 'medium',
|
||||
labelPosition: 'right',
|
||||
labelWidth: 100,
|
||||
formRules: 'rules',
|
||||
gutter: 15,
|
||||
disabled: false,
|
||||
span: 24,
|
||||
formBtns: true
|
||||
}
|
||||
|
||||
export const inputComponents = [
|
||||
{
|
||||
label: '单行文本',
|
||||
tag: 'el-input',
|
||||
tagIcon: 'input',
|
||||
placeholder: '请输入',
|
||||
defaultValue: undefined,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: { width: '100%' },
|
||||
clearable: true,
|
||||
prepend: '',
|
||||
append: '',
|
||||
'prefix-icon': '',
|
||||
'suffix-icon': '',
|
||||
maxlength: null,
|
||||
'show-word-limit': false,
|
||||
readonly: false,
|
||||
disabled: false,
|
||||
required: true,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/input'
|
||||
},
|
||||
{
|
||||
label: '多行文本',
|
||||
tag: 'el-input',
|
||||
tagIcon: 'textarea',
|
||||
type: 'textarea',
|
||||
placeholder: '请输入',
|
||||
defaultValue: undefined,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
autosize: {
|
||||
minRows: 4,
|
||||
maxRows: 4
|
||||
},
|
||||
style: { width: '100%' },
|
||||
maxlength: null,
|
||||
'show-word-limit': false,
|
||||
readonly: false,
|
||||
disabled: false,
|
||||
required: true,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/input'
|
||||
},
|
||||
{
|
||||
label: '密码',
|
||||
tag: 'el-input',
|
||||
tagIcon: 'password',
|
||||
placeholder: '请输入',
|
||||
defaultValue: undefined,
|
||||
span: 24,
|
||||
'show-password': true,
|
||||
labelWidth: null,
|
||||
style: { width: '100%' },
|
||||
clearable: true,
|
||||
prepend: '',
|
||||
append: '',
|
||||
'prefix-icon': '',
|
||||
'suffix-icon': '',
|
||||
maxlength: null,
|
||||
'show-word-limit': false,
|
||||
readonly: false,
|
||||
disabled: false,
|
||||
required: true,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/input'
|
||||
},
|
||||
{
|
||||
label: '计数器',
|
||||
tag: 'el-input-number',
|
||||
tagIcon: 'number',
|
||||
placeholder: '',
|
||||
defaultValue: undefined,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
min: undefined,
|
||||
max: undefined,
|
||||
step: undefined,
|
||||
'step-strictly': false,
|
||||
precision: undefined,
|
||||
'controls-position': '',
|
||||
disabled: false,
|
||||
required: true,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/input-number'
|
||||
}
|
||||
]
|
||||
|
||||
export const selectComponents = [
|
||||
{
|
||||
label: '下拉选择',
|
||||
tag: 'el-select',
|
||||
tagIcon: 'select',
|
||||
placeholder: '请选择',
|
||||
defaultValue: undefined,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: { width: '100%' },
|
||||
clearable: true,
|
||||
disabled: false,
|
||||
required: true,
|
||||
filterable: false,
|
||||
multiple: false,
|
||||
options: [{
|
||||
label: '选项一',
|
||||
value: 1
|
||||
}, {
|
||||
label: '选项二',
|
||||
value: 2
|
||||
}],
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/select'
|
||||
},
|
||||
{
|
||||
label: '级联选择',
|
||||
tag: 'el-cascader',
|
||||
tagIcon: 'cascader',
|
||||
placeholder: '请选择',
|
||||
defaultValue: [],
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: { width: '100%' },
|
||||
props: {
|
||||
props: {
|
||||
multiple: false
|
||||
}
|
||||
},
|
||||
'show-all-levels': true,
|
||||
disabled: false,
|
||||
clearable: true,
|
||||
filterable: false,
|
||||
required: true,
|
||||
options: [{
|
||||
id: 1,
|
||||
value: 1,
|
||||
label: '选项1',
|
||||
children: [{
|
||||
id: 2,
|
||||
value: 2,
|
||||
label: '选项1-1'
|
||||
}]
|
||||
}],
|
||||
dataType: 'dynamic',
|
||||
labelKey: 'label',
|
||||
valueKey: 'value',
|
||||
childrenKey: 'children',
|
||||
separator: '/',
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/cascader'
|
||||
},
|
||||
{
|
||||
label: '单选框组',
|
||||
tag: 'el-radio-group',
|
||||
tagIcon: 'radio',
|
||||
defaultValue: undefined,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: {},
|
||||
optionType: 'default',
|
||||
border: false,
|
||||
size: 'medium',
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: [{
|
||||
label: '选项一',
|
||||
value: 1
|
||||
}, {
|
||||
label: '选项二',
|
||||
value: 2
|
||||
}],
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/radio'
|
||||
},
|
||||
{
|
||||
label: '多选框组',
|
||||
tag: 'el-checkbox-group',
|
||||
tagIcon: 'checkbox',
|
||||
defaultValue: [],
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: {},
|
||||
optionType: 'default',
|
||||
border: false,
|
||||
size: 'medium',
|
||||
disabled: false,
|
||||
required: true,
|
||||
options: [{
|
||||
label: '选项一',
|
||||
value: 1
|
||||
}, {
|
||||
label: '选项二',
|
||||
value: 2
|
||||
}],
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/checkbox'
|
||||
},
|
||||
{
|
||||
label: '开关',
|
||||
tag: 'el-switch',
|
||||
tagIcon: 'switch',
|
||||
defaultValue: false,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: {},
|
||||
disabled: false,
|
||||
required: true,
|
||||
'active-text': '',
|
||||
'inactive-text': '',
|
||||
'active-color': null,
|
||||
'inactive-color': null,
|
||||
'active-value': true,
|
||||
'inactive-value': false,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/switch'
|
||||
},
|
||||
{
|
||||
label: '滑块',
|
||||
tag: 'el-slider',
|
||||
tagIcon: 'slider',
|
||||
defaultValue: null,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
disabled: false,
|
||||
required: true,
|
||||
min: 0,
|
||||
max: 100,
|
||||
step: 1,
|
||||
'show-stops': false,
|
||||
range: false,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/slider'
|
||||
},
|
||||
{
|
||||
label: '时间选择',
|
||||
tag: 'el-time-picker',
|
||||
tagIcon: 'time',
|
||||
placeholder: '请选择',
|
||||
defaultValue: null,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: { width: '100%' },
|
||||
disabled: false,
|
||||
clearable: true,
|
||||
required: true,
|
||||
'picker-options': {
|
||||
selectableRange: '00:00:00-23:59:59'
|
||||
},
|
||||
format: 'HH:mm:ss',
|
||||
'value-format': 'HH:mm:ss',
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/time-picker'
|
||||
},
|
||||
{
|
||||
label: '时间范围',
|
||||
tag: 'el-time-picker',
|
||||
tagIcon: 'time-range',
|
||||
defaultValue: null,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: { width: '100%' },
|
||||
disabled: false,
|
||||
clearable: true,
|
||||
required: true,
|
||||
'is-range': true,
|
||||
'range-separator': '至',
|
||||
'start-placeholder': '开始时间',
|
||||
'end-placeholder': '结束时间',
|
||||
format: 'HH:mm:ss',
|
||||
'value-format': 'HH:mm:ss',
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/time-picker'
|
||||
},
|
||||
{
|
||||
label: '日期选择',
|
||||
tag: 'el-date-picker',
|
||||
tagIcon: 'date',
|
||||
placeholder: '请选择',
|
||||
defaultValue: null,
|
||||
type: 'date',
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: { width: '100%' },
|
||||
disabled: false,
|
||||
clearable: true,
|
||||
required: true,
|
||||
format: 'yyyy-MM-dd',
|
||||
'value-format': 'yyyy-MM-dd',
|
||||
readonly: false,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/date-picker'
|
||||
},
|
||||
{
|
||||
label: '日期范围',
|
||||
tag: 'el-date-picker',
|
||||
tagIcon: 'date-range',
|
||||
defaultValue: null,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: { width: '100%' },
|
||||
type: 'daterange',
|
||||
'range-separator': '至',
|
||||
'start-placeholder': '开始日期',
|
||||
'end-placeholder': '结束日期',
|
||||
disabled: false,
|
||||
clearable: true,
|
||||
required: true,
|
||||
format: 'yyyy-MM-dd',
|
||||
'value-format': 'yyyy-MM-dd',
|
||||
readonly: false,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/date-picker'
|
||||
},
|
||||
{
|
||||
label: '评分',
|
||||
tag: 'el-rate',
|
||||
tagIcon: 'rate',
|
||||
defaultValue: 0,
|
||||
span: 24,
|
||||
labelWidth: null,
|
||||
style: {},
|
||||
max: 5,
|
||||
'allow-half': false,
|
||||
'show-text': false,
|
||||
'show-score': false,
|
||||
disabled: false,
|
||||
required: true,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/rate'
|
||||
},
|
||||
{
|
||||
label: '颜色选择',
|
||||
tag: 'el-color-picker',
|
||||
tagIcon: 'color',
|
||||
defaultValue: null,
|
||||
labelWidth: null,
|
||||
'show-alpha': false,
|
||||
'color-format': '',
|
||||
disabled: false,
|
||||
required: true,
|
||||
size: 'medium',
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/color-picker'
|
||||
},
|
||||
{
|
||||
label: '上传',
|
||||
tag: 'el-upload',
|
||||
tagIcon: 'upload',
|
||||
action: 'https://jsonplaceholder.typicode.com/posts/',
|
||||
defaultValue: null,
|
||||
labelWidth: null,
|
||||
disabled: false,
|
||||
required: true,
|
||||
accept: '',
|
||||
name: 'file',
|
||||
'auto-upload': true,
|
||||
showTip: false,
|
||||
buttonText: '点击上传',
|
||||
fileSize: 2,
|
||||
sizeUnit: 'MB',
|
||||
'list-type': 'text',
|
||||
multiple: false,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/upload'
|
||||
}
|
||||
]
|
||||
|
||||
export const layoutComponents = [
|
||||
{
|
||||
layout: 'rowFormItem',
|
||||
tagIcon: 'row',
|
||||
type: 'default',
|
||||
justify: 'start',
|
||||
align: 'top',
|
||||
label: '行容器',
|
||||
layoutTree: true,
|
||||
children: [],
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/layout'
|
||||
},
|
||||
{
|
||||
layout: 'colFormItem',
|
||||
label: '按钮',
|
||||
changeTag: true,
|
||||
labelWidth: null,
|
||||
tag: 'el-button',
|
||||
tagIcon: 'button',
|
||||
span: 24,
|
||||
default: '主要按钮',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-search',
|
||||
size: 'medium',
|
||||
disabled: false,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/button'
|
||||
}
|
||||
]
|
||||
|
||||
// 组件rule的触发方式,无触发方式的组件不生成rule
|
||||
export const trigger = {
|
||||
'el-input': 'blur',
|
||||
'el-input-number': 'blur',
|
||||
'el-select': 'change',
|
||||
'el-radio-group': 'change',
|
||||
'el-checkbox-group': 'change',
|
||||
'el-cascader': 'change',
|
||||
'el-time-picker': 'change',
|
||||
'el-date-picker': 'change',
|
||||
'el-rate': 'change'
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
const styles = {
|
||||
'el-rate': '.el-rate{display: inline-block; vertical-align: text-top;}',
|
||||
'el-upload': '.el-upload__tip{line-height: 1.2;}'
|
||||
}
|
||||
|
||||
function addCss(cssList, el) {
|
||||
const css = styles[el.tag]
|
||||
css && cssList.indexOf(css) === -1 && cssList.push(css)
|
||||
if (el.children) {
|
||||
el.children.forEach(el2 => addCss(cssList, el2))
|
||||
}
|
||||
}
|
||||
|
||||
export function makeUpCss(conf) {
|
||||
const cssList = []
|
||||
conf.fields.forEach(el => addCss(cssList, el))
|
||||
return cssList.join('\n')
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
export default [
|
||||
{
|
||||
layout: 'colFormItem',
|
||||
tagIcon: 'input',
|
||||
label: '手机号',
|
||||
vModel: 'mobile',
|
||||
formId: 6,
|
||||
tag: 'el-input',
|
||||
placeholder: '请输入手机号',
|
||||
defaultValue: '',
|
||||
span: 24,
|
||||
style: { width: '100%' },
|
||||
clearable: true,
|
||||
prepend: '',
|
||||
append: '',
|
||||
'prefix-icon': 'el-icon-mobile',
|
||||
'suffix-icon': '',
|
||||
maxlength: 11,
|
||||
'show-word-limit': true,
|
||||
readonly: false,
|
||||
disabled: false,
|
||||
required: true,
|
||||
changeTag: true,
|
||||
regList: [{
|
||||
pattern: '/^1(3|4|5|7|8|9)\\d{9}$/',
|
||||
message: '手机号格式错误'
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,359 @@
|
||||
/* eslint-disable max-len */
|
||||
import { trigger } from './config'
|
||||
|
||||
let confGlobal
|
||||
let someSpanIsNot24
|
||||
|
||||
export function dialogWrapper(str) {
|
||||
return `<el-dialog v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" title="Dialog Title">
|
||||
${str}
|
||||
<div slot="footer">
|
||||
<el-button @click="close">取消</el-button>
|
||||
<el-button type="primary" @click="handleConfirm">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>`
|
||||
}
|
||||
|
||||
export function vueTemplate(str) {
|
||||
return `<template>
|
||||
<div>
|
||||
${str}
|
||||
</div>
|
||||
</template>`
|
||||
}
|
||||
|
||||
export function vueScript(str) {
|
||||
return `<script>
|
||||
${str}
|
||||
</script>`
|
||||
}
|
||||
|
||||
export function cssStyle(cssStr) {
|
||||
return `<style>
|
||||
${cssStr}
|
||||
</style>`
|
||||
}
|
||||
|
||||
function buildFormTemplate(conf, child, type) {
|
||||
let labelPosition = ''
|
||||
if (conf.labelPosition !== 'right') {
|
||||
labelPosition = `label-position="${conf.labelPosition}"`
|
||||
}
|
||||
const disabled = conf.disabled ? `:disabled="${conf.disabled}"` : ''
|
||||
let str = `<el-form ref="${conf.formRef}" :model="${conf.formModel}" :rules="${conf.formRules}" size="${conf.size}" ${disabled} label-width="${conf.labelWidth}px" ${labelPosition}>
|
||||
${child}
|
||||
${buildFromBtns(conf, type)}
|
||||
</el-form>`
|
||||
if (someSpanIsNot24) {
|
||||
str = `<el-row :gutter="${conf.gutter}">
|
||||
${str}
|
||||
</el-row>`
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
function buildFromBtns(conf, type) {
|
||||
let str = ''
|
||||
if (conf.formBtns && type === 'file') {
|
||||
str = `<el-form-item size="large">
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>`
|
||||
if (someSpanIsNot24) {
|
||||
str = `<el-col :span="24">
|
||||
${str}
|
||||
</el-col>`
|
||||
}
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
// span不为24的用el-col包裹
|
||||
function colWrapper(element, str) {
|
||||
if (someSpanIsNot24 || element.span !== 24) {
|
||||
return `<el-col :span="${element.span}">
|
||||
${str}
|
||||
</el-col>`
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
const layouts = {
|
||||
colFormItem(element) {
|
||||
let labelWidth = ''
|
||||
if (element.labelWidth && element.labelWidth !== confGlobal.labelWidth) {
|
||||
labelWidth = `label-width="${element.labelWidth}px"`
|
||||
}
|
||||
const required = !trigger[element.tag] && element.required ? 'required' : ''
|
||||
const tagDom = tags[element.tag] ? tags[element.tag](element) : null
|
||||
let str = `<el-form-item ${labelWidth} label="${element.label}" prop="${element.vModel}" ${required}>
|
||||
${tagDom}
|
||||
</el-form-item>`
|
||||
str = colWrapper(element, str)
|
||||
return str
|
||||
},
|
||||
rowFormItem(element) {
|
||||
const type = element.type === 'default' ? '' : `type="${element.type}"`
|
||||
const justify = element.type === 'default' ? '' : `justify="${element.justify}"`
|
||||
const align = element.type === 'default' ? '' : `align="${element.align}"`
|
||||
const gutter = element.gutter ? `gutter="${element.gutter}"` : ''
|
||||
const children = element.children.map(el => layouts[el.layout](el))
|
||||
let str = `<el-row ${type} ${justify} ${align} ${gutter}>
|
||||
${children.join('\n')}
|
||||
</el-row>`
|
||||
str = colWrapper(element, str)
|
||||
return str
|
||||
}
|
||||
}
|
||||
|
||||
const tags = {
|
||||
'el-button': el => {
|
||||
const {
|
||||
tag, disabled
|
||||
} = attrBuilder(el)
|
||||
const type = el.type ? `type="${el.type}"` : ''
|
||||
const icon = el.icon ? `icon="${el.icon}"` : ''
|
||||
const size = el.size ? `size="${el.size}"` : ''
|
||||
let child = buildElButtonChild(el)
|
||||
|
||||
if (child) child = `\n${child}\n` // 换行
|
||||
return `<${el.tag} ${type} ${icon} ${size} ${disabled}>${child}</${el.tag}>`
|
||||
},
|
||||
'el-input': el => {
|
||||
const {
|
||||
disabled, vModel, clearable, placeholder, width
|
||||
} = attrBuilder(el)
|
||||
const maxlength = el.maxlength ? `:maxlength="${el.maxlength}"` : ''
|
||||
const showWordLimit = el['show-word-limit'] ? 'show-word-limit' : ''
|
||||
const readonly = el.readonly ? 'readonly' : ''
|
||||
const prefixIcon = el['prefix-icon'] ? `prefix-icon='${el['prefix-icon']}'` : ''
|
||||
const suffixIcon = el['suffix-icon'] ? `suffix-icon='${el['suffix-icon']}'` : ''
|
||||
const showPassword = el['show-password'] ? 'show-password' : ''
|
||||
const type = el.type ? `type="${el.type}"` : ''
|
||||
const autosize = el.autosize && el.autosize.minRows
|
||||
? `:autosize="{minRows: ${el.autosize.minRows}, maxRows: ${el.autosize.maxRows}}"`
|
||||
: ''
|
||||
let child = buildElInputChild(el)
|
||||
|
||||
if (child) child = `\n${child}\n` // 换行
|
||||
return `<${el.tag} ${vModel} ${type} ${placeholder} ${maxlength} ${showWordLimit} ${readonly} ${disabled} ${clearable} ${prefixIcon} ${suffixIcon} ${showPassword} ${autosize} ${width}>${child}</${el.tag}>`
|
||||
},
|
||||
'el-input-number': el => {
|
||||
const { disabled, vModel, placeholder } = attrBuilder(el)
|
||||
const controlsPosition = el['controls-position'] ? `controls-position=${el['controls-position']}` : ''
|
||||
const min = el.min ? `:min='${el.min}'` : ''
|
||||
const max = el.max ? `:max='${el.max}'` : ''
|
||||
const step = el.step ? `:step='${el.step}'` : ''
|
||||
const stepStrictly = el['step-strictly'] ? 'step-strictly' : ''
|
||||
const precision = el.precision ? `:precision='${el.precision}'` : ''
|
||||
|
||||
return `<${el.tag} ${vModel} ${placeholder} ${step} ${stepStrictly} ${precision} ${controlsPosition} ${min} ${max} ${disabled}></${el.tag}>`
|
||||
},
|
||||
'el-select': el => {
|
||||
const {
|
||||
disabled, vModel, clearable, placeholder, width
|
||||
} = attrBuilder(el)
|
||||
const filterable = el.filterable ? 'filterable' : ''
|
||||
const multiple = el.multiple ? 'multiple' : ''
|
||||
let child = buildElSelectChild(el)
|
||||
|
||||
if (child) child = `\n${child}\n` // 换行
|
||||
return `<${el.tag} ${vModel} ${placeholder} ${disabled} ${multiple} ${filterable} ${clearable} ${width}>${child}</${el.tag}>`
|
||||
},
|
||||
'el-radio-group': el => {
|
||||
const { disabled, vModel } = attrBuilder(el)
|
||||
const size = `size="${el.size}"`
|
||||
let child = buildElRadioGroupChild(el)
|
||||
|
||||
if (child) child = `\n${child}\n` // 换行
|
||||
return `<${el.tag} ${vModel} ${size} ${disabled}>${child}</${el.tag}>`
|
||||
},
|
||||
'el-checkbox-group': el => {
|
||||
const { disabled, vModel } = attrBuilder(el)
|
||||
const size = `size="${el.size}"`
|
||||
const min = el.min ? `:min="${el.min}"` : ''
|
||||
const max = el.max ? `:max="${el.max}"` : ''
|
||||
let child = buildElCheckboxGroupChild(el)
|
||||
|
||||
if (child) child = `\n${child}\n` // 换行
|
||||
return `<${el.tag} ${vModel} ${min} ${max} ${size} ${disabled}>${child}</${el.tag}>`
|
||||
},
|
||||
'el-switch': el => {
|
||||
const { disabled, vModel } = attrBuilder(el)
|
||||
const activeText = el['active-text'] ? `active-text="${el['active-text']}"` : ''
|
||||
const inactiveText = el['inactive-text'] ? `inactive-text="${el['inactive-text']}"` : ''
|
||||
const activeColor = el['active-color'] ? `active-color="${el['active-color']}"` : ''
|
||||
const inactiveColor = el['inactive-color'] ? `inactive-color="${el['inactive-color']}"` : ''
|
||||
const activeValue = el['active-value'] !== true ? `:active-value='${JSON.stringify(el['active-value'])}'` : ''
|
||||
const inactiveValue = el['inactive-value'] !== false ? `:inactive-value='${JSON.stringify(el['inactive-value'])}'` : ''
|
||||
|
||||
return `<${el.tag} ${vModel} ${activeText} ${inactiveText} ${activeColor} ${inactiveColor} ${activeValue} ${inactiveValue} ${disabled}></${el.tag}>`
|
||||
},
|
||||
'el-cascader': el => {
|
||||
const {
|
||||
disabled, vModel, clearable, placeholder, width
|
||||
} = attrBuilder(el)
|
||||
const options = el.options ? `:options="${el.vModel}Options"` : ''
|
||||
const props = el.props ? `:props="${el.vModel}Props"` : ''
|
||||
const showAllLevels = el['show-all-levels'] ? '' : ':show-all-levels="false"'
|
||||
const filterable = el.filterable ? 'filterable' : ''
|
||||
const separator = el.separator === '/' ? '' : `separator="${el.separator}"`
|
||||
|
||||
return `<${el.tag} ${vModel} ${options} ${props} ${width} ${showAllLevels} ${placeholder} ${separator} ${filterable} ${clearable} ${disabled}></${el.tag}>`
|
||||
},
|
||||
'el-slider': el => {
|
||||
const { disabled, vModel } = attrBuilder(el)
|
||||
const min = el.min ? `:min='${el.min}'` : ''
|
||||
const max = el.max ? `:max='${el.max}'` : ''
|
||||
const step = el.step ? `:step='${el.step}'` : ''
|
||||
const range = el.range ? 'range' : ''
|
||||
const showStops = el['show-stops'] ? `:show-stops="${el['show-stops']}"` : ''
|
||||
|
||||
return `<${el.tag} ${min} ${max} ${step} ${vModel} ${range} ${showStops} ${disabled}></${el.tag}>`
|
||||
},
|
||||
'el-time-picker': el => {
|
||||
const {
|
||||
disabled, vModel, clearable, placeholder, width
|
||||
} = attrBuilder(el)
|
||||
const startPlaceholder = el['start-placeholder'] ? `start-placeholder="${el['start-placeholder']}"` : ''
|
||||
const endPlaceholder = el['end-placeholder'] ? `end-placeholder="${el['end-placeholder']}"` : ''
|
||||
const rangeSeparator = el['range-separator'] ? `range-separator="${el['range-separator']}"` : ''
|
||||
const isRange = el['is-range'] ? 'is-range' : ''
|
||||
const format = el.format ? `format="${el.format}"` : ''
|
||||
const valueFormat = el['value-format'] ? `value-format="${el['value-format']}"` : ''
|
||||
const pickerOptions = el['picker-options'] ? `:picker-options='${JSON.stringify(el['picker-options'])}'` : ''
|
||||
|
||||
return `<${el.tag} ${vModel} ${isRange} ${format} ${valueFormat} ${pickerOptions} ${width} ${placeholder} ${startPlaceholder} ${endPlaceholder} ${rangeSeparator} ${clearable} ${disabled}></${el.tag}>`
|
||||
},
|
||||
'el-date-picker': el => {
|
||||
const {
|
||||
disabled, vModel, clearable, placeholder, width
|
||||
} = attrBuilder(el)
|
||||
const startPlaceholder = el['start-placeholder'] ? `start-placeholder="${el['start-placeholder']}"` : ''
|
||||
const endPlaceholder = el['end-placeholder'] ? `end-placeholder="${el['end-placeholder']}"` : ''
|
||||
const rangeSeparator = el['range-separator'] ? `range-separator="${el['range-separator']}"` : ''
|
||||
const format = el.format ? `format="${el.format}"` : ''
|
||||
const valueFormat = el['value-format'] ? `value-format="${el['value-format']}"` : ''
|
||||
const type = el.type === 'date' ? '' : `type="${el.type}"`
|
||||
const readonly = el.readonly ? 'readonly' : ''
|
||||
|
||||
return `<${el.tag} ${type} ${vModel} ${format} ${valueFormat} ${width} ${placeholder} ${startPlaceholder} ${endPlaceholder} ${rangeSeparator} ${clearable} ${readonly} ${disabled}></${el.tag}>`
|
||||
},
|
||||
'el-rate': el => {
|
||||
const { disabled, vModel } = attrBuilder(el)
|
||||
const max = el.max ? `:max='${el.max}'` : ''
|
||||
const allowHalf = el['allow-half'] ? 'allow-half' : ''
|
||||
const showText = el['show-text'] ? 'show-text' : ''
|
||||
const showScore = el['show-score'] ? 'show-score' : ''
|
||||
|
||||
return `<${el.tag} ${vModel} ${allowHalf} ${showText} ${showScore} ${disabled}></${el.tag}>`
|
||||
},
|
||||
'el-color-picker': el => {
|
||||
const { disabled, vModel } = attrBuilder(el)
|
||||
const size = `size="${el.size}"`
|
||||
const showAlpha = el['show-alpha'] ? 'show-alpha' : ''
|
||||
const colorFormat = el['color-format'] ? `color-format="${el['color-format']}"` : ''
|
||||
|
||||
return `<${el.tag} ${vModel} ${size} ${showAlpha} ${colorFormat} ${disabled}></${el.tag}>`
|
||||
},
|
||||
'el-upload': el => {
|
||||
const disabled = el.disabled ? ':disabled=\'true\'' : ''
|
||||
const action = el.action ? `:action="${el.vModel}Action"` : ''
|
||||
const multiple = el.multiple ? 'multiple' : ''
|
||||
const listType = el['list-type'] !== 'text' ? `list-type="${el['list-type']}"` : ''
|
||||
const accept = el.accept ? `accept="${el.accept}"` : ''
|
||||
const name = el.name !== 'file' ? `name="${el.name}"` : ''
|
||||
const autoUpload = el['auto-upload'] === false ? ':auto-upload="false"' : ''
|
||||
const beforeUpload = `:before-upload="${el.vModel}BeforeUpload"`
|
||||
const fileList = `:file-list="${el.vModel}fileList"`
|
||||
const ref = `ref="${el.vModel}"`
|
||||
let child = buildElUploadChild(el)
|
||||
|
||||
if (child) child = `\n${child}\n` // 换行
|
||||
return `<${el.tag} ${ref} ${fileList} ${action} ${autoUpload} ${multiple} ${beforeUpload} ${listType} ${accept} ${name} ${disabled}>${child}</${el.tag}>`
|
||||
}
|
||||
}
|
||||
|
||||
function attrBuilder(el) {
|
||||
return {
|
||||
vModel: `v-model="${confGlobal.formModel}.${el.vModel}"`,
|
||||
clearable: el.clearable ? 'clearable' : '',
|
||||
placeholder: el.placeholder ? `placeholder="${el.placeholder}"` : '',
|
||||
width: el.style && el.style.width ? ':style="{width: \'100%\'}"' : '',
|
||||
disabled: el.disabled ? ':disabled=\'true\'' : ''
|
||||
}
|
||||
}
|
||||
|
||||
// el-buttin 子级
|
||||
function buildElButtonChild(conf) {
|
||||
const children = []
|
||||
if (conf.default) {
|
||||
children.push(conf.default)
|
||||
}
|
||||
return children.join('\n')
|
||||
}
|
||||
|
||||
// el-input innerHTML
|
||||
function buildElInputChild(conf) {
|
||||
const children = []
|
||||
if (conf.prepend) {
|
||||
children.push(`<template slot="prepend">${conf.prepend}</template>`)
|
||||
}
|
||||
if (conf.append) {
|
||||
children.push(`<template slot="append">${conf.append}</template>`)
|
||||
}
|
||||
return children.join('\n')
|
||||
}
|
||||
|
||||
function buildElSelectChild(conf) {
|
||||
const children = []
|
||||
if (conf.options && conf.options.length) {
|
||||
children.push(`<el-option v-for="(item, index) in ${conf.vModel}Options" :key="index" :label="item.label" :value="item.value" :disabled="item.disabled"></el-option>`)
|
||||
}
|
||||
return children.join('\n')
|
||||
}
|
||||
|
||||
function buildElRadioGroupChild(conf) {
|
||||
const children = []
|
||||
if (conf.options && conf.options.length) {
|
||||
const tag = conf.optionType === 'button' ? 'el-radio-button' : 'el-radio'
|
||||
const border = conf.border ? 'border' : ''
|
||||
children.push(`<${tag} v-for="(item, index) in ${conf.vModel}Options" :key="index" :label="item.value" :disabled="item.disabled" ${border}>{{item.label}}</${tag}>`)
|
||||
}
|
||||
return children.join('\n')
|
||||
}
|
||||
|
||||
function buildElCheckboxGroupChild(conf) {
|
||||
const children = []
|
||||
if (conf.options && conf.options.length) {
|
||||
const tag = conf.optionType === 'button' ? 'el-checkbox-button' : 'el-checkbox'
|
||||
const border = conf.border ? 'border' : ''
|
||||
children.push(`<${tag} v-for="(item, index) in ${conf.vModel}Options" :key="index" :label="item.value" :disabled="item.disabled" ${border}>{{item.label}}</${tag}>`)
|
||||
}
|
||||
return children.join('\n')
|
||||
}
|
||||
|
||||
function buildElUploadChild(conf) {
|
||||
const list = []
|
||||
if (conf['list-type'] === 'picture-card') list.push('<i class="el-icon-plus"></i>')
|
||||
else list.push(`<el-button size="small" type="primary" icon="el-icon-upload">${conf.buttonText}</el-button>`)
|
||||
if (conf.showTip) list.push(`<div slot="tip" class="el-upload__tip">只能上传不超过 ${conf.fileSize}${conf.sizeUnit} 的${conf.accept}文件</div>`)
|
||||
return list.join('\n')
|
||||
}
|
||||
|
||||
export function makeUpHtml(conf, type) {
|
||||
const htmlList = []
|
||||
confGlobal = conf
|
||||
someSpanIsNot24 = conf.fields.some(item => item.span !== 24)
|
||||
conf.fields.forEach(el => {
|
||||
htmlList.push(layouts[el.layout](el))
|
||||
})
|
||||
const htmlStr = htmlList.join('\n')
|
||||
|
||||
let temp = buildFormTemplate(conf, htmlStr, type)
|
||||
if (type === 'dialog') {
|
||||
temp = dialogWrapper(temp)
|
||||
}
|
||||
confGlobal = null
|
||||
return temp
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
["platform-eleme","eleme","delete-solid","delete","s-tools","setting","user-solid","user","phone","phone-outline","more","more-outline","star-on","star-off","s-goods","goods","warning","warning-outline","question","info","remove","circle-plus","success","error","zoom-in","zoom-out","remove-outline","circle-plus-outline","circle-check","circle-close","s-help","help","minus","plus","check","close","picture","picture-outline","picture-outline-round","upload","upload2","download","camera-solid","camera","video-camera-solid","video-camera","message-solid","bell","s-cooperation","s-order","s-platform","s-fold","s-unfold","s-operation","s-promotion","s-home","s-release","s-ticket","s-management","s-open","s-shop","s-marketing","s-flag","s-comment","s-finance","s-claim","s-custom","s-opportunity","s-data","s-check","s-grid","menu","share","d-caret","caret-left","caret-right","caret-bottom","caret-top","bottom-left","bottom-right","back","right","bottom","top","top-left","top-right","arrow-left","arrow-right","arrow-down","arrow-up","d-arrow-left","d-arrow-right","video-pause","video-play","refresh","refresh-right","refresh-left","finished","sort","sort-up","sort-down","rank","loading","view","c-scale-to-original","date","edit","edit-outline","folder","folder-opened","folder-add","folder-remove","folder-delete","folder-checked","tickets","document-remove","document-delete","document-copy","document-checked","document","document-add","printer","paperclip","takeaway-box","search","monitor","attract","mobile","scissors","umbrella","headset","brush","mouse","coordinate","magic-stick","reading","data-line","data-board","pie-chart","data-analysis","collection-tag","film","suitcase","suitcase-1","receiving","collection","files","notebook-1","notebook-2","toilet-paper","office-building","school","table-lamp","house","no-smoking","smoking","shopping-cart-full","shopping-cart-1","shopping-cart-2","shopping-bag-1","shopping-bag-2","sold-out","sell","present","box","bank-card","money","coin","wallet","discount","price-tag","news","guide","male","female","thumb","cpu","link","connection","open","turn-off","set-up","chat-round","chat-line-round","chat-square","chat-dot-round","chat-dot-square","chat-line-square","message","postcard","position","turn-off-microphone","microphone","close-notification","bangzhu","time","odometer","crop","aim","switch-button","full-screen","copy-document","mic","stopwatch","medal-1","medal","trophy","trophy-1","first-aid-kit","discover","place","location","location-outline","location-information","add-location","delete-location","map-location","alarm-clock","timer","watch-1","watch","lock","unlock","key","service","mobile-phone","bicycle","truck","ship","basketball","football","soccer","baseball","wind-power","light-rain","lightning","heavy-rain","sunrise","sunrise-1","sunset","sunny","cloudy","partly-cloudy","cloudy-and-sunny","moon","moon-night","dish","dish-1","food","chicken","fork-spoon","knife-fork","burger","tableware","sugar","dessert","ice-cream","hot-water","water-cup","coffee-cup","cold-drink","goblet","goblet-full","goblet-square","goblet-square-full","refrigerator","grape","watermelon","cherry","apple","pear","orange","coffee","ice-tea","ice-drink","milk-tea","potato-strips","lollipop","ice-cream-square","ice-cream-round"]
|
||||
@@ -0,0 +1,235 @@
|
||||
import { exportDefault, titleCase } from '@/utils/index'
|
||||
import { trigger } from './config'
|
||||
|
||||
const units = {
|
||||
KB: '1024',
|
||||
MB: '1024 / 1024',
|
||||
GB: '1024 / 1024 / 1024'
|
||||
}
|
||||
let confGlobal
|
||||
const inheritAttrs = {
|
||||
file: '',
|
||||
dialog: 'inheritAttrs: false,'
|
||||
}
|
||||
|
||||
|
||||
export function makeUpJs(conf, type) {
|
||||
confGlobal = conf = JSON.parse(JSON.stringify(conf))
|
||||
const dataList = []
|
||||
const ruleList = []
|
||||
const optionsList = []
|
||||
const propsList = []
|
||||
const methodList = mixinMethod(type)
|
||||
const uploadVarList = []
|
||||
|
||||
conf.fields.forEach(el => {
|
||||
buildAttributes(el, dataList, ruleList, optionsList, methodList, propsList, uploadVarList)
|
||||
})
|
||||
|
||||
const script = buildexport(
|
||||
conf,
|
||||
type,
|
||||
dataList.join('\n'),
|
||||
ruleList.join('\n'),
|
||||
optionsList.join('\n'),
|
||||
uploadVarList.join('\n'),
|
||||
propsList.join('\n'),
|
||||
methodList.join('\n')
|
||||
)
|
||||
confGlobal = null
|
||||
return script
|
||||
}
|
||||
|
||||
function buildAttributes(el, dataList, ruleList, optionsList, methodList, propsList, uploadVarList) {
|
||||
buildData(el, dataList)
|
||||
buildRules(el, ruleList)
|
||||
|
||||
if (el.options && el.options.length) {
|
||||
buildOptions(el, optionsList)
|
||||
if (el.dataType === 'dynamic') {
|
||||
const model = `${el.vModel}Options`
|
||||
const options = titleCase(model)
|
||||
buildOptionMethod(`get${options}`, model, methodList)
|
||||
}
|
||||
}
|
||||
|
||||
if (el.props && el.props.props) {
|
||||
buildProps(el, propsList)
|
||||
}
|
||||
|
||||
if (el.action && el.tag === 'el-upload') {
|
||||
uploadVarList.push(
|
||||
`${el.vModel}Action: '${el.action}',
|
||||
${el.vModel}fileList: [],`
|
||||
)
|
||||
methodList.push(buildBeforeUpload(el))
|
||||
if (!el['auto-upload']) {
|
||||
methodList.push(buildSubmitUpload(el))
|
||||
}
|
||||
}
|
||||
|
||||
if (el.children) {
|
||||
el.children.forEach(el2 => {
|
||||
buildAttributes(el2, dataList, ruleList, optionsList, methodList, propsList, uploadVarList)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function mixinMethod(type) {
|
||||
const list = []; const
|
||||
minxins = {
|
||||
file: confGlobal.formBtns ? {
|
||||
submitForm: `submitForm() {
|
||||
this.$refs['${confGlobal.formRef}'].validate(valid => {
|
||||
if(!valid) return
|
||||
// TODO 提交表单
|
||||
})
|
||||
},`,
|
||||
resetForm: `resetForm() {
|
||||
this.$refs['${confGlobal.formRef}'].resetFields()
|
||||
},`
|
||||
} : null,
|
||||
dialog: {
|
||||
onOpen: 'onOpen() {},',
|
||||
onClose: `onClose() {
|
||||
this.$refs['${confGlobal.formRef}'].resetFields()
|
||||
},`,
|
||||
close: `close() {
|
||||
this.$emit('update:visible', false)
|
||||
},`,
|
||||
handleConfirm: `handleConfirm() {
|
||||
this.$refs['${confGlobal.formRef}'].validate(valid => {
|
||||
if(!valid) return
|
||||
this.close()
|
||||
})
|
||||
},`
|
||||
}
|
||||
}
|
||||
|
||||
const methods = minxins[type]
|
||||
if (methods) {
|
||||
Object.keys(methods).forEach(key => {
|
||||
list.push(methods[key])
|
||||
})
|
||||
}
|
||||
|
||||
return list
|
||||
}
|
||||
|
||||
function buildData(conf, dataList) {
|
||||
if (conf.vModel === undefined) return
|
||||
let defaultValue
|
||||
if (typeof (conf.defaultValue) === 'string' && !conf.multiple) {
|
||||
defaultValue = `'${conf.defaultValue}'`
|
||||
} else {
|
||||
defaultValue = `${JSON.stringify(conf.defaultValue)}`
|
||||
}
|
||||
dataList.push(`${conf.vModel}: ${defaultValue},`)
|
||||
}
|
||||
|
||||
function buildRules(conf, ruleList) {
|
||||
if (conf.vModel === undefined) return
|
||||
const rules = []
|
||||
if (trigger[conf.tag]) {
|
||||
if (conf.required) {
|
||||
const type = Array.isArray(conf.defaultValue) ? 'type: \'array\',' : ''
|
||||
let message = Array.isArray(conf.defaultValue) ? `请至少选择一个${conf.vModel}` : conf.placeholder
|
||||
if (message === undefined) message = `${conf.label}不能为空`
|
||||
rules.push(`{ required: true, ${type} message: '${message}', trigger: '${trigger[conf.tag]}' }`)
|
||||
}
|
||||
if (conf.regList && Array.isArray(conf.regList)) {
|
||||
conf.regList.forEach(item => {
|
||||
if (item.pattern) {
|
||||
rules.push(`{ pattern: ${eval(item.pattern)}, message: '${item.message}', trigger: '${trigger[conf.tag]}' }`)
|
||||
}
|
||||
})
|
||||
}
|
||||
ruleList.push(`${conf.vModel}: [${rules.join(',')}],`)
|
||||
}
|
||||
}
|
||||
|
||||
function buildOptions(conf, optionsList) {
|
||||
if (conf.vModel === undefined) return
|
||||
if (conf.dataType === 'dynamic') { conf.options = [] }
|
||||
const str = `${conf.vModel}Options: ${JSON.stringify(conf.options)},`
|
||||
optionsList.push(str)
|
||||
}
|
||||
|
||||
function buildProps(conf, propsList) {
|
||||
if (conf.dataType === 'dynamic') {
|
||||
conf.valueKey !== 'value' && (conf.props.props.value = conf.valueKey)
|
||||
conf.labelKey !== 'label' && (conf.props.props.label = conf.labelKey)
|
||||
conf.childrenKey !== 'children' && (conf.props.props.children = conf.childrenKey)
|
||||
}
|
||||
const str = `${conf.vModel}Props: ${JSON.stringify(conf.props.props)},`
|
||||
propsList.push(str)
|
||||
}
|
||||
|
||||
function buildBeforeUpload(conf) {
|
||||
const unitNum = units[conf.sizeUnit]; let rightSizeCode = ''; let acceptCode = ''; const
|
||||
returnList = []
|
||||
if (conf.fileSize) {
|
||||
rightSizeCode = `let isRightSize = file.size / ${unitNum} < ${conf.fileSize}
|
||||
if(!isRightSize){
|
||||
this.$message.error('文件大小超过 ${conf.fileSize}${conf.sizeUnit}')
|
||||
}`
|
||||
returnList.push('isRightSize')
|
||||
}
|
||||
if (conf.accept) {
|
||||
acceptCode = `let isAccept = new RegExp('${conf.accept}').test(file.type)
|
||||
if(!isAccept){
|
||||
this.$message.error('应该选择${conf.accept}类型的文件')
|
||||
}`
|
||||
returnList.push('isAccept')
|
||||
}
|
||||
const str = `${conf.vModel}BeforeUpload(file) {
|
||||
${rightSizeCode}
|
||||
${acceptCode}
|
||||
return ${returnList.join('&&')}
|
||||
},`
|
||||
return returnList.length ? str : ''
|
||||
}
|
||||
|
||||
function buildSubmitUpload(conf) {
|
||||
const str = `submitUpload() {
|
||||
this.$refs['${conf.vModel}'].submit()
|
||||
},`
|
||||
return str
|
||||
}
|
||||
|
||||
function buildOptionMethod(methodName, model, methodList) {
|
||||
const str = `${methodName}() {
|
||||
// TODO 发起请求获取数据
|
||||
this.${model}
|
||||
},`
|
||||
methodList.push(str)
|
||||
}
|
||||
|
||||
function buildexport(conf, type, data, rules, selectOptions, uploadVar, props, methods) {
|
||||
const str = `${exportDefault}{
|
||||
${inheritAttrs[type]}
|
||||
components: {},
|
||||
props: [],
|
||||
data () {
|
||||
return {
|
||||
${conf.formModel}: {
|
||||
${data}
|
||||
},
|
||||
${conf.formRules}: {
|
||||
${rules}
|
||||
},
|
||||
${uploadVar}
|
||||
${selectOptions}
|
||||
${props}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created () {},
|
||||
mounted () {},
|
||||
methods: {
|
||||
${methods}
|
||||
}
|
||||
}`
|
||||
return str
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
import { makeMap } from '@/utils/index'
|
||||
|
||||
// 参考https://github.com/vuejs/vue/blob/v2.6.10/src/platforms/web/server/util.js
|
||||
const isAttr = makeMap(
|
||||
'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,'
|
||||
+ 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,'
|
||||
+ 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,'
|
||||
+ 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,'
|
||||
+ 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,'
|
||||
+ 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,'
|
||||
+ 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,'
|
||||
+ 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,'
|
||||
+ 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,'
|
||||
+ 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,'
|
||||
+ 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,'
|
||||
+ 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,'
|
||||
+ 'target,title,type,usemap,value,width,wrap'
|
||||
)
|
||||
|
||||
function vModel(self, dataObject, defaultValue) {
|
||||
dataObject.props.value = defaultValue
|
||||
|
||||
dataObject.on.input = val => {
|
||||
self.$emit('input', val)
|
||||
}
|
||||
}
|
||||
|
||||
const componentChild = {
|
||||
'el-button': {
|
||||
default(h, conf, key) {
|
||||
return conf[key]
|
||||
},
|
||||
},
|
||||
'el-input': {
|
||||
prepend(h, conf, key) {
|
||||
return <template slot="prepend">{conf[key]}</template>
|
||||
},
|
||||
append(h, conf, key) {
|
||||
return <template slot="append">{conf[key]}</template>
|
||||
}
|
||||
},
|
||||
'el-select': {
|
||||
options(h, conf, key) {
|
||||
const list = []
|
||||
conf.options.forEach(item => {
|
||||
list.push(<el-option label={item.label} value={item.value} disabled={item.disabled}></el-option>)
|
||||
})
|
||||
return list
|
||||
}
|
||||
},
|
||||
'el-radio-group': {
|
||||
options(h, conf, key) {
|
||||
const list = []
|
||||
conf.options.forEach(item => {
|
||||
if (conf.optionType === 'button') list.push(<el-radio-button label={item.value}>{item.label}</el-radio-button>)
|
||||
else list.push(<el-radio label={item.value} border={conf.border}>{item.label}</el-radio>)
|
||||
})
|
||||
return list
|
||||
}
|
||||
},
|
||||
'el-checkbox-group': {
|
||||
options(h, conf, key) {
|
||||
const list = []
|
||||
conf.options.forEach(item => {
|
||||
if (conf.optionType === 'button') {
|
||||
list.push(<el-checkbox-button label={item.value}>{item.label}</el-checkbox-button>)
|
||||
} else {
|
||||
list.push(<el-checkbox label={item.value} border={conf.border}>{item.label}</el-checkbox>)
|
||||
}
|
||||
})
|
||||
return list
|
||||
}
|
||||
},
|
||||
'el-upload': {
|
||||
'list-type': (h, conf, key) => {
|
||||
const list = []
|
||||
if (conf['list-type'] === 'picture-card') {
|
||||
list.push(<i class="el-icon-plus"></i>)
|
||||
} else {
|
||||
list.push(<el-button size="small" type="primary" icon="el-icon-upload">{conf.buttonText}</el-button>)
|
||||
}
|
||||
if (conf.showTip) {
|
||||
list.push(<div slot="tip" class="el-upload__tip">只能上传不超过 {conf.fileSize}{conf.sizeUnit} 的{conf.accept}文件</div>)
|
||||
}
|
||||
return list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
render(h) {
|
||||
const dataObject = {
|
||||
attrs: {},
|
||||
props: {},
|
||||
on: {},
|
||||
style: {}
|
||||
}
|
||||
const confClone = JSON.parse(JSON.stringify(this.conf))
|
||||
const children = []
|
||||
|
||||
const childObjs = componentChild[confClone.tag]
|
||||
if (childObjs) {
|
||||
Object.keys(childObjs).forEach(key => {
|
||||
const childFunc = childObjs[key]
|
||||
if (confClone[key]) {
|
||||
children.push(childFunc(h, confClone, key))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Object.keys(confClone).forEach(key => {
|
||||
const val = confClone[key]
|
||||
if (key === 'vModel') {
|
||||
vModel(this, dataObject, confClone.defaultValue)
|
||||
} else if (dataObject[key]) {
|
||||
dataObject[key] = val
|
||||
} else if (!isAttr(key)) {
|
||||
dataObject.props[key] = val
|
||||
} else {
|
||||
dataObject.attrs[key] = val
|
||||
}
|
||||
})
|
||||
return h(this.conf.tag, dataObject, children)
|
||||
},
|
||||
props: ['conf']
|
||||
}
|
||||
@@ -0,0 +1,390 @@
|
||||
import { parseTime } from './ruoyi'
|
||||
|
||||
/**
|
||||
* 表格时间格式化
|
||||
*/
|
||||
export function formatDate(cellValue) {
|
||||
if (cellValue == null || cellValue == "") return "";
|
||||
var date = new Date(cellValue)
|
||||
var year = date.getFullYear()
|
||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
||||
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
||||
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
||||
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} time
|
||||
* @param {string} option
|
||||
* @returns {string}
|
||||
*/
|
||||
export function formatTime(time, option) {
|
||||
if (('' + time).length === 10) {
|
||||
time = parseInt(time) * 1000
|
||||
} else {
|
||||
time = +time
|
||||
}
|
||||
const d = new Date(time)
|
||||
const now = Date.now()
|
||||
|
||||
const diff = (now - d) / 1000
|
||||
|
||||
if (diff < 30) {
|
||||
return '刚刚'
|
||||
} else if (diff < 3600) {
|
||||
// less 1 hour
|
||||
return Math.ceil(diff / 60) + '分钟前'
|
||||
} else if (diff < 3600 * 24) {
|
||||
return Math.ceil(diff / 3600) + '小时前'
|
||||
} else if (diff < 3600 * 24 * 2) {
|
||||
return '1天前'
|
||||
}
|
||||
if (option) {
|
||||
return parseTime(time, option)
|
||||
} else {
|
||||
return (
|
||||
d.getMonth() +
|
||||
1 +
|
||||
'月' +
|
||||
d.getDate() +
|
||||
'日' +
|
||||
d.getHours() +
|
||||
'时' +
|
||||
d.getMinutes() +
|
||||
'分'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @returns {Object}
|
||||
*/
|
||||
export function getQueryObject(url) {
|
||||
url = url == null ? window.location.href : url
|
||||
const search = url.substring(url.lastIndexOf('?') + 1)
|
||||
const obj = {}
|
||||
const reg = /([^?&=]+)=([^?&=]*)/g
|
||||
search.replace(reg, (rs, $1, $2) => {
|
||||
const name = decodeURIComponent($1)
|
||||
let val = decodeURIComponent($2)
|
||||
val = String(val)
|
||||
obj[name] = val
|
||||
return rs
|
||||
})
|
||||
return obj
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} input value
|
||||
* @returns {number} output value
|
||||
*/
|
||||
export function byteLength(str) {
|
||||
// returns the byte length of an utf8 string
|
||||
let s = str.length
|
||||
for (var i = str.length - 1; i >= 0; i--) {
|
||||
const code = str.charCodeAt(i)
|
||||
if (code > 0x7f && code <= 0x7ff) s++
|
||||
else if (code > 0x7ff && code <= 0xffff) s += 2
|
||||
if (code >= 0xDC00 && code <= 0xDFFF) i--
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array} actual
|
||||
* @returns {Array}
|
||||
*/
|
||||
export function cleanArray(actual) {
|
||||
const newArray = []
|
||||
for (let i = 0; i < actual.length; i++) {
|
||||
if (actual[i]) {
|
||||
newArray.push(actual[i])
|
||||
}
|
||||
}
|
||||
return newArray
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Object} json
|
||||
* @returns {Array}
|
||||
*/
|
||||
export function param(json) {
|
||||
if (!json) return ''
|
||||
return cleanArray(
|
||||
Object.keys(json).map(key => {
|
||||
if (json[key] === undefined) return ''
|
||||
return encodeURIComponent(key) + '=' + encodeURIComponent(json[key])
|
||||
})
|
||||
).join('&')
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @returns {Object}
|
||||
*/
|
||||
export function param2Obj(url) {
|
||||
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
|
||||
if (!search) {
|
||||
return {}
|
||||
}
|
||||
const obj = {}
|
||||
const searchArr = search.split('&')
|
||||
searchArr.forEach(v => {
|
||||
const index = v.indexOf('=')
|
||||
if (index !== -1) {
|
||||
const name = v.substring(0, index)
|
||||
const val = v.substring(index + 1, v.length)
|
||||
obj[name] = val
|
||||
}
|
||||
})
|
||||
return obj
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} val
|
||||
* @returns {string}
|
||||
*/
|
||||
export function html2Text(val) {
|
||||
const div = document.createElement('div')
|
||||
div.innerHTML = val
|
||||
return div.textContent || div.innerText
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges two objects, giving the last one precedence
|
||||
* @param {Object} target
|
||||
* @param {(Object|Array)} source
|
||||
* @returns {Object}
|
||||
*/
|
||||
export function objectMerge(target, source) {
|
||||
if (typeof target !== 'object') {
|
||||
target = {}
|
||||
}
|
||||
if (Array.isArray(source)) {
|
||||
return source.slice()
|
||||
}
|
||||
Object.keys(source).forEach(property => {
|
||||
const sourceProperty = source[property]
|
||||
if (typeof sourceProperty === 'object') {
|
||||
target[property] = objectMerge(target[property], sourceProperty)
|
||||
} else {
|
||||
target[property] = sourceProperty
|
||||
}
|
||||
})
|
||||
return target
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} element
|
||||
* @param {string} className
|
||||
*/
|
||||
export function toggleClass(element, className) {
|
||||
if (!element || !className) {
|
||||
return
|
||||
}
|
||||
let classString = element.className
|
||||
const nameIndex = classString.indexOf(className)
|
||||
if (nameIndex === -1) {
|
||||
classString += '' + className
|
||||
} else {
|
||||
classString =
|
||||
classString.substr(0, nameIndex) +
|
||||
classString.substr(nameIndex + className.length)
|
||||
}
|
||||
element.className = classString
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} type
|
||||
* @returns {Date}
|
||||
*/
|
||||
export function getTime(type) {
|
||||
if (type === 'start') {
|
||||
return new Date().getTime() - 3600 * 1000 * 24 * 90
|
||||
} else {
|
||||
return new Date(new Date().toDateString())
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Function} func
|
||||
* @param {number} wait
|
||||
* @param {boolean} immediate
|
||||
* @return {*}
|
||||
*/
|
||||
export function debounce(func, wait, immediate) {
|
||||
let timeout, args, context, timestamp, result
|
||||
|
||||
const later = function() {
|
||||
// 据上一次触发时间间隔
|
||||
const last = +new Date() - timestamp
|
||||
|
||||
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
|
||||
if (last < wait && last > 0) {
|
||||
timeout = setTimeout(later, wait - last)
|
||||
} else {
|
||||
timeout = null
|
||||
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
|
||||
if (!immediate) {
|
||||
result = func.apply(context, args)
|
||||
if (!timeout) context = args = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return function(...args) {
|
||||
context = this
|
||||
timestamp = +new Date()
|
||||
const callNow = immediate && !timeout
|
||||
// 如果延时不存在,重新设定延时
|
||||
if (!timeout) timeout = setTimeout(later, wait)
|
||||
if (callNow) {
|
||||
result = func.apply(context, args)
|
||||
context = args = null
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is just a simple version of deep copy
|
||||
* Has a lot of edge cases bug
|
||||
* If you want to use a perfect deep copy, use lodash's _.cloneDeep
|
||||
* @param {Object} source
|
||||
* @returns {Object}
|
||||
*/
|
||||
export function deepClone(source) {
|
||||
if (!source && typeof source !== 'object') {
|
||||
throw new Error('error arguments', 'deepClone')
|
||||
}
|
||||
const targetObj = source.constructor === Array ? [] : {}
|
||||
Object.keys(source).forEach(keys => {
|
||||
if (source[keys] && typeof source[keys] === 'object') {
|
||||
targetObj[keys] = deepClone(source[keys])
|
||||
} else {
|
||||
targetObj[keys] = source[keys]
|
||||
}
|
||||
})
|
||||
return targetObj
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array} arr
|
||||
* @returns {Array}
|
||||
*/
|
||||
export function uniqueArr(arr) {
|
||||
return Array.from(new Set(arr))
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function createUniqueString() {
|
||||
const timestamp = +new Date() + ''
|
||||
const randomNum = parseInt((1 + Math.random()) * 65536) + ''
|
||||
return (+(randomNum + timestamp)).toString(32)
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an element has a class
|
||||
* @param {HTMLElement} elm
|
||||
* @param {string} cls
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function hasClass(ele, cls) {
|
||||
return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'))
|
||||
}
|
||||
|
||||
/**
|
||||
* Add class to element
|
||||
* @param {HTMLElement} elm
|
||||
* @param {string} cls
|
||||
*/
|
||||
export function addClass(ele, cls) {
|
||||
if (!hasClass(ele, cls)) ele.className += ' ' + cls
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove class from element
|
||||
* @param {HTMLElement} elm
|
||||
* @param {string} cls
|
||||
*/
|
||||
export function removeClass(ele, cls) {
|
||||
if (hasClass(ele, cls)) {
|
||||
const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)')
|
||||
ele.className = ele.className.replace(reg, ' ')
|
||||
}
|
||||
}
|
||||
|
||||
export function makeMap(str, expectsLowerCase) {
|
||||
const map = Object.create(null)
|
||||
const list = str.split(',')
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
map[list[i]] = true
|
||||
}
|
||||
return expectsLowerCase
|
||||
? val => map[val.toLowerCase()]
|
||||
: val => map[val]
|
||||
}
|
||||
|
||||
export const exportDefault = 'export default '
|
||||
|
||||
export const beautifierConf = {
|
||||
html: {
|
||||
indent_size: '2',
|
||||
indent_char: ' ',
|
||||
max_preserve_newlines: '-1',
|
||||
preserve_newlines: false,
|
||||
keep_array_indentation: false,
|
||||
break_chained_methods: false,
|
||||
indent_scripts: 'separate',
|
||||
brace_style: 'end-expand',
|
||||
space_before_conditional: true,
|
||||
unescape_strings: false,
|
||||
jslint_happy: false,
|
||||
end_with_newline: true,
|
||||
wrap_line_length: '110',
|
||||
indent_inner_html: true,
|
||||
comma_first: false,
|
||||
e4x: true,
|
||||
indent_empty_lines: true
|
||||
},
|
||||
js: {
|
||||
indent_size: '2',
|
||||
indent_char: ' ',
|
||||
max_preserve_newlines: '-1',
|
||||
preserve_newlines: false,
|
||||
keep_array_indentation: false,
|
||||
break_chained_methods: false,
|
||||
indent_scripts: 'normal',
|
||||
brace_style: 'end-expand',
|
||||
space_before_conditional: true,
|
||||
unescape_strings: false,
|
||||
jslint_happy: true,
|
||||
end_with_newline: true,
|
||||
wrap_line_length: '110',
|
||||
indent_inner_html: true,
|
||||
comma_first: false,
|
||||
e4x: true,
|
||||
indent_empty_lines: true
|
||||
}
|
||||
}
|
||||
|
||||
// 首字母大小
|
||||
export function titleCase(str) {
|
||||
return str.replace(/( |^)[a-z]/g, L => L.toUpperCase())
|
||||
}
|
||||
|
||||
// 下划转驼峰
|
||||
export function camelCase(str) {
|
||||
return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
|
||||
}
|
||||
|
||||
export function isNumberStr(str) {
|
||||
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
|
||||
|
||||
// 密钥对生成 http://web.chacuo.net/netrsakeypair
|
||||
|
||||
const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' +
|
||||
'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
|
||||
|
||||
const privateKey = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n' +
|
||||
'7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN\n' +
|
||||
'PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA\n' +
|
||||
'kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow\n' +
|
||||
'cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv\n' +
|
||||
'DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh\n' +
|
||||
'YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3\n' +
|
||||
'UP8iWi1Qw0Y='
|
||||
|
||||
// 加密
|
||||
export function encrypt(txt) {
|
||||
const encryptor = new JSEncrypt()
|
||||
encryptor.setPublicKey(publicKey) // 设置公钥
|
||||
return encryptor.encrypt(txt) // 对数据进行加密
|
||||
}
|
||||
|
||||
// 解密
|
||||
export function decrypt(txt) {
|
||||
const encryptor = new JSEncrypt()
|
||||
encryptor.setPrivateKey(privateKey) // 设置私钥
|
||||
return encryptor.decrypt(txt) // 对数据进行解密
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
import store from '@/store'
|
||||
|
||||
/**
|
||||
* 字符权限校验
|
||||
* @param {Array} value 校验值
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function checkPermi(value) {
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const permissions = store.getters && store.getters.permissions
|
||||
const permissionDatas = value
|
||||
const all_permission = "*:*:*";
|
||||
|
||||
const hasPermission = permissions.some(permission => {
|
||||
return all_permission === permission || permissionDatas.includes(permission)
|
||||
})
|
||||
|
||||
if (!hasPermission) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色权限校验
|
||||
* @param {Array} value 校验值
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function checkRole(value) {
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const roles = store.getters && store.getters.roles
|
||||
const permissionRoles = value
|
||||
const super_admin = "admin";
|
||||
|
||||
const hasRole = roles.some(role => {
|
||||
return super_admin === role || permissionRoles.includes(role)
|
||||
})
|
||||
|
||||
if (!hasRole) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
console.error(`need roles! Like checkRole="['admin','editor']"`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
//import axios from 'axios'
|
||||
import axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios';
|
||||
import { MessageBox, Message, Loading } from 'element-ui'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
import { tansParams, blobValidate } from "@/utils/ruoyi";
|
||||
import cache from '@/plugins/cache'
|
||||
import { saveAs } from 'file-saver'
|
||||
let downloadLoadingInstance;
|
||||
// 是否显示重新登录
|
||||
export let isRelogin = { show: false };
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
// 开发环境使用代理,生产环境使用相对路径(前后端同域部署)
|
||||
baseURL: process.env.NODE_ENV === 'development' ? '/dev-api' : '/yktgl',
|
||||
|
||||
// 超时
|
||||
timeout: 10000
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
service.interceptors.request.use(config => {
|
||||
// 是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
// 是否需要防止数据重复提交
|
||||
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
|
||||
if (getToken() && !isToken) {
|
||||
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
// get请求映射params参数
|
||||
if (config.method === 'get' && config.params) {
|
||||
let url = config.url + '?' + tansParams(config.params);
|
||||
url = url.slice(0, -1);
|
||||
config.params = {};
|
||||
config.url = url;
|
||||
}
|
||||
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
|
||||
const requestObj = {
|
||||
url: config.url,
|
||||
data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
|
||||
time: new Date().getTime()
|
||||
}
|
||||
const requestSize = Object.keys(JSON.stringify(requestObj)).length; // 请求数据大小
|
||||
const limitSize = 5 * 1024 * 1024; // 限制存放数据5M
|
||||
if (requestSize >= limitSize) {
|
||||
console.warn(`[${config.url}]: ` + '请求数据大小超出允许的5M限制,无法进行防重复提交验证。')
|
||||
return config;
|
||||
}
|
||||
const sessionObj = cache.session.getJSON('sessionObj')
|
||||
if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
|
||||
cache.session.setJSON('sessionObj', requestObj)
|
||||
} /* else {
|
||||
const s_url = sessionObj.url; // 请求地址
|
||||
const s_data = sessionObj.data; // 请求数据
|
||||
const s_time = sessionObj.time; // 请求时间
|
||||
const interval = 1; // 间隔时间(ms),小于此时间视为重复提交
|
||||
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
||||
const message = '数据正在处理,请勿重复提交';
|
||||
console.warn(`[${s_url}]: ` + message)
|
||||
return Promise.reject(new Error(message))
|
||||
} else {
|
||||
cache.session.setJSON('sessionObj', requestObj)
|
||||
}
|
||||
} */
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
//Promise.reject(error)
|
||||
})
|
||||
|
||||
// 响应拦截器
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
// 未设置状态码则默认成功状态
|
||||
const { code, msg } = response.data;
|
||||
if (code === '00000' || code === '11111'|| code === 1) {
|
||||
return response.data;
|
||||
}
|
||||
// if(code === '11111'){
|
||||
// Message({ message: msg || '系统出错', type: 'error' });
|
||||
// }
|
||||
// 响应数据为二进制流处理(Excel导出)
|
||||
if (response.data instanceof ArrayBuffer) {
|
||||
return response;
|
||||
}
|
||||
|
||||
//ElMessage.error(msg || '系统出错');
|
||||
Message({ message: msg || '系统出错', type: 'error' });
|
||||
return Promise.reject(new Error(msg || 'Error'));
|
||||
},
|
||||
/*const code = res.data.code || 200;
|
||||
// 获取错误信息
|
||||
const msg = errorCode[code] || res.data.msg || errorCode['default']*/
|
||||
// 二进制数据则直接返回
|
||||
/*if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
|
||||
return res.data
|
||||
}
|
||||
if (code === 401) {
|
||||
if (!isRelogin.show) {
|
||||
isRelogin.show = true;
|
||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
isRelogin.show = false;
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index';
|
||||
})
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
}
|
||||
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
} else if (code === 500) {
|
||||
Message({ message: msg, type: 'error' })
|
||||
return Promise.reject(new Error(msg))
|
||||
} else if (code === 601) {
|
||||
Message({ message: msg, type: 'warning' })
|
||||
return Promise.reject('error')
|
||||
} else if (code !== 200) {
|
||||
Message({ message: msg, type: 'error' })
|
||||
return Promise.reject('error')
|
||||
} else {
|
||||
return res.data
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "后端接口连接异常";
|
||||
} else if (message.includes("timeout")) {
|
||||
message = "系统接口请求超时";
|
||||
} else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({ message: message, type: 'error', duration: 5 * 1000 })
|
||||
return Promise.reject(error)
|
||||
}*/
|
||||
)
|
||||
|
||||
// 通用下载方法
|
||||
export function download(url, params, filename, config) {
|
||||
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0,0,0,0.7)", })
|
||||
return service.post(url, params, {
|
||||
transformRequest: [(params) => { return tansParams(params) }],
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
responseType: 'blob',
|
||||
...config
|
||||
}).then(async (data) => {
|
||||
const isBlob = blobValidate(data);
|
||||
if (isBlob) {
|
||||
const blob = new Blob([data])
|
||||
saveAs(blob, filename)
|
||||
} else {
|
||||
const resText = await data.text();
|
||||
const rspObj = JSON.parse(resText);
|
||||
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
|
||||
Message.error(errMsg);
|
||||
}
|
||||
downloadLoadingInstance.close();
|
||||
}).catch((r) => {
|
||||
console.error(r)
|
||||
Message.error('下载文件出现错误,请联系管理员!')
|
||||
downloadLoadingInstance.close();
|
||||
})
|
||||
}
|
||||
|
||||
export default service
|
||||
@@ -0,0 +1,233 @@
|
||||
|
||||
|
||||
/**
|
||||
* 通用js方法封装处理
|
||||
* Copyright (c) 2019 ruoyi
|
||||
*/
|
||||
|
||||
// 日期格式化
|
||||
export function parseTime(time, pattern) {
|
||||
if (arguments.length === 0 || !time) {
|
||||
return null
|
||||
}
|
||||
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
|
||||
let date
|
||||
if (typeof time === 'object') {
|
||||
date = time
|
||||
} else {
|
||||
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
||||
time = parseInt(time)
|
||||
} else if (typeof time === 'string') {
|
||||
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
|
||||
}
|
||||
if ((typeof time === 'number') && (time.toString().length === 10)) {
|
||||
time = time * 1000
|
||||
}
|
||||
date = new Date(time)
|
||||
}
|
||||
const formatObj = {
|
||||
y: date.getFullYear(),
|
||||
m: date.getMonth() + 1,
|
||||
d: date.getDate(),
|
||||
h: date.getHours(),
|
||||
i: date.getMinutes(),
|
||||
s: date.getSeconds(),
|
||||
a: date.getDay()
|
||||
}
|
||||
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
||||
let value = formatObj[key]
|
||||
// Note: getDay() returns 0 on Sunday
|
||||
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
|
||||
if (result.length > 0 && value < 10) {
|
||||
value = '0' + value
|
||||
}
|
||||
return value || 0
|
||||
})
|
||||
return time_str
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
export function resetForm(refName) {
|
||||
if (this.$refs[refName]) {
|
||||
this.$refs[refName].resetFields();
|
||||
}
|
||||
}
|
||||
|
||||
// 添加日期范围
|
||||
export function addDateRange(params, dateRange, propName) {
|
||||
let search = params;
|
||||
search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
|
||||
dateRange = Array.isArray(dateRange) ? dateRange : [];
|
||||
if (typeof (propName) === 'undefined') {
|
||||
search.params['beginTime'] = dateRange[0];
|
||||
search.params['endTime'] = dateRange[1];
|
||||
} else {
|
||||
search.params['begin' + propName] = dateRange[0];
|
||||
search.params['end' + propName] = dateRange[1];
|
||||
}
|
||||
return search;
|
||||
}
|
||||
|
||||
// 回显数据字典
|
||||
export function selectDictLabel(datas, value) {
|
||||
if (value === undefined) {
|
||||
return "";
|
||||
}
|
||||
var actions = [];
|
||||
Object.keys(datas).some((key) => {
|
||||
if (datas[key].value == ('' + value)) {
|
||||
actions.push(datas[key].label);
|
||||
return true;
|
||||
}
|
||||
})
|
||||
if (actions.length === 0) {
|
||||
actions.push(value);
|
||||
}
|
||||
return actions.join('');
|
||||
}
|
||||
|
||||
// 回显数据字典(字符串、数组)
|
||||
export function selectDictLabels(datas, value, separator) {
|
||||
if (value === undefined || value.length ===0) {
|
||||
return "";
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
value = value.join(",");
|
||||
}
|
||||
var actions = [];
|
||||
var currentSeparator = undefined === separator ? "," : separator;
|
||||
var temp = value.split(currentSeparator);
|
||||
Object.keys(value.split(currentSeparator)).some((val) => {
|
||||
var match = false;
|
||||
Object.keys(datas).some((key) => {
|
||||
if (datas[key].value == ('' + temp[val])) {
|
||||
actions.push(datas[key].label + currentSeparator);
|
||||
match = true;
|
||||
}
|
||||
})
|
||||
if (!match) {
|
||||
actions.push(temp[val] + currentSeparator);
|
||||
}
|
||||
})
|
||||
return actions.join('').substring(0, actions.join('').length - 1);
|
||||
}
|
||||
|
||||
// 字符串格式化(%s )
|
||||
export function sprintf(str) {
|
||||
var args = arguments, flag = true, i = 1;
|
||||
str = str.replace(/%s/g, function () {
|
||||
var arg = args[i++];
|
||||
if (typeof arg === 'undefined') {
|
||||
flag = false;
|
||||
return '';
|
||||
}
|
||||
return arg;
|
||||
});
|
||||
return flag ? str : '';
|
||||
}
|
||||
|
||||
// 转换字符串,undefined,null等转化为""
|
||||
export function parseStrEmpty(str) {
|
||||
if (!str || str == "undefined" || str == "null") {
|
||||
return "";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
// 数据合并
|
||||
export function mergeRecursive(source, target) {
|
||||
for (var p in target) {
|
||||
try {
|
||||
if (target[p].constructor == Object) {
|
||||
source[p] = mergeRecursive(source[p], target[p]);
|
||||
} else {
|
||||
source[p] = target[p];
|
||||
}
|
||||
} catch (e) {
|
||||
source[p] = target[p];
|
||||
}
|
||||
}
|
||||
return source;
|
||||
};
|
||||
|
||||
/**
|
||||
* 构造树型结构数据
|
||||
* @param {*} data 数据源
|
||||
* @param {*} id id字段 默认 'id'
|
||||
* @param {*} parentId 父节点字段 默认 'parentId'
|
||||
* @param {*} children 孩子节点字段 默认 'children'
|
||||
*/
|
||||
export function handleTree(data, id, parentId, children) {
|
||||
let config = {
|
||||
id: id || 'id',
|
||||
parentId: parentId || 'parentId',
|
||||
childrenList: children || 'children'
|
||||
};
|
||||
|
||||
var childrenListMap = {};
|
||||
var nodeIds = {};
|
||||
var tree = [];
|
||||
|
||||
for (let d of data) {
|
||||
let parentId = d[config.parentId];
|
||||
if (childrenListMap[parentId] == null) {
|
||||
childrenListMap[parentId] = [];
|
||||
}
|
||||
nodeIds[d[config.id]] = d;
|
||||
childrenListMap[parentId].push(d);
|
||||
}
|
||||
|
||||
for (let d of data) {
|
||||
let parentId = d[config.parentId];
|
||||
if (nodeIds[parentId] == null) {
|
||||
tree.push(d);
|
||||
}
|
||||
}
|
||||
|
||||
for (let t of tree) {
|
||||
adaptToChildrenList(t);
|
||||
}
|
||||
|
||||
function adaptToChildrenList(o) {
|
||||
if (childrenListMap[o[config.id]] !== null) {
|
||||
o[config.childrenList] = childrenListMap[o[config.id]];
|
||||
}
|
||||
if (o[config.childrenList]) {
|
||||
for (let c of o[config.childrenList]) {
|
||||
adaptToChildrenList(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数处理
|
||||
* @param {*} params 参数
|
||||
*/
|
||||
export function tansParams(params) {
|
||||
let result = ''
|
||||
for (const propName of Object.keys(params)) {
|
||||
const value = params[propName];
|
||||
var part = encodeURIComponent(propName) + "=";
|
||||
if (value !== null && value !== "" && typeof (value) !== "undefined") {
|
||||
if (typeof value === 'object') {
|
||||
for (const key of Object.keys(value)) {
|
||||
if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
|
||||
let params = propName + '[' + key + ']';
|
||||
var subPart = encodeURIComponent(params) + "=";
|
||||
result += subPart + encodeURIComponent(value[key]) + "&";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result += part + encodeURIComponent(value) + "&";
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// 验证是否为blob格式
|
||||
export function blobValidate(data) {
|
||||
return data.type !== 'application/json'
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
Math.easeInOutQuad = function(t, b, c, d) {
|
||||
t /= d / 2
|
||||
if (t < 1) {
|
||||
return c / 2 * t * t + b
|
||||
}
|
||||
t--
|
||||
return -c / 2 * (t * (t - 2) - 1) + b
|
||||
}
|
||||
|
||||
// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
|
||||
var requestAnimFrame = (function() {
|
||||
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) }
|
||||
})()
|
||||
|
||||
/**
|
||||
* Because it's so fucking difficult to detect the scrolling element, just move them all
|
||||
* @param {number} amount
|
||||
*/
|
||||
function move(amount) {
|
||||
document.documentElement.scrollTop = amount
|
||||
document.body.parentNode.scrollTop = amount
|
||||
document.body.scrollTop = amount
|
||||
}
|
||||
|
||||
function position() {
|
||||
return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} to
|
||||
* @param {number} duration
|
||||
* @param {Function} callback
|
||||
*/
|
||||
export function scrollTo(to, duration, callback) {
|
||||
const start = position()
|
||||
const change = to - start
|
||||
const increment = 20
|
||||
let currentTime = 0
|
||||
duration = (typeof (duration) === 'undefined') ? 500 : duration
|
||||
var animateScroll = function() {
|
||||
// increment the time
|
||||
currentTime += increment
|
||||
// find the value with the quadratic in-out easing function
|
||||
var val = Math.easeInOutQuad(currentTime, start, change, duration)
|
||||
// move the document.body
|
||||
move(val)
|
||||
// do the animation unless its over
|
||||
if (currentTime < duration) {
|
||||
requestAnimFrame(animateScroll)
|
||||
} else {
|
||||
if (callback && typeof (callback) === 'function') {
|
||||
// the animation is done so lets callback
|
||||
callback()
|
||||
}
|
||||
}
|
||||
}
|
||||
animateScroll()
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* @param {string} path
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function isExternal(path) {
|
||||
return /^(https?:|mailto:|tel:)/.test(path)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function validUsername(str) {
|
||||
const valid_map = ['admin', 'editor']
|
||||
return valid_map.indexOf(str.trim()) >= 0
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function validURL(url) {
|
||||
const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
|
||||
return reg.test(url)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function validLowerCase(str) {
|
||||
const reg = /^[a-z]+$/
|
||||
return reg.test(str)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function validUpperCase(str) {
|
||||
const reg = /^[A-Z]+$/
|
||||
return reg.test(str)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function validAlphabets(str) {
|
||||
const reg = /^[A-Za-z]+$/
|
||||
return reg.test(str)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} email
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function validEmail(email) {
|
||||
const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
||||
return reg.test(email)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function isString(str) {
|
||||
if (typeof str === 'string' || str instanceof String) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array} arg
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
export function isArray(arg) {
|
||||
if (typeof Array.isArray === 'undefined') {
|
||||
return Object.prototype.toString.call(arg) === '[object Array]'
|
||||
}
|
||||
return Array.isArray(arg)
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div class="about">
|
||||
<h1>This is an about page</h1>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<h1>{{ msg }}</h1>
|
||||
<!-- <button @click="go">点击跳转</button>-->
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
<test1 msg="Welcome to Your Vue.js App"/>
|
||||
<!-- <i class="el-icon-edit"></i>-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
import HelloWorld from '@/components/HelloWorld.vue'
|
||||
// import Test1 from '@/components/Test1.vue'
|
||||
export default {
|
||||
name: 'home',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
}
|
||||
</script>
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<div class="login-container">
|
||||
<div class="login-box">
|
||||
<div class="login-header">
|
||||
<h2>公寓管理系统</h2>
|
||||
<p>请输入您的登录信息</p>
|
||||
</div>
|
||||
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
:model="loginForm"
|
||||
:rules="loginRules"
|
||||
class="login-form"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
v-model="loginForm.username"
|
||||
placeholder="请输入用户名"
|
||||
prefix-icon="el-icon-user"
|
||||
size="large"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
type="password"
|
||||
placeholder="请输入密码"
|
||||
prefix-icon="el-icon-lock"
|
||||
size="large"
|
||||
show-password
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
:loading="loading"
|
||||
@click="handleLogin"
|
||||
class="login-btn"
|
||||
>
|
||||
{{ loading ? '登录中...' : '登 录' }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { login } from '@/api/login'
|
||||
import { Message } from 'element-ui'
|
||||
import { setToken } from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
login(this.loginForm).then(response => {
|
||||
this.loading = false
|
||||
if (response.code === '00000') {
|
||||
// 保存token(如果服务器返回了token,否则设置假token)
|
||||
if (response.token) {
|
||||
setToken(response.token)
|
||||
} else {
|
||||
setToken('fake-token-' + Date.now())
|
||||
}
|
||||
|
||||
// 保存用户名作为gyid,供后续接口使用
|
||||
localStorage.setItem('gyid', this.loginForm.username)
|
||||
localStorage.setItem('loginAccount', this.loginForm.username)
|
||||
|
||||
Message.success('登录成功!')
|
||||
// 登录成功后跳转到主页面
|
||||
this.$router.push('/jcxx')
|
||||
} else {
|
||||
Message.error(response.msg || '登录失败')
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false
|
||||
console.error('登录错误:', error)
|
||||
Message.error('登录失败,请检查网络连接')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.login-container {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.login-box {
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
|
||||
padding: 40px;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.login-header {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.login-header h2 {
|
||||
color: #333;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.login-header p {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-form .el-form-item {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.login-form .el-input__inner {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e0e0e0;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.login-form .el-input__inner:focus {
|
||||
border-color: #667eea;
|
||||
box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
border-radius: 8px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border: none;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.login-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
|
||||
}
|
||||
|
||||
.login-btn:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 480px) {
|
||||
.login-box {
|
||||
padding: 30px 20px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.login-header h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card style="padding-top: 10px;padding-bottom: 10px;" class="fixed-card">
|
||||
<el-form ref="form" :model="form" label-width="100px" :inline="true" style="padding-top: 10px;">
|
||||
<el-form-item label="出发车次:">
|
||||
<el-input style="width:100%;" v-model="queryParams.cc" @input="getSynJcXx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="机车号:">
|
||||
<el-input style="width:100%;" v-model="queryParams.jch" @input="getSynJcXx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="出勤地点:">
|
||||
<el-input style="width:100%;" v-model="queryParams.jhcqdd" @input="getSynJcXx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="司机姓名:">
|
||||
<el-input style="width:100%;" v-model="queryParams.ryxm" @input="getSynJcXx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接车方式">
|
||||
<el-select v-model="queryParams.jcfs" placeholder="站接/库出" @change="getSynJcXx">
|
||||
<el-option label="站接" value="站接"></el-option>
|
||||
<el-option label="库出" value="库出"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain icon="el-icon-search" @click="getSynJcXx" style="margin-leftt: 100px;">查询</el-button>
|
||||
<!-- <el-button type="primary" plain icon="el-icon-plus" @click="onSubmit('新增')">添加</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-edit" @click="onSubmit('修改')" :disabled="single">修改</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-delete" @click="deleteData" :disabled="multiple">删除</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-refresh" @click="cancel">重置</el-button> -->
|
||||
<!--<el-button type="primary" plain icon="el-icon-upload" @click="upload_files_button()">导入</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-table :data="synJcXxList" stripe style="width: 100%;text-align: center;height: 700px;overflow-y: auto;">
|
||||
<el-table-column prop="cc" label="车次" min-width="10%" align="center"></el-table-column>
|
||||
<el-table-column prop="cx" label="机车号" min-width="10%" align="center"></el-table-column>
|
||||
<el-table-column prop="kcsj" label="开车时间" min-width="20%" align="center"></el-table-column>
|
||||
<el-table-column prop="jhcqdd" label="计划出勤地点" min-width="10%" align="center"></el-table-column>
|
||||
<el-table-column prop="ryxm" label="司机姓名" min-width="10%" align="center"></el-table-column>
|
||||
<el-table-column prop="jcfs" label="接车方式" min-width="10%" align="center"></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="queryParams.pageNum"
|
||||
:page-size="queryParams.pageSize"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page-sizes="[5,10,15,20,30,40,50]"
|
||||
layout="total,sizes,prev,pager,next,jumper"
|
||||
@pagination="getSynJcXx">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getSynJcXx} from "@/api/jcgl/jcgl";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
},
|
||||
synJcXxList:[],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.getSynJcXx();
|
||||
},
|
||||
methods: {
|
||||
getSynJcXx(){
|
||||
getSynJcXx(this.queryParams.pageNum,this.queryParams.pageSize,this.queryParams.cc,this.queryParams.jch,this.queryParams.jhcqdd,this.queryParams.ryxm,this.queryParams.jcfs).then(res => {
|
||||
console.log(res);
|
||||
this.synJcXxList = res.data;
|
||||
this.total = res.count;
|
||||
});
|
||||
},
|
||||
handleSizeChange(val){
|
||||
this.queryParams.pageSize = val;
|
||||
this.getSynJcXx();
|
||||
},
|
||||
handleCurrentChange(val){
|
||||
this.queryParams.pageNum = val;
|
||||
this.getSynJcXx();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div>
|
||||
<audio ref="audioPlayer" :src="audioUrl" @ended="onEnded" controls></audio>
|
||||
<!-- <el-button @click="playAudio">播放音频</el-button> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
props: ["audioUrl"],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
|
||||
methods: {
|
||||
playAudio() {
|
||||
this.$refs.audioPlayer.play();
|
||||
},
|
||||
onEnded() {
|
||||
console.log("播放结束");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<audioPlay
|
||||
ref="audioPlay"
|
||||
:audioUrl="orderCompleteTip"
|
||||
v-show="audioPlayVisible"
|
||||
></audioPlay>
|
||||
</template>
|
||||
<script>
|
||||
const synth = window.speechSynthesis;
|
||||
const msg = new SpeechSynthesisUtterance();
|
||||
import audioPlay from "../components/audioPlay.vue";
|
||||
|
||||
export default {
|
||||
props: ["speakText"],
|
||||
data() {
|
||||
return {
|
||||
audioPlayVisible: false,
|
||||
orderCompleteTip: require("@/assets/orderCompleteTip.mp3"),
|
||||
};
|
||||
},
|
||||
components: {
|
||||
audioPlay,
|
||||
},
|
||||
|
||||
methods: {
|
||||
playVoice() {
|
||||
this.handleSpeak(this.speakText); // 传入需要播放的文字
|
||||
},
|
||||
// 语音播报的函数
|
||||
handleSpeak(text) {
|
||||
msg.text = text; // 文字内容
|
||||
msg.lang = "zh-CN"; // 使用的语言:中文
|
||||
msg.volume = 1; // 声音音量:1
|
||||
msg.rate = 0.8; // 语速:0.8
|
||||
msg.pitch = 1; // 音高:1
|
||||
msg.onstart = function () {
|
||||
this.$refs.audioPlay.playAudio();
|
||||
};
|
||||
|
||||
synth.speak(msg); // 播放
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,48 @@
|
||||
.mealImg {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.mb-20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.ml-10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.mt-20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.mb-30 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.mb-10 {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.rbutton {
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
background: #fd5e21;
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.rbutton:focus {
|
||||
background: #fd5e21;
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.fontStyle {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.pd0 {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.myDialog .el-dialog__body {
|
||||
padding: 0;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
|
||||
}
|
||||
/* 滚动条的滑块 */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #17B3A3;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* 修改表格(el-table)的滚动条 */
|
||||
.el-table__body-wrapper::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
/* 滚动条的滑块 */
|
||||
.el-table__body-wrapper::-webkit-scrollbar-thumb {
|
||||
background-color: #17B3A3;
|
||||
border-radius: 3px;
|
||||
}
|
||||
@@ -0,0 +1,989 @@
|
||||
<template>
|
||||
<div class="app_contianer">
|
||||
<el-container class="head_contianer">
|
||||
<el-header style="height: 85px"
|
||||
><h1 style="font-size: 40px; color: #ffffff">自助点餐平台</h1>
|
||||
<span class="headerFont">{{ mealsText }} </span>
|
||||
</el-header>
|
||||
</el-container>
|
||||
|
||||
<el-container class="main_contianer">
|
||||
<el-main>
|
||||
<el-row :gutter="20" class="mb-10">
|
||||
<el-col v-for="item in mealsInfoData1" :key="item.meal_id" :span="4">
|
||||
<el-card class="mb-20" :body-style="{ padding: '0px' }" @click.native="addOrderCar(item)">
|
||||
<div style="background: white; line-height: 70px">
|
||||
<span class="ml-10" style="font-weight: 700; font-size: 35px">{{
|
||||
item.gymc
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="bottom clearfix">
|
||||
<span
|
||||
style="
|
||||
color: #fd5e21;
|
||||
font-weight: 700;
|
||||
font-size: 20px;
|
||||
"
|
||||
>¥{{ item.mprice }}
|
||||
</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col v-for="item in mealsInfoData2" :key="item.meal_id" :span="4">
|
||||
<el-card class="mb-20" :body-style="{ padding: '0px' }" @click.native="addOrderCar(item)">
|
||||
<div style="background: white; line-height: 70px">
|
||||
<span class="ml-10" style="font-weight: 700; font-size: 35px">{{
|
||||
item.mname
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="bottom clearfix">
|
||||
<span
|
||||
style="
|
||||
color: #fd5e21;
|
||||
font-weight: 700;
|
||||
font-size: 20px;
|
||||
"
|
||||
>¥{{ item.mprice }}
|
||||
</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col v-for="item in mealsInfoData3" :key="item.meal_id" :span="4">
|
||||
<el-card class="mb-20" :body-style="{ padding: '0px' }" @click.native="addOrderCar(item)">
|
||||
<div style="background: white; line-height: 70px">
|
||||
<span class="ml-10" style="font-weight: 700; font-size: 35px">{{
|
||||
item.mname
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="bottom clearfix">
|
||||
<span
|
||||
style="
|
||||
color: #fd5e21;
|
||||
font-weight: 700;
|
||||
font-size: 20px;
|
||||
"
|
||||
>¥{{ item.mprice }}
|
||||
</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
|
||||
<el-aside width="450px" style="height: 85%">
|
||||
<el-row>
|
||||
<el-col :span="24" v-for="(item, index) in orderingData" :key="index">
|
||||
<el-card :body-style="{ padding: '0px' }">
|
||||
<div class="bottom2 clearfix">
|
||||
<div>
|
||||
<span
|
||||
class="ml-10"
|
||||
style="font-weight: 700; font-size: 20px"
|
||||
>{{ item.mname }}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span
|
||||
style="
|
||||
margin-left: 10px;
|
||||
color: #fd5e21;
|
||||
font-weight: 700;
|
||||
font-size: 20px;
|
||||
"
|
||||
>¥{{ item.mprice }}
|
||||
</span>
|
||||
|
||||
<el-button
|
||||
class="rbutton2"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
size="small"
|
||||
@click="dropOrderCar(item, index)"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class="footer" v-if="footerVisible">
|
||||
<span style="font-weight: 700; margin-left: 10px">合计:</span>
|
||||
<span style="color: #fd5e21; font-weight: 700">¥</span
|
||||
><span
|
||||
style="color: #fd5e21; font-weight: 700; font-size: 40px"
|
||||
class="ps10"
|
||||
>
|
||||
{{ allPrice }}
|
||||
</span>
|
||||
<el-button class="jsbutton" round @click="dialog1Visible = true"
|
||||
>结算</el-button
|
||||
>
|
||||
</div>
|
||||
</el-aside>
|
||||
</el-container>
|
||||
|
||||
<el-dialog
|
||||
class="myDialog"
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
center
|
||||
:close-on-click-modal="false"
|
||||
:show-close="false"
|
||||
>
|
||||
<el-result
|
||||
icon="info"
|
||||
title="请刷卡支付..."
|
||||
:subTitle="timeCount30.data + '秒后无操作自动返回主页面...'"
|
||||
v-if="resultWaitingVisible"
|
||||
>
|
||||
</el-result>
|
||||
<el-result
|
||||
icon="success"
|
||||
title="支付成功,请到食堂等待出餐"
|
||||
:subTitle="timeCount3.data + '秒后返回主页...'"
|
||||
v-if="resultSuccessVisible"
|
||||
>
|
||||
</el-result>
|
||||
<span slot="footer">
|
||||
<el-button v-if="resultSuccessVisible" @click="selfCancel"
|
||||
>手动返回</el-button
|
||||
>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 结算提示 -->
|
||||
<el-dialog
|
||||
class="myDialog"
|
||||
title="提示"
|
||||
:visible.sync="dialog1Visible"
|
||||
width="30%"
|
||||
center
|
||||
:close-on-click-modal="false"
|
||||
:show-close="false"
|
||||
>
|
||||
<el-result icon="warning" title="订单确认之后无法修改!请确认是否继续?">
|
||||
</el-result>
|
||||
<span slot="footer">
|
||||
<el-button @click="handleConfirm" class="greenButton">确定</el-button>
|
||||
<el-button @click="dialog1Visible = false" class="greenButton"
|
||||
>返回</el-button
|
||||
>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import "../css/MealCss.css";
|
||||
import {
|
||||
getMeals,
|
||||
createOrder,
|
||||
addOrders_MX,
|
||||
consume
|
||||
} from "@/api/zhengchuang/mealsOrdering";
|
||||
import { Message,MessageBox } from "element-ui";
|
||||
|
||||
const channelObj = new BroadcastChannel("myChannel");
|
||||
|
||||
export default {
|
||||
name: "MealsOrdering",
|
||||
data() {
|
||||
return {
|
||||
timeCount3: {
|
||||
data: 10,
|
||||
},
|
||||
timeCount30: {
|
||||
data: 30,
|
||||
},
|
||||
timer: null, //计时器
|
||||
intervalId: null,
|
||||
icTag: 0,
|
||||
apiRoot: '', //后端服务地址
|
||||
footerVisible: false,
|
||||
dialogVisible: false,
|
||||
dialog1Visible: false,
|
||||
resultWaitingVisible: false,
|
||||
resultSuccessVisible: false,
|
||||
index: 0,
|
||||
allPrice: 0,
|
||||
minute: new Date().getHours() * 60 + new Date().getMinutes(),
|
||||
mealsText: null,
|
||||
mealsInfoData1: [],
|
||||
mealsInfoData2: [],
|
||||
mealsInfoData3: [],
|
||||
orderingData: [],
|
||||
queryParams: {
|
||||
mcb: "",
|
||||
mname: "",
|
||||
mfl: "",
|
||||
mprice: null,
|
||||
mtoday: 1,
|
||||
mssgy: "",
|
||||
mcb: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
orderingData(val) {
|
||||
if (val.length > 0) {
|
||||
this.footerVisible = true;
|
||||
} else {
|
||||
this.footerVisible = false;
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.apiRoot = apiRoot;
|
||||
this.initWebSocket(); //人脸
|
||||
this.isMealsClass();
|
||||
this.getMealsInfo1();
|
||||
this.getMealsInfo2();
|
||||
this.getMealsInfo3();
|
||||
this.intervalId = setInterval(this.getMealsInfo, 30 * 60 * 1000);
|
||||
},
|
||||
|
||||
methods: {
|
||||
isMealsClass() {
|
||||
if (this.minute >= 300 && this.hours < 510) {
|
||||
this.meal2Visible = true;
|
||||
this.meal1Visible = false;
|
||||
this.meal3Visible = false;
|
||||
this.mealsText = "早餐时间";
|
||||
this.queryParams.mcb = 2;
|
||||
} else if (
|
||||
(this.hours >= 660 && this.hours < 780) ||
|
||||
(this.hours >= 990 && this.hours < 810)
|
||||
) {
|
||||
this.meal2Visible = false;
|
||||
this.meal1Visible = true;
|
||||
this.meal3Visible = false;
|
||||
this.mealsText = "正餐时间";
|
||||
this.queryParams.mcb = 1;
|
||||
} else {
|
||||
this.meal2Visible = false;
|
||||
this.meal1Visible = false;
|
||||
this.meal3Visible = true;
|
||||
this.mealsText = "偏餐时间";
|
||||
this.queryParams.mcb = 3;
|
||||
}
|
||||
},
|
||||
|
||||
//查询
|
||||
getMealsInfo1() {
|
||||
this.queryParams.mfl = "主食";
|
||||
getMeals(this.queryParams).then((res) => {
|
||||
this.mealsInfoData1 = res.data;
|
||||
});
|
||||
},
|
||||
getMealsInfo2() {
|
||||
this.queryParams.mfl = "副食";
|
||||
getMeals(this.queryParams).then((res) => {
|
||||
this.mealsInfoData2 = res.data;
|
||||
});
|
||||
},
|
||||
|
||||
getMealsInfo3() {
|
||||
this.queryParams.mfl = "小菜";
|
||||
getMeals(this.queryParams).then((res) => {
|
||||
this.mealsInfoData3 = res.data;
|
||||
});
|
||||
},
|
||||
|
||||
//加入购物车
|
||||
addOrderCar(item) {
|
||||
this.orderingData.push(item);
|
||||
this.allPrice += item.mprice;
|
||||
},
|
||||
|
||||
dropOrderCar(item, index) {
|
||||
this.orderingData.splice(index, 1);
|
||||
this.allPrice -= item.mprice;
|
||||
},
|
||||
|
||||
handleConfirm() {
|
||||
this.dialogVisible = true;
|
||||
this.resultWaitingVisible = true;
|
||||
this.resultSuccessVisible = false;
|
||||
this.startCountdown(this.timeCount30);
|
||||
this.icTag = 1;
|
||||
},
|
||||
|
||||
handleSuccess(creator) {
|
||||
let orderItem = {};
|
||||
orderItem.status = 0;
|
||||
orderItem.creator = creator;
|
||||
createOrder(orderItem)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
|
||||
this.orderingData.forEach((item, index) => {
|
||||
let orderItem_MX = {};
|
||||
orderItem_MX.lsh = res.data;
|
||||
orderItem_MX.meal_id = item.meal_id;
|
||||
orderItem_MX.mname = item.mname;
|
||||
orderItem_MX.mprice = item.mprice;
|
||||
orderItem_MX.mfl = item.mfl;
|
||||
addOrders_MX(orderItem_MX)
|
||||
.then((res) => {})
|
||||
.catch(() => {
|
||||
// Message.error("操作失败");
|
||||
});
|
||||
});
|
||||
|
||||
if (this.queryParams.mcb == 3) {
|
||||
//偏餐时间给厨师终端添加订单,发送消息
|
||||
channelObj.postMessage("2603"); //向厨师终端发送广播
|
||||
}
|
||||
|
||||
this.resultSuccessVisible = true;
|
||||
this.resultWaitingVisible = false;
|
||||
this.startCountdown(this.timeCount3);
|
||||
setTimeout(() => {
|
||||
this.dialog1Visible = false;
|
||||
this.dialogVisible = false;
|
||||
}, 10 * 1000);
|
||||
})
|
||||
.catch(() => {
|
||||
// Message.error("操作失败");
|
||||
});
|
||||
},
|
||||
|
||||
//计时器
|
||||
startCountdown(timeCount) {
|
||||
this.timer = setInterval(() => {
|
||||
if (timeCount.data > 0) {
|
||||
timeCount.data -= 1;
|
||||
} else {
|
||||
this.clearCountdown();
|
||||
window.location.reload();
|
||||
//this.icTag = 0;
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
clearCountdown() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
|
||||
selfCancel() {
|
||||
window.location.reload();
|
||||
},
|
||||
|
||||
//人脸识别
|
||||
initWebSocket: function () {
|
||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||
this.websock = new WebSocket(
|
||||
"ws://"+this.apiRoot+"/yktgl/MealsWebsocket/test33"
|
||||
);
|
||||
this.websock.onopen = this.websocketonopen;
|
||||
this.websock.onerror = this.websocketonerror;
|
||||
this.websock.onmessage = this.websocketonmessage;
|
||||
this.websock.onclose = this.websocketclose;
|
||||
},
|
||||
websocketonopen: function () {
|
||||
console.log("WebSocket连接成功");
|
||||
},
|
||||
websocketonerror: function () {
|
||||
console.log("WebSocket连接发生错误" + 11);
|
||||
},
|
||||
websocketonmessage: function (e) {
|
||||
// this.visible_badge = false;
|
||||
// this.visible_jlxxtx = true;
|
||||
// this.playVoice();
|
||||
// console.log(e.data); // console.log(e);
|
||||
// console.log(e);
|
||||
// console.log(e.data);
|
||||
var messageObj = JSON.parse(e.data); //后端返回参数
|
||||
|
||||
if (messageObj.code === '5' && this.icTag === 1) {
|
||||
|
||||
|
||||
consume(messageObj.icName,this.allPrice).then(res =>{ //消费
|
||||
this.handleSuccess(messageObj.icName); //调用消费成功方法
|
||||
}).catch(() => {
|
||||
MessageBox.alert("卡内余额不足", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
type: "danger",
|
||||
center: true,
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
websocketclose: function (e) {
|
||||
location.reload();
|
||||
console.log("connection closed (" + e.code + ")");
|
||||
},
|
||||
|
||||
//消费
|
||||
consume(icName, allPrice){
|
||||
updateMoney().then(res =>{
|
||||
}).catch(() => {
|
||||
// Message.error("操作失败");
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.clearCountdown();
|
||||
if (this.intervalId) {
|
||||
clearInterval(this.intervalId);
|
||||
}
|
||||
},
|
||||
|
||||
destroyed: function () {
|
||||
// 离开页面生命周期函数
|
||||
this.websocketclose();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/* ============ 餐饮订购界面现代化样式 ============ */
|
||||
.app_contianer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
|
||||
font-family: var(--font-family);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ============ 头部容器 ============ */
|
||||
.head_contianer {
|
||||
height: 120px;
|
||||
background: var(--surface);
|
||||
box-shadow: var(--shadow-lg);
|
||||
z-index: 100;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-header {
|
||||
background: var(--gradient-primary);
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
height: 120px !important;
|
||||
box-shadow: var(--shadow-lg);
|
||||
}
|
||||
|
||||
.el-header h1 {
|
||||
font-size: var(--text-4xl);
|
||||
font-weight: 700;
|
||||
text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
margin: 0;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
.headerFont {
|
||||
position: absolute;
|
||||
right: var(--space-8);
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 600;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
padding: var(--space-2) var(--space-4);
|
||||
border-radius: var(--radius-lg);
|
||||
backdrop-filter: blur(10px);
|
||||
animation: pulse 2s infinite;
|
||||
}
|
||||
|
||||
/* ============ 主内容区域 ============ */
|
||||
.main_contianer {
|
||||
height: calc(100vh - 120px);
|
||||
display: flex;
|
||||
background: var(--background);
|
||||
}
|
||||
|
||||
.el-main {
|
||||
background: var(--background);
|
||||
padding: var(--space-6) var(--space-8);
|
||||
line-height: normal;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* ============ 菜品卡片样式 ============ */
|
||||
.el-card {
|
||||
border-radius: var(--radius-2xl) !important;
|
||||
border: 1px solid var(--divider) !important;
|
||||
box-shadow: var(--shadow-md) !important;
|
||||
transition: all var(--duration-300) ease !important;
|
||||
overflow: hidden !important;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
background: var(--surface) !important;
|
||||
}
|
||||
|
||||
.el-card:hover {
|
||||
transform: translateY(-8px) scale(1.02) !important;
|
||||
box-shadow: var(--shadow-xl) !important;
|
||||
border-color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
.el-card:active {
|
||||
transform: translateY(-4px) scale(1.01) !important;
|
||||
}
|
||||
|
||||
.el-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 4px;
|
||||
background: var(--gradient-primary);
|
||||
transform: scaleX(0);
|
||||
transform-origin: left;
|
||||
transition: transform var(--duration-300) ease;
|
||||
}
|
||||
|
||||
.el-card:hover::before {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
|
||||
/* 菜品内容样式 */
|
||||
.el-card .meal-content {
|
||||
background: var(--surface);
|
||||
padding: var(--space-6);
|
||||
text-align: center;
|
||||
min-height: 120px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.meal-name {
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: var(--space-2);
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.meal-price {
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 600;
|
||||
color: #fd5e21;
|
||||
text-shadow: 0 1px 2px rgba(253, 94, 33, 0.2);
|
||||
}
|
||||
|
||||
.meal-price::before {
|
||||
content: '¥';
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
/* ============ 分隔线美化 ============ */
|
||||
.el-divider--horizontal {
|
||||
margin: var(--space-8) 0;
|
||||
border-top: 2px solid var(--divider);
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.el-divider--horizontal::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
background: var(--gradient-primary);
|
||||
border-radius: 50%;
|
||||
opacity: 0.1;
|
||||
}
|
||||
|
||||
/* ============ 侧边栏购物车 ============ */
|
||||
.el-aside {
|
||||
background: var(--surface);
|
||||
border-left: 1px solid var(--divider);
|
||||
box-shadow: var(--shadow-lg);
|
||||
overflow: hidden;
|
||||
width: 450px !important;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cart-header {
|
||||
background: var(--gradient-primary);
|
||||
color: white;
|
||||
padding: var(--space-6);
|
||||
text-align: center;
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 600;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.cart-items {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: var(--space-4);
|
||||
max-height: calc(100vh - 320px);
|
||||
}
|
||||
|
||||
.cart-item-card {
|
||||
margin-bottom: var(--space-4);
|
||||
border-radius: var(--radius-lg) !important;
|
||||
border: 1px solid var(--divider) !important;
|
||||
box-shadow: var(--shadow-sm) !important;
|
||||
transition: all var(--duration-200) ease !important;
|
||||
}
|
||||
|
||||
.cart-item-card:hover {
|
||||
box-shadow: var(--shadow-md) !important;
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
.bottom2 {
|
||||
padding: var(--space-4);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
line-height: normal;
|
||||
height: auto;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
.cart-item-name {
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
|
||||
.cart-item-price {
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: #fd5e21;
|
||||
}
|
||||
|
||||
.rbutton2 {
|
||||
background: var(--gradient-danger) !important;
|
||||
border: none !important;
|
||||
color: white !important;
|
||||
transition: all var(--duration-200) ease !important;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.rbutton2:hover {
|
||||
transform: scale(1.1) rotate(10deg) !important;
|
||||
box-shadow: var(--shadow-md) !important;
|
||||
}
|
||||
|
||||
/* ============ 底部结算区域 ============ */
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--surface);
|
||||
border-top: 1px solid var(--divider);
|
||||
padding: var(--space-6);
|
||||
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
|
||||
backdrop-filter: blur(20px);
|
||||
}
|
||||
|
||||
.total-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
.total-label {
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.total-price {
|
||||
font-size: var(--text-3xl);
|
||||
font-weight: 700;
|
||||
color: #fd5e21;
|
||||
text-shadow: 0 2px 4px rgba(253, 94, 33, 0.2);
|
||||
}
|
||||
|
||||
.jsbutton {
|
||||
width: 100% !important;
|
||||
height: 60px !important;
|
||||
font-size: var(--text-xl) !important;
|
||||
font-weight: 600 !important;
|
||||
background: var(--gradient-primary) !important;
|
||||
border: none !important;
|
||||
color: white !important;
|
||||
border-radius: var(--radius-xl) !important;
|
||||
box-shadow: var(--shadow-lg) !important;
|
||||
transition: all var(--duration-200) ease !important;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.jsbutton::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
transparent,
|
||||
rgba(255, 255, 255, 0.3),
|
||||
transparent
|
||||
);
|
||||
transition: left var(--duration-300) ease;
|
||||
}
|
||||
|
||||
.jsbutton:hover::before {
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
.jsbutton:hover {
|
||||
transform: translateY(-2px) !important;
|
||||
box-shadow: var(--shadow-xl) !important;
|
||||
}
|
||||
|
||||
.jsbutton:active {
|
||||
transform: translateY(0) !important;
|
||||
}
|
||||
|
||||
/* ============ 对话框美化 ============ */
|
||||
.el-dialog {
|
||||
border-radius: var(--radius-2xl) !important;
|
||||
overflow: hidden !important;
|
||||
box-shadow: var(--shadow-xl) !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(20px) !important;
|
||||
}
|
||||
|
||||
.el-dialog__header {
|
||||
background: var(--gradient-primary) !important;
|
||||
color: white !important;
|
||||
padding: var(--space-6) var(--space-8) !important;
|
||||
}
|
||||
|
||||
.el-dialog__title {
|
||||
font-size: var(--text-xl) !important;
|
||||
font-weight: 600 !important;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.el-dialog__close {
|
||||
color: white !important;
|
||||
font-size: var(--text-xl) !important;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: var(--space-8) !important;
|
||||
background: var(--surface) !important;
|
||||
}
|
||||
|
||||
/* ============ 结果页面美化 ============ */
|
||||
.el-result {
|
||||
background: var(--surface) !important;
|
||||
border-radius: var(--radius-xl) !important;
|
||||
box-shadow: var(--shadow-md) !important;
|
||||
padding: var(--space-8) !important;
|
||||
}
|
||||
|
||||
.el-result__title {
|
||||
font-size: var(--text-2xl) !important;
|
||||
font-weight: 600 !important;
|
||||
color: var(--text-primary) !important;
|
||||
}
|
||||
|
||||
.el-result__subtitle {
|
||||
font-size: var(--text-lg) !important;
|
||||
color: var(--text-secondary) !important;
|
||||
}
|
||||
|
||||
.el-result__subtitle p {
|
||||
color: #fd5e21 !important;
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
/* ============ 加载和过渡效果 ============ */
|
||||
.meal-cards-enter-active,
|
||||
.meal-cards-leave-active {
|
||||
transition: all var(--duration-300) ease;
|
||||
}
|
||||
|
||||
.meal-cards-enter {
|
||||
opacity: 0;
|
||||
transform: translateY(30px) scale(0.9);
|
||||
}
|
||||
|
||||
.meal-cards-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(-30px) scale(0.9);
|
||||
}
|
||||
|
||||
/* ============ 响应式设计 ============ */
|
||||
@media (max-width: 1200px) {
|
||||
.el-aside {
|
||||
width: 400px !important;
|
||||
}
|
||||
|
||||
.el-header h1 {
|
||||
font-size: var(--text-3xl);
|
||||
}
|
||||
|
||||
.meal-name {
|
||||
font-size: var(--text-xl);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.main_contianer {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.el-aside {
|
||||
width: 100% !important;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.el-main {
|
||||
padding: var(--space-4);
|
||||
height: calc(100vh - 420px);
|
||||
}
|
||||
|
||||
.head_contianer {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.el-header {
|
||||
height: 80px !important;
|
||||
}
|
||||
|
||||
.el-header h1 {
|
||||
font-size: var(--text-2xl);
|
||||
}
|
||||
|
||||
.cart-items {
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: var(--space-4);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.el-main {
|
||||
padding: var(--space-3);
|
||||
}
|
||||
|
||||
.meal-name {
|
||||
font-size: var(--text-lg);
|
||||
}
|
||||
|
||||
.meal-price {
|
||||
font-size: var(--text-base);
|
||||
}
|
||||
|
||||
.total-price {
|
||||
font-size: var(--text-2xl);
|
||||
}
|
||||
|
||||
.jsbutton {
|
||||
height: 50px !important;
|
||||
font-size: var(--text-lg) !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============ 特殊动画效果 ============ */
|
||||
.meal-glow {
|
||||
animation: mealGlow 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes mealGlow {
|
||||
0%, 100% {
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
50% {
|
||||
box-shadow:
|
||||
var(--shadow-lg),
|
||||
0 0 20px rgba(253, 94, 33, 0.3),
|
||||
0 0 40px rgba(253, 94, 33, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.cart-bounce-enter-active {
|
||||
animation: cartBounce var(--duration-500) ease;
|
||||
}
|
||||
|
||||
@keyframes cartBounce {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: scale(0) rotate(180deg);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
transform: scale(1.2) rotate(90deg);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* ============ 添加到购物车动画 ============ */
|
||||
.add-to-cart-animation {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.add-to-cart-animation::after {
|
||||
content: '+1';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: var(--gradient-success);
|
||||
color: white;
|
||||
padding: var(--space-2) var(--space-4);
|
||||
border-radius: var(--radius-lg);
|
||||
font-weight: 600;
|
||||
font-size: var(--text-sm);
|
||||
animation: addToCartPop var(--duration-500) ease;
|
||||
pointer-events: none;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
@keyframes addToCartPop {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -50%) scale(0);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, -80%) scale(1.2);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -120%) scale(1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,533 @@
|
||||
<template>
|
||||
<div class="app_contianer">
|
||||
<el-container class="head_contianer">
|
||||
<el-header style="height: 85px"
|
||||
><h1 style="font-size: 40px; color: #ffffff">订餐管理平台</h1>
|
||||
<!-- <span class="headerFont">{{ mealsText }} </span> -->
|
||||
</el-header>
|
||||
</el-container>
|
||||
|
||||
<el-container class="main_contianer">
|
||||
<el-aside width="100px" style="background-color: #282b3c">
|
||||
<p style="margin: 0">
|
||||
<button
|
||||
ref="lookButton"
|
||||
:style="{ backgroundColor: bgbColor.bgb1 }"
|
||||
class="menu_button"
|
||||
@click="getOrders('0', 1)"
|
||||
>
|
||||
<p><i class="el-icon-s-shop"></i></p>
|
||||
<el-badge value="new" :hidden="newVisible">
|
||||
<span class="ffffff">未完成订单</span></el-badge
|
||||
>
|
||||
</button>
|
||||
</p>
|
||||
|
||||
<p style="margin: 0">
|
||||
<button
|
||||
:style="{ backgroundColor: bgbColor.bgb2 }"
|
||||
class="menu_button"
|
||||
@click="getOrders('1', 2)"
|
||||
>
|
||||
<p><i class="el-icon-s-claim"></i></p>
|
||||
<span class="ffffff">已完成订单</span>
|
||||
</button>
|
||||
</p>
|
||||
</el-aside>
|
||||
|
||||
<el-main>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-table
|
||||
height="800"
|
||||
stripe
|
||||
class="my_table"
|
||||
:data="mealsOrdersData"
|
||||
:row-style="{ height: '40px' }"
|
||||
:header-cell-style="{
|
||||
height: '100px',
|
||||
color: '#606266',
|
||||
background: '#f5f7fa',
|
||||
}"
|
||||
:show-overflow-tooltip="true"
|
||||
:cell-style="columnStyle"
|
||||
>
|
||||
<el-table-column
|
||||
prop="order_id"
|
||||
label="订单id"
|
||||
width="110"
|
||||
align="center"
|
||||
v-if="false"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="lsh"
|
||||
label="订单号"
|
||||
width="205"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="creator"
|
||||
label="订餐人"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createtime"
|
||||
label="订餐时间"
|
||||
width="185"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="status"
|
||||
label="订单状态"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="mssgy"
|
||||
label="所属公寓"
|
||||
width="200"
|
||||
align="center"
|
||||
v-if="false"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="150"
|
||||
style="padding: 0"
|
||||
align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
@click="getOrder_MX(row)"
|
||||
class="lookButton"
|
||||
size="small"
|
||||
>详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-table
|
||||
height="490"
|
||||
stripe
|
||||
class="MX_table"
|
||||
:data="orderMX_Data"
|
||||
:row-style="{ height: '60px' }"
|
||||
:header-cell-style="{
|
||||
height: '100px',
|
||||
color: '#606266',
|
||||
background: '#f5f7fa',
|
||||
}"
|
||||
:show-overflow-tooltip="true"
|
||||
:cell-style="columnStyle2"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
:index="1"
|
||||
width="80"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="mname"
|
||||
label="餐品名称"
|
||||
width="375"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="mprice"
|
||||
label="价格(¥)"
|
||||
width="100"
|
||||
align="center"
|
||||
:formatter="priceFormatter"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="mfl"
|
||||
label=""
|
||||
width="185"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-descriptions
|
||||
class="myDescription"
|
||||
:column="2"
|
||||
border
|
||||
label-style="text-align:center; color:#606266;background:#f5f7fa;font-weight:700"
|
||||
>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i> 订餐人
|
||||
</template>
|
||||
{{ form.creator }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<i class="el-icon-tickets"></i> 订单号
|
||||
</template>
|
||||
{{ form.lsh }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :span="2">
|
||||
<template slot="label">
|
||||
<i class="el-icon-time"></i> 订餐时间
|
||||
</template>
|
||||
{{ form.createtime }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :span="2">
|
||||
<template slot="label">
|
||||
<i class="el-icon-chat-line-round"></i> 备注
|
||||
</template>
|
||||
<el-input
|
||||
v-model="form.bz"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 4 }"
|
||||
disabled
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :span="2">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-tools"></i> 操作
|
||||
</template>
|
||||
<el-button
|
||||
class="jsbutton"
|
||||
round
|
||||
@click="completeOrder()"
|
||||
:disabled="completeDisabled"
|
||||
>完成</el-button
|
||||
>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
<el-dialog
|
||||
class="myDialog"
|
||||
title="提示"
|
||||
:visible.sync="dialog1Visible"
|
||||
width="30%"
|
||||
center
|
||||
:close-on-click-modal="false"
|
||||
:show-close="false"
|
||||
>
|
||||
<el-result icon="warning" title="请先选择一个订单"> </el-result>
|
||||
<span slot="footer">
|
||||
<el-button @click="dialog1Visible = false" class="greenButton"
|
||||
>确定</el-button
|
||||
>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
class="myDialog"
|
||||
title="提示"
|
||||
:visible.sync="dialog2Visible"
|
||||
width="30%"
|
||||
center
|
||||
:close-on-click-modal="false"
|
||||
:show-close="false"
|
||||
>
|
||||
<el-result icon="success" title="该订单已完成!正在返回页面...">
|
||||
</el-result>
|
||||
<span slot="footer"> </span>
|
||||
</el-dialog>
|
||||
|
||||
<audioPlay
|
||||
ref="audioPlay"
|
||||
:audioUrl="newOrderTip"
|
||||
v-show="audioPlayVisible"
|
||||
></audioPlay>
|
||||
<audioPlay
|
||||
ref="audioPlay2"
|
||||
:audioUrl="orderCompleteTip"
|
||||
v-show="audioPlayVisible"
|
||||
></audioPlay>
|
||||
<textSpeak ref="textSpeak" :speakText="speakText"></textSpeak>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
import "../css/MealCss.css";
|
||||
import "../css/scrollbar.css";
|
||||
import {
|
||||
OrdersSearch,
|
||||
OrderMX_search,
|
||||
updateStatus,
|
||||
} from "@/api/zhengchuang/mealsOrdering";
|
||||
|
||||
import audioPlay from "../components/audioPlay.vue";
|
||||
import textSpeak from "../components/textSpeak.vue";
|
||||
import { Message } from "element-ui";
|
||||
|
||||
export default {
|
||||
name: "chefOrders",
|
||||
data() {
|
||||
return {
|
||||
newOrderTip: require("@/assets/newOrderTip.mp3"),
|
||||
orderCompleteTip: require("@/assets/orderCompleteTip.mp3"),
|
||||
speakText: null,
|
||||
newVisible: true,
|
||||
audioPlayVisible: false,
|
||||
completeDisabled: false,
|
||||
dialog1Visible: false,
|
||||
dialog2Visible: false,
|
||||
index: 1,
|
||||
mealsOrdersData: [],
|
||||
orderMX_Data: [],
|
||||
form: {},
|
||||
|
||||
queryParams: {
|
||||
status: "0",
|
||||
mssgy: "",
|
||||
},
|
||||
|
||||
bgbColor: {
|
||||
bgb1: "#17B3A3",
|
||||
bgb2: "#282b3c",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
audioPlay,
|
||||
textSpeak,
|
||||
},
|
||||
|
||||
methods: {
|
||||
changeButtonColor(index) {
|
||||
if (index == 1) {
|
||||
this.bgbColor.bgb1 = "#17B3A3";
|
||||
this.bgbColor.bgb2 = "#282b3c";
|
||||
} else if (index == 2) {
|
||||
this.bgbColor.bgb2 = "#17B3A3";
|
||||
this.bgbColor.bgb1 = "#282b3c";
|
||||
}
|
||||
},
|
||||
|
||||
getOrders(status, index) {
|
||||
this.changeButtonColor(index);
|
||||
this.orderMX_Data = [];
|
||||
this.form = {};
|
||||
this.queryParams.status = status;
|
||||
if (status == 0) {
|
||||
this.completeDisabled = false;
|
||||
} else {
|
||||
this.completeDisabled = true;
|
||||
}
|
||||
|
||||
OrdersSearch(this.queryParams).then((res) => {
|
||||
this.mealsOrdersData = res.data;
|
||||
});
|
||||
},
|
||||
|
||||
getOrder_MX(row) {
|
||||
this.newVisible = true;
|
||||
this.form = row;
|
||||
OrderMX_search(row.lsh).then((res) => {
|
||||
this.orderMX_Data = res.data;
|
||||
console.log(this.orderMX_Data);
|
||||
});
|
||||
},
|
||||
|
||||
completeOrder() {
|
||||
if (this.orderMX_Data.length == 0) {
|
||||
this.dialog1Visible = true;
|
||||
} else {
|
||||
updateStatus(this.form.order_id)
|
||||
.then((res) => {
|
||||
this.dialog2Visible = true;
|
||||
setTimeout(() => {
|
||||
this.dialog2Visible = false;
|
||||
this.getOrders("0", 1);
|
||||
}, 1000);
|
||||
})
|
||||
.catch(() => {
|
||||
Message.error("操作失败");
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//表格列样式
|
||||
columnStyle(row, column, rowIndex, columnIndex) {
|
||||
if (row.columnIndex === 3) {
|
||||
return "color: #fd5e21";
|
||||
}
|
||||
},
|
||||
priceFormatter(row, column, cellValue, index) {
|
||||
return cellValue + ".00";
|
||||
},
|
||||
columnStyle2(row, column, rowIndex, columnIndex) {
|
||||
if (row.columnIndex === 1) {
|
||||
return "color: #17b3a3;font-size: 25px; ";
|
||||
}
|
||||
},
|
||||
|
||||
handleAudioPlay() {
|
||||
this.$refs.audioPlay.playAudio();
|
||||
this.newVisible = false;
|
||||
},
|
||||
|
||||
|
||||
handleReceivedMessage(event) {
|
||||
console.log(event.data);
|
||||
if (event.data === "2603") {
|
||||
this.getOrders("0", 1);
|
||||
this.handleAudioPlay();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
const channelObj = new BroadcastChannel("myChannel");
|
||||
channelObj.addEventListener("message", this.handleReceivedMessage);
|
||||
|
||||
this.getOrders("0", 1);
|
||||
this.$refs.lookButton.focus();
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
const channelObj = new BroadcastChannel("myChannel");
|
||||
channelObj.removeEventListener("message", this.handleReceivedMessage);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.head_contianer {
|
||||
height: 9%;
|
||||
}
|
||||
.main_contianer {
|
||||
height: 91%;
|
||||
}
|
||||
|
||||
.el-header {
|
||||
background-color: #282b3c;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
line-height: 15px;
|
||||
}
|
||||
.el-aside {
|
||||
background-color: #f9f9f9;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
line-height: 200px;
|
||||
}
|
||||
|
||||
.el-main {
|
||||
background-color: #f2f2f2;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
padding: 20px 40px 20px 40px;
|
||||
}
|
||||
|
||||
.menu_button {
|
||||
width: 100%;
|
||||
border: 0;
|
||||
border-radius: 0px;
|
||||
height: 430px;
|
||||
padding: 0;
|
||||
color: #f2f2f2;
|
||||
font-size: 25px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.app_contianer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.my_table {
|
||||
width: 85%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.MX_table {
|
||||
width: 85%;
|
||||
margin-top: 20px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.ffffff {
|
||||
color: #ffffff;
|
||||
writing-mode: vertical-rl;
|
||||
letter-spacing: 8px;
|
||||
}
|
||||
|
||||
.lookButton {
|
||||
background: #414561;
|
||||
color: #f2f2f2;
|
||||
width: 100px;
|
||||
letter-spacing: 5px;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.lookButton:focus {
|
||||
background: #17b3a3;
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 5px;
|
||||
line-height: 35px;
|
||||
text-align: left;
|
||||
}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mealImg {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.myDescription {
|
||||
margin-top: 20px;
|
||||
width: 85%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.jsbutton {
|
||||
font-size: 25px;
|
||||
font-weight: 700;
|
||||
width: 150px;
|
||||
margin-left: 25px;
|
||||
background: #17b3a3;
|
||||
color: #f2f2f2;
|
||||
margin-left: 200px;
|
||||
}
|
||||
.jsbutton:focus {
|
||||
background: #17b3a3;
|
||||
color: #f2f2f2;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,571 @@
|
||||
<template>
|
||||
<div class="app_contianer">
|
||||
<el-container class="head_contianer">
|
||||
<el-header style="height: 85px">
|
||||
<h1 style="font-size: 40px; color: #ffffff">自助结算平台</h1>
|
||||
<!-- <span class="headerFont">{{ mealsText }} </span> -->
|
||||
</el-header>
|
||||
</el-container>
|
||||
<el-container class="main_contianer"
|
||||
style="display: flex; justify-content: center; align-items: center; height: 70%;">
|
||||
<div style="text-align: center;">
|
||||
<el-row>
|
||||
<label>请输入结算金额</label>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-input style="padding-top: 20px;padding-bottom: 20px;" v-model="money"
|
||||
@input="(v) => (money = v.replace(/[^\d.]/g, ''))" :disabled="isDisabled"></el-input>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button type="primary" @click="dialog1Visible = true" style="padding-top: 20px;width: 200px;">确定</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- <el-main>
|
||||
<el-row :gutter="20">
|
||||
<el-col v-for="item in mealsInfoData" :key="item.meal_id" :span="6">
|
||||
<el-card class="mb-20" :body-style="{ padding: '0px' }">
|
||||
<div style="background: #f2f6fc; line-height: 200px" @click="addOrderCar(item)">
|
||||
<span class="ml-10" style="font-weight: 700; font-size: 35px; color: #fd5e21;">¥{{
|
||||
item.mprice
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="bottom clearfix">
|
||||
<el-button
|
||||
class="rbutton"
|
||||
size="small"
|
||||
@click="handleDelete(item)"
|
||||
><span class="fontStyle">删除</span></el-button
|
||||
>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="6">
|
||||
<el-card class="mb-20" :body-style="{ padding: '0px' }">
|
||||
<div style="background: #f2f6fc; line-height: 200px" @click="handleAdd()">
|
||||
<span class="ml-10" style="font-weight: 700; font-size: 35px; color: #fd5e21;" v-show="!visible_add">+</span>
|
||||
<el-input type="number" style="width: 40%;" v-show="visible_add" placeholder="请输入金额" v-model="newPrice"></el-input>
|
||||
</div>
|
||||
<div class="bottom clearfix">
|
||||
<el-button
|
||||
class="rbutton"
|
||||
size="small"
|
||||
@click="confirmAdd()"
|
||||
><span class="fontStyle">添加</span></el-button
|
||||
>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-main>
|
||||
|
||||
<el-aside width="450px" style="height: 85%">
|
||||
<el-row>
|
||||
<el-col :span="24" v-for="(item, index) in orderingData" :key="index">
|
||||
<el-card :body-style="{ padding: '0px' }">
|
||||
<div class="bottom2 clearfix">
|
||||
<div>
|
||||
<span
|
||||
class="ml-10"
|
||||
style="font-weight: 700; font-size: 20px"
|
||||
>{{ item.mname }}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span
|
||||
style="
|
||||
margin-left: 10px;
|
||||
color: #fd5e21;
|
||||
font-weight: 700;
|
||||
font-size: 20px;
|
||||
"
|
||||
>¥{{ item.mprice }}.00
|
||||
</span>
|
||||
|
||||
<el-button
|
||||
class="rbutton2"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
size="small"
|
||||
@click="dropOrderCar(item, index)"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class="footer" v-if="footerVisible">
|
||||
<span style="font-weight: 700; margin-left: 10px">合计:</span>
|
||||
<span style="color: #fd5e21; font-weight: 700">¥</span
|
||||
><span
|
||||
style="color: #fd5e21; font-weight: 700; font-size: 40px"
|
||||
class="ps10"
|
||||
>
|
||||
{{ allPrice }}.00
|
||||
</span>
|
||||
<el-button class="jsbutton" round @click="dialog1Visible = true"
|
||||
>结算</el-button
|
||||
>
|
||||
</div>
|
||||
</el-aside> -->
|
||||
</el-container>
|
||||
|
||||
<el-dialog class="myDialog" title="提示" :visible.sync="dialogVisible" width="30%" center :close-on-click-modal="false"
|
||||
:show-close="false">
|
||||
<el-result icon="info" title="请刷卡支付..." :subTitle="timeCount30.data + '秒后无操作自动返回主页面...'"
|
||||
v-if="resultWaitingVisible">
|
||||
</el-result>
|
||||
<el-result icon="success" title="支付成功,请到食堂等待出餐" :subTitle="timeCount3.data + '秒后返回主页...'"
|
||||
v-if="resultSuccessVisible">
|
||||
</el-result>
|
||||
<span slot="footer">
|
||||
<el-button v-if="resultSuccessVisible" @click="selfCancel">手动返回</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 结算提示 -->
|
||||
<el-dialog class="myDialog" title="提示" :visible.sync="dialog1Visible" width="30%" center :close-on-click-modal="false"
|
||||
:show-close="false">
|
||||
<el-result icon="warning" title="消费金额确认之后无法修改!请确认是否继续?">
|
||||
</el-result>
|
||||
<span slot="footer">
|
||||
<el-button @click="handleConfirm" class="greenButton">确定</el-button>
|
||||
<el-button @click="dialog1Visible = false" class="greenButton">返回</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import "../css/MealCss.css";
|
||||
import {
|
||||
getMeals,
|
||||
createOrder,
|
||||
addOrders_MX,
|
||||
getCsLb
|
||||
} from "@/api/zhengchuang/mealsOrdering";
|
||||
import { Message } from "element-ui";
|
||||
import { isHoliday } from '@/api/jcgl/jcgl'
|
||||
|
||||
const channelObj = new BroadcastChannel("myChannel");
|
||||
|
||||
export default {
|
||||
name: "MealsOrdering",
|
||||
data() {
|
||||
return {
|
||||
money: 0.00,
|
||||
isDisabled: false,
|
||||
newPrice: 0.0,
|
||||
visible_add: false,
|
||||
timeCount3: {
|
||||
data: 10,
|
||||
},
|
||||
timeCount30: {
|
||||
data: 30,
|
||||
},
|
||||
timer: null, //计时器
|
||||
intervalId: null,
|
||||
icTag: 0,
|
||||
|
||||
footerVisible: false,
|
||||
dialogVisible: false,
|
||||
dialog1Visible: false,
|
||||
resultWaitingVisible: false,
|
||||
resultSuccessVisible: false,
|
||||
index: 0,
|
||||
allPrice: 0,
|
||||
minute: new Date().getHours() * 60 + new Date().getMinutes(),
|
||||
mealsText: null,
|
||||
mealsInfoData: [{ 'meal_id': '1', 'mprice': 1 }, { 'meal_id': '2', 'mprice': 2 }, { 'meal_id': '5', 'mprice': 5 }],
|
||||
orderingData: [],
|
||||
|
||||
queryParams: {
|
||||
mcb: "",
|
||||
mname: "",
|
||||
mfl: "",
|
||||
mprice: null,
|
||||
mtoday: 1,
|
||||
mssgy: "",
|
||||
mcb: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
orderingData(val) {
|
||||
if (val.length > 0) {
|
||||
this.footerVisible = true;
|
||||
} else {
|
||||
this.footerVisible = false;
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// this.initWebSocket(); //人脸
|
||||
this.isMealsClass();
|
||||
this.isHoliday();
|
||||
getCsLb().then(res =>{
|
||||
console.log(res.data);
|
||||
})
|
||||
|
||||
// this.getMealsInfo();
|
||||
// this.intervalId = setInterval(this.getMealsInfo, 30 * 60 * 1000);
|
||||
},
|
||||
|
||||
methods: {
|
||||
isHoliday() {
|
||||
isHoliday().then(res => {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (res.data) {
|
||||
this.isDisabled = true;
|
||||
getCsLb().then(res =>{
|
||||
if(res.data == '早餐')
|
||||
this.money = 10;
|
||||
else if(res.data == '正餐')
|
||||
this.money = 20;
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
confirmAdd() {
|
||||
this.mealsInfoData.push({ 'meal_id': this.newPrice, 'mprice': Number(this.newPrice) });
|
||||
this.visible_add = false;
|
||||
},
|
||||
handleAdd() {
|
||||
this.visible_add = true;
|
||||
},
|
||||
handleDelete(temp) {
|
||||
console.log(temp);
|
||||
this.mealsInfoData = this.mealsInfoData.filter(item => {
|
||||
return item.meal_id !== temp.meal_id;
|
||||
});
|
||||
},
|
||||
isMealsClass() {
|
||||
console.log(this.minute);
|
||||
if (this.minute >= 300 && this.hours < 510) {
|
||||
this.meal2Visible = true;
|
||||
this.meal1Visible = false;
|
||||
this.meal3Visible = false;
|
||||
this.mealsText = "早餐时间";
|
||||
this.queryParams.mcb = 2;
|
||||
} else if (
|
||||
(this.hours >= 660 && this.hours < 780) ||
|
||||
(this.hours >= 990 && this.hours < 810)
|
||||
) {
|
||||
this.meal2Visible = false;
|
||||
this.meal1Visible = true;
|
||||
this.meal3Visible = false;
|
||||
this.mealsText = "正餐时间";
|
||||
this.queryParams.mcb = 1;
|
||||
} else {
|
||||
this.meal2Visible = false;
|
||||
this.meal1Visible = false;
|
||||
this.meal3Visible = true;
|
||||
this.mealsText = "偏餐时间";
|
||||
this.queryParams.mcb = 3;
|
||||
}
|
||||
},
|
||||
|
||||
//查询
|
||||
getMealsInfo() {
|
||||
getMeals(this.queryParams).then((res) => {
|
||||
console.log(res);
|
||||
this.mealsInfoData = res.data;
|
||||
console.log(this.mealsInfoData);
|
||||
});
|
||||
},
|
||||
|
||||
//加入购物车
|
||||
addOrderCar(item) {
|
||||
this.orderingData.push(item);
|
||||
this.allPrice += item.mprice;
|
||||
},
|
||||
|
||||
dropOrderCar(item, index) {
|
||||
console.log(index);
|
||||
this.orderingData.splice(index, 1);
|
||||
this.allPrice -= item.mprice;
|
||||
},
|
||||
|
||||
handleConfirm() {
|
||||
this.dialogVisible = true;
|
||||
this.resultWaitingVisible = true;
|
||||
this.resultSuccessVisible = false;
|
||||
this.startCountdown(this.timeCount30);
|
||||
this.icTag = 1;
|
||||
},
|
||||
|
||||
handleSuccess(creator) {
|
||||
let orderItem = {};
|
||||
orderItem.status = 0;
|
||||
orderItem.creator = creator;
|
||||
createOrder(orderItem)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.orderingData.forEach((item, index) => {
|
||||
let orderItem_MX = {};
|
||||
orderItem_MX.lsh = res.data;
|
||||
orderItem_MX.meal_id = item.meal_id;
|
||||
orderItem_MX.mname = item.mname;
|
||||
orderItem_MX.mprice = item.mprice;
|
||||
orderItem_MX.mfl = item.mfl;
|
||||
addOrders_MX(orderItem_MX)
|
||||
.then((res) => { })
|
||||
.catch(() => {
|
||||
// Message.error("操作失败");
|
||||
});
|
||||
});
|
||||
|
||||
if (this.queryParams.mcb == 3) {
|
||||
//偏餐时间给厨师终端添加订单,发送消息
|
||||
channelObj.postMessage("2603"); //向厨师终端发送广播
|
||||
}
|
||||
|
||||
this.resultSuccessVisible = true;
|
||||
this.resultWaitingVisible = false;
|
||||
this.startCountdown(this.timeCount3);
|
||||
setTimeout(() => {
|
||||
this.dialog1Visible = false;
|
||||
this.dialogVisible = false;
|
||||
}, 10 * 1000);
|
||||
})
|
||||
.catch(() => {
|
||||
// Message.error("操作失败");
|
||||
});
|
||||
},
|
||||
|
||||
//计时器
|
||||
startCountdown(timeCount) {
|
||||
this.timer = setInterval(() => {
|
||||
if (timeCount.data > 0) {
|
||||
timeCount.data -= 1;
|
||||
} else {
|
||||
this.clearCountdown();
|
||||
window.location.reload();
|
||||
//this.icTag = 0;
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
clearCountdown() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
|
||||
selfCancel() {
|
||||
window.location.reload();
|
||||
},
|
||||
|
||||
//人脸识别
|
||||
initWebSocket: function () {
|
||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||
this.websock = new WebSocket(
|
||||
"ws://"+apiRoot+"/yktgl/MealsWebsocket/test33"
|
||||
);
|
||||
this.websock.onopen = this.websocketonopen;
|
||||
this.websock.onerror = this.websocketonerror;
|
||||
this.websock.onmessage = this.websocketonmessage;
|
||||
this.websock.onclose = this.websocketclose;
|
||||
},
|
||||
websocketonopen: function () {
|
||||
console.log("WebSocket连接成功");
|
||||
},
|
||||
websocketonerror: function () {
|
||||
console.log("WebSocket连接发生错误" + 11);
|
||||
},
|
||||
websocketonmessage: function (e) {
|
||||
// this.visible_badge = false;
|
||||
// this.visible_jlxxtx = true;
|
||||
// this.playVoice();
|
||||
// console.log(e.data); // console.log(e);
|
||||
// console.log(e);
|
||||
// console.log(e.data);
|
||||
var messageObj = JSON.parse(e.data); //后端返回参数
|
||||
console.log(messageObj.icNum);
|
||||
console.log(messageObj.icName);
|
||||
|
||||
if (messageObj.code === '5' && this.icTag === 1) {
|
||||
/* 执行消费方法,以下为消费方法的回调 */
|
||||
// this.consume(messageObj.icName,this.allPrice);
|
||||
this.handleSuccess(messageObj.icName);
|
||||
|
||||
}
|
||||
},
|
||||
websocketclose: function (e) {
|
||||
location.reload();
|
||||
console.log("connection closed (" + e.code + ")");
|
||||
},
|
||||
|
||||
//消费
|
||||
consume(icName, allPrice) {
|
||||
updateMoney().then(res => {
|
||||
console.log('111111111111111111111111'); //测试
|
||||
}).catch(() => {
|
||||
// Message.error("操作失败");
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.clearCountdown();
|
||||
if (this.intervalId) {
|
||||
clearInterval(this.intervalId);
|
||||
}
|
||||
},
|
||||
|
||||
destroyed: function () {
|
||||
// 离开页面生命周期函数
|
||||
this.websocketclose();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style >
|
||||
.el-header {
|
||||
background-color: #282b3c;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
.el-aside {
|
||||
background-color: #f9f9f9;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
line-height: 200px;
|
||||
}
|
||||
|
||||
.el-main {
|
||||
background-color: #f2f2f2;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
line-height: 160px;
|
||||
padding: 20px 40px 20px 40px;
|
||||
}
|
||||
|
||||
body>.el-container {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.el-container:nth-child(5) .el-aside,
|
||||
.el-container:nth-child(6) .el-aside {
|
||||
line-height: 260px;
|
||||
}
|
||||
|
||||
.el-container:nth-child(7) .el-aside {
|
||||
line-height: 320px;
|
||||
}
|
||||
|
||||
.head_contianer {
|
||||
height: 9%;
|
||||
}
|
||||
|
||||
.main_contianer {
|
||||
height: 91%;
|
||||
}
|
||||
|
||||
.app_contianer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.el-menu {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ffffff {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.mealImg {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.headerFont {
|
||||
position: absolute;
|
||||
left: 94%;
|
||||
top: 6%;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 5px;
|
||||
line-height: 35px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.bottom2 {
|
||||
margin-top: 5px;
|
||||
text-align: left;
|
||||
height: 100px;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.rbutton2 {
|
||||
float: right;
|
||||
position: relative;
|
||||
top: 7px;
|
||||
margin-right: 20px;
|
||||
background: #fd5e21;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
line-height: 100px;
|
||||
width: 398px;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.ps10 {
|
||||
position: relative;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
.jsbutton {
|
||||
font-size: 25px;
|
||||
font-weight: 700;
|
||||
width: 150px;
|
||||
margin-left: 25px;
|
||||
background: #fd5e21;
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.jsbutton:focus {
|
||||
background: #fd5e21;
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.el-result__subtitle p {
|
||||
color: #fd5e21;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,340 @@
|
||||
<template>
|
||||
<div class="app_contianer">
|
||||
<el-container class="head_contianer">
|
||||
<el-header style="height: 85px"
|
||||
><h1 style="font-size: 40px; color: #ffffff">客房保洁服务终端</h1>
|
||||
</el-header>
|
||||
</el-container>
|
||||
|
||||
<el-container class="main_container">
|
||||
<el-main>
|
||||
<el-row class="myTag">
|
||||
<div style="text-align: center">
|
||||
<span style="font-weight: 700">房间状态标识: </span>
|
||||
<i class="el-icon-s-home" style="color: #67c23a"></i>
|
||||
<span style="color: #67c23a; font-weight: 700; margin-right: 20px">
|
||||
空闲中/已清扫</span
|
||||
>
|
||||
<i class="el-icon-s-home" style="color: #409eff"></i
|
||||
><span style="color: #409eff; font-weight: 700; margin-right: 20px"
|
||||
>已入住</span
|
||||
>
|
||||
<i class="el-icon-s-home" style="color: #f56c6c"></i
|
||||
><span style="color: #f56c6c; font-weight: 700; margin-right: 20px"
|
||||
>待清扫</span
|
||||
>
|
||||
<i class="el-icon-s-home" style="color: #909399"></i
|
||||
><span style="color: #909399; font-weight: 700; margin-right: 20px"
|
||||
>无法入住/其他</span
|
||||
>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-row class="mt-20" :gutter="20">
|
||||
<el-col
|
||||
:span="colCount"
|
||||
v-for="(item, index) in northRooms"
|
||||
:key="index"
|
||||
>
|
||||
<el-card
|
||||
:body-style="{ padding: '0px' }"
|
||||
:style="{ backgroundColor: item.status_color }"
|
||||
@click.native="roomClick(item)"
|
||||
>
|
||||
<div class="bottom clearfix">
|
||||
<span style="font-weight: 700; font-size: 40px">
|
||||
{{ item.room_no }}
|
||||
</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-row style="margin-top: 150px" :gutter="20">
|
||||
<el-divider></el-divider>
|
||||
<el-col
|
||||
:span="colCount"
|
||||
v-for="(item, index) in southRooms"
|
||||
:key="index"
|
||||
>
|
||||
<el-card
|
||||
class="mb-20"
|
||||
:body-style="{ padding: '0px' }"
|
||||
:style="{ backgroundColor: item.status_color }"
|
||||
@click.native="roomClick(item)"
|
||||
>
|
||||
<div class="bottom clearfix">
|
||||
<span style="font-weight: 700; font-size: 40px">
|
||||
{{ item.room_no }}
|
||||
</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
style="text-align: center"
|
||||
width="400px"
|
||||
>
|
||||
<el-dialog
|
||||
title="打扫中"
|
||||
width="400px"
|
||||
style="text-align: center"
|
||||
append-to-body
|
||||
:visible.sync="cleanDialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
:show-close="false"
|
||||
>
|
||||
<h2 class="mb-20">{{ timeNum }}</h2>
|
||||
<el-button class="bigButton" type="success" @click="cleanComplete"
|
||||
>完成打扫</el-button
|
||||
>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="备品管理"
|
||||
style="text-align: center"
|
||||
append-to-body
|
||||
:visible.sync="articleDialogVisible"
|
||||
width="400px"
|
||||
>
|
||||
<div class="mb-30">
|
||||
<span style="font-size: 25px; font-weight: 700; margin-right: 30px"
|
||||
>床单</span
|
||||
>
|
||||
<el-input-number
|
||||
v-model="roomArticle.sheetNum"
|
||||
:min="1"
|
||||
:max="10"
|
||||
></el-input-number>
|
||||
</div>
|
||||
<div class="mb-30">
|
||||
<span style="font-size: 25px; font-weight: 700; margin-right: 30px"
|
||||
>被罩</span
|
||||
>
|
||||
<el-input-number
|
||||
v-model="roomArticle.coverletNum"
|
||||
:min="1"
|
||||
:max="10"
|
||||
></el-input-number>
|
||||
</div>
|
||||
<el-button style="margin-top: 20px" class="bigButton" type="success"
|
||||
>确定</el-button
|
||||
>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="房间报修"
|
||||
style="text-align: center"
|
||||
append-to-body
|
||||
:visible.sync="repairDialogVisible"
|
||||
>
|
||||
</el-dialog>
|
||||
|
||||
<div>
|
||||
<el-button class="bigButton" type="primary" @click="cleanStart"
|
||||
>开始打扫</el-button
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
class="bigButton"
|
||||
type="success"
|
||||
@click="articleDialogVisible = true"
|
||||
>备品管理</el-button
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
class="bigButton"
|
||||
type="danger"
|
||||
@click="repairDialogVisible = true"
|
||||
>房间报修</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { getRooms } from "@/api/zhengchuang/mealsOrdering";
|
||||
import "../css/MealCss.css";
|
||||
import { Message } from "element-ui";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeNum: "00:00:00", //计时器
|
||||
timer: null,
|
||||
seconds: 0,
|
||||
minutes: 0,
|
||||
hours: 0,
|
||||
|
||||
dialogVisible: false,
|
||||
cleanDialogVisible: false,
|
||||
articleDialogVisible: false,
|
||||
repairDialogVisible: false,
|
||||
dialogTitle: "",
|
||||
colCount: null,
|
||||
index: 1,
|
||||
northRooms: [],
|
||||
southRooms: [],
|
||||
|
||||
queryParams: {
|
||||
gyid: "SYBXC",
|
||||
room_floor: "1",
|
||||
room_face: "",
|
||||
},
|
||||
|
||||
roomInfo: {},
|
||||
roomArticle: {
|
||||
sheetNum: 4,
|
||||
coverletNum: 3,
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
northRoomSearch() {
|
||||
this.queryParams.room_face = "北";
|
||||
getRooms(this.queryParams).then((res) => {
|
||||
this.northRooms = res.data;
|
||||
this.colCount = Math.floor(24 / this.northRooms.length);
|
||||
});
|
||||
},
|
||||
|
||||
southRoomSearch() {
|
||||
this.queryParams.room_face = "南";
|
||||
getRooms(this.queryParams).then((res) => {
|
||||
this.southRooms = res.data;
|
||||
});
|
||||
},
|
||||
|
||||
roomClick(item) {
|
||||
this.dialogVisible = true;
|
||||
this.dialogTitle = item.room_no + "房间";
|
||||
this.roomInfo = item;
|
||||
},
|
||||
|
||||
startTime() {
|
||||
//计时器
|
||||
this.timer = setInterval(() => {
|
||||
this.seconds++;
|
||||
if (this.seconds === 60) {
|
||||
this.seconds = 0;
|
||||
this.minutes++;
|
||||
}
|
||||
if (this.minutes === 60) {
|
||||
this.minutes = 0;
|
||||
this.hours++;
|
||||
}
|
||||
this.timeNum = `${this.formatTime(this.hours)}:${this.formatTime(
|
||||
this.minutes
|
||||
)}:${this.formatTime(this.seconds)}`;
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
formatTime(time) {
|
||||
return time < 10 ? `0${time}` : time;
|
||||
},
|
||||
|
||||
restartTime() {
|
||||
//重置计时
|
||||
this.timeNum = "00:00:00";
|
||||
this.seconds = 0;
|
||||
this.minutes = 0;
|
||||
this.hours = 0;
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
|
||||
cleanStart() {
|
||||
this.cleanDialogVisible = true;
|
||||
this.startTime();
|
||||
},
|
||||
|
||||
cleanComplete() {
|
||||
console.log(this.timeNum);
|
||||
console.log(this.roomInfo.room_no);
|
||||
Message.success("已完成清扫");
|
||||
this.cleanDialogVisible = false;
|
||||
this.restartTime(); //重置计时
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.northRoomSearch();
|
||||
this.southRoomSearch();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.bottom {
|
||||
margin-top: 5px;
|
||||
line-height: 150px;
|
||||
text-align: center;
|
||||
}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
.app_contianer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.head_contianer {
|
||||
height: 9%;
|
||||
}
|
||||
.main_container {
|
||||
height: 91%;
|
||||
}
|
||||
.el-header {
|
||||
background-color: #282b3c;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
.el-main {
|
||||
background-color: #f2f2f2;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
padding: 20px 40px 20px 40px;
|
||||
}
|
||||
|
||||
.el-divider--horizontal {
|
||||
display: block;
|
||||
height: 10px;
|
||||
width: 100%;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.myTag {
|
||||
margin-bottom: 80px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.el-dialog__title {
|
||||
line-height: 24px;
|
||||
font-size: 25px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.bigButton {
|
||||
font-size: 25px;
|
||||
font-weight: 700;
|
||||
line-height: 50px;
|
||||
width: 200px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,35 @@
|
||||
const fs = require('fs');
|
||||
const assert = require('assert');
|
||||
const source = fs.readFileSync(require('path').join(__dirname, '../src/views/JcXx.vue'), 'utf8');
|
||||
// Vue methods must retain their receiver, so construct them with closure bindings.
|
||||
function compile(name, parameters, bindings = {}) {
|
||||
const match = source.match(new RegExp(' ' + name + '\\([^)]*\\) \\{([\\s\\S]*?)\\n \\},'));
|
||||
assert(match, name);
|
||||
return new Function(...Object.keys(bindings), 'return function(' + parameters.join(',') + '){' + match[1] + '}')(...Object.values(bindings));
|
||||
}
|
||||
(async () => {
|
||||
const vm = { dismissedAlarmEvents: new Set(['stay:4:old']), alarmVoiceActive: false,
|
||||
starts: 0, stops: 0, playAlarmVoice() { this.starts++; }, stopAlarmVoice() { this.stops++; } };
|
||||
vm.getAlarmEventKeys = compile('getAlarmEventKeys', ['row']);
|
||||
vm.syncAlarmVoice = compile('syncAlarmVoice', ['rows']);
|
||||
vm.syncAlarmVoice([{ryzt:'4', stoped:'0', alarmEventKey:'stay:4:old'}]);
|
||||
assert.strictEqual(vm.starts, 0, 'old event must stay dismissed');
|
||||
vm.syncAlarmVoice([{ryzt:'4', stoped:'0', alarmEventKey:'stay:4:new'}]);
|
||||
assert.strictEqual(vm.starts, 1, 'new event must sound');
|
||||
vm.alarmVoiceActive = false;
|
||||
vm.syncAlarmVoice([{ryzt:'4', stoped:'1', alarmEventKey:'other:4:new'}]);
|
||||
assert.strictEqual(vm.starts, 2, 'another active event in a grouped row must sound');
|
||||
const pending = [];
|
||||
const getJcXxList = () => new Promise(resolve => pending.push(resolve));
|
||||
Object.assign(vm, {callListRequestVersion:0, JcXxQueryParams:{}, loadLatestSyncTime(){},
|
||||
isBusinessVoiceBusy(){return false;}, scheduleSyncSpeechPlayback(){}, syncAlarmVoice(){}});
|
||||
vm.getJcXxList = compile('getJcXxList', [], {getJcXxList});
|
||||
vm.getJcXxList(); vm.getJcXxList();
|
||||
pending[1]({data:['new']}); await Promise.resolve();
|
||||
pending[0]({data:['old']}); await Promise.resolve();
|
||||
assert.deepStrictEqual(vm.jcxxList, ['new'], 'late old response must not overwrite new state');
|
||||
vm.getJcXxList(); ++vm.callListRequestVersion;
|
||||
pending[2]({data:['before-dismissal']}); await Promise.resolve();
|
||||
assert.deepStrictEqual(vm.jcxxList, ['new'], 'dismissal must invalidate outstanding responses');
|
||||
console.log('5 alarm state and response ordering scenarios passed.');
|
||||
})().catch(error => { console.error(error); process.exitCode = 1; });
|
||||
@@ -0,0 +1,54 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const vm = require('vm');
|
||||
const assert = require('assert');
|
||||
const compiler = require('vue-template-compiler');
|
||||
const babel = require('@babel/core');
|
||||
const source = fs.readFileSync(path.join(__dirname, '../src/views/JcXx.vue'), 'utf8');
|
||||
const parsed = compiler.parseComponent(source);
|
||||
const api = {};
|
||||
const compiled = babel.transformSync(parsed.script.content, {
|
||||
babelrc: false, configFile: false,
|
||||
plugins: [require('@babel/plugin-transform-modules-commonjs')]
|
||||
}).code;
|
||||
const sandbox = { exports: {}, window: { speechSynthesis: {} }, SpeechSynthesisUtterance: function(){},
|
||||
console, require: name => name === '@/api/jcgl/jcgl' ? api : {} };
|
||||
vm.runInNewContext(compiled, sandbox);
|
||||
const methods = sandbox.exports.default.methods;
|
||||
const notices = [];
|
||||
const message = value => notices.push(value);
|
||||
message.warning = value => notices.push(value);
|
||||
message.error = value => notices.push(value);
|
||||
function context(id) {
|
||||
return { form_xjcz: { id, czje: 10 }, visible_xjcz: true, $message: message,
|
||||
$refs: { form_xjcz: { validate: callback => callback(true) } } };
|
||||
}
|
||||
async function run() {
|
||||
let page = context('a');
|
||||
methods.jcwebsocketonmessage.call(page, { data: JSON.stringify({ lx: 'cz_cancel', id: 'b' }) });
|
||||
assert.equal(page.visible_xjcz, true);
|
||||
methods.jcwebsocketonmessage.call(page, { data: JSON.stringify({ lx: 'cz_cancel', id: 'a' }) });
|
||||
assert.equal(page.visible_xjcz, false);
|
||||
assert.equal(Object.keys(page.form_xjcz).length, 0);
|
||||
page = context('a');
|
||||
api.handleRecharge = () => Promise.resolve({ code: '11111', msg: '已取消' });
|
||||
methods.handleRechargeConfirm.call(page);
|
||||
await new Promise(resolve => setImmediate(resolve));
|
||||
assert.equal(page.visible_xjcz, true);
|
||||
assert.equal(notices.at(-1).type, 'error');
|
||||
let finish;
|
||||
api.handleRecharge = () => new Promise(resolve => { finish = resolve; });
|
||||
methods.handleRechargeConfirm.call(page);
|
||||
page.form_xjcz = { id: 'b' };
|
||||
finish({ code: '00000' });
|
||||
await new Promise(resolve => setImmediate(resolve));
|
||||
assert.equal(page.form_xjcz.id, 'b');
|
||||
assert.equal(page.visible_xjcz, true);
|
||||
api.handleRecharge = () => Promise.reject(new Error('network'));
|
||||
methods.handleRechargeConfirm.call(page);
|
||||
await new Promise(resolve => setImmediate(resolve));
|
||||
assert.equal(page.visible_xjcz, true);
|
||||
assert.equal(typeof notices.at(-1), 'string');
|
||||
console.log('PASS: matching cancellation, unrelated cancellation, backend rejection, stale success, network failure');
|
||||
}
|
||||
run().catch(error => { console.error(error); process.exitCode = 1; });
|
||||
@@ -0,0 +1,139 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
const CompressionPlugin = require('compression-webpack-plugin')
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || '管理系统' // 网页标题
|
||||
|
||||
// const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||
const port = process.env.port || process.env.npm_config_port || 8080 // 本机调试端口
|
||||
|
||||
// vue.config.js 配置说明
|
||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||
// 这里只列一部分,具体配置参考文档
|
||||
module.exports = {
|
||||
lintOnSave: false,
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/yktgl/" : "/",
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
assetsDir: 'static',
|
||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||
productionSourceMap: false,
|
||||
// webpack-dev-server 相关配置
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: port,
|
||||
open: true,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
'/dev-api': {
|
||||
// target: `http://localhost:8081/yktgl`,
|
||||
target: `http://127.0.0.1:8081/yktgl`, // 本机后端
|
||||
// target: `http://10.32.72.165:8081/yktgl`,
|
||||
// target: `http://10.32.205.183:8081/yktgl`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/dev-api': ''
|
||||
}
|
||||
}
|
||||
},
|
||||
disableHostCheck: true
|
||||
},
|
||||
css: {
|
||||
loaderOptions: {
|
||||
sass: {
|
||||
sassOptions: { outputStyle: "expanded" }
|
||||
}
|
||||
}
|
||||
},
|
||||
configureWebpack: {
|
||||
name: name,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('src')
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
||||
new CompressionPlugin({
|
||||
cache: false, // 不启用文件缓存
|
||||
test: /\.(js|css|html)?$/i, // 压缩文件格式
|
||||
filename: '[path].gz[query]', // 压缩后的文件名
|
||||
algorithm: 'gzip', // 使用gzip压缩
|
||||
minRatio: 0.8 // 压缩率小于1才会压缩
|
||||
})
|
||||
],
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.plugins.delete('preload') // TODO: need test
|
||||
config.plugins.delete('prefetch') // TODO: need test
|
||||
|
||||
// set svg-sprite-loader
|
||||
config.module
|
||||
.rule('svg')
|
||||
.exclude.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
config.module
|
||||
.rule('icons')
|
||||
.test(/\.svg$/)
|
||||
.include.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
.use('svg-sprite-loader')
|
||||
.loader('svg-sprite-loader')
|
||||
.options({
|
||||
symbolId: 'icon-[name]'
|
||||
})
|
||||
.end()
|
||||
|
||||
config.when(process.env.NODE_ENV !== 'development', config => {
|
||||
config
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end()
|
||||
|
||||
config.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial' // only package third parties that are initially dependent
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI', // split elementUI into a single package
|
||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
|
||||
priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'), // can customize your rules
|
||||
minChunks: 3, // minimum common number
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
config.optimization.runtimeChunk('single'),
|
||||
{
|
||||
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
||||
to: './' //到根目录下
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# Getting Started
|
||||
|
||||
### Reference Documentation
|
||||
For further reference, please consider the following sections:
|
||||
|
||||
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
|
||||
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.6.13/maven-plugin/reference/html/)
|
||||
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.6.13/maven-plugin/reference/html/#build-image)
|
||||
* [MyBatis Framework](https://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/)
|
||||
* [Spring Web](https://docs.spring.io/spring-boot/docs/2.6.13/reference/htmlsingle/#web)
|
||||
|
||||
### Guides
|
||||
The following guides illustrate how to use some features concretely:
|
||||
|
||||
* [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/)
|
||||
* [MyBatis Quick Start](https://github.com/mybatis/spring-boot-starter/wiki/Quick-Start)
|
||||
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
|
||||
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
|
||||
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
|
||||
|
||||
Binary file not shown.
+236
@@ -0,0 +1,236 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.13</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>yktgl</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>yktgl</name>
|
||||
<description>yktgl</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>4.4.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>5.3.18</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.32</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-quartz</artifactId>
|
||||
</dependency>
|
||||
<!-- swagger -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>3.5.4</version>
|
||||
</dependency>
|
||||
<!--spring-session-data-redis-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.session</groupId>
|
||||
<artifactId>spring-session-data-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.com.kingbase</groupId>
|
||||
<artifactId>kingbase8</artifactId>
|
||||
<version>8.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.ojdbc</groupId>
|
||||
<artifactId>orai18n</artifactId>
|
||||
<version>19.3.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
<version>2.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.jws</groupId>
|
||||
<artifactId>javax.jws-api</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.ws</groupId>
|
||||
<artifactId>jaxws-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.jsqlparser</groupId>
|
||||
<artifactId>jsqlparser</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>2.0.32</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fazecast</groupId>
|
||||
<artifactId>jSerialComm</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.asteriskjava</groupId>
|
||||
<artifactId>asterisk-java</artifactId>
|
||||
<version>3.38.0-zfjia</version>
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/lib/asterisk-java.jar</systemPath>-->
|
||||
</dependency>
|
||||
<!--
|
||||
The customized Asterisk jar is installed without complete transitive
|
||||
dependency metadata. Declare the libraries used at runtime explicitly
|
||||
so Spring Boot packages them into BOOT-INF/lib.
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.reflections</groupId>
|
||||
<artifactId>reflections</artifactId>
|
||||
<version>0.10.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>31.1-jre</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>5.13.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.project-lombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>lib</directory>-->
|
||||
<!-- <targetPath>BOOT-INF/lib/</targetPath>-->
|
||||
<!-- <includes>-->
|
||||
<!-- <include>**/*.jar</include>-->
|
||||
<!-- </includes>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: org.example.yktgl.YktglApplication
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,240 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
|
||||
/**
|
||||
* <p>checkHousePojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="checkHousePojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* </sequence>
|
||||
* <attribute name="checDriverId" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="checkHouseType" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="checkId" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="checkTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="checkType" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="houseCode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="leaveTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="leaveType" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="note" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "checkHousePojo")
|
||||
public class CheckHousePojo {
|
||||
|
||||
@XmlAttribute(name = "checDriverId", required = true)
|
||||
protected int checDriverId;
|
||||
@XmlAttribute(name = "checkHouseType", required = true)
|
||||
protected int checkHouseType;
|
||||
@XmlAttribute(name = "checkId", required = true)
|
||||
protected int checkId;
|
||||
@XmlAttribute(name = "checkTime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar checkTime;
|
||||
@XmlAttribute(name = "checkType", required = true)
|
||||
protected int checkType;
|
||||
@XmlAttribute(name = "houseCode")
|
||||
protected String houseCode;
|
||||
@XmlAttribute(name = "leaveTime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar leaveTime;
|
||||
@XmlAttribute(name = "leaveType", required = true)
|
||||
protected int leaveType;
|
||||
@XmlAttribute(name = "note")
|
||||
protected String note;
|
||||
|
||||
/**
|
||||
* 获取checDriverId属性的值。
|
||||
*
|
||||
*/
|
||||
public int getChecDriverId() {
|
||||
return checDriverId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置checDriverId属性的值。
|
||||
*
|
||||
*/
|
||||
public void setChecDriverId(int value) {
|
||||
this.checDriverId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取checkHouseType属性的值。
|
||||
*
|
||||
*/
|
||||
public int getCheckHouseType() {
|
||||
return checkHouseType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置checkHouseType属性的值。
|
||||
*
|
||||
*/
|
||||
public void setCheckHouseType(int value) {
|
||||
this.checkHouseType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取checkId属性的值。
|
||||
*
|
||||
*/
|
||||
public int getCheckId() {
|
||||
return checkId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置checkId属性的值。
|
||||
*
|
||||
*/
|
||||
public void setCheckId(int value) {
|
||||
this.checkId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取checkTime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getCheckTime() {
|
||||
return checkTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置checkTime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setCheckTime(XMLGregorianCalendar value) {
|
||||
this.checkTime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取checkType属性的值。
|
||||
*
|
||||
*/
|
||||
public int getCheckType() {
|
||||
return checkType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置checkType属性的值。
|
||||
*
|
||||
*/
|
||||
public void setCheckType(int value) {
|
||||
this.checkType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取houseCode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getHouseCode() {
|
||||
return houseCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置houseCode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setHouseCode(String value) {
|
||||
this.houseCode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取leaveTime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getLeaveTime() {
|
||||
return leaveTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置leaveTime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setLeaveTime(XMLGregorianCalendar value) {
|
||||
this.leaveTime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取leaveType属性的值。
|
||||
*
|
||||
*/
|
||||
public int getLeaveType() {
|
||||
return leaveType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置leaveType属性的值。
|
||||
*
|
||||
*/
|
||||
public void setLeaveType(int value) {
|
||||
this.leaveType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取note属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置note属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setNote(String value) {
|
||||
this.note = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
|
||||
/**
|
||||
* <p>driverAlcoholPojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="driverAlcoholPojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* </sequence>
|
||||
* <attribute name="alcoholid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driverid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="jobid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="checktime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="alcoholvalue" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="alcoholstate" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="clientid" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="workNo" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="drvPostId" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="alcoholType" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driverName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "driverAlcoholPojo")
|
||||
public class DriverAlcoholPojo {
|
||||
|
||||
@XmlAttribute(name = "alcoholid", required = true)
|
||||
protected int alcoholid;
|
||||
@XmlAttribute(name = "driverid", required = true)
|
||||
protected int driverid;
|
||||
@XmlAttribute(name = "jobid", required = true)
|
||||
protected int jobid;
|
||||
@XmlAttribute(name = "checktime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar checktime;
|
||||
@XmlAttribute(name = "alcoholvalue", required = true)
|
||||
protected int alcoholvalue;
|
||||
@XmlAttribute(name = "alcoholstate", required = true)
|
||||
protected int alcoholstate;
|
||||
@XmlAttribute(name = "clientid")
|
||||
protected String clientid;
|
||||
@XmlAttribute(name = "workNo", required = true)
|
||||
protected int workNo;
|
||||
@XmlAttribute(name = "drvPostId")
|
||||
protected String drvPostId;
|
||||
@XmlAttribute(name = "alcoholType", required = true)
|
||||
protected int alcoholType;
|
||||
@XmlAttribute(name = "driverName")
|
||||
protected String driverName;
|
||||
|
||||
/**
|
||||
* 获取alcoholid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getAlcoholid() {
|
||||
return alcoholid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置alcoholid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setAlcoholid(int value) {
|
||||
this.alcoholid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriverid() {
|
||||
return driverid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriverid(int value) {
|
||||
this.driverid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取jobid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getJobid() {
|
||||
return jobid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置jobid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setJobid(int value) {
|
||||
this.jobid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取checktime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getChecktime() {
|
||||
return checktime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置checktime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setChecktime(XMLGregorianCalendar value) {
|
||||
this.checktime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取alcoholvalue属性的值。
|
||||
*
|
||||
*/
|
||||
public int getAlcoholvalue() {
|
||||
return alcoholvalue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置alcoholvalue属性的值。
|
||||
*
|
||||
*/
|
||||
public void setAlcoholvalue(int value) {
|
||||
this.alcoholvalue = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取alcoholstate属性的值。
|
||||
*
|
||||
*/
|
||||
public int getAlcoholstate() {
|
||||
return alcoholstate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置alcoholstate属性的值。
|
||||
*
|
||||
*/
|
||||
public void setAlcoholstate(int value) {
|
||||
this.alcoholstate = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取clientid属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getClientid() {
|
||||
return clientid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置clientid属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setClientid(String value) {
|
||||
this.clientid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workNo属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkNo() {
|
||||
return workNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workNo属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkNo(int value) {
|
||||
this.workNo = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取drvPostId属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDrvPostId() {
|
||||
return drvPostId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置drvPostId属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDrvPostId(String value) {
|
||||
this.drvPostId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取alcoholType属性的值。
|
||||
*
|
||||
*/
|
||||
public int getAlcoholType() {
|
||||
return alcoholType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置alcoholType属性的值。
|
||||
*
|
||||
*/
|
||||
public void setAlcoholType(int value) {
|
||||
this.alcoholType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName() {
|
||||
return driverName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName(String value) {
|
||||
this.driverName = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,325 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>driverDutyGroupPojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="driverDutyGroupPojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* </sequence>
|
||||
* <attribute name="driver1" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driver2" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driver3" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driver4" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driverName1" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driverName2" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driverName3" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driverName4" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="locoHomeName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="postid" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="workPlace" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="workPlaceName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "driverDutyGroupPojo")
|
||||
public class DriverDutyGroupPojo {
|
||||
|
||||
@XmlAttribute(name = "driver1", required = true)
|
||||
protected int driver1;
|
||||
@XmlAttribute(name = "driver2", required = true)
|
||||
protected int driver2;
|
||||
@XmlAttribute(name = "driver3", required = true)
|
||||
protected int driver3;
|
||||
@XmlAttribute(name = "driver4", required = true)
|
||||
protected int driver4;
|
||||
@XmlAttribute(name = "driverName1")
|
||||
protected String driverName1;
|
||||
@XmlAttribute(name = "driverName2")
|
||||
protected String driverName2;
|
||||
@XmlAttribute(name = "driverName3")
|
||||
protected String driverName3;
|
||||
@XmlAttribute(name = "driverName4")
|
||||
protected String driverName4;
|
||||
@XmlAttribute(name = "locoHomeName")
|
||||
protected String locoHomeName;
|
||||
@XmlAttribute(name = "postid")
|
||||
protected String postid;
|
||||
@XmlAttribute(name = "workPlace")
|
||||
protected String workPlace;
|
||||
@XmlAttribute(name = "workPlaceName")
|
||||
protected String workPlaceName;
|
||||
|
||||
/**
|
||||
* 获取driver1属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriver1() {
|
||||
return driver1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driver1属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriver1(int value) {
|
||||
this.driver1 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driver2属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriver2() {
|
||||
return driver2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driver2属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriver2(int value) {
|
||||
this.driver2 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driver3属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriver3() {
|
||||
return driver3;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driver3属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriver3(int value) {
|
||||
this.driver3 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driver4属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriver4() {
|
||||
return driver4;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driver4属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriver4(int value) {
|
||||
this.driver4 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName1属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName1() {
|
||||
return driverName1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName1属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName1(String value) {
|
||||
this.driverName1 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName2属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName2() {
|
||||
return driverName2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName2属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName2(String value) {
|
||||
this.driverName2 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName3属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName3() {
|
||||
return driverName3;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName3属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName3(String value) {
|
||||
this.driverName3 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName4属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName4() {
|
||||
return driverName4;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName4属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName4(String value) {
|
||||
this.driverName4 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取locoHomeName属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getLocoHomeName() {
|
||||
return locoHomeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置locoHomeName属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setLocoHomeName(String value) {
|
||||
this.locoHomeName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取postid属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getPostid() {
|
||||
return postid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置postid属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setPostid(String value) {
|
||||
this.postid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workPlace属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getWorkPlace() {
|
||||
return workPlace;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workPlace属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setWorkPlace(String value) {
|
||||
this.workPlace = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workPlaceName属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getWorkPlaceName() {
|
||||
return workPlaceName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workPlaceName属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setWorkPlaceName(String value) {
|
||||
this.workPlaceName = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,817 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
|
||||
/**
|
||||
* <p>driverDutyPojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="driverDutyPojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* </sequence>
|
||||
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driverid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="ondutytime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="ondutytype" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="score" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="ondutycode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="examtime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="jobid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="offdutycode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="offdutytime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="offdutytype" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="workNo" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driverName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="trainNum" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="lowerCode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dispLocoCode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dispManCode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="model" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="loco" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="taskId" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="taskName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="note" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="cargo" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="team" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="group" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driverSecCode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driverSecStr" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="ondutyAlcoholValue" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="ondutyAlcoholState" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="offdutyAlcoholValue" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="offdutyAlcoholState" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="jsSection" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="jsDirection" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "driverDutyPojo")
|
||||
public class DriverDutyPojo {
|
||||
|
||||
@XmlAttribute(name = "id", required = true)
|
||||
protected int id;
|
||||
@XmlAttribute(name = "driverid", required = true)
|
||||
protected int driverid;
|
||||
@XmlAttribute(name = "ondutytime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar ondutytime;
|
||||
@XmlAttribute(name = "ondutytype", required = true)
|
||||
protected int ondutytype;
|
||||
@XmlAttribute(name = "score", required = true)
|
||||
protected int score;
|
||||
@XmlAttribute(name = "ondutycode")
|
||||
protected String ondutycode;
|
||||
@XmlAttribute(name = "examtime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar examtime;
|
||||
@XmlAttribute(name = "jobid", required = true)
|
||||
protected int jobid;
|
||||
@XmlAttribute(name = "offdutycode")
|
||||
protected String offdutycode;
|
||||
@XmlAttribute(name = "offdutytime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar offdutytime;
|
||||
@XmlAttribute(name = "offdutytype", required = true)
|
||||
protected int offdutytype;
|
||||
@XmlAttribute(name = "workNo", required = true)
|
||||
protected int workNo;
|
||||
@XmlAttribute(name = "driverName")
|
||||
protected String driverName;
|
||||
@XmlAttribute(name = "trainNum")
|
||||
protected String trainNum;
|
||||
@XmlAttribute(name = "lowerCode")
|
||||
protected String lowerCode;
|
||||
@XmlAttribute(name = "dispLocoCode")
|
||||
protected String dispLocoCode;
|
||||
@XmlAttribute(name = "dispManCode")
|
||||
protected String dispManCode;
|
||||
@XmlAttribute(name = "model")
|
||||
protected String model;
|
||||
@XmlAttribute(name = "loco", required = true)
|
||||
protected int loco;
|
||||
@XmlAttribute(name = "taskId", required = true)
|
||||
protected int taskId;
|
||||
@XmlAttribute(name = "taskName")
|
||||
protected String taskName;
|
||||
@XmlAttribute(name = "note")
|
||||
protected String note;
|
||||
@XmlAttribute(name = "cargo", required = true)
|
||||
protected int cargo;
|
||||
@XmlAttribute(name = "team")
|
||||
protected String team;
|
||||
@XmlAttribute(name = "group")
|
||||
protected String group;
|
||||
@XmlAttribute(name = "driverSecCode")
|
||||
protected String driverSecCode;
|
||||
@XmlAttribute(name = "driverSecStr")
|
||||
protected String driverSecStr;
|
||||
@XmlAttribute(name = "ondutyAlcoholValue", required = true)
|
||||
protected int ondutyAlcoholValue;
|
||||
@XmlAttribute(name = "ondutyAlcoholState", required = true)
|
||||
protected int ondutyAlcoholState;
|
||||
@XmlAttribute(name = "offdutyAlcoholValue", required = true)
|
||||
protected int offdutyAlcoholValue;
|
||||
@XmlAttribute(name = "offdutyAlcoholState", required = true)
|
||||
protected int offdutyAlcoholState;
|
||||
@XmlAttribute(name = "jsSection")
|
||||
protected String jsSection;
|
||||
@XmlAttribute(name = "jsDirection")
|
||||
protected String jsDirection;
|
||||
|
||||
/**
|
||||
* 获取id属性的值。
|
||||
*
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置id属性的值。
|
||||
*
|
||||
*/
|
||||
public void setId(int value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriverid() {
|
||||
return driverid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriverid(int value) {
|
||||
this.driverid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取ondutytime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getOndutytime() {
|
||||
return ondutytime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置ondutytime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setOndutytime(XMLGregorianCalendar value) {
|
||||
this.ondutytime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取ondutytype属性的值。
|
||||
*
|
||||
*/
|
||||
public int getOndutytype() {
|
||||
return ondutytype;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置ondutytype属性的值。
|
||||
*
|
||||
*/
|
||||
public void setOndutytype(int value) {
|
||||
this.ondutytype = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取score属性的值。
|
||||
*
|
||||
*/
|
||||
public int getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置score属性的值。
|
||||
*
|
||||
*/
|
||||
public void setScore(int value) {
|
||||
this.score = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取ondutycode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getOndutycode() {
|
||||
return ondutycode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置ondutycode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setOndutycode(String value) {
|
||||
this.ondutycode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取examtime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getExamtime() {
|
||||
return examtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置examtime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setExamtime(XMLGregorianCalendar value) {
|
||||
this.examtime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取jobid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getJobid() {
|
||||
return jobid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置jobid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setJobid(int value) {
|
||||
this.jobid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取offdutycode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getOffdutycode() {
|
||||
return offdutycode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置offdutycode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setOffdutycode(String value) {
|
||||
this.offdutycode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取offdutytime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getOffdutytime() {
|
||||
return offdutytime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置offdutytime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setOffdutytime(XMLGregorianCalendar value) {
|
||||
this.offdutytime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取offdutytype属性的值。
|
||||
*
|
||||
*/
|
||||
public int getOffdutytype() {
|
||||
return offdutytype;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置offdutytype属性的值。
|
||||
*
|
||||
*/
|
||||
public void setOffdutytype(int value) {
|
||||
this.offdutytype = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workNo属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkNo() {
|
||||
return workNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workNo属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkNo(int value) {
|
||||
this.workNo = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName() {
|
||||
return driverName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName(String value) {
|
||||
this.driverName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取trainNum属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getTrainNum() {
|
||||
return trainNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置trainNum属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setTrainNum(String value) {
|
||||
this.trainNum = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取lowerCode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getLowerCode() {
|
||||
return lowerCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置lowerCode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setLowerCode(String value) {
|
||||
this.lowerCode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取dispLocoCode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDispLocoCode() {
|
||||
return dispLocoCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置dispLocoCode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDispLocoCode(String value) {
|
||||
this.dispLocoCode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取dispManCode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDispManCode() {
|
||||
return dispManCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置dispManCode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDispManCode(String value) {
|
||||
this.dispManCode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取model属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置model属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setModel(String value) {
|
||||
this.model = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取loco属性的值。
|
||||
*
|
||||
*/
|
||||
public int getLoco() {
|
||||
return loco;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置loco属性的值。
|
||||
*
|
||||
*/
|
||||
public void setLoco(int value) {
|
||||
this.loco = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取taskId属性的值。
|
||||
*
|
||||
*/
|
||||
public int getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置taskId属性的值。
|
||||
*
|
||||
*/
|
||||
public void setTaskId(int value) {
|
||||
this.taskId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取taskName属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置taskName属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setTaskName(String value) {
|
||||
this.taskName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取note属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置note属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setNote(String value) {
|
||||
this.note = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取cargo属性的值。
|
||||
*
|
||||
*/
|
||||
public int getCargo() {
|
||||
return cargo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置cargo属性的值。
|
||||
*
|
||||
*/
|
||||
public void setCargo(int value) {
|
||||
this.cargo = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取team属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getTeam() {
|
||||
return team;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置team属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setTeam(String value) {
|
||||
this.team = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取group属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置group属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setGroup(String value) {
|
||||
this.group = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverSecCode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverSecCode() {
|
||||
return driverSecCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverSecCode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverSecCode(String value) {
|
||||
this.driverSecCode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverSecStr属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverSecStr() {
|
||||
return driverSecStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverSecStr属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverSecStr(String value) {
|
||||
this.driverSecStr = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取ondutyAlcoholValue属性的值。
|
||||
*
|
||||
*/
|
||||
public int getOndutyAlcoholValue() {
|
||||
return ondutyAlcoholValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置ondutyAlcoholValue属性的值。
|
||||
*
|
||||
*/
|
||||
public void setOndutyAlcoholValue(int value) {
|
||||
this.ondutyAlcoholValue = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取ondutyAlcoholState属性的值。
|
||||
*
|
||||
*/
|
||||
public int getOndutyAlcoholState() {
|
||||
return ondutyAlcoholState;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置ondutyAlcoholState属性的值。
|
||||
*
|
||||
*/
|
||||
public void setOndutyAlcoholState(int value) {
|
||||
this.ondutyAlcoholState = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取offdutyAlcoholValue属性的值。
|
||||
*
|
||||
*/
|
||||
public int getOffdutyAlcoholValue() {
|
||||
return offdutyAlcoholValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置offdutyAlcoholValue属性的值。
|
||||
*
|
||||
*/
|
||||
public void setOffdutyAlcoholValue(int value) {
|
||||
this.offdutyAlcoholValue = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取offdutyAlcoholState属性的值。
|
||||
*
|
||||
*/
|
||||
public int getOffdutyAlcoholState() {
|
||||
return offdutyAlcoholState;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置offdutyAlcoholState属性的值。
|
||||
*
|
||||
*/
|
||||
public void setOffdutyAlcoholState(int value) {
|
||||
this.offdutyAlcoholState = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取jsSection属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getJsSection() {
|
||||
return jsSection;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置jsSection属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setJsSection(String value) {
|
||||
this.jsSection = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取jsDirection属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getJsDirection() {
|
||||
return jsDirection;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置jsDirection属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setJsDirection(String value) {
|
||||
this.jsDirection = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
|
||||
/**
|
||||
* <p>driverFingerPojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="driverFingerPojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* </sequence>
|
||||
* <attribute name="section" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="fingersign" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="recordtime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="personid" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="fingcat" type="{http://www.w3.org/2001/XMLSchema}base64Binary" />
|
||||
* <attribute name="workno" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="fingcata" type="{http://www.w3.org/2001/XMLSchema}base64Binary" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "driverFingerPojo")
|
||||
public class DriverFingerPojo {
|
||||
|
||||
@XmlAttribute(name = "section")
|
||||
protected String section;
|
||||
@XmlAttribute(name = "fingersign")
|
||||
protected Integer fingersign;
|
||||
@XmlAttribute(name = "recordtime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar recordtime;
|
||||
@XmlAttribute(name = "personid")
|
||||
protected Integer personid;
|
||||
@XmlAttribute(name = "fingcat")
|
||||
protected byte[] fingcat;
|
||||
@XmlAttribute(name = "workno", required = true)
|
||||
protected int workno;
|
||||
@XmlAttribute(name = "fingcata")
|
||||
protected byte[] fingcata;
|
||||
|
||||
/**
|
||||
* 获取section属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置section属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setSection(String value) {
|
||||
this.section = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取fingersign属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
*
|
||||
*/
|
||||
public Integer getFingersign() {
|
||||
return fingersign;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置fingersign属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setFingersign(Integer value) {
|
||||
this.fingersign = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取recordtime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getRecordtime() {
|
||||
return recordtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置recordtime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setRecordtime(XMLGregorianCalendar value) {
|
||||
this.recordtime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取personid属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
*
|
||||
*/
|
||||
public Integer getPersonid() {
|
||||
return personid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置personid属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setPersonid(Integer value) {
|
||||
this.personid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取fingcat属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* byte[]
|
||||
*/
|
||||
public byte[] getFingcat() {
|
||||
return fingcat;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置fingcat属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* byte[]
|
||||
*/
|
||||
public void setFingcat(byte[] value) {
|
||||
this.fingcat = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workno属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkno() {
|
||||
return workno;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workno属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkno(int value) {
|
||||
this.workno = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取fingcata属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* byte[]
|
||||
*/
|
||||
public byte[] getFingcata() {
|
||||
return fingcata;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置fingcata属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* byte[]
|
||||
*/
|
||||
public void setFingcata(byte[] value) {
|
||||
this.fingcata = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,965 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
|
||||
/**
|
||||
* <p>driverInfoPojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="driverInfoPojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* </sequence>
|
||||
* <attribute name="address" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="assumeModel" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="assumeTasks" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="birthdate" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="chedui" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driveLocoType" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driverid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="dutyGroupIndex" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="education" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="graduatenum" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="graduateschool" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="handphone" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="homeaddress" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="homephone" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="idcardnum" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="inworktime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="isZhuante" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="locoGroupNum" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="maritalstatus" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="matchGroup" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="medicalProp" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="nation" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="personname" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="politics" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="postname" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="promoteTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="section" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sex" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="techlevel" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="workGroup" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="workState" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="workcardnum" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="workno" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="workplace" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="workplaceName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="zhidaozu" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="zip" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "driverInfoPojo")
|
||||
public class DriverInfoPojo {
|
||||
|
||||
@XmlAttribute(name = "address")
|
||||
protected String address;
|
||||
@XmlAttribute(name = "assumeModel")
|
||||
protected String assumeModel;
|
||||
@XmlAttribute(name = "assumeTasks")
|
||||
protected String assumeTasks;
|
||||
@XmlAttribute(name = "birthdate")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar birthdate;
|
||||
@XmlAttribute(name = "chedui")
|
||||
protected String chedui;
|
||||
@XmlAttribute(name = "driveLocoType")
|
||||
protected String driveLocoType;
|
||||
@XmlAttribute(name = "driverid", required = true)
|
||||
protected int driverid;
|
||||
@XmlAttribute(name = "dutyGroupIndex", required = true)
|
||||
protected int dutyGroupIndex;
|
||||
@XmlAttribute(name = "education", required = true)
|
||||
protected int education;
|
||||
@XmlAttribute(name = "graduatenum")
|
||||
protected String graduatenum;
|
||||
@XmlAttribute(name = "graduateschool")
|
||||
protected String graduateschool;
|
||||
@XmlAttribute(name = "handphone")
|
||||
protected String handphone;
|
||||
@XmlAttribute(name = "homeaddress")
|
||||
protected String homeaddress;
|
||||
@XmlAttribute(name = "homephone")
|
||||
protected String homephone;
|
||||
@XmlAttribute(name = "idcardnum")
|
||||
protected String idcardnum;
|
||||
@XmlAttribute(name = "inworktime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar inworktime;
|
||||
@XmlAttribute(name = "isZhuante", required = true)
|
||||
protected int isZhuante;
|
||||
@XmlAttribute(name = "locoGroupNum")
|
||||
protected String locoGroupNum;
|
||||
@XmlAttribute(name = "maritalstatus", required = true)
|
||||
protected int maritalstatus;
|
||||
@XmlAttribute(name = "matchGroup")
|
||||
protected String matchGroup;
|
||||
@XmlAttribute(name = "medicalProp")
|
||||
protected String medicalProp;
|
||||
@XmlAttribute(name = "nation")
|
||||
protected String nation;
|
||||
@XmlAttribute(name = "personname")
|
||||
protected String personname;
|
||||
@XmlAttribute(name = "politics", required = true)
|
||||
protected int politics;
|
||||
@XmlAttribute(name = "postname")
|
||||
protected String postname;
|
||||
@XmlAttribute(name = "promoteTime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar promoteTime;
|
||||
@XmlAttribute(name = "section")
|
||||
protected String section;
|
||||
@XmlAttribute(name = "sex", required = true)
|
||||
protected int sex;
|
||||
@XmlAttribute(name = "techlevel")
|
||||
protected String techlevel;
|
||||
@XmlAttribute(name = "workGroup")
|
||||
protected String workGroup;
|
||||
@XmlAttribute(name = "workState", required = true)
|
||||
protected int workState;
|
||||
@XmlAttribute(name = "workcardnum")
|
||||
protected String workcardnum;
|
||||
@XmlAttribute(name = "workno", required = true)
|
||||
protected int workno;
|
||||
@XmlAttribute(name = "workplace")
|
||||
protected String workplace;
|
||||
@XmlAttribute(name = "workplaceName")
|
||||
protected String workplaceName;
|
||||
@XmlAttribute(name = "zhidaozu")
|
||||
protected String zhidaozu;
|
||||
@XmlAttribute(name = "zip")
|
||||
protected String zip;
|
||||
|
||||
/**
|
||||
* 获取address属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置address属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setAddress(String value) {
|
||||
this.address = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取assumeModel属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getAssumeModel() {
|
||||
return assumeModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置assumeModel属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setAssumeModel(String value) {
|
||||
this.assumeModel = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取assumeTasks属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getAssumeTasks() {
|
||||
return assumeTasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置assumeTasks属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setAssumeTasks(String value) {
|
||||
this.assumeTasks = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取birthdate属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getBirthdate() {
|
||||
return birthdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置birthdate属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setBirthdate(XMLGregorianCalendar value) {
|
||||
this.birthdate = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取chedui属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getChedui() {
|
||||
return chedui;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置chedui属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setChedui(String value) {
|
||||
this.chedui = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driveLocoType属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriveLocoType() {
|
||||
return driveLocoType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driveLocoType属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriveLocoType(String value) {
|
||||
this.driveLocoType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriverid() {
|
||||
return driverid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriverid(int value) {
|
||||
this.driverid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取dutyGroupIndex属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDutyGroupIndex() {
|
||||
return dutyGroupIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置dutyGroupIndex属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDutyGroupIndex(int value) {
|
||||
this.dutyGroupIndex = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取education属性的值。
|
||||
*
|
||||
*/
|
||||
public int getEducation() {
|
||||
return education;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置education属性的值。
|
||||
*
|
||||
*/
|
||||
public void setEducation(int value) {
|
||||
this.education = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取graduatenum属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getGraduatenum() {
|
||||
return graduatenum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置graduatenum属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setGraduatenum(String value) {
|
||||
this.graduatenum = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取graduateschool属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getGraduateschool() {
|
||||
return graduateschool;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置graduateschool属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setGraduateschool(String value) {
|
||||
this.graduateschool = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取handphone属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getHandphone() {
|
||||
return handphone;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置handphone属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setHandphone(String value) {
|
||||
this.handphone = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取homeaddress属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getHomeaddress() {
|
||||
return homeaddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置homeaddress属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setHomeaddress(String value) {
|
||||
this.homeaddress = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取homephone属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getHomephone() {
|
||||
return homephone;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置homephone属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setHomephone(String value) {
|
||||
this.homephone = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取idcardnum属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getIdcardnum() {
|
||||
return idcardnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置idcardnum属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setIdcardnum(String value) {
|
||||
this.idcardnum = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取inworktime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getInworktime() {
|
||||
return inworktime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置inworktime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setInworktime(XMLGregorianCalendar value) {
|
||||
this.inworktime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取isZhuante属性的值。
|
||||
*
|
||||
*/
|
||||
public int getIsZhuante() {
|
||||
return isZhuante;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置isZhuante属性的值。
|
||||
*
|
||||
*/
|
||||
public void setIsZhuante(int value) {
|
||||
this.isZhuante = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取locoGroupNum属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getLocoGroupNum() {
|
||||
return locoGroupNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置locoGroupNum属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setLocoGroupNum(String value) {
|
||||
this.locoGroupNum = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取maritalstatus属性的值。
|
||||
*
|
||||
*/
|
||||
public int getMaritalstatus() {
|
||||
return maritalstatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置maritalstatus属性的值。
|
||||
*
|
||||
*/
|
||||
public void setMaritalstatus(int value) {
|
||||
this.maritalstatus = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取matchGroup属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getMatchGroup() {
|
||||
return matchGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置matchGroup属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setMatchGroup(String value) {
|
||||
this.matchGroup = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取medicalProp属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getMedicalProp() {
|
||||
return medicalProp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置medicalProp属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setMedicalProp(String value) {
|
||||
this.medicalProp = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取nation属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getNation() {
|
||||
return nation;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置nation属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setNation(String value) {
|
||||
this.nation = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取personname属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getPersonname() {
|
||||
return personname;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置personname属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setPersonname(String value) {
|
||||
this.personname = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取politics属性的值。
|
||||
*
|
||||
*/
|
||||
public int getPolitics() {
|
||||
return politics;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置politics属性的值。
|
||||
*
|
||||
*/
|
||||
public void setPolitics(int value) {
|
||||
this.politics = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取postname属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getPostname() {
|
||||
return postname;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置postname属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setPostname(String value) {
|
||||
this.postname = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取promoteTime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getPromoteTime() {
|
||||
return promoteTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置promoteTime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setPromoteTime(XMLGregorianCalendar value) {
|
||||
this.promoteTime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取section属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置section属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setSection(String value) {
|
||||
this.section = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取sex属性的值。
|
||||
*
|
||||
*/
|
||||
public int getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置sex属性的值。
|
||||
*
|
||||
*/
|
||||
public void setSex(int value) {
|
||||
this.sex = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取techlevel属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getTechlevel() {
|
||||
return techlevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置techlevel属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setTechlevel(String value) {
|
||||
this.techlevel = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workGroup属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getWorkGroup() {
|
||||
return workGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workGroup属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setWorkGroup(String value) {
|
||||
this.workGroup = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workState属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkState() {
|
||||
return workState;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workState属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkState(int value) {
|
||||
this.workState = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workcardnum属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getWorkcardnum() {
|
||||
return workcardnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workcardnum属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setWorkcardnum(String value) {
|
||||
this.workcardnum = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workno属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkno() {
|
||||
return workno;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workno属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkno(int value) {
|
||||
this.workno = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workplace属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getWorkplace() {
|
||||
return workplace;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workplace属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setWorkplace(String value) {
|
||||
this.workplace = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workplaceName属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getWorkplaceName() {
|
||||
return workplaceName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workplaceName属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setWorkplaceName(String value) {
|
||||
this.workplaceName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取zhidaozu属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getZhidaozu() {
|
||||
return zhidaozu;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置zhidaozu属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setZhidaozu(String value) {
|
||||
this.zhidaozu = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取zip属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getZip() {
|
||||
return zip;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置zip属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setZip(String value) {
|
||||
this.zip = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>driverPhotoPojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="driverPhotoPojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* </sequence>
|
||||
* <attribute name="driverid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="workno" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="photo" type="{http://www.w3.org/2001/XMLSchema}base64Binary" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "driverPhotoPojo")
|
||||
public class DriverPhotoPojo {
|
||||
|
||||
@XmlAttribute(name = "driverid", required = true)
|
||||
protected int driverid;
|
||||
@XmlAttribute(name = "workno", required = true)
|
||||
protected int workno;
|
||||
@XmlAttribute(name = "photo")
|
||||
protected byte[] photo;
|
||||
|
||||
/**
|
||||
* 获取driverid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriverid() {
|
||||
return driverid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriverid(int value) {
|
||||
this.driverid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workno属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkno() {
|
||||
return workno;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workno属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkno(int value) {
|
||||
this.workno = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取photo属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* byte[]
|
||||
*/
|
||||
public byte[] getPhoto() {
|
||||
return photo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置photo属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* byte[]
|
||||
*/
|
||||
public void setPhoto(byte[] value) {
|
||||
this.photo = value;
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,706 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
|
||||
/**
|
||||
* <p>dutyPlanPojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="dutyPlanPojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* </sequence>
|
||||
* <attribute name="secCode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="secName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="depTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="arvTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="depStation" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="arvStation" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="planModel" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="planLoco" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="model" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="loco" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="onDutyCode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="planOnDutyTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* <attribute name="driverId1" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="workno1" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driverName1" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driverId2" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="workno2" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driverName2" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driverId3" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="workno3" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driverName3" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="driverId4" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="workno4" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="driverName4" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="planTaskId" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="taskName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="trainNum" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="trainDirect" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "dutyPlanPojo")
|
||||
public class DutyPlanPojo {
|
||||
|
||||
@XmlAttribute(name = "secCode")
|
||||
protected String secCode;
|
||||
@XmlAttribute(name = "secName")
|
||||
protected String secName;
|
||||
@XmlAttribute(name = "depTime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar depTime;
|
||||
@XmlAttribute(name = "arvTime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar arvTime;
|
||||
@XmlAttribute(name = "depStation")
|
||||
protected String depStation;
|
||||
@XmlAttribute(name = "arvStation")
|
||||
protected String arvStation;
|
||||
@XmlAttribute(name = "planModel")
|
||||
protected String planModel;
|
||||
@XmlAttribute(name = "planLoco", required = true)
|
||||
protected int planLoco;
|
||||
@XmlAttribute(name = "model")
|
||||
protected String model;
|
||||
@XmlAttribute(name = "loco", required = true)
|
||||
protected int loco;
|
||||
@XmlAttribute(name = "onDutyCode")
|
||||
protected String onDutyCode;
|
||||
@XmlAttribute(name = "planOnDutyTime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
protected XMLGregorianCalendar planOnDutyTime;
|
||||
@XmlAttribute(name = "driverId1", required = true)
|
||||
protected int driverId1;
|
||||
@XmlAttribute(name = "workno1", required = true)
|
||||
protected int workno1;
|
||||
@XmlAttribute(name = "driverName1")
|
||||
protected String driverName1;
|
||||
@XmlAttribute(name = "driverId2", required = true)
|
||||
protected int driverId2;
|
||||
@XmlAttribute(name = "workno2", required = true)
|
||||
protected int workno2;
|
||||
@XmlAttribute(name = "driverName2")
|
||||
protected String driverName2;
|
||||
@XmlAttribute(name = "driverId3", required = true)
|
||||
protected int driverId3;
|
||||
@XmlAttribute(name = "workno3", required = true)
|
||||
protected int workno3;
|
||||
@XmlAttribute(name = "driverName3")
|
||||
protected String driverName3;
|
||||
@XmlAttribute(name = "driverId4", required = true)
|
||||
protected int driverId4;
|
||||
@XmlAttribute(name = "workno4", required = true)
|
||||
protected int workno4;
|
||||
@XmlAttribute(name = "driverName4")
|
||||
protected String driverName4;
|
||||
@XmlAttribute(name = "planTaskId", required = true)
|
||||
protected int planTaskId;
|
||||
@XmlAttribute(name = "taskName")
|
||||
protected String taskName;
|
||||
@XmlAttribute(name = "trainNum")
|
||||
protected String trainNum;
|
||||
@XmlAttribute(name = "trainDirect")
|
||||
protected String trainDirect;
|
||||
|
||||
/**
|
||||
* 获取secCode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getSecCode() {
|
||||
return secCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置secCode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setSecCode(String value) {
|
||||
this.secCode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取secName属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getSecName() {
|
||||
return secName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置secName属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setSecName(String value) {
|
||||
this.secName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取depTime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getDepTime() {
|
||||
return depTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置depTime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setDepTime(XMLGregorianCalendar value) {
|
||||
this.depTime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取arvTime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getArvTime() {
|
||||
return arvTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置arvTime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setArvTime(XMLGregorianCalendar value) {
|
||||
this.arvTime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取depStation属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDepStation() {
|
||||
return depStation;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置depStation属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDepStation(String value) {
|
||||
this.depStation = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取arvStation属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getArvStation() {
|
||||
return arvStation;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置arvStation属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setArvStation(String value) {
|
||||
this.arvStation = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取planModel属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getPlanModel() {
|
||||
return planModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置planModel属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setPlanModel(String value) {
|
||||
this.planModel = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取planLoco属性的值。
|
||||
*
|
||||
*/
|
||||
public int getPlanLoco() {
|
||||
return planLoco;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置planLoco属性的值。
|
||||
*
|
||||
*/
|
||||
public void setPlanLoco(int value) {
|
||||
this.planLoco = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取model属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置model属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setModel(String value) {
|
||||
this.model = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取loco属性的值。
|
||||
*
|
||||
*/
|
||||
public int getLoco() {
|
||||
return loco;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置loco属性的值。
|
||||
*
|
||||
*/
|
||||
public void setLoco(int value) {
|
||||
this.loco = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取onDutyCode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getOnDutyCode() {
|
||||
return onDutyCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置onDutyCode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setOnDutyCode(String value) {
|
||||
this.onDutyCode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取planOnDutyTime属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public XMLGregorianCalendar getPlanOnDutyTime() {
|
||||
return planOnDutyTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置planOnDutyTime属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
public void setPlanOnDutyTime(XMLGregorianCalendar value) {
|
||||
this.planOnDutyTime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverId1属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriverId1() {
|
||||
return driverId1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverId1属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriverId1(int value) {
|
||||
this.driverId1 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workno1属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkno1() {
|
||||
return workno1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workno1属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkno1(int value) {
|
||||
this.workno1 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName1属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName1() {
|
||||
return driverName1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName1属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName1(String value) {
|
||||
this.driverName1 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverId2属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriverId2() {
|
||||
return driverId2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverId2属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriverId2(int value) {
|
||||
this.driverId2 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workno2属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkno2() {
|
||||
return workno2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workno2属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkno2(int value) {
|
||||
this.workno2 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName2属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName2() {
|
||||
return driverName2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName2属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName2(String value) {
|
||||
this.driverName2 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverId3属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriverId3() {
|
||||
return driverId3;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverId3属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriverId3(int value) {
|
||||
this.driverId3 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workno3属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkno3() {
|
||||
return workno3;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workno3属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkno3(int value) {
|
||||
this.workno3 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName3属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName3() {
|
||||
return driverName3;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName3属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName3(String value) {
|
||||
this.driverName3 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverId4属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDriverId4() {
|
||||
return driverId4;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverId4属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDriverId4(int value) {
|
||||
this.driverId4 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workno4属性的值。
|
||||
*
|
||||
*/
|
||||
public int getWorkno4() {
|
||||
return workno4;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workno4属性的值。
|
||||
*
|
||||
*/
|
||||
public void setWorkno4(int value) {
|
||||
this.workno4 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取driverName4属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getDriverName4() {
|
||||
return driverName4;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置driverName4属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setDriverName4(String value) {
|
||||
this.driverName4 = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取planTaskId属性的值。
|
||||
*
|
||||
*/
|
||||
public int getPlanTaskId() {
|
||||
return planTaskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置planTaskId属性的值。
|
||||
*
|
||||
*/
|
||||
public void setPlanTaskId(int value) {
|
||||
this.planTaskId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取taskName属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置taskName属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setTaskName(String value) {
|
||||
this.taskName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取trainNum属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getTrainNum() {
|
||||
return trainNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置trainNum属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setTrainNum(String value) {
|
||||
this.trainNum = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取trainDirect属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getTrainDirect() {
|
||||
return trainDirect;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置trainDirect属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setTrainDirect(String value) {
|
||||
this.trainDirect = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>examQuestionOptionPojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="examQuestionOptionPojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* </sequence>
|
||||
* <attribute name="isAnswer" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="options" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="optionsid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="questionid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "examQuestionOptionPojo")
|
||||
public class ExamQuestionOptionPojo {
|
||||
|
||||
@XmlAttribute(name = "isAnswer", required = true)
|
||||
protected int isAnswer;
|
||||
@XmlAttribute(name = "options")
|
||||
protected String options;
|
||||
@XmlAttribute(name = "optionsid", required = true)
|
||||
protected int optionsid;
|
||||
@XmlAttribute(name = "questionid", required = true)
|
||||
protected int questionid;
|
||||
|
||||
/**
|
||||
* 获取isAnswer属性的值。
|
||||
*
|
||||
*/
|
||||
public int getIsAnswer() {
|
||||
return isAnswer;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置isAnswer属性的值。
|
||||
*
|
||||
*/
|
||||
public void setIsAnswer(int value) {
|
||||
this.isAnswer = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取options属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getOptions() {
|
||||
return options;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置options属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setOptions(String value) {
|
||||
this.options = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取optionsid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getOptionsid() {
|
||||
return optionsid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置optionsid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setOptionsid(int value) {
|
||||
this.optionsid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取questionid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getQuestionid() {
|
||||
return questionid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置questionid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setQuestionid(int value) {
|
||||
this.questionid = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>examQuestionPojo complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="examQuestionPojo">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="optionPojos" type="{http://resource.byxx/}examQuestionOptionPojo" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="difficulty" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="isAppointed" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="keyQuestion" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="locoTypeCode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="locoTypeName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="qObject" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="qclassid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="question" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="questionType" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="questionid" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="score" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
|
||||
* <attribute name="section" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="workPlace" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "examQuestionPojo", propOrder = {
|
||||
"optionPojos"
|
||||
})
|
||||
public class ExamQuestionPojo {
|
||||
|
||||
protected List<ExamQuestionOptionPojo> optionPojos;
|
||||
@XmlAttribute(name = "difficulty", required = true)
|
||||
protected int difficulty;
|
||||
@XmlAttribute(name = "isAppointed", required = true)
|
||||
protected int isAppointed;
|
||||
@XmlAttribute(name = "keyQuestion", required = true)
|
||||
protected int keyQuestion;
|
||||
@XmlAttribute(name = "locoTypeCode")
|
||||
protected String locoTypeCode;
|
||||
@XmlAttribute(name = "locoTypeName")
|
||||
protected String locoTypeName;
|
||||
@XmlAttribute(name = "qObject", required = true)
|
||||
protected int qObject;
|
||||
@XmlAttribute(name = "qclassid", required = true)
|
||||
protected int qclassid;
|
||||
@XmlAttribute(name = "question")
|
||||
protected String question;
|
||||
@XmlAttribute(name = "questionType", required = true)
|
||||
protected int questionType;
|
||||
@XmlAttribute(name = "questionid", required = true)
|
||||
protected int questionid;
|
||||
@XmlAttribute(name = "score", required = true)
|
||||
protected int score;
|
||||
@XmlAttribute(name = "section")
|
||||
protected String section;
|
||||
@XmlAttribute(name = "workPlace")
|
||||
protected String workPlace;
|
||||
|
||||
/**
|
||||
* Gets the value of the optionPojos property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the optionPojos property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getOptionPojos().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link ExamQuestionOptionPojo }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<ExamQuestionOptionPojo> getOptionPojos() {
|
||||
if (optionPojos == null) {
|
||||
optionPojos = new ArrayList<ExamQuestionOptionPojo>();
|
||||
}
|
||||
return this.optionPojos;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取difficulty属性的值。
|
||||
*
|
||||
*/
|
||||
public int getDifficulty() {
|
||||
return difficulty;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置difficulty属性的值。
|
||||
*
|
||||
*/
|
||||
public void setDifficulty(int value) {
|
||||
this.difficulty = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取isAppointed属性的值。
|
||||
*
|
||||
*/
|
||||
public int getIsAppointed() {
|
||||
return isAppointed;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置isAppointed属性的值。
|
||||
*
|
||||
*/
|
||||
public void setIsAppointed(int value) {
|
||||
this.isAppointed = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取keyQuestion属性的值。
|
||||
*
|
||||
*/
|
||||
public int getKeyQuestion() {
|
||||
return keyQuestion;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置keyQuestion属性的值。
|
||||
*
|
||||
*/
|
||||
public void setKeyQuestion(int value) {
|
||||
this.keyQuestion = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取locoTypeCode属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getLocoTypeCode() {
|
||||
return locoTypeCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置locoTypeCode属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setLocoTypeCode(String value) {
|
||||
this.locoTypeCode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取locoTypeName属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getLocoTypeName() {
|
||||
return locoTypeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置locoTypeName属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setLocoTypeName(String value) {
|
||||
this.locoTypeName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取qObject属性的值。
|
||||
*
|
||||
*/
|
||||
public int getQObject() {
|
||||
return qObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置qObject属性的值。
|
||||
*
|
||||
*/
|
||||
public void setQObject(int value) {
|
||||
this.qObject = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取qclassid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getQclassid() {
|
||||
return qclassid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置qclassid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setQclassid(int value) {
|
||||
this.qclassid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取question属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getQuestion() {
|
||||
return question;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置question属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setQuestion(String value) {
|
||||
this.question = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取questionType属性的值。
|
||||
*
|
||||
*/
|
||||
public int getQuestionType() {
|
||||
return questionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置questionType属性的值。
|
||||
*
|
||||
*/
|
||||
public void setQuestionType(int value) {
|
||||
this.questionType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取questionid属性的值。
|
||||
*
|
||||
*/
|
||||
public int getQuestionid() {
|
||||
return questionid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置questionid属性的值。
|
||||
*
|
||||
*/
|
||||
public void setQuestionid(int value) {
|
||||
this.questionid = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取score属性的值。
|
||||
*
|
||||
*/
|
||||
public int getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置score属性的值。
|
||||
*
|
||||
*/
|
||||
public void setScore(int value) {
|
||||
this.score = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取section属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置section属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setSection(String value) {
|
||||
this.section = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取workPlace属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getWorkPlace() {
|
||||
return workPlace;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置workPlace属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setWorkPlace(String value) {
|
||||
this.workPlace = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Exception complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="Exception">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "Exception", propOrder = {
|
||||
"message"
|
||||
})
|
||||
public class Exception {
|
||||
|
||||
protected String message;
|
||||
|
||||
/**
|
||||
* 获取message属性的值。
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置message属性的值。
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setMessage(String value) {
|
||||
this.message = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.ws.WebFault;
|
||||
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 3.4.10
|
||||
* 2026-03-30T14:05:19.023+08:00
|
||||
* Generated source version: 3.4.10
|
||||
*/
|
||||
|
||||
@WebFault(name = "Exception", targetNamespace = "http://resource.byxx/")
|
||||
public class Exception_Exception extends java.lang.Exception {
|
||||
|
||||
private byxx.resource.Exception faultInfo;
|
||||
|
||||
public Exception_Exception() {
|
||||
super();
|
||||
}
|
||||
|
||||
public Exception_Exception(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public Exception_Exception(String message, java.lang.Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public Exception_Exception(String message, byxx.resource.Exception exception) {
|
||||
super(message);
|
||||
this.faultInfo = exception;
|
||||
}
|
||||
|
||||
public Exception_Exception(String message, byxx.resource.Exception exception, java.lang.Throwable cause) {
|
||||
super(message, cause);
|
||||
this.faultInfo = exception;
|
||||
}
|
||||
|
||||
public byxx.resource.Exception getFaultInfo() {
|
||||
return this.faultInfo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>getAllDriverInfoPojos complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="getAllDriverInfoPojos">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "getAllDriverInfoPojos")
|
||||
public class GetAllDriverInfoPojos {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
package byxx.resource;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>getAllDriverInfoPojosResponse complex type的 Java 类。
|
||||
*
|
||||
* <p>以下模式片段指定包含在此类中的预期内容。
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="getAllDriverInfoPojosResponse">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="return" type="{http://resource.byxx/}driverInfoPojo" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "getAllDriverInfoPojosResponse", propOrder = {
|
||||
"_return"
|
||||
})
|
||||
public class GetAllDriverInfoPojosResponse {
|
||||
|
||||
@XmlElement(name = "return")
|
||||
protected List<DriverInfoPojo> _return;
|
||||
|
||||
/**
|
||||
* Gets the value of the return property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the return property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getReturn().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link DriverInfoPojo }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<DriverInfoPojo> getReturn() {
|
||||
if (_return == null) {
|
||||
_return = new ArrayList<DriverInfoPojo>();
|
||||
}
|
||||
return this._return;
|
||||
}
|
||||
|
||||
}
|
||||
Loaded 100 of 1100 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user