悬浮栏联调

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. 138
      src/layouts/header/index.vue
  5. 249
      src/layouts/navbar/index.vue
  6. 242
      src/pages/article/list/index.vue
  7. 393
      src/pages/column/add/index.vue
  8. 74
      src/pages/column/page/devHistory.vue
  9. 963
      src/pages/column/page/iasf.vue
  10. 576
      src/pages/floatingFrame/index.vue
  11. 1420
      src/pages/user/list/index.vue
  12. 103
      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,36 +2,28 @@
<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>
<span class="username">{{userName}}</span>
<el-avatar :size="36" :src="avatar"></el-avatar>
<span class="username">{{ userName }}</span>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="person">个人资料</el-dropdown-item>
@ -52,7 +44,7 @@ export default {
sites: [],
crumbRefresh: true,
inContent: false, //
sitePath: ['/page', '/column', '/article']
sitePath: ['/page', '/column', '/article', '/seo', '/floatingFrame']
};
},
components: {
@ -127,63 +119,75 @@ export default {
</script>
<style lang="scss" scoped>
.header {
position: relative;
display: flex;
justify-content: space-between;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
height: 64px;
padding: 0 25px;
color: #333;
background-color: #fff;
box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12);
.group {
display: inline-flex;
align-items: center;
height: 64px;
padding: 0 25px;
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;
span {
margin-left: 13px;
font-size: 14px;
color: #333;
}
.site,
.user-wrap {
display: inline-flex;
align-items: center;
}
.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 {
img {
margin-right: 4px;
}
}
.site-switch {
margin: 0 60px 0 54px;
color: #333;
i {
color: #000;
}
.site-switch {
margin: 0 60px 0 54px;
}
.user-wrap {
margin-left: 26px;
.user {
display: inline-flex;
align-items: center;
cursor: pointer;
.username {
margin-left: 8px;
color: #333;
i {
color: #000;
}
font-size: 14px;
}
}
.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%;
}
/deep/.el-avatar>img {
width: 100%;
}
}
}
</style>

@ -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>
@ -278,82 +236,99 @@ export default {
<style lang="scss" scoped>
.nav {
height: 100%;
background-color: #001529;
box-shadow: 2px 0px 6px 0px rgba(92, 111, 130, 0.35);
overflow: auto;
.logo {
display: flex;
align-items: center;
padding-left: 28px;
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: #001529;
box-shadow: 2px 0px 6px 0px rgba(92, 111, 130, 0.35);
overflow: auto;
.logo {
display: flex;
align-items: center;
padding-left: 28px;
margin: 15px 0 26px;
font-size: 16px;
color: #fff;
img {
margin-right: 8px;
}
background-color: #fff;
overflow: hidden;
.col-wrap {
width: 64px;
background-color: #001529;
}
/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;
}
.logo-icon {
width: 41px;
margin: 16px 0 30px 7px;
}
.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;
font-weight: 600;
text-align: center;
color: #333;
line-height: 32px;
}
.col-menu {
width: 192px;
}
/deep/.el-submenu__title {
padding-left: 14px !important;
}
.icon {
margin-left: 0;
}
.col-nav {
text-align: center;
li {
padding: 25px 0;
cursor: pointer;
}
}
.name {
margin: 17px 0 27px 15px;
font-size: 15px;
font-weight: 600;
text-align: center;
color: #333;
line-height: 32px;
}
.col-menu {
width: 192px;
}
/deep/.el-submenu__title {
padding-left: 14px !important;
}
.icon {
margin-left: 0;
}
}
}
.sidebar::-webkit-scrollbar {
width: 0;
width: 0;
}
.sidebar-el-menu:not(.el-menu--collapse) {
width: 100%;
width: 100%;
}
.sidebar > ul {
height: 100%;
.sidebar>ul {
height: 100%;
}
</style>

@ -3,189 +3,100 @@
<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"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
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">
<template scope="scope">
<span>{{(page - 1) * pageSize + scope.$index + 1}}</span>
<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"
min-width="150"></el-table-column>
<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"
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[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"
min-width="120"></el-table-column>
<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">
<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"
min-width="80"></el-table-column>
<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"
sortable="custom"></el-table-column>
<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"
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[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"
min-width="80"></el-table-column>
<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"
sortable="custom"></el-table-column>
<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">
<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']"
@click="sticky(scope.row)"></i>
<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"
@click="preview(scope.row)">预览</el-button>
<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="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"
@change="switchOff($event, scope.row, scope.$index)">
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:预览'" type="text"
@click="preview(scope.row)">预览</el-button>
<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="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"
@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"
:total="total"></el-pagination>
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
</div>
</div>
@ -492,30 +403,35 @@ export default {
<style lang="scss" scoped>
.custom-tree-node {
display: inline-flex;
align-items: center;
display: inline-flex;
align-items: center;
}
.name {
display: inline-block;
max-width: 160px;
margin-right: 20px;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
max-width: 160px;
margin-right: 20px;
overflow: hidden;
text-overflow: ellipsis;
}
.squ-icon {
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #f70000;
&.el-icon-check {
color: #05991e;
}
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;
}
width: auto;
.el-input__inner {
width: 60px;
padding: 0 10px;
}
}
</style>

@ -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"
@input="nameChange"></el-input>
<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
@change="fatherIdChange"></el-cascader>
<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')"
alt="">
<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="">
<img :style="{ width: item.id == 24 ? '50px' : '90px', 'max-height': '110px' }"
: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
@change="getArticle"></el-cascader>
<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
@change="getArticle"></el-cascader>
<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,97 +672,114 @@ export default {
$upload-width: 220px;
$upload-height: 102px;
$upload-lg-height: 102px;
/deep/ .avatar-uploader {
.el-upload {
position: relative;
width: $upload-width;
height: $upload-height;
border: 1px solid #dcdee0;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.uploader-default {
display: flex;
height: $upload-height;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
background: #fafafa;
p {
margin-top: 10px;
font-size: 14px;
color: #333;
line-height: 20px;
}
}
}
&.avatar-uploader-lg {
.el-upload {
width: 100%;
max-width: 820px;
height: $upload-lg-height;
.el-upload {
position: relative;
width: $upload-width;
height: $upload-height;
border: 1px solid #dcdee0;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.uploader-default {
height: $upload-lg-height;
}
}
}
.avatar {
display: block;
width: $upload-width;
height: $upload-height;
.uploader-default {
display: flex;
height: $upload-height;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
background: #fafafa;
p {
margin-top: 10px;
font-size: 14px;
color: #333;
line-height: 20px;
}
}
.avatar-lg {
display: block;
width: 100%;
}
&.avatar-uploader-lg {
.el-upload {
width: 100%;
max-width: 820px;
height: $upload-lg-height;
.uploader-default {
height: $upload-lg-height;
}
}
.el-upload__tip {
margin-top: 0;
p {
font-size: 12px;
color: #333;
}
}
.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;
}
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;
align-items: center;
width: 170px;
height: 112px;
margin-bottom: 10px;
border: 1px solid #dcdee0;
border-radius: 2px;
img {
width: 50px;
}
display: inline-flex;
flex-wrap: wrap;
li {
width: 170px;
margin-right: 20px;
text-align: center;
cursor: pointer;
&:hover .review {
border-color: #2962ff;
}
.el-radio {
white-space: normal;
}
.review {
display: flex;
justify-content: center;
align-items: center;
width: 170px;
height: 112px;
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;
width: 119px;
}
</style>

@ -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,25 +81,28 @@ export default {
<style lang="scss" scoped>
@import '../../../styles/page/page.scss';
.history {
h6 {
position: relative;
font-size: 2.4rem;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.en {
margin-top: -25px;
font-size: 2.4rem;
font-family: PingFangSC-Light, PingFang SC;
font-weight: 300;
color: #e3e3e3;
}
.text {
max-width: 1200px;
margin: 30px 0;
overflow: auto;
}
h6 {
position: relative;
font-size: 2.4rem;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.en {
margin-top: -25px;
font-size: 2.4rem;
font-family: PingFangSC-Light, PingFang SC;
font-weight: 300;
color: #e3e3e3;
}
.text {
max-width: 1200px;
margin: 30px 0;
overflow: auto;
}
}
</style>

File diff suppressed because it is too large Load Diff

@ -2,204 +2,132 @@
<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"
@click="del(scope.row)">删除</el-button>
<el-switch class="m-l-10"
v-model="scope.row.menuVisible"
:active-value="0"
:inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
<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.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
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-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-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
maxlength="20"></el-input>
<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"
:init="editorConfig" />
<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"
@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" :fixedNumber.sync="fixedNumber"
@upload="customUpload" />
</el-dialog>
</div>
</template>
@ -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'
},
moduleRules: {
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,
},
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) {
@ -440,80 +470,88 @@ export default {
<style lang="scss" scoped>
.plus {
margin-top: 10px;
font-size: 20px;
text-align: center;
color: $main-color;
cursor: pointer;
margin-top: 10px;
font-size: 20px;
text-align: center;
color: $main-color;
cursor: pointer;
}
.del {
margin-left: 5px;
font-size: 18px;
color: #333;
cursor: pointer;
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;
width: $upload-width;
height: $upload-height;
border: 1px solid #dcdee0;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.uploader-default {
display: flex;
height: $upload-height;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
background: #fafafa;
p {
margin-top: 10px;
font-size: 14px;
color: #333;
line-height: 20px;
}
}
}
&.avatar-uploader-lg {
.el-upload {
width: 100%;
max-width: 820px;
height: $upload-lg-height;
.el-upload {
position: relative;
width: $upload-width;
height: $upload-height;
border: 1px solid #dcdee0;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.uploader-default {
height: $upload-lg-height;
}
}
}
.avatar {
display: block;
width: $upload-width;
height: $upload-height;
.uploader-default {
display: flex;
height: $upload-height;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
background: #fafafa;
p {
margin-top: 10px;
font-size: 14px;
color: #333;
line-height: 20px;
}
}
.avatar-lg {
display: block;
width: 100%;
}
&.avatar-uploader-lg {
.el-upload {
width: 100%;
max-width: 820px;
height: $upload-lg-height;
.uploader-default {
height: $upload-lg-height;
}
}
.el-upload__tip {
margin-top: 0;
p {
font-size: 12px;
color: #333;
}
}
.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>

File diff suppressed because it is too large Load Diff

@ -1,63 +1,62 @@
/**
* 业务配置
* */
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 = {
/**
* 基础配置
* */
titleSuffix: '职站商城后台', // 网页标题的后缀
routerMode: "hash", // 路由模式,可选值为 history 或 hash
showProgressBar: true, // 页面切换时,是否显示模拟的进度条
apiBaseURL: host, // 接口请求地址
autoLogoutTime: 1000 * 60 * 60 * 3, // 长时间未操作,自动退出登录时间
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
tokenExpires: 1296000000, // token在localStorage的时间(毫秒)
isDev,
/**
* 路由白名单
* */
whiteList: ['/login', '/redirect'],
/**
* localStorage里保存的token的key
*/
tokenKey: "huoran_server_token",
/**
* localStorage里保存的vuex的key
*/
storeKey: "huoran_server_store",
/**
* 默认密码
*/
initialPassword: "111aaa",
/**
* 多语言配置
* */
i18n: {
// 默认语言
default: "zh",
// 是否根据用户电脑配置自动设置语言(仅第一次有效)
auto: false
},
/**
* 布局配置
* */
layout: {},
/**
* 功能配置
* */
// 相同路由,不同参数间进行切换,是否强力更新
sameRouteForceUpdate: false,
// 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮)
dynamicRoute: false
/**
* 基础配置
* */
titleSuffix: '职站商城后台', // 网页标题的后缀
routerMode: "hash", // 路由模式,可选值为 history 或 hash
showProgressBar: true, // 页面切换时,是否显示模拟的进度条
apiBaseURL: host, // 接口请求地址
autoLogoutTime: 1000 * 60 * 60 * 3, // 长时间未操作,自动退出登录时间
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
tokenExpires: 1296000000, // token在localStorage的时间(毫秒)
isDev,
/**
* 路由白名单
* */
whiteList: ['/login', '/redirect'],
/**
* localStorage里保存的token的key
*/
tokenKey: "huoran_server_token",
/**
* localStorage里保存的vuex的key
*/
storeKey: "huoran_server_store",
/**
* 默认密码
*/
initialPassword: "111aaa",
/**
* 多语言配置
* */
i18n: {
// 默认语言
default: "zh",
// 是否根据用户电脑配置自动设置语言(仅第一次有效)
auto: false
},
/**
* 布局配置
* */
layout: {},
/**
* 功能配置
* */
// 相同路由,不同参数间进行切换,是否强力更新
sameRouteForceUpdate: false,
// 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮)
dynamicRoute: false
};
export default Setting;

Loading…
Cancel
Save