| | |
| | | <FormItem name="dept" class="enter-x dept"> |
| | | <ARow class="enter-x"> |
| | | <ACol :md="24" :xs="24" :span="24"> |
| | | <BasicForm @register="registerForm" /> |
| | | <BasicForm @register="registerForm" /> |
| | | </ACol> |
| | | </ARow> |
| | | </FormItem> |
| | |
| | | </Button> |
| | | </FormItem> |
| | | </Form> |
| | | |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { reactive, ref, unref, computed, onMounted,h } from 'vue'; |
| | | import { reactive, ref, unref, computed, onMounted, h } from 'vue'; |
| | | import { BasicForm, useForm } from '/@/components/Form/index'; |
| | | import { Checkbox, Form, Input, Row, Col, Button, Select, Divider } from 'ant-design-vue'; |
| | | import LoginFormTitle from './LoginFormTitle.vue'; |
| | | |
| | | |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | |
| | |
| | | import { AccountInfo } from '/@/api/tigerapi/model/systemModel'; |
| | | import { accountFormSchema } from './loginDept.data'; |
| | | import { getTreeList, optionsListApi } from '/@/api/tigerapi/dept'; |
| | | |
| | | |
| | | //import { onKeyStroke } from '@vueuse/core'; |
| | | |
| | | |
| | | |
| | | const ACol = Col; |
| | | const ARow = Row; |
| | | const FormItem = Form.Item; |
| | |
| | | async function handleLogin() { |
| | | const data = await validForm(); |
| | | const orgData = await validate(); |
| | | console.log('data',data) |
| | | console.log('data', data); |
| | | if (!data) return; |
| | | try { |
| | | loading.value = true; |
| | | //const positionInfo = await getUserIpConfig(); |
| | | const Info = { ad_info: {}, ip: '' } //positionInfo.status === 110 ? { ad_info: {}, ip: '' } : positionInfo.result; |
| | | const Info = { ad_info: {}, ip: '' }; //positionInfo.status === 110 ? { ad_info: {}, ip: '' } : positionInfo.result; |
| | | const accountInfo: AccountInfo = { |
| | | useR_CODE: data.account, |
| | | password: data.password, |
| | |
| | | ad_info: Info.ad_info, |
| | | ip: Info.ip, |
| | | }; |
| | | |
| | | |
| | | const userInfo = await userStore.login({ |
| | | id: 'string', |
| | | dataType: 'string', |
| | |
| | | description: `${t('sys.login.loginSuccessDesc')}: ${userInfo.realName}`, |
| | | duration: 3, |
| | | }); |
| | | |
| | | |
| | | }else{ |
| | | } else { |
| | | createErrorModal({ |
| | | title: t('sys.api.errorTip'), |
| | | content: t('sys.api.errMsg401'), |
| | | getContainer: () => document.body.querySelector(`.${prefixCls}`) || document.body, |
| | | }); |
| | | title: t('sys.api.errorTip'), |
| | | content: t('sys.api.errMsg401'), |
| | | getContainer: () => document.body.querySelector(`.${prefixCls}`) || document.body, |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | createErrorModal({ |
| | |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .dept{ |
| | | /deep/.ant-select-selector{ |
| | | .dept { |
| | | /deep/.ant-select-selector { |
| | | height: 37px !important; |
| | | } |
| | | /deep/.ant-select-single .ant-select-selector { |