From 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期三, 16 七月 2025 22:39:23 +0800
Subject: [PATCH] 添加时间筛选

---
 src/views/systemSetting/platform/portalSetting/index.vue |  254 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 251 insertions(+), 3 deletions(-)

diff --git a/src/views/systemSetting/platform/portalSetting/index.vue b/src/views/systemSetting/platform/portalSetting/index.vue
index 8b407a0..e30f0f1 100644
--- a/src/views/systemSetting/platform/portalSetting/index.vue
+++ b/src/views/systemSetting/platform/portalSetting/index.vue
@@ -1,5 +1,253 @@
 <template>
-    <div>
-        
+    <div class="log">
+        <header>
+            <!-- <div class="headerTitle">
+                绯荤粺璁剧疆 >> 闂ㄦ埛绠$悊 > logo绠$悊
+            </div> -->
+        </header>
+        <main>
+            <div class="mainTitle">LOGO</div>
+            <ul class="mainContent">
+                <li>
+                    <div class="desc">浜у搧鍥炬爣锛氫富瑕佺敤浜庣綉椤靛ご閮�</div>
+                    <div class="upload">
+                        <MyUpload @getPicUrl="setPicUrl" mykey="chromeLinkUrl" :picUrl="icon.chromeLinkUrl"></MyUpload>
+                        <div class="uploadTip"><span>鍙厑璁镐笂浼爅pg,jpeg,png,svg鏍煎紡鐨勫浘鐗囷紝寤鸿灏哄涓�105px*105px</span></div>
+                    </div>
+                </li>
+                <li>
+                    <div class="desc">缃戠珯鍥炬爣锛氫富瑕佺敤浜庢祻瑙堝櫒鏍囩椤�</div>
+                    <div class="upload">
+                        <MyUpload @getPicUrl="setPicUrl" mykey="websiteHeadUrl" :picUrl="icon.websiteHeadUrl">
+                        </MyUpload>
+                        <div class="uploadTip"><span>鍙厑璁镐笂浼爅pg,jpeg,png,svg鏍煎紡鐨勫浘鐗囷紝寤鸿灏哄涓�105px*105px</span></div>
+                    </div>
+                </li>
+                <li>
+                    <div class="desc">鐧诲綍椤靛浘鏍囷細涓昏鐢ㄤ簬鐧诲綍椤�</div>
+                    <div class="upload">
+                        <MyUpload @getPicUrl="setPicUrl" mykey="loginPageIconUrl" :picUrl="icon.loginPageIconUrl">
+                        </MyUpload>
+                        <div class="uploadTip"><span>鍙厑璁镐笂浼爅pg,jpeg,png,svg鏍煎紡鐨勫浘鐗囷紝寤鸿灏哄涓�105px*105px</span></div>
+                    </div>
+                </li>
+            </ul>
+        </main>
+        <footer>
+            <div class="webTitle">
+                <div class="text">缃戠珯鏍囬:</div>
+                <div class="inner">
+                    <el-input type="text" placeholder="閬傛槍鎵ф硶灞�" v-model="icon.title"></el-input>
+                </div>
+            </div>
+            <div class="footerBtn">
+                <el-button class="cancel">杩斿洖</el-button>
+                <el-button type="primary" @click="changeLogo">鎻愪氦</el-button>
+            </div>
+        </footer>
     </div>
