Commit d13449be by 杨琪琪

文本编辑框,首页图片滚动修改

parent 1597971f
ENV = 'development'
VUE_APP_BASE_API = 'http://172.18.3.187:9888'
VUE_APP_WS_API = 'ws://172.18.3.187:9888'
VUE_APP_FILE_API = 'http://172.18.3.187:9888'
VUE_APP_BASE_API = 'http://192.168.0.150:9888'
VUE_APP_WS_API = 'ws://192.168.0.150:9888'
VUE_APP_FILE_API = 'http://192.168.0.150:9888'
VUE_APP_LOGIN_API = 'http://171.106.48.55:36003/cas/login?service=http://172.18.3.187:9888/oauth/login?systemTag=oa-interInformation'
# 内网 登录地址
VUE_APP_LOGIN_API = 'http://171.106.48.55:36003/cas/login?service=http://192.168.0.150:9888/oauth/login?systemTag=oa-interInformation'
#获取菜单标识
VUE_APP_SYSTEAMTAG = ''
......
......@@ -9,7 +9,7 @@ VUE_APP_WS_API = ''
# VUE_APP_LOGIN_API = 'http://147.72.200.159:8080/cas/login?service=http://147.1.3.185/oauth/login?systemTag=oa-interInformation'
# VUE_APP_LOGIN_API = 'http://147.72.200.159:8080/cas/login?service=http://147.1.3.185/oauth/login?systemTag=oa-interInformation'
VUE_APP_LOGIN_API = 'http://147.2.3.11:8080/cas/login?service=http:/147.2.3.2/oauth/login?systemTag=oa-interInformation'
VUE_APP_LOGIN_API = 'http://147.1.6.16:8080/cas/login?service=http://147.2.3.18/oauth/login?systemTag=oa-interInformation'
......@@ -19,5 +19,3 @@ VUE_APP_SYSTEAMTAG = ''
#退出登录标识
VUE_APP_LOGINOUT_TAG='oa-interInformation'
\ No newline at end of file
#VUE_APP_LOGIN_API = http://171.106.48.55:36003/cas/login?service=http://171.106.48.55:29888/oauth/login?systemTag=workflow
\ No newline at end of file
......@@ -1108,6 +1108,11 @@
"strip-ansi": "^5"
}
},
"@tinymce/tinymce-vue": {
"version": "3.2.8",
"resolved": "https://registry.npmjs.org/@tinymce/tinymce-vue/-/tinymce-vue-3.2.8.tgz",
"integrity": "sha512-jEz+NZ0g+FZFz273OEUWz9QkwPMyjc5AJYyxOgu51O1Y5UaJ/6IUddXTX6A20mwCleEv5ebwNYdalviafx4fnA=="
},
"@types/glob": {
"version": "7.1.4",
"resolved": "https://registry.nlark.com/@types/glob/download/@types/glob-7.1.4.tgz",
......@@ -11603,6 +11608,11 @@
"integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
"dev": true
},
"tinymce": {
"version": "5.10.4",
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-5.10.4.tgz",
"integrity": "sha512-L0ivAhGu7bEo6cUBrCzhtKlkIQqG2sTcL+uu7soMSxrECQIC5VwUnzp9HCEf+fRl36q6zavLV48lf8jelj+gXA=="
},
"tippy.js": {
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.1.tgz",
......
......@@ -13,12 +13,14 @@
"@fullcalendar/moment": "^5.9.0",
"@fullcalendar/resource-timeline": "^5.9.0",
"@fullcalendar/vue": "^5.9.0",
"@tinymce/tinymce-vue": "^3.2.2",
"axios": "^0.21.1",
"core-js": "^2.6.5",
"element-ui": "^2.15.3",
"jquery": "^3.3.1",
"js-cookie": "^3.0.0",
"moment": "^2.29.1",
"tinymce": "^5.7.1",
"tippy.js": "^6.3.1",
"vue": "^2.6.10",
"vue-quill-editor": "^3.0.6",
......
......@@ -42,7 +42,8 @@
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
'link', 'unlink', '|',
'horizontal', 'spechars', 'wordimage', '|',
'inserttable', 'deletetable', 'mergecells', 'splittocells'
'inserttable', 'deletetable', 'mergecells', 'splittocells', '|',
'insertimage','simpleupload'
]]
//当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
//,labelMap:{
......
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body {
background-color: #2f3742;
color: #dfe0e4;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
margin: 1rem;
}
a {
color: #4099ff;
}
table {
border-collapse: collapse;
}
table th,
table td {
border: 1px solid #6d737b;
padding: 0.4rem;
}
figure {
display: table;
margin: 1rem auto;
}
figure figcaption {
color: #8a8f97;
display: block;
margin-top: 0.25rem;
text-align: center;
}
hr {
border-color: #6d737b;
border-style: solid;
border-width: 1px 0 0 0;
}
code {
background-color: #6d737b;
border-radius: 3px;
padding: 0.1rem 0.2rem;
}
/* Make text in selected cells in tables dark and readable */
td[data-mce-selected],
th[data-mce-selected] {
color: #333;
}
.mce-content-body:not([dir=rtl]) blockquote {
border-left: 2px solid #6d737b;
margin-left: 1.5rem;
padding-left: 1rem;
}
.mce-content-body[dir=rtl] blockquote {
border-right: 2px solid #6d737b;
margin-right: 1.5rem;
padding-right: 1rem;
}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body{background-color:#2f3742;color:#dfe0e4;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table td,table th{border:1px solid #6d737b;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#8a8f97;display:block;margin-top:.25rem;text-align:center}hr{border-color:#6d737b;border-style:solid;border-width:1px 0 0 0}code{background-color:#6d737b;border-radius:3px;padding:.1rem .2rem}td[data-mce-selected],th[data-mce-selected]{color:#333}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #6d737b;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #6d737b;margin-right:1.5rem;padding-right:1rem}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
margin: 1rem;
}
table {
border-collapse: collapse;
}
table th,
table td {
border: 1px solid #ccc;
padding: 0.4rem;
}
figure {
display: table;
margin: 1rem auto;
}
figure figcaption {
color: #999;
display: block;
margin-top: 0.25rem;
text-align: center;
}
hr {
border-color: #ccc;
border-style: solid;
border-width: 1px 0 0 0;
}
code {
background-color: #e8e8e8;
border-radius: 3px;
padding: 0.1rem 0.2rem;
}
.mce-content-body:not([dir=rtl]) blockquote {
border-left: 2px solid #ccc;
margin-left: 1.5rem;
padding-left: 1rem;
}
.mce-content-body[dir=rtl] blockquote {
border-right: 2px solid #ccc;
margin-right: 1.5rem;
padding-right: 1rem;
}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
@media screen {
html {
background: #f4f4f4;
min-height: 100%;
}
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
@media screen {
body {
background-color: #fff;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
box-sizing: border-box;
margin: 1rem auto 0;
max-width: 820px;
min-height: calc(100vh - 1rem);
padding: 4rem 6rem 6rem 6rem;
}
}
table {
border-collapse: collapse;
}
table th,
table td {
border: 1px solid #ccc;
padding: 0.4rem;
}
figure figcaption {
color: #999;
margin-top: 0.25rem;
text-align: center;
}
hr {
border-color: #ccc;
border-style: solid;
border-width: 1px 0 0 0;
}
.mce-content-body:not([dir=rtl]) blockquote {
border-left: 2px solid #ccc;
margin-left: 1.5rem;
padding-left: 1rem;
}
.mce-content-body[dir=rtl] blockquote {
border-right: 2px solid #ccc;
margin-right: 1.5rem;
padding-right: 1rem;
}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
@media screen{html{background:#f4f4f4;min-height:100%}}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}@media screen{body{background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.15);box-sizing:border-box;margin:1rem auto 0;max-width:820px;min-height:calc(100vh - 1rem);padding:4rem 6rem 6rem 6rem}}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure figcaption{color:#999;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
margin: 1rem auto;
max-width: 900px;
}
table {
border-collapse: collapse;
}
table th,
table td {
border: 1px solid #ccc;
padding: 0.4rem;
}
figure {
display: table;
margin: 1rem auto;
}
figure figcaption {
color: #999;
display: block;
margin-top: 0.25rem;
text-align: center;
}
hr {
border-color: #ccc;
border-style: solid;
border-width: 1px 0 0 0;
}
code {
background-color: #e8e8e8;
border-radius: 3px;
padding: 0.1rem 0.2rem;
}
.mce-content-body:not([dir=rtl]) blockquote {
border-left: 2px solid #ccc;
margin-left: 1.5rem;
padding-left: 1rem;
}
.mce-content-body[dir=rtl] blockquote {
border-right: 2px solid #ccc;
margin-right: 1.5rem;
padding-right: 1rem;
}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem auto;max-width:900px}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection {
/* Note: this file is used inside the content, so isn't part of theming */
background-color: green;
display: inline-block;
opacity: 0.5;
position: absolute;
}
body {
-webkit-text-size-adjust: none;
}
body img {
/* this is related to the content margin */
max-width: 96vw;
}
body table img {
max-width: 95%;
}
body {
font-family: sans-serif;
}
table {
border-collapse: collapse;
}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection {
/* Note: this file is used inside the content, so isn't part of theming */
background-color: green;
display: inline-block;
opacity: 0.5;
position: absolute;
}
body {
-webkit-text-size-adjust: none;
}
body img {
/* this is related to the content margin */
max-width: 96vw;
}
body table img {
max-width: 95%;
}
body {
font-family: sans-serif;
}
table {
border-collapse: collapse;
}
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse}
import request from '@/utils/request'
//获取栏目树
export const boardTree = () => {
return request({
url: 'websiteCluster/board/tree',
method: 'POST',
})
}
//栏目详情
export const doardDetail = (data) => {
return request({
url: `websiteCluster/board/boardDetail`,
method: 'POST',
data
})
}
//新建栏目
export const createBoard = (data) => {
return request({
url: `websiteCluster/board/createBoard`,
method: 'POST',
data
})
}
//更新栏目
export const updateBoard = (data) => {
return request({
url: `websiteCluster/board/updateBoard`,
method: 'POST',
data
})
}
//删除栏目
export const deleteBoard = (data) => {
return request({
url: `websiteCluster/board/deleteBoard`,
method: 'POST',
data
})
}
//根据栏目名 获取栏目信息
export const findBoard = (data) => {
return request({
url: `websiteCluster/web/findBoard`,
method: 'POST',
data
})
}
<template>
<div class="editor">
<editor v-model="myValue" :init="init"></editor>
</div>
</template>
<script>
import tinymce from "tinymce/tinymce"; //tinymce默认hidden,不引入不显示
import Editor from "@tinymce/tinymce-vue";
import "tinymce/themes/silver";
// 编辑器插件plugins
// 更多插件参考:https://www.tiny.cloud/docs/plugins/
import "tinymce/plugins/image"; // 插入上传图片插件
import "tinymce/plugins/media"; // 插入视频插件
import "tinymce/plugins/table"; // 插入表格插件
import "tinymce/plugins/lists"; // 列表插件
import "tinymce/plugins/wordcount"; // 字数统计插件
import "tinymce/icons/default";
import "tinymce/plugins/link";
import "tinymce/plugins/fullscreen";
import "tinymce/plugins/insertdatetime";
import "tinymce/plugins/hr";
import "tinymce/plugins/code";
export default {
components: {
Editor,
},
name: "tinymce",
props: {
value: {
type: String,
default: "",
},
disabled: {
type: Boolean,
default: false,
},
plugins: {
type: [String, Array],
// default: "lists image media table wordcount link fullscreen insertdatetime hr code",
default: "lists image table wordcount link fullscreen insertdatetime hr code",
},
toolbar: {
type: [String, Array],
default: "table undo redo | formatselect | fontselect fontsizeselect lineheight | fullscreen code | bold underline italic forecolor backcolor removeformat hr | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | insertdatetime link lists image media",
// default: "",
},
},
watch: {
value(newValue) {
this.myValue = newValue;
},
myValue(newValue) {
this.$emit('update:value', newValue)
// console.log(newValue)
// this.$emit("input", newValue);
// this.$emit('getContent',this.myValue)
},
},
data() {
return {
init: {
fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt", // 第二步
language_url: "/tinymce/langs/zh_CN.js",
language: "zh_CN",
skin_url: "/tinymce/skins/ui/oxide",
// skin_url: 'tinymce/skins/ui/oxide-dark',//暗色系
height: 500,
plugins: this.plugins,
toolbar: this.toolbar,
branding: false,
menubar: false, // 菜单栏
toolbar_mode: 'wrap',
font_formats: "方正大标宋简体='方正大标宋简体';方正小标宋简体='方正小标宋简体';微软雅黑='微软雅黑';宋体='宋体';黑体='黑体';仿宋='仿宋';楷体='楷体';隶书='隶书';幼圆='幼圆';Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings",
//时间处理
insertdatetime_formats: ["%Y年%m月%d日", "%Y年%m月%d日 %H点%M分"],
// 此处为图片上传处理函数,这个直接用了base64的图片形式上传图片,
// 如需ajax上传可参考https://www.tiny.cloud/docs/configure/file-image-upload/#images_upload_handler
images_upload_handler: (blobInfo, success, failure) => {
const img = "data:image/jpeg;base64," + blobInfo.base64();
// console.log('旧',img.length/1024);
this.dealImage(img, 1400, (newBase64) => {
success(newBase64);
// console.log('新',newBase64.length/1024);
});
},
},
myValue: this.value,
};
},
mounted() {
tinymce.init({});
},
methods: {
dealImage(base64, w, callback) {
var newImage = new Image();
var quality = 0.6; //压缩系数(越小导出base64越小)
newImage.src = base64;
newImage.setAttribute("crossOrigin", 'Anonymous'); //url为外域时需要
var imgWidth, imgHeight;
newImage.onload = function () {
imgWidth = this.width;
imgHeight = this.height;
var canvas = document.createElement("canvas");
var ctx = canvas.getContext("2d");
if (Math.max(imgWidth, imgHeight) > w) {
if (imgWidth > imgHeight) {
canvas.width = w;
canvas.height = w * imgHeight / imgWidth;
} else {
canvas.height = w;
canvas.width = w * imgWidth / imgHeight;
}
} else {
canvas.width = imgWidth;
canvas.height = imgHeight;
quality = 0.6;
}
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.drawImage(this, 0, 0, canvas.width, canvas.height);
var base64 = canvas.toDataURL("image/jpeg", quality); //压缩语句
// 如想确保图片压缩到自己想要的尺寸,如要求在50-150kb之间,请加以下语句,quality初始值根据情况自定
// while (base64.length / 1024 > 150) {
// quality -= 0.01;
// base64 = canvas.toDataURL("image/jpeg", quality);
// }
// 防止最后一次压缩低于最低尺寸,只要quality递减合理,无需考虑
// while (base64.length / 1024 < 50) {
// quality += 0.001;
// base64 = canvas.toDataURL("image/jpeg", quality);
// }
callback(base64); //必须通过回调函数返回,否则无法及时拿到该值
}
},
// 添加相关的事件,可用的事件参照文档=> https://github.com/tinymce/tinymce-vue => All available events
// 需要什么事件可以自己增加
getHtml() {
return this.myValue
},
// 可以添加一些自己的自定义事件,如清空内容
clear() {
this.myValue = "";
},
setHtml(html) {
this.myValue = html
}
},
};
</script>
<style>
.editor {
/* min-width: 800px !important;
max-width: 1000px; */
}
.tinymce-box {
height: 350px;
}
</style>
......@@ -55,6 +55,13 @@ const constantRouterMap = [
component: (resolve) => require(["@/views/manage"], resolve),
},
{
path: "/modularConfig",
name: "modularConfig",
meta: { title: "栏目设置", icon: "" },
component: (resolve) =>
require(["@/views/modularConfig"], resolve),
},
{
path: "/search",
name: "search",
meta: { title: "搜索", icon: "" },
......
<template>
<div class="tree">
<el-dialog
:title="title"
:visible="dialog"
:width="treeCheckbox ? minWidth : maxWidth"
:top="top"
:before-close="dialogClose"
@opened="open"
>
<el-row :gutter="20">
<el-col :span="treeCheckbox ? 24 : 12">
<div class="text-center p-10">部门</div>
<div class="tree-div">
<el-scrollbar style="height: 100%">
<el-tree
highlight-current
class="tree"
ref="tree"
:data="treeData"
:props="props"
:show-checkbox="treeCheckbox"
node-key="id"
check-strictly
@check-change="handleCheckChange"
@node-click="nodeClick"
>
</el-tree>
</el-scrollbar>
</div>
</el-col>
<el-col :span="12" v-if="!treeCheckbox" class="tips">
<div class="text-center p-10">用户</div>
<div class="checkbox">
<el-scrollbar style="height: 100%">
<div class="allDiv" v-if="userList.length">
<el-checkbox v-model="allDaptFalg" @change="allchange"
>{{ allDaptFalg ? "取消" : "" }}全选部门人员</el-checkbox
>
</div>
<el-checkbox-group
v-model="selectUserList"
:max="checkboxNum"
v-if="userList.length"
@change="checkboxGroupChange"
>
<div
class="checkbox-div"
v-for="(item, index) in userList"
:key="index"
>
<el-checkbox :label="item.tipsObj">{{
item.nickName
}}</el-checkbox>
</div>
</el-checkbox-group>
<div v-else>
<el-empty description="未获取到用户"></el-empty>
</div>
</el-scrollbar>
</div>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="dialogClose"
>确 认</el-button
>
<el-button size="mini" @click="dialogClose">关 闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { deptTree, getUserByDeptId } from "@/api/departmentTree";
export default {
props: {
title: {
type: String,
default: "部门与用户",
},
maxWidth: {
type: String,
default: "800px",
},
minWidth: {
type: String,
default: "400px",
},
top: {
type: String,
default: "30px",
},
treeCheckbox: {
//是否只选部门
type: Boolean,
default: true,
},
checkboxNum: {
//最大选择
type: Number,
default: 10000,
},
//单选
deptSelectChck: {
type: Boolean,
default: false,
},
propsName: {
type: Array,
default: () => ["userId", "nickName", "phone"],
},
},
data() {
return {
props: {
children: "childList",
label: "name",
key: "id",
},
treeData: [], //树形结构
userList: [], //该部门人员
selectUserList: [], //选中的用户列表
selecDeptList: [], //选择部门列表
dialog: false,
openData: [], //缓存区
allDaptFalg: false, //是否全选
};
},
created() {
this.deptTree();
},
methods: {
//部门单选
//部门树形图
deptTree() {
deptTree().then((res) => {
if (res.success) {
this.treeData = res.data;
} else {
this.$message.error(res.errMsg);
}
});
},
//部门人员
getUserByDeptId(deptId) {
getUserByDeptId(deptId).then((res) => {
if (res.success) {
let arr = [];
let userAll = [];
res.data.forEach((item) => {
//动态赋值添加参数
let propsObj = {};
this.propsName.forEach((e) => {
propsObj[e] = item[e];
});
arr.push({
userId: item.userId,
nickName: item.nickName,
tipsObj: JSON.stringify(propsObj),
});
userAll.push(JSON.stringify(propsObj));
});
this.userList = arr;
this.allDaptFalg = this.isInclude(userAll, this.selectUserList);
} else {
this.$message.error(res.errMsg);
}
});
},
//部门选择
handleCheckChange(data, checked) {
if (this.deptSelectChck) {
if (checked) {
this.$refs.tree.setCheckedKeys([data.id]);
}
}
let res = this.$refs.tree.getCheckedNodes();
this.selecDeptList = res;
},
//点击获取用户
nodeClick(param) {
let { id } = param;
this.getUserByDeptId(id);
},
//显示
dialogShow(e) {
this.dialog = true;
this.openData = e || [];
},
//打开时
open() {
if (this.treeCheckbox) {
//选择部门
this.selecDeptList = this.openData; //部门选择
if (this.selecDeptList.length) {
let idArr = [];
this.selecDeptList.forEach((item) => {
idArr.push(item.id);
});
this.$refs.tree.setCheckedKeys(idArr);
} else {
this.$refs.tree.setCheckedKeys([]);
}
} else {
//选择用户
let arr = [];
this.openData.forEach((item) => {
let propsObj = {};
this.propsName.forEach((e) => {
propsObj[e] = item[e];
});
arr.push(JSON.stringify(propsObj));
});
this.selectUserList = arr;
}
if (!this.openData.length) {
this.allDaptFalg = false;
}
this.$forceUpdate();
},
//隐藏 返回值
dialogClose() {
this.dialog = false;
if (this.treeCheckbox) {
//部门
this.$emit("selectDept", this.$refs.tree.getCheckedNodes());
this.selecDeptList = [];
} else {
//用户
let arr = [];
this.selectUserList.forEach((item) => {
arr.push(JSON.parse(item));
});
this.$emit("selectUser", arr);
this.selectUserList = [];
}
},
//全选本部门
allchange(e) {
this.allDaptFalg = e;
let selectList = [];
this.userList.forEach((item) => {
selectList.push(item.tipsObj);
});
if (this.allDaptFalg) {
let newList = [...this.selectUserList, ...selectList];
let arr = [];
newList.forEach((item) => {
if (arr.indexOf(item) == -1) {
arr.push(item);
}
});
this.selectUserList = arr;
} else {
if (this.arrayEqual(this.selectUserList, selectList)) {
this.selectUserList = [];
} else {
let list = this.selectUserList.filter((items) => {
if (!selectList.includes(items)) return items;
});
this.selectUserList = list;
}
}
},
//判断是否是全选了该部门的人
checkboxGroupChange(e) {
//本部门的字符串数组
let selectList = [];
this.userList.forEach((item) => {
selectList.push(item.tipsObj);
});
let state = this.isInclude(selectList, e);
this.allDaptFalg = state;
},
//包含判断 当前部门数组 当前选择数组
isInclude(userList, selectUserList) {
return userList.every((item) => {
return selectUserList.some((sub) => {
return sub === item;
});
});
},
//判断数组相等
arrayEqual(arr1, arr2) {
let flag = true;
if (arr1.length !== arr2.length) {
flag = false;
} else {
arr1.forEach((item) => {
if (arr2.indexOf(item) === -1) {
flag = false;
}
});
}
return flag;
},
},
};
</script>
<style lang="scss" scoped>
::v-deep {
.el-scrollbar__wrap {
overflow-x: hidden;
}
.el-dialog__body {
padding: 0;
}
.tips .el-checkbox {
width: 100%;
}
.el-checkbox-group {
border: 1px solid #eeeeee;
border-radius: 4px;
}
}
.tips {
border-left: 1px solid #eeeeee;
}
.p-10 {
width: 100%;
font-weight: bold;
}
.tree {
width: 100%;
&-div {
height: 500px;
padding: 10px 10px;
background: #ffffff;
border-radius: 8px;
}
}
.checkbox {
background: #ffffff;
padding: 10px 10px;
height: 500px;
border-radius: 8px;
&-div {
font-size: 16px;
border-bottom: 1px solid #eeeeee;
padding: 8px 10px;
// display: flex;
// justify-content: center;
}
&-div:last-child {
border-bottom: none;
}
&-div:hover {
background: #eeeeee;
}
}
.allDiv {
font-size: 16px;
padding: 8px 10px;
margin-bottom: 8px;
}
.checkbox-div .el-checkbox__label {
font-size: 16px;
}
.text-center {
text-align: center;
}
</style>
\ No newline at end of file
......@@ -407,6 +407,9 @@ export default {
this.getBreadcrumb();
var self = this;
self.getParams();
let dom = document.getElementsByClassName('.view-html');
console.log('--------获取dom',dom);
},
//从vuex store获取用户信息判断是否登录
computed: {
......@@ -425,6 +428,9 @@ export default {
// this.pushTopTab({meta.title: meta.title, path, query});
}
},
mounted(){
// this.getVedio();
},
methods: {
seeMoreEvent(type) {
// type=3;3是最新消息,1是关注自己的法院 5,精彩回顾
......@@ -614,6 +620,12 @@ export default {
}
});
this.getParams();
},
// 视频 下载
getVedio(){
var item = document.getElementsByClassName('.view-html');
console.log('---------获取dom',item);
}
}
};
......
......@@ -18,11 +18,17 @@
style="border-radius:8px;"
@click="setParams(item)"
>
<el-image
<!-- <el-image
v-if="item.attInfoList[0] && item.attInfoList[0].downloadPath"
:src="item.attInfoList[0].downloadPath"
fit="contain"
style="width:100%;height:100%;"
></el-image> -->
<el-image
v-if="item.rollAttInfoList[0] && item.rollAttInfoList[0].downloadPath"
:src="item.rollAttInfoList[0].downloadPath"
fit="contain"
style="width:100%;height:100%;"
></el-image>
<div class="carousel-intro" style>
<span>&ensp;{{item.subject}}&ensp;</span>
......@@ -142,7 +148,7 @@
<!--第二栏按钮列表开始-->
<el-row class="mt-15 out-zone-style" :gutter="10">
<el-col class="mb-10" :span="3" v-for="(item,index) in btnsList" :key="index">
<el-button style="width:100%;">
<el-button style="width:100%;" @click="toUrl(item.url)">
<el-image class="mr-5 gong-icon" :src="item.icon"></el-image>
{{item.name}}
</el-button>
......@@ -456,95 +462,118 @@ export default {
btnsList: [
{
icon: require("../../assets/home/btns/1-1.png"),
name: "综合门户"
name: "综合门户",
url: "http://147.2.3.2/#/newPortal"
},
{
icon: require("../../assets/home/btns/1.png"),
name: "公文汇总"
name: "公文汇总",
url: "http://147.1.3.150:83/"
},
{
icon: require("../../assets/home/btns/2.png"),
name: "法律总库"
name: "法律总库",
url: "http://192.2.2.16/search"
},
{
icon: require("../../assets/home/btns/3.png"),
name: "法律法规"
name: "法律法规",
url: "http://147.1.3.36/"
},
{
icon: require("../../assets/home/btns/4.png"),
name: "数据集中"
name: "数据集中",
url: "http://192.2.0.214/DataAnalyse/HomeView.jsp"
},
// {
// icon:require("../../assets/home/btns/5.png"),
// name:'公文汇总',
// },
{
icon: require("../../assets/home/btns/5.png"),
name: "即时通讯"
name: "即时通讯",
url: "http://147.2.3.21/fst.html"
},
{
icon: require("../../assets/home/btns/6.png"),
name: "办公系统"
name: "办公系统",
url: "http://147.2.3.2/#/newPortal"
},
{
icon: require("../../assets/home/btns/7.png"),
name: "公文处理"
name: "公文处理",
url: "http://147.2.3.2:8014"
},
{
icon: require("../../assets/home/btns/8.png"),
name: "内部邮件"
name: "内部邮件",
url: "http://147.2.3.2:8013/#/home"
},
{
icon: require("../../assets/home/btns/9.png"),
name: "院务公告"
name: "院务公告",
url: "http://147.2.3.2:8017/#/dashboard"
},
{
icon: require("../../assets/home/btns/10.png"),
name: "手机短信"
name: "手机短信",
url: "http://147.2.3.2:8089/#/index"
},
{
icon: require("../../assets/home/btns/11.png"),
name: "工作流程"
name: "工作流程",
url: "http://147.2.3.2:8015/#/todo"
},
{
icon: require("../../assets/home/btns/12.png"),
name: "文章简章"
name: "审委会工作",
url: "http://147.1.3.173/MeetingMinutes/"
},
{
icon: require("../../assets/home/btns/12.png"),
name: "文书签章",
url: "http://147.2.3.2:10005/#/dashboard"
},
{
icon: require("../../assets/home/btns/13.png"),
name: "人员查询"
name: "人员查询",
url: "http://147.2.3.21/general/ipanel/user_all.php"
},
{
icon: require("../../assets/home/btns/14.png"),
name: "科技法庭"
name: "科技法庭",
url: "http://147.1.3.175/"
},
{
icon: require("../../assets/home/btns/15.png"),
name: "通讯录"
name: "通讯录",
url: "http://147.2.3.2:8090/#/addressBook"
},
{
icon: require("../../assets/home/btns/16.png"),
name: "文书上网"
name: "文书上网",
url: "http://147.1.5.110:8670/WebCas.aspx"
},
{
icon: require("../../assets/home/btns/17.png"),
name: "图书馆"
name: "图书馆",
url: "http://192.0.0.198/"
},
{
icon: require("../../assets/home/btns/18.png"),
name: "执行文书"
name: "执行文书",
url: "http://192.0.101.71/list/list/?sorttype=1&conditions=searchWord+广西壮族自治区高级人民法院+SLFY++法院名称:广西壮族自治区高级人民法院&conditions=searchWord+5+AJLX++案件类型:执行案件"
},
{
icon: require("../../assets/home/btns/19.png"),
name: "人民法院内网"
name: "人民法院内网",
url: "http://www.court"
},
{
icon: require("../../assets/home/btns/20.png"),
name: "智能报表"
name: "智能报表",
url: "http://147.1.4.229:7080/zt/"
},
{
icon: require("../../assets/home/btns/21.png"),
name: "移动微学苑"
name: "移动微学苑",
url: "http://147.1.6.72/api/jyzd/"
}
],
imagesBox: [
......@@ -863,7 +892,21 @@ export default {
topListFun() {
topList({ fyId: 32, page: 1, size: 5 }).then(res => {
this.topList = res.data.records;
this.headlineRotation = res.data.records;
res.data.records.forEach(item => {
item.attInfoList.forEach(aitem => {
let suffix = [];
suffix = aitem.attachName.split('.');
if(suffix.length != 0){
if(suffix[suffix.length - 1] == 'jpg' || suffix[suffix.length - 1] == 'png' || suffix[suffix.length - 1] == 'jpeg'){
let rollAttInfoList = new Array();
rollAttInfoList.push(aitem);
item.rollAttInfoList = rollAttInfoList; // 图片列表
this.headlineRotation.push(item);
}
}
})
})
console.log('--------新闻图片滚动',this.headlineRotation);
});
},
getSubLevelBoardF() {
......@@ -983,6 +1026,9 @@ export default {
type: "menu"
}
});
},
toUrl(url){
window.open(url,'_blank');
}
}
};
......
......@@ -334,6 +334,11 @@ export default {
path: "/manage",
meta: { title: "信息发布系统" },
},
{
name: "modularConfig",
path: "/modularConfig",
meta: { title: "栏目设置" },
},
],
isAdmmin: false, // 当前用户是否为高院内部人员
};
......@@ -357,7 +362,6 @@ export default {
console.log("menuRouterClick-index==", index);
console.log("menuRouterClick-item==", item);
console.log("this.routesList==", this.routesList);
// this.classA = index;
console.log("this.classA==", this.classA);
// new --- start 记录上一个被点击菜单
var lastClass;
......@@ -365,11 +369,8 @@ export default {
// new --- end
this.classA = index;
item = this.routesList[this.classA];
if (item.name == "manage") {
// var url=process.env.VUE_APP_LOGIN_API+'/manage'
// window.open(url)
// window.open("/#/manage");
var userInfo = sessionStorage.getItem("userInfo");
if (item.name == "manage" || item.name == "modularConfig") {
console.log("user==", userInfo);
if (!userInfo) {
......@@ -427,8 +428,8 @@ export default {
});
}
},
tiaozhuan(rwo){
window.open(rwo.url)
tiaozhuan(rwo) {
window.open(rwo.url);
},
// 2、点击二级子栏目--跳转到列表
menuselected(item, subItem) {
......@@ -444,7 +445,6 @@ export default {
}
}
// if(item.name="fun"){
// this.$message({
// message:'开发中...',
......@@ -453,7 +453,6 @@ export default {
// return;
// }
if (
subItem.name == "top" ||
subItem.name == "all" ||
......
......@@ -14,7 +14,7 @@
>最近联系人</el-button
>
<el-button @click="userShow = true" size="mini">选择审核用户</el-button>
<el-button @click="selectUser = {}" size="mini">清空</el-button>
<el-button @click="clearFun" size="mini">清空</el-button>
</div>
<div class="mt-15 text-center">
<el-button @click="submit" size="mini" type="primary"
......@@ -70,6 +70,14 @@ export default {
selectUser: {},
};
},
watch:{
"param.boardId":{
handler(nval,oval){
console.log('-----------栏目id', nval,oval);
},
immediate:true
}
},
created() {},
methods: {
//显示审核框
......@@ -117,6 +125,11 @@ export default {
});
},
// 清空
clearFun(){
this.selectUser = {}
},
//提交
submit() {
this.$emit("submit", this.selectUser);
......
......@@ -7,7 +7,8 @@
<el-col :span="5" class="border-zone">
<div class="list-container" style>
<!-- <a :href="process.env.VUE_APP_LOGIN_API">点击</a> -->
<div class="list-title mb-10" @click="loginEvent">选择栏目</div>
<!-- <div class="list-title mb-10" @click="loginEvent">选择栏目</div> -->
<div class="list-title mb-10" >选择栏目</div>
<el-tree :data="dataTreeFile" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</div>
</el-col>
......@@ -243,7 +244,9 @@
</el-checkbox-group>
</el-form-item>
<div class="mb-15" style="width: 100%">
<vue-ueditor-wrap v-model="htmlContent" :config="myConfig"></vue-ueditor-wrap>
<!-- UEditor -->
<!-- <vue-ueditor-wrap v-model="htmlContent" :config="myConfig"></vue-ueditor-wrap> -->
<EditorTinymce :value.sync="htmlContent" />
</div>
<!-- 如果是高院的就都没有上报高院和上报中院,中院有上报高院 ,就是sbGy,基层院有上报高院 还要上报中院 sbZy -->
<el-form-item label="上报高院" v-if="userLevel != '高院'">
......@@ -262,7 +265,6 @@
<el-button>取消</el-button>
</el-form-item>
</el-form>
<!-- UEditor -->
</el-tab-pane>
<el-tab-pane name="third">
<span slot="label">
......@@ -646,7 +648,8 @@
</el-checkbox-group>
</el-form-item>
<div class="mb-15" style="width: 100%">
<vue-ueditor-wrap v-model="newsFormEdit.content" :config="checkConfig"></vue-ueditor-wrap>
<!-- <vue-ueditor-wrap v-model="newsFormEdit.content" :config="checkConfig"></vue-ueditor-wrap> -->
<EditorTinymce :value.sync="newsFormEdit.content" />
</div>
<el-form-item label="上报高院" v-if="userLevel != '高院'">
<el-checkbox disabled v-model="newsFormEdit.sbGy" true-label="1" false-label="0"></el-checkbox>
......@@ -745,7 +748,8 @@
</el-checkbox-group>
</el-form-item>
<div class="mb-15" style="width: 100%">
<vue-ueditor-wrap v-model="newsFormEdit.content" :config="myConfig"></vue-ueditor-wrap>
<!-- <vue-ueditor-wrap v-model="newsFormEdit.content" :config="myConfig"></vue-ueditor-wrap> -->
<EditorTinymce :value.sync="newsFormEdit.content" />
</div>
<el-form-item label="上报高院" v-if="userLevel != '高院'">
<el-checkbox v-model="newsFormEdit.sbGy" true-label="1" false-label="0"></el-checkbox>
......@@ -1116,6 +1120,7 @@
</template>
<script>
import vueUeditorWrap from "vue-ueditor-wrap";
import EditorTinymce from "@/components/EditorTinymce";
import deptList from "@/components/deptList";
import {
getBoardTree,
......@@ -1155,7 +1160,8 @@ export default {
components: {
vueUeditorWrap,
deptList, //所属部门组件
audit
audit,
EditorTinymce
},
data() {
return {
......@@ -1232,6 +1238,9 @@ export default {
// 初始容器宽度
initialFrameWidth: "99%",
// 上传文件接口
imageActionUrl:"http://xxx.com/api/uploads",//图片上传地址
imageAllowFiles:[".png",".jpg",".jpeg",",gif"],//图片上传类型限制
imageMaxSize:2048000,//图片限制大小2M以内
// serverUrl: "",
UEDITOR_HOME_URL: "/UEditor/"
},
......@@ -2141,6 +2150,15 @@ export default {
this.newsForm.boardId = boardId; //当前栏目id
this.curBoardId = boardId;
this.newsForm.boardName = boardName; //当前栏目名
if(this.newsForm.assUser){
this.newsForm.assUser = ""; // 审核人
}
if(this.newsForm.nickName){
this.newsForm.nickName = "";
}
this.$refs.audit.clearFun();
this.getManageList(); //获取管理列表
// this.getAssInfoList();//获取审核列表
// this.getReportList();//获取收报信息列表
......@@ -2151,18 +2169,9 @@ export default {
loginEvent() {
removeToken();
// location.href = loginURL ;
location.href = process.env.VUE_APP_LOGIN_API;
},
loginOut() {
// alert('11111',process.env.VUE_APP_LOGIN_API);
// logout().then((res) => {
// removeToken();
// location.href = res.data;
// });
// var loginURL  = process.env.VUE_APP_LOGIN_API;
// console.log('loginURL222222222222==',loginURL );
// location.href = loginURL ;
location.href = process.env.VUE_APP_LOGIN_API;
},
// 管理列表--页面切换
......@@ -2486,8 +2495,8 @@ export default {
// 收报信息--留言
leaveDia(newsId) {
let params = {};
// params.newsId=newsId;
params.newsId = "f4bf8ffc4ec54e98a180f36b95668ec6";
params.newsId=newsId;
// params.newsId = "f4bf8ffc4ec54e98a180f36b95668ec6";
messageDetail(JSON.stringify(params)).then(res => {
if (res.success) {
this.messageDetailDataList = res.data;
......
......@@ -14,20 +14,38 @@ export default {
methods: {
...mapMutations(["SET_USER"]),
// 接收Token
// getH() {
// let obj = this.$route.query;
// if (obj.Authorization) {
// let token = "Bearer " + obj.Authorization;
// // getInfo().then((res) => {
// // setUserInfo(res);
// // this.SET_USER(res.user);
// // });
// // console.log(token);
// setToken(token, false);
// this.$router.push("/");
// }
// },
getH() {
let obj = this.$route.query;
if (obj.Authorization) {
let token = "Bearer " + obj.Authorization;
// getInfo().then((res) => {
// setUserInfo(res);
// this.SET_USER(res.user);
// });
// console.log(token);
let token =
obj.Authorization.indexOf("Bearer ") == -1
? "Bearer " + obj.Authorization
: obj.Authorization;
let cookie = obj.JSESSIONID;
Cookie.set("JSESSIONID---", cookie);
localStorage.setItem("token", token);
setToken(token, false);
if (obj.url) {
this.$router.push(obj.url);
} else {
this.$router.push("/");
}
}
},
},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment