| | |
| | | "echarts-gl": "^2.0.9", |
| | | "echarts-wordcloud": "^2.0.0", |
| | | "element-plus": "^2.2.9", |
| | | "js-base64": "^3.7.2", |
| | | "js-cookie": "^3.0.1", |
| | | "json-bigint": "^1.0.0", |
| | | "jsplumb": "^2.15.6", |
| | |
| | | } |
| | | }, |
| | | { |
| | | path: '/workReservation', |
| | | name: 'workReservation', |
| | | component: () => import('/@/views/specialWorkSystem/workPlan/workReservation/index.vue'), |
| | | path: '/material', |
| | | name: 'material', |
| | | component: () => import('/@/views/specialWorkSystem/foundationSet/material/index.vue'), |
| | | meta: { |
| | | title: '作业预约' |
| | | title: '作业物资' |
| | | } |
| | | } |
| | | ]; |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import {toRefs, reactive, defineComponent, computed, ref} from 'vue'; |
| | | import {toRefs, reactive, defineComponent, computed, ref, onMounted} from 'vue'; |
| | | import { useRoute, useRouter } from 'vue-router'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { useI18n } from 'vue-i18n'; |
| | |
| | | import { NextLoading } from '/@/utils/loading'; |
| | | import { useLoginApi } from '/@/api/login'; |
| | | import { useUserInfo } from '/@/stores/userInfo'; |
| | | import { ElMessage } from 'element-plus' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import {workApplyApi} from "/@/api/specialWorkSystem/workApply"; |
| | | import {verifyPhone,verifyIdCard} from "/@/utils/toolsValidate" |
| | | import { Base64 } from 'js-base64' |
| | | export default defineComponent({ |
| | | name: 'accountLogin', |
| | | setup() { |
| | |
| | | const router = useRouter(); |
| | | const state = reactive({ |
| | | isShowPassword: false, |
| | | saveCode: false, |
| | | ruleForm: { |
| | | username: '', |
| | | password: '' |
| | |
| | | }); |
| | | const identifyRef = ref<FormInstance>() |
| | | const codeRef = ref<FormInstance>() |
| | | |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | hasUserCodeOrPassword() |
| | | // getAllDepartment(); |
| | | }); |
| | | |
| | | const hasUserCodeOrPassword =()=> { |
| | | if (localStorage.getItem('userCode') && localStorage.getItem('userPassword')) { |
| | | state.ruleForm.username = localStorage.getItem('userCode') |
| | | state.ruleForm.password = Base64.decode(localStorage.getItem('userPassword'))//解密 |
| | | state.saveCode = true |
| | | } |
| | | } |
| | | const checkCode = (rule: any, value: any, callback: any) => { |
| | | if (value == '') { |
| | | return callback(new Error('该内容不能为空')) |
| | |
| | | // Session.set('token', res.data.data.accessToken); |
| | | // Session.set('projectId', ''); |
| | | // Session.set('uid', res.data.data.uid); |
| | | if (state.saveCode) { |
| | | localStorage.setItem('userCode', state.ruleForm.username) |
| | | localStorage.setItem('userPassword', Base64.encode(state.ruleForm.password),) |
| | | } else { |
| | | localStorage.removeItem('userCode') |
| | | localStorage.removeItem('userPassword') |
| | | } |
| | | await signInSuccess(); |
| | | } else { |
| | | state.loading.signIn = false; |
| | |
| | | |
| | | const addRef = ref<FormInstance>(); |
| | | const addRules = reactive<FormRules>({ |
| | | groupName: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | department: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | groupMembers: [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | fileType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | fileName: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | link: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | version: [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | }); |
| | | |
| | | // 页面载入时执行方法 |