Commit 8e0cf39c authored by 黄奎's avatar 黄奎

页面修改

parent 8fd31b04
...@@ -2,17 +2,23 @@ ...@@ -2,17 +2,23 @@
<div class="flexOne"> <div class="flexOne">
<div class="myDocumentsNav"> <div class="myDocumentsNav">
<el-button-group v-if='!isChildFiles'> <el-button-group v-if='!isChildFiles'>
<el-button v-if='notFileList.length==1&&fileList.length<1' type="danger" icon="el-icon-download" @click='dowloadSingle()'>下载</el-button> <el-button v-if='notFileList.length==1&&fileList.length<1' type="danger" icon="el-icon-download"
<el-button v-if='fileList.length>0||notFileList.length>0' type="danger" icon="el-icon-download" @click='yzmVisible=true,createCode()'>压缩下载</el-button> @click='dowloadSingle()'>下载</el-button>
<el-button v-if='fileList.length>0||notFileList.length>0' type="danger" icon="el-icon-download"
@click='yzmVisible=true,createCode()'>压缩下载</el-button>
<el-button v-if='fileList.length>0||notFileList.length>0' type="danger" @click='moveFiles'>移动到</el-button> <el-button v-if='fileList.length>0||notFileList.length>0' type="danger" @click='moveFiles'>移动到</el-button>
</el-button-group> </el-button-group>
<el-button-group v-if='isChildFiles'> <el-button-group v-if='isChildFiles'>
<el-button v-if='notFileListInside.length==1&&fileListInside.length<1' type="danger" icon="el-icon-download" @click='dowloadSingleInside()'>下载里</el-button> <el-button v-if='notFileListInside.length==1&&fileListInside.length<1' type="danger" icon="el-icon-download"
<el-button v-if='fileListInside.length>0||notFileListInside.length>0' type="danger" icon="el-icon-download" @click='yzmVisible=true,createCode()'>压缩下载</el-button> @click='dowloadSingleInside()'>下载里</el-button>
<el-button v-if='fileListInside.length>0||notFileListInside.length>0' type="danger" @click='moveFiles'>移动到里</el-button> <el-button v-if='fileListInside.length>0||notFileListInside.length>0' type="danger" icon="el-icon-download"
@click='yzmVisible=true,createCode()'>压缩下载</el-button>
<el-button v-if='fileListInside.length>0||notFileListInside.length>0' type="danger" @click='moveFiles'>移动到里
</el-button>
</el-button-group> </el-button-group>
<div class="fr" v-if='!isChildFiles'> <div class="fr" v-if='!isChildFiles'>
<el-input class='w200' :placeholder="$t('pub.pleaseImport')" v-model="msg.ShareName" prefix-icon="el-icon-search"></el-input> <el-input class='w200' :placeholder="$t('pub.pleaseImport')" v-model="msg.ShareName"
prefix-icon="el-icon-search"></el-input>
<input type="button" class="hollowFixedBtn" @click='getList()' :value="$t('pub.searchBtn')" /> <input type="button" class="hollowFixedBtn" @click='getList()' :value="$t('pub.searchBtn')" />
</div> </div>
</div> </div>
...@@ -49,13 +55,16 @@ ...@@ -49,13 +55,16 @@
<td> <td>
<el-row v-if='curIndex==index'> <el-row v-if='curIndex==index'>
<el-button type="primary" icon="el-icon-download" circle @click='downloadOne(item)'></el-button> <el-button type="primary" icon="el-icon-download" circle @click='downloadOne(item)'></el-button>
<el-button type="primary" icon="iconfont icon-move" style='font-size: 14px;' circle @click='moveOneFile(item)'></el-button> <el-button type="primary" icon="iconfont icon-move" style='font-size: 14px;' circle
@click='moveOneFile(item)'></el-button>
</el-row> </el-row>
</td> </td>
<td>{{item.fileSize| FileSizeFormat(item.fileSize)}}</td> <td>{{item.fileSize| FileSizeFormat(item.fileSize)}}</td>
<td> <td>
<img style="vertical-align: sub; width: 14px; height: 14px; border-radius: 7px;" v-if="!item.shareUserPhoto" src="../../assets/img/litheader.png" alt=""> <img style="vertical-align: sub; width: 14px; height: 14px; border-radius: 7px;"
<img style="vertical-align: sub; width: 14px; height: 14px; border-radius: 7px;" v-else :src="item.shareUserPhoto" alt="" :onerror="defaultImg"> v-if="!item.shareUserPhoto" src="../../assets/img/litheader.png" alt="">
<img style="vertical-align: sub; width: 14px; height: 14px; border-radius: 7px;" v-else
:src="item.shareUserPhoto" alt="" :onerror="defaultImg">
{{item.shareUserName}} {{item.shareUserName}}
</td> </td>
<td>{{item.createTime}}</td> <td>{{item.createTime}}</td>
...@@ -86,7 +95,8 @@ ...@@ -86,7 +95,8 @@
<td> <td>
<el-row v-if='insideCurIndex==index'> <el-row v-if='insideCurIndex==index'>
<el-button type="primary" icon="el-icon-download" circle @click='downloadOneInside(item)'></el-button> <el-button type="primary" icon="el-icon-download" circle @click='downloadOneInside(item)'></el-button>
<el-button type="primary" icon="iconfont icon-move" style='font-size: 14px;' circle @click='moveOneFileInside(item)'></el-button> <el-button type="primary" icon="iconfont icon-move" style='font-size: 14px;' circle
@click='moveOneFileInside(item)'></el-button>
</el-row> </el-row>
</td> </td>
<td>{{item.FileSize| FileSizeFormat(item.FileSize)}}</td> <td>{{item.FileSize| FileSizeFormat(item.FileSize)}}</td>
...@@ -95,12 +105,15 @@ ...@@ -95,12 +105,15 @@
</table> </table>
<el-dialog custom-class='w400' :title="dialogTitle2" :visible.sync="outerVisible2" @close="moveCancel" center> <el-dialog custom-class='w400' :title="dialogTitle2" :visible.sync="outerVisible2" @close="moveCancel" center>
<el-tree :data="fileTreeList" :props="defaultProps" :check-strictly='true' @check-change="handleNodeChange" node-key="Id" show-checkbox accordion ref="tree"> <el-tree :data="fileTreeList" :props="defaultProps" :check-strictly='true' @check-change="handleNodeChange"
node-key="Id" show-checkbox accordion ref="tree">
</el-tree> </el-tree>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<input type="button" class="hollowFixedBtn" :value="$t('pub.cancelBtn')" @click="moveCancel" /> <input type="button" class="hollowFixedBtn" :value="$t('pub.cancelBtn')" @click="moveCancel" />
<input type="button" v-if='!isChildFiles' class="normalBtn" :value="$t('pub.sureBtn')" @click="saveMoveFiles" /> <input type="button" v-if='!isChildFiles' class="normalBtn" :value="$t('pub.sureBtn')"
<input type="button" v-if='isChildFiles' class="normalBtn" :value="$t('pub.sureBtn')" @click="saveMoveFilesInside" /> @click="saveMoveFiles" />
<input type="button" v-if='isChildFiles' class="normalBtn" :value="$t('pub.sureBtn')"
@click="saveMoveFilesInside" />
</div> </div>
</el-dialog> </el-dialog>
<el-dialog custom-class='w800' :title="dialogTitle4" :visible.sync="outerVisible4" center> <el-dialog custom-class='w800' :title="dialogTitle4" :visible.sync="outerVisible4" center>
...@@ -110,9 +123,11 @@ ...@@ -110,9 +123,11 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<input type="button" class="normalBtn" :value="$t('pub.closeSel')" @click="outerVisible4=false" /> <input type="button" class="normalBtn" :value="$t('pub.closeSel')" @click="outerVisible4=false" />
</div> </div>
</el-dialog > </el-dialog>
<div v-if='audioIsShow' style="position: fixed; bottom: 100px; right: 20px; z-index: 999; border:1px solid #ccc; padding: 10px; background: #eee;"> <div v-if='audioIsShow'
<i class="el-icon-circle-close-outline" style="float: right; cursor: pointer;" @click="audioIsShow=false,audioPath=''"></i> style="position: fixed; bottom: 100px; right: 20px; z-index: 999; border:1px solid #ccc; padding: 10px; background: #eee;">
<i class="el-icon-circle-close-outline" style="float: right; cursor: pointer;"
@click="audioIsShow=false,audioPath=''"></i>
<p style="font-size: 12px; margin: 0 0 10px 0;">{{audioName}}</p> <p style="font-size: 12px; margin: 0 0 10px 0;">{{audioName}}</p>
<audio :src="audioPath" controls="controls"> <audio :src="audioPath" controls="controls">
Your browser does not support the audio tag. Your browser does not support the audio tag.
...@@ -132,38 +147,40 @@ ...@@ -132,38 +147,40 @@
<p> <p>
<span>验证码 : </span> <span>验证码 : </span>
<el-input class='w150' type="text" placeholder="请输入验证码" v-model="picLyanzhengma"></el-input> <el-input class='w150' type="text" placeholder="请输入验证码" v-model="picLyanzhengma"></el-input>
<input type="button" @click="createCode" class="DocumentLoadVerification" v-model="checkCode"/> <input type="button" @click="createCode" class="DocumentLoadVerification" v-model="checkCode" />
</p> </p>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<input type="button" class="hollowFixedBtn" :value="$t('pub.cancelBtn')" @click="yzmVisible=false" /> <input type="button" class="hollowFixedBtn" :value="$t('pub.cancelBtn')" @click="yzmVisible=false" />
<input v-if='!isChildFiles' type="button" class="normalBtn" :value="$t('pub.sureBtn')" @click="downloadTotal()" /> <input v-if='!isChildFiles' type="button" class="normalBtn" :value="$t('pub.sureBtn')"
<input v-if='isChildFiles' type="button" class="normalBtn" :value="$t('pub.sureBtn')" @click="downloadTotalInside()" /> @click="downloadTotal()" />
<input v-if='isChildFiles' type="button" class="normalBtn" :value="$t('pub.sureBtn')"
@click="downloadTotalInside()" />
</div> </div>
</el-dialog > </el-dialog>
</div> </div>
</template> </template>
<script> <script>
// let browserMD5File = require('browser-md5-file'); // let browserMD5File = require('browser-md5-file');
export default { export default {
data() { data() {
return { return {
code:'', code: '',
picLyanzhengma:'', picLyanzhengma: '',
checkCode:'', checkCode: '',
yzmVisible: false, yzmVisible: false,
initialIndex:0, initialIndex: 0,
picObj:[], picObj: [],
picIsShow:false, picIsShow: false,
audioIsShow:false, audioIsShow: false,
outerVisible4: false, outerVisible4: false,
dialogTitle4: '', dialogTitle4: '',
moviePath:'', moviePath: '',
audioPath:'', audioPath: '',
picPath:'', picPath: '',
audioName:'', audioName: '',
headers: { headers: {
'Content-Type': 'application/octet-stream' 'Content-Type': 'application/octet-stream'
}, },
...@@ -204,13 +221,13 @@ ...@@ -204,13 +221,13 @@
saveMsg: [], saveMsg: [],
msg: { msg: {
pageIndex: '1', pageIndex: '1',
pageSize:'9999', pageSize: '9999',
ShareName:'' ShareName: ''
}, },
nextMsg:{ nextMsg: {
ParentId: '0', ParentId: '0',
FolderName: '', FolderName: '',
EmployeeId:'0' EmployeeId: '0'
}, },
addFileMsg: { addFileMsg: {
FolderName: '', FolderName: '',
...@@ -223,8 +240,8 @@ ...@@ -223,8 +240,8 @@
}, },
MoveMsg: { MoveMsg: {
foldId: '0', foldId: '0',
folderIds:[], folderIds: [],
fileIds:[] fileIds: []
}, },
shareMsg: { shareMsg: {
shareType: '1', shareType: '1',
...@@ -232,22 +249,22 @@ ...@@ -232,22 +249,22 @@
targetIds: '', targetIds: '',
folderIds: [] folderIds: []
}, },
downloadMsg:{ downloadMsg: {
FolderIdStr:[], FolderIdStr: [],
FileIdStr:[] FileIdStr: []
}, },
downloadMsgInside:{ downloadMsgInside: {
FolderIdStr:[], FolderIdStr: [],
FileIdStr:[] FileIdStr: []
}, },
defaultImg: 'this.src="' + require('../../assets/img/litheader.png') + '"', defaultImg: 'this.src="' + require('../../assets/img/litheader.png') + '"',
//返回数据 //返回数据
NavList:[], NavList: [],
nextList:[], nextList: [],
isChildFiles:false, isChildFiles: false,
curIndex: -1, curIndex: -1,
insideCurIndex:-1, insideCurIndex: -1,
list:[], list: [],
fileTreeList: [], fileTreeList: [],
NavigationList: [], NavigationList: [],
WjId: [], WjId: [],
...@@ -255,15 +272,15 @@ ...@@ -255,15 +272,15 @@
WjIdInside: [], WjIdInside: [],
WjjIdInside: [], WjjIdInside: [],
arr: [], arr: [],
departmentList:[], departmentList: [],
ckdDepartmentList:[], ckdDepartmentList: [],
ckdDepartmentListId:[], ckdDepartmentListId: [],
roleList:[], roleList: [],
ckdRoleList:[], ckdRoleList: [],
ckdRoleListId:[], ckdRoleListId: [],
menberList:[], menberList: [],
ckdMenberList:[], ckdMenberList: [],
ckdMenberListId:[], ckdMenberListId: [],
allLength: 0, allLength: 0,
allLengthInside: 0, allLengthInside: 0,
rules: { //表单验证 rules: { //表单验证
...@@ -280,24 +297,24 @@ ...@@ -280,24 +297,24 @@
trigger: 'blur' trigger: 'blur'
}] }]
}, },
srearchKey:"" srearchKey: ""
} }
}, },
filters: { filters: {
FileSizeFormat(value) { FileSizeFormat(value) {
if(value == null||value == 0) { if (value == null || value == 0) {
return '-' return '-'
} }
if(value != null) { if (value != null) {
if(value / 1024 < 1) { //kb if (value / 1024 < 1) { //kb
return value + 'KB' return value + 'KB'
} }
if(value / 1024 > 1 && value / (1024 * 1024) < 1) { //mb if (value / 1024 > 1 && value / (1024 * 1024) < 1) { //mb
return(value / 1024).toFixed(2) + 'M' return (value / 1024).toFixed(2) + 'M'
} }
if(value / (1024 * 1024) > 1) { //G if (value / (1024 * 1024) > 1) { //G
return(value / (1024 * 1024)).toFixed(2) + 'G' return (value / (1024 * 1024)).toFixed(2) + 'G'
} }
} }
...@@ -305,7 +322,7 @@ ...@@ -305,7 +322,7 @@
}, },
methods: { methods: {
// 图片验证码 // 图片验证码
createCode(){ createCode() {
//先清空验证码的输入 //先清空验证码的输入
this.code = ""; this.code = "";
this.checkCode = ""; this.checkCode = "";
...@@ -313,64 +330,81 @@ ...@@ -313,64 +330,81 @@
//验证码的长度 //验证码的长度
var codeLength = 4; var codeLength = 4;
//随机数 //随机数
var random = new Array(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); var random = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
for(var i = 0; i < codeLength; i++) { 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
for (var i = 0; i < codeLength; i++) {
//取得随机数的索引(0~35) //取得随机数的索引(0~35)
var index = Math.floor(Math.random()*36); var index = Math.floor(Math.random() * 36);
//根据索引取得随机数加到code上 //根据索引取得随机数加到code上
this.code += random[index]; this.code += random[index];
} }
//把code值赋给验证码 //把code值赋给验证码
this.checkCode = this.code; this.checkCode = this.code;
}, },
analyzeItem(obj){ analyzeItem(obj) {
let typeArr=[ let typeArr = [{
{stringArr:'GIF|JPG|JPEG|PNG|BMP',type:1}, stringArr: 'GIF|JPG|JPEG|PNG|BMP',
{stringArr:'MP3|OGG|AU|AIFF|VQF',type:2}, type: 1
{stringArr:'AVI|WMV|MPEG|MP4|MOV|MKV|FLV|F4V|M4V|RMVB|RM|3GP|DAT|TS|MTS|VOB',type:3}, },
{stringArr:'DOCX|DOC|XLSX|XLS|PPT|PPTX',type:4}, {
{stringArr:'PDF',type:5}, stringArr: 'MP3|OGG|AU|AIFF|VQF',
type: 2
},
{
stringArr: 'AVI|WMV|MPEG|MP4|MOV|MKV|FLV|F4V|M4V|RMVB|RM|3GP|DAT|TS|MTS|VOB',
type: 3
},
{
stringArr: 'DOCX|DOC|XLSX|XLS|PPT|PPTX',
type: 4
},
{
stringArr: 'PDF',
type: 5
},
] ]
let fileTypeNumber; // 判断文件预览类型; 1 图片,2音频,3视频,4,office,, 5 PDF , 6 txt default其他 let fileTypeNumber; // 判断文件预览类型; 1 图片,2音频,3视频,4,office,, 5 PDF , 6 txt default其他
let fileType=obj.fileUrl.substring(obj.fileUrl.lastIndexOf('.')+1,obj.fileUrl.length).toUpperCase() let fileType = obj.fileUrl.substring(obj.fileUrl.lastIndexOf('.') + 1, obj.fileUrl.length).toUpperCase()
typeArr.forEach(x=>{ typeArr.forEach(x => {
if(x.stringArr.indexOf(fileType)!='-1') if (x.stringArr.indexOf(fileType) != '-1') {
{ fileTypeNumber = x.type
fileTypeNumber=x.type
} }
}) })
switch (fileTypeNumber){ switch (fileTypeNumber) {
case 1: case 1:
this.list.forEach(item=>{ this.list.forEach(item => {
if(item.shareFileType==2){ if (item.shareFileType == 2) {
let fileType=item.fileName.substring(item.fileName.lastIndexOf('.')+1,item.fileName.length).toUpperCase() if (item.fileName && item.fileName != "") {
if('GIF|JPG|JPEG|PNG|BMP'.indexOf(fileType)!=-1){ let sfileType = item.fileName.substring(item.fileName.lastIndexOf('.') + 1, item.fileName.length)
.toUpperCase()
if ('GIF|JPG|JPEG|PNG|BMP'.indexOf(sfileType) != -1) {
this.picObj.push(item.fileUrl) this.picObj.push(item.fileUrl)
} }
} }
}
}) })
this.picObj.forEach((x,i)=>{ this.picObj.forEach((x, i) => {
if(x==obj.fileUrl){ if (x == obj.fileUrl) {
this.initialIndex=i this.initialIndex = i
return false return false
} }
}) })
this.picIsShow=true this.picIsShow = true
//this.picPath=obj.FilePath //this.picPath=obj.FilePath
break; break;
case 2: case 2:
this.audioIsShow=true this.audioIsShow = true
this.audioName=obj.fileName this.audioName = obj.fileName
this.audioPath=obj.fileUrl this.audioPath = obj.fileUrl
break; break;
case 3: case 3:
this.outerVisible4=true this.outerVisible4 = true
this.dialogTitle4=obj.fileName this.dialogTitle4 = obj.fileName
this.moviePath=obj.fileUrl this.moviePath = obj.fileUrl
break; break;
case 4: case 4:
window.open("https://view.officeapps.live.com/op/view.aspx?src="+obj.fileUrl) window.open("https://view.officeapps.live.com/op/view.aspx?src=" + obj.fileUrl)
break; break;
case 5: case 5:
this.previewPDF(obj.fileUrl) this.previewPDF(obj.fileUrl)
...@@ -380,56 +414,70 @@ ...@@ -380,56 +414,70 @@
} }
}, },
analyzeItemInside(obj){ analyzeItemInside(obj) {
let typeArr=[ let typeArr = [{
{stringArr:'GIF|JPG|JPEG|PNG|BMP',type:1}, stringArr: 'GIF|JPG|JPEG|PNG|BMP',
{stringArr:'MP3|OGG|AU|AIFF|VQF',type:2}, type: 1
{stringArr:'AVI|WMV|MPEG|MP4|MOV|MKV|FLV|F4V|M4V|RMVB|RM|3GP|DAT|TS|MTS|VOB',type:3}, },
{stringArr:'DOCX|DOC|XLSX|XLS|PPT|PPTX',type:4}, {
{stringArr:'PDF',type:5}, stringArr: 'MP3|OGG|AU|AIFF|VQF',
type: 2
},
{
stringArr: 'AVI|WMV|MPEG|MP4|MOV|MKV|FLV|F4V|M4V|RMVB|RM|3GP|DAT|TS|MTS|VOB',
type: 3
},
{
stringArr: 'DOCX|DOC|XLSX|XLS|PPT|PPTX',
type: 4
},
{
stringArr: 'PDF',
type: 5
},
] ]
let fileTypeNumber; // 判断文件预览类型; 1 图片,2音频,3视频,4,office,, 5 PDF , 6 txt default其他 let fileTypeNumber; // 判断文件预览类型; 1 图片,2音频,3视频,4,office,, 5 PDF , 6 txt default其他
let fileType=obj.FilePath.substring(obj.FilePath.lastIndexOf('.')+1,obj.FilePath.length).toUpperCase() let fileType = obj.FilePath.substring(obj.FilePath.lastIndexOf('.') + 1, obj.FilePath.length).toUpperCase()
typeArr.forEach(x=>{ typeArr.forEach(x => {
if(x.stringArr.indexOf(fileType)!='-1') if (x.stringArr.indexOf(fileType) != '-1') {
{ fileTypeNumber = x.type
fileTypeNumber=x.type
} }
}) })
switch (fileTypeNumber){ switch (fileTypeNumber) {
case 1: case 1:
this.nextList.forEach(item=>{ this.nextList.forEach(item => {
if(item.DataType==2){ if (item.DataType == 2) {
let fileType=item.FolderName.substring(item.FolderName.lastIndexOf('.')+1,item.FolderName.length).toUpperCase() let fileType = item.FolderName.substring(item.FolderName.lastIndexOf('.') + 1, item.FolderName
if('GIF|JPG|JPEG|PNG|BMP'.indexOf(fileType)!=-1){ .length).toUpperCase()
if ('GIF|JPG|JPEG|PNG|BMP'.indexOf(fileType) != -1) {
this.picObj.push(item.FilePath) this.picObj.push(item.FilePath)
} }
} }
}) })
this.picObj.forEach((x,i)=>{ this.picObj.forEach((x, i) => {
if(x==obj.FilePath){ if (x == obj.FilePath) {
this.initialIndex=i this.initialIndex = i
return false return false
} }
}) })
this.picIsShow=true this.picIsShow = true
//this.picPath=obj.FilePath //this.picPath=obj.FilePath
break; break;
case 2: case 2:
this.audioIsShow=true this.audioIsShow = true
this.audioName=obj.FolderName this.audioName = obj.FolderName
this.audioPath=obj.FilePath this.audioPath = obj.FilePath
break; break;
case 3: case 3:
this.outerVisible4=true this.outerVisible4 = true
this.dialogTitle4=obj.FolderName this.dialogTitle4 = obj.FolderName
this.moviePath=obj.FilePath this.moviePath = obj.FilePath
break; break;
case 4: case 4:
window.open("https://view.officeapps.live.com/op/view.aspx?src="+obj.FilePath) window.open("https://view.officeapps.live.com/op/view.aspx?src=" + obj.FilePath)
break; break;
case 5: case 5:
this.previewPDF(obj.FilePath) this.previewPDF(obj.FilePath)
...@@ -440,13 +488,13 @@ ...@@ -440,13 +488,13 @@
} }
}, },
resGetList(){ resGetList() {
this.msg.ShareName='' this.msg.ShareName = ''
this.isChildFiles=false; this.isChildFiles = false;
this.isCkedAllInside=false this.isCkedAllInside = false
this.NavList=[] this.NavList = []
this.fileListInside=[], //文件夹 this.fileListInside = [], //文件夹
this.notFileListInside=[], //文件 this.notFileListInside = [], //文件
this.getList() this.getList()
}, },
handleExceed(file, fileList) { handleExceed(file, fileList) {
...@@ -470,7 +518,7 @@ ...@@ -470,7 +518,7 @@
FolderId: this.msg.ParentId FolderId: this.msg.ParentId
}) })
that.apipost('user_cloud_SaveFile', this.saveMsg, res => { that.apipost('user_cloud_SaveFile', this.saveMsg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();
this.getList() this.getList()
...@@ -483,11 +531,11 @@ ...@@ -483,11 +531,11 @@
}, },
dowloadSingle() { dowloadSingle() {
this.list.forEach(item => { this.list.forEach(item => {
if(item.shareFileType == 2) { if (item.shareFileType == 2) {
for(let i = 0; i < this.notFileList.length; i++) { for (let i = 0; i < this.notFileList.length; i++) {
if(this.notFileList[i] == item.shareId) { if (this.notFileList[i] == item.shareId) {
let reg = /^http(s)?:\/\/(.*?)\// let reg = /^http(s)?:\/\/(.*?)\//
this.downloadFileRename(item.fileUrl.replace(reg,''),item.fileName); this.downloadFileRename(item.fileUrl.replace(reg, ''), item.fileName);
} }
} }
} }
...@@ -495,105 +543,107 @@ ...@@ -495,105 +543,107 @@
}, },
dowloadSingleInside() { dowloadSingleInside() {
this.nextList.forEach(item => { this.nextList.forEach(item => {
if(item.DataType == 2) { if (item.DataType == 2) {
for(let i = 0; i < this.notFileListInside.length; i++) { for (let i = 0; i < this.notFileListInside.length; i++) {
if(this.notFileListInside[i] == item.Id) { if (this.notFileListInside[i] == item.Id) {
let reg = /^http(s)?:\/\/(.*?)\// let reg = /^http(s)?:\/\/(.*?)\//
this.downloadFileRename(item.FilePath.replace(reg,''),item.FolderName); this.downloadFileRename(item.FilePath.replace(reg, ''), item.FolderName);
} }
} }
} }
}) })
}, },
downloadOne(obj){ downloadOne(obj) {
if(obj.shareFileType==1){ if (obj.shareFileType == 1) {
this.yzmVisible=true this.yzmVisible = true
this.createCode() this.createCode()
this.fileList=[] this.fileList = []
this.notFileList=[] this.notFileList = []
this.fileList.push(obj.shareId) this.fileList.push(obj.shareId)
} }
if(obj.shareFileType==2){ if (obj.shareFileType == 2) {
let reg = /^http(s)?:\/\/(.*?)\// let reg = /^http(s)?:\/\/(.*?)\//
this.downloadFileRename(obj.fileUrl.replace(reg,''),obj.fileName); this.downloadFileRename(obj.fileUrl.replace(reg, ''), obj.fileName);
} }
}, },
downloadTotal() { downloadTotal() {
if(this.picLyanzhengma.toLocaleUpperCase()==this.checkCode){ if (this.picLyanzhengma.toLocaleUpperCase() == this.checkCode) {
this.yzmVisible=false this.yzmVisible = false
this.$message.info('文件压缩中,请等待..') this.$message.info('文件压缩中,请等待..')
this.list.forEach(x=>{ this.list.forEach(x => {
if(this.fileList.length>0){ if (this.fileList.length > 0) {
for (let i=0;i<this.fileList.length;i++) { for (let i = 0; i < this.fileList.length; i++) {
if(x.shareFileType==1&&x.shareId==this.fileList[i]){ if (x.shareFileType == 1 && x.shareId == this.fileList[i]) {
this.downloadMsg.FolderIdStr.push(x.fileId) this.downloadMsg.FolderIdStr.push(x.fileId)
} }
} }
}else{ } else {
this.downloadMsg.folderIds=[] this.downloadMsg.folderIds = []
} }
}) })
this.list.forEach(x=>{ this.list.forEach(x => {
if(this.notFileList.length>0){ if (this.notFileList.length > 0) {
for (let i=0;i<this.notFileList.length;i++) { for (let i = 0; i < this.notFileList.length; i++) {
if(x.shareFileType==2&&x.shareId==this.notFileList[i]){ if (x.shareFileType == 2 && x.shareId == this.notFileList[i]) {
this.downloadMsg.FileIdStr.push(x.fileId) this.downloadMsg.FileIdStr.push(x.fileId)
} }
} }
}else{ } else {
this.downloadMsg.fileIds=[] this.downloadMsg.fileIds = []
} }
}) })
this.apipost('user_cloud_GetPackageFile',this.downloadMsg, res => { this.apipost('user_cloud_GetPackageFile', this.downloadMsg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
const link = document.createElement('a'); const link = document.createElement('a');
let _loadUrl = this.domainManager().DomainUrl; let _loadUrl = this.domainManager().DomainUrl;
link.href = _loadUrl+res.data.data; link.href = _loadUrl + res.data.data;
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
this.apipost('user_cloud_DelPackageFile',{Path:link.href},res=>{ this.apipost('user_cloud_DelPackageFile', {
},err=>{}) Path: link.href
}else{ }, res => {}, err => {})
} else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
}, err => {}) }, err => {})
}else{ } else {
this.$message.error('验证码错误!') this.$message.error('验证码错误!')
} }
}, },
downloadOneInside(obj){ downloadOneInside(obj) {
if(obj.DataType==0){ if (obj.DataType == 0) {
this.yzmVisible=true this.yzmVisible = true
this.createCode() this.createCode()
this.fileListInside=[] this.fileListInside = []
this.notFileListInside=[] this.notFileListInside = []
this.fileListInside.push(obj.Id) this.fileListInside.push(obj.Id)
} }
if(obj.DataType==2){ if (obj.DataType == 2) {
let reg = /^http(s)?:\/\/(.*?)\// let reg = /^http(s)?:\/\/(.*?)\//
this.downloadFileRename(obj.FilePath.replace(reg,''),obj.FolderName); this.downloadFileRename(obj.FilePath.replace(reg, ''), obj.FolderName);
} }
}, },
downloadTotalInside() { downloadTotalInside() {
if(this.picLyanzhengma.toLocaleUpperCase()==this.checkCode){ if (this.picLyanzhengma.toLocaleUpperCase() == this.checkCode) {
this.yzmVisible=false this.yzmVisible = false
this.$message.info('文件压缩中,请等待..') this.$message.info('文件压缩中,请等待..')
this.downloadMsgInside.FolderIdStr=this.fileListInside this.downloadMsgInside.FolderIdStr = this.fileListInside
this.downloadMsgInside.FileIdStr=this.notFileListInside this.downloadMsgInside.FileIdStr = this.notFileListInside
this.apipost('user_cloud_GetPackageFile',this.downloadMsgInside, res => { this.apipost('user_cloud_GetPackageFile', this.downloadMsgInside, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
const link = document.createElement('a'); const link = document.createElement('a');
let _loadUrl = this.domainManager().DomainUrl; let _loadUrl = this.domainManager().DomainUrl;
link.href = _loadUrl+res.data.data; link.href = _loadUrl + res.data.data;
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
this.apipost('user_cloud_DelPackageFile',{Path:link.href},res=>{ this.apipost('user_cloud_DelPackageFile', {
},err=>{}) Path: link.href
}else{ }, res => {}, err => {})
} else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
}, err => {}) }, err => {})
}else{ } else {
this.$message.error('验证码错误!') this.$message.error('验证码错误!')
} }
}, },
...@@ -612,7 +662,7 @@ ...@@ -612,7 +662,7 @@
this.insideCurIndex = -1; this.insideCurIndex = -1;
}, },
checkedAll() { checkedAll() {
if(this.isCkedAll == true) { if (this.isCkedAll == true) {
this.fileList = [] this.fileList = []
this.notFileList = [] this.notFileList = []
} else { } else {
...@@ -625,7 +675,7 @@ ...@@ -625,7 +675,7 @@
} }
}, },
checkedAllInside() { checkedAllInside() {
if(this.isCkedAllInside == true) { if (this.isCkedAllInside == true) {
this.fileListInside = [] this.fileListInside = []
this.notFileListInside = [] this.notFileListInside = []
} else { } else {
...@@ -638,14 +688,14 @@ ...@@ -638,14 +688,14 @@
} }
}, },
ckeckedOneInside() { ckeckedOneInside() {
if(this.fileListInside.length + this.notFileListInside.length < this.allLengthInside) { if (this.fileListInside.length + this.notFileListInside.length < this.allLengthInside) {
this.isCkedAllInside = false this.isCkedAllInside = false
} else { } else {
this.isCkedAllInside = true this.isCkedAllInside = true
} }
}, },
ckeckedOne() { ckeckedOne() {
if(this.fileList.length + this.notFileList.length < this.allLength) { if (this.fileList.length + this.notFileList.length < this.allLength) {
this.isCkedAll = false this.isCkedAll = false
} else { } else {
this.isCkedAll = true this.isCkedAll = true
...@@ -657,7 +707,7 @@ ...@@ -657,7 +707,7 @@
}, },
addFiles() { addFiles() {
this.apipost('user_cloud_AddFolder', this.addFileMsg, res => { this.apipost('user_cloud_AddFolder', this.addFileMsg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.getList() this.getList()
this.outerVisible = false this.outerVisible = false
...@@ -678,7 +728,7 @@ ...@@ -678,7 +728,7 @@
FolderIdStr: this.fileList, FolderIdStr: this.fileList,
FileIdStr: this.notFileList FileIdStr: this.notFileList
}, res => { }, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.getList() this.getList()
} else { } else {
...@@ -693,12 +743,12 @@ ...@@ -693,12 +743,12 @@
let fileList = [] let fileList = []
let notFileList = [] let notFileList = []
let confirmMsg = '' let confirmMsg = ''
if(obj.DataType == 0) { //文件夹 if (obj.DataType == 0) { //文件夹
fileList.push(obj.Id) fileList.push(obj.Id)
confirmMsg = '删除文件夹后,分享和子文件将被删除,是否删除?' confirmMsg = '删除文件夹后,分享和子文件将被删除,是否删除?'
} }
if(obj.DataType == 2) { //文件 if (obj.DataType == 2) { //文件
notFileList.push(obj.Id) notFileList.push(obj.Id)
confirmMsg = '删除文件后,分享文件将被删除,是否删除?' confirmMsg = '删除文件后,分享文件将被删除,是否删除?'
} }
...@@ -711,7 +761,7 @@ ...@@ -711,7 +761,7 @@
FolderIdStr: fileList, FolderIdStr: fileList,
FileIdStr: notFileList FileIdStr: notFileList
}, res => { }, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.getList() this.getList()
} else { } else {
...@@ -727,26 +777,26 @@ ...@@ -727,26 +777,26 @@
this.dialogTitle2 = '移动文件' this.dialogTitle2 = '移动文件'
this.outerVisible2 = true this.outerVisible2 = true
}, },
moveOneFile(obj){ moveOneFile(obj) {
this.fileList = [] this.fileList = []
this.notFileList = [] this.notFileList = []
if(obj.shareFileType==1){ if (obj.shareFileType == 1) {
this.fileList.push(obj.shareId) this.fileList.push(obj.shareId)
} }
if(obj.shareFileType==2){ if (obj.shareFileType == 2) {
this.notFileList.push(obj.shareId) this.notFileList.push(obj.shareId)
} }
this.getTreeList() this.getTreeList()
this.dialogTitle2 = '移动文件' this.dialogTitle2 = '移动文件'
this.outerVisible2 = true this.outerVisible2 = true
}, },
moveOneFileInside(obj){ moveOneFileInside(obj) {
this.fileListInside = [] this.fileListInside = []
this.notFileListInside = [] this.notFileListInside = []
if(obj.DataType==0){ if (obj.DataType == 0) {
this.fileListInside.push(obj.Id) this.fileListInside.push(obj.Id)
} }
if(obj.DataType==2){ if (obj.DataType == 2) {
this.notFileListInside.push(obj.Id) this.notFileListInside.push(obj.Id)
} }
this.getTreeList() this.getTreeList()
...@@ -754,12 +804,12 @@ ...@@ -754,12 +804,12 @@
this.outerVisible2 = true this.outerVisible2 = true
}, },
handleNodeChange(data, checked) { handleNodeChange(data, checked) {
if(checked) { if (checked) {
this.arr.push(data.Id) this.arr.push(data.Id)
this.$refs.tree.setCheckedKeys([data.Id]); this.$refs.tree.setCheckedKeys([data.Id]);
this.MoveMsg.foldId = data.Id; this.MoveMsg.foldId = data.Id;
} else { } else {
if(this.arr.length == 1) { if (this.arr.length == 1) {
this.arr = [] this.arr = []
this.MoveMsg.foldId = '0' this.MoveMsg.foldId = '0'
} else { } else {
...@@ -769,30 +819,30 @@ ...@@ -769,30 +819,30 @@
} }
}, },
saveMoveFiles() { saveMoveFiles() {
this.list.forEach(x=>{ this.list.forEach(x => {
if(this.fileList.length>0){ if (this.fileList.length > 0) {
for (let i=0;i<this.fileList.length;i++) { for (let i = 0; i < this.fileList.length; i++) {
if(x.shareFileType==1&&x.shareId==this.fileList[i]){ if (x.shareFileType == 1 && x.shareId == this.fileList[i]) {
this.MoveMsg.folderIds.push(x.fileId) this.MoveMsg.folderIds.push(x.fileId)
} }
} }
}else{ } else {
this.MoveMsg.folderIds=[] this.MoveMsg.folderIds = []
} }
}) })
this.list.forEach(x=>{ this.list.forEach(x => {
if(this.notFileList.length>0){ if (this.notFileList.length > 0) {
for (let i=0;i<this.notFileList.length;i++) { for (let i = 0; i < this.notFileList.length; i++) {
if(x.shareFileType==2&&x.shareId==this.notFileList[i]){ if (x.shareFileType == 2 && x.shareId == this.notFileList[i]) {
this.MoveMsg.fileIds.push(x.fileId) this.MoveMsg.fileIds.push(x.fileId)
} }
} }
}else{ } else {
this.MoveMsg.fileIds=[] this.MoveMsg.fileIds = []
} }
}) })
this.apipost('user_cloud_share_file_move', this.MoveMsg, res => { this.apipost('user_cloud_share_file_move', this.MoveMsg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.outerVisible2 = false; this.outerVisible2 = false;
this.getList() this.getList()
...@@ -802,10 +852,10 @@ ...@@ -802,10 +852,10 @@
}, err => {}) }, err => {})
}, },
saveMoveFilesInside() { saveMoveFilesInside() {
this.MoveMsg.folderIds=this.fileListInside this.MoveMsg.folderIds = this.fileListInside
this.MoveMsg.fileIds=this.notFileListInside this.MoveMsg.fileIds = this.notFileListInside
this.apipost('user_cloud_share_file_move', this.MoveMsg, res => { this.apipost('user_cloud_share_file_move', this.MoveMsg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.outerVisible2 = false; this.outerVisible2 = false;
this.getList() this.getList()
...@@ -815,14 +865,14 @@ ...@@ -815,14 +865,14 @@
}, err => {}) }, err => {})
}, },
openShareOneDialog(obj) { openShareOneDialog(obj) {
if(obj.DataType==0){ if (obj.DataType == 0) {
this.fileList=[] this.fileList = []
this.notFileList=[] this.notFileList = []
this.fileList.push(obj.Id) this.fileList.push(obj.Id)
} }
if(obj.DataType==2){ if (obj.DataType == 2) {
this.fileList=[] this.fileList = []
this.notFileList=[] this.notFileList = []
this.notFileList.push(obj.Id) this.notFileList.push(obj.Id)
} }
this.outerVisible3 = true this.outerVisible3 = true
...@@ -838,47 +888,50 @@ ...@@ -838,47 +888,50 @@
this.getRole() this.getRole()
this.getMenber() this.getMenber()
}, },
shareDeparment(){ shareDeparment() {
this.shareMsg.shareType=1 this.shareMsg.shareType = 1
this.ckdRoleList=[] this.ckdRoleList = []
this.ckdRoleListId=[] this.ckdRoleListId = []
this.ckdMenberList=[] this.ckdMenberList = []
this.ckdMenberListId=[] this.ckdMenberListId = []
}, },
shareRole(){ shareRole() {
this.shareMsg.shareType=2 this.shareMsg.shareType = 2
this.ckdDepartmentList=[] this.ckdDepartmentList = []
this.ckdDepartmentListId=[] this.ckdDepartmentListId = []
this.ckdMenberList=[] this.ckdMenberList = []
this.ckdMenberListId=[] this.ckdMenberListId = []
}, },
shareMenber(){ shareMenber() {
this.shareMsg.shareType=3 this.shareMsg.shareType = 3
this.ckdDepartmentList=[] this.ckdDepartmentList = []
this.ckdDepartmentListId=[] this.ckdDepartmentListId = []
this.ckdRoleList=[] this.ckdRoleList = []
this.ckdRoleListId=[] this.ckdRoleListId = []
}, },
getDepartment() { //部门 getDepartment() { //部门
this.apipost('app_get_GetDepartmentListTree', {}, res => { this.apipost('app_get_GetDepartmentListTree', {}, res => {
this.departmentList = res.data.data this.departmentList = res.data.data
}, err => {}) }, err => {})
}, },
DepartmentListNodeChange(data,checked){ DepartmentListNodeChange(data, checked) {
if(checked){ if (checked) {
this.ckdDepartmentList.push({name:data.DepartmentName,id:data.DepartmentID}) this.ckdDepartmentList.push({
name: data.DepartmentName,
id: data.DepartmentID
})
this.ckdDepartmentListId.push(data.DepartmentID) this.ckdDepartmentListId.push(data.DepartmentID)
} }
if(!checked){ if (!checked) {
if(this.ckdDepartmentList.findIndex(item => item.id === data.DepartmentID)!=-1){ if (this.ckdDepartmentList.findIndex(item => item.id === data.DepartmentID) != -1) {
this.ckdDepartmentList.splice(this.ckdDepartmentList.findIndex(item => item.id === data.DepartmentID), 1) this.ckdDepartmentList.splice(this.ckdDepartmentList.findIndex(item => item.id === data.DepartmentID), 1)
} }
if(this.ckdDepartmentListId.findIndex(item => item === data.DepartmentID)!=-1){ if (this.ckdDepartmentListId.findIndex(item => item === data.DepartmentID) != -1) {
this.ckdDepartmentListId.splice(this.ckdDepartmentListId.findIndex(item => item === data.DepartmentID), 1) this.ckdDepartmentListId.splice(this.ckdDepartmentListId.findIndex(item => item === data.DepartmentID), 1)
} }
} }
}, },
deleteDepartment(id){ deleteDepartment(id) {
this.ckdDepartmentList.splice(this.ckdDepartmentList.findIndex(item => item.id === id), 1) this.ckdDepartmentList.splice(this.ckdDepartmentList.findIndex(item => item.id === id), 1)
this.ckdDepartmentListId.splice(this.ckdDepartmentListId.findIndex(item => item === id), 1) //删除相同id this.ckdDepartmentListId.splice(this.ckdDepartmentListId.findIndex(item => item === id), 1) //删除相同id
this.$refs.treeDepartmentList.setCheckedKeys(this.ckdDepartmentListId); this.$refs.treeDepartmentList.setCheckedKeys(this.ckdDepartmentListId);
...@@ -889,21 +942,24 @@ ...@@ -889,21 +942,24 @@
this.roleList = res.data.data this.roleList = res.data.data
}, err => {}) }, err => {})
}, },
roleListNodeChange(data,checked){ roleListNodeChange(data, checked) {
if(data.Type == 2 &&checked){ if (data.Type == 2 && checked) {
this.ckdRoleList.push({name:data.DepartmentName,id:data.DepartmentId}) this.ckdRoleList.push({
name: data.DepartmentName,
id: data.DepartmentId
})
this.ckdRoleListId.push(data.DepartmentId) this.ckdRoleListId.push(data.DepartmentId)
} }
if(data.Type == 2 &&!checked){ if (data.Type == 2 && !checked) {
if(this.ckdRoleList.findIndex(item => item.id === data.DepartmentId)!=-1){ if (this.ckdRoleList.findIndex(item => item.id === data.DepartmentId) != -1) {
this.ckdRoleList.splice(this.ckdRoleList.findIndex(item => item.id === data.DepartmentId), 1) this.ckdRoleList.splice(this.ckdRoleList.findIndex(item => item.id === data.DepartmentId), 1)
} }
if(this.ckdRoleListId.findIndex(item => item === data.DepartmentId)!=-1){ if (this.ckdRoleListId.findIndex(item => item === data.DepartmentId) != -1) {
this.ckdRoleListId.splice(this.ckdRoleListId.findIndex(item => item === data.DepartmentId), 1) //删除相同id this.ckdRoleListId.splice(this.ckdRoleListId.findIndex(item => item === data.DepartmentId), 1) //删除相同id
} }
} }
}, },
deleteRole(id){ deleteRole(id) {
this.ckdRoleList.splice(this.ckdRoleList.findIndex(item => item.id === id), 1) this.ckdRoleList.splice(this.ckdRoleList.findIndex(item => item.id === id), 1)
this.ckdRoleListId.splice(this.ckdRoleListId.findIndex(item => item === id), 1) this.ckdRoleListId.splice(this.ckdRoleListId.findIndex(item => item === id), 1)
//删除相同id //删除相同id
...@@ -915,44 +971,48 @@ ...@@ -915,44 +971,48 @@
this.menberList = res.data.data this.menberList = res.data.data
}, err => {}) }, err => {})
}, },
MenberListNodeChange(data,checked){ MenberListNodeChange(data, checked) {
if(data.Type == 2 &&checked){ if (data.Type == 2 && checked) {
this.ckdMenberList.push({name:data.DepartmentName,id:data.DepartmentId}) this.ckdMenberList.push({
name: data.DepartmentName,
id: data.DepartmentId
})
this.ckdMenberListId.push(data.DepartmentId) this.ckdMenberListId.push(data.DepartmentId)
} }
if(data.Type == 2 &&!checked){ if (data.Type == 2 && !checked) {
if(this.ckdMenberList.findIndex(item => item.id === data.DepartmentId)!=-1){ if (this.ckdMenberList.findIndex(item => item.id === data.DepartmentId) != -1) {
this.ckdMenberList.splice(this.ckdMenberList.findIndex(item => item.id === data.DepartmentId), 1) this.ckdMenberList.splice(this.ckdMenberList.findIndex(item => item.id === data.DepartmentId), 1)
} }
if(this.ckdMenberListId.findIndex(item => item === data.DepartmentId)!=-1){ if (this.ckdMenberListId.findIndex(item => item === data.DepartmentId) != -1) {
this.ckdMenberListId.splice(this.ckdMenberListId.findIndex(item => item === data.DepartmentId), 1) //删除相同id this.ckdMenberListId.splice(this.ckdMenberListId.findIndex(item => item === data.DepartmentId),
1) //删除相同id
} }
} }
}, },
deleteMenber(id){ deleteMenber(id) {
this.ckdMenberList.splice(this.ckdMenberList.findIndex(item => item.id === id), 1) this.ckdMenberList.splice(this.ckdMenberList.findIndex(item => item.id === id), 1)
this.ckdMenberListId.splice(this.ckdMenberListId.findIndex(item => item === id), 1) //删除相同id this.ckdMenberListId.splice(this.ckdMenberListId.findIndex(item => item === id), 1) //删除相同id
this.$refs.treeMenber.setCheckedKeys(this.ckdMenberListId); this.$refs.treeMenber.setCheckedKeys(this.ckdMenberListId);
}, },
saveShareDocument(){ saveShareDocument() {
if(this.shareMsg.shareType==1){ if (this.shareMsg.shareType == 1) {
this.shareMsg.targetIds=this.ckdDepartmentListId.join(',') this.shareMsg.targetIds = this.ckdDepartmentListId.join(',')
}else if(this.shareMsg.shareType==2){ } else if (this.shareMsg.shareType == 2) {
this.shareMsg.targetIds=this.ckdRoleListId.join(',') this.shareMsg.targetIds = this.ckdRoleListId.join(',')
}else{ } else {
this.shareMsg.targetIds=this.ckdMenberListId.join(',') this.shareMsg.targetIds = this.ckdMenberListId.join(',')
} }
this.shareMsg.fileIds=this.notFileList this.shareMsg.fileIds = this.notFileList
this.shareMsg.folderIds=this.fileList this.shareMsg.folderIds = this.fileList
this.apipost('user_cloud_file_share',this.shareMsg,res=>{ this.apipost('user_cloud_file_share', this.shareMsg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.outerVisible3=false this.outerVisible3 = false
this.$message.success(res.data.message) this.$message.success(res.data.message)
}else{ } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
},err=>{}) }, err => {})
}, },
updateFiles(obj) { updateFiles(obj) {
...@@ -965,15 +1025,14 @@ ...@@ -965,15 +1025,14 @@
this.outerVisible1 = true; this.outerVisible1 = true;
this.dialogTitle1 = '修改文件' this.dialogTitle1 = '修改文件'
let index = obj.FolderName.lastIndexOf('.') let index = obj.FolderName.lastIndexOf('.')
if(obj.FolderName &&obj.FolderName!="") if (obj.FolderName && obj.FolderName != "") {
{
this.updateFileMsg.FileName = obj.FolderName.substring(0, index) this.updateFileMsg.FileName = obj.FolderName.substring(0, index)
} }
this.updateFileMsg.FileId = obj.Id this.updateFileMsg.FileId = obj.Id
}, },
saveUpdateFile() { saveUpdateFile() {
this.apipost('user_cloud_UpdateFile', this.updateFileMsg, res => { this.apipost('user_cloud_UpdateFile', this.updateFileMsg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.outerVisible = false; this.outerVisible = false;
this.getList() this.getList()
...@@ -984,7 +1043,7 @@ ...@@ -984,7 +1043,7 @@
}, },
getList() { getList() {
this.apipost('user_cloud_get_share_tomy', this.msg, res => { this.apipost('user_cloud_get_share_tomy', this.msg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.list = res.data.data.pageData this.list = res.data.data.pageData
this.isCkedAll = false this.isCkedAll = false
this.fileList = [] this.fileList = []
...@@ -993,14 +1052,17 @@ ...@@ -993,14 +1052,17 @@
this.WjjId = [] this.WjjId = []
this.WjId = [] this.WjId = []
res.data.data.pageData.forEach(item => { res.data.data.pageData.forEach(item => {
if(item.shareFileType == 1) { if (item.shareFileType == 1) {
this.WjjId.push(item.shareId) this.WjjId.push(item.shareId)
item.icons=this.loadFileICON('') item.icons = this.loadFileICON('')
} }
if(item.shareFileType == 2) { if (item.shareFileType == 2) {
this.WjId.push(item.shareId) this.WjId.push(item.shareId)
let fileType=item.fileName.substring(item.fileName.lastIndexOf('.')+1,item.fileName.length).toLowerCase() if (item.fileName && item.fileName != "") {
item.icons=this.loadFileICON(fileType) let fileType = item.fileName.substring(item.fileName.lastIndexOf('.') + 1, item.fileName
.length).toLowerCase()
item.icons = this.loadFileICON(fileType)
}
} }
}) })
...@@ -1011,45 +1073,55 @@ ...@@ -1011,45 +1073,55 @@
this.addFileMsg.ParentId = obj.fileId this.addFileMsg.ParentId = obj.fileId
this.nextMsg.ParentId = obj.fileId this.nextMsg.ParentId = obj.fileId
this.nextMsg.EmployeeId = obj.ShareEmployeeId this.nextMsg.EmployeeId = obj.ShareEmployeeId
this.isChildFiles=true this.isChildFiles = true
this.getNextLevelList() this.getNextLevelList()
this.isCkedAll=false this.isCkedAll = false
this.fileList = [] this.fileList = []
this.notFileList = [] this.notFileList = []
this.NavList.push({name:obj.fileName,id:obj.fileId}) this.NavList.push({
name: obj.fileName,
id: obj.fileId
})
}, },
getNextLevelTree(obj) { getNextLevelTree(obj) {
this.nextMsg.ParentId = obj.Id this.nextMsg.ParentId = obj.Id
this.getNextLevelList() this.getNextLevelList()
this.NavList.push({name:obj.FolderName,id:obj.Id}) this.NavList.push({
this.isChildFiles=true name: obj.FolderName,
this.isCkedAllInside=false id: obj.Id
})
this.isChildFiles = true
this.isCkedAllInside = false
}, },
getNavTree(obj,index){ getNavTree(obj, index) {
this.nextMsg.ParentId = obj.id this.nextMsg.ParentId = obj.id
this.isCkedAllInside=false this.isCkedAllInside = false
this.getNextLevelList() this.getNextLevelList()
this.NavList=this.NavList.slice(0,index+1) this.NavList = this.NavList.slice(0, index + 1)
}, },
getNextLevelList(){ getNextLevelList() {
this.apipost('user_cloud_GetFolderList', this.nextMsg, res => { this.apipost('user_cloud_GetFolderList', this.nextMsg, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.nextList = res.data.data.data this.nextList = res.data.data.data
this.allLengthInside = res.data.data.data.length this.allLengthInside = res.data.data.data.length
this.fileListInside = [] this.fileListInside = []
this.notFileListInside = [] this.notFileListInside = []
this.WjjIdInside= [] this.WjjIdInside = []
this.WjIdInside = [] this.WjIdInside = []
res.data.data.data.forEach(item => { res.data.data.data.forEach(item => {
if(item.DataType == 0) { if (item.DataType == 0) {
this.WjjIdInside.push(item.Id) this.WjjIdInside.push(item.Id)
item.icons=this.loadFileICON('') item.icons = this.loadFileICON('')
}
if (item.DataType == 2) {
this.WjIdInside.push(item.Id);
if (item.FolderName && item.FolderName != "") {
let fileType = item.FolderName.substring(item.FolderName.lastIndexOf('.') + 1, item
.FolderName
.length).toLowerCase()
item.icons = this.loadFileICON(fileType)
} }
if(item.DataType == 2) {
this.WjIdInside.push(item.Id)
let fileType=item.FolderName.substring(item.FolderName.lastIndexOf('.')+1,item.FolderName.length).toLowerCase()
item.icons=this.loadFileICON(fileType)
} }
}) })
} }
...@@ -1057,14 +1129,14 @@ ...@@ -1057,14 +1129,14 @@
}, },
getTreeList() { getTreeList() {
this.apipost('user_cloud_GetFolderTreeList', {}, res => { this.apipost('user_cloud_GetFolderTreeList', {}, res => {
if(res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.fileTreeList = res.data.data this.fileTreeList = res.data.data
} else {} } else {}
}, err => {}) }, err => {})
}, },
submitForm(addMsg) { //提交创建、修改表单 submitForm(addMsg) { //提交创建、修改表单
this.$refs[addMsg].validate((valid) => { this.$refs[addMsg].validate((valid) => {
if(valid) { if (valid) {
this.addFiles() this.addFiles()
} else { } else {
return false; return false;
...@@ -1075,35 +1147,34 @@ ...@@ -1075,35 +1147,34 @@
done(); done();
this.addFileMsg.FolderName = '' this.addFileMsg.FolderName = ''
}, },
doSearch() doSearch() {
{
this.getList(); this.getList();
}, },
moveCancel() moveCancel() {
{
this.$refs.tree.setCheckedKeys([]); this.$refs.tree.setCheckedKeys([]);
this.outerVisible2=false; this.outerVisible2 = false;
} }
}, },
mounted() { mounted() {
let userInfo=this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.getList() this.getList()
}, },
created(){ created() {
this.createCode() this.createCode()
} }
} }
</script>
<style> </script>
<style>
.myDocumentsNav { .myDocumentsNav {
margin: 25px 0; margin: 25px 0;
} }
.myDocumentsTable td, .myDocumentsTable td,
.myDocumentsTable th { .myDocumentsTable th {
text-align: left!important; text-align: left !important;
padding-left: 15px; padding-left: 15px;
} }
...@@ -1139,7 +1210,7 @@ ...@@ -1139,7 +1210,7 @@
} }
.shareDocumentDialog .el-dialog__body { .shareDocumentDialog .el-dialog__body {
padding: 0!important; padding: 0 !important;
} }
.documentDialogNav { .documentDialogNav {
...@@ -1171,12 +1242,16 @@ ...@@ -1171,12 +1242,16 @@
border-color: transparent transparent #fff; border-color: transparent transparent #fff;
/*透明 透明 灰*/ /*透明 透明 灰*/
} }
.DocumentLoadVerification{
width: 120px; height: 30px; .DocumentLoadVerification {
width: 120px;
height: 30px;
border-radius: 4px; border-radius: 4px;
letter-spacing: 5px; letter-spacing: 5px;
border:none; background: #f56c6c; border: none;
background: #f56c6c;
color: #eee; color: #eee;
cursor: pointer; cursor: pointer;
} }
</style>
\ No newline at end of file </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