inleft
2022-08-31 3c71cc74e6dd5f1015329c64e11e8ec1cd7a97c1
新增编辑页 日志列表接口
5 files modified
78 ■■■■ changed files
src/api/blogArticle.js 9 ●●●●● patch | view | raw | blame | history
src/api/blogArticleType.js 2 ●●●●● patch | view | raw | blame | history
src/components/common/MyTextarea.vue 10 ●●●●● patch | view | raw | blame | history
src/components/group/MyModal.vue 2 ●●● patch | view | raw | blame | history
src/components/swichLabel/edit.vue 55 ●●●● patch | view | raw | blame | history
src/api/blogArticle.js
@@ -48,3 +48,12 @@
        params: parameter
    })
}
export function queryBlogArticlePrivateList(parameter) {
    return axios({
        url: '/outside/private/blogArticle/queryBlogArticlePrivateList',
        method: 'get',
        params: parameter
    })
}
src/api/blogArticleType.js
@@ -20,3 +20,5 @@
        params: parameter
    })
}
src/components/common/MyTextarea.vue
@@ -25,16 +25,6 @@
        },
        watch: {
            visitorContent: function(newValue, oldValue) {
                // if (newValue.length > 0) {
                //     if (!this.init) {
                //         this.showTip = true;
                //         setTimeout(() => {
                //             this.showTip = false;
                //         }, 5000);
                //     }
                //     this.init = true;
                //     this.initOwO();
                // }
                this.$emit("update:content", newValue)
            },
        },
src/components/group/MyModal.vue
@@ -63,7 +63,7 @@
                let tempData = this.$refs.modalBox.form;
                var param = {
                    introduce: tempData.introduce,
                    secret: tempData.secret,
                    secret: tempData.secret == "" ? null : md5(tempData.secret),
                    title: tempData.title,
                    articleTypeId: tempData.class,
                    isOnline: !tempData.online ? 1 : 0,
src/components/swichLabel/edit.vue
@@ -20,8 +20,7 @@
                        <div class="edit-article-value">
                            <a-select v-model="typeId" :allowClear="true" mode="default" placeholder="日志分类"
                                :getPopupContainer="getCalendarContainer()" style="width: 100%;">
                                <a-select-option v-for="(item,index) in this.blogArticleType" :key="index"
                                    :value="item.id">
                                <a-select-option v-for="(item,index) in blogArticleType" :key="index" :value="item.id">
                                    {{ item.typeName }}
                                </a-select-option>
                            </a-select>
@@ -255,30 +254,23 @@
                <div class="edit-tool blog-container">
                    <div class="edit-tool-item" style="gap: 0px;">
                        <div style="display: flex;width: 350px;">
                        <div style="display: flex;width: 290px;">
                            <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 5px;">
                                <span>日志选取:</span>
                            </div>
                            <a-select v-model="articleTypeId" mode="default" placeholder=""
                                :getPopupContainer="getCalendarContainer()" style="width: 100%;">
                                <a-select-option value="1">
                                    十里平湖霜满天
                                </a-select-option>
                                <a-select-option value="2">
                                    寸寸青丝愁华年
                                </a-select-option>
                                <a-select-option value="3">
                                    对月形单望相护
                                </a-select-option>
                                <a-select-option value="4">
                                    只羡鸳鸯不羡仙
                                </a-select-option>
                                <a-select-option value="5">
                                    江水春沉沉
                                </a-select-option>
                                <a-select-option value="9">
                                    上有双竹林
                                </a-select-option>
                            <a-select v-model="articleTypeId" placeholder="键入搜索.." :showSearch="true"
                                :getPopupContainer="getCalendarContainer()">
                                <!--     <a-select-option v-for="(item,index) in blogArticleTitleList" :key="index"
                                    :value="item.id">
                                    {{ item.title }}
                                </a-select-option> -->
                                <template #dropdownRender="{ menuNode: menu }">
                                    {{menu}}
                                    <a-divider style="margin: 4px 0" />
                                    <div style="padding: 4px 8px; cursor: pointer" @mousedown="e => e.preventDefault()">
                                        <a-icon type="down"></a-icon> 更多
                                    </div>
                                </template>
                            </a-select>
                            <a-button style="margin-left: 10px;">
                                <a-icon type="reload"></a-icon>
@@ -292,12 +284,12 @@
                            <span class="myTip">(触发前提示手动保存)</span>
                        </div>
                        <div style="display: flex;width: 350px;">
                        <div style="display: flex;">
                            <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 5px">
                                <span>草稿列表:</span>
                            </div>
                            <a-select v-model="articleTypeId" mode="default" placeholder=""
                                :getPopupContainer="getCalendarContainer()" style="width: 100%;">
                            <a-select mode="default" placeholder="" :getPopupContainer="getCalendarContainer()"
                                style="width: 100%;">
                                <a-select-option value="1">
                                    十里平湖霜满天
                                </a-select-option>
@@ -396,6 +388,10 @@
        queryBlogArticleType
    } from '../../api/blogArticleType.js'
    import {
        queryBlogArticlePrivateList
    } from '../../api/blogArticle.js'
    import MyOwO from '../common/MyOwO.vue'
    import VueMarkdown from 'vue-markdown'
@@ -414,6 +410,12 @@
            queryBlogArticleType({}).then((res) => {
                this.blogArticleType = res.data;
            })
            queryBlogArticlePrivateList({
                pageSize: 10
            }).then((res) => {
                this.blogArticleTitleList = res.data.records;
            })
        },
        data() {
            return {
@@ -421,6 +423,7 @@
                articleTypeId: "",
                typeId: "",
                blogArticleType: [],
                blogArticleTitleList: [],
            }
        },
        methods: {