#
Junjie
2024-07-03 acebf48e2e139f6f298cfbba829cc3c29db3c891
zy-asrs-admin/src/views/login/LoginView.vue
@@ -8,6 +8,8 @@
let copyrightLargeShow = ref(false);
let username = ref("");
let password = ref("");
let hostId = ref(null);
let hostList = ref([]);
function loginConfirm() {
    if (username.value == "" || password.value == "") {
@@ -17,7 +19,8 @@
    post('/api/login', {
        username: username.value,
        password: password.value
        password: password.value,
        hostId: hostId.value,
    }).then((result) => {
        if (result.data.code == 200) {
            let data = result.data.data;
@@ -31,6 +34,25 @@
        }
    })
}
getHostList()
function getHostList() {
    get('/api/auth/host', {}).then((result) => {
        if (result.data.code == 200) {
            let data = result.data.data;
            let tmp = []
            data.forEach((item) => {
                tmp.push({
                    label: item.name,
                    value: item.id
                })
            })
            hostList.value = tmp;
        } else {
            message.error(result.data.msg)
        }
    })
}
</script>
@@ -59,6 +81,11 @@
                    </p>
                    <p style="margin-top: -10px;"><span class="login100-form-title p-t-20 p-b-45"
                            style="color: #868686;font-size: 24px">WMS</span></p>
                    <div class="inputContainer">
                        <a-select v-model:value="hostId" style="width: 100%;" :options="hostList"></a-select>
                    </div>
                    <div class="inputContainer">
                        <svg viewBox="0 0 16 16" fill="#2e2e2e" height="16" width="16"
                            xmlns="http://www.w3.org/2000/svg" class="inputIcon">