后台工作动态摘要添加

This commit is contained in:
kongjun 2022-06-20 19:34:41 +08:00
parent 6edf4d50f9
commit 52ddacef56
12 changed files with 790 additions and 393 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -5,6 +5,13 @@ import { isURL } from '@/utils/validate'
import store from '@/store' import store from '@/store'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
Vue.use(Router) Vue.use(Router)
// 页面路由(独立页面) // 页面路由(独立页面)

View File

@ -12,7 +12,7 @@ export default new Vuex.Store({
// 导航条, 布局风格, default(白色) / colorful(鲜艳) // 导航条, 布局风格, default(白色) / colorful(鲜艳)
navbarLayoutType: 'colorful', navbarLayoutType: 'colorful',
// 侧边栏, 布局皮肤, default(白色) / dark(黑色) // 侧边栏, 布局皮肤, default(白色) / dark(黑色)
sidebarLayoutSkin: 'dark', sidebarLayoutSkin: 'default',
// 侧边栏, 折叠状态 // 侧边栏, 折叠状态
sidebarFold: false, sidebarFold: false,
// 侧边栏, 菜单 // 侧边栏, 菜单

View File

@ -1,81 +1,124 @@
<template> <template>
<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`"> <nav
class="aui-navbar"
:class="`aui-navbar--${$store.state.navbarLayoutType}`"
>
<div class="aui-navbar__header"> <div class="aui-navbar__header">
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })"> <h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t('brand.lg') }}</a> <a class="aui-navbar__brand-mini" href="javascript:;">{{
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a> $t("brand.mini")
}}</a>
<a class="aui-navbar__brand-lg" href="javascript:;">{{
$t("brand.lg")
}}</a>
<span></span>
<span class="back-title-text">后台管理系统</span>
</h1> </h1>
</div> </div>
<div class="aui-navbar__body"> <div class="aui-navbar__body">
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal"> <el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold"> <!-- <el-menu-item
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true"><use xlink:href="#icon-outdent"></use></svg> index="1"
@click="$store.state.sidebarFold = !$store.state.sidebarFold"
>
<svg
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
aria-hidden="true"
>
<use xlink:href="#icon-outdent"></use>
</svg>
</el-menu-item> </el-menu-item>
<el-menu-item index="2" @click="refresh()"> <el-menu-item index="2" @click="refresh()">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true"><use xlink:href="#icon-sync"></use></svg> <svg
</el-menu-item> class="
icon-svg
aui-navbar__icon-menu aui-navbar__icon-menu--refresh
"
aria-hidden="true"
>
<use xlink:href="#icon-sync"></use>
</svg>
</el-menu-item> -->
</el-menu> </el-menu>
<el-menu class="aui-navbar__menu" mode="horizontal"> <el-menu class="aui-navbar__menu" mode="horizontal">
<el-menu-item index="1"> <el-menu-item index="1">
<el-dropdown placement="bottom" :show-timeout="0"> <el-dropdown placement="bottom" :show-timeout="0">
<el-button size="mini">{{ $t('_lang') }}</el-button> <el-button size="mini">{{ $t("_lang") }}</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(val, key) in i18nMessages" :key="key" @click.native="$i18n.locale = key">{{ val._lang }}</el-dropdown-item> <el-dropdown-item
v-for="(val, key) in i18nMessages"
:key="key"
@click.native="$i18n.locale = key"
>{{ val._lang }}</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-menu-item> </el-menu-item>
<el-menu-item index="2"> <el-menu-item index="2">
<a href="//115.28.200.119:9091" target="_blank"> <a href="//115.28.200.119:9091" target="_blank">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-earth"></use></svg> <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-earth"></use>
</svg>
</a> </a>
</el-menu-item> </el-menu-item>
<el-menu-item index="3" v-if="$hasPermission('sys:notice:all')"> <el-menu-item index="3" v-if="$hasPermission('sys:notice:all')">
<el-badge :is-dot="messageTip"> <el-badge :is-dot="messageTip">
<a href="#" @click="myNoticeRouter()"><i class="el-icon-bell"></i></a> <a href="#" @click="myNoticeRouter()"
><i class="el-icon-bell"></i
></a>
</el-badge> </el-badge>
</el-menu-item> </el-menu-item>
<el-menu-item index="4" @click="fullscreenHandle()"> <el-menu-item index="4" @click="fullscreenHandle()">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-fullscreen"></use></svg> <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-fullscreen"></use>
</svg>
</el-menu-item> </el-menu-item>
<el-menu-item index="5" class="aui-navbar__avatar"> <el-menu-item index="5" class="aui-navbar__avatar">
<el-dropdown placement="bottom" :show-timeout="0"> <el-dropdown placement="bottom" :show-timeout="0">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<img src="~@/assets/img/avatar.png"> <img src="~@/assets/img/avatar.png" />
<span>{{ $store.state.user.name }}</span> <span>{{ $store.state.user.name }}</span>
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item> <el-dropdown-item @click.native="updatePasswordHandle()">{{
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item> $t("updatePassword.title")
}}</el-dropdown-item>
<el-dropdown-item @click.native="logoutHandle()">{{
$t("logout")
}}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-menu-item> </el-menu-item>
</el-menu> </el-menu>
</div> </div>
<!-- 弹窗, 修改密码 --> <!-- 弹窗, 修改密码 -->
<update-password v-if="updatePasswordVisible" ref="updatePassword"></update-password> <update-password
v-if="updatePasswordVisible"
ref="updatePassword"
></update-password>
</nav> </nav>
</template> </template>
<script> <script>
import { messages } from '@/i18n' import { messages } from "@/i18n";
import screenfull from 'screenfull' import screenfull from "screenfull";
import UpdatePassword from './main-navbar-update-password' import UpdatePassword from "./main-navbar-update-password";
import { clearLoginInfo } from '@/utils' import { clearLoginInfo } from "@/utils";
// import Cookies from 'js-cookie' // import Cookies from 'js-cookie'
// var socket = null // var socket = null
export default { export default {
inject: ['refresh'], inject: ["refresh"],
data () { data() {
return { return {
i18nMessages: messages, i18nMessages: messages,
updatePasswordVisible: false, updatePasswordVisible: false,
messageTip: false messageTip: false,
} };
}, },
components: { components: {
UpdatePassword UpdatePassword,
}, },
created () { created() {
// var vue = this // var vue = this
// socket = new WebSocket(`${window.SITE_CONFIG['socketURL']}?token=${Cookies.get('token')}`) // socket = new WebSocket(`${window.SITE_CONFIG['socketURL']}?token=${Cookies.get('token')}`)
// socket.onopen = function () {} // socket.onopen = function () {}
@ -101,56 +144,96 @@ export default {
// } // }
// //
this.getUnReadCount() this.getUnReadCount();
}, },
methods: { methods: {
myNoticeRouter () { myNoticeRouter() {
this.$router.replace('notice-notice-user') this.$router.replace("notice-notice-user");
}, },
getUnReadCount () { getUnReadCount() {
this.$http.get('/sys/notice/mynotice/unread').then(({ data: res }) => { this.$http
if (res.code !== 0) { .get("/sys/notice/mynotice/unread")
return this.$message.error(res.msg) .then(({ data: res }) => {
} if (res.code !== 0) {
if (res.data > 0) { return this.$message.error(res.msg);
this.messageTip = true }
} if (res.data > 0) {
}).catch(() => {}) this.messageTip = true;
}
})
.catch(() => {});
}, },
// //
fullscreenHandle () { fullscreenHandle() {
if (!screenfull.enabled) { if (!screenfull.enabled) {
return this.$message({ return this.$message({
message: this.$t('fullscreen.prompt'), message: this.$t("fullscreen.prompt"),
type: 'warning', type: "warning",
duration: 500 duration: 500,
}) });
} }
screenfull.toggle() screenfull.toggle();
}, },
// //
updatePasswordHandle () { updatePasswordHandle() {
this.updatePasswordVisible = true this.updatePasswordVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.updatePassword.init() this.$refs.updatePassword.init();
}) });
}, },
// 退 // 退
logoutHandle () { logoutHandle() {
this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), { this.$confirm(
confirmButtonText: this.$t('confirm'), this.$t("prompt.info", { handle: this.$t("logout") }),
cancelButtonText: this.$t('cancel'), this.$t("prompt.title"),
type: 'warning' {
}).then(() => { confirmButtonText: this.$t("confirm"),
this.$http.post('/logout').then(({ data: res }) => { cancelButtonText: this.$t("cancel"),
if (res.code !== 0) { type: "warning",
return this.$message.error(res.msg) }
} )
clearLoginInfo() .then(() => {
this.$router.push({ name: 'login' }) this.$http
}).catch(() => {}) .post("/logout")
}).catch(() => {}) .then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
clearLoginInfo();
this.$router.push({ name: "login" });
})
.catch(() => {});
})
.catch(() => {});
},
},
};
</script>
<style scoped lang="scss">
@font-face {
font-family: "header-typeface";
src: url("~@/assets/font/header-typeface.ttf");
}
.aui-navbar {
width: 100%;
height: 50px;
background-image: url("~@/assets/img/activitiMyWorkDynamics/header-bak.png");
.aui-navbar__header {
width: 25%;
.aui-navbar__brand {
margin-left: 20px;
a {
font-size: 22px;
color: #ffffff;
}
.aui-navbar__brand-mini {
display: block;
}
.back-title-text {
margin-top: 5px;
font-family: header-typeface;
}
} }
} }
} }
</script> </style>

View File

@ -1,89 +1,135 @@
<template> <template>
<el-submenu v-if="menu.children && menu.children.length >= 1" :index="menu.id" :popper-append-to-body="false"> <el-submenu
v-if="menu.children && menu.children.length >= 1"
:index="menu.id"
:popper-append-to-body="false"
>
<template slot="title"> <template slot="title">
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true"><use :xlink:href="`#${menu.icon}`"></use></svg> <svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<span>{{ menu.name }}</span> <use :xlink:href="`#${menu.icon}`"></use>
</svg>
<span class="first-level-text">{{ menu.name }}</span>
</template> </template>
<sub-menu v-for="item in menu.children" :key="item.id" :menu="item"></sub-menu> <sub-menu
v-for="item in menu.children"
:key="item.id"
:menu="item"
></sub-menu>
</el-submenu> </el-submenu>
<el-menu-item v-else :index="menu.id" ref="li"> <el-menu-item v-else :index="menu.id" ref="li">
<a <a
:href="isBrowserTabOpen(menu.id) ? getBrowserTabOpenURL(menu.id) : 'javascript:;'" :href="
isBrowserTabOpen(menu.id)
? getBrowserTabOpenURL(menu.id)
: 'javascript:;'
"
:target="isBrowserTabOpen(menu.id) ? '_blank' : '_self'" :target="isBrowserTabOpen(menu.id) ? '_blank' : '_self'"
@click="isBrowserTabOpen(menu.id) ? 'return false;' : gotoRouteHandle(menu.id)"> @click="
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true"><use :xlink:href="`#${menu.icon}`"></use></svg> isBrowserTabOpen(menu.id) ? 'return false;' : gotoRouteHandle(menu.id)
"
>
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use :xlink:href="`#${menu.icon}`"></use>
</svg>
<span>{{ menu.name }}</span> <span>{{ menu.name }}</span>
</a> </a>
</el-menu-item> </el-menu-item>
</template> </template>
<script> <script>
import SubMenu from './main-sidebar-sub-menu' import SubMenu from "./main-sidebar-sub-menu";
export default { export default {
name: 'sub-menu', name: "sub-menu",
data () { data() {
return { return {
browserTabOpenList: [ browserTabOpenList: ["1156748733921165314"],
'1156748733921165314', };
]
}
}, },
props: { props: {
menu: { menu: {
type: Object, type: Object,
required: true required: true,
} },
}, },
components: { components: {
SubMenu SubMenu,
}, },
created () { created() {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.li) { if (this.$refs.li) {
let $li = this.$refs.li.$el let $li = this.$refs.li.$el;
let $a = $li.firstElementChild let $a = $li.firstElementChild;
if ($a) { if ($a) {
let pl = '0', pr = '0' let pl = "0",
pr = "0";
if ($li.currentStyle) { if ($li.currentStyle) {
pl = $li.currentStyle['paddingLeft'] pl = $li.currentStyle["paddingLeft"];
pr = $li.currentStyle['paddingRight'] pr = $li.currentStyle["paddingRight"];
} else { } else {
pl = window.document.defaultView.getComputedStyle($li, null)['paddingLeft'] pl = window.document.defaultView.getComputedStyle($li, null)[
pr = window.document.defaultView.getComputedStyle($li, null)['paddingRight'] "paddingLeft"
];
pr = window.document.defaultView.getComputedStyle($li, null)[
"paddingRight"
];
} }
$li.setAttribute('style', `padding-left: 0; padding-right: 0;`) $li.setAttribute("style", `padding-left: 0; padding-right: 0;`);
$a.setAttribute('style', `padding-left: ${pl}; padding-right: ${pr};`) $a.setAttribute(
"style",
`padding-left: ${pl}; padding-right: ${pr};`
);
} }
} }
}) });
}, },
methods: { methods: {
// Tab // Tab
isBrowserTabOpen (menuId) { isBrowserTabOpen(menuId) {
return this.browserTabOpenList.filter(item => item === menuId).length >= 1; return (
this.browserTabOpenList.filter((item) => item === menuId).length >= 1
);
}, },
// TabURL // TabURL
getBrowserTabOpenURL (menuId) { getBrowserTabOpenURL(menuId) {
var route = window.SITE_CONFIG['dynamicMenuRoutes'].filter(item => item.meta.menuId === menuId)[0] var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
return route ? route.meta.iframeURL : ''; (item) => item.meta.menuId === menuId
)[0];
return route ? route.meta.iframeURL : "";
}, },
// menuId() // menuId()
gotoRouteHandle (menuId) { gotoRouteHandle(menuId) {
var route = window.SITE_CONFIG['dynamicMenuRoutes'].filter(item => item.meta.menuId === menuId)[0] var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId
)[0];
if (route) { if (route) {
this.$router.push({ name: route.name }) this.$router.push({ name: route.name });
} }
} },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.aui-sidebar__menu { .aui-sidebar__menu {
.el-menu-item > a { .first-level-text {
display: block; font-size: 16px;
color: inherit; color: #212121;
text-decoration: none; font-weight: bold;
}
.el-menu-item {
a {
display: block;
color: inherit;
text-decoration: none;
}
span {
font-size: 16px;
}
}
.is-active {
color: #ffffff;
background-color: #0058e1;
border: none;
} }
} }
</style> </style>

