This commit is contained in:
zhanglipeng 2020-12-17 15:28:13 +08:00
parent 0d4bec117f
commit ebe4d92d1f
4 changed files with 59 additions and 40 deletions

View File

@ -10,7 +10,7 @@
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" /> <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
<div class="right-menu"> <div class="right-menu">
<template v-if="device!=='mobile'"> <template v-if="device !== 'mobile'">
<search id="header-search" class="right-menu-item" /> <search id="header-search" class="right-menu-item" />
<el-tooltip content="系统使用文档" effect="dark" placement="bottom"> <el-tooltip content="系统使用文档" effect="dark" placement="bottom">
@ -24,7 +24,10 @@
</el-tooltip> </el-tooltip>
</template> </template>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown
class="avatar-container right-menu-item hover-effect"
trigger="click"
>
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img :src="avatar" class="user-avatar" /> <img :src="avatar" class="user-avatar" />
<i class="el-icon-caret-bottom" /> <i class="el-icon-caret-bottom" />
@ -55,7 +58,7 @@ import Hamburger from "@/components/Hamburger";
import Screenfull from "@/components/Screenfull"; import Screenfull from "@/components/Screenfull";
import SizeSelect from "@/components/SizeSelect"; import SizeSelect from "@/components/SizeSelect";
import Search from "@/components/HeaderSearch"; import Search from "@/components/HeaderSearch";
import RuoYiDoc from '@/components/BenYi/Doc' import RuoYiDoc from "@/components/BenYi/Doc";
import { getDeptsInfo } from "@/api/system/dept"; import { getDeptsInfo } from "@/api/system/dept";
export default { export default {
@ -65,7 +68,7 @@ export default {
Screenfull, Screenfull,
SizeSelect, SizeSelect,
Search, Search,
RuoYiDoc RuoYiDoc,
}, },
computed: { computed: {
...mapGetters(["sidebar", "avatar", "device"]), ...mapGetters(["sidebar", "avatar", "device"]),
@ -76,14 +79,14 @@ export default {
set(val) { set(val) {
this.$store.dispatch("settings/changeSetting", { this.$store.dispatch("settings/changeSetting", {
key: "showSettings", key: "showSettings",
value: val value: val,
}); });
} },
} },
}, },
data() { data() {
return { return {
isMoreSchool: undefined isMoreSchool: undefined,
}; };
}, },
created() { created() {
@ -91,7 +94,7 @@ export default {
}, },
methods: { methods: {
getDepts() { getDepts() {
getDeptsInfo().then(response => { getDeptsInfo().then((response) => {
// console.log("school=" + response.total); // console.log("school=" + response.total);
// console.log( response); // console.log( response);
if (response.total <= 1) { if (response.total <= 1) {
@ -106,19 +109,27 @@ export default {
}, },
async logout() { async logout() {
this.$confirm("确定注销并退出系统吗?", "提示", { this.$confirm("确定注销并退出系统吗?", "提示", {
cancelButtonClass: "btn-custom-cancel",
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}).then(() => { }).then(() => {
this.$store.dispatch("LogOut").then(() => { this.$store.dispatch("LogOut").then(() => {
location.reload(); location.reload();
}); });
}); });
} },
} },
}; };
</script> </script>
<style lang="scss">
.btn-custom-cancel {
float: right;
margin-left: 20px;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.navbar { .navbar {
height: 50px; height: 50px;

View File

@ -27,26 +27,34 @@
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="box-card-title">{{title}}</span> <span class="box-card-title">{{ title }}</span>
</div> </div>
<div class="text item" v-show="title1"> <div class="text item" v-show="title1">
<h3 class="box-card-title">{{title1}}</h3> <h3 class="box-card-title">{{ title1 }}</h3>
<div class="pad-left" v-html="note"></div> <div class="pad-left" v-html="note"></div>
</div> </div>
<div class="text item" v-show="title2"> <div class="text item" v-show="title2">
<h3 class="box-card-title">{{title2}}</h3> <h3 class="box-card-title">
<div class="pad-left"> {{ title2 }}
<Editor v-model="communicate" /> </h3>
<div ref="printMe">
<Editor v-model="communicate" />
</div> </div>
</div> </div>
<div class="text item" v-show="title3"> <div class="text item" v-show="title3">
<h3 class="box-card-title">{{title3}}</h3> <h3 class="box-card-title">{{ title3 }}</h3>
<div class="pad-left"> <div class="pad-left">
<div v-for="(item, index) in activityList" :key="index" class="text item"> <div
<h3 class="box-card-case mr">活动{{item.sort}} - {{item.name}}</h3> v-for="(item, index) in activityList"
<h3 class="box-card-info">活动形式{{fieldFormat(item)}}</h3> :key="index"
<h3 class="box-card-info">重点领域{{typeFormat(item)}}</h3> class="text item"
>
<h3 class="box-card-case mr">
活动{{ item.sort }} - {{ item.name }}
</h3>
<h3 class="box-card-info">活动形式{{ fieldFormat(item) }}</h3>
<h3 class="box-card-info">重点领域{{ typeFormat(item) }}</h3>
<h3 class="box-card-info">活动目标</h3> <h3 class="box-card-info">活动目标</h3>
<div class="text item pad-left" v-html="item.target"></div> <div class="text item pad-left" v-html="item.target"></div>
<h3 class="box-card-info">活动材料</h3> <h3 class="box-card-info">活动材料</h3>
@ -76,7 +84,7 @@ import Editor from "@/components/Editor";
export default { export default {
name: "Detail", name: "Detail",
components: { components: {
Editor Editor,
}, },
data() { data() {
return { return {
@ -107,26 +115,26 @@ export default {
// //
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label" label: "label",
}, },
// //
queryParams: { queryParams: {
themeid: undefined themeid: undefined,
} },
}; };
}, },
watch: { watch: {
// //
name(val) { name(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
} },
}, },
created() { created() {
this.getTreeselect(); this.getTreeselect();
this.getDicts("sys_theme_type").then(response => { this.getDicts("sys_theme_type").then((response) => {
this.typeOptions = response.data; this.typeOptions = response.data;
}); });
this.getDicts("sys_theme_field").then(response => { this.getDicts("sys_theme_field").then((response) => {
this.fieldOptions = response.data; this.fieldOptions = response.data;
}); });
}, },
@ -161,7 +169,7 @@ export default {
}, },
/** 查询部门下拉树结构 */ /** 查询部门下拉树结构 */
getTreeselect() { getTreeselect() {
treeselect().then(response => { treeselect().then((response) => {
this.treeOptions = response.data; this.treeOptions = response.data;
}); });
}, },
@ -183,7 +191,7 @@ export default {
// this.getStandardList(); // this.getStandardList();
}, },
getThemeDetails() { getThemeDetails() {
getTheme(this.id).then(response => { getTheme(this.id).then((response) => {
console.log(response); console.log(response);
if (response.code == "200") { if (response.code == "200") {
this.title1 = "主题网络"; this.title1 = "主题网络";
@ -193,7 +201,7 @@ export default {
this.communicate = response.data.communicate; this.communicate = response.data.communicate;
this.queryParams.themeid = response.data.id; this.queryParams.themeid = response.data.id;
listActivity(this.queryParams).then(req => { listActivity(this.queryParams).then((req) => {
console.log(req); console.log(req);
if (req.code == "200") { if (req.code == "200") {
this.activityList = req.rows; this.activityList = req.rows;
@ -201,8 +209,8 @@ export default {
}); });
} }
}); });
} },
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -417,7 +417,7 @@ export default {
this.imageUrl = ""; this.imageUrl = "";
}, },
handleSuccessVideo(response) { handleSuccessVideo(response) {
console.log("上传完成", response); // console.log("", response);
this.imgFlag = false; this.imgFlag = false;
this.percent = 0; this.percent = 0;
if (response.hash) { if (response.hash) {
@ -429,14 +429,14 @@ export default {
handleError(err, file, fileList) { handleError(err, file, fileList) {
// //
const error = JSON.parse(JSON.stringify(err)); const error = JSON.parse(JSON.stringify(err));
console.log(err); // console.log(err);
console.log(error); // console.log(error);
this.msgError(error.status.toString()); this.msgError(error.status.toString());
this.imgFlag = false; this.imgFlag = false;
this.percent = 0; this.percent = 0;
}, },
videoBeforeUpload(file) { videoBeforeUpload(file) {
console.log(file); // console.log(file);
const _self = this; const _self = this;
const isVideo = const isVideo =
file.type === "video/mp4" || file.type === "video/mp4" ||
@ -460,7 +460,7 @@ export default {
// //
uploadProcess(event, file, fileList) { uploadProcess(event, file, fileList) {
this.imgFlag = true; this.imgFlag = true;
console.log(event.percent); // console.log(event.percent);
this.percent = Math.floor(event.percent); this.percent = Math.floor(event.percent);
}, },
/** 查询培训列表 */ /** 查询培训列表 */

View File

@ -66,7 +66,7 @@ export default {
// console.log( response); // console.log( response);
if (response.total <= 1) { if (response.total <= 1) {
} else { } else {
console.log(response); // console.log(response);
this.deptsOptions = response.rows; this.deptsOptions = response.rows;
} }
}); });