Commit 1a576f26 by zhujunjie

样式修改及逻辑处理

parent 5bfca543
@charset "UTF-8"; @charset "UTF-8";
html { html {
font-family: "微软雅黑", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; font-family: "微软雅黑", "Helvetica Neue", Helvetica, "PingFang SC",
"Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
font-size: 14px; font-size: 14px;
-ms-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
...@@ -12,10 +13,14 @@ html { ...@@ -12,10 +13,14 @@ html {
body { body {
height: 100%; height: 100%;
background: #F4F5F6; background: #f4f5f6;
} }
#map .WACPageBorder {
*, *:before, *:after { border: none !important;
}
*,
*:before,
*:after {
box-sizing: inherit; box-sizing: inherit;
margin: 0; margin: 0;
} }
...@@ -50,7 +55,10 @@ textarea { ...@@ -50,7 +55,10 @@ textarea {
outline: 0; outline: 0;
} }
button, input[type=button], input[type=reset], input[type=submit] { button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; -webkit-appearance: button;
cursor: pointer; cursor: pointer;
border: none; border: none;
...@@ -85,24 +93,28 @@ table { ...@@ -85,24 +93,28 @@ table {
-webkit-border-radius: 100px; -webkit-border-radius: 100px;
} }
::-webkit-input-placeholder { /* Chrome/Opera/Safari */ ::-webkit-input-placeholder {
/* Chrome/Opera/Safari */
font-family: inherit; font-family: inherit;
color: #C0C4CC; color: #c0c4cc;
} }
::-moz-placeholder { /* Firefox 19+ */ ::-moz-placeholder {
/* Firefox 19+ */
font-family: inherit; font-family: inherit;
color: #C0C4CC; color: #c0c4cc;
} }
:-ms-input-placeholder { /* IE 10+ */ :-ms-input-placeholder {
/* IE 10+ */
font-family: inherit; font-family: inherit;
color: #C0C4CC; color: #c0c4cc;
} }
:-moz-placeholder { /* Firefox 18- */ :-moz-placeholder {
/* Firefox 18- */
font-family: inherit; font-family: inherit;
color: #C0C4CC; color: #c0c4cc;
} }
.clearfix::after { .clearfix::after {
...@@ -115,7 +127,8 @@ table { ...@@ -115,7 +127,8 @@ table {
display: flex; display: flex;
} }
.hidden-text, .text-hidden { .hidden-text,
.text-hidden {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
...@@ -142,7 +155,8 @@ table { ...@@ -142,7 +155,8 @@ table {
float: right; float: right;
} }
.hidden-text, .text-hidden { .hidden-text,
.text-hidden {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
...@@ -151,61 +165,65 @@ table { ...@@ -151,61 +165,65 @@ table {
.hover { .hover {
cursor: pointer; cursor: pointer;
} }
.no-more{ .no-more {
text-align: center; text-align: center;
padding:20px 0; padding: 20px 0;
color: #8590A6; color: #8590a6;
font-size: 14px; font-size: 14px;
.empty-icon{ .empty-icon {
margin-right: 10px; margin-right: 10px;
font-size: 16px; font-size: 16px;
} }
} }
.load-more{ .load-more {
color: #1878F3; color: #1878f3;
border:1px solid #E5F2FF; border: 1px solid #e5f2ff;
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
padding:12px 0; padding: 12px 0;
line-height: 1; line-height: 1;
cursor: pointer; cursor: pointer;
margin: 20px; margin: 20px;
border-radius:2px; border-radius: 2px;
&:hover{ &:hover {
background: #E5F2FF; background: #e5f2ff;
border:1px solid #1878F3; border: 1px solid #1878f3;
} }
} }
.btn-primary-plain{ .btn-primary-plain {
color: #1878F3; color: #1878f3;
border:1px solid #1878F3; border: 1px solid #1878f3;
transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out;
&:hover{ &:hover {
background: #E5F2FF; background: #e5f2ff;
border:1px solid #D4E6FC; border: 1px solid #d4e6fc;
} }
} }
.btn-primary{ .btn-primary {
background: #1878F3; background: #1878f3;
color: #fff; color: #fff;
transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out;
&:hover{ &:hover {
background: #006CD1; background: #006cd1;
} }
} }
//el-select 选中颜色 //el-select 选中颜色
.el-select-dropdown__item{ .el-select-dropdown__item {
&.selected, &.hover, &:hover{ &.selected,
color: #1878F3 !important; &.hover,
&:hover {
color: #1878f3 !important;
background-color: transparent !important; background-color: transparent !important;
} }
} }
// el-table 线条颜色 // el-table 线条颜色
.el-table--border::after, .el-table--group::after, .el-table::before{ .el-table--border::after,
.el-table--group::after,
.el-table::before {
background-color: #f5f5f5 !important; background-color: #f5f5f5 !important;
} }
.el-table td{ .el-table td {
border-bottom: 1px solid #f5f5f5 !important; border-bottom: 1px solid #f5f5f5 !important;
} }
/*# sourceMappingURL=main.css.map */ /*# sourceMappingURL=main.css.map */
...@@ -215,15 +233,15 @@ table { ...@@ -215,15 +233,15 @@ table {
/* el-button 颜色 */ /* el-button 颜色 */
.el-button.el-button--primary { .el-button.el-button--primary {
border: none !important; border: none !important;
background: #1878F3 !important; background: #1878f3 !important;
border-radius: 2px !important; border-radius: 2px !important;
&:hover { &:hover {
border: none !important; border: none !important;
background: #006CD1 !important; background: #006cd1 !important;
} }
} }
// element提示 // element提示
.el-message{ .el-message {
min-width: 100px !important; min-width: 100px !important;
} }
// el-images 去圆角 // el-images 去圆角
...@@ -247,44 +265,179 @@ $em: 16px; ...@@ -247,44 +265,179 @@ $em: 16px;
line-height: 1.5 * $em; line-height: 1.5 * $em;
//user-select: none; //user-select: none;
word-break: break-word; word-break: break-word;
h1 { margin: 0.83 * $em 0; font-size: 2 * $em; line-height: 2.6 * $em; } h1 {
h2 { margin: 0.83 * $em 0; font-size: 1.5 * $em; } margin: 0.83 * $em 0;
h3 { margin: 1 * $em 0; font-size: 1.17 * $em; } font-size: 2 * $em;
h4 { margin: 1.33 * $em 0; } line-height: 2.6 * $em;
h5 { margin: 1.67 * $em 0; font-size: 0.83 * $em; } }
h6 { margin: 1.67 * $em 0; font-size: 0.83 * $em; } h2 {
h1, h2, h3, h4, h5, h6, b, strong { font-weight: bolder; } margin: 0.83 * $em 0;
div { margin: 0; padding: 0; display: block; word-break: break-word; } font-size: 1.5 * $em;
p { line-height: 24px; font-size: $em; clear: both; margin-bottom: $em; &:last-child { margin-bottom: 0 } } }
cite, em, var, address { font-style: italic; } h3 {
.spaceshow { white-space: pre; } margin: 1 * $em 0;
pre, tt, code, kbd, samp { font-family: monospace; } font-size: 1.17 * $em;
pre { margin: 1 * $em 0; overflow: auto; font-size: 24px; white-space: pre; background: #f5f5f5; max-width: 650px;} }
code { display: inline-block; font-size: $em; white-space: pre; background: #f5f5f5; } h4 {
margin: 1.33 * $em 0;
}
h5 {
margin: 1.67 * $em 0;
font-size: 0.83 * $em;
}
h6 {
margin: 1.67 * $em 0;
font-size: 0.83 * $em;
}
h1,
h2,
h3,
h4,
h5,
h6,
b,
strong {
font-weight: bolder;
}
div {
margin: 0;
padding: 0;
display: block;
word-break: break-word;
}
p {
line-height: 24px;
font-size: $em;
clear: both;
margin-bottom: $em;
&:last-child {
margin-bottom: 0;
}
}
cite,
em,
var,
address {
font-style: italic;
}
.spaceshow {
white-space: pre;
}
pre,
tt,
code,
kbd,
samp {
font-family: monospace;
}
pre {
margin: 1 * $em 0;
overflow: auto;
font-size: 24px;
white-space: pre;
background: #f5f5f5;
max-width: 650px;
}
code {
display: inline-block;
font-size: $em;
white-space: pre;
background: #f5f5f5;
}
pre code { pre code {
display: block; padding: 9px; margin: 10px 0; overflow: auto; font-size: $em; white-space: pre; background: #f5f5f5; max-width: 650px; display: block;
} padding: 9px;
.big { font-size: 1.17 * $em; } margin: 10px 0;
.small, .sub, .sup { font-size: 0.83 * $em; } overflow: auto;
.sub { vertical-align: sub; } font-size: $em;
.sup { vertical-align: super; } white-space: pre;
.s, .strike, .del { text-decoration: line-through; } background: #f5f5f5;
.strong, .text, .span, .s { display: inline; } max-width: 650px;
.video { margin: 22px 0; text-align: center; } }
.video-video { width: 100%; } .big {
.uni-image { max-width: 100%; } font-size: 1.17 * $em;
img { max-width: 100% !important; overflow: hidden !important; } }
.qq-emotion {height: 22px; margin: 0} .small,
video {max-width: 100% !important; overflow: hidden !important; } .sub,
blockquote { padding: 22px 0 22px 22px; margin: 10px 0; color: #6a737d; border-left: 6px solid #dbdbdb; } .sup {
blockquote p { margin: 0; } font-size: 0.83 * $em;
ul { display: block; padding-left: 2 * $em; margin: 1em 0; list-style: disc; } }
ol { display: block; padding-left: 2 * $em; margin: 1em 0; list-style: revert; } .sub {
ul > li { display: list-item; align-items: baseline; text-align: match-parent; } vertical-align: sub;
ol ul { list-style-type: circle; } }
li[data-task-state="checked"] .sup {
{ margin-left: -20px; list-style-type: none; text-decoration: line-through rgba(0, 0, 0, .6); } vertical-align: super;
li[data-task-state="checked"] input {position: relative} }
.s,
.strike,
.del {
text-decoration: line-through;
}
.strong,
.text,
.span,
.s {
display: inline;
}
.video {
margin: 22px 0;
text-align: center;
}
.video-video {
width: 100%;
}
.uni-image {
max-width: 100%;
}
img {
max-width: 100% !important;
overflow: hidden !important;
}
.qq-emotion {
height: 22px;
margin: 0;
}
video {
max-width: 100% !important;
overflow: hidden !important;
}
blockquote {
padding: 22px 0 22px 22px;
margin: 10px 0;
color: #6a737d;
border-left: 6px solid #dbdbdb;
}
blockquote p {
margin: 0;
}
ul {
display: block;
padding-left: 2 * $em;
margin: 1em 0;
list-style: disc;
}
ol {
display: block;
padding-left: 2 * $em;
margin: 1em 0;
list-style: revert;
}
ul > li {
display: list-item;
align-items: baseline;
text-align: match-parent;
}
ol ul {
list-style-type: circle;
}
li[data-task-state="checked"] {
margin-left: -20px;
list-style-type: none;
text-decoration: line-through rgba(0, 0, 0, 0.6);
}
li[data-task-state="checked"] input {
position: relative;
}
li[data-task-state="checked"] input::before { li[data-task-state="checked"] input::before {
font: normal normal normal 14px/1; font: normal normal normal 14px/1;
content: "✓"; content: "✓";
...@@ -292,28 +445,82 @@ $em: 16px; ...@@ -292,28 +445,82 @@ $em: 16px;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%,-53%) scale(.73); transform: translate(-50%, -53%) scale(0.73);
color: #006CD1; color: #006cd1;
} }
li[data-task-state="unchecked"] li[data-task-state="unchecked"] {
{ margin-left: -20px; list-style-type: none; } margin-left: -20px;
u { text-decoration: underline; } list-style-type: none;
.hide { display: none; } }
del { display: inline; } u {
.figure { overflow: hidden; } text-decoration: underline;
.tablebox { padding: 8px; overflow: auto; font-size: 13px; background: #f5f5f5; background-color: #f5f5f5; } }
table table, table { overflow: auto; white-space: pre; border-collapse: collapse; box-sizing: border-box;} .hide {
table thead, table tfoot, table th { font-weight: bold; background: #ececec; border-collapse: collapse; box-sizing: border-box; } display: none;
table tr { overflow: auto; border-collapse: collapse; box-sizing: border-box; } }
table th, table td { overflow: auto; border: 2px solid #dadada; border-collapse: collapse; box-sizing: border-box; } del {
tbody { border: 1px solid #dadada; border-collapse: collapse; box-sizing: border-box; } display: inline;
a { color: #1878F3; &:hover { border-bottom: 1px solid #1878F3; } } }
.audio, .uni-audio-default { display: block; } .figure {
.inline { display: inline; padding: 0; margin: 0; } overflow: hidden;
} }
.tablebox {
padding: 8px;
@media screen and ( max-width: 1005px ) { overflow: auto;
font-size: 13px;
background: #f5f5f5;
background-color: #f5f5f5;
}
table table,
table {
overflow: auto;
white-space: pre;
border-collapse: collapse;
box-sizing: border-box;
}
table thead,
table tfoot,
table th {
font-weight: bold;
background: #ececec;
border-collapse: collapse;
box-sizing: border-box;
}
table tr {
overflow: auto;
border-collapse: collapse;
box-sizing: border-box;
}
table th,
table td {
overflow: auto;
border: 2px solid #dadada;
border-collapse: collapse;
box-sizing: border-box;
}
tbody {
border: 1px solid #dadada;
border-collapse: collapse;
box-sizing: border-box;
}
a {
color: #1878f3;
&:hover {
border-bottom: 1px solid #1878f3;
}
}
.audio,
.uni-audio-default {
display: block;
}
.inline {
display: inline;
padding: 0;
margin: 0;
}
}
@media screen and (max-width: 1005px) {
$em: 14px; $em: 14px;
.content-html { .content-html {
p { p {
......
<template> <template>
<div class="knowledge" v-loading="loading"> <div v-loading="loading" class="knowledge">
<div class="knowledge-list" > <div class="knowledge-list">
<div <div
v-for="(item, index) in knowledgeList" v-for="(item, index) in knowledgeList"
:key="index" :key="index"
class="knowledge-list-detail" class="knowledge-list-detail"
> >
<div class="knowledge-list-detail-img"> <div class="knowledge-list-detail-img">
<!-- <img src="@/assets/BLT.png" alt="" /> <img src="@/assets/file.png" alt="" />
<img v-else="item.file == false" src="@/assets/essence.png" alt="" /> --> <!-- <i v-if="item.filetype == 1" class="el-icon-folder-opened" />
<i v-if="item.filetype == 1" class="el-icon-folder-opened" /> <i v-if="item.filetype != 1" class="el-icon-document" /> -->
<i v-if="item.filetype != 1" class="el-icon-document" />
</div> </div>
<div class="knowledge-list-detail-content"> <div class="knowledge-list-detail-content">
<div <div
...@@ -21,7 +20,9 @@ ...@@ -21,7 +20,9 @@
</div> </div>
<div class="knowledge-list-detail-content-text"> <div class="knowledge-list-detail-content-text">
<div>创建人:{{ item.name }}</div> <div>创建人:{{ item.name }}</div>
<div>{{ item.time }}</div> <div class="knowledge-list-detail-content-text-time">
{{ item.time }}
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -37,14 +38,14 @@ export default { ...@@ -37,14 +38,14 @@ export default {
userId: this.$store.getters["session/get"]("userId"), // 获取当前登陆用户的ID userId: this.$store.getters["session/get"]("userId"), // 获取当前登陆用户的ID
userInfo: "", userInfo: "",
qywxUserid: "", qywxUserid: "",
loading:false, loading: false,
knowledgeList: [], knowledgeList: []
}; };
}, },
computed: {}, computed: {},
mounted() { mounted() {
const params = { const params = {
include: "groups,wechat", include: "groups,wechat"
}; };
if (!this.userId) { if (!this.userId) {
this.$message.warning(`请先登录`); this.$message.warning(`请先登录`);
...@@ -52,25 +53,24 @@ export default { ...@@ -52,25 +53,24 @@ export default {
} }
this.$store this.$store
.dispatch("jv/get", [`users/${this.userId}`, { params }]) .dispatch("jv/get", [`users/${this.userId}`, { params }])
.then((res) => { .then(res => {
this.userInfo = JSON.parse(res.wechat_info); this.userInfo = JSON.parse(res.wechat_info);
this.qywxUserid = this.userInfo.userid; this.qywxUserid = this.userInfo.userid;
if (!this.qywxUserid) { if (!this.qywxUserid) {
this.$message.warning(`请先登录`); this.$message.warning(`请先登录`);
return false; return false;
} }
this.loading=true; this.loading = true;
// 调用后台获取文件列表 // 调用后台获取文件列表
axios axios
.get( .get(
config.WEI_PAN_URL + `${config.WEI_PAN_URL}/weipan/getfirstfilelist?userId=${this.qywxUserid}`
`/weipan/getfirstfilelist?userId=${this.qywxUserid}`
) )
.then((res) => { .then(res => {
if (res.data.result.file_list != null) { if (res.data.result.file_list != null) {
const filelist = res.data.result.file_list.item; const filelist = res.data.result.file_list.item;
this.knowledgeList = []; this.knowledgeList = [];
filelist.forEach((element) => { filelist.forEach(element => {
if (element.file_status == "1") { if (element.file_status == "1") {
const knowledge = { const knowledge = {
title: element.file_name, title: element.file_name,
...@@ -78,15 +78,15 @@ export default { ...@@ -78,15 +78,15 @@ export default {
time: element.ctime, time: element.ctime,
fileid: element.fileid, fileid: element.fileid,
fatherid: element.fatherid, fatherid: element.fatherid,
filetype: element.file_type, filetype: element.file_type
}; };
this.knowledgeList.push(knowledge); this.knowledgeList.push(knowledge);
} }
this.loading=false; this.loading = false;
}); });
} else { } else {
this.$message.warning(`当前微盘无文件`); this.$message.warning(`当前微盘无文件`);
this.loading=false; this.loading = false;
} }
}); });
}); });
...@@ -98,63 +98,77 @@ export default { ...@@ -98,63 +98,77 @@ export default {
query: { query: {
id: fileid, id: fileid,
fatherid: fatherid, fatherid: fatherid,
useid: this.qywxUserid, useid: this.qywxUserid
}, }
}); });
}, }
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.knowledge { .knowledge {
width: 1009px; width: 1009px;
&-list { &-list {
display: flex;
flex-direction: row;
flex-wrap: wrap;
&-detail { &-detail {
float: left; width: 298px;
width: 263px; height: 119px;
// height: 105px; // height: 105px;
display: flex; display: flex;
background: #fff; background: #fff;
margin-bottom: 15px; margin-bottom: 15px;
padding: 32px 20px; margin-left: 16px;
margin-left: 10px; padding: 33px 39px 41px 21px;
&-img { &-img {
width: 30px; width: 27px;
height: 30px; height: 33px;
i { img {
width: 30px; width: 27px;
height: 30px; height: 33px;
font-size: 30px; margin: 5px;
}
.el-icon-folder-opened {
color: #00a1ff;
}
.el-icon-document {
color: #ffbc00;
} }
// i {
// width: 30px;
// height: 30px;
// font-size: 30px;
// }
// .el-icon-folder-opened {
// color: #00a1ff;
// }
// .el-icon-document {
// color: #ffbc00;
// }
} }
&-content { &-content {
margin-left: 10px; margin-left: 14px;
float: left;
&-title { &-title {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
width: 200px; line-height: 20px;
font-size: 14px;
margin-bottom: 5px; margin-bottom: 5px;
color: #666;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
} }
} }
&-text { &-text {
width: 200px; display: flex;
// display: flex; justify-content: space-between;
// justify-content: space-between; color: #999999;
line-height: 17px;
font-size: 12px;
div { div {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
&-time {
margin-left: 20px;
}
} }
} }
} }
......
...@@ -11,17 +11,16 @@ ...@@ -11,17 +11,16 @@
:props="defaultProps" :props="defaultProps"
@node-click="handleNodeClick" @node-click="handleNodeClick"
> >
<span slot-scope="{ node, data }"> <div slot-scope="{ node, data }" style="display:flex">
<i :class="data.icon" /> <div class="detail-content-left-text-custom">
<span class="detail-content-left-text-custom">{{ {{ data.label }}
data.label </div>
}}</span> </div>
</span>
</el-tree> </el-tree>
</div> </div>
</div> </div>
<div class="detail-content-right" v-loading="showViewloading"> <div v-loading="showViewloading" class="detail-content-right">
<div v-if="isShowView"> <div v-if="isShowView">
<el-button size="small" style="ma" @click="openNewForm"> <el-button size="small" style="ma" @click="openNewForm">
全屏查看 全屏查看
...@@ -31,7 +30,12 @@ ...@@ -31,7 +30,12 @@
id="map" id="map"
:src="fileSrc" :src="fileSrc"
scrolling="no" scrolling="no"
marginwidth="0"
marginheight="0"
frameborder="0" frameborder="0"
mainview.height="0"
mainview.wdith="0"
style="border:none"
class="detail-content-right-text" class="detail-content-right-text"
/> />
</div> </div>
...@@ -39,18 +43,32 @@ ...@@ -39,18 +43,32 @@
<img :src="fileSrc" class="detail-content-right-img" /> <img :src="fileSrc" class="detail-content-right-img" />
</div> </div>
</div> </div>
<el-input <!-- <el-input
v-model="title" v-model="title"
placeholder="请输入标题" placeholder="请输入标题"
style="width: 300px;margin-top:10px;" style="width: 300px;margin-top:10px;"
/> /> -->
<Vditor <!-- <Vditor
v-if="isPost" v-if="isPost"
:inputTitle="title" :input-title="title"
:publishType="publishType" :publish-type="publishType"
:fileMd5="fileMd5" :file-md5="fileMd5"
:inputContent="inputContent" :input-content="inputContent"
/> -->
<div class="list-top-item">
<nuxt-link :to="`/thread/`" target="_blank" class="top-title">
<template>
百伦论坛知识库
</template>
<div />
</nuxt-link>
</div>
<topic-actions
:thread-id="threadId"
:actions="actions || []"
@clickAction="postCommand"
/> />
<comment :thread-id="threadId" />
</div> </div>
</div> </div>
</div> </div>
...@@ -58,12 +76,43 @@ ...@@ -58,12 +76,43 @@
<script> <script>
import axios from "@/plugins/axios.js"; import axios from "@/plugins/axios.js";
import handleError from "@/mixin/handleError"; import handleError from "@/mixin/handleError";
import config from '@/config.js'; import config from "@/config.js";
export default { export default {
data() { data() {
return { return {
threadId: "1",
actions: [
{
text: this.$t("topic.read"),
count: 0,
command: "",
canOpera: false,
icon: "book"
},
{
text: this.$t("topic.getLike"),
count: 0,
command: "isLiked",
canOpera: false,
isStatus: false,
icon: "like"
},
{
text: this.$t("topic.collection"),
command: "isFavorite",
canOpera: false,
isStatus: false,
icon: "favor"
},
{
text: this.$t("topic.share"),
command: "showLink",
canOpera: true,
icon: "link"
}
],
loading: false, loading: false,
showViewloading:false, showViewloading: false,
isShowView: false, isShowView: false,
isfile: true, isfile: true,
fileSrc: "", fileSrc: "",
...@@ -76,9 +125,9 @@ export default { ...@@ -76,9 +125,9 @@ export default {
data: [], data: [],
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label", label: "label"
}, },
list: [], list: []
}; };
}, },
computed: {}, computed: {},
...@@ -95,43 +144,66 @@ export default { ...@@ -95,43 +144,66 @@ export default {
const qywxUserid = this.$route.query.useid; const qywxUserid = this.$route.query.useid;
this.qywxUserid = this.$route.query.useid; this.qywxUserid = this.$route.query.useid;
const fatherid = this.$route.query.fatherid; const fatherid = this.$route.query.fatherid;
// 获取树状数据 // 获取树状数据
axios axios
.get( .get(
config.WEI_PAN_URL+`/weipan/getfilelisttree?userId=${qywxUserid}&fildId=${fildId}&fatherid=${fatherid}` `${config.WEI_PAN_URL}/weipan/getfilelisttree?userId=${qywxUserid}&fildId=${fildId}&fatherid=${fatherid}`
) )
.then((res) => { .then(res => {
this.data = res.data.result; // this.data = res.data.result;
this.data = this.deleteChildren(res.data.result);
console.log(this.data, "this.data");
this.loading = false; this.loading = false;
if (this.data.length == 1) { if (this.data.length == 1) {
if (this.data[0].file) { if (this.data[0].file) {
//触发点击事件 // 触发点击事件
this.handleNodeClick(this.data[0]); this.handleNodeClick(this.data[0]);
} }
} }
console.log(this.data, 222); console.log(this.data, 222);
}); });
// 监听滚动事件 // 监听滚动事件
// window.addEventListener("scroll", this.onScroll, false); // window.addEventListener("scroll", this.onScroll, false);
// window.onload = function() {
// const _iframe = document
// .getElementById("map")
// .contentWindow.document.queryselector("WACPageBorder"); // get iframe下的id
// _iframe.style.display = "none"; // 修改样式
// };
}, },
methods: { methods: {
deleteChildren(arr) {
const childs = arr;
for (let i = childs.length; i--; i > 0) {
if (childs[i].children) {
if (childs[i].children.length) {
this.deleteChildren(childs[i].children);
} else {
delete childs[i].children;
}
}
}
return arr;
},
postCommand(item) {},
openNewForm() { openNewForm() {
window.open(this.fileSrc, "_blank"); window.open(this.fileSrc, "_blank");
}, },
handleNodeClick(data) { handleNodeClick(data) {
if (data.file) { if (data.file) {
this.showViewloading=true; this.showViewloading = true;
axios axios
.get( .get(
config.WEI_PAN_URL+`/weipan/getviewfile?userId=${this.qywxUserid}&fileId=${data.id}&md5=${data.md5}&fileName=${data.label}` `${config.WEI_PAN_URL}/weipan/getviewfile?userId=${this.qywxUserid}&fileId=${data.id}&md5=${data.md5}&fileName=${data.label}`
) )
.then((res) => { .then(res => {
this.showViewloading=false; // const ele = document.querySelector(".WACPageBorder");
if (!!res.data) { // ele.style.border = "none";
let filePath = res.data.result; // console.log(ele, "ele");
if (!!filePath) { this.showViewloading = false;
if (res.data) {
const filePath = res.data.result;
if (filePath) {
this.isShowView = true; this.isShowView = true;
if (/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(filePath)) { if (/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(filePath)) {
this.isfile = false; this.isfile = false;
...@@ -143,7 +215,7 @@ export default { ...@@ -143,7 +215,7 @@ export default {
) )
) { ) {
this.isfile = true; this.isfile = true;
this.fileSrc = "http://ow365.cn/?i=23468&furl=" + filePath; this.fileSrc = `http://ow365.cn/?i=23468&furl=${filePath}`;
} }
} }
} }
...@@ -153,11 +225,11 @@ export default { ...@@ -153,11 +225,11 @@ export default {
}, },
changTree(index) { changTree(index) {
console.log(index); console.log(index);
}, }
}, },
textChange() { textChange() {
alert(332); alert(332);
}, }
// }, // },
// destroy() { // destroy() {
...@@ -167,18 +239,18 @@ export default { ...@@ -167,18 +239,18 @@ export default {
}; };
</script> </script>
<style> <style>
.detail-content-left-text .el-tree-node__expand-icon {
color: #c0c4cc;
}
/* .detail-content-left-text /* .detail-content-left-text
.el-tree-node__content .el-tree-node__content
.detail-content-left-text-custom { .detail-content-left-text-custom {
width: 200px; width: 200px;
overflow: hidden; overflow: hidden;
} */ } */
.detail-content-left-text .el-tree-node:focus > .el-tree-node__content {
color: #2e8cf0;
}
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/css/variable/color.scss";
.iframe-box { .iframe-box {
position: relative; position: relative;
width: 100%; width: 100%;
...@@ -199,17 +271,22 @@ export default { ...@@ -199,17 +271,22 @@ export default {
justify-content: space-between; justify-content: space-between;
&-left { &-left {
background: #fff; background: #fff;
position: relative;
width: 220px; width: 220px;
padding: 10px 0 0 20px; padding: 10px 0 0 25px;
overflow: hidden;
&-text { &-text {
width: 200px;
position: fixed; position: fixed;
font-size: 12px;
line-height: 17px;
background: #fff; background: #fff;
overflow: hidden; overflow: hidden;
i {
line-height: 17px;
}
&-custom { &-custom {
width: 150px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
} }
...@@ -223,14 +300,43 @@ export default { ...@@ -223,14 +300,43 @@ export default {
width: 100%; width: 100%;
height: 700px; height: 700px;
} }
&-img{ iframe {
width:auto; }
height:100%;
&-img {
width: auto;
height: 100%;
}
.list-top-item {
margin: 30px 0 0 150px;
.top-title {
color: #000;
width: 122px;
height: 25px;
overflow: hidden;
// text-overflow:ellipsis;
// white-space: nowrap;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
border-radius: 30px;
text-align: center;
background: #f7f7f7;
border: 1px solid #f7f7f7;
color: #777;
font-size: 12px;
line-height: 25px;
text-align: center;
}
&:hover {
.top-title {
color: #1878f3;
background: #fff;
border: 1px solid #1878f3;
}
}
} }
} }
} }
}
.vditor-tooltipped__ne{
display: none;
} }
</style> </style>
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