View File

@ -1,21 +1,34 @@
<template> <template>
<div class="aui-theme-tools" :class="{ 'aui-theme-tools--open': isOpen }"> <div class="aui-theme-tools" :class="{ 'aui-theme-tools--open': isOpen }">
<div class="aui-theme-tools__toggle" @click="isOpen = !isOpen"> <div class="aui-theme-tools__toggle" @click="isOpen = !isOpen">
<svg class="icon-svg" aria-hidden="true"><use xlink:href="#icon-setting"></use></svg> <svg class="icon-svg" aria-hidden="true">
<use xlink:href="#icon-setting"></use>
</svg>
</div> </div>
<div class="aui-theme-tools__content"> <div class="aui-theme-tools__content">
<div class="aui-theme-tools__item"> <div class="aui-theme-tools__item">
<h3>Navbar</h3> <h3>Navbar</h3>
<el-checkbox v-model="$store.state.navbarLayoutType" true-label="colorful">colorful 鲜艳</el-checkbox> <el-checkbox
v-model="$store.state.navbarLayoutType"
true-label="colorful"
>colorful 鲜艳</el-checkbox
>
</div> </div>
<div class="aui-theme-tools__item"> <div class="aui-theme-tools__item">
<h3>Sidebar</h3> <h3>Sidebar</h3>
<el-checkbox v-model="$store.state.sidebarLayoutSkin" true-label="dark">dark 黑色</el-checkbox> <el-checkbox v-model="$store.state.sidebarLayoutSkin" true-label="dark"
>dark 黑色</el-checkbox
>
</div> </div>
<div class="aui-theme-tools__item"> <div class="aui-theme-tools__item">
<h3>Theme</h3> <h3>Theme</h3>
<el-radio-group v-model="themeColor" @change="themeColorChangeHandle"> <el-radio-group v-model="themeColor" @change="themeColorChangeHandle">
<el-radio v-for="item in themeList" :key="item.name" :label="item.name">{{ `${item.name} ${item.desc}` }}</el-radio> <el-radio
v-for="item in themeList"
:key="item.name"
:label="item.name"
>{{ `${item.name} ${item.desc}` }}</el-radio
>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
@ -24,38 +37,47 @@
<script> <script>
export default { export default {
data () { data() {
return { return {
isOpen: false, isOpen: false,
themeList: require('@/element-ui/config.js'), themeList: require("@/element-ui/config.js"),
themeColor: 'turquoise' themeColor: "turquoise",
} };
}, },
methods: { methods: {
themeColorChangeHandle (val) { themeColorChangeHandle(val) {
var styleList = [ var styleList = [
{ {
id: 'J_elementTheme', id: "J_elementTheme",
url: `${process.env.BASE_URL}element-theme/${val}/index.css?t=${new Date().getTime()}` url: `${
process.env.BASE_URL
}element-theme/${val}/index.css?t=${new Date().getTime()}`,
}, },
{ {
id: 'J_auiTheme', id: "J_auiTheme",
url: `${process.env.BASE_URL}element-theme/${val}/aui.css?t=${new Date().getTime()}` url: `${
} process.env.BASE_URL
] }element-theme/${val}/aui.css?t=${new Date().getTime()}`,
},
];
for (var i = 0; i < styleList.length; i++) { for (var i = 0; i < styleList.length; i++) {
var el = document.querySelector(`#${styleList[i].id}`) var el = document.querySelector(`#${styleList[i].id}`);
if (el) { if (el) {
el.href = styleList[i].url el.href = styleList[i].url;
continue continue;
} }
el = document.createElement('link') el = document.createElement("link");
el.id = styleList[i].id el.id = styleList[i].id;
el.href = styleList[i].url el.href = styleList[i].url;
el.rel = 'stylesheet' el.rel = "stylesheet";
document.querySelector('head').appendChild(el) document.querySelector("head").appendChild(el);
} }
} },
} },
} };
</script> </script>
<style scoped lang="scss">
.aui-theme-tools__toggle {
background-color: #0058e1;
}
</style>

View File

@ -8,46 +8,72 @@
clearable clearable
/> />
</el-col> </el-col>
<el-button type="primary" @click="flashTableData">查询</el-button> <el-button type="primary" class="button-new" @click="flashTableData"
<el-button type="primary" @click="restTableData">重置</el-button> >查询</el-button
>
<el-button type="primary" class="button-new" @click="restTableData"
>重置</el-button
>
<div style="float: right"> <div style="float: right">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="deleteData" class="button-text-new"
>批量删除</el-button> @click="deleteData"
>批量删除</el-button
>
<el-button <el-button
type="primary" type="primary"
class="button-new"
@click="addDataDialogVisabled = true" @click="addDataDialogVisabled = true"
>动态发布</el-button> >动态发布</el-button
>
</div> </div>
</el-row> </el-row>
<el-row style="margin-top: 20px"> <el-row style="margin-top: 20px">
<el-table :data="tableData" border @selection-change="tableChange" > <el-table :data="tableData" border @selection-change="tableChange">
<el-table-column width="60" type="selection" align="center"></el-table-column> <!-- --> <el-table-column
<el-table-column label="序号" width="60" type="index" align="center"></el-table-column> width="60"
type="selection"
align="center"
></el-table-column>
<!-- 全选 -->
<el-table-column
label="序号"
width="60"
type="index"
align="center"
></el-table-column>
<el-table-column label="动态标题" prop="title"> <el-table-column label="动态标题" prop="title">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="boxtitle"> <div class="boxtitle">
{{scope.row.title}} {{ scope.row.title }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内容" prop="content"> <el-table-column label="内容" prop="content">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="boxcontent"> <div class="boxcontent">
{{scope.row.content}} {{ scope.row.content }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图片地址" prop="imageUrl"></el-table-column> <el-table-column label="图片地址" prop="imageUrl"></el-table-column>
<el-table-column label="创建时间" prop="createDate" sortable></el-table-column> <el-table-column
label="创建时间"
prop="createDate"
sortable
></el-table-column>
<el-table-column width="200" label="操作" align="center"> <el-table-column width="200" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" @click="openEditDialog(scope.row)" type="text" icon="el-icon-setting" <el-button
size="mini"
@click="openEditDialog(scope.row)"
type="text"
icon="el-icon-setting"
class="button-text-new"
>编辑</el-button >编辑</el-button
> >
<!-- <el-button size="mini" type="success" icon="el-icon-plus" <!-- <el-button size="mini" type="success" icon="el-icon-plus"
@ -57,27 +83,37 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
class="button-text-new"
@click="deleteData(scope.row)" @click="deleteData(scope.row)"
>删除</el-button >删除</el-button
> >
<el-button
size="mini"
type="text"
icon="el-icon-delete"
class="button-text-new"
@click="openPreviewData(scope.row)"
>预览</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 --> </el-row
</el-row><el-pagination ><el-pagination
style="margin-top: 20px; text-align: center" style="margin-top: 20px; text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="queryData.pageIndex" :current-page="queryData.pageIndex"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="queryData.pageSize" :page-size="queryData.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="queryData.total" :total="queryData.total"
> >
</el-pagination> </el-pagination>
<!-- 新增项目 --> <!-- 新增项目 -->
<el-dialog :close-on-click-modal="false" <el-dialog
:close-on-click-modal="false"
title="新增项目" title="新增项目"
:visible.sync="addDataDialogVisabled" :visible.sync="addDataDialogVisabled"
@close="addDataDialogClose" @close="addDataDialogClose"
@ -98,6 +134,18 @@
show-word-limit show-word-limit
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="title" label="摘要">
<el-input
v-model="addDataFrom.note1"
autocomplete="off"
placeholder="摘要"
maxlength="1000"
show-word-limit
type="textarea"
@input="noteExceed"
:rows="3"
></el-input>
</el-form-item>
<el-form-item prop="content" label="内容"> <el-form-item prop="content" label="内容">
<el-input <el-input
v-model="addDataFrom.content" v-model="addDataFrom.content"
@ -111,7 +159,7 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- <el-upload <!-- <el-upload
class="avatar-uploader" class="avatar-uploader"
:action="fileUploadUrl" :action="fileUploadUrl"
:show-file-list="false" :show-file-list="false"
@ -123,32 +171,41 @@
</el-upload> --> </el-upload> -->
<el-upload <el-upload
ref="addUpload" ref="addUpload"
class="upload-demo" class="upload-demo"
:action="fileUploadUrl" :action="fileUploadUrl"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
:on-remove="addUploadRemoveFile" :on-remove="addUploadRemoveFile"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:on-preview="showView" :on-preview="showView"
:limit="1" :limit="1"
list-type="picture"> list-type="picture"
<el-button size="small" type="primary">点击上传</el-button> >
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div> <el-button size="small" type="primary" class="button-new"
</el-upload> >点击上传</el-button
>
<div slot="tip" class="el-upload__tip">
只能上传jpg/png文件且不超过500kb
</div>
</el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="addDataDialogVisabled = false"> </el-button> <el-button @click="addDataDialogVisabled = false"> </el-button>
<el-button type="primary" @click="addDataDialogConfirm" <el-button
type="primary"
@click="addDataDialogConfirm"
class="button-new"
> </el-button > </el-button
> >
</div> </div>
</el-dialog> </el-dialog>
<!-- 编辑项目 --> <!-- 编辑项目 -->
<el-dialog :close-on-click-modal="false" <el-dialog
:close-on-click-modal="false"
title="编辑项目" title="编辑项目"
:visible.sync="editDataDialogVisabled" :visible.sync="editDataDialogVisabled"
@close="editDataDialogClose" @close="editDataDialogClose"
@ -169,6 +226,18 @@
show-word-limit show-word-limit
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="title" label="摘要">
<el-input
v-model="eidtDataForm.note1"
autocomplete="off"
placeholder="摘要"
maxlength="1000"
show-word-limit
type="textarea"
@input="noteExceed"
:rows="3"
></el-input>
</el-form-item>
<el-form-item prop="content" label="内容"> <el-form-item prop="content" label="内容">
<el-input <el-input
v-model="eidtDataForm.content" v-model="eidtDataForm.content"
@ -182,7 +251,7 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- <el-upload <!-- <el-upload
class="avatar-uploader" class="avatar-uploader"
:action="fileUploadUrl" :action="fileUploadUrl"
:show-file-list="false" :show-file-list="false"
@ -191,30 +260,81 @@
<img v-if="eidtDataForm.imageUrl" :src="eidtDataForm.imageUrl" class="avatar"> <img v-if="eidtDataForm.imageUrl" :src="eidtDataForm.imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> --> </el-upload> -->
<el-upload <el-upload
ref="editUpload" ref="editUpload"
class="upload-demo" class="upload-demo"
:action="fileUploadUrl" :action="fileUploadUrl"
:on-success="eidtHandleAvatarSuccess" :on-success="eidtHandleAvatarSuccess"
:before-upload="editBeforeAvatarUpload" :before-upload="editBeforeAvatarUpload"
:limit="1" :limit="1"
:file-list="editDialogShowFileList" :file-list="editDialogShowFileList"
:on-remove="editUploadRemoveFile" :on-remove="editUploadRemoveFile"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:on-preview="showView" :on-preview="showView"
list-type="picture"> list-type="picture"
<el-button size="small" type="primary">点击上传</el-button> >
<div slot="tip" class="el-upload__tip">只能上传图片文件</div> <el-button size="small" type="primary" class="button-new"
</el-upload> >点击上传</el-button
</el-form-item> >
<div slot="tip" class="el-upload__tip">只能上传图片文件</div>
</el-upload>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="editDataDialogVisabled = false"> </el-button> <el-button @click="editDataDialogVisabled = false"> </el-button>
<el-button type="primary" @click="eidtDataDialogConfirm"> </el-button> <el-button
type="primary"
@click="eidtDataDialogConfirm"
class="button-new"
> </el-button
>
</div> </div>
</el-dialog> </el-dialog>
<!-- 预览项目 -->
<el-dialog
:close-on-click-modal="false"
title="预览项目"
:visible.sync="perviewDataDialogVisabled"
@close="perviewDataDialogClose"
width="1300px"
top="10vh"
>
<div class="preview-dialog">
<div class="preview-title">
<div class="title-text">
<span>{{ previewData.title }}</span>
</div>
<div class="title-time">
<span>发布时间</span>
<span>{{ previewData.updateDate }}</span>
</div>
</div>
<div class="preview-note">
<span>摘要</span>
<span>{{ previewData.note1 }}</span>
</div>
<div class="preview-image">
<img
width="100%"
v-if="previewData.imageUrl != ''"
:src="previewData.imageUrl"
alt=""
/>
<img
width="100%"
v-else
src="~@/assets/img/activitiMyWorkDynamics/no-img.png"
alt=""
/>
</div>
<div class="preview-content">
<span>{{ previewData.content }}</span>
</div>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisibleImg"> <el-dialog :visible.sync="dialogVisibleImg">
<img width="100%" :src="previewImg" alt=""> <img width="100%" :src="previewImg" alt="" />
</el-dialog> </el-dialog>
</el-card> </el-card>
</template> </template>
@ -222,15 +342,15 @@
<script> <script>
// @ is an alias to /src // @ is an alias to /src
export default { export default {
data () { data() {
return { return {
fileUploadUrl: window.SITE_CONFIG.apiURL + '/upload', fileUploadUrl: window.SITE_CONFIG.apiURL + "/upload",
// //
queryData: { queryData: {
keyworld: '', keyworld: "",
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
total: 0 total: 0,
}, },
// //
tableData: [], tableData: [],
@ -241,310 +361,429 @@ export default {
// imageUrl: '', // imageUrl: '',
// //
addDataFrom: { addDataFrom: {
title: '', title: "",
content: '', note1: "",
imageUrl: '', content: "",
delFlag: 0 imageUrl: "",
delFlag: 0,
}, },
// //
addDataFromRules: { addDataFromRules: {
title: [{ required: true, message: '请输入标题', trigger: 'blur' }], title: [{ required: true, message: "请输入标题", trigger: "blur" }],
content: [ note1: [{ required: true, message: "请输入摘要", trigger: "blur" }],
{ required: true, message: '请输入内容', trigger: 'blur' } content: [{ required: true, message: "请输入内容", trigger: "blur" }],
],
imageUrl: [ imageUrl: [
{ required: true, message: '请输入图片地址', trigger: 'blur' } { required: true, message: "请输入图片地址", trigger: "blur" },
] ],
}, },
editDataDialogVisabled: false, editDataDialogVisabled: false,
eidtDataForm: { eidtDataForm: {
title: '', title: "",
content: '', note1: "",
imageUrl: '' content: "",
imageUrl: "",
}, },
eidtDataFromRules: { eidtDataFromRules: {
title: [{ required: true, message: '请输入标题', trigger: 'blur' }], title: [{ required: true, message: "请输入标题", trigger: "blur" }],
content: [ note1: [{ required: true, message: "请输入摘要", trigger: "blur" }],
{ required: true, message: '请输入内容', trigger: 'blur' } content: [{ required: true, message: "请输入内容", trigger: "blur" }],
],
imageUrl: [ imageUrl: [
{ required: true, message: '请输入图片地址', trigger: 'blur' } { required: true, message: "请输入图片地址", trigger: "blur" },
] ],
}, },
previewImg: '', // perviewDataDialogVisabled: false,
previewData: {
title: "",
note1: "",
content: "",
imageUrl: "",
delFlag: 0,
},
previewImg: "", //
deleteDataArr: [], deleteDataArr: [],
dialogVisibleImg: false dialogVisibleImg: false,
} };
}, },
created () { created() {
this.getTableData() this.getTableData();
}, },
methods: { methods: {
tableChange (val) { tableChange(val) {
this.deleteDataArr = val.map(item => item.id) this.deleteDataArr = val.map((item) => item.id);
console.log(this.deleteDataArr) console.log(this.deleteDataArr);
}, },
restTableData () { restTableData() {
this.queryData.keyworld = '' this.queryData.keyworld = "";
this.getTableData() this.getTableData();
}, },
showView (file) { showView(file) {
this.previewImg = file.url this.previewImg = file.url;
this.dialogVisibleImg = true this.dialogVisibleImg = true;
}, },
getTableData () { getTableData() {
this.$http.get('/workdynamics/page', { this.$http
params: { .get("/workdynamics/page", {
limit: this.queryData.pageSize, params: {
page: this.queryData.pageIndex, limit: this.queryData.pageSize,
name: this.queryData.keyworld page: this.queryData.pageIndex,
} name: this.queryData.keyworld,
}) },
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.tableData = res.data.list this.tableData = res.data.list;
this.queryData.total = res.data.total this.queryData.total = res.data.total;
}) })
.catch(() => {}) .catch(() => {});
}, },
flashTableData () { flashTableData() {
this.queryData.pageIndex = 1 this.queryData.pageIndex = 1;
this.getTableData() this.getTableData();
}, },
// //
handleSizeChange (value) { handleSizeChange(value) {
this.queryData.pageSize = value this.queryData.pageSize = value;
this.getTableData() this.getTableData();
}, },
// //
handleCurrentChange (val) { handleCurrentChange(val) {
this.queryData.pageIndex = val this.queryData.pageIndex = val;
this.getTableData() this.getTableData();
}, },
// //
addDataDialogClose () { addDataDialogClose() {
this.$refs.addDataFormRef.resetFields() this.$refs.addDataFormRef.resetFields();
this.addDataFrom.imageUrl = '' this.addDataFrom.imageUrl = "";
this.$refs.addUpload.clearFiles() this.$refs.addUpload.clearFiles();
// this.addDataFrom.imagesFiles = [] // this.addDataFrom.imagesFiles = []
// this.$refs.addDataFromUploadRef.clearFiles() // this.$refs.addDataFromUploadRef.clearFiles()
}, },
editDataDialogClose () { editDataDialogClose() {
this.$refs.editDataFormRef.resetFields() this.$refs.editDataFormRef.resetFields();
this.eidtDataForm.imageUrl = '' this.eidtDataForm.imageUrl = "";
this.$refs.editUpload.clearFiles() this.$refs.editUpload.clearFiles();
}, },
// //
addDataDialogConfirm () { addDataDialogConfirm() {
this.$refs.addDataFormRef.validate(async (valid) => { this.$refs.addDataFormRef.validate(async (valid) => {
if (valid) { if (valid) {
//console.log("", this.addDataFrom);
this.$http this.$http
.post('/workdynamics/insert', this.addDataFrom) .post("/workdynamics/insert", this.addDataFrom)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.$message.success('新增成功') this.$message.success("新增成功");
this.addDataDialogVisabled = false this.addDataDialogVisabled = false;
this.getTableData() this.getTableData();
}) })
.catch(() => {}) .catch(() => {});
} else { } else {
this.$message.success('表单数据填写不完整') this.$message.success("表单数据填写不完整");
} }
}) });
}, },
// //
handleExceed () { handleExceed() {
this.$message({ type: 'error', message: '最多支持一张图片上传' }) this.$message({ type: "error", message: "最多支持一张图片上传" });
}, },
// //
titleExceed (str) { titleExceed(str) {
if (str.length >= 200) { if (str.length >= 200) {
this.$message.error('标题文字不能超过200字') this.$message.error("标题文字不能超过200字");
} }
}, },
// //
contentExceed (str) { contentExceed(str) {
if (str.length >= 2000) { if (str.length >= 2000) {
this.$message.error('内容文字不能超过2000字') this.$message.error("内容文字不能超过2000字");
}
},
//
noteExceed(str) {
if (str.length >= 1000) {
this.$message.error("摘要文字不能超过1000字");
} }
}, },
// //
deleteData (row) { deleteData(row) {
console.log(row) console.log(row);
this.$confirm('此操作将删除当前数据, 是否继续?', '提示', { this.$confirm("此操作将删除当前数据, 是否继续?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}) })
.then(async () => { .then(async () => {
let ids = [] let ids = [];
if (this.deleteDataArr.length > 1) { if (this.deleteDataArr.length > 1) {
ids = this.deleteDataArr ids = this.deleteDataArr;
} else { } else {
ids = [row.id] ids = [row.id];
} }
console.log(ids) console.log(ids);
this.$http.delete('/workdynamics/delete', { this.$http
data: ids .delete("/workdynamics/delete", {
}) data: ids,
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.$message({ this.$message({
type: 'success', type: "success",
message: '删除成功!' message: "删除成功!",
}) });
this.getTableData() this.getTableData();
}) });
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: 'info', type: "info",
message: '已取消删除' message: "已取消删除",
}) });
}) });
}, },
handleAvatarSuccess (res, file) { //
async openPreviewData(row) {
console.log("预览预览", row);
const { data: res } = await this.$http.get(
`workdynamics/select/${row.id}`
);
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.addDataFrom.imageUrl = res.data this.previewData = res.data;
this.perviewDataDialogVisabled = true;
},
perviewDataDialogClose() {
this.perviewDataDialogVisabled = false;
},
handleAvatarSuccess(res, file) {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.addDataFrom.imageUrl = res.data;
// this.imageUrl = URL.createObjectURL(file.raw); // this.imageUrl = URL.createObjectURL(file.raw);
}, },
beforeAvatarUpload (file) { beforeAvatarUpload(file) {
const isImage = const isImage =
file.type === 'image/jpeg' || file.type === "image/jpeg" ||
file.type === 'image/jpg' || file.type === "image/jpg" ||
file.type === 'image/png' file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < 2 const isLt2M = file.size / 1024 / 1024 < 2;
if (!isImage) { if (!isImage) {
this.$message.error('上传头像图片只能是 JPG 格式!') this.$message.error("上传头像图片只能是 JPG 格式!");
} }
if (!isLt2M) { if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!') this.$message.error("上传头像图片大小不能超过 2MB!");
} }
return isImage && isLt2M return isImage && isLt2M;
}, },
eidtHandleAvatarSuccess (res, file) { eidtHandleAvatarSuccess(res, file) {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.eidtDataForm.imageUrl = res.data this.eidtDataForm.imageUrl = res.data;
// this.imageUrl = URL.createObjectURL(file.raw); // this.imageUrl = URL.createObjectURL(file.raw);
}, },
editBeforeAvatarUpload (file) { editBeforeAvatarUpload(file) {
const isImage = const isImage =
file.type === 'image/jpeg' || file.type === "image/jpeg" ||
file.type === 'image/jpg' || file.type === "image/jpg" ||
file.type === 'image/png' file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < 2 const isLt2M = file.size / 1024 / 1024 < 2;
if (!isImage) { if (!isImage) {
this.$message.error('上传头像图片只能是 JPG 格式!') this.$message.error("上传头像图片只能是 JPG 格式!");
} }
if (!isLt2M) { if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!') this.$message.error("上传头像图片大小不能超过 2MB!");
} }
return isImage && isLt2M return isImage && isLt2M;
}, },
async openEditDialog (row) { async openEditDialog(row) {
const { data: res } = await this.$http.get(`workdynamics/select/${row.id}`) const { data: res } = await this.$http.get(
`workdynamics/select/${row.id}`
);
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.eidtDataForm = res.data this.eidtDataForm = res.data;
this.editDataDialogVisabled = true this.editDataDialogVisabled = true;
}, },
eidtDataDialogConfirm () { eidtDataDialogConfirm() {
this.$refs.editDataFormRef.validate(async (valid) => { this.$refs.editDataFormRef.validate(async (valid) => {
if (valid) { if (valid) {
console.log(this.eidtDataForm) console.log(this.eidtDataForm);
this.$http this.$http
.put('/workdynamics/update', this.eidtDataForm) .put("/workdynamics/update", this.eidtDataForm)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
this.$message.success('编辑成功') this.$message.success("编辑成功");
this.editDataDialogVisabled = false this.editDataDialogVisabled = false;
this.getTableData() this.getTableData();
}) })
.catch(() => {}) .catch(() => {});
} else { } else {
this.$message.success('表单数据填写不完整') this.$message.success("表单数据填写不完整");
} }
}) });
}, },
addUploadRemoveFile (file, fileList) { addUploadRemoveFile(file, fileList) {
this.$refs.addUpload.clearFiles() this.$refs.addUpload.clearFiles();
this.addDataFrom.imageUrl = '' this.addDataFrom.imageUrl = "";
},
editUploadRemoveFile(file, fileList) {
this.$refs.editUpload.clearFiles();
this.eidtDataForm.imageUrl = "";
}, },
editUploadRemoveFile (file, fileList) {
this.$refs.editUpload.clearFiles()
this.eidtDataForm.imageUrl = ''
}
}, },
computed: { computed: {
editDialogShowFileList () { editDialogShowFileList() {
if (this.eidtDataForm.imageUrl) { if (this.eidtDataForm.imageUrl) {
return [{ name: this.eidtDataForm.imageUrl, url: this.eidtDataForm.imageUrl }] return [
{ name: this.eidtDataForm.imageUrl, url: this.eidtDataForm.imageUrl },
];
} }
},
},
};
</script>
<style scoped lang="scss">
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 178px;
height: 178px;
display: block;
}
.boxtitle {
width: 100%;
max-height: 200px;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.boxcontent {
width: 100%;
max-height: 200px;
-webkit-line-clamp: 4;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.preview-dialog {
width: 100%;
height: 723px;
overflow: auto;
/* 滚动条凹槽的颜色,还可以设置边框属性 */
::-webkit-scrollbar-track-piece {
background-color: #f8f8f8;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
/* 滚动条的宽度 */
::-webkit-scrollbar {
width: 7px;
height: 7px;
}
.preview-title {
width: 100%;
height: 100px;
//margin-top: -40px;
border-bottom: solid #c6c6c6 1px;
.title-text {
text-align: center;
span {
font-size: 24px;
color: #0558e1;
}
}
.title-time {
width: 100%;
height: 30px;
margin-top: 14px;
text-align: center;
line-height: 30px;
span {
font-size: 16px;
color: #212121;
}
}
}
.preview-note {
width: 100%;
height: 100px;
text-align: left;
margin-top: 24px;
text-indent: 2em;
}
.preview-image {
width: 900px;
//height: 100%;
margin-top: 16px;
padding-top: 5px;
text-align: center;
padding-left: 300px;
}
.preview-content {
line-height: 30px;
text-indent: 2em;
margin-top: 16px;
span {
font-size: 16px;
color: #212121;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
} }
} }
} }
</script> .button-new {
<style scoped> background-color: #0558e1;
.avatar-uploader .el-upload { border: none;
border: 1px dashed #d9d9d9; }
border-radius: 6px; .button-text-new {
cursor: pointer; color: #0558e1;
position: relative; }
overflow: hidden; .el-icon-delete {
} color: #0558e1;
.avatar-uploader .el-upload:hover { }
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 178px;
height: 178px;
display: block;
}
.boxtitle{
width: 100%;
max-height: 200px;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box;
-webkit-box-orient: vertical;
}
.boxcontent{
width: 100%;
max-height: 200px;
-webkit-line-clamp: 4;
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box;
-webkit-box-orient: vertical;
}
</style> </style>