|
|
@@ -51,6 +51,7 @@
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button type="success" icon="el-icon-picture-outline" size="mini" @click="handleSidebarChange">侧边栏封面设置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -118,6 +119,13 @@
|
|
|
:title="show.title" :visible.sync="show.open" append-to-body>
|
|
|
<userCourseCatalogDetails ref="userCourseCatalogDetails" />
|
|
|
</el-drawer>
|
|
|
+
|
|
|
+ <el-dialog title="侧边栏封面图" :visible.sync="sidebarFrom.open" width="500px" append-to-body>
|
|
|
+ <image-upload v-model="sidebarFrom.imageUrl" :limit="1"/>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="handSaveSidebarCompanyImage">提交</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -129,7 +137,7 @@ import Editor from '@/components/Editor/wang';
|
|
|
import ImageUpload from '@/components/ImageUpload/index';
|
|
|
import userCourseCatalogDetails from '../../components/course/userCourseCatalogDetails.vue';
|
|
|
import { getAllCourseCategoryList,getCatePidList ,getCateListByPid} from "@/api/course/userCourseCategory";
|
|
|
-import {allList} from "@/api/company/company";
|
|
|
+import {allList, getSidebarCompanyImage, saveSidebarCompanyImage} from "@/api/company/company";
|
|
|
|
|
|
export default {
|
|
|
name: "UserCourse",
|
|
|
@@ -148,6 +156,10 @@ export default {
|
|
|
title:"目录管理",
|
|
|
open:false
|
|
|
},
|
|
|
+ sidebarFrom:{
|
|
|
+ open: false,
|
|
|
+ imageUrl: null
|
|
|
+ },
|
|
|
activeName:"1",
|
|
|
projectOptions:[],
|
|
|
tagsOptions:[],
|
|
|
@@ -550,6 +562,20 @@ export default {
|
|
|
this.getList();
|
|
|
this.msgSuccess("下架成功");
|
|
|
}).catch(function() {});
|
|
|
+ },
|
|
|
+ handleSidebarChange() {
|
|
|
+ getSidebarCompanyImage().then(res => {
|
|
|
+ this.sidebarFrom.imageUrl = res.imageUrl
|
|
|
+ this.sidebarFrom.open = true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handSaveSidebarCompanyImage() {
|
|
|
+ saveSidebarCompanyImage({
|
|
|
+ imageUrl: this.sidebarFrom.imageUrl
|
|
|
+ }).then(() => {
|
|
|
+ this.sidebarFrom.open = false
|
|
|
+ this.$message.success('保存成功')
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|