mirror of
https://github.com/chowa/ejyy.git
synced 2026-01-21 05:07:48 +08:00
remove open.weixin
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
## 「e家宜业」web中台
|
||||
|
||||
### 配置文件
|
||||
|
||||
详见本目录下`src/config.js`
|
||||
|
||||
```js
|
||||
// 服务端权限认证字段(修改请修改服务端配置 token.pc)
|
||||
export const AUTH_HEADER_NAME = 'ejyy-pc-token';
|
||||
|
||||
// 本地存储 token 字段名
|
||||
export const TOKEN_ID = 'EJYY_PC_TOKEN';
|
||||
|
||||
// 本地存储 用户id 字段名
|
||||
export const USER_ID = 'EJYY_PC_USER_ID';
|
||||
|
||||
// 网站标题
|
||||
export const SITE_TITLE = 'e家宜业';
|
||||
|
||||
// 开放平台绑定的web应用的 appid(对应服务端配置wechat.web.appid)
|
||||
export const WECHAT_WEB_APPID = '';
|
||||
|
||||
// 访问域名(必须带protocol,结尾不要带斜线)
|
||||
export const HOST_NAME = '';
|
||||
|
||||
// 默认分页取多少条数据
|
||||
export const DEGAULT_PAGE_SIZE = 10;
|
||||
|
||||
// 对象存储域名,和server配置中aliyun.oss.host一样
|
||||
export const ASSET_HOST = '';
|
||||
|
||||
// 表单label响应宽度
|
||||
export const FORM_ADAPT_WIDTH = 992;
|
||||
|
||||
// 腾讯地址 key (对应服务端配置map.key)
|
||||
export const MAP_KEY = '';
|
||||
|
||||
```
|
||||
|
||||
### 安装依赖
|
||||
|
||||
> 请使用node v12.1.0
|
||||
|
||||
`npm install`
|
||||
|
||||
### 启动
|
||||
|
||||
#### 本地开发
|
||||
|
||||
`npm run dev`
|
||||
|
||||
#### 编译打包
|
||||
|
||||
> 生产环境请自行在nginx设置代理到服务端
|
||||
|
||||
`npm run dist`
|
||||
@@ -53,7 +53,7 @@
|
||||
"eslint-plugin-prettier": "^3.1.3",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"less": "^2.7.3",
|
||||
"less-loader": "^7.1.0",
|
||||
"less-loader": "^4.0.6",
|
||||
"prettier": "^1.19.1",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 17 KiB |
@@ -8,13 +8,19 @@
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<script type="text/javascript">
|
||||
if (window.navigator.userAgent.indexOf('compatible') > -1 && window.navigator.userAgent.indexOf('MSIE') > -1) {
|
||||
var match = window.navigator.userAgent.match(/MSIE\s+(\d+\.\d+)/);
|
||||
(function() {
|
||||
if (window.navigator.userAgent.indexOf('compatible') > -1 && window.navigator.userAgent.indexOf('MSIE') > -1) {
|
||||
var match = window.navigator.userAgent.match(/MSIE\s+(\d+\.\d+)/);
|
||||
|
||||
if (match && parseInt(match[1], 10) < 10) {
|
||||
window.location.href = 'https://www.chowa.cn/update-browser.html';
|
||||
if (match && parseInt(match[1], 10) < 10) {
|
||||
window.location.href = 'https://www.chowa.cn/update-browser.html';
|
||||
}
|
||||
}
|
||||
}
|
||||
var hm = document.createElement('script');
|
||||
hm.src = 'https://hm.baidu.com/hm.js?393724405eb41f41d19e18eaa8926d94';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="393px" height="400px" viewBox="0 0 393 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>分组 3</title>
|
||||
<defs>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
|
||||
<stop stop-color="#679CF6" offset="0%"></stop>
|
||||
<stop stop-color="#4072EE" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
|
||||
<stop stop-color="#29CB97" offset="0%"></stop>
|
||||
<stop stop-color="#2CB589" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="横向white" transform="translate(-50.000000, -10.000000)" fill-rule="nonzero">
|
||||
<g id="分组-3" transform="translate(50.000000, 10.000000)">
|
||||
<path d="M0,207.03529 L81.4872189,207.03529 L145.536903,270.20995 L195.937567,217.917818 L252.178956,271.337528 L314.155307,207.03529 L391.875135,207.03529 L247.942337,351.75264 L197.331845,297.081877 L145.327075,349.370116 L0,207.03529 Z M234.851073,364.915262 L200.698027,397.176968 C198.068898,399.820428 193.806237,399.820428 191.177108,397.176968 L158.418339,362.532738 L197.331845,323.407122 L234.851073,364.915262 Z" id="形状" fill="url(#linearGradient-1)"></path>
|
||||
<path d="M0.700674246,193.497283 L191.177108,1.98259517 C193.806237,-0.660865056 198.068898,-0.660865056 200.698027,1.98259517 L391.17446,193.497283 L312.414183,193.497283 L196.281894,76.7319759 L80.1496037,193.497283 L0.700674246,193.497283 L0.700674246,193.497283 Z" id="路径" fill="url(#linearGradient-2)"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -1,15 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="286px" height="286px" viewBox="0 0 286 286" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>画板</title>
|
||||
<svg width="393px" height="400px" viewBox="0 0 393 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>分组 3</title>
|
||||
<defs>
|
||||
<linearGradient x1="43.2170531%" y1="3.09733972%" x2="93.1151404%" y2="92.8777292%" id="linearGradient-1">
|
||||
<stop stop-color="#3EDCD9" offset="0%"></stop>
|
||||
<stop stop-color="#1D74B5" stop-opacity="0.656759511" offset="100%"></stop>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
|
||||
<stop stop-color="#679CF6" offset="0%"></stop>
|
||||
<stop stop-color="#4072EE" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
|
||||
<stop stop-color="#29CB97" offset="0%"></stop>
|
||||
<stop stop-color="#2CB589" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="画板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="形状-2" transform="translate(0.000000, 5.000000)" fill="url(#linearGradient-1)">
|
||||
<path d="M255.686636,225.654354 L255.686636,110.860376 C255.686636,103.872886 252.510152,97.2643022 247.053588,92.899566 L170.659589,31.7915778 L170.659589,31.7915778 C155.88563,20.6794158 135.535276,21.5218405 120.16253,31.7915778 L39.3282985,93.7022241 C33.6457514,98.0544664 30.3133641,104.804212 30.3133641,111.96196 L30.3133641,273.050335 L30.3133641,273.050335 C13.5717554,273.050335 0,259.493174 0,242.769569 L0,103.077488 C9.48264384e-15,95.6862096 3.40567844,88.7072092 9.23197301,84.1591008 L100.250372,13.1085327 L100.250372,13.1085327 C127.734978,-5.25251288 163.837595,-4.24365527 190.251643,15.6235435 L277.054684,85.5388368 C282.711023,90.0947205 286,96.966981 286,104.229917 L286,237.503349 L286,237.503349 C286,259.316747 268.29771,277 246.460829,277 L119.935484,277 C86.4522665,277 59.3087558,249.885679 59.3087558,216.438469 L59.3087558,154.560383 C59.3087558,121.113173 86.4522665,93.9988519 119.935484,93.9988519 L164.746544,93.9988519 C198.229761,93.9988519 225.373272,121.113173 225.373272,154.560383 L225.373272,201.956364 L94.8940092,201.956364 L94.8940092,225.654354 C94.8940092,247.467752 112.596299,265.151005 134.43318,265.151005 L226.69125,265.151005 C248.528128,265.151002 255.686636,247.46775 255.686636,225.654354 Z M143,116.380287 C116.431795,116.380287 94.8940092,137.894912 94.8940092,164.434546 L94.8940092,183.524593 L191.105991,183.524593 L191.105991,164.434546 C191.105991,137.894912 169.568205,116.380287 143,116.380287 Z" id="形状"></path>
|
||||
<g id="组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="横向white" transform="translate(-50.000000, -10.000000)" fill-rule="nonzero">
|
||||
<g id="分组-3" transform="translate(50.000000, 10.000000)">
|
||||
<path d="M0,207.03529 L81.4872189,207.03529 L145.536903,270.20995 L195.937567,217.917818 L252.178956,271.337528 L314.155307,207.03529 L391.875135,207.03529 L247.942337,351.75264 L197.331845,297.081877 L145.327075,349.370116 L0,207.03529 Z M234.851073,364.915262 L200.698027,397.176968 C198.068898,399.820428 193.806237,399.820428 191.177108,397.176968 L158.418339,362.532738 L197.331845,323.407122 L234.851073,364.915262 Z" id="形状" fill="url(#linearGradient-1)"></path>
|
||||
<path d="M0.700674246,193.497283 L191.177108,1.98259517 C193.806237,-0.660865056 198.068898,-0.660865056 200.698027,1.98259517 L391.17446,193.497283 L312.414183,193.497283 L196.281894,76.7319759 L80.1496037,193.497283 L0.700674246,193.497283 L0.700674246,193.497283 Z" id="路径" fill="url(#linearGradient-2)"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -29,6 +29,5 @@ export { default as MultipleImageUpload } from './multiple-image-upload';
|
||||
export { default as Result } from './result';
|
||||
export { default as SimpleHeader } from './simple-header';
|
||||
export { default as WaterMark } from './water-mark';
|
||||
export { default as WechatLogin } from './wechat-login';
|
||||
export { default as Workflow } from './workflow';
|
||||
export { default as WorkflowTimeline } from './workflow-timeline';
|
||||
|
||||
@@ -91,7 +91,6 @@ export default {
|
||||
this.marker = null;
|
||||
this.map = new window.qq.maps.Map(this.$refs.map, {
|
||||
backgroundColor: '#f7f7f7',
|
||||
mapStyleId: 'style2',
|
||||
zoom: 18,
|
||||
mapTypeControl: false,
|
||||
draggableCursor: 'crosshair'
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<iframe
|
||||
:sandbox="debug ? 'allow-scripts allow-same-origin' : 'allow-scripts allow-top-navigation'"
|
||||
scrolling="no"
|
||||
width="300"
|
||||
:height="min ? 300 : 400"
|
||||
frameBorder="0"
|
||||
allowTransparency="true"
|
||||
:src="src"
|
||||
></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* +----------------------------------------------------------------------
|
||||
* | 「e家宜业」 —— 助力物业服务升级,用心服务万千业主
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2020-2022 https://www.chowa.cn All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed 未经许可不能去掉「e家宜业」和「卓瓦科技」相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: contact@chowa.cn
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
debug: process.env.NODE_ENV === 'development'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
src() {
|
||||
return (
|
||||
'https://open.weixin.qq.com/connect/qrconnect?appid=' +
|
||||
this.appid +
|
||||
'&scope=' +
|
||||
this.scope +
|
||||
'&redirect_uri=' +
|
||||
this.redirect_uri +
|
||||
'&state=' +
|
||||
this.state +
|
||||
'&login_type=' +
|
||||
this.login_type +
|
||||
'&style=' +
|
||||
this.theme +
|
||||
'&self_redirect=' +
|
||||
this.self_redirect +
|
||||
'&href=' +
|
||||
(this.min
|
||||
? 'data:text/css;base64,LmltcG93ZXJCb3ggLnRpdGxlIHsgZGlzcGxheTogbm9uZTt9DQouaW1wb3dlckJveCAuaW5mbyB7IGRpc3BsYXk6IG5vbmU7fQ=='
|
||||
: this.href)
|
||||
);
|
||||
}
|
||||
},
|
||||
props: {
|
||||
//应用唯一标识,在微信开放平台提交应用审核通过后获得
|
||||
appid: String,
|
||||
//应用授权作用域,拥有多个作用域用逗号(,)分隔,网页应用目前仅填写snsapi_login即可
|
||||
scope: String,
|
||||
//重定向地址,需要进行UrlEncode
|
||||
redirect_uri: String,
|
||||
//用于保持请求和回调的状态,授权请求后原样带回给第三方。该参数可用于防止csrf攻击(跨站请求伪造攻击),建议第三方带上该参数,可设置为简单的随机数加session进行校验
|
||||
state: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//提供"black"、"white"可选,默认为黑色文字描述。详见文档底部FAQ
|
||||
theme: {
|
||||
type: String,
|
||||
default: 'black'
|
||||
},
|
||||
// 自定义样式链接,第三方可根据实际需求覆盖默认样式。详见文档底部FAQ
|
||||
href: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// true:手机点击确认登录后可以在 iframe 内跳转到 redirect_uri,false:手机点击确认登录后可以在 top window 跳转到 redirect_uri。默认为 false。
|
||||
self_redirect: {
|
||||
type: String,
|
||||
default: 'default'
|
||||
},
|
||||
// sdk的扩展字符串,但是在这里就默认了jssdk,暂时不建议修改
|
||||
login_type: {
|
||||
type: String,
|
||||
default: 'jssdk'
|
||||
},
|
||||
min: Boolean
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -18,14 +18,14 @@ export const USER_ID = 'EJYY_PC_USER_ID';
|
||||
|
||||
export const SITE_TITLE = 'e家宜业';
|
||||
|
||||
export const DEGAULT_PAGE_SIZE = 10;
|
||||
|
||||
export const FORM_ADAPT_WIDTH = 992;
|
||||
|
||||
export const WECHAT_WEB_APPID = '';
|
||||
|
||||
export const HOST_NAME = '';
|
||||
|
||||
export const DEGAULT_PAGE_SIZE = 10;
|
||||
|
||||
export const ASSET_HOST = '';
|
||||
|
||||
export const FORM_ADAPT_WIDTH = 992;
|
||||
export const ASSET_HOST = 'https://assets.ejyy.chowa.cn';
|
||||
|
||||
export const MAP_KEY = '';
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
*/
|
||||
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import { Layout, Sider, Header, Content, Drawer, Notice, Modal } from 'view-design';
|
||||
import { Layout, Sider, Header, Content, Drawer, Notice } from 'view-design';
|
||||
import Nav from './components/nav';
|
||||
import Topbar from './components/topbar';
|
||||
import Setting from './components/setting';
|
||||
@@ -145,16 +145,7 @@ export default {
|
||||
timer = setTimeout(() => {
|
||||
ws.send('ping');
|
||||
heartCheck();
|
||||
}, 30000);
|
||||
};
|
||||
const showDisconnectModal = () => {
|
||||
clearTimeout(timer);
|
||||
Modal.confirm({
|
||||
title: '网络异常',
|
||||
content: '网络异常,请点击「确定」重新加载网络',
|
||||
onOk: () => window.location.reload(),
|
||||
onCancel: () => {}
|
||||
});
|
||||
}, 3000);
|
||||
};
|
||||
|
||||
ws.onopen = () => {
|
||||
@@ -230,14 +221,10 @@ export default {
|
||||
|
||||
ws.onclose = e => {
|
||||
if (e.code !== 1000 && e.code !== 1005) {
|
||||
showDisconnectModal();
|
||||
this.connect();
|
||||
}
|
||||
};
|
||||
|
||||
ws.onerror = () => {
|
||||
showDisconnectModal();
|
||||
};
|
||||
|
||||
window.onbeforeunload = () => {
|
||||
ws.close();
|
||||
};
|
||||
|
||||
@@ -1,23 +1,12 @@
|
||||
<template>
|
||||
<section>
|
||||
<Header back />
|
||||
<Header />
|
||||
|
||||
<div class="wechat-register">
|
||||
<h3>入职二维码</h3>
|
||||
<WechatLogin
|
||||
v-if="!fetching"
|
||||
:appid="appid"
|
||||
scope="snsapi_login"
|
||||
:redirect_uri="redirect_uri"
|
||||
:state="state"
|
||||
theme="black"
|
||||
min
|
||||
/>
|
||||
<Alert show-icon v-if="msg" type="error">
|
||||
{{ msg }}
|
||||
</Alert>
|
||||
|
||||
<p>引导员工,使用微信扫描此二维码完成入职流程。</p>
|
||||
</div>
|
||||
|
||||
<Spin size="large" fix v-if="fetching" />
|
||||
<Editor :onSubmit="submit" />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -34,59 +23,45 @@
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import { Spin } from 'view-design';
|
||||
import { Header, WechatLogin } from '@/components';
|
||||
import { Message, Alert } from 'view-design';
|
||||
import { Header } from '@/components';
|
||||
import Editor from './components/editor';
|
||||
import * as utils from '@/utils';
|
||||
import * as config from '@/config';
|
||||
|
||||
export default {
|
||||
name: 'OaHrJoin',
|
||||
components: {
|
||||
Header,
|
||||
Editor,
|
||||
Message,
|
||||
Alert
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fetching: true,
|
||||
appid: config.WECHAT_WEB_APPID,
|
||||
state: null,
|
||||
redirect_uri: encodeURIComponent(`${config.HOST_NAME}/oa/hr/supplement`)
|
||||
msg: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getState();
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearTimeout(this.timer);
|
||||
},
|
||||
methods: {
|
||||
getState() {
|
||||
this.fetching = true;
|
||||
submit(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const { code, state } = this.$route.query;
|
||||
|
||||
utils.request.get('/hr/state').then(res => {
|
||||
this.fetching = false;
|
||||
this.state = res.data.state;
|
||||
data.code = code;
|
||||
data.state = state;
|
||||
|
||||
this.timer = setTimeout(() => {
|
||||
this.getState();
|
||||
}, res.data.expire);
|
||||
utils.request
|
||||
.post('/hr/create', data)
|
||||
.then(res => {
|
||||
Message.success('人事信息创建成功');
|
||||
this.$router.push(`/oa/hr/detail/${res.data.id}`);
|
||||
resolve();
|
||||
})
|
||||
.catch(res => {
|
||||
this.msg = res.message;
|
||||
reject();
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Spin,
|
||||
Header,
|
||||
WechatLogin
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.wechat-register {
|
||||
padding-top: 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<Header />
|
||||
|
||||
<Alert show-icon v-if="msg" type="error">
|
||||
{{ msg }}
|
||||
</Alert>
|
||||
|
||||
<Editor :onSubmit="submit" />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* +----------------------------------------------------------------------
|
||||
* | 「e家宜业」 —— 助力物业服务升级,用心服务万千业主
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2020~2022 https://www.chowa.cn All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed 未经许可不能去掉「e家宜业」和「卓瓦科技」相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: contact@chowa.cn
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import { Message, Alert } from 'view-design';
|
||||
import { Header } from '@/components';
|
||||
import Editor from './components/editor';
|
||||
import * as utils from '@/utils';
|
||||
|
||||
export default {
|
||||
name: 'OaHrSupplement',
|
||||
components: {
|
||||
Header,
|
||||
Editor,
|
||||
Message,
|
||||
Alert
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msg: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const { code, state } = this.$route.query;
|
||||
|
||||
if (!code || !state) {
|
||||
this.$router.replace('/hr/join');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submit(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const { code, state } = this.$route.query;
|
||||
|
||||
data.code = code;
|
||||
data.state = state;
|
||||
|
||||
utils.request
|
||||
.post('/hr/create', data)
|
||||
.then(res => {
|
||||
Message.success('人事信息创建成功');
|
||||
this.$router.push(`/oa/hr/detail/${res.data.id}`);
|
||||
resolve();
|
||||
})
|
||||
.catch(res => {
|
||||
this.msg = res.message;
|
||||
reject();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -80,17 +80,6 @@ module.exports = {
|
||||
},
|
||||
component: () => import('./main/sign')
|
||||
},
|
||||
{
|
||||
path: 'supplement',
|
||||
meta: {
|
||||
title: '创建人事资料',
|
||||
authRequired: true,
|
||||
layout: 'sider',
|
||||
nav: false,
|
||||
roles: [ROLES.RLZY]
|
||||
},
|
||||
component: () => import('./main/supplement')
|
||||
},
|
||||
{
|
||||
path: 'colleague',
|
||||
meta: {
|
||||
|
||||
@@ -135,7 +135,6 @@ export default {
|
||||
let marker = null;
|
||||
this.map = new window.qq.maps.Map(this.$refs.map, {
|
||||
backgroundColor: '#f7f7f7',
|
||||
mapStyleId: 'style2',
|
||||
zoom: 16,
|
||||
mapTypeControlOptions: {
|
||||
mapTypeIds: []
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="big-screen-header-title">
|
||||
<img src="../../../assets/screen/title.png" class="big-screen-header-title-bg" />
|
||||
|
||||
<img src="../../../assets/chowa.svg" class="big-screen-header-title-logo" />
|
||||
<img src="../../../assets/logo.svg" class="big-screen-header-title-logo" />
|
||||
|
||||
<div class="text">
|
||||
<b>{{ community_name }}小区 — 智慧物业调度与统计中心</b>
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<SimpleHeader>
|
||||
<span slot="title">系统初始化信息</span>
|
||||
</SimpleHeader>
|
||||
<div class="container" v-if="!success">
|
||||
<UserInitProfile ref="profile" />
|
||||
|
||||
<UserInitCommunity ref="community" />
|
||||
|
||||
<div class="cw-form-actions">
|
||||
<Button type="primary" :loading="submiting" @click="submit">立即初始化</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="container">
|
||||
<Result title="系统初始化成功">
|
||||
<div slot="extra">
|
||||
<p>感谢您的支持和信赖。</p>
|
||||
</div>
|
||||
|
||||
<div slot="actions">
|
||||
<Button @click="goLogin" type="success">立即登录</Button>
|
||||
</div>
|
||||
</Result>
|
||||
</div>
|
||||
<Copyright />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* +----------------------------------------------------------------------
|
||||
* | 「e家宜业」 —— 助力物业服务升级,用心服务万千业主
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2020-2022 https://www.chowa.cn All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed 未经许可不能去掉「e家宜业」和「卓瓦科技」相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: contact@chowa.cn
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import { Copyright, Result, SimpleHeader } from '@/components';
|
||||
import { Button } from 'view-design';
|
||||
import * as utils from '@/utils';
|
||||
import UserInitProfile from './components/profile';
|
||||
import UserInitCommunity from './components/community';
|
||||
|
||||
export default {
|
||||
name: 'UserApplyCreate',
|
||||
data() {
|
||||
return {
|
||||
submiting: false,
|
||||
success: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
Promise.all([this.$refs.profile.validate(), this.$refs.community.validate()]).then(
|
||||
([profile, community]) => {
|
||||
const { code, state } = this.$route.query;
|
||||
|
||||
const data = {
|
||||
...profile,
|
||||
...community,
|
||||
province: community.address[0],
|
||||
city: community.address[1],
|
||||
district: community.address[2],
|
||||
code,
|
||||
state
|
||||
};
|
||||
|
||||
delete data.address;
|
||||
|
||||
this.submiting = true;
|
||||
|
||||
utils.request
|
||||
.post('/init/run', data)
|
||||
.then(() => {
|
||||
this.submiting = false;
|
||||
this.success = true;
|
||||
})
|
||||
.catch(() => (this.submiting = false));
|
||||
}
|
||||
);
|
||||
},
|
||||
goLogin() {
|
||||
this.$router.replace('/user/login');
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Button,
|
||||
Copyright,
|
||||
Result,
|
||||
SimpleHeader,
|
||||
UserInitProfile,
|
||||
UserInitCommunity
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,5 +1,30 @@
|
||||
<template>
|
||||
<router-view />
|
||||
<section>
|
||||
<SimpleHeader>
|
||||
<span slot="title">系统初始化信息</span>
|
||||
</SimpleHeader>
|
||||
<div class="container" v-if="!success">
|
||||
<UserInitProfile ref="profile" />
|
||||
|
||||
<UserInitCommunity ref="community" />
|
||||
|
||||
<div class="cw-form-actions">
|
||||
<Button type="primary" :loading="submiting" @click="submit">立即初始化</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="container">
|
||||
<Result title="系统初始化成功">
|
||||
<div slot="extra">
|
||||
<p>感谢您的支持和信赖。</p>
|
||||
</div>
|
||||
|
||||
<div slot="actions">
|
||||
<Button @click="goLogin" type="success">立即登录</Button>
|
||||
</div>
|
||||
</Result>
|
||||
</div>
|
||||
<Copyright />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -15,7 +40,57 @@
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import { Copyright, Result, SimpleHeader } from '@/components';
|
||||
import { Button } from 'view-design';
|
||||
import * as utils from '@/utils';
|
||||
import UserInitProfile from './components/profile';
|
||||
import UserInitCommunity from './components/community';
|
||||
|
||||
export default {
|
||||
name: 'UserInitRoutePage'
|
||||
name: 'UserInit',
|
||||
data() {
|
||||
return {
|
||||
submiting: false,
|
||||
success: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
Promise.all([this.$refs.profile.validate(), this.$refs.community.validate()]).then(
|
||||
([profile, community]) => {
|
||||
const data = {
|
||||
...profile,
|
||||
...community,
|
||||
province: community.address[0],
|
||||
city: community.address[1],
|
||||
district: community.address[2]
|
||||
};
|
||||
|
||||
delete data.address;
|
||||
|
||||
this.submiting = true;
|
||||
|
||||
utils.request
|
||||
.post('/init/run', data)
|
||||
.then(() => {
|
||||
this.submiting = false;
|
||||
this.success = true;
|
||||
})
|
||||
.catch(() => (this.submiting = false));
|
||||
}
|
||||
);
|
||||
},
|
||||
goLogin() {
|
||||
this.$router.replace('/user/login');
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Button,
|
||||
Copyright,
|
||||
Result,
|
||||
SimpleHeader,
|
||||
UserInitProfile,
|
||||
UserInitCommunity
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -21,29 +21,5 @@ module.exports = {
|
||||
nav: false,
|
||||
roles: [ROLES.ANYONE]
|
||||
},
|
||||
component: () => import('./index'),
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
meta: {
|
||||
title: '管理员扫码',
|
||||
authRequired: false,
|
||||
layout: null,
|
||||
nav: false,
|
||||
roles: [ROLES.ANYONE]
|
||||
},
|
||||
component: () => import('./scan')
|
||||
},
|
||||
{
|
||||
path: 'fill',
|
||||
meta: {
|
||||
title: '初始化信息',
|
||||
authRequired: false,
|
||||
layout: null,
|
||||
nav: false,
|
||||
roles: [ROLES.ANYONE]
|
||||
},
|
||||
component: () => import('./fill')
|
||||
}
|
||||
]
|
||||
component: () => import('./index')
|
||||
};
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<SimpleHeader>
|
||||
<span slot="title">系统初始化</span>
|
||||
</SimpleHeader>
|
||||
|
||||
<div class="wechat-register">
|
||||
<h3>管理员二维码</h3>
|
||||
<WechatLogin
|
||||
v-if="!fetching"
|
||||
:appid="appid"
|
||||
scope="snsapi_login"
|
||||
:redirect_uri="redirect_uri"
|
||||
:state="state"
|
||||
theme="black"
|
||||
min
|
||||
/>
|
||||
|
||||
<p>请管理员使用微信扫码此二维码,完成系统初始化。</p>
|
||||
</div>
|
||||
|
||||
<Copyright />
|
||||
|
||||
<Spin size="large" fix v-if="fetching" />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* +----------------------------------------------------------------------
|
||||
* | 「e家宜业」 —— 助力物业服务升级,用心服务万千业主
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2020-2022 https://www.chowa.cn All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed 未经许可不能去掉「e家宜业」和「卓瓦科技」相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: contact@chowa.cn
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import { Spin } from 'view-design';
|
||||
import { SimpleHeader, WechatLogin, Copyright } from '@/components';
|
||||
import * as utils from '@/utils';
|
||||
import * as config from '@/config';
|
||||
|
||||
export default {
|
||||
name: 'UserInitScan',
|
||||
data() {
|
||||
return {
|
||||
fetching: true,
|
||||
appid: config.WECHAT_WEB_APPID,
|
||||
state: null,
|
||||
redirect_uri: encodeURIComponent(`${config.HOST_NAME}/user/init/fill`)
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getState();
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearTimeout(this.timer);
|
||||
},
|
||||
methods: {
|
||||
getState() {
|
||||
this.fetching = true;
|
||||
|
||||
utils.request.get('/init/state').then(res => {
|
||||
this.fetching = false;
|
||||
this.state = res.data.state;
|
||||
|
||||
this.timer = setTimeout(() => {
|
||||
this.getState();
|
||||
}, res.data.expire);
|
||||
});
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Spin,
|
||||
SimpleHeader,
|
||||
WechatLogin,
|
||||
Copyright
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.wechat-register {
|
||||
padding-top: 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -11,65 +11,40 @@
|
||||
|
||||
<h2 class="slogan">助力物业服务升级,用心服务万千业主</h2>
|
||||
|
||||
<Tabs class="tabs">
|
||||
<TabPane label="账号密码登录">
|
||||
<Form :model="form" ref="form" @submit.native.prevent :rules="rules">
|
||||
<FormItem prop="account">
|
||||
<Input
|
||||
placeholder="请输入账号"
|
||||
prefix="ios-contact"
|
||||
size="large"
|
||||
@on-enter="submit"
|
||||
v-model="form.account"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem prop="password">
|
||||
<Input
|
||||
placeholder="请输入密码"
|
||||
prefix="ios-lock"
|
||||
size="large"
|
||||
type="password"
|
||||
@on-enter="submit"
|
||||
v-model="form.password"
|
||||
/>
|
||||
</FormItem>
|
||||
<Form :model="form" ref="form" @submit.native.prevent :rules="rules">
|
||||
<FormItem prop="account">
|
||||
<Input
|
||||
placeholder="请输入账号"
|
||||
prefix="ios-contact"
|
||||
size="large"
|
||||
@on-enter="submit"
|
||||
v-model="form.account"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem prop="password">
|
||||
<Input
|
||||
placeholder="请输入密码"
|
||||
prefix="ios-lock"
|
||||
size="large"
|
||||
type="password"
|
||||
@on-enter="submit"
|
||||
v-model="form.password"
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem prop="captcha">
|
||||
<Row :gutter="12">
|
||||
<Col :span="14">
|
||||
<Input
|
||||
placeholder="验证码"
|
||||
size="large"
|
||||
v-model="form.captcha"
|
||||
@on-enter="submit"
|
||||
/>
|
||||
</Col>
|
||||
<Col :span="10">
|
||||
<img :src="captchaImg" @click="getCaptcha" v-if="captchaImg" />
|
||||
</Col>
|
||||
</Row>
|
||||
</FormItem>
|
||||
<FormItem prop="captcha">
|
||||
<Row :gutter="12">
|
||||
<Col :span="14">
|
||||
<Input placeholder="验证码" size="large" v-model="form.captcha" @on-enter="submit" />
|
||||
</Col>
|
||||
<Col :span="10">
|
||||
<img :src="captchaImg" @click="getCaptcha" v-if="captchaImg" />
|
||||
</Col>
|
||||
</Row>
|
||||
</FormItem>
|
||||
|
||||
<Button type="primary" long :loading="submiting" @click="submit" size="large">登录</Button>
|
||||
</Form>
|
||||
</TabPane>
|
||||
<TabPane label="微信扫码登录">
|
||||
<div class="wechat-qrcode">
|
||||
<Spin size="large" fixed v-if="!ready" />
|
||||
<WechatLogin
|
||||
v-if="ready"
|
||||
:appid="appid"
|
||||
scope="snsapi_login"
|
||||
:redirect_uri="redirect_uri"
|
||||
:state="state"
|
||||
theme="black"
|
||||
/>
|
||||
<div class="expired" v-if="expired">
|
||||
<a @click="getState">二维码已过期,点击重新获取</a>
|
||||
</div>
|
||||
</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
<Button type="primary" long :loading="submiting" @click="submit" size="large">登录</Button>
|
||||
</Form>
|
||||
</div>
|
||||
<Copyright class="copyright" />
|
||||
</section>
|
||||
@@ -90,23 +65,13 @@
|
||||
|
||||
import { mapActions } from 'vuex';
|
||||
import { Spin, Tabs, TabPane, Form, FormItem, Input, Button, Row, Col, Message } from 'view-design';
|
||||
import { Copyright, WechatLogin } from '@/components';
|
||||
import * as config from '@/config';
|
||||
import { Copyright } from '@/components';
|
||||
import * as utils from '@/utils';
|
||||
|
||||
export default {
|
||||
name: 'UserLoginMain',
|
||||
data() {
|
||||
return {
|
||||
ready: false,
|
||||
appid: config.WECHAT_WEB_APPID,
|
||||
state: null,
|
||||
redirect_uri: encodeURIComponent(
|
||||
`${config.HOST_NAME}/user/login/wechat${
|
||||
this.$route.query.redirect ? '?redirect=' + this.$route.query.redirect : ''
|
||||
}`
|
||||
),
|
||||
expired: false,
|
||||
form: {
|
||||
account: '',
|
||||
password: '',
|
||||
@@ -203,7 +168,6 @@ export default {
|
||||
components: {
|
||||
Spin,
|
||||
Copyright,
|
||||
WechatLogin,
|
||||
Tabs,
|
||||
TabPane,
|
||||
Form,
|
||||
@@ -220,6 +184,7 @@ export default {
|
||||
.login {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-bottom: 10vh;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50%;
|
||||
background-size: cover;
|
||||
@@ -270,56 +235,6 @@ export default {
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
.ivu-tabs-bar {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.ivu-tabs-nav {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
|
||||
.ivu-tabs-tab {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.ivu-tabs-ink-bar {
|
||||
margin-left: 26px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.wechat-qrcode {
|
||||
width: 300px;
|
||||
margin: auto;
|
||||
height: 406px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
|
||||
.expired {
|
||||
position: absolute;
|
||||
top: 47px;
|
||||
left: 9px;
|
||||
bottom: 77px;
|
||||
right: 9px;
|
||||
z-index: 100;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
a {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.copyright {
|
||||
|
||||
Reference in New Issue
Block a user