悬浮栏联调

master
yujialong 6 months ago
parent 0a7e561fea
commit 29df2858c8
  1. 6
      package-lock.json
  2. 1
      package.json
  3. 165
      src/api/index.js
  4. 34
      src/layouts/header/index.vue
  5. 115
      src/layouts/navbar/index.vue
  6. 172
      src/pages/article/list/index.vue
  7. 225
      src/pages/column/add/index.vue
  8. 36
      src/pages/column/page/devHistory.vue
  9. 297
      src/pages/column/page/iasf.vue
  10. 452
      src/pages/floatingFrame/index.vue
  11. 92
      src/pages/user/list/index.vue
  12. 7
      src/setting.js

6
package-lock.json generated

@ -9613,9 +9613,9 @@
}
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"lodash._basecopy": {
"version": "3.0.1",

@ -16,6 +16,7 @@
"element-ui": "^2.13.0",
"image-conversion": "^2.1.1",
"js-cookie": "^2.2.1",
"lodash": "^4.17.21",
"mavon-editor": "^2.6.17",
"postcss-px2rem": "^0.3.0",
"px2rem-loader": "^0.1.9",

@ -2,85 +2,90 @@ import Setting from '@/setting'
const host = Setting.apiBaseURL
export default {
logins: `iasf/sys/user/login`,
verification: `${host}iasf/sys/getVerify`,
upload: `${host}iasf/sysFiles/upload`,
listByPage: `iasf/sysFiles/listByPage`,
delFile: `iasf/sysFiles/delete`,
updateFile: `iasf/sysFiles/update`,
dept: `iasf/sys/dept`,
deptTree: `iasf/sys/dept/tree`,
depts: `iasf/sys/dept/tree`,
users: `iasf/sys/users`,
user: `iasf/sys/user`,
sendPhoneOrEmailCode: `iasf/sys/sendPhoneOrEmailCode`,
updatePhoneOrEmail: `iasf/sys/updatePhoneOrEmail`,
updateUserAvatars: `${host}iasf/sys/updateUserAvatars`,
logins: `/iasf/sys/user/login`,
verification: `${host}/iasf/sys/getVerify`,
upload: `${host}/iasf/sysFiles/upload`,
listByPage: `/iasf/sysFiles/listByPage`,
delFile: `/iasf/sysFiles/delete`,
updateFile: `/iasf/sysFiles/update`,
dept: `/iasf/sys/dept`,
deptTree: `/iasf/sys/dept/tree`,
depts: `/iasf/sys/dept/tree`,
users: `/iasf/sys/users`,
user: `/iasf/sys/user`,
sendPhoneOrEmailCode: `/iasf/sys/sendPhoneOrEmailCode`,
updatePhoneOrEmail: `/iasf/sys/updatePhoneOrEmail`,
updateUserAvatars: `${host}/iasf/sys/updateUserAvatars`,
staffTemplate: `http://139.159.254.212/用户导入模板.xlsx`,
checkJobNumber: `iasf/sys/checkJobNumber`,
checkUsername: `iasf/sys/checkUsername`,
resetPwd: `iasf/sys/resetPwd`,
pwd: `iasf/sys/user/pwd`,
exportFailure: `${host}iasf/sys/exportFailure`,
importStaff: `${host}iasf/sys/importStaff`,
roles: `iasf/sys/roles`,
role: `iasf/sys/role`,
deleteRole: `iasf/sys/role/deleted`,
perTree: `iasf/sys/permission/tree/all`,
groupAdd: `iasf/sys/userGroup/add`,
groupDel: `iasf/sys/userGroup/delete`,
groupList: `iasf/sys/userGroup/list`,
groupUpdate: `iasf/sys/userGroup/update`,
site: `iasf/sys/site/list`,
updateSite: `iasf/sys/site/update`,
delSite: `iasf/sys/site/delete`,
listWithTree: `iasf/sysColumn/listWithTree`,
saveColumn: `iasf/sysColumn/save`,
updateColumn: `iasf/sysColumn/update`,
findColumn: `iasf/sysColumn/findById`,
deleteColumn: `iasf/sysColumn/batchDeletion`,
sameLevelJudgment: `iasf/sysColumn/sameLevelJudgment`,
sortByColumn: `iasf/sysColumn/sortByColumn`,
checkIfTheTitleIsRepeat: `iasf/sysContent/checkIfTheTitleIsRepeat`,
deleteArticle: `iasf/sysContent/batchDeletion`,
findArticle: `iasf/sysContent/findById`,
queryArticle: `iasf/sysContent/pagingQuery`,
articleEnableOrDisable: `iasf/sysContent/articleEnableOrDisable`,
saveArticle: `iasf/sysContent/save`,
updateArticle: `iasf/sysContent/update`,
modifiedSort: `iasf/sysContent/modifiedSort`,
longPageColumnList: `iasf/pageManagement/longPageColumnList`,
searchAllBySite: `iasf/sysNavigationStyle/searchAllBySite`,
updateStyle: `iasf/sysNavigationStyle/update`,
saveStyle: `iasf/sysNavigationStyle/save`,
findPage: `iasf/sysColumnLongPage/getLongPageInformation`,
getRedisPage: `iasf/sysColumnLongPage/getRedisCache`,
savePage: `iasf/sysColumnLongPage/save`,
saveRedisPage: `iasf/sysColumnLongPage/saveTheCache`,
updatePage: `iasf/sysColumnLongPage/update`,
listOfColumnTemplates: `iasf/template/listOfColumnTemplates`,
theTemplateIdGetsTheStyle: `iasf/template/theTemplateIdGetsTheStyle`,
queryClassif: `iasf/content/classification/allTheQuery`,
delClassif: `iasf/content/classification/delete`,
checkClassif: `iasf/content/classification/checkForHeavy`,
saveClassif: `iasf/content/classification/save`,
updateClassif: `iasf/content/classification/update`,
checkLabel: `iasf/content/label/checkForHeavy`,
delLabel: `iasf/content/label/delete`,
checkLabel: `iasf/content/label/checkForHeavy`,
queryLabel: `iasf/content/label/queryAllArticleSubjectTags`,
saveLabel: `iasf/content/label/save`,
updateLabel: `iasf/content/label/update`,
delContentFile: `iasf/content/file/delete`,
saveContentFile: `iasf/content/file/save`,
theAttachmentUnderTheQueryColumn: `iasf/content/file/theAttachmentUnderTheQueryColumn`,
individualTemplateDetailsStyle: `iasf/template/individualTemplateDetailsStyle`,
longPageListStyle: `iasf/template/longPageListStyle`,
resort: `iasf/sysContent/sort`,
articleTopOperation: `iasf/sysContent/articleTopOperation`,
deleteUselessData: `iasf/sysColumn/deleteUselessData`,
addSeo: `iasf/seo/add`,
delSeo: `iasf/seo/delete`,
seoList: `iasf/seo/list`,
updateSeo: `iasf/seo/update`,
checkJobNumber: `/iasf/sys/checkJobNumber`,
checkUsername: `/iasf/sys/checkUsername`,
resetPwd: `/iasf/sys/resetPwd`,
pwd: `/iasf/sys/user/pwd`,
exportFailure: `${host}/iasf/sys/exportFailure`,
importStaff: `${host}/iasf/sys/importStaff`,
roles: `/iasf/sys/roles`,
role: `/iasf/sys/role`,
deleteRole: `/iasf/sys/role/deleted`,
perTree: `/iasf/sys/permission/tree/all`,
groupAdd: `/iasf/sys/userGroup/add`,
groupDel: `/iasf/sys/userGroup/delete`,
groupList: `/iasf/sys/userGroup/list`,
groupUpdate: `/iasf/sys/userGroup/update`,
site: `/iasf/sys/site/list`,
updateSite: `/iasf/sys/site/update`,
delSite: `/iasf/sys/site/delete`,
listWithTree: `/iasf/sysColumn/listWithTree`,
saveColumn: `/iasf/sysColumn/save`,
updateColumn: `/iasf/sysColumn/update`,
findColumn: `/iasf/sysColumn/findById`,
deleteColumn: `/iasf/sysColumn/batchDeletion`,
sameLevelJudgment: `/iasf/sysColumn/sameLevelJudgment`,
sortByColumn: `/iasf/sysColumn/sortByColumn`,
checkIfTheTitleIsRepeat: `/iasf/sysContent/checkIfTheTitleIsRepeat`,
deleteArticle: `/iasf/sysContent/batchDeletion`,
findArticle: `/iasf/sysContent/findById`,
queryArticle: `/iasf/sysContent/pagingQuery`,
articleEnableOrDisable: `/iasf/sysContent/articleEnableOrDisable`,
saveArticle: `/iasf/sysContent/save`,
updateArticle: `/iasf/sysContent/update`,
modifiedSort: `/iasf/sysContent/modifiedSort`,
longPageColumnList: `/iasf/pageManagement/longPageColumnList`,
searchAllBySite: `/iasf/sysNavigationStyle/searchAllBySite`,
updateStyle: `/iasf/sysNavigationStyle/update`,
saveStyle: `/iasf/sysNavigationStyle/save`,
findPage: `/iasf/sysColumnLongPage/getLongPageInformation`,
getRedisPage: `/iasf/sysColumnLongPage/getRedisCache`,
savePage: `/iasf/sysColumnLongPage/save`,
saveRedisPage: `/iasf/sysColumnLongPage/saveTheCache`,
updatePage: `/iasf/sysColumnLongPage/update`,
listOfColumnTemplates: `/iasf/template/listOfColumnTemplates`,
theTemplateIdGetsTheStyle: `/iasf/template/theTemplateIdGetsTheStyle`,
queryClassif: `/iasf/content/classification/allTheQuery`,
delClassif: `/iasf/content/classification/delete`,
checkClassif: `/iasf/content/classification/checkForHeavy`,
saveClassif: `/iasf/content/classification/save`,
updateClassif: `/iasf/content/classification/update`,
checkLabel: `/iasf/content/label/checkForHeavy`,
delLabel: `/iasf/content/label/delete`,
checkLabel: `/iasf/content/label/checkForHeavy`,
queryLabel: `/iasf/content/label/queryAllArticleSubjectTags`,
saveLabel: `/iasf/content/label/save`,
updateLabel: `/iasf/content/label/update`,
delContentFile: `/iasf/content/file/delete`,
saveContentFile: `/iasf/content/file/save`,
theAttachmentUnderTheQueryColumn: `/iasf/content/file/theAttachmentUnderTheQueryColumn`,
individualTemplateDetailsStyle: `/iasf/template/individualTemplateDetailsStyle`,
longPageListStyle: `/iasf/template/longPageListStyle`,
resort: `/iasf/sysContent/sort`,
articleTopOperation: `/iasf/sysContent/articleTopOperation`,
deleteUselessData: `/iasf/sysColumn/deleteUselessData`,
addSeo: `/iasf/seo/add`,
delSeo: `/iasf/seo/delete`,
seoList: `/iasf/seo/list`,
updateSeo: `/iasf/seo/update`,
batchDeletionFloating: `/iasf/SysFloatingColumnSchemeService/SysFloatingColumnScheme/batchDeletion`,
findFloating: `/iasf/SysFloatingColumnSchemeService/SysFloatingColumnScheme/findById`,
listFloating: `/iasf/SysFloatingColumnSchemeService/SysFloatingColumnScheme/floatingBarList`,
saveFloating: `/iasf/SysFloatingColumnSchemeService/SysFloatingColumnScheme/saveOrUpdate`,
enableOrDisableScheme: `/iasf/SysFloatingColumnSchemeService/SysFloatingColumnScheme/enableOrDisableScheme`,
}

@ -2,35 +2,27 @@
<div class="header">
<div class="group">
<img src="@/assets/images/group.png">
<breadcrumb v-if="crumbRefresh"
ref="breadcrumb"
:data="crumbs"></breadcrumb>
<breadcrumb v-if="crumbRefresh" ref="breadcrumb" :data="crumbs"></breadcrumb>
</div>
<div class="user-tool">
<template v-if="inContent">
<div class="site cp"
@click="toIndex">
<div class="site cp" @click="toIndex">
<img src="@/assets/images/index.png">
当前站点首页
</div>
<el-dropdown class="site-switch cp"
@command="siteCommand">
<el-dropdown class="site-switch cp" @command="siteCommand">
<span class="el-dropdown-link">
切换站点<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(site, i) in sites"
:key="i"
:command="site">{{ site.siteName }}</el-dropdown-item>
<el-dropdown-item v-for="(site, i) in sites" :key="i" :command="site">{{ site.siteName }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<!-- <img class="cp" src="@/assets/images/notice.png"> -->
<el-dropdown class="user-wrap"
@command="userCommand">
<el-dropdown class="user-wrap" @command="userCommand">
<div class="user">
<el-avatar :size="36"
:src="avatar"></el-avatar>
<el-avatar :size="36" :src="avatar"></el-avatar>
<span class="username">{{ userName }}</span>
</div>
<el-dropdown-menu slot="dropdown">
@ -52,7 +44,7 @@ export default {
sites: [],
crumbRefresh: true,
inContent: false, //
sitePath: ['/page', '/column', '/article']
sitePath: ['/page', '/column', '/article', '/seo', '/floatingFrame']
};
},
components: {
@ -136,51 +128,63 @@ export default {
color: #333;
background-color: #fff;
box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12);
.group {
display: inline-flex;
align-items: center;
span {
margin-left: 13px;
font-size: 14px;
color: #333;
}
}
.cp {
cursor: pointer;
}
.user-tool {
display: flex;
align-items: center;
}
.site,
.user-wrap {
display: inline-flex;
align-items: center;
}
.site {
img {
margin-right: 4px;
}
}
.site-switch {
margin: 0 60px 0 54px;
color: #333;
i {
color: #000;
}
}
.user-wrap {
margin-left: 26px;
.user {
display: inline-flex;
align-items: center;
cursor: pointer;
.username {
margin-left: 8px;
color: #333;
font-size: 14px;
}
}
/deep/.el-avatar>img {
width: 100%;
}

@ -1,115 +1,73 @@
<template>
<div>
<div v-show="!collapse"
class="flex-1">
<div v-show="!collapse" class="flex-1">
<div class="logo">
<img width="30"
src="@/assets/images/logo.png"
alt="">
<img width="30" src="@/assets/images/logo.png" alt="">
<span>网站管理后台</span>
</div>
<el-menu :default-active="active"
:default-openeds="['user']"
background-color="#001529"
text-color="#fff"
active-text-color="#fff"
:collapse="collapse"
:collapse-transition="false"
@select="menuSelect">
<el-menu :default-active="active" :default-openeds="['user']" background-color="#001529" text-color="#fff"
active-text-color="#fff" :collapse="collapse" :collapse-transition="false" @select="menuSelect">
<template v-for="item in menus">
<template v-if="item.subs">
<el-submenu :index="item.index"
:key="item.index">
<el-submenu :index="item.index" :key="item.index">
<template slot="title">
<img class="icon"
:src="require('@/assets/images/' + item.icon + '.png')"
alt="">
<img class="icon" :src="require('@/assets/images/' + item.icon + '.png')" alt="">
<span slot="title">{{ item.title }}</span>
</template>
<template v-for="subItem in item.subs">
<el-submenu v-if="subItem.subs"
:index="subItem.index"
:key="subItem.index">
<el-submenu v-if="subItem.subs" :index="subItem.index" :key="subItem.index">
<template slot="title">{{ subItem.title }}</template>
<el-menu-item v-for="(threeItem,i) in subItem.subs"
:key="i"
:index="threeItem.index">{{ threeItem.title }}</el-menu-item>
<el-menu-item v-for="(threeItem, i) in subItem.subs" :key="i" :index="threeItem.index">{{
threeItem.title
}}</el-menu-item>
</el-submenu>
<el-menu-item v-else
:index="subItem.index"
:key="subItem.index">{{ subItem.title }}</el-menu-item>
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }}</el-menu-item>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index"
:key="item.index">
<img class="icon"
:src="require('@/assets/images/' + item.icon + '.png')"
alt="">
<el-menu-item :index="item.index" :key="item.index">
<img class="icon" :src="require('@/assets/images/' + item.icon + '.png')" alt="">
<span slot="title">{{ item.title }}</span>
</el-menu-item>
</template>
</template>
</el-menu>
</div>
<div v-show="collapse"
class="light">
<div v-show="collapse" class="light">
<div class="col-wrap">
<img class="logo-icon"
src="@/assets/images/logo.png"
alt="">
<img class="logo-icon" src="@/assets/images/logo.png" alt="">
<ul class="col-nav">
<li v-for="(item, i) in colNav"
:key="i"
@click="menuSelect(item.index)">
<img width="16"
:src="require('@/assets/images/' + item.icon + '.png')"
alt="">
<li v-for="(item, i) in colNav" :key="i" @click="menuSelect(item.index)">
<img width="16" :src="require('@/assets/images/' + item.icon + '.png')" alt="">
</li>
</ul>
</div>
<div class="col-menu">
<div class="name">{{ site.siteName }}</div>
<el-menu v-if="colRefresh"
:default-active="siteActive"
background-color="#fff"
text-color="#333"
active-text-color="#fff"
:collapse-transition="false"
router>
<el-menu v-if="colRefresh" :default-active="siteActive" background-color="#fff" text-color="#333"
active-text-color="#fff" :collapse-transition="false" router>
<template v-for="item in sites">
<template v-if="item.subs">
<el-submenu :index="item.index"
:key="item.index">
<el-submenu :index="item.index" :key="item.index">
<template slot="title">
<img width="14"
class="icon"
:src="require('@/assets/images/' + item.icon + '.png')"
alt="">
<img width="14" class="icon" :src="require('@/assets/images/' + item.icon + '.png')" alt="">
<span slot="title">{{ item.title }}</span>
</template>
<template v-for="subItem in item.subs">
<el-submenu v-if="subItem.subs"
:index="subItem.index"
:key="subItem.index">
<el-submenu v-if="subItem.subs" :index="subItem.index" :key="subItem.index">
<template slot="title">{{ subItem.title }}</template>
<el-menu-item v-for="(threeItem,i) in subItem.subs"
:key="i"
:index="threeItem.index">{{ threeItem.title }}</el-menu-item>
<el-menu-item v-for="(threeItem, i) in subItem.subs" :key="i" :index="threeItem.index">{{
threeItem.title
}}</el-menu-item>
</el-submenu>
<el-menu-item v-else
:index="subItem.index"
:key="subItem.index">{{ subItem.title }}</el-menu-item>
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }}</el-menu-item>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index"
:key="item.index">
<img class="icon"
:src="require('@/assets/images/' + item.icon + '.png')"
alt="">
<el-menu-item :index="item.index" :key="item.index">
<img class="icon" :src="require('@/assets/images/' + item.icon + '.png')" alt="">
<span slot="title">{{ item.title }}</span>
</el-menu-item>
</template>
@ -282,6 +240,7 @@ export default {
background-color: #001529;
box-shadow: 2px 0px 6px 0px rgba(92, 111, 130, 0.35);
overflow: auto;
.logo {
display: flex;
align-items: center;
@ -289,44 +248,55 @@ export default {
margin: 15px 0 26px;
font-size: 16px;
color: #fff;
img {
margin-right: 8px;
}
}
/deep/.el-menu {
border-right: 0 !important;
.icon {
margin: 0 11px 0 5px;
}
.el-menu-item {
&.is-active {
background-color: #2962ff !important;
}
}
.el-menu .el-menu-item {
padding-left: 50px !important;
}
}
.light {
display: flex;
height: 100%;
background-color: #fff;
overflow: hidden;
.col-wrap {
width: 64px;
background-color: #001529;
}
.logo-icon {
width: 41px;
margin: 16px 0 30px 7px;
}
.col-nav {
text-align: center;
li {
padding: 25px 0;
cursor: pointer;
}
}
.name {
margin: 17px 0 27px 15px;
font-size: 15px;
@ -335,12 +305,15 @@ export default {
color: #333;
line-height: 32px;
}
.col-menu {
width: 192px;
}
/deep/.el-submenu__title {
padding-left: 14px !important;
}
.icon {
margin-left: 0;
}
@ -350,9 +323,11 @@ export default {
.sidebar::-webkit-scrollbar {
width: 0;
}
.sidebar-el-menu:not(.el-menu--collapse) {
width: 100%;
}
.sidebar>ul {
height: 100%;
}

@ -3,188 +3,99 @@
<div style="width: 218px;border-right: 1px solid #EBEDF0">
<p class="page-name mb">全部栏目</p>
<div style="height: calc(100% - 50px);overflow: auto">
<el-tree ref="column"
:data="columns"
highlight-current
:expand-on-click-node="false"
default-expand-all
:props="defaultProps"
node-key="id"
@node-click="initData">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span class="org-name"
:title="node.label">{{ node.label }}</span>
<el-tree ref="column" :data="columns" highlight-current :expand-on-click-node="false" default-expand-all
:props="defaultProps" node-key="id" @node-click="initData">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="org-name" :title="node.label">{{ node.label }}</span>
</span>
</el-tree>
</div>
</div>
<div class="p-l-20"
style="width: calc(100% - 219px);">
<div class="p-l-20" style="width: calc(100% - 219px);">
<div class="tool">
<div class="search-wrap">
<el-select v-model="field"
@change="initData">
<el-option v-for="(item, i) in keywords"
:key="i"
:label="item.name"
:value="item.id">
<el-select v-model="field" @change="initData">
<el-option v-for="(item, i) in keywords" :key="i" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-input class="keyword"
:placeholder="'请输入' + keywords.find(e => e.id === field).name"
v-model.trim="keyword"
clearable></el-input>
<el-input class="keyword" :placeholder="'请输入' + keywords.find(e => e.id === field).name"
v-model.trim="keyword" clearable></el-input>
</div>
<div class="actions">
<el-dropdown class="setting"
trigger="click"
:hide-on-click="false">
<img class="icon"
src="@/assets/images/setting.png"
alt="">
<el-dropdown class="setting" trigger="click" :hide-on-click="false">
<img class="icon" src="@/assets/images/setting.png" alt="">
<el-dropdown-menu>
<el-dropdown-item>
<el-button @click="resetColumns"
type="text">列重置</el-button>
<el-button @click="resetColumns" type="text">列重置</el-button>
</el-dropdown-item>
<el-dropdown-item v-for="(column, i) in settings"
:key="i"
:divided="i === 0">
<el-dropdown-item v-for="(column, i) in settings" :key="i" :divided="i === 0">
<el-checkbox v-model="column.show">{{ column.name }}</el-checkbox>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:新增'"
type="primary"
@click="add">新增</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'"
@click="batchDel">删除</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:新增'" type="primary" @click="add">新增</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'" @click="batchDel">删除</el-button>
</div>
</div>
<el-table :data="list"
class="table"
ref="table"
header-align="center"
@selection-change="handleSelectionChange"
row-key="id"
@sort-change="sortChange">
<el-table-column v-if="settings[0].show"
type="selection"
width="55"
align="center"
<el-table :data="list" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
row-key="id" @sort-change="sortChange">
<el-table-column v-if="settings[0].show" type="selection" width="55" align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<el-table-column type="index" width="60" label="序号" align="center">
<template scope="scope">
<span>{{ (page - 1) * pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column v-if="settings[1].show"
show-overflow-tooltip
prop="title"
label="标题"
align="center"
<el-table-column v-if="settings[1].show" show-overflow-tooltip prop="title" label="标题" align="center"
min-width="150"></el-table-column>
<el-table-column v-if="settings[2].show"
prop="columnName"
label="栏目"
align="center"
<el-table-column v-if="settings[2].show" prop="columnName" label="栏目" align="center"
min-width="120"></el-table-column>
<el-table-column v-if="settings[3].show"
prop="classificationName"
label="所属分类"
align="center"
<el-table-column v-if="settings[3].show" prop="classificationName" label="所属分类" align="center"
min-width="120"></el-table-column>
<el-table-column v-if="settings[4].show"
prop="typeId"
label="栏目类型"
align="center"
min-width="100">
<el-table-column v-if="settings[4].show" prop="typeId" label="栏目类型" align="center" min-width="100">
<template slot-scope="scope">
{{ types.find(e => e.id === scope.row.typeId).name }}
</template>
</el-table-column>
<el-table-column v-if="settings[5].show"
prop="founderName"
label="录入人"
align="center"
<el-table-column v-if="settings[5].show" prop="founderName" label="录入人" align="center"
min-width="80"></el-table-column>
<el-table-column v-if="settings[6].show"
prop="editorName"
label="修改人"
align="center"
<el-table-column v-if="settings[6].show" prop="editorName" label="修改人" align="center"
min-width="80"></el-table-column>
<el-table-column v-if="settings[7].show"
prop="updateTime"
label="修改日期"
align="center"
min-width="150"
<el-table-column v-if="settings[7].show" prop="updateTime" label="修改日期" align="center" min-width="150"
sortable="custom"></el-table-column>
<el-table-column v-if="settings[8].show"
prop="releaseTime"
label="发布日期"
align="center"
min-width="100"
<el-table-column v-if="settings[8].show" prop="releaseTime" label="发布日期" align="center" min-width="100"
sortable="custom"></el-table-column>
<el-table-column v-if="settings[9].show"
prop="totalBrowsing"
label="总浏览"
align="center"
<el-table-column v-if="settings[9].show" prop="totalBrowsing" label="总浏览" align="center"
min-width="70"></el-table-column>
<el-table-column v-if="settings[10].show"
prop="workNumber"
label="状态"
align="center"
min-width="80">
<el-table-column v-if="settings[10].show" prop="workNumber" label="状态" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.isRelease ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column v-auth="'/site/list:' + siteName + ':内容管理:文章管理:置顶'"
prop="sequence"
label="置顶"
align="center"
min-width="80"
sortable="custom">
<el-table-column v-auth="'/site/list:' + siteName + ':内容管理:文章管理:置顶'" prop="sequence" label="置顶" align="center"
min-width="80" sortable="custom">
<template slot-scope="scope">
<i v-if="scope.row.isRelease"
:class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']"
<i v-if="scope.row.isRelease" :class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']"
@click="sticky(scope.row)"></i>
</template>
</el-table-column>
<el-table-column v-if="settings[11].show"
label="操作"
align="center"
width="190">
<el-table-column v-if="settings[11].show" label="操作" align="center" width="190">
<template slot-scope="scope">
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:预览'"
type="text"
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:预览'" type="text"
@click="preview(scope.row)">预览</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:编辑'"
type="text"
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:编辑'" type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'"
type="text"
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'" type="text"
@click="handleDelete(scope.row)">删除</el-button>
<el-switch v-if="scope.row.isRelease"
v-auth="'/site/list:' + siteName + ':内容管理:文章管理:禁用'"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
:inactive-value="1"
<el-switch v-if="scope.row.isRelease" v-auth="'/site/list:' + siteName + ':内容管理:文章管理:禁用'" class="m-l-10"
v-model="scope.row.isDisable" :active-value="0" :inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
</el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
</div>
@ -495,6 +406,7 @@ export default {
display: inline-flex;
align-items: center;
}
.name {
display: inline-block;
max-width: 160px;
@ -502,17 +414,21 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
.squ-icon {
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #f70000;
&.el-icon-check {
color: #05991e;
}
}
/deep/.squ-input {
width: auto;
.el-input__inner {
width: 60px;
padding: 0 10px;

@ -1,135 +1,81 @@
<template>
<div class="page"
v-show="loaded">
<div class="page" v-show="loaded">
<p class="page-name mb">栏目</p>
<el-form :model="form"
:rules="rules"
class="input-form model"
label-width="120px">
<el-form :model="form" :rules="rules" class="input-form model" label-width="120px">
<div class="item-line">
<el-form-item prop="columnName"
label="栏目名称">
<el-input placeholder="请输入栏目名称"
v-model="form.columnName"
clearable
maxlength="40"
<el-form-item prop="columnName" label="栏目名称">
<el-input placeholder="请输入栏目名称" v-model="form.columnName" clearable maxlength="40"
@input="nameChange"></el-input>
</el-form-item>
<el-form-item prop="fatherId"
label="设置上级">
<el-cascader ref="fatherId"
v-model="form.fatherId"
:options="columns"
:props="columnProps"
clearable
<el-form-item prop="fatherId" label="设置上级">
<el-cascader ref="fatherId" v-model="form.fatherId" :options="columns" :props="columnProps" clearable
@change="fatherIdChange"></el-cascader>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="typeId"
label="栏目类型">
<el-select v-model="form.typeId"
@change="typeChange">
<el-option v-for="item in types"
:key="item.id"
:label="item.name"
:value="item.id">
<el-form-item prop="typeId" label="栏目类型">
<el-select v-model="form.typeId" @change="typeChange">
<el-option v-for="item in types" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="pageSize"
label="分页条数">
<el-input-number v-model="form.pageSize"
:min="0"
class="auto"></el-input-number>
<el-form-item prop="pageSize" label="分页条数">
<el-input-number v-model="form.pageSize" :min="0" class="auto"></el-input-number>
</el-form-item>
<el-form-item prop="menuVisible"
label="导航菜单可见">
<el-switch v-model="form.menuVisible"
:active-value="0"
:inactive-value="1">
<el-form-item prop="menuVisible" label="导航菜单可见">
<el-switch v-model="form.menuVisible" :active-value="0" :inactive-value="1">
</el-switch>
</el-form-item>
</div>
<div class="line"></div>
<template v-if="form.typeId === 1 || form.typeId === 4">
<el-form-item prop="columnBanner"
label="栏目Banner">
<el-upload class="avatar-uploader avatar-uploader-lg"
accept=".jpg,.png,.jpeg,.gif"
:on-change="changeFile"
:show-file-list="false"
:action="this.api.upload"
:auto-upload="false">
<img v-if="form.columnBanner"
:src="form.columnBanner"
class="avatar-lg">
<div class="uploader-default"
v-else>
<img class="plus"
src="@/assets/images/plus.png"
alt="">
<el-form-item prop="columnBanner" label="栏目Banner">
<el-upload class="avatar-uploader avatar-uploader-lg" accept=".jpg,.png,.jpeg,.gif" :on-change="changeFile"
:show-file-list="false" :action="this.api.upload" :auto-upload="false">
<img v-if="form.columnBanner" :src="form.columnBanner" class="avatar-lg">
<div class="uploader-default" v-else>
<img class="plus" src="@/assets/images/plus.png" alt="">
<p>点击上传</p>
</div>
<div slot="tip"
class="el-upload__tip">
<div slot="tip" class="el-upload__tip">
<p>请上传1920x500PX5M以内的jpgbmppng格式</p>
</div>
</el-upload>
</el-form-item>
<el-form-item prop="subtitle"
label="栏目副标题">
<el-input type="textarea"
placeholder="请输入栏目副标题"
v-model="form.subtitle"></el-input>
<el-form-item prop="subtitle" label="栏目副标题">
<el-input type="textarea" placeholder="请输入栏目副标题" v-model="form.subtitle"></el-input>
</el-form-item>
<el-form-item prop="templateId"
label="栏目模板">
<el-select v-model="form.templateId"
@change="getStyle">
<el-option v-for="item in templates"
:key="item.id"
:label="item.templateType"
:value="item.id">
<el-form-item prop="templateId" label="栏目模板">
<el-select v-model="form.templateId" @change="getStyle">
<el-option v-for="item in templates" :key="item.id" :label="item.templateType" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="listStyleId"
label="列表样式">
<el-form-item prop="listStyleId" label="列表样式">
<ul class="styles">
<li v-for="(item, i) in listStyle"
:key="i"
@click="form.listStyleId = item.id">
<li v-for="(item, i) in listStyle" :key="i" @click="form.listStyleId = item.id">
<div class="review">
<img style="width: 90px;max-height: 110px;"
:src="require('@/assets/images/style/' + item.id + '.png')"
<img style="width: 90px;max-height: 110px;" :src="require('@/assets/images/style/' + item.id + '.png')"
alt="">
</div>
<el-radio v-model="form.listStyleId"
:label="item.id">{{ item.style }}</el-radio>
<el-radio v-model="form.listStyleId" :label="item.id">{{ item.style }}</el-radio>
</li>
</ul>
</el-form-item>
<el-form-item prop="detailStyleId"
label="详情样式">
<el-form-item prop="detailStyleId" label="详情样式">
<ul class="styles">
<li v-for="(item, i) in detailStyleId"
:key="i"
@click="form.detailStyleId = item.id">
<li v-for="(item, i) in detailStyleId" :key="i" @click="form.detailStyleId = item.id">
<div class="review">
<img :style="{ width: item.id == 24 ? '50px' : '90px', 'max-height': '110px' }"
:src="require('@/assets/images/style/' + item.id + '.png')"
alt="">
:src="require('@/assets/images/style/' + item.id + '.png')" alt="">
</div>
<el-radio v-model="form.detailStyleId"
:label="item.id">{{ item.style }}</el-radio>
<el-radio v-model="form.detailStyleId" :label="item.id">{{ item.style }}</el-radio>
</li>
</ul>
</el-form-item>
</template>
<template v-if="form.typeId === 2">
<el-form-item prop="connectionType"
label="连接类型">
<el-form-item prop="connectionType" label="连接类型">
<el-radio-group v-model="form.connectionType">
<el-radio :label="1">站内链接</el-radio>
<el-radio :label="2">站外链接</el-radio>
@ -138,89 +84,56 @@
</el-form-item>
<template v-if="form.connectionType === 1">
<el-form-item label="站内链接">
<el-cascader v-model="links"
:options="columns"
:props="columnProps"
clearable
<el-cascader v-model="links" :options="columns" :props="columnProps" clearable
@change="getArticle"></el-cascader>
</el-form-item>
<el-form-item label="文章">
<el-select v-model="article"
clearable>
<el-option v-for="item in articles"
:key="item.id"
:label="item.title"
:value="item.id">
<el-select v-model="article" clearable>
<el-option v-for="item in articles" :key="item.id" :label="item.title" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</template>
<el-form-item v-show="form.connectionType === 2"
prop="linkAddress"
label="站外链接">
<el-input placeholder="请输入站外链接"
v-model.trim="form.linkAddress"
clearable></el-input>
<el-form-item v-show="form.connectionType === 2" prop="linkAddress" label="站外链接">
<el-input placeholder="请输入站外链接" v-model.trim="form.linkAddress" clearable></el-input>
</el-form-item>
<template v-if="form.connectionType === 3">
<el-form-item prop="siteSelection"
label="站点选择">
<el-select v-model="form.siteSelection"
@change="getOtherColumn">
<el-option v-for="item in sites"
:key="item.id"
:label="item.siteName"
:value="item.id">
<el-form-item prop="siteSelection" label="站点选择">
<el-select v-model="form.siteSelection" @change="getOtherColumn">
<el-option v-for="item in sites" :key="item.id" :label="item.siteName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="栏目">
<el-cascader v-model="otherLink"
:options="otherColumns"
:props="columnProps"
clearable
<el-cascader v-model="otherLink" :options="otherColumns" :props="columnProps" clearable
@change="getArticle"></el-cascader>
</el-form-item>
<el-form-item label="文章">
<el-select v-model="otherArticle"
clearable>
<el-option v-for="item in otherArticles"
:key="item.id"
:label="item.title"
:value="item.id">
<el-select v-model="otherArticle" clearable>
<el-option v-for="item in otherArticles" :key="item.id" :label="item.title" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</template>
<el-form-item prop="isOpen"
label="新窗口打开">
<el-switch v-model="form.isOpen"
:active-value="1"
:inactive-value="0">
<el-form-item prop="isOpen" label="新窗口打开">
<el-switch v-model="form.isOpen" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</template>
<template v-if="form.typeId === 3">
<el-form-item prop="templateId"
label="栏目模板">
<el-form-item prop="templateId" label="栏目模板">
<el-select v-model="form.templateId">
<el-option label="长页模板"
:value="9">
<el-option label="长页模板" :value="9">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="listStyleId"
label="列表样式">
<el-form-item prop="listStyleId" label="列表样式">
<ul class="styles">
<li v-for="(item, i) in pageStyle"
:key="i"
@click="form.listStyleId = item.id">
<li v-for="(item, i) in pageStyle" :key="i" @click="form.listStyleId = item.id">
<div class="review">
<img :src="require('@/assets/images/page/' + item.pic + '.png')"
alt="">
<img :src="require('@/assets/images/page/' + item.pic + '.png')" alt="">
</div>
<el-radio v-model="form.listStyleId"
:label="item.id">{{ item.style }}</el-radio>
<el-radio v-model="form.listStyleId" :label="item.id">{{ item.style }}</el-radio>
</li>
</ul>
</el-form-item>
@ -234,21 +147,12 @@
</el-form-item> -->
</el-form>
<div class="btns">
<el-button type="primary"
@click="submit(0)">确定</el-button>
<el-button type="primary" @click="submit(0)">确定</el-button>
<el-button @click="$router.push('/column')">取消</el-button>
</div>
<!-- 剪裁组件弹窗 -->
<el-dialog title="图片裁剪"
append-to-body
:visible.sync="cropperModel"
width="1100px"
:close-on-click-modal="false">
<Cropper ref="cropper"
:img-file.sync="file"
:is-upload="isUpload"
:fixed="true"
@upload="customUpload" />
<el-dialog title="图片裁剪" append-to-body :visible.sync="cropperModel" width="1100px" :close-on-click-modal="false">
<Cropper ref="cropper" :img-file.sync="file" :is-upload="isUpload" :fixed="true" @upload="customUpload" />
</el-dialog>
</div>
</template>
@ -768,6 +672,7 @@ export default {
$upload-width: 220px;
$upload-height: 102px;
$upload-lg-height: 102px;
/deep/ .avatar-uploader {
.el-upload {
position: relative;
@ -777,6 +682,7 @@ $upload-lg-height: 102px;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.uploader-default {
display: flex;
height: $upload-height;
@ -785,6 +691,7 @@ $upload-lg-height: 102px;
align-items: center;
text-align: center;
background: #fafafa;
p {
margin-top: 10px;
font-size: 14px;
@ -793,6 +700,7 @@ $upload-lg-height: 102px;
}
}
}
&.avatar-uploader-lg {
.el-upload {
width: 100%;
@ -804,43 +712,53 @@ $upload-lg-height: 102px;
}
}
}
.avatar {
display: block;
width: $upload-width;
height: $upload-height;
}
.avatar-lg {
display: block;
width: 100%;
height: $upload-lg-height;
}
.el-upload__tip {
margin-top: 0;
p {
font-size: 12px;
color: #333;
}
}
}
.style-wrap {
display: flex;
margin-top: 10px;
.label {
margin-right: 30px;
}
}
.styles {
display: inline-flex;
flex-wrap: wrap;
li {
width: 170px;
margin-right: 20px;
text-align: center;
cursor: pointer;
&:hover .review {
border-color: #2962ff;
}
}
.review {
display: flex;
justify-content: center;
@ -850,14 +768,17 @@ $upload-lg-height: 102px;
margin-bottom: 10px;
border: 1px solid #dcdee0;
border-radius: 2px;
img {
width: 50px;
}
}
.el-radio {
white-space: normal;
}
}
/deep/.input-form .auto .el-input {
width: 119px;
}

@ -3,11 +3,9 @@
<div class="actions">
<p class="page-name">页面设置/关于IASF-发展历程</p>
<div>
<el-button type="primary"
@click="preview">预览</el-button>
<el-button type="primary" @click="preview">预览</el-button>
<el-button @click="save(0)">保存为草稿</el-button>
<el-button type="primary"
@click="save(1)">发布</el-button>
<el-button type="primary" @click="save(1)">发布</el-button>
<el-button @click="back">放弃编辑</el-button>
</div>
</div>
@ -15,15 +13,12 @@
<div class="modules">
<div class="relative">
<div class="single-banner">
<img class="banner-img"
:src="modules[0].form.pic"
alt="" />
<img class="banner-img" :src="modules[0].form.pic" alt="" />
<div class="texts">
<h6 class="banner-title">{{ modules[0].form.title }}</h6>
</div>
</div>
<div class="cover"
@click="toSet(0)">点击更换banner与链接</div>
<div class="cover" @click="toSet(0)">点击更换banner与链接</div>
</div>
<div class="block history">
@ -31,29 +26,21 @@
<div class="c-wrap">
<h6 v-html="modules[1].form.title"></h6>
<p class="en">{{ modules[1].form.subTitle }}</p>
<div class="text"
v-html="modules[1].form.des"></div>
<div class="cover"
@click="toSet(1)">点击更换标题小标题与概述</div>
<div class="text" v-html="modules[1].form.des"></div>
<div class="cover" @click="toSet(1)">点击更换标题小标题与概述</div>
</div>
<div class="c-wrap">
<h6 style="font-size: 1.6rem">{{ modules[2].form.title }}</h6>
<p class="en"
style="margin-top: -15px;font-size: 1.6rem">{{ modules[2].form.subTitle }}</p>
<div class="text"
v-html="modules[2].form.des"></div>
<div class="cover"
@click="toSet(2)">点击更换标题小标题与概述</div>
<p class="en" style="margin-top: -15px;font-size: 1.6rem">{{ modules[2].form.subTitle }}</p>
<div class="text" v-html="modules[2].form.des"></div>
<div class="cover" @click="toSet(2)">点击更换标题小标题与概述</div>
</div>
</div>
</div>
</div>
<Module ref="module"
:data.sync="curData"
:visible.sync="diaVisible"
@moduleSubmit="moduleSubmit" />
<Module ref="module" :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
</div>
</template>
@ -94,6 +81,7 @@ export default {
<style lang="scss" scoped>
@import '../../../styles/page/page.scss';
.history {
h6 {
position: relative;
@ -102,6 +90,7 @@ export default {
font-weight: 500;
color: #333333;
}
.en {
margin-top: -25px;
font-size: 2.4rem;
@ -109,6 +98,7 @@ export default {
font-weight: 300;
color: #e3e3e3;
}
.text {
max-width: 1200px;
margin: 30px 0;

@ -4,11 +4,9 @@
<div class="actions">
<p class="page-name">页面设置/IASF中文首页</p>
<div>
<el-button type="primary"
@click="preview">预览</el-button>
<el-button type="primary" @click="preview">预览</el-button>
<el-button @click="save(0)">保存为草稿</el-button>
<el-button type="primary"
@click="save(1)">发布</el-button>
<el-button type="primary" @click="save(1)">发布</el-button>
<el-button @click="back">放弃编辑</el-button>
</div>
</div>
@ -18,54 +16,39 @@
<el-carousel height="500px"
:indicator-position="modules[0].list.filter(e => e.isEnable).length > 1 ? '' : 'none'">
<template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable"
:key="i">
<img width="100%"
height="100%"
:src="item.pic"
alt="">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<img width="100%" height="100%" :src="item.pic" alt="">
</el-carousel-item>
</template>
</el-carousel>
<div class="cover"
@click="toSet(0)">点击更换banner与链接</div>
<div class="cover" @click="toSet(0)">点击更换banner与链接</div>
</div>
<div class="block">
<div class="inner">
<div class="c-wrap">
<h2 class="b-title news-title">{{ modules[1].form.title }}</h2>
<p class="intro wow fadeInUp"
data-wow-delay="0.5s">{{ modules[1].form.des }}</p>
<div class="cover"
@click="toSet(1)">点击更换标题与描述</div>
<p class="intro wow fadeInUp" data-wow-delay="0.5s">{{ modules[1].form.des }}</p>
<div class="cover" @click="toSet(1)">点击更换标题与描述</div>
</div>
<ul class="card">
<li class="wow fadeInDown"
data-wow-delay="0.2s">
<img class="pic"
:src="modules[2].form.pic"
alt="">
<li class="wow fadeInDown" data-wow-delay="0.2s">
<img class="pic" :src="modules[2].form.pic" alt="">
<div class="texts">
<div class="name">SILF</div>
<h6>{{ modules[2].form.title }}</h6>
<p class="des">{{ modules[2].form.des }}</p>
</div>
<div class="cover"
@click="toSet(2)">点击更换图片标题概述与链接</div>
<div class="cover" @click="toSet(2)">点击更换图片标题概述与链接</div>
</li>
<li class="wow fadeInDown"
data-wow-delay="0.6s">
<img class="pic"
:src="modules[3].form.pic"
alt="">
<li class="wow fadeInDown" data-wow-delay="0.6s">
<img class="pic" :src="modules[3].form.pic" alt="">
<div class="texts">
<div class="name">S³FEL</div>
<h6>{{ modules[3].form.title }}</h6>
<p class="des">{{ modules[3].form.des }}</p>
</div>
<div class="cover"
@click="toSet(3)">点击更换图片标题概述与链接</div>
<div class="cover" @click="toSet(3)">点击更换图片标题概述与链接</div>
</li>
</ul>
</div>
@ -75,106 +58,83 @@
<div class="inner">
<div class="c-wrap">
<h2 class="b-title news-title">{{ modules[4].form.title }}</h2>
<p class="intro wow fadeInUp"
data-wow-delay="0.5s">{{ modules[4].form.des }}</p>
<div class="cover"
@click="toSet(4)">点击更换标题与描述</div>
<p class="intro wow fadeInUp" data-wow-delay="0.5s">{{ modules[4].form.des }}</p>
<div class="cover" @click="toSet(4)">点击更换标题与描述</div>
</div>
<div class="c-wrap">
<div class="news-banner">
<img style="width: 50%;height: 410px;overflow: hidden;"
width="100%"
height="480"
src="https://huorantech.com/images/about/5.png"
alt="">
<img style="width: 50%;height: 410px;overflow: hidden;" width="100%" height="480"
src="https://huorantech.com/images/about/5.png" alt="">
<div class="right">
<h6>IASF is driven to serve the Science and industry, and solve grand challenges through research and innovation. We are open and creative</h6>
<div class="des">Innovation centers are distributed in the bay areas, such as the San Francisco Bay area, the New York Bay area, and the Tokyo Bay area in Japan. And the Guangdong-Hong Kong-Macao Greater Bay </div>
<h6>IASF is driven to serve the Science and industry, and solve grand challenges through research and
innovation. We are open and creative</h6>
<div class="des">Innovation centers are distributed in the bay areas, such as the San Francisco Bay
area, the
New York Bay area, and the Tokyo Bay area in Japan. And the Guangdong-Hong Kong-Macao Greater Bay
</div>
<p class="meta">2022-07-24 | Research</p>
</div>
</div>
<ul class="news">
<li>
<img class="pic"
src="https://huorantech.com/images/about/5.png"
alt="">
<img class="pic" src="https://huorantech.com/images/about/5.png" alt="">
<div class="texts">
<p class="meta">2022-07-24 | 综合新闻</p>
<div class="des">X射线自由电子激光已经成为了化学生物物理等领域不可或缺的研究手段</div>
<img class="arrow"
src="@/assets/images/arrow.png"
alt="">
<img class="arrow" src="@/assets/images/arrow.png" alt="">
</div>
</li>
<li>
<img class="pic"
src="https://huorantech.com/images/about/5.png"
alt="">
<img class="pic" src="https://huorantech.com/images/about/5.png" alt="">
<div class="texts">
<p class="meta">2022-07-24 | 建设进展</p>
<div class="des">自由电子激光装置调试及运行过程中提供稳定可靠的单发辐射脉冲纵向信息</div>
<img class="arrow"
src="@/assets/images/arrow.png"
alt="">
<img class="arrow" src="@/assets/images/arrow.png" alt="">
</div>
</li>
<li>
<img class="pic"
src="https://huorantech.com/images/about/5.png"
alt="">
<img class="pic" src="https://huorantech.com/images/about/5.png" alt="">
<div class="texts">
<p class="meta">2022-07-24 | 学术动态</p>
<div class="des">基于上海软X射线自由电子激光试验装置科研人员对这一方法进行了实验验证</div>
<img class="arrow"
src="@/assets/images/arrow.png"
alt="">
<img class="arrow" src="@/assets/images/arrow.png" alt="">
</div>
</li>
</ul>
<div class="cover"
@click="toSet(5)">关联栏目</div>
<div class="cover" @click="toSet(5)">关联栏目</div>
</div>
<ul class="news-carousel">
<li>
<img class="pic"
src="https://huorantech.com/images/about/5.png"
alt="">
<img class="pic" src="https://huorantech.com/images/about/5.png" alt="">
<div class="texts">
<h6>媒体关注</h6>
<p class="meta">来源人民日报</p>
<div class="des">进深圳规划中的深圳中能高重复频率X射线自由电子激光项目和大连极紫外自由电子</div>
<p class="date">2022-07-24</p>
</div>
<div class="cover"
@click="toSet(6)">关联栏目</div>
<div class="cover" @click="toSet(6)">关联栏目</div>
</li>
<li>
<img class="pic"
src="https://huorantech.com/images/about/5.png"
alt="">
<img class="pic" src="https://huorantech.com/images/about/5.png" alt="">
<div class="texts">
<h6>媒体关注</h6>
<p class="meta">来源人民日报</p>
<div class="des">进深圳规划中的深圳中能高重复频率X射线自由电子激光项目和大连极紫外自由电子</div>
<p class="date">2022-07-24</p>
</div>
<div class="cover"
@click="toSet(7)">关联栏目</div>
<div class="cover" @click="toSet(7)">关联栏目</div>
</li>
<li>
<img class="pic"
src="https://huorantech.com/images/about/5.png"
alt="">
<img class="pic" src="https://huorantech.com/images/about/5.png" alt="">
<div class="texts">
<h6>媒体关注</h6>
<p class="meta">来源人民日报</p>
<div class="des">进深圳规划中的深圳中能高重复频率X射线自由电子激光项目和大连极紫外自由电子</div>
<p class="date">2022-07-24</p>
</div>
<div class="cover"
@click="toSet(8)">关联栏目</div>
<div class="cover" @click="toSet(8)">关联栏目</div>
</li>
</ul>
</div>
@ -184,16 +144,12 @@
<div class="inner">
<div class="c-wrap">
<h2 class="b-title wow fadeInUp">{{ modules[9].form.title }}</h2>
<p class="intro wow fadeInUp"
data-wow-delay="0.5s">{{ modules[9].form.des }}</p>
<div class="cover"
@click="toSet(9)">点击更换标题与描述</div>
<p class="intro wow fadeInUp" data-wow-delay="0.5s">{{ modules[9].form.des }}</p>
<div class="cover" @click="toSet(9)">点击更换标题与描述</div>
</div>
<ul class="people">
<li class="wow fadeInDown">
<img class="pic"
src="https://huorantech.com/images/careers/6.png"
alt="">
<img class="pic" src="https://huorantech.com/images/careers/6.png" alt="">
<div class="texts">
<h6>王晓凡</h6>
<p class="job">岗位物理组工程师</p>
@ -202,9 +158,7 @@
</div>
</li>
<li class="wow fadeInDown">
<img class="pic"
src="https://huorantech.com/images/careers/7.png"
alt="">
<img class="pic" src="https://huorantech.com/images/careers/7.png" alt="">
<div class="texts">
<h6>王晓凡</h6>
<p class="job">岗位物理组工程师</p>
@ -213,9 +167,7 @@
</div>
</li>
<li class="wow fadeInDown">
<img class="pic"
src="https://huorantech.com/images/careers/8.png"
alt="">
<img class="pic" src="https://huorantech.com/images/careers/8.png" alt="">
<div class="texts">
<h6>王晓凡</h6>
<p class="job">岗位物理组工程师</p>
@ -223,8 +175,7 @@
<div class="text">我们做物理设计就好像盖房子画设计图决不能眼界太窄不能指望房子过程中或者装修时再去提高一定要保持国际先进的视野和高度具备一定的超前性和前瞻性</div>
</div>
</li>
<div class="cover"
@click="toSet(10)">关联栏目</div>
<div class="cover" @click="toSet(10)">关联栏目</div>
</ul>
</div>
</div>
@ -233,24 +184,17 @@
<div class="inner">
<div class="c-wrap">
<h2 class="b-title wow fadeInUp">{{ modules[11].form.title }}</h2>
<p class="intro wow fadeInUp"
data-wow-delay="0.5s">{{ modules[11].form.des }}</p>
<div class="cover"
@click="toSet(11)">点击更换标题与描述</div>
<p class="intro wow fadeInUp" data-wow-delay="0.5s">{{ modules[11].form.des }}</p>
<div class="cover" @click="toSet(11)">点击更换标题与描述</div>
</div>
<div class="talent">
<div class="left wow fadeInLeft"
data-wow-delay="0.5s">
<div class="left wow fadeInLeft" data-wow-delay="0.5s">
<h6>{{ modules[12].form.title }}</h6>
<p class="meta">{{ modules[12].form.subTitle }}</p>
<div class="text"
v-html="modules[12].form.des"></div>
<div class="text" v-html="modules[12].form.des"></div>
</div>
<img :src="modules[11].form.pic"
alt=""
class="pic">
<div class="cover"
@click="toSet(12)">点击更换标题描述链接与图片</div>
<img :src="modules[11].form.pic" alt="" class="pic">
<div class="cover" @click="toSet(12)">点击更换标题描述链接与图片</div>
</div>
</div>
</div>
@ -259,83 +203,55 @@
<div class="inner c-wrap">
<div class="left">
<h6>{{ modules[13].form.title }}</h6>
<div class="text"
v-html="modules[13].form.des"></div>
<img src="@/assets/images/arrow-white.png"
alt="">
<div class="text" v-html="modules[13].form.des"></div>
<img src="@/assets/images/arrow-white.png" alt="">
</div>
<img class="pic"
:src="modules[13].form.pic"
alt="">
<div class="cover"
@click="toSet(13)">点击更换标题描述链接与图片</div>
<img class="pic" :src="modules[13].form.pic" alt="">
<div class="cover" @click="toSet(13)">点击更换标题描述链接与图片</div>
</div>
</div>
<div class="block"
style="margin-top: 100px">
<div class="block" style="margin-top: 100px">
<div class="inner">
<ul class="entry">
<li>
<img class="icon"
:src="modules[14].form.pic"
alt="">
<img class="icon" :src="modules[14].form.pic" alt="">
<p class="text">{{ modules[14].form.title }}</p>
<div class="cover"
@click="toSet(14)">点击更换</div>
<div class="cover" @click="toSet(14)">点击更换</div>
</li>
<li>
<img class="icon"
:src="modules[15].form.pic"
alt="">
<img class="icon" :src="modules[15].form.pic" alt="">
<p class="text">{{ modules[15].form.title }}</p>
<div class="cover"
@click="toSet(15)">点击更换</div>
<div class="cover" @click="toSet(15)">点击更换</div>
</li>
<li>
<img class="icon"
:src="modules[16].form.pic"
alt="">
<img class="icon" :src="modules[16].form.pic" alt="">
<p class="text">{{ modules[16].form.title }}</p>
<div class="cover"
@click="toSet(16)">点击更换</div>
<div class="cover" @click="toSet(16)">点击更换</div>
</li>
<li>
<img class="icon"
:src="modules[17].form.pic"
alt="">
<img class="icon" :src="modules[17].form.pic" alt="">
<p class="text">{{ modules[17].form.title }}</p>
<div class="cover"
@click="toSet(17)">点击更换</div>
<div class="cover" @click="toSet(17)">点击更换</div>
</li>
<li>
<img class="icon"
:src="modules[18].form.pic"
alt="">
<img class="icon" :src="modules[18].form.pic" alt="">
<p class="text">{{ modules[18].form.title }}</p>
<div class="cover"
@click="toSet(18)">点击更换</div>
<div class="cover" @click="toSet(18)">点击更换</div>
</li>
</ul>
</div>
</div>
</div>
<Module ref="module"
:data.sync="curData"
:visible.sync="diaVisible"
@moduleSubmit="moduleSubmit" />
<Module ref="module" :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
<ul class="tools">
<li v-for="(item, i) in modules[19].list"
:key="i">
<img :src="'https://huorantech.com/images/iasf/icon' + (i < 4 ? i + 1 : 1) + '.png'"
alt=""
class="icon">
<li v-for="(item, i) in modules[19].list" :key="i">
<img :src="'https://huorantech.com/images/iasf/icon' + (i < 4 ? i + 1 : 1) + '.png'" alt="" class="icon">
{{ item.title }}
</li>
<div class="cover"
@click="toSet(19)">点击更换导航</div>
<div class="cover" @click="toSet(19)">点击更换导航</div>
</ul>
</div>
</template>
@ -377,65 +293,80 @@ export default {
<style lang="scss" scoped>
@import '../../../styles/page/page.scss';
.iasf-banner {
height: 600px;
img {
width: 100%;
height: 100%;
}
.texts {
position: absolute;
top: 50%;
left: 120px;
h6,
.text {
padding: 20px 15px;
color: #fff;
background-color: rgba(0, 0, 0, 0.29);
}
h6 {
margin-bottom: 30px;
font-size: 3rem;
font-family: AlimamaShuHeiTi-Bold, AlimamaShuHeiTi;
}
.text {
font-size: 1.1rem;
font-family: AppleSystemUIFont;
}
}
}
.block {
padding-top: 3.15rem;
.b-title {
font-size: 2.25rem;
}
.intro {
font-size: 1.35rem;
margin-bottom: 3.6rem;
}
}
.card {
display: flex;
justify-content: space-between;
li {
position: relative;
width: 47%;
height: 366px;
transition: 0.3s;
overflow: hidden;
&:hover {
.project {
top: -100%;
}
.texts {
top: 0;
}
}
}
.pic {
width: 100%;
height: auto;
}
.texts {
position: absolute;
top: 0;
@ -451,10 +382,12 @@ export default {
background-color: rgba(0, 0, 0, 0.3);
transition: 0.3s;
}
.name {
font-size: 2rem;
font-family: PingFangSC-Medium, PingFang SC;
}
h6 {
margin: 1rem 0;
line-height: 2rem;
@ -462,40 +395,51 @@ export default {
font-family: PingFangSC-Medium, PingFang SC;
@include mul-ellipsis(2);
}
.des {
font-size: 1.2rem;
line-height: 30px;
}
}
.news-title:after {
display: none;
}
.news-banner {
display: flex;
cursor: pointer;
.pic {
transition: 0.5s;
&:hover {
transform: scale(1.3);
}
}
.right {
position: relative;
width: 50%;
padding: 50px 50px 30px;
background: #1583ff;
color: #fff;
h6 {
font-size: 1.34rem;
}
.des {
font-size: 1.02rem;
}
.meta {
font-size: 1.04rem;
}
&:hover {
background: #465f85;
h6,
.des,
.meta {
@ -504,44 +448,54 @@ export default {
}
}
}
h6 {
font-size: 1.3rem;
transition: 0.3s;
}
.des {
margin: 30px 0;
font-size: 0.9rem;
line-height: 24px;
transition: 0.3s;
}
.meta {
font-size: 0.8rem;
transition: 0.3s;
}
}
.news {
display: flex;
flex-wrap: wrap;
margin: 10px 0;
li {
width: calc((100% - 18px) / 3);
margin-right: 9px;
&:nth-child(3n) {
margin-right: 0;
}
}
.pic {
width: 100%;
height: 220px;
}
.texts {
padding: 20px 24px;
background-color: #fff;
}
.meta {
font-size: 0.9rem;
color: #666;
}
h6 {
margin-top: 5px;
font-size: 1.1rem;
@ -550,21 +504,26 @@ export default {
@include mul-ellipsis(2);
}
}
.news-carousel {
display: flex;
li {
position: relative;
width: calc((100% - 18px) / 3);
height: 320px;
margin-right: 9px;
&:nth-child(3n) {
margin-right: 0;
}
}
.pic {
width: 100%;
height: 100%;
}
.texts {
position: absolute;
top: 0;
@ -573,112 +532,136 @@ export default {
color: #fff;
background-color: rgba(0, 0, 0, 0.3);
}
h6 {
font-size: 1.2rem;
font-family: PingFangSC-Medium, PingFang SC;
}
.meta {
margin: 8px 0;
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.86);
}
.des {
margin-bottom: 8px;
font-size: 1rem;
font-family: PingFangSC-Medium, PingFang SC;
}
.date {
font-size: 0.8rem;
}
}
.people {
position: relative;
display: flex;
li {
width: 33.33%;
padding: 30px;
text-align: center;
border-right: 1px solid #ddd;
&:last-child {
border-right: 0;
}
}
.pic {
width: 260px;
height: 260px;
margin-bottom: 10px;
border-radius: 50%;
}
h6 {
font-size: 1.1rem;
font-family: PingFangSC-Medium, PingFang SC;
color: #333;
}
.job {
margin: 10px 0;
font-size: 1rem;
font-family: PingFangSC-Medium, PingFang SC;
color: #333;
}
.hobby {
margin-bottom: 15px;
font-size: 1rem;
color: #333;
}
.text {
font-size: 1rem;
line-height: 1.6;
color: #333;
}
}
.talent {
position: relative;
display: flex;
color: #fff;
background: #111c43;
border-radius: 0px 100px 0px 100px;
.left {
width: 50%;
padding: 120px 0 0 5%;
}
h6 {
font-size: 1.6rem;
}
.meta {
margin-top: 8px;
font-size: 0.9rem;
color: #fff;
}
.text {
margin: 20px 0;
font-size: 1rem;
line-height: 2;
}
.pic {
width: 50%;
min-height: 465px;
}
}
.about {
background: #0a7fec;
.inner {
position: relative;
height: 350px;
padding: 50px;
}
.left {
width: 48%;
}
h6 {
font-size: 1.8rem;
font-family: PingFangSC-Semibold, PingFang SC;
color: #fff;
}
.text {
margin: 20px 0;
font-size: 1rem;
color: #fff;
}
.pic {
position: absolute;
top: -60px;
@ -687,12 +670,14 @@ export default {
height: 460px;
}
}
.entry {
display: flex;
justify-content: space-between;
padding: 50px 10%;
background-color: #091733;
margin-bottom: 100px;
li {
position: relative;
display: inline-flex;
@ -701,9 +686,11 @@ export default {
align-items: center;
text-align: center;
}
img {
max-width: 100px;
}
.text {
margin-top: 15px;
font-size: 1rem;
@ -711,14 +698,18 @@ export default {
color: #fff;
}
}
@media (max-width: 1200px) {
.block {
padding: 3.125rem 0;
.inner {
width: 95%;
margin: 0 auto;
.card {
flex-direction: column;
li {
margin-top: 1.25rem;
width: 100%;
@ -727,11 +718,13 @@ export default {
}
}
}
.tools {
z-index: 100;
position: fixed;
top: 430px;
right: 0;
li {
display: flex;
justify-content: center;
@ -743,12 +736,14 @@ export default {
line-height: 56px;
background-color: rgba(19, 18, 19, 0.94);
cursor: pointer;
&.active {
width: 192px;
color: #fff;
background-color: rgba(1, 129, 247, 0.94);
}
}
.icon {
margin-right: 10px;
}

@ -2,203 +2,131 @@
<div class="page">
<div class="tool">
<div class="search-wrap">
<el-input placeholder="请输入悬浮栏名称"
v-model.trim="keyword"
clearable></el-input>
<el-input placeholder="请输入悬浮栏名称" v-model.trim="keyword" clearable></el-input>
</div>
<div class="actions">
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:新增'"
type="primary"
@click="add">新增</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:删除'"
@click="batchDel">删除</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:新增'" type="primary" @click="add">新增</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:删除'" @click="batchDel">删除</el-button>
</div>
</div>
<el-table v-loading="listLoading"
ref="table"
:data="list"
default-expand-all
class="table"
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection"
width="50"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column prop="columnName"
show-overflow-tooltip
label="悬浮栏名称"
min-width="140"></el-table-column>
<el-table-column prop="typeId"
label="应用范围"
min-width="100"></el-table-column>
<el-table-column prop="typeId"
label="内容模块"
min-width="100"></el-table-column>
<el-table-column prop="typeId"
label="创建时间"
min-width="100"></el-table-column>
<el-table-column prop="typeId"
label="最近编辑"
min-width="100"></el-table-column>
<el-table-column prop="typeId"
label="编辑人"
min-width="100"></el-table-column>
<el-table-column label="操作"
width="180">
<el-table v-loading="listLoading" ref="table" :data="list" default-expand-all class="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="50" align="center" :reserve-selection="true"></el-table-column>
<el-table-column prop="schemeName" show-overflow-tooltip label="悬浮栏名称" min-width="140"></el-table-column>
<el-table-column prop="scopeOfApplication" label="应用范围" min-width="100"></el-table-column>
<el-table-column prop="numberOfContentModules" label="内容模块" min-width="100"></el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="100"></el-table-column>
<el-table-column prop="updateTime" label="最近编辑" min-width="100"></el-table-column>
<el-table-column prop="editorSName" label="编辑人" min-width="100"></el-table-column>
<el-table-column label="状态" min-width="100">
<template slot-scope="scope">{{ scope.row.isDisable ? '禁用' : '启用' }}</template>
</el-table-column>
<el-table-column label="操作" width="180">
<template slot-scope="scope">
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:编辑'"
type="text"
@click="edit(scope.row, 'edit')">编辑</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:删除'"
type="text"
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:编辑'" type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:删除'" type="text"
@click="del(scope.row)">删除</el-button>
<el-switch class="m-l-10"
v-model="scope.row.menuVisible"
:active-value="0"
:inactive-value="1"
<el-switch class="m-l-10" v-model="scope.row.isDisable" :active-value="0" :inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
</el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="page"
layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
<el-dialog title="模块管理"
:visible.sync="moduleVisible"
width="1000px"
:close-on-click-modal="false">
<el-form ref="form"
:model="moduleForm"
:rules="moduleRules">
<el-form-item prop="columnName"
label="悬浮栏目名称"
label-width="110px">
<el-input style="width: 200px"
placeholder="请输入栏目名称"
v-model="moduleForm.columnName"
clearable
<el-dialog title="模块管理" :visible.sync="moduleVisible" width="1000px" :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-suffix="">
<div class="flex">
<el-form-item prop="schemeName" label="悬浮栏目名称" label-width="130px">
<el-input style="width: 200px" placeholder="请输入悬浮栏目名称" v-model="form.schemeName" clearable
maxlength="10"></el-input>
</el-form-item>
<el-table class="module-table"
:data="modules"
header-align="center"
row-key="id">
<el-table-column prop="columnName"
label="图片"
min-width="140"></el-table-column>
<el-table-column prop="columnName"
label="标题"
min-width="140"></el-table-column>
<el-table-column prop="columnName"
label="内容"
min-width="140"></el-table-column>
<el-table-column label="操作"
:width="150"
align="center">
<!-- <el-form-item prop="style" label="悬浮栏样式" label-width="110px">
<el-select v-model="form.floatingBarStyle" clearable>
<el-option v-for="item in styles" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item> -->
</div>
<el-table class="module-table" :data="form.floatingColumnSchemeModules" header-align="center" row-key="id">
<el-table-column prop="pictureAddress" label="图片" min-width="140">
<template slot-scope="scope">
<img class="pic" :src="scope.row.pictureAddress" alt="">
</template>
</el-table-column>
<el-table-column prop="schemeTitle" label="标题" min-width="240"></el-table-column>
<el-table-column prop="schemeContentJson" label="内容" min-width="240">
<template slot-scope="scope">
<div v-html="scope.row.schemeContentJson"></div>
</template>
</el-table-column>
<el-table-column label="操作" :width="110" align="center">
<template slot-scope="scope">
<div class="flex a-center">
<el-switch v-model="scope.row.isEnable"
:active-value="1"
:inactive-value="0">
<el-switch v-model="scope.row.isDisable" :active-value="0" :inactive-value="1">
</el-switch>
<i class="el-icon-edit-outline del"
@click="editRow(scope.row, scope.$index)"></i>
<i class="el-icon-delete del"
@click="delRow(scope.$index)"></i>
<i class="el-icon-edit-outline del" @click="editRow(scope.row, scope.$index)"></i>
<i class="el-icon-delete del" @click="delRow(scope.$index)"></i>
</div>
</template>
</el-table-column>
</el-table>
<div class="plus">
<i class="el-icon-circle-plus-outline"
@click="addRow"></i>
<div class="plus m-b-30">
<i class="el-icon-circle-plus-outline" @click="addRow"></i>
</div>
<el-form-item label="应用范围">
<el-select v-model="moduleForm.range"
clearable>
<el-option v-for="item in ranges"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
<div class="flex">
<el-radio-group class="m-t-10" v-model="range">
<el-radio :label="0">网站全局</el-radio>
<el-radio :label="1">选择栏目</el-radio>
</el-radio-group>
<el-cascader v-if="range" class="m-l-30" v-model="selectColumn" :options="columns" :props="columnProps"
clearable></el-cascader>
</div>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="moduleVisible = false">取消</el-button>
<el-button type="primary"
@click="moduleSubmit">确定</el-button>
<el-button type="primary" @click="moduleSubmit">确定</el-button>
</span>
</el-dialog>
<el-dialog title="新增内容"
:visible.sync="contentVisible"
width="700px"
:close-on-click-modal="false">
<el-form ref="form"
:model="contentForm"
:rules="contentRules">
<el-form-item prop="titleImg"
label="图片">
<el-upload class="avatar-uploader"
accept=".jpg,.png,.jpeg,.gif"
:on-change="file => changeFile(file, 0)"
:show-file-list="false"
:action="this.api.upload"
:auto-upload="false">
<img v-if="contentForm.titleImg"
:src="contentForm.titleImg"
class="avatar">
<div class="uploader-default"
v-else>
<img class="plus"
src="@/assets/images/plus.png"
alt="">
<el-dialog title="新增内容" :visible.sync="contentVisible" width="900px" :close-on-click-modal="false">
<el-form ref="contentForm" :model="curRow" :rules="contentRules" label-width="100px" label-suffix="">
<el-form-item prop="pictureAddress" label="图片">
<el-upload class="avatar-uploader" accept=".jpg,.png,.jpeg,.gif" :on-change="file => changeFile(file)"
:show-file-list="false" :action="this.api.upload" :auto-upload="false">
<img v-if="curRow.pictureAddress" :src="curRow.pictureAddress" class="avatar">
<div class="uploader-default" v-else>
<img class="plus" src="@/assets/images/plus.png" alt="">
<p>点击上传</p>
</div>
</el-upload>
</el-form-item>
<el-form-item prop="columnName"
label="标题">
<el-input style="width: 200px"
placeholder="请输入栏目名称"
v-model="contentForm.columnName"
clearable
<el-form-item prop="schemeTitle" label="标题">
<el-input style="width: 200px" placeholder="请输入标题" v-model="curRow.schemeTitle" clearable
maxlength="20"></el-input>
</el-form-item>
<el-form-item prop="columnName"
label="内容设置">
<el-radio-group v-model="contentForm.connectionType">
<el-radio :label="1">富文本</el-radio>
<el-radio :label="2">链接</el-radio>
</el-radio-group>
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda'
v-model="contentForm.connectionType"
<el-form-item prop="schemeContentJson" label="内容设置">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="curRow.schemeContentJson"
:init="editorConfig" />
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="contentVisible = false">取消</el-button>
<el-button type="primary"
@click="contentSubmit">确定</el-button>
<el-button type="primary" @click="contentSubmit">确定</el-button>
</span>
</el-dialog>
<!-- 剪裁组件弹窗 -->
<el-dialog title="图片裁剪"
append-to-body
:visible.sync="cropperModel"
width="1100px"
:close-on-click-modal="false">
<Cropper ref="cropper"
:img-file.sync="file"
:is-upload="isUpload"
:fixed="true"
:fixedNumber.sync="fixedNumber"
<el-dialog title="图片裁剪" append-to-body :visible.sync="cropperModel" width="1100px" :close-on-click-modal="false">
<Cropper ref="cropper" :img-file.sync="file" :is-upload="isUpload" :fixed="true" :fixedNumber.sync="fixedNumber"
@upload="customUpload" />
</el-dialog>
</div>
@ -208,47 +136,67 @@
import Setting from '@/setting'
import Util from '@/libs/util'
import Axios from 'axios'
import Cropper from '@/components/img-upload/Cropper'
import Editor from '@tinymce/tinymce-vue'
import editorConfig from '@/components/editor'
import _ from 'lodash'
export default {
data () {
return {
editorConfig,
siteId: this.$store.state.content.site.id,
siteName: this.$store.state.content.site.siteName,
templates: [],
listStyle: [],
pageStyle: [],
detailStyle: [],
keyword: '',
searchTimer: null,
list: [],
page: 1,
pageSize: 10,
total: 0,
multipleSelection: [],
listLoading: false,
styleVisible: false,
ranges: [],
moduleForm: {
id: '',
columnName: '',
navigationStyle: 1,
styleTemplate: 1,
siteId: this.$store.state.content.site.id
range: 0,
selectColumn: [],
columns: [],
columnProps: {
multiple: true,
value: 'id',
label: 'columnName'
},
originForm: {},
form: {
editorId: this.$store.state.user.userId,
schemeName: '',
floatingBarStyle: '1',
siteId: this.$store.state.content.site.id,
floatingColumnSchemeModules: [],
floatingColumnSchemeScopeOfApplications: [],
},
originModules: {
pictureAddress: '',
schemeContentJson: '',
schemeTitle: '',
isDisable: 0,
},
moduleRules: {
columnName: [
rules: {
schemeName: [
{ required: true, message: '请输入悬浮栏目名称', trigger: 'blur' }
],
},
moduleVisible: false,
modules: [{}],
modules: [],
curRow: {},
curModule: 0,
contentVisible: false,
contentForm: {},
contentRules: {
columnName: [
{ required: true, message: '请输入悬浮栏目名称', trigger: 'blur' }
pictureAddress: [
{ required: true, message: '请上传图片', trigger: 'change' }
],
schemeTitle: [
{ required: true, message: '请输入标题', trigger: 'blur' }
],
schemeContentJson: [
{ required: true, message: '请输入内容', trigger: 'blur' }
],
},
@ -259,7 +207,8 @@ export default {
};
},
components: {
Editor
Editor,
Cropper,
},
watch: {
keyword: function (val) {
@ -282,18 +231,20 @@ export default {
name: '悬浮栏设置'
}
])
this.originForm = _.cloneDeep(this.form)
this.getData()
this.getColumn()
},
methods: {
getData () {
this.$post(this.api.listWithTree, {
this.$post(this.api.listFloating, {
siteId: this.siteId,
columnName: this.keyword,
templateId: '',
typeId: '',
isSort: 1
search: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
}).then(({ data }) => {
this.list = data
this.list = data.records
this.total = +data.total
this.listLoading = false
}).catch(err => {
this.listLoading = false
@ -305,16 +256,32 @@ export default {
this.page = 1
this.getData()
},
//
async getColumn () {
const { data } = await this.$post(this.api.listWithTree, {
siteId: this.siteId,
columnName: '',
templateId: '',
typeId: '',
isSort: 1
})
this.columns = data
},
add () {
this.range = 0
this.selectColumn = []
this.form = _.cloneDeep(this.originForm)
this.moduleVisible = true
},
//
addRow () {
// this.data.list.push(JSON.parse(JSON.stringify(this.data.historyForm)))
this.curRow = _.cloneDeep(this.originModules)
this.curModule = -1
this.contentVisible = true
},
//
editRow (row, i = 0) {
this.curRow = JSON.parse(JSON.stringify(row))
this.curRow = _.cloneDeep(row)
this.curModule = i
this.contentVisible = true
},
@ -323,19 +290,84 @@ export default {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
// list.splice(i, 1)
this.form.floatingColumnSchemeModules.splice(i, 1)
}).catch(() => { })
},
edit (row, type) {
this.$router.push(`add?id=${row.id}&level=${row.level + 1}&type=${type}`)
async edit (row) {
this.moduleVisible = true
const { data } = await this.$post(`${this.api.findFloating}?id=${row.floatingBarSchemeId}`)
const range = data.floatingColumnSchemeScopeOfApplications
// applicationScopeId0
this.range = row.isGlobal ? 0 : 1
if (!row.isGlobal) {
const column = []
//
range.map(e => {
column.push(e.applicationScopeId.split(',').map(n => +n))
})
this.selectColumn = column
console.log("🚀 ~ edit ~ this.selectColumn:", this.selectColumn)
}
this.form = data
},
//
moduleSubmit () {
this.$refs.form.validate(async (valid) => {
if (valid) {
if (this.submiting) return false
const form = JSON.parse(JSON.stringify(this.form))
if (!form.floatingColumnSchemeModules.length) return Util.warningMsg('请添加内容模块')
const column = this.selectColumn
if (this.range && !column.length) return Util.warningMsg('请选择栏目')
this.submiting = true
if (this.range) {
const scope = []
// debugger
column.map(e => {
scope.push({
applicationScopeId: typeof e === 'number' ? e : e.join(',')
})
})
form.floatingColumnSchemeScopeOfApplications = scope
} else {
form.floatingColumnSchemeScopeOfApplications = [{
applicationScopeId: 0
}]
}
if (!form.floatingBarSchemeId) form.founderId = form.editorId
// debugger
try {
await this.$post(this.api.saveFloating, form)
Util.successMsg('新增成功!')
this.moduleVisible = false
this.getData()
setTimeout(() => {
this.submiting = false
}, 2000)
} catch (e) {
this.submiting = false
}
}
})
},
//
contentSubmit () {
this.$refs.contentForm.validate(async (valid) => {
if (valid) {
this.contentVisible = false
const row = this.curRow
if (this.curModule === -1) {
this.form.floatingColumnSchemeModules.push(_.cloneDeep(row))
} else {
const list = this.form.floatingColumnSchemeModules[this.curModule]
for (const i in row) {
this.$set(list, i, row[i])
}
}
}
})
},
//
customUpload (data) {
@ -362,14 +394,14 @@ export default {
}, 1000);
return false
}
this.$set(this.curForm, 'pic', data.url)
this.$set(this.curRow, 'pictureAddress', data.url)
}).catch(res => { })
this.$refs.cropper.isDisabled = false
this.isUpload = false
this.cropperModel = false
},
//
changeFile (file, form) {
changeFile (file) {
const { size, name } = file
const ext = name.substring(name.lastIndexOf('.') + 1)
if (!Util.isImg(ext)) {
@ -381,7 +413,6 @@ export default {
return false
}
this.file = file
this.curForm = form
this.cropperModel = true
this.$nextTick(() => {
this.$refs.cropper.updateImg({
@ -392,38 +423,37 @@ export default {
},
del (row) {
this.$confirm("删除栏目将会同时把栏目下的文章一并删除,是否确认删除栏目?", "提示", {
this.$confirm('确定要删除吗?', "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.deleteColumn}?ids=${row.id}`).then(res => {
util.successMsg("删除成功")
this.$post(`${this.api.batchDeletionFloating}?id=${row.floatingBarSchemeId}`).then(res => {
Util.successMsg("删除成功")
this.getData()
}).catch(res => { })
}).catch(() => { })
},
//
switchOff (val, row) {
this.$post(this.api.updateColumn, row).then(res => { }).catch((res) => { })
async switchOff (val, row) {
await this.$post(`${this.api.enableOrDisableScheme}?id=${row.floatingBarSchemeId}&isDisable=${row.isDisable}`)
},
//
batchDel () {
const list = this.multipleSelection
if (list.length) {
this.$confirm('删除栏目将会同时把栏目下的文章一并删除,是否确认删除栏目?', '提示', {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
const data = []
list.map(e => {
data.push('ids=' + e.id)
const ids = list.map(e => {
return 'id=' + e.floatingBarSchemeId
})
this.$post(`${this.api.deleteColumn}?${data.join('&')}`).then(res => {
this.$post(`${this.api.batchDeletionFloating}?${ids.join('&')}`).then(res => {
this.$refs.table.clearSelection()
util.successMsg("删除成功")
Util.successMsg("删除成功")
this.getData()
}).catch(res => { })
}).catch(() => { })
} else {
util.errorMsg('请先选择数据 !')
Util.errorMsg('请先选择数据 !')
}
},
handleSelectionChange (val) {
@ -446,15 +476,18 @@ export default {
color: $main-color;
cursor: pointer;
}
.del {
margin-left: 5px;
margin-left: 8px;
font-size: 18px;
color: #333;
cursor: pointer;
}
$upload-width: 220px;
$upload-height: 102px;
$upload-lg-height: 102px;
/deep/ .avatar-uploader {
.el-upload {
position: relative;
@ -464,6 +497,7 @@ $upload-lg-height: 102px;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.uploader-default {
display: flex;
height: $upload-height;
@ -472,6 +506,7 @@ $upload-lg-height: 102px;
align-items: center;
text-align: center;
background: #fafafa;
p {
margin-top: 10px;
font-size: 14px;
@ -480,6 +515,7 @@ $upload-lg-height: 102px;
}
}
}
&.avatar-uploader-lg {
.el-upload {
width: 100%;
@ -491,29 +527,31 @@ $upload-lg-height: 102px;
}
}
}
.avatar {
display: block;
width: $upload-width;
height: $upload-height;
}
.avatar-lg {
display: block;
width: 100%;
height: $upload-lg-height;
}
.el-upload__tip {
margin-top: 0;
p {
font-size: 12px;
color: #333;
}
}
}
.style-wrap {
display: flex;
margin-top: 10px;
.label {
margin-right: 30px;
}
.pic {
max-width: 100px;
margin: 10px 0;
}
</style>

@ -20,7 +20,8 @@
</div>
<div style="height: 504px;overflow: auto;scrollbar-width: none;-ms-overflow-style: none;">
<el-tree class="org" ref="orgs" :data="orgs" :props="defaultProps" highlight-current :expand-on-click-node="false" default-expand-all node-key="id" @node-click="handleNodeClick">
<el-tree class="org" ref="orgs" :data="orgs" :props="defaultProps" highlight-current
:expand-on-click-node="false" default-expand-all node-key="id" @node-click="handleNodeClick">
<span class="node-wrap" slot-scope="{ node, data }">
<div class="left">
<img src="@/assets/images/node.png" alt="">
@ -33,10 +34,12 @@
<el-button v-auth class="org-btn" @click="() => editOrg(node, data)" type="text">编辑部门</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button v-auth="'新增部门'" class="org-btn add" @click="() => addOrg(node, data)" type="text">添加子部门</el-button>
<el-button v-auth="'新增部门'" class="org-btn add" @click="() => addOrg(node, data)"
type="text">添加子部门</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button v-auth="'删除部门'" class="org-btn del" @click="() => delOrg(node, data)" type="text">删除</el-button>
<el-button v-auth="'删除部门'" class="org-btn del" @click="() => delOrg(node, data)"
type="text">删除</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -44,26 +47,16 @@
</el-tree>
</div>
</div>
<el-dialog
:title="orgForm.id ? '编辑' : '新增' + '部门'"
:visible.sync="orgVisible"
:close-on-click-modal="false"
width="50%"
>
<el-dialog :title="orgForm.id ? '编辑' : '新增' + '部门'" :visible.sync="orgVisible" :close-on-click-modal="false"
width="50%">
<el-form v-if="orgVisible" ref="orgForm" :model="orgForm" :rules="orgRules" label-width="100px">
<el-form-item label="部门名称" prop="name">
<el-input v-model.trim="orgForm.name" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="上级部门">
<span v-if="orgForm.pidName">{{ orgForm.pidName }}</span>
<el-cascader
v-else
:options="orgListDia"
v-model="cascaderValue"
:props="cascaderProps"
clearable
style="width: 100%"
>
<el-cascader v-else :options="orgListDia" v-model="cascaderValue" :props="cascaderProps" clearable
style="width: 100%">
</el-cascader>
</el-form-item>
</el-form>
@ -95,15 +88,19 @@
</div>
<el-table :data="list" class="table" ref="table" @selection-change="handleSelectionChange" row-key="id">
<el-table-column v-if="settings[0].show" type="selection" width="55" :reserve-selection="true"></el-table-column>
<el-table-column v-if="settings[0].show" type="selection" width="55"
:reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号"></el-table-column>
<el-table-column v-if="settings[1].show" prop="realName" label="员工姓名" min-width="100"></el-table-column>
<el-table-column v-if="settings[2].show" prop="username" label="账号" min-width="100"></el-table-column>
<el-table-column v-if="settings[3].show" prop="jobNumber" label="工号" min-width="100"></el-table-column>
<el-table-column v-if="settings[4].show" prop="phone" label="手机号" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column v-if="settings[5].show" prop="deptArchitectureName" label="所在部门" min-width="100"></el-table-column>
<el-table-column v-if="settings[4].show" prop="phone" label="手机号" min-width="100"
show-overflow-tooltip></el-table-column>
<el-table-column v-if="settings[5].show" prop="deptArchitectureName" label="所在部门"
min-width="100"></el-table-column>
<el-table-column v-if="settings[6].show" prop="createTime" label="创建日期" min-width="150"></el-table-column>
<el-table-column v-if="settings[7].show" prop="roleName" label="授权角色" show-overflow-tooltip min-width="100"></el-table-column>
<el-table-column v-if="settings[7].show" prop="roleName" label="授权角色" show-overflow-tooltip
min-width="100"></el-table-column>
<el-table-column v-if="settings[8].show" prop="groupName" label="用户组" min-width="100"></el-table-column>
<el-table-column v-if="settings[9].show" prop="lastLoginTime" label="最后登录时间" min-width="150"></el-table-column>
<el-table-column v-if="settings[10].show" label="操作" width="180">
@ -116,11 +113,14 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
<el-dialog :title="isDetail ? '查看' : (form.id ? '编辑' : '新增') + '员工'" :visible.sync="staffVisible" width="500px" class="dialog" :close-on-click-modal="false" @close="closeStaff">
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :disabled="isDetail" style='margin-right: 60px;'>
<el-dialog :title="isDetail ? '查看' : (form.id ? '编辑' : '新增') + '员工'" :visible.sync="staffVisible" width="500px"
class="dialog" :close-on-click-modal="false" @close="closeStaff">
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :disabled="isDetail"
style='margin-right: 60px;'>
<el-form-item prop="jobNumber" label="工号">
<el-input v-model.trim="form.jobNumber" placeholder="请输入工号"></el-input>
</el-form-item>
@ -134,22 +134,14 @@
<el-select v-model="form.roleIds" multiple style="width: 100%">
<template v-for="item in roleIds">
<!-- 不显示超管 -->
<el-option
v-if="item.name !== '超级管理员'"
:key="item.id"
:label="item.name"
:value="item.id">
<el-option v-if="item.name !== '超级管理员'" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</template>
</el-select>
</el-form-item>
<el-form-item label="所在部门">
<el-cascader
style="width: 100%"
v-model="form.deptArchitectureId"
:options="orgs"
:props="casProps"
></el-cascader>
<el-cascader style="width: 100%" v-model="form.deptArchitectureId" :options="orgs"
:props="casProps"></el-cascader>
</el-form-item>
<el-form-item prop="phone" label="手机号">
<el-input v-model.trim="form.phone" placeholder="请输入手机号" maxlength="11"></el-input>
@ -160,10 +152,7 @@
<el-form-item prop="groupId" label="用户组">
<el-select v-model="form.groupId" style="width: 100%">
<template v-for="item in userGroups">
<el-option
:key="item.id"
:label="item.groupName"
:value="item.id">
<el-option :key="item.id" :label="item.groupName" :value="item.id">
</el-option>
</template>
</el-select>
@ -180,19 +169,9 @@
<div style="margin-bottom: 10px;">
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div>
<el-upload
name="file"
accept=".xls,.xlsx"
:on-remove="handleRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.importStaff"
:file-list="uploadList"
:headers="headers"
>
<el-upload name="file" accept=".xls,.xlsx" :on-remove="handleRemove" :on-error="uploadError"
:on-success="uploadSuccess" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed"
:action="this.api.importStaff" :file-list="uploadList" :headers="headers">
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload>
<el-link v-if="uploadFaild" type="primary" @click="showFaild">部分数据导入失败查看失败原因</el-link>
@ -853,39 +832,48 @@ export default {
/deep/.org {
.el-tree-node__content {
height: 40px;
&:hover {
background-color: #F0F4FF;
}
}
}
.node-wrap {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
.left {
display: inline-flex;
align-items: center;
}
.name {
margin-left: 3px;
font-size: 14px;
color: #333;
}
.expand {
padding: 0 15px;
}
}
.org-btn {
width: 100%;
text-align: left;
&.add {
color: #666;
}
&.del {
color: #D0021B;
}
}
.list-wrap {
width: calc(100% - 301px);
}

@ -1,12 +1,11 @@
/**
* 业务配置
* */
const url = location.host;
const isDev = process.env.NODE_ENV === 'development' // 开发环境
let host = `${location.origin}/`
let host = location.origin
if (isDev) {
host = 'https://huorantech.com/'
// host = 'http://139.159.254.212/'
host = 'https://huorantech.com'
host = 'http://192.168.31.217:10000'
}
const Setting = {

Loading…
Cancel
Save