Commit d93c697f authored by 高飞's avatar 高飞

修改导调模块各类文件格式图片显示。信息制品第二级数据头部展示联动

parent 5903c075
...@@ -59,6 +59,18 @@ ...@@ -59,6 +59,18 @@
<el-image :src="textImg" @click="showLiterature(item1.attachment)"> <el-image :src="textImg" @click="showLiterature(item1.attachment)">
</el-image> </el-image>
</template> </template>
<template v-else-if="item1.type == 'WORD'">
<el-image :src="wordImg" @click="showLiterature(item1.attachment)">
</el-image>
</template>
<template v-else-if="item1.type == 'PDF'">
<el-image :src="pdfImg" @click="showLiterature(item1.attachment)">
</el-image>
</template>
<template v-else-if="item1.type == 'PPT'">
<el-image :src="pptImg" @click="showLiterature(item1.attachment)">
</el-image>
</template>
</div> </div>
</div> </div>
</div> </div>
...@@ -103,7 +115,10 @@ import ChatRoomDialog from "@/view/ddkz/components/chatRoomDialog.vue"; ...@@ -103,7 +115,10 @@ import ChatRoomDialog from "@/view/ddkz/components/chatRoomDialog.vue";
import chatRoomMemberDialog from "@/view/ddkz/components/chatRoomMemberDialog.vue"; import chatRoomMemberDialog from "@/view/ddkz/components/chatRoomMemberDialog.vue";
import sendEmailDialog from "@/view/ddkz/components/sendEmailDialog.vue"; import sendEmailDialog from "@/view/ddkz/components/sendEmailDialog.vue";
import textImg from '@/assets/img/ddkz/tool1.png'; import textImg from '@/assets/img/ddkz/tool1.png';
import excelImg from '@/assets/img/ddkz/tool5.png'; import excelImg from '@/assets/img/ddkz/excel.png';
import wordImg from '@/assets/img/ddkz/word.png';
import pdfImg from '@/assets/img/ddkz/pdf.png';
import pptImg from '@/assets/img/ddkz/ppt.png';
import { MAIL_ADDRESS } from "@/constant/user"; import { MAIL_ADDRESS } from "@/constant/user";
import dayjs from "dayjs"; import dayjs from "dayjs";
export default { export default {
...@@ -112,6 +127,9 @@ export default { ...@@ -112,6 +127,9 @@ export default {
goBack: goBack, goBack: goBack,
excelImg: excelImg, excelImg: excelImg,
textImg: textImg, textImg: textImg,
wordImg: wordImg,
pdfImg: pdfImg,
pptImg: pptImg,
formInfo: { formInfo: {
timeFrame: 5, timeFrame: 5,
fromUser: null fromUser: null
...@@ -154,6 +172,7 @@ export default { ...@@ -154,6 +172,7 @@ export default {
this.stompClient.subscribe(item.address, res => { this.stompClient.subscribe(item.address, res => {
// this.getRecordsByPagingFn(item); // this.getRecordsByPagingFn(item);
let body = JSON.parse(res.body); let body = JSON.parse(res.body);
console.log(body)
this.publicNoticeList.push({ this.publicNoticeList.push({
attachment: body.attachment, attachment: body.attachment,
content: body.content, content: body.content,
......
...@@ -65,18 +65,34 @@ export default { ...@@ -65,18 +65,34 @@ export default {
showDialog() { showDialog() {
this.dialogVisible = true; this.dialogVisible = true;
}, },
beforeRemove(file, fileList) {
if(fileList.length>0){
this.form.title = fileList[fileList.length-1].name.split('.')[0];
}else{
this.form.title = '';
}
},
handleChange(file, fileList) { handleChange(file, fileList) {
let fd = new FormData(); let fd = new FormData();
fd.append('file', file.raw); fd.append('file', file.raw);
if(this.form.title==''){
this.form.title = file.name.split('.')[0];
}
upLoadFiles('CHAT', fd).then(res => { upLoadFiles('CHAT', fd).then(res => {
this.form.attachment = res; this.form.attachment = res;
let type = file.name.split('.')[1]; let type = file.name.split('.')[1].toLowerCase();
if (type == 'png' || type == 'jpg' || type == 'PNG' || type == 'JPG') { if (type == 'png' || type == 'jpg') {
this.form.messageForm = 'PICTURE'; this.form.messageForm = 'PICTURE';
} else if (type == 'mp4' || type == 'MP4' || type == 'flv' || type == 'FLV') { } else if (type == 'mp4' || type == 'flv' ) {
this.form.messageForm = 'VIDEO'; this.form.messageForm = 'VIDEO';
} else if (type == 'xlsx' || type == 'xls' || type == 'XLSX' || type == 'XLS') { } else if (type == 'xlsx' || type == 'xls') {
this.form.messageForm = 'EXCEL'; this.form.messageForm = 'EXCEL';
} else if (type == 'doc' || type == 'docx') {
this.form.messageForm = 'WORD';
} else if (type == 'pdf') {
this.form.messageForm = 'PDF';
} else if (type == 'ppt' || type == 'pptx') {
this.form.messageForm = 'PPT';
} else { } else {
this.form.messageForm = 'TEXT'; this.form.messageForm = 'TEXT';
} }
...@@ -87,6 +103,7 @@ export default { ...@@ -87,6 +103,7 @@ export default {
this.form.fileList = []; this.form.fileList = [];
}, },
sendNotice() { sendNotice() {
console.log(this.form);
if (this.currentChatRoom.teamInfo.teamType == "DIRECTOR") { if (this.currentChatRoom.teamInfo.teamType == "DIRECTOR") {
this.myStompClient.send(`/app/sendToChatRoom/${this.currentChatRoom.id}/${this.currentChatRoom.teamId}`, {}, JSON.stringify(this.form)); this.myStompClient.send(`/app/sendToChatRoom/${this.currentChatRoom.id}/${this.currentChatRoom.teamId}`, {}, JSON.stringify(this.form));
} else { } else {
......
<template>
<div class="navMenu">
<template v-for="navMenu in navMenus">
<!-- 最后一级菜单 -->
<el-menu-item v-if="!navMenu.children" :key="navMenu.id" :data="navMenu"
:index="navMenu.id+''">
<span slot="title">{{ navMenu.label }}</span>
</el-menu-item>
<!-- 此菜单下还有子菜单 -->
<el-submenu v-if="navMenu.children" :key="navMenu.id" :data="navMenu"
:index="navMenu.id+''">
<template slot="title">
<span> {{ navMenu.label }}</span>
</template>
<!-- 递归 -->
<NavMenu :navMenus="navMenu.children"></NavMenu>
</el-submenu>
</template>
</div>
</template>
<script>
// import NavMenu from "./NavMenu.vue";
export default {
name: 'NavMenu',
props: ['navMenus'],
// components: { NavMenu },
data() {
return {}
},
methods: {},
activated() {
console.log(11111111111)
console.log(this.navMenus)
},
};
</script>
<style>
/* @import "../../assets/styles/navMenu.scss"; */
/* 水平样式 */
</style>
\ No newline at end of file
<template> <template>
<el-container class="myContainer"> <el-container class="myContainer">
<el-header class="myHeader"> <el-header class="myHeader" style="display: none;">
<el-menu default-active="1" class="second-router" mode="horizontal" @open="handleOpen" @close="handleClose" <el-menu default-active="1" class="second-router" mode="horizontal" @open="handleOpen" @close="handleClose"
background-color="transparent" text-color="#fff" @select="handleSelect"> background-color="transparent" text-color="#fff" @select="handleSelect">
<template v-for="(item, index) in module"> <template v-for="(item, index) in module">
......
<template> <template>
<div id="wjfx_fzjc"> <div id="wjfx_fzjc">
<div class="left-div"> <div style="width: 100%;float: left;">
<el-input <!-- <ul class="uls">
class="public-input" <li @click="clickButtomTop()">文档列表> </li>
placeholder="输入关键字进行过滤" <li v-for="(item) in trees" @click="clickButtom(item)">{{ item.label + '>' }}</li>
suffix-icon="el-icon-search" </ul> -->
v-model="filterText" <ul class="uls uls1">
></el-input> <li v-for="(item) in treesChildren" @click="clickButtom(item)" :class="[expandedArr[0]==item.id?'active':'']">{{ item.label }}</li>
<el-tree </ul>
:data="tree_data" <!-- <div v-for="(item, index) in modules" style="width: 200px;float: left;">
node-key="id" <el-menu background-color="red" text-color="#fff" active-text-color="#010008">
:expand-on-click-node="false" <NavMenu :navMenus="item"></NavMenu>
:filter-node-method="filterNode" </el-menu>
highlight-current </div> -->
:props="defaultProps"
ref="tree"
:current-node-key="4"
:default-expanded-keys="[4]"
@node-click="handleNodeClick"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="first-span" :title="node.label">{{ node.label }}</span>
</span>
</el-tree>
</div> </div>
<div class="right-div"> <div style="width: 100%;height: calc(100% - 30px);">
<component :is="currentRole" :clientDetails="clientDetails" ref="mychild"/> <div class="left-div">
<el-input class="public-input" placeholder="输入关键字进行过滤" suffix-icon="el-icon-search"
v-model="filterText"></el-input>
<el-tree :data="tree_data" node-key="id" :expand-on-click-node="false" :filter-node-method="filterNode"
highlight-current :props="defaultProps" ref="tree" :current-node-key="4" :default-expanded-keys="expandedArr"
@node-click="handleNodeClick">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="first-span" :title="node.label">{{ node.label }}</span>
</span>
</el-tree>
</div>
<div class="right-div">
<component :is="currentRole" :clientDetails="clientDetails" ref="mychild" />
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -34,18 +37,19 @@ import { get, post, delete_util } from "../../util/http_util"; ...@@ -34,18 +37,19 @@ import { get, post, delete_util } from "../../util/http_util";
import { queryDocumentTree, } from '../../api/xxzp/wxgl'; import { queryDocumentTree, } from '../../api/xxzp/wxgl';
import XLSX from "xlsx"; import XLSX from "xlsx";
import navs from "./znfx.vue"; import navs from "./znfx.vue";
import NavMenu from "./NavMenu.vue";
// import navs1 from "./znjsfx.vue"; // import navs1 from "./znjsfx.vue";
let id = 1000; let id = 1000;
export default { export default {
components: { navs }, components: { navs, NavMenu },
data() { data() {
return { return {
clientDetails: {}, clientDetails: {},
currentRole: "navs", currentRole: "navs",
tree_data: [], //左侧树结构的数据 tree_data: [], //左侧树结构的数据
dialogVisible: false, //新增子节点弹出框 dialogVisible: false, //新增子节点弹出框
dialogVisible_edit:false, dialogVisible_edit: false,
name_edit:'', name_edit: '',
name: "", //新增子节点的名称 name: "", //新增子节点的名称
this_data: "", this_data: "",
this_node: "", this_node: "",
...@@ -54,13 +58,17 @@ export default { ...@@ -54,13 +58,17 @@ export default {
children: 'children', children: 'children',
label: 'label' label: 'label'
}, },
expandedArr: [4],
dialogVisibleImport: false, dialogVisibleImport: false,
title: "", title: "",
pickNew: "", pickNew: "",
tableDataFromExcelHead: [], tableDataFromExcelHead: [],
tableDataFromExcel: [], tableDataFromExcel: [],
module_name:'信息制品文档', module_name: '信息制品文档',
trees: [],
treesChildren: [],
tree: [],
modules: [],
}; };
}, },
methods: { methods: {
...@@ -70,11 +78,22 @@ export default { ...@@ -70,11 +78,22 @@ export default {
queryDocumentTree(this.module_name) queryDocumentTree(this.module_name)
.then((res) => { .then((res) => {
this.tree_data = [{ this.tree_data = [{
id:4, id: 4,
label:'文档列表', label: '文档列表',
level:0, level: 0,
children:res children: res
}]; }];
this.tree = res;
this.treesChildren = res;
console.log(res)
// this.modules = [];
// if (res.length > 0) {
// res.forEach(item => {
// let arr = [item];
// this.modules.push(arr);
// })
// }
// console.log(this.modules)
this.currentRole = "navs"; this.currentRole = "navs";
this.clientDetails = { type: 4 }; this.clientDetails = { type: 4 };
}) })
...@@ -86,10 +105,51 @@ export default { ...@@ -86,10 +105,51 @@ export default {
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}, },
clickButtomTop() {
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(4);
});
this.currentRole = "navs";
this.clientDetails = { type: 4 };
this.expandedArr = [4]
},
clickButtom(item) {
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(item.id);
});
// this.$refs.tree.setCurrentKey([item.id]);
this.currentRole = "navs";
this.clientDetails = { type: item.id };
this.expandedArr = [item.id];
// let arr = this.getPathById(this.tree, item.id);
// if (arr != undefined) {
// this.trees = arr.reverse();
// this.treesChildren = arr[arr.length - 1].children;
// } else {
// this.trees = [];
// this.treesChildren = this.tree;
// }
// if (this.trees.length > 0) {
// let ars = [];
// this.trees.forEach(i => {
// ars.push(i.id);
// })
// this.expandedArr = ars;
// }
},
//节点点击事件 //节点点击事件
handleNodeClick(node, data) { handleNodeClick(node, data) {
this.currentRole = "navs"; // let arr = this.getPathById(this.tree, node.id);
this.clientDetails = { type: node.id }; // if (arr != undefined) {
// this.trees = arr.reverse();
// this.treesChildren = arr[arr.length - 1].children;
// } else {
// this.trees = [];
// this.treesChildren = this.tree;
// }
this.currentRole = "navs";
this.clientDetails = { type: node.id };
this.expandedArr = [node.id]
// if (node.id == 21 || this.getparentNode(data) == 21) { // if (node.id == 21 || this.getparentNode(data) == 21) {
// this.currentRole = "navs"; // this.currentRole = "navs";
// this.clientDetails = { type: node.id }; // this.clientDetails = { type: node.id };
...@@ -107,6 +167,25 @@ export default { ...@@ -107,6 +167,25 @@ export default {
return this.getparentNode(data.parent); return this.getparentNode(data.parent);
} }
}, },
getPathById(list, id) {
let _that = this;
for (let i in list) {
if (list[i].id === id) {
//查询到就返回该数组对象
return [list[i]]
}
if (list[i].children) {
let node = _that.getPathById(list[i].children, id)
if (node !== undefined) {
//查询到把父节点连起来
return node.concat(list[i])
}
}
}
}
}, },
watch: { watch: {
filterText(val) { filterText(val) {
...@@ -123,61 +202,101 @@ export default { ...@@ -123,61 +202,101 @@ export default {
width: calc(100% - 50px); width: calc(100% - 50px);
height: calc(100% - 70px); height: calc(100% - 70px);
margin: 20px; margin: 20px;
.uls {
list-style: none;
li {
padding: 7px 35px;
float: left;
cursor: pointer;
font-size: 14px;
font-weight: 900;
}
}
.uls1 {
li {
background: linear-gradient(to right, #43555c47, #304a5185);
margin: 0px 10px;
border-radius: 9px;
}
.active{
background: linear-gradient(to right, #00b6ff75, #304a51db);
}
}
.el-menu{
border-right: none;
}
.left-div { .left-div {
width: 15%; width: 15%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
float: left; float: left;
input { input {
color: white; color: white;
background-color: transparent; background-color: transparent;
} }
.el-input { .el-input {
position: relative; position: relative;
font-size: 14px; font-size: 14px;
display: inline-block; display: inline-block;
width: 100%; width: 100%;
} }
.el-button + .el-button {
.el-button+.el-button {
margin-left: 0px !important; margin-left: 0px !important;
} }
.el-tree { .el-tree {
color: white; color: white;
background: transparent; background: transparent;
height: calc(100% - 50px); height: calc(100% - 50px);
margin-top: 10px; margin-top: 10px;
.el-tree-node__content { .el-tree-node__content {
height: 40px; height: 40px;
.el-icon-circle-plus { .el-icon-circle-plus {
display: none; display: none;
} }
.el-icon-error { .el-icon-error {
display: none; display: none;
} }
.el-icon-upload { .el-icon-upload {
display: none; display: none;
} }
.el-icon-edit-outline { .el-icon-edit-outline {
display: none; display: none;
} }
.list-span{
.list-span {
display: none; display: none;
} }
} }
} }
.el-tree > .el-tree-node > .el-tree-node__content {
.el-tree>.el-tree-node>.el-tree-node__content {
height: 40px; height: 40px;
// background-image: url(../../assets/img/yqjc/24.png); // background-image: url(../../assets/img/yqjc/24.png);
background-image: url("../../assets/img/dfzy/new/6.png"); background-image: url("../../assets/img/dfzy/new/6.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.el-icon-error { .el-icon-error {
display: none !important; display: none !important;
} }
.el-icon-edit-outline { .el-icon-edit-outline {
display: none !important; display: none !important;
} }
// .list-span{ // .list-span{
// display: none !important; // display: none !important;
// } // }
...@@ -185,19 +304,18 @@ export default { ...@@ -185,19 +304,18 @@ export default {
// margin-left: -50px; // margin-left: -50px;
// } // }
} }
.el-tree
> .el-tree-node .el-tree>.el-tree-node>.el-tree-node__children>.el-tree-node>.el-tree-node__content {
> .el-tree-node__children
> .el-tree-node
> .el-tree-node__content {
height: 40px; height: 40px;
// background-image: url(../../assets/img/yqjc/24.png); // background-image: url(../../assets/img/yqjc/24.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.el-tree > .el-tree-node > .el-tree-node__content > .el-tree-node__label {
.el-tree>.el-tree-node>.el-tree-node__content>.el-tree-node__label {
font-size: 16px !important; font-size: 16px !important;
} }
.custom-tree-node { .custom-tree-node {
flex: 1; flex: 1;
display: flex; display: flex;
...@@ -206,6 +324,7 @@ export default { ...@@ -206,6 +324,7 @@ export default {
font-size: 12px; font-size: 12px;
padding-right: 8px; padding-right: 8px;
width: 82%; width: 82%;
.first-span { .first-span {
width: 100%; width: 100%;
float: left; float: left;
...@@ -213,60 +332,71 @@ export default { ...@@ -213,60 +332,71 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.list-span{
.list-span {
position: absolute; position: absolute;
right: 20px; right: 20px;
} }
} }
.el-tree > .el-tree-node > .el-tree-node__children {
.el-tree>.el-tree-node>.el-tree-node__children {
// background-color: #1d2d46ad !important; // background-color: #1d2d46ad !important;
width: 100%; width: 100%;
height: calc(100% - 44px); height: calc(100% - 44px);
overflow: auto; overflow: auto;
position: relative; position: relative;
.el-tree-node{
.el-tree-node {
// width: 300px; // width: 300px;
} }
} }
.el-tree-node:focus > .el-tree-node__content {
.el-tree-node:focus>.el-tree-node__content {
background-color: #00648a78 !important; background-color: #00648a78 !important;
// border-radius: 5px; // border-radius: 5px;
} }
.el-tree-node__content:hover, .el-tree-node__content:hover,
.el-tree-node__content:focus { .el-tree-node__content:focus {
background-color: #00638a50 !important; background-color: #00638a00 !important;
// border-radius: 5px; // border-radius: 5px;
.el-icon-circle-plus { .el-icon-circle-plus {
display: block; display: block;
} }
.el-icon-edit-outline { .el-icon-edit-outline {
display: block; display: block;
} }
.el-icon-error { .el-icon-error {
display: block; display: block;
} }
.el-icon-upload { .el-icon-upload {
display: block; display: block;
} }
.list-span{
.list-span {
display: block; display: block;
} }
} }
.el-tree--highlight-current
.el-tree-node.is-current .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
> .el-tree-node__content {
background-color: #00648a96 !important; background-color: #00648a96 !important;
// border-radius: 5px; // border-radius: 5px;
} }
.el-icon-circle-plus { .el-icon-circle-plus {
font-size: 16px; font-size: 16px;
color: #00a6f5; color: #00a6f5;
} }
.el-icon-edit-outline { .el-icon-edit-outline {
font-size: 16px; font-size: 16px;
color: #2ae209; color: #2ae209;
} }
// .list-span{ // .list-span{
// // background: #0b4c6dba; // // background: #0b4c6dba;
// } // }
...@@ -274,11 +404,13 @@ export default { ...@@ -274,11 +404,13 @@ export default {
font-size: 16px; font-size: 16px;
color: #ff5454; color: #ff5454;
} }
.el-icon-upload { .el-icon-upload {
font-size: 16px; font-size: 16px;
color: #2bce0e; color: #2bce0e;
} }
} }
.right-div { .right-div {
width: calc(85% - 10px); width: calc(85% - 10px);
height: 100%; height: 100%;
......
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