hejianhao
2025-01-08 823b158616aac1e77eab10797e5b03807ab31e6c
选择已添加信息,退出登录,订单须知
3个文件已修改
3个文件已添加
274 ■■■■■ 已修改文件
src/component/AddedInformation.vue 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/component/Header.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/component/LogOut.vue 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/component/Notice.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/Home.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/component/AddedInformation.vue
New file
@@ -0,0 +1,93 @@
<template>
    <div>
        <el-dialog :visible.sync="show" :show-close="false" width="1541px" @close="$emit('close')"
            :modal-append-to-body="false">
            <div class="txt-center pt--31">
                <div class="fs--18 mb--34 font-bold">请选择</div>
                <div class="mx--31">
                    <el-table :data="tableData" style="width: 100%" border
                        header-cell-style="background:#F6F6F7;font-size:16px;color: #3B3F56;">
                        <el-table-column label="选择" align="center">
                            <template slot-scope="{ row }">
                            </template>
                        </el-table-column>
                        <el-table-column prop="name" label="姓名" align="center">
                        </el-table-column>
                        <el-table-column prop="address" label="手机号" align="center">
                        </el-table-column>
                        <el-table-column prop="address" label="邮箱" align="center">
                        </el-table-column>
                        <el-table-column prop="address" label="地址" align="center">
                        </el-table-column>
                        <el-table-column prop="address" label="备注" align="center">
                        </el-table-column>
                    </el-table>
                </div>
                <div class="btns">
                    <el-button @click="$emit('close')">关闭</el-button>
                    <el-button @click="submit" type="primary">确认</el-button>
                </div>
            </div>
        </el-dialog>
    </div>
</template>
<script>
export default {
    components: {},
    props: {
        show: {
            type: Boolean,
            default: false
        }
    },
    data() {
        return {
            tableData: [{}]
        };
    },
    computed: {},
    watch: {},
    created() { },
    mounted() { },
    methods: {
        submit() {
            this.$emit('submit', {})
        }
    },
};
</script>
<style scoped lang="less">
.btns {
    display: flex;
    justify-content: center;
    margin-top: 39px;
    padding-bottom: 31px;
    .el-button {
        width: 190px;
        height: 50px;
        font-size: 20px;
    }
    .el-button--primary {
        background-color: #014099;
        border-color: #014099;
    }
}
::v-deep .el-dialog {
    border-radius: 8px;
    .el-dialog__header {
        display: none !important;
    }
    .el-dialog__body {
        padding: 0 !important;
    }
}
</style>
src/component/Header.vue
@@ -1,4 +1,5 @@
<template>
    <div>
    <div class="header_content">
        <div class="color1 fs--24 font-bold">{{ userInfo.companyName }}</div>
        <div class="flex a-center j-between">
@@ -8,17 +9,19 @@
            </div>
            <img @click="logOutShow = true" src="../assets/img/tuichu@2x.png" class="w--40 h--40 shrink0 pointer" />
        </div>
        <el-dialog v-if="logOutShow" :visible.sync="logOutShow" :show-close="false" width="518px"
            top="51px"></el-dialog>
        </div>
        <LogOutComponent v-if="logOutShow" :show="logOutShow" @close="logOutShow = false" />
        <UserInfoComponent v-if="userInfoShow" v-model:show="userInfoShow" />
    </div>
