|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 774 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 3.2 MiB |
|
After Width: | Height: | Size: 170 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
@ -1,3 +1,3 @@
|
||||
NODE_ENV=docker
|
||||
VUE_APP_PLATFORM_NAME=科亿知识库
|
||||
NODE_ENV=development
|
||||
VUE_APP_PLATFORM_NAME=VUE_APP_PLATFORM_NAME
|
||||
VUE_APP_SSO=false
|
||||
@ -1,4 +1,4 @@
|
||||
NODE_ENV=docker
|
||||
VUE_APP_API_BASE_URL=/api
|
||||
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
|
||||
VUE_APP_CAS_BASE_URL=/cas
|
||||
VUE_APP_ONLINE_BASE_URL=http://localhost/onlinePreview
|
||||
@ -1,4 +1,4 @@
|
||||
NODE_ENV=production
|
||||
VUE_APP_API_BASE_URL=http://localhost:8080/ky
|
||||
VUE_APP_API_BASE_URL=http://119.29.145.199:8080/ky/
|
||||
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
|
||||
VUE_APP_ONLINE_BASE_URL=http://localhost/onlinePreview
|
||||
@ -1,4 +1,4 @@
|
||||
NODE_ENV=test
|
||||
VUE_APP_API_BASE_URL=/api
|
||||
VUE_APP_API_BASE_URL=http://119.29.145.199:8080/ky/
|
||||
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
|
||||
VUE_APP_ONLINE_BASE_URL=http://localhost/onlinePreview
|
||||
@ -1,7 +1,29 @@
|
||||
FROM nginx:1.24.0
|
||||
FROM nginx
|
||||
MAINTAINER hnliuwx@gmail.com
|
||||
VOLUME /tmp
|
||||
ENV LANG en_US.UTF-8
|
||||
RUN echo "server { \
|
||||
listen 80; \
|
||||
location ^~ /ky { \
|
||||
proxy_pass http://124.71.194.56:8080/ky/; \
|
||||
proxy_set_header Host localhost; \
|
||||
proxy_set_header X-Real-IP \$remote_addr; \
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
|
||||
} \
|
||||
#解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \
|
||||
location / { \
|
||||
root /var/www/html/; \
|
||||
index index.html index.htm; \
|
||||
if (!-e \$request_filename) { \
|
||||
rewrite ^(.*)\$ /index.html?s=\$1 last; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
access_log /var/log/nginx/access.log ; \
|
||||
} " > /etc/nginx/conf.d/default.conf \
|
||||
&& mkdir -p /var/www \
|
||||
&& mkdir -p /var/www/html
|
||||
|
||||
RUN rm -f /etc/nginx/conf.d/default.conf
|
||||
ADD ./dist /usr/share/nginx/kykms-root/
|
||||
|
||||
ADD dist/ /var/www/html/
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
@ -0,0 +1,11 @@
|
||||
## 商业版试用镜像提供源下载,仅限于个人学习用途,如擅自用于商业用途,带来的一切后果由个人负责
|
||||
## !!!!暂未完善,如有需求请联系作者!!!!!
|
||||
##执行启动命令 docker-compose -f ./docker-compose-business_web.yml up
|
||||
version: '2'
|
||||
services:
|
||||
kykms-nginx:
|
||||
image: mahonelau/kykms-nginx:business_official
|
||||
restart: always
|
||||
container_name: kykms-nginx
|
||||
ports:
|
||||
- 80:80
|
||||
@ -0,0 +1,6 @@
|
||||
let Global_Config = {
|
||||
API_BASE_URL: '',
|
||||
SITE_TITLE: '科亿知识库',
|
||||
KYKMS_URL: 'http://113.125.46.255:8081',
|
||||
COPYRIGHT: '科亿信息技术'
|
||||
}
|
||||
@ -0,0 +1,282 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cmn-Hans">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<title>首页</title>
|
||||
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>-->
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/moment@2.29.4/moment.min.js"></script>-->
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/moment@2.29.4/locale/zh-cn.js"></script>-->
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/ant-design-vue@1.7.2/dist/antd.min.js"></script>-->
|
||||
|
||||
<!-- <script src="http://cdn.kykms.cn/vue.js"></script>-->
|
||||
<!-- <script src="http://cdn.kykms.cn/moment.min.js"></script>-->
|
||||
<!-- <script src="http://cdn.kykms.cn/zh-cn.js"></script>-->
|
||||
<!-- <script src="http://cdn.kykms.cn/antd.min.js"></script>-->
|
||||
<!-- <script src="http://cdn.kykms.cn/polyfill_7_2_5.js"></script>-->
|
||||
<!-- <script>-->
|
||||
<!-- if (!global._babelPolyfill) {-->
|
||||
<!-- document.write(unescape("%3Cscript src='<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js' type='text/javascript'%3E%3C/script%3E"));-->
|
||||
<!-- }-->
|
||||
<!-- </script>-->
|
||||
<!-- <link rel="stylesheet"type="text/css" href="http://cdn.kykms.cn/antd.min.css">-->
|
||||
|
||||
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
|
||||
<link rel="icon" href="<%= BASE_URL %>logo.png">
|
||||
<script src="<%= BASE_URL %>config.js"></script>
|
||||
<!-- 全局配置 -->
|
||||
<script>
|
||||
window._CONFIG = {};
|
||||
</script>
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
.chromeframe {
|
||||
margin: 0.2em 0;
|
||||
background: #ccc;
|
||||
color: #000;
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
#loader-wrapper {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999999;
|
||||
}
|
||||
#loader {
|
||||
display: block;
|
||||
position: relative;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin: -75px 0 0 -75px;
|
||||
border-radius: 50%;
|
||||
border: 3px solid transparent;
|
||||
/* COLOR 1 */
|
||||
border-top-color: #FFF;
|
||||
-webkit-animation: spin 2s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
-ms-animation: spin 2s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
-moz-animation: spin 2s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
-o-animation: spin 2s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
animation: spin 2s linear infinite;
|
||||
/* Chrome, Firefox 16+, IE 10+, Opera */
|
||||
z-index: 1001;
|
||||
}
|
||||
#loader:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
right: 5px;
|
||||
bottom: 5px;
|
||||
border-radius: 50%;
|
||||
border: 3px solid transparent;
|
||||
/* COLOR 2 */
|
||||
border-top-color: #FFF;
|
||||
-webkit-animation: spin 3s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
-moz-animation: spin 3s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
-o-animation: spin 3s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
-ms-animation: spin 3s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
animation: spin 3s linear infinite;
|
||||
/* Chrome, Firefox 16+, IE 10+, Opera */
|
||||
}
|
||||
#loader:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
border-radius: 50%;
|
||||
border: 3px solid transparent;
|
||||
border-top-color: #FFF;
|
||||
/* COLOR 3 */
|
||||
-moz-animation: spin 1.5s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
-o-animation: spin 1.5s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
-ms-animation: spin 1.5s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
-webkit-animation: spin 1.5s linear infinite;
|
||||
/* Chrome, Opera 15+, Safari 5+ */
|
||||
animation: spin 1.5s linear infinite;
|
||||
/* Chrome, Firefox 16+, IE 10+, Opera */
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
/* Chrome, Opera 15+, Safari 3.1+ */
|
||||
-ms-transform: rotate(0deg);
|
||||
/* IE 9 */
|
||||
transform: rotate(0deg);
|
||||
/* Firefox 16+, IE 10+, Opera */
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
/* Chrome, Opera 15+, Safari 3.1+ */
|
||||
-ms-transform: rotate(360deg);
|
||||
/* IE 9 */
|
||||
transform: rotate(360deg);
|
||||
/* Firefox 16+, IE 10+, Opera */
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
/* Chrome, Opera 15+, Safari 3.1+ */
|
||||
-ms-transform: rotate(0deg);
|
||||
/* IE 9 */
|
||||
transform: rotate(0deg);
|
||||
/* Firefox 16+, IE 10+, Opera */
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
/* Chrome, Opera 15+, Safari 3.1+ */
|
||||
-ms-transform: rotate(360deg);
|
||||
/* IE 9 */
|
||||
transform: rotate(360deg);
|
||||
/* Firefox 16+, IE 10+, Opera */
|
||||
}
|
||||
}
|
||||
#loader-wrapper .loader-section {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 51%;
|
||||
height: 100%;
|
||||
background: #49a9ee;
|
||||
/* Old browsers */
|
||||
z-index: 1000;
|
||||
-webkit-transform: translateX(0);
|
||||
/* Chrome, Opera 15+, Safari 3.1+ */
|
||||
-ms-transform: translateX(0);
|
||||
/* IE 9 */
|
||||
transform: translateX(0);
|
||||
/* Firefox 16+, IE 10+, Opera */
|
||||
}
|
||||
#loader-wrapper .loader-section.section-left {
|
||||
left: 0;
|
||||
}
|
||||
#loader-wrapper .loader-section.section-right {
|
||||
right: 0;
|
||||
}
|
||||
/* Loaded */
|
||||
.loaded #loader-wrapper .loader-section.section-left {
|
||||
-webkit-transform: translateX(-100%);
|
||||
/* Chrome, Opera 15+, Safari 3.1+ */
|
||||
-ms-transform: translateX(-100%);
|
||||
/* IE 9 */
|
||||
transform: translateX(-100%);
|
||||
/* Firefox 16+, IE 10+, Opera */
|
||||
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
||||
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
||||
}
|
||||
.loaded #loader-wrapper .loader-section.section-right {
|
||||
-webkit-transform: translateX(100%);
|
||||
/* Chrome, Opera 15+, Safari 3.1+ */
|
||||
-ms-transform: translateX(100%);
|
||||
/* IE 9 */
|
||||
transform: translateX(100%);
|
||||
/* Firefox 16+, IE 10+, Opera */
|
||||
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
||||
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
||||
}
|
||||
.loaded #loader {
|
||||
opacity: 0;
|
||||
-webkit-transition: all 0.3s ease-out;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
.loaded #loader-wrapper {
|
||||
visibility: hidden;
|
||||
-webkit-transform: translateY(-100%);
|
||||
/* Chrome, Opera 15+, Safari 3.1+ */
|
||||
-ms-transform: translateY(-100%);
|
||||
/* IE 9 */
|
||||
transform: translateY(-100%);
|
||||
/* Firefox 16+, IE 10+, Opera */
|
||||
-webkit-transition: all 0.3s 1s ease-out;
|
||||
transition: all 0.3s 1s ease-out;
|
||||
}
|
||||
/* JavaScript Turned Off */
|
||||
.no-js #loader-wrapper {
|
||||
display: none;
|
||||
}
|
||||
.no-js h1 {
|
||||
color: #222222;
|
||||
}
|
||||
#loader-wrapper .load_title {
|
||||
font-family: 'Open Sans';
|
||||
color: #FFF;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
z-index: 9999999999999;
|
||||
position: absolute;
|
||||
top: 60%;
|
||||
opacity: 1;
|
||||
line-height: 30px;
|
||||
}
|
||||
#loader-wrapper .load_title span {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-size: 14px;
|
||||
color: #FFF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
/* 滚动条优化 start */
|
||||
::-webkit-scrollbar{
|
||||
width:8px;
|
||||
height:8px;
|
||||
}
|
||||
::-webkit-scrollbar-track{
|
||||
background: #f6f6f6;
|
||||
border-radius:2px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb{
|
||||
background: #cdcdcd;
|
||||
border-radius:2px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover{
|
||||
background: #747474;
|
||||
}
|
||||
::-webkit-scrollbar-corner {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
/* 滚动条优化 end */
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div id="loader-wrapper">
|
||||
<div id="loader"></div>
|
||||
<div class="loader-section section-left"></div>
|
||||
<div class="loader-section section-right"></div>
|
||||
<div class="load_title">正在加载系统,首次加载会比较慢,请耐心等待
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<!--<script type="text/javascript" src= "{{Global_Config.ONLYOFFICE_SERVER_IP}} /web-apps/apps/api/documents/api.js"></script>-->
|
||||
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,9 @@
|
||||
|
||||
import BJModal from './BJModal'
|
||||
import PDFModal from './PDFModal'
|
||||
export default {
|
||||
install(Vue) {
|
||||
Vue.component('BJModal',BJModal)
|
||||
Vue.component('PDFModal',PDFModal)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,121 @@
|
||||
<template>
|
||||
<div class="user-wrapper" >
|
||||
<a-dropdown>
|
||||
<span class="action action-full ant-dropdown-link user-dropdown-menu"
|
||||
style="line-height: 64px; height: 60px;color: #000c17;padding: 0px 20px;margin: 0">
|
||||
<span style="margin: 0;padding-right: 10px;color: white">
|
||||
<a-icon type="menu"/>
|
||||
快捷菜单
|
||||
</span>
|
||||
</span>
|
||||
<a-menu slot="overlay" class="user-dropdown-menu-wrapper">
|
||||
|
||||
<a-menu-item key="1" @click="jumpKmDocFavouritePage">
|
||||
<a-icon type="star"/>
|
||||
<span>我的收藏</span>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2" @click="jumpDraftsPage">
|
||||
<a-icon type="home"/>
|
||||
<span>我的知识</span>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item key="3">
|
||||
<a href="javascript:;" @click="jumpKmDashBoard">
|
||||
<a-icon type="chrome"/>
|
||||
<span>统计数据</span>
|
||||
</a>
|
||||
</a-menu-item>
|
||||
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
<!-- <user-password ref="userPassword"></user-password>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mixinDevice } from '@/utils/mixin.js'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: 'FilesMenu',
|
||||
mixins: [mixinDevice],
|
||||
data() {
|
||||
return {
|
||||
token:''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.token = Vue.ls.get(ACCESS_TOKEN)
|
||||
},
|
||||
|
||||
methods: {
|
||||
jumpKmDocFavouritePage() {
|
||||
let token = this.token
|
||||
if (token === '' || token === null) {
|
||||
this.$router.push('/front/user/login')
|
||||
} else {
|
||||
let routeData = this.$router.resolve({
|
||||
path: '/km/filemanagement/KmDocFavouriteList',
|
||||
query: {}
|
||||
})
|
||||
window.open(routeData.href, '_blank')
|
||||
}
|
||||
},
|
||||
jumpKmDashBoard() {
|
||||
let token = this.token
|
||||
if (token === '' || token === null) {
|
||||
this.$router.push('/front/user/login')
|
||||
} else {
|
||||
let routeData = this.$router.resolve({
|
||||
path: '/dashboard/Analysis',
|
||||
query: {}
|
||||
})
|
||||
window.open(routeData.href, '_blank')
|
||||
}
|
||||
},
|
||||
// 跳转到个人草稿文件夹
|
||||
jumpDraftsPage() {
|
||||
let token = this.token
|
||||
if (token == '' || token == null) {
|
||||
this.$router.push('/front/user/login')
|
||||
} else {
|
||||
let routeData = this.$router.resolve({
|
||||
path: '/km/filemanagement/FilesList',
|
||||
query: {}
|
||||
})
|
||||
window.open(routeData.href, '_blank')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/* update_begin author:zhaoxin date:20191129 for: 让搜索框颜色能随主题颜色变换*/
|
||||
/* update-begin author:sunjianlei date:20191220 for: 解决全局样式冲突问题 */
|
||||
.user-wrapper .search-input {
|
||||
width: 180px;
|
||||
color: inherit;
|
||||
|
||||
/deep/ .ant-select-selection {
|
||||
background-color: inherit;
|
||||
border: 0;
|
||||
border-bottom: 1px solid white;
|
||||
|
||||
&__placeholder, &__field__placeholder {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* update-end author:sunjianlei date:20191220 for: 解决全局样式冲突问题 */
|
||||
/* update_end author:zhaoxin date:20191129 for: 让搜索框颜色能随主题颜色变换*/
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.logout_title {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,105 @@
|
||||
/** init domain config */
|
||||
import './config'
|
||||
|
||||
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import Storage from 'vue-ls'
|
||||
import router from './router'
|
||||
import store from './store/'
|
||||
import { VueAxios } from "@/utils/request"
|
||||
|
||||
require('@jeecg/antd-online-mini')
|
||||
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
|
||||
|
||||
// import '@/components/lazy_antd'
|
||||
import Antd from 'ant-design-vue'
|
||||
|
||||
import Viser from 'viser-vue'
|
||||
import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less'
|
||||
|
||||
import '@/permission' // permission control
|
||||
import '@/utils/filter' // base filter
|
||||
import Print from 'vue-print-nb-jeecg'
|
||||
import preview from 'vue-photo-preview'
|
||||
import 'vue-photo-preview/dist/skin.css'
|
||||
import SSO from '@/cas/sso.js'
|
||||
import {
|
||||
ACCESS_TOKEN,
|
||||
DEFAULT_COLOR,
|
||||
DEFAULT_THEME,
|
||||
DEFAULT_LAYOUT_MODE,
|
||||
DEFAULT_COLOR_WEAK,
|
||||
SIDEBAR_TYPE,
|
||||
DEFAULT_FIXED_HEADER,
|
||||
DEFAULT_FIXED_HEADER_HIDDEN,
|
||||
DEFAULT_FIXED_SIDEMENU,
|
||||
DEFAULT_CONTENT_WIDTH_TYPE,
|
||||
DEFAULT_MULTI_PAGE
|
||||
} from "@/store/mutation-types"
|
||||
import config from '@/defaultSettings'
|
||||
|
||||
import JDictSelectTag from './components/dict/index.js'
|
||||
import hasPermission from '@/utils/hasPermission'
|
||||
import vueBus from '@/utils/vueBus';
|
||||
import JeecgComponents from '@/components/jeecg/index'
|
||||
import '@/assets/less/JAreaLinkage.less'
|
||||
// import VueAreaLinkage from 'vue-area-linkage'
|
||||
import '@/components/jeecg/JVxeTable/install'
|
||||
import '@/components/JVxeCells/install'
|
||||
//表单验证
|
||||
import { rules } from '@/utils/rules'
|
||||
Vue.prototype.rules = rules
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(Storage, config.storageOptions)
|
||||
Vue.use(Antd)
|
||||
Vue.use(VueAxios, router)
|
||||
Vue.use(Viser)
|
||||
Vue.use(hasPermission)
|
||||
Vue.use(JDictSelectTag)
|
||||
Vue.use(Print)
|
||||
Vue.use(preview)
|
||||
Vue.use(vueBus);
|
||||
Vue.use(JeecgComponents);
|
||||
// Vue.use(VueAreaLinkage);
|
||||
|
||||
SSO.init(() => {
|
||||
main()
|
||||
})
|
||||
function main() {
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
mounted () {
|
||||
getSiteInfo()
|
||||
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
|
||||
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
|
||||
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout))
|
||||
store.commit('TOGGLE_FIXED_HEADER', Vue.ls.get(DEFAULT_FIXED_HEADER, config.fixedHeader))
|
||||
store.commit('TOGGLE_FIXED_SIDERBAR', Vue.ls.get(DEFAULT_FIXED_SIDEMENU, config.fixSiderbar))
|
||||
store.commit('TOGGLE_CONTENT_WIDTH', Vue.ls.get(DEFAULT_CONTENT_WIDTH_TYPE, config.contentWidth))
|
||||
store.commit('TOGGLE_FIXED_HEADER_HIDDEN', Vue.ls.get(DEFAULT_FIXED_HEADER_HIDDEN, config.autoHideHeader))
|
||||
store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak))
|
||||
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
|
||||
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
|
||||
store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage))
|
||||
|
||||
},
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
}
|
||||
|
||||
function getSiteInfo(){
|
||||
store.dispatch('GetSiteInfo').then(res => {
|
||||
//this.departConfirm(res)
|
||||
if(res.success){
|
||||
console.log("GetSiteInfo Success.")
|
||||
}else{
|
||||
console.log("GetSiteInfo fail...............")
|
||||
|
||||
}
|
||||
}).catch((err) => {
|
||||
// console.log(err);
|
||||
//that.requestFailed(err);
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
import Vue from 'vue'
|
||||
import {getAllKmConfig} from '@/api/api'
|
||||
import {KM_ALL_CONFIG, SITE_INFO, USER_INFO} from '@/store/mutation-types'
|
||||
import siteLogo from '@assets/logo.png'
|
||||
import siteBannerLogo from '@assets/km_logo.png'
|
||||
import { getFileAccessHttpUrl } from '@api/manage'
|
||||
|
||||
const site = {
|
||||
state: {
|
||||
siteInfo: {
|
||||
siteTitle: '科亿知识库',
|
||||
siteHomePageUrl: 'http://www.kykms.cn',
|
||||
siteCopyRight: '科亿信息技术',
|
||||
siteAvatar: siteLogo,
|
||||
siteTitleBanner: siteBannerLogo
|
||||
},
|
||||
kmConfig: {
|
||||
DefaultPageUseTopicList: '0',
|
||||
HeaderBackgroundColor: '#001529'
|
||||
}
|
||||
},
|
||||
|
||||
mutations: {
|
||||
SET_KMCONFIG: (state, config) => {
|
||||
state.kmConfig = config
|
||||
Vue.prototype.kmConfig = config
|
||||
Vue.ls.set(KM_ALL_CONFIG, config, 7 * 24 * 60 * 60 * 1000)
|
||||
},
|
||||
SET_SITE_INFO: (state, siteInfo) => {
|
||||
state.siteInfo.siteTitle = siteInfo.siteTitle !== undefined && siteInfo.siteTitle !== null? siteInfo.siteTitle : state.siteInfo.siteTitle
|
||||
state.siteInfo.siteHomePageUrl = siteInfo.siteHomePageUrl !== undefined && siteInfo.siteHomePageUrl !== null ? siteInfo.siteHomePageUrl : state.siteInfo.siteHomePageUrl
|
||||
state.siteInfo.siteCopyRight = siteInfo.siteCopyRight !== undefined && siteInfo.siteCopyRight !== null? siteInfo.siteCopyRight : state.siteInfo.siteCopyRight
|
||||
state.siteInfo.siteAvatar = siteInfo.siteAvatar !== '' && siteInfo.siteAvatar !== undefined && siteInfo.siteAvatar !== null? getFileAccessHttpUrl(siteInfo.siteAvatar) : state.siteInfo.siteAvatar
|
||||
state.siteInfo.siteTitleBanner = siteInfo.siteTitleBanner !== '' && siteInfo.siteTitleBanner !== undefined && siteInfo.siteTitleBanner !== null? getFileAccessHttpUrl(siteInfo.siteTitleBanner) : state.siteInfo.siteTitleBanner
|
||||
Vue.ls.set(SITE_INFO, state.siteInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
GetSiteInfo({ commit }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getAllKmConfig().then(response => {
|
||||
let siteInfo = {}
|
||||
console.log("----getSiteInfo--------",response);
|
||||
if(response.success){
|
||||
let result = response.result
|
||||
console.log('result:',result)
|
||||
commit('SET_KMCONFIG', result)
|
||||
if(result !== null && result !== undefined ){
|
||||
siteInfo.siteTitle = result['SiteTitle']
|
||||
siteInfo.siteHomePageUrl = result['SiteHomePageUrl']
|
||||
siteInfo.siteCopyRight = result['SiteCopyRight']
|
||||
siteInfo.siteAvatar = result['SiteAvatar']
|
||||
siteInfo.siteTitleBanner = result['SiteTitleBanner']
|
||||
}
|
||||
console.log("----siteInfo--------",siteInfo)
|
||||
commit('SET_SITE_INFO', siteInfo)
|
||||
// Vue.ls.set(SITE_INFO, siteInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
resolve(response)
|
||||
}else{
|
||||
resolve(response)
|
||||
}
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default site
|
||||
@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<div class="page-header-index-wide">
|
||||
|
||||
<a-row :gutter="24">
|
||||
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
|
||||
<a-card >
|
||||
<a-space>
|
||||
<a-icon type="home" theme="filled" style="color: #1a53ba"></a-icon>
|
||||
<span style="font-size: small">知识总数: </span> <span style="font-size: large;font-weight: bold">{{kmTotalAmount |numberFormat}}</span>
|
||||
</a-space>
|
||||
</a-card>
|
||||
</a-col>
|
||||
|
||||
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
|
||||
<a-card>
|
||||
<a-space>
|
||||
<a-icon type="folder" theme="filled" style="color: #1a53ba"></a-icon>
|
||||
<span style="font-size: small">存储使用: </span> <span style="font-size: large;font-weight: bold">{{spaceTotal}}</span>
|
||||
</a-space>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="24">
|
||||
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
|
||||
<a-card >
|
||||
<pie title="分类数量占比" :data-source="categoryAmount">
|
||||
</pie>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
|
||||
<a-card >
|
||||
<pie title="分类空间占比" :data-source="categorySpace">
|
||||
</pie>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="24">
|
||||
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
|
||||
<a-card>
|
||||
<rank-list title="热词榜" icon="fire" :list="rankListKeyword"/>
|
||||
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
|
||||
<a-card>
|
||||
<rank-list title="热门专题榜" icon="fire" :list="rankListTopic"/>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">
|
||||
<div class="salesCard">
|
||||
<a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
|
||||
|
||||
<a-tab-pane loading="true" tab="专题数量统计" key="1">
|
||||
<a-row>
|
||||
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
|
||||
<bar :dataSource="topicAmount"/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="专题空间统计" key="2">
|
||||
<a-row>
|
||||
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
|
||||
<bar :dataSource="topicSpace"/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-card :loading="loading" :bordered="false" title="最近一周访问量统计" :style="{ marginTop: '24px' }">
|
||||
<a-row>
|
||||
<a-col :span="6">
|
||||
<head-info title="今日IP" :content="loginfo.todayIp"></head-info>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-spin class='circle-cust'>
|
||||
<a-icon slot="indicator" type="environment" style="font-size: 24px" />
|
||||
</a-spin>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<head-info title="今日访问" :content="loginfo.todayVisitCount"></head-info>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-spin class='circle-cust'>
|
||||
<a-icon slot="indicator" type="team" style="font-size: 24px" />
|
||||
</a-spin>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<head-info title="总访问量" :content="loginfo.totalVisitCount"></head-info>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-spin class='circle-cust'>
|
||||
<a-icon slot="indicator" type="rise" style="font-size: 24px" />
|
||||
</a-spin>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<line-chart-multid :fields="visitFields" :dataSource="visitInfo"></line-chart-multid>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AreaChartTy from '@/components/chart/AreaChartTy'
|
||||
import Pie from '@/components/chart/Pie'
|
||||
import ChartCard from '@/components/ChartCard'
|
||||
import ACol from "ant-design-vue/es/grid/Col"
|
||||
import ATooltip from "ant-design-vue/es/tooltip/Tooltip"
|
||||
import MiniArea from '@/components/chart/MiniArea'
|
||||
import MiniBar from '@/components/chart/MiniBar'
|
||||
import MiniProgress from '@/components/chart/MiniProgress'
|
||||
import RankList from '@/components/chart/RankList'
|
||||
import Bar from '@/components/chart/Bar'
|
||||
import LineChartMultid from '@/components/chart/LineChartMultid'
|
||||
import HeadInfo from '@/components/tools/HeadInfo.vue'
|
||||
|
||||
import Trend from '@/components/Trend'
|
||||
import { getLoginfo,getVisitInfo } from '@/api/api'
|
||||
import {httpAction} from "@api/manage";
|
||||
|
||||
export default {
|
||||
name: "IndexKmChart",
|
||||
components: {
|
||||
AreaChartTy,
|
||||
Pie,
|
||||
ATooltip,
|
||||
ACol,
|
||||
ChartCard,
|
||||
MiniArea,
|
||||
MiniBar,
|
||||
MiniProgress,
|
||||
RankList,
|
||||
Bar,
|
||||
Trend,
|
||||
LineChartMultid,
|
||||
HeadInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
kmChartVO:{},
|
||||
categoryAmount:[],
|
||||
categorySpace:[],
|
||||
topicAmount:[],
|
||||
topicSpace:[],
|
||||
rankListKeyword:[],
|
||||
rankListTopic:[],
|
||||
kmTotalAmount: 0,
|
||||
spaceTotal:'0',
|
||||
url: {
|
||||
list: "/KM/HomePage/getCharData",
|
||||
},
|
||||
loading: true,
|
||||
center: null,
|
||||
loginfo:{},
|
||||
visitFields:['ip','visit'],
|
||||
visitInfo:[],
|
||||
indicator: <a-icon type="loading" style="font-size: 24px" spin />
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// setTimeout(() => {
|
||||
// this.loading = !this.loading
|
||||
// }, 1000)
|
||||
this.listData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
listData(){
|
||||
console.log("listData...............")
|
||||
let httpurl = ''
|
||||
let method = ''
|
||||
httpurl += this.url.list
|
||||
method = 'get'
|
||||
this.loading = true
|
||||
httpAction(httpurl,null, method).then((res) => {
|
||||
if (res.success) {
|
||||
console.log("res.result:",res.result)
|
||||
this.kmChartVO = res.result
|
||||
this.kmTotalAmount = res.result.kmDocSummaryVO.kmAmount
|
||||
this.spaceTotal = res.result.kmDocSummaryVO.fileSizeString
|
||||
this.formHotKeywordList(res.result.hotKeywordList)
|
||||
this.formHotTopicList(res.result.hotTopicList)
|
||||
this.formCategoryChart(res.result.categoryChartList)
|
||||
this.formTopicChart(res.result.topicChartList)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.initLogInfo()
|
||||
},
|
||||
formHotKeywordList(hotKeywordList){
|
||||
if(hotKeywordList === null || hotKeywordList === undefined)
|
||||
return
|
||||
for(let i = 0; i<hotKeywordList.length; i++){
|
||||
this.rankListKeyword.push({name:hotKeywordList[i]})
|
||||
}
|
||||
},
|
||||
formHotTopicList(hotTopicList){
|
||||
if(hotTopicList === null || hotTopicList === undefined)
|
||||
return
|
||||
for(let i = 0; i<hotTopicList.length; i++){
|
||||
this.rankListTopic.push({name:hotTopicList[i]})
|
||||
}
|
||||
},
|
||||
formCategoryChart(categoryChartList){
|
||||
if(categoryChartList === null || categoryChartList === undefined)
|
||||
return
|
||||
for(let i = 0; i<categoryChartList.length; i++){
|
||||
this.categoryAmount.push({
|
||||
item: categoryChartList[i].itemText,
|
||||
count: categoryChartList[i].amount,
|
||||
})
|
||||
this.categorySpace.push({
|
||||
item: categoryChartList[i].itemText,
|
||||
count: categoryChartList[i].fileSizeInt,
|
||||
})
|
||||
}
|
||||
},
|
||||
formTopicChart(topicChartList){
|
||||
if(topicChartList === null || topicChartList === undefined)
|
||||
return
|
||||
for(let i = 0; i<topicChartList.length; i++){
|
||||
this.topicAmount.push({
|
||||
x: topicChartList[i].itemText,
|
||||
y: topicChartList[i].amount,
|
||||
})
|
||||
this.topicSpace.push({
|
||||
x: topicChartList[i].itemText,
|
||||
y: topicChartList[i].fileSizeInt,
|
||||
})
|
||||
}
|
||||
},
|
||||
initLogInfo () {
|
||||
getLoginfo(null).then((res)=>{
|
||||
if(res.success){
|
||||
Object.keys(res.result).forEach(key=>{
|
||||
res.result[key] =res.result[key]+""
|
||||
})
|
||||
this.loginfo = res.result;
|
||||
}
|
||||
})
|
||||
getVisitInfo().then(res=>{
|
||||
if(res.success){
|
||||
this.visitInfo = res.result;
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.circle-cust{
|
||||
position: relative;
|
||||
top: 28px;
|
||||
left: -100%;
|
||||
}
|
||||
.extra-wrapper {
|
||||
line-height: 55px;
|
||||
padding-right: 24px;
|
||||
|
||||
.extra-item {
|
||||
display: inline-block;
|
||||
margin-right: 24px;
|
||||
|
||||
a {
|
||||
margin-left: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 首页访问量统计 */
|
||||
.head-info {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
padding: 0 32px 0 0;
|
||||
min-width: 125px;
|
||||
|
||||
&.center {
|
||||
text-align: center;
|
||||
padding: 0 32px;
|
||||
}
|
||||
|
||||
span {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
display: inline-block;
|
||||
font-size: .95rem;
|
||||
line-height: 42px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
p {
|
||||
line-height: 42px;
|
||||
margin: 0;
|
||||
a {
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-comment>
|
||||
<a-avatar
|
||||
slot="avatar"
|
||||
:src="getAvatarView(userInfo.avatar)"
|
||||
alt="Han Solo"
|
||||
/>
|
||||
<div slot="content">
|
||||
<a-form-item style="width:85%;float: left">
|
||||
<a-textarea :rows="2" :value="value" @change="handleChange" />
|
||||
</a-form-item>
|
||||
<a-form-item style="float: right">
|
||||
<a-button html-type="submit" :loading="submitting" type="primary" @click="handleSubmit">
|
||||
评论
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
</a-comment>
|
||||
|
||||
<a-list item-layout="vertical" size="small" :split="false" :bordered="false" :loading="loading" :pagination="pagination" :data-source="comments">
|
||||
|
||||
<a-list-item slot="renderItem" key="item.id" slot-scope="item, index" class="ky-list-comment">
|
||||
<a-comment :author="item.createBy" :avatar="getAvatarView(item.avatar)">
|
||||
<p slot="content">
|
||||
{{ item.comment }}
|
||||
</p>
|
||||
<a-tooltip slot="datetime" :title="item.createTime">
|
||||
<span>{{ moment(item.createTime).fromNow() }}</span>
|
||||
</a-tooltip>
|
||||
</a-comment>
|
||||
</a-list-item>
|
||||
<a-spin v-if="loading" class="demo-loading" />
|
||||
</a-list>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import { getFileAccessHttpUrl, httpAction, getAction } from '@/api/manage'
|
||||
|
||||
const getCommentsUrl = '/KM/KmDocComments/list';
|
||||
const commitCommentsUrl = '/KM/KmDocComments/add';
|
||||
|
||||
export default {
|
||||
name: 'DocComments',
|
||||
props: {
|
||||
docId: ''
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
comments: [],
|
||||
userInfo:{},
|
||||
pagination: {
|
||||
onChange: page => {
|
||||
console.log(page)
|
||||
this.pagination.current = page
|
||||
this.fetchData()
|
||||
},
|
||||
hideOnSinglePage: true,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + "-" + range[1] + " 共" + total + "条"
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
},
|
||||
submitting: false,
|
||||
value: '',
|
||||
loading: false,
|
||||
moment,
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
docId(newVal,oldVal){
|
||||
console.log("id changed:",newVal)
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
this.userInfo = this.$store.getters.userInfo
|
||||
this.pagination.current =1
|
||||
this.fetchData()
|
||||
},
|
||||
getAvatarView: function (avatar) {
|
||||
return getFileAccessHttpUrl(avatar)
|
||||
},
|
||||
fetchData() {
|
||||
let params = {
|
||||
docId: this.docId,
|
||||
pageNo: this.pagination.current,
|
||||
pageSize: this.pagination.pageSize
|
||||
}
|
||||
getAction(getCommentsUrl, params).then((res) => {
|
||||
console.log("comments res:",res)
|
||||
if(res.success) {
|
||||
this.comments = res.result.records
|
||||
this.loading = false;
|
||||
if(res.result.total)
|
||||
{
|
||||
this.pagination.total = res.result.total;
|
||||
}else{
|
||||
this.pagination.total = 0;
|
||||
}
|
||||
}else{
|
||||
this.$message.warning("获取评论失败!" );
|
||||
}
|
||||
}).finally(() => {
|
||||
})
|
||||
},
|
||||
|
||||
handleSubmit() {
|
||||
if (!this.value) {
|
||||
return;
|
||||
}
|
||||
this.submitting = true;
|
||||
|
||||
let params = {
|
||||
docId: this.docId,
|
||||
comment: this.value
|
||||
}
|
||||
let passParam = Object.assign({}, params);
|
||||
// console.log("pass param",passParam)
|
||||
let method = 'post';
|
||||
httpAction(commitCommentsUrl, passParam ,method).then((res) => {
|
||||
console.log("comments res:",res)
|
||||
if(res.success){
|
||||
this.$message.success("评论成功!");
|
||||
this.fetchData();
|
||||
this.submitting = false;
|
||||
this.value = ''
|
||||
console.log("emit new ....res:",res)
|
||||
this.$emit('new','')
|
||||
}else {
|
||||
this.$message.warning("评论失败!" );
|
||||
}
|
||||
}).finally(() => {
|
||||
})
|
||||
},
|
||||
handleChange(e) {
|
||||
this.value = e.target.value;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.demo-loading {
|
||||
position: absolute;
|
||||
bottom: 40px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.ky-list-comment{
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
.ant-comment-inner{
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.ant-comment-content-detail{
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.ant-comment-content{
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.ant-comment{
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator">
|
||||
<a-button type="primary" icon="upload" @click="newBackup">创建新备份</a-button>
|
||||
</div>
|
||||
<!-- table区域-begin -->
|
||||
<div>
|
||||
<a-spin size="large" :spinning=spinning >
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:scroll="{x:true}"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a-space>
|
||||
<a-icon type="download" title="下载" @click="download(record)"
|
||||
:style="{ fontSize: '16px', color: '#1890FF'}"/>
|
||||
<a-divider type="vertical"/>
|
||||
<a-icon type="delete" title="删除" @click="deleteBackup(record)"
|
||||
:style="{ fontSize: '16px', color: '#1890FF' }"/>
|
||||
</a-space>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
</a-spin>
|
||||
</div>
|
||||
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { downloadFileName, httpPostAction } from '@api/manage'
|
||||
|
||||
export default {
|
||||
name: 'KmSysDbBackupList',
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
data () {
|
||||
return {
|
||||
spinning: false,
|
||||
description: '数据库备份管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title:'文件名',
|
||||
align:"left",
|
||||
dataIndex: 'fileName'
|
||||
},
|
||||
{
|
||||
title:'大小',
|
||||
align:"center",
|
||||
dataIndex: 'size'
|
||||
},
|
||||
{
|
||||
title:'备份时间',
|
||||
align:"left",
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
fixed:"right",
|
||||
width:80,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
},
|
||||
],
|
||||
url: {
|
||||
list: "/KM/kmSysDbBackup/list",
|
||||
add: "/KM/kmSysDbBackup/add",
|
||||
delete: "/KM/kmSysDbBackup/delete",
|
||||
downloadById: "/KM/kmSysDbBackup/downloadById",
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
//下载文件
|
||||
download(record) {
|
||||
this.$notification.success({
|
||||
message: '文件开始下载...',
|
||||
duration: 1,
|
||||
});
|
||||
downloadFileName(this.url.downloadById, {id: record.id})
|
||||
},
|
||||
//创建备份
|
||||
newBackup(record) {
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
httpurl += this.url.add;
|
||||
method = 'post';
|
||||
this.spinning = true
|
||||
httpPostAction(httpurl, {}, method).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success("创建备份成功!");
|
||||
this.loadData();
|
||||
} else {
|
||||
this.$message.warning("创建备份失败!");
|
||||
}
|
||||
}).finally(() => {
|
||||
this.spinning = false
|
||||
})
|
||||
},
|
||||
//删除
|
||||
deleteBackup(record) {
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
httpurl += this.url.delete;
|
||||
method = 'delete';
|
||||
this.spinning = true
|
||||
httpPostAction(httpurl, {id: record.id}, method).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success("删除成功!");
|
||||
this.loadData();
|
||||
record.favourite = 0;
|
||||
} else {
|
||||
this.$message.warning("删除失败!");
|
||||
}
|
||||
}).finally(() => {
|
||||
this.spinning = false
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="编号">
|
||||
<a-input placeholder="请输入编号" v-model="queryParam.serialNumber"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="分类">
|
||||
<j-dict-select-tag type="list" placeholder="请选择分类" v-model="queryParam.category"
|
||||
dictCode="km_dict_category"></j-dict-select-tag>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="标题">
|
||||
<a-input placeholder="请输入标题" v-model="queryParam.title"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-model-item label="标签">
|
||||
<j-multi-select-tag type="list_multi" v-model="queryParam.businessTypeList" :trigger-change="true"
|
||||
placeholder="请选择标签" dictCode="km_dict_business"></j-multi-select-tag>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="关键字">
|
||||
<a-input placeholder="请输入关键字" v-model="queryParam.keywords"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :xl="14" :lg="16" :md="18" :sm="47">
|
||||
<a-form-item label="上传时间">
|
||||
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间"
|
||||
class="query-group-cust" v-model="queryParam.createTimeStart"></j-date>
|
||||
<span class="query-group-split-cust"></span>
|
||||
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间"
|
||||
class="query-group-cust" v-model="queryParam.createTimeEnd"></j-date>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
</template>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 查询区域-END -->
|
||||
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:scroll="{x:true}"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
|
||||
</a-table>
|
||||
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
|
||||
import {httpPostAction} from '@/api/manage'
|
||||
export default {
|
||||
name: "ProjectListForm",
|
||||
mixins:[JeecgListMixin],
|
||||
data() {
|
||||
return {
|
||||
title: '收录文件到专题',
|
||||
|
||||
width: 1200,
|
||||
visible: false,
|
||||
disableSubmit: false,
|
||||
topicId:'',
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: "center",
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '标题',
|
||||
align: "left",
|
||||
dataIndex: 'title',
|
||||
scopedSlots: {customRender: 'docTitle'},
|
||||
customCell: () => {
|
||||
return {
|
||||
style: {
|
||||
'max-width': '30em',
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '分类',
|
||||
align: "center",
|
||||
dataIndex: 'category_dictText',
|
||||
sorter: true,
|
||||
customCell: () => {
|
||||
return {
|
||||
style: {
|
||||
'max-width': '6em',
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: '标签',
|
||||
align: "center",
|
||||
dataIndex: 'businessTypes_dictText',
|
||||
customCell: () => {
|
||||
return {
|
||||
style: {
|
||||
'max-width': '10em',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow:'ellipsis'
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '关键字',
|
||||
align: "center",
|
||||
dataIndex: 'keywords',
|
||||
customCell: () => {
|
||||
return {
|
||||
style: {
|
||||
'max-width': '10em',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow:'ellipsis'
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '上传人',
|
||||
align: "center",
|
||||
dataIndex: 'createBy',
|
||||
sorter: true,
|
||||
customCell: () => {
|
||||
return {
|
||||
style: {
|
||||
'max-width': '3em',
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '归属部门',
|
||||
align: "center",
|
||||
dataIndex: 'orgCode_dictText',
|
||||
sorter: true,
|
||||
customCell: () => {
|
||||
return {
|
||||
style: {
|
||||
'max-width': '5em',
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
],
|
||||
url:{
|
||||
list:'/KM/kmDoc/listPassed',
|
||||
addDocToTopic:'/KM/kmDoc/addDocToTopic'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
init(topicId){
|
||||
this.topicId=topicId;
|
||||
this.visible=true;
|
||||
},
|
||||
handleOk(){
|
||||
console.log("docIdsArr"+this.selectedRowKeys.toString());
|
||||
console.log('topicId:'+this.topicId);
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
let docIdsArr=this.selectedRowKeys.toString();
|
||||
httpurl += this.url.addDocToTopic;
|
||||
method = 'put';
|
||||
httpPostAction(httpurl, {topicId:this.topicId,docIds:docIdsArr}, method).then((res) => {
|
||||
console.log(res);
|
||||
if (res.success) {
|
||||
if(res.result==null || res.result == ""){
|
||||
this.$message.success("收录成功!");
|
||||
}else{
|
||||
|
||||
this.$message.warning(res.result+"文件收录失败");
|
||||
}
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<a-card :bordered="false" v-show="visible">
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAddModal()" type="primary" icon="plus">收录新文件</a-button>
|
||||
</div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:scroll="{x:true}"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a-popconfirm title="确定移除吗?" @confirm="() => removeTopic(record.id)">
|
||||
<a>移除</a>
|
||||
</a-popconfirm>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
<project-list-form ref="modalForm" @ok="modalFormOk" />
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
|
||||
import ProjectListForm from "./ProjectListForm";
|
||||
import {getAction,httpPostAction} from '@/api/manage'
|
||||
export default {
|
||||
name: 'DepartAuthModal',
|
||||
mixins: [JeecgListMixin],
|
||||
components:{
|
||||
ProjectListForm
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
visible:false,
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key:'rowIndex',
|
||||
align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'标题',
|
||||
align:"left",
|
||||
customCell: () => {
|
||||
return {
|
||||
style: {
|
||||
'max-width': '30em',
|
||||
},
|
||||
};
|
||||
},
|
||||
dataIndex: 'title'
|
||||
},
|
||||
{
|
||||
title:'关键字',
|
||||
align:"left",
|
||||
dataIndex: 'keywords'
|
||||
},
|
||||
{
|
||||
title:'编号',
|
||||
align:"center",
|
||||
dataIndex: 'serialNumber'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:"center",
|
||||
fixed:"right",
|
||||
width:"4em",
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/KM/kmDoc/listTopicPageList",
|
||||
removeDocFromTopic:"KM/kmDoc/removeDocFromTopic",
|
||||
},
|
||||
dictOptions:{},
|
||||
superFieldList:[],
|
||||
topicId:'',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function(){
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initDictConfig(){
|
||||
},
|
||||
created() {
|
||||
this.getSuperFieldList();
|
||||
},
|
||||
getSuperFieldList(){
|
||||
let fieldList=[];
|
||||
fieldList.push({type:'string',value:'serialNumber',text:'编号',dictCode:''})
|
||||
fieldList.push({type:'string',value:'title',text:'文件名',dictCode:''})
|
||||
fieldList.push({type:'string',value:'keywords',text:'关键字',dictCode:''})
|
||||
this.superFieldList = fieldList
|
||||
},
|
||||
getOrderMain(topicId) {
|
||||
this.topicId=topicId;
|
||||
if(this.topicId!==''){
|
||||
this.visible=true;
|
||||
}else{
|
||||
this.visible=false;
|
||||
}
|
||||
this.loadData(1);
|
||||
},
|
||||
loadData(arg) {
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1;
|
||||
}
|
||||
|
||||
var params = this.getQueryParams();
|
||||
if(this.topicId!=null) {
|
||||
this.loading=true;
|
||||
getAction(this.url.list, {
|
||||
topicId: this.topicId, pageNo: this.ipagination.current,
|
||||
pageSize: this.ipagination.pageSize
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records;
|
||||
console.log(this.dataSource);
|
||||
this.ipagination.total = res.result.total;
|
||||
} else {
|
||||
this.dataSource = null;
|
||||
}
|
||||
this.loading=false;
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
handleAddModal(){
|
||||
this.$refs.modalForm.init(this.topicId);
|
||||
},
|
||||
removeTopic(docId){
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
httpurl += this.url.removeDocFromTopic;
|
||||
method = 'put';
|
||||
httpPostAction(httpurl, {topicId:this.topicId,docId:docId}, method).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success("取消收录成功!");
|
||||
this.loadData(1);
|
||||
} else {
|
||||
this.$message.warning("取消收录失败!");
|
||||
}
|
||||
}).finally(() => {})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@ -0,0 +1,5 @@
|
||||
spring:
|
||||
application:
|
||||
name: jeecg-system
|
||||
profiles:
|
||||
active: prod
|
||||
@ -0,0 +1,14 @@
|
||||
${AnsiColor.BRIGHT_BLUE}
|
||||
|
||||
___ ____ ____ ____ ___ ____ ____ ____ ______
|
||||
|_ ||_ _||_ _||_ _| |_ ||_ _| |_ \ / _|.' ____ \
|
||||
| |_/ / \ \ / /______ | |_/ / | \/ | | (___ \_|
|
||||
| __'. \ \/ /|______|| __'. | |\ /| | _.____`.
|
||||
_| | \ \_ _| |_ _| | \ \_ _| |_\/_| |_ | \____) |
|
||||
|____||____| |______| |____||____||_____||_____| \______.'
|
||||
|
||||
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
KY-KMS Version: 0.0.1
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
${AnsiColor.BLACK}
|
||||
@ -0,0 +1 @@
|
||||
java -Dloader.path=lib -jar jeecg-boot-module-system-2.4.5.jar
|
||||