|
@@ -16,6 +16,7 @@
|
|
|
label="姓名"
|
|
|
prop="userInfo.usrName"
|
|
|
borderBottom
|
|
|
+ class="require"
|
|
|
>
|
|
|
<u--input
|
|
|
placeholder="输入姓名"
|
|
@@ -27,6 +28,7 @@
|
|
|
label="单位名称"
|
|
|
prop="userInfo.orgUnitName"
|
|
|
borderBottom
|
|
|
+ class="require"
|
|
|
>
|
|
|
<u--input
|
|
|
placeholder="输入单位名称"
|
|
@@ -38,6 +40,7 @@
|
|
|
label="职务"
|
|
|
prop="userInfo.uniLevel"
|
|
|
borderBottom
|
|
|
+ class="require"
|
|
|
>
|
|
|
<u--input
|
|
|
placeholder="输入职务"
|
|
@@ -49,6 +52,7 @@
|
|
|
label="联系电话"
|
|
|
prop="userInfo.tel"
|
|
|
borderBottom
|
|
|
+ class="require"
|
|
|
>
|
|
|
<u--input
|
|
|
placeholder="输入联系电话"
|
|
@@ -154,12 +158,17 @@
|
|
|
|
|
|
<script>
|
|
|
|
|
|
-import { fetchContentInfo, fetchUsrInfo, putUsrRegist } from '@/common/api';
|
|
|
+import { fetchContentInfo, fetchUsrInfo, formCfg, putUsrRegist } from '@/common/api';
|
|
|
import { CONTENT_TYPE, ICON_CFG, MEETING_TYPE, USR_TYPE_LIST } from '@/common/EnumConst';
|
|
|
import AuthWrap from '@/components/AuthComp/index.vue';
|
|
|
import SingleDropList from '@/components/SingleDropList/index.vue';
|
|
|
import { getImageUrl, getUserInfo, setUserInfo } from '@/util';
|
|
|
|
|
|
+const staticRules = {
|
|
|
+ 'userInfo.email': {
|
|
|
+ pattern: /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/,
|
|
|
+ },
|
|
|
+};
|
|
|
export default {
|
|
|
name: 'login',
|
|
|
components: {
|
|
@@ -181,59 +190,24 @@ export default {
|
|
|
},
|
|
|
conferenceHall: [],
|
|
|
tripList: [],
|
|
|
- rules: {
|
|
|
- 'userInfo.usrName': {
|
|
|
- type: 'string',
|
|
|
- required: true,
|
|
|
- message: '请填写姓名',
|
|
|
- trigger: ['blur', 'change'],
|
|
|
- },
|
|
|
- 'userInfo.tel': {
|
|
|
- type: 'string',
|
|
|
- len: 11,
|
|
|
- required: true,
|
|
|
- message: '请填写11位手机号',
|
|
|
- trigger: ['blur', 'change'],
|
|
|
- },
|
|
|
- 'userInfo.email': {
|
|
|
- type: 'string',
|
|
|
- required: true,
|
|
|
- message: '请填写邮箱',
|
|
|
- pattern: /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/,
|
|
|
- trigger: ['blur', 'change'],
|
|
|
- },
|
|
|
- 'userInfo.orgUnitName': {
|
|
|
- type: 'string',
|
|
|
- required: true,
|
|
|
- message: '请填写单位名称',
|
|
|
- trigger: ['blur', 'change'],
|
|
|
- },
|
|
|
- 'userInfo.uniLevel': {
|
|
|
- type: 'string',
|
|
|
- required: true,
|
|
|
- message: '请填写职务',
|
|
|
- trigger: ['blur', 'change'],
|
|
|
- },
|
|
|
- 'userInfo.usrType': {
|
|
|
- type: 'string',
|
|
|
- required: true,
|
|
|
- message: '请填写人员类型',
|
|
|
- trigger: ['blur', 'change'],
|
|
|
- },
|
|
|
- 'userInfo.contentId': {
|
|
|
- type: 'number',
|
|
|
- required: true,
|
|
|
- message: '请选择会场',
|
|
|
- trigger: ['blur', 'change'],
|
|
|
- },
|
|
|
- },
|
|
|
+ rules: {},
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+
|
|
|
},
|
|
|
onLoad() {
|
|
|
+ formCfg('meet_form_cfg').then(res => {
|
|
|
+ if (res.data.cfgJson) {
|
|
|
+ const cfgJson = JSON.parse(res.data.cfgJson);
|
|
|
+ Object.keys(staticRules).forEach(item => {
|
|
|
+ Object.assign(cfgJson[item], staticRules[item]);
|
|
|
+ });
|
|
|
+ this.rules = cfgJson;
|
|
|
+ this.$refs.uForm.setRules(this.rules);
|
|
|
+ }
|
|
|
+ });
|
|
|
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
|
|
- this.$refs.uForm.setRules(this.rules);
|
|
|
this.$refs.authWrap.reloadPage();
|
|
|
const user = getUserInfo();
|
|
|
if (user) {
|