chenrui
3 天以前 cd8bb25c6b07c81d0740714e45c3ce77bf724054
src/views/login.vue
@@ -77,7 +77,7 @@
import Cookies from "js-cookie"
import { encrypt, decrypt } from "@/utils/jsencrypt"
import useUserStore from '@/store/modules/user'
import {userDeptList} from "@/api/system/user.js"
import {userLoginFacotryList} from "@/api/system/user.js"
const title = import.meta.env.VITE_APP_TITLE
const userStore = useUserStore()
@@ -169,21 +169,20 @@
  }
}
function deptListSearch() {
function getUserLoginFacotryList() {
  if(loginForm.value.username){
    userDeptList({userName:loginForm.value.username}).then(res => {
    userLoginFacotryList({userName:loginForm.value.username}).then(res => {
      console.log('res', res)
      factoryList.value = res.data
    })
  }else {
    factoryList.value = []
  }
}
getCode()
getCookie()
deptListSearch()
getUserLoginFacotryList()
</script>
<style lang='scss' scoped>