-</template>
\ No newline at end of file
+</template>
+<script>
+import MyUpload from '@/components/Upload'
+export default {
+    components: {
+        MyUpload,
+    },
+    data() {
+        return {
+            icon: {
+                loginPageIconUrl: '',
+                websiteHeadUrl: '',
+                chromeLinkUrl: '',
+                title: '',
+            },
+        }
+
+    },
+    methods: {
+        setPicUrl({ obj, value }) {
+            const { icon } = this;
+            const baseUrl = '';
+            for (let key in icon) {
+                if (key === value) {
+                    icon[key] = baseUrl + obj.url1;
+                }
+            }
+            this.icon = icon;
+        },
+        // 鏇存敼logo鍏ュ彛
+        async changeLogo() {
+            const { icon } = this;
+            console.log(icon);
+            const preIcon = await this.getIcon();
+            if (preIcon.length === 0) {
+                this.handleChangeLogo();
+                return;
+            }
+            for (let key in icon) {
+                if (icon[key] !== '') {
+                    preIcon[key] = icon[key];
+                }
+            }
+            this.handleChangeLogo(preIcon);
+        },
+        // 鑾峰彇鏇存敼鍓嶇殑logo
+        async getIcon() {
+            let result;
+            await this.$axios({
+                method: 'get',
+                url: 'sccg/system/portal/logo/search',
+            }).then(res => {
+                result = res.data;
+            })
+            return result;
+        },
+        // 鎵ц鏇存敼logo鎿嶄綔
+        handleChangeLogo(obj = null) {
+            if (obj === null) {
+                const { icon } = this;
+                for (let key in icon) {
+                    if (icon[key] === '') {
+                        delete icon[key];
+                    }
+                }
+                let length = Object.keys(icon).length;
+                if (length !== 0) {
+                    // 鍙戦�佽姹�
+                    this.$axios({
+                        method: 'post',
+                        url: 'sccg/system/portal/logo/add',
+                        data: icon
+                    }).then(res => {
+                        if (res.code === 200) {
+                            this.$axios({
+                                method: 'get',
+                                url: 'sccg/system/portal/logo/search',
+                            }).then(res => {
+                                this.$message({
+                                    message: res.message,
+                                    type: 'success'
+                                })
+                                sessionStorage.setItem('pic', JSON.stringify(result));
+                            })
+                        }
+                    })
+                }
+            } else {
+                // 鍙戦�佽姹�
+                this.$axios({
+                    method: 'put',
+                    url: 'sccg/system/portal/logo/update',
+                    data: obj
+                }).then(res => {
+                    this.$message({
+                        message: res.message,
+                        type: 'success'
+                    })
+                })
+            }
+            window.location.href = '';
+
+        }
+    },
+}
+</script>
+<style lang="scss" scoped>
+.log {
+    // color: #4b9bb7;
+    text-align: left;
+    padding: 20px;
+
+    li {
+        list-style: none;
+    }
+
+    header {
+        line-height: 60px;
+        // border-bottom: 1px solid #4b9bb7;
+    }
+
+    main {
+        padding: 0 20px;
+
+        .mainTitle {
+            margin-top: 20px;
+            font-size: 20px;
+            font-weight: 650;
+            line-height: 60px;
+        }
+
+        .mainContent {
+            padding: 0;
+
+            li {
+                margin-top: 30px;
+
+                .desc {
+                    line-height: 22px;
+                }
+
+                .upload {
+                    display: flex;
+                    line-height: 100px;
+                    margin-top: 15px;
+
+                    .uploadTip {
+                        display: flex;
+                        align-items: flex-end;
+                        margin-left: 20px;
+                        font-size: 14px;
+
+                        span {
+                            line-height: 22px;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    footer {
+        padding: 0 20px;
+
+        .webTitle {
+            display: flex;
+            line-height: 40px;
+            margin: 30px 0;
+
+            .text {
+                flex: 1;
+            }
+
+            .inner {
+                flex: 13;
+
+                .el-input {
+                    width: 496px;
+                }
+
+                // &::v-deep .el-input__inner {
+                //     background-color: #09152f;
+                //     border: 1px solid #17324c;
+                //     ;
+                // }
+            }
+        }
+
+        .footerBtn {
+            display: flex;
+            justify-content: center;
+
+            &::v-deep .el-button {
+                padding: 12px 40px;
+                font-weight: 600;
+            }
+
+            .cancel {
+                border: 2px solid #0079fe;
+                color: #0079fe;
+            }
+        }
+    }
+}
+</style>
\ No newline at end of file

--
Gitblit v1.8.0