</template>
<script>
import UserInfoComponent from '@/component/userInfo.vue'
import LogOutComponent from '@/component/LogOut.vue'
export default {
    components: {
        UserInfoComponent
        UserInfoComponent,
        LogOutComponent
    },
    props: {},
    data() {
@@ -52,18 +55,5 @@
.color2 {
    color: #EDEDF3;
}
::v-deep .el-dialog {
    border-radius: 8px;
    .el-dialog__header {
        display: none !important;
    }
    .el-dialog__body {
        padding: 0 !important;
    }
}
</style>
src/component/LogOut.vue
New file
@@ -0,0 +1,77 @@
<template>
    <div>
        <el-dialog :visible.sync="show" :show-close="false" width="518px" @close="$emit('close')"
            :modal-append-to-body="false">
            <div class="txt-center pt--32">
                <div class="fs--21 font-bold">退出登录</div>
                <div class="fs--16 mt--77 color">确认退出当前登录帐号吗?</div>
                <div class="btns">
                    <el-button @click="$emit('close')">关闭</el-button>
                    <el-button @click="submit" type="primary">确认</el-button>
                </div>
            </div>
        </el-dialog>
    </div>
</template>
<script>
export default {
    components: {},
    props: {
        show: {
            type: Boolean,
            default: false
        }
    },
    data() {
        return {};
    },
    computed: {},
    watch: {},
    created() { },
    mounted() { },
    methods: {
        submit() {
            localStorage.clear();
            window.location.replace('/');
        }
    },
};
</script>
<style scoped lang="less">
.color {
    color: rgba(59, 63, 86, .83);
}
.btns {
    display: flex;
    justify-content: center;
    margin-top: 108px;
    padding-bottom: 29px;
    .el-button {
        width: 190px;
        height: 50px;
        font-size: 20px;
    }
    .el-button--primary {
        background-color: #014099;
        border-color: #014099;
    }
}
::v-deep .el-dialog {
    border-radius: 8px;
    .el-dialog__header {
        display: none !important;
    }
    .el-dialog__body {
        padding: 0 !important;
    }
}
</style>
src/component/Notice.vue
New file
@@ -0,0 +1,63 @@
<template>
    <el-dialog :visible.sync="show" :show-close="false" width="1018px" @close="$emit('close')"
        :modal-append-to-body="false">
        <div class="txt-center pt--30 pb--25">
            <div class="fs--18 mb--70 font-bold color1">下单须知</div>
            <div v-html="content"></div>
            <div class="btns pointer" @click="$emit('close')">确认</div>
        </div>
    </el-dialog>
</template>
<script>
export default {
    components: {},
    props: {
        show: {
            type: Boolean,
            default: false
        },
        content: {
            type: String,
            default: ''
        }
    },
    data() {
        return {};
    },
    computed: {},
    watch: {},
    created() { },
    mounted() { },
    methods: {},
};
</script>
<style scoped lang="less">
.color1 {
    color: rgba(59, 63, 86, 1);
}
::v-deep .el-dialog {
    border-radius: 8px;
    .el-dialog__header {
        display: none !important;
    }
    .el-dialog__body {
        padding: 0 !important;
    }
}
.btns {
    margin: 25px auto 0;
    width: 311px;
    line-height: 50px;
    background: #014099;
    border-radius: 4px;
    font-weight: bold;
    font-size: 18px;
    color: #FFFFFF;
}
</style>
src/utils/request.js
@@ -21,6 +21,9 @@
    if (env === 'production') {
      url = url.replace(/.$/, '0');
      config.url = url;
    } else {
      url = url.replace(/.$/, '1');
      config.url = url;
    }
    const nowTime = Date.now()
@@ -66,7 +69,7 @@
          type: 'warning',
          duration: 2000
        })
        window.location.replace('/login');
        window.location.replace('/');
        return Promise.reject(res.data)
      }
      Message({
src/view/Home.vue
@@ -1,14 +1,15 @@
<template>
    <div>
        <Header @edit="showUserInfo = true" />
        <UserInfo :show="showUserInfo" @close="showUserInfo = false" />
        <Header style="position: sticky;top: 0;z-index: 1999;" @edit="showUserInfo = true" />
        <NoticeComponent v-if="noticeShow" :show="noticeShow" @close="noticeShow = false" />
        <AddedInformation v-if="true" :show="true" />
        <div class="search-box">
            <div class="title-card">
                <div class="title-left">
                    订单列表
                </div>
                <div class="title-right">
                    <span class="order-agress">下单须知</span>
                    <span @click="noticeShow = true" class="order-agress">下单须知</span>
                    <div class="line"></div>
                    <span class="add-ord">添加订单</span>
                </div>
@@ -95,13 +96,18 @@
<script>
import Header from '@/component/Header.vue'
import NoticeComponent from '@/component/Notice.vue'
import AddedInformation from '@/component/AddedInformation.vue'
export default {
    name: "Home",
    components: {
        Header
        Header,
        NoticeComponent,
        AddedInformation
    },
    data() {
        return {
            noticeShow: false,
            showUserInfo: false,
            searchForm: {