|
- <!--
- * @Description: 协作空间组件
- * @version: 1.0
- * @Author: xzx
- * @Date: 2019-11-04 17:22:44
- * @LastEditors : xzx
- * @LastEditTime : 2020-01-13 13:26:49
- -->
- <template>
- <div id="app" v-cloak>
- <!-- 应用管理面板 -->
- <div
- :class="
- isShowRightManager == true
- ? 'AnimatedRightIn flex_right_pain'
- : 'flex_right_pain'
- "
- >
- <!-- 项目与应用管理 -->
- <div class="flex_right_pain_body_box" v-if="isShowProManager == 1">
- <div class="flex_right_pain_head">
- <div class="EC_col_12">
- <h4 class="RdiaheaderTitle">工作设置</h4>
- </div>
- <div class="EC_col_12">
- <i
- class="Cicon icon font_family icon-icon_quxiaohuoguanbi fr"
- title="关闭"
- @click="closeAppManagePain"
- ></i>
- </div>
- </div>
- <div class="pxline"></div>
- <div class="flex_right_pain_body">
- <div class="yiyun_app_itemClasss" v-show="nowFolderName != '公共文件夹'">
- <span class="yiyun_yinyongname" v-if="isUseFolderChange">协同设置</span>
- <ul class="yiyun_app_info_box" v-if="isUseFolderChange">
- <li @click="FileShareSet">
- <span class="fl">文件协作设置</span>
- <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
- </li>
- </ul>
- </div>
- <div class="yiyun_app_itemClasss" v-show="nowFolderName == '公共文件夹'">
- <span class="yiyun_yinyongname">通用</span>
- <ul class="yiyun_app_info_box">
- <li @click="projectEdit">
- <span class="fl">项目概况</span>
- <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
- </li>
- <li @click="projectFoldeEdit" v-if="isProjectManager">
- <span class="fl">项目编辑</span>
- <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
- </li>
- <li @click="EditStaffAndTip" v-if="isFolderManager">
- <span class="fl">工作指派</span>
- <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 项目与应用管理 -- 管理云应用 -->
- <div class="flex_right_pain_body_box" v-if="isShowProManager == 2">
- <div class="flex_right_pain_head">
- <div class="EC_col_4">
- <i
- class="el-collapse-item__arrow el-icon-arrow-left left-list_btn"
- v-on:click="backProManager"
- ></i>
- </div>
- <div class="EC_col_16">
- <h4 class="centertext">管理云应用</h4>
- </div>
- <div class="EC_col_4">
- <i
- class="Cicon icon font_family icon-icon_quxiaohuoguanbi fr"
- title="关闭"
- @click="closeAppManagePain"
- ></i>
- </div>
- </div>
- <div class="pxline"></div>
- <div class="flex_right_pain_body">
- <div class="yiyun_app_itemClasss">
- <span class="yiyun_yinyongname">云应用</span>
- <div
- class="appItemlist"
- v-for="(app, index) in listAppComputed"
- :key="index"
- @click="toAppInfomation(app)"
- >
- <div class="fl appImg">
- <img src="static/img/appImg/appicon1.jpg" alt />
- <!-- <img v-lazy="imgSrc + app.imageUrl" alt=""> -->
- </div>
- <div class="appNameBox">
- <span class="fl">{{ app.appName }}</span>
- <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 项目与应用管理 -- 管理云应用 -- 应用名称 -->
- <div class="flex_right_pain_body_box" v-if="isShowProManager == 3">
- <div class="flex_right_pain_head">
- <div class="EC_col_4">
- <i
- class="el-collapse-item__arrow el-icon-arrow-left left-list_btn"
- v-on:click="backManagerCloudApp"
- ></i>
- </div>
- <div class="EC_col_16">
- <h4 class="centertext" :title="currentApp.appName">{{ currentApp.appName }}</h4>
- </div>
- <div class="EC_col_4">
- <i
- class="Cicon icon font_family icon-icon_quxiaohuoguanbi fr"
- title="关闭"
- @click="closeAppManagePain"
- ></i>
- </div>
- </div>
- <div class="pxline"></div>
- <div class="flex_right_pain_body">
- <div class="yiyun_app_itemClasss">
- <span class="yiyun_yinyongname">通用</span>
- <ul class="yiyun_app_info_box">
- <li>
- <span class="fl">在该工作中启用</span>
- <el-switch v-model="appState" class="fr" @change="changeFolderApp"></el-switch>
- </li>
- <li v-if="false">
- <span class="fl">文件协同通知</span>
- <el-switch v-model="appState" class="fr"></el-switch>
- </li>
- </ul>
- <span class="yiyun_yinyongname" v-if="false">其它</span>
- <ul class="yiyun_app_info_box" v-if="false">
- <li>
- <span class="fl">查看应用描述</span>
- <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 工作地图 -->
- <div class="flex_right_pain_body_box" v-if="isShowProManager == 4">
- <div class="flex_right_pain_head">
- <div class="EC_col_12">
- <h4>工作地图</h4>
- </div>
- <div class="EC_col_12">
- <i
- class="Cicon icon font_family icon-icon_quxiaohuoguanbi fr"
- title="关闭"
- @click="closeAppManagePain"
- ></i>
- </div>
- </div>
- <div class="pxline"></div>
- <div class="flex_right_pain_body">
- <div class="yiyun_app_itemClasss">
- <ul class="yiyun_app_info_box">
- <li
- v-for="(myfolder, index) in listUserFolders"
- :key="myfolder.folderID"
- @click="goFolder(index)"
- >
- <span class="fl">{{ myfolder.folderName }}</span>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 工作设置 -->
- <FileShare
- v-if="isShowProManager == 5"
- @closeSet="closeFileShareSet"
- :folderId="nowFolderId"
- :folderName="nowFolderName"
- ></FileShare>
- </div>
- <div class="listfilewarp mt-0" v-infinite-scroll="scrollLoad" v-loading="loading">
- <!-- 工作链 -->
- <WorkLine
- :isShowlink="isShowworklink"
- :listUserFolders="listUserFolders"
- :nowFolderIndex="nowFolderIndex"
- :nowFolderName="nowFolderName"
- @goFolderAndBack="goFolderAndBack"
- @previousFolder="previousFolder"
- @showAllAppManagement="showAllAppManagement"
- @showWorklinkPage="showWorklinkPage"
- @nowFolderClick="nowFolderClick"
- @hideWorklinkPage="hideWorklinkPage"
- ></WorkLine>
- <div class="layout_content2" v-show="!isShowworklink" v-loading="loading">
- <section
- :class="closepageH + ' layerout_H2'"
- @contextmenu.prevent="rightShowMenu($event, '新建文件夹', 4)"
- >
- <!-- 文件大box -->
- <section class="yiyun_section_warp">
- <div class="yinyong_warpBox hidescollbar">
- <div class="yiyun_section_top titlebar_head" id="bignav">
- <div
- class="section_item section_item_aside_fl"
- v-if="!isCommonPage && (nowFolder.folderPerm != 0 || isProjectManager) "
- >
- <!--我的文件 工作文件-->
- <span
- class="yywenjiantitle"
- :class="{yyactive:currentPageType == index}"
- v-for="(item,index) in workt"
- :key="index"
- @click="changeWorkdata(index)"
- v-if="isShowWorkt"
- >{{item.title}}</span>
- <!--文件分组面包屑-->
- <span v-if="isShowBread" class="yiyun_text-title-workspace mr-20">
- <draggable group="group" id="bread1-0" :list="myFileBreadNodeData">
- <a
- class="yywenjiantitle_text1"
- v-if="currentPageType==0"
- href="javascript:;"
- @click="breadNodeClickEvent(currentPageType,true)"
- >我的文件</a>
- <i class="el-icon-arrow-left youbian"></i>
- <a
- class="yywenjiantitle-text"
- v-if="currentPageType==1"
- href="javascript:;"
- @click="breadNodeClickEvent(currentPageType,true)"
- >
- 工作文件
- <i class="el-icon-arrow-left"></i>
- </a>
- </draggable>
- <draggable
- class="list-group"
- :list="folderGroupBreads"
- group="group"
- id="bread1">
- <a
- class="list-group-item yywenjiantitle-text"
- v-for="item in folderGroupBreads"
- v-bind:key="item.foldergroupID"
- href="javascript:;"
- @click="breadNodeClickEvent(item,false)"
- >
- {{ item.folderGroupName }}
- <i class="el-icon-arrow-left"></i>
- </a>
- </draggable>
- </span>
- </div>
- <div
- class="section_item section_item_aside_fl"
- v-if="!isCommonPage && (nowFolder.folderPerm == 0 && !isProjectManager )"
- >
- <span class="yywenjiantitle" :class="{yyactive:true}" v-if="isShowWorkt">工作文件</span>
- <!--文件分组面包屑-->
- <span v-if="isShowBread" class="yiyun_text-title-workspace mr-20">
- <draggable group="group" id="bread2-0" :list="myFileBreadNodeData">
- <a
- class="yywenjiantitle-text"
- href="javascript:;"
- @click="breadNodeClickEvent(currentPageType,true)"
- >
- 工作文件
- <i class="el-icon-arrow-left"></i>
- </a>
- </draggable>
- <draggable
- class="list-group"
- :list="folderGroupBreads"
- group="group"
- id="bread2">
- <a
- class="yywenjiantitle-text"
- v-for="item in folderGroupBreads"
- v-bind:key="item.foldergroupID"
- href="javascript:;"
- @click="breadNodeClickEvent(item,false)"
- >
- {{ item.folderGroupName }}
- <i class="el-icon-arrow-left"></i>
- </a>
- </draggable>
- </span>
- </div>
- <div class="section_item section_item_aside_fl" v-if="isCommonPage">
- <draggable group="group" id="bread3-0" :list="myComFileBreadNodeData">
- <span
- class="yywenjiantitle fl"
- :class="{yyactive:true}"
- @click="breadNodeClickEvent(currentPageType,true)"
- >公共文件</span>
- </draggable>
- <span v-if="isShowBread" class="yiyun_text-title-workspace mr-20">
- <i class="el-icon-arrow-left first-leftarrow fl"></i>
- <draggable
- class="list-group"
- :list="folderGroupBreads"
- group="group"
- id="bread3">
- <a
- class="list-group-item yywenjiantitle-text"
- v-for="item in folderGroupBreads"
- v-bind:key="item.foldergroupID"
- href="javascript:;"
- @click="breadNodeClickEvent(item,false)"
- >
- {{ item.folderGroupName }}
- <i class="el-icon-arrow-left"></i>
- </a>
- </draggable>
- </span>
- </div>
- <!-- 右侧操作栏 -->
- <div class="section_item section_item_aside_fr">
- <div class="fr ml-10">
- <!-- <el-button
- v-if="nowFolder.folderPerm == 0"
- type="primary"
- @click="newCreateFolderGroup"
- >新建文件夹</el-button>-->
- <!-- <span class="yiyun_tishibtn yiyun_text-wenben"><i class="yiyun_icon icon_topnav_listicon" title="列表显示" v-show="isShowMyFileList == true"
- @click="showMyFilelist"></i></span>
- <span class="yiyun_tishibtn yiyun_text-wenben"><i class="yiyun_icon icon_topnav_cardicon" title="显示缩略图"
- v-show="isShowMyFileList == false" @click="showMyFilecard"></i></span>-->
- </div>
- <div class="fifle_search fr">
- <!-- <div class="searchInputzhankai">
- <i class="icon font_family icon-icon_sousuo searchsize" @click="searchFile"></i>
- <el-input type="text" class="el-input_mini searchInput" placeholder="搜索文件" v-model="searchMyFile" v-show="isShowsearch" clearable></el-input>
- </div>-->
- </div>
- </div>
- </div>
- <div class="clear"></div>
- <!-- 应用列表(缩略图) -->
- <div class="yiyun_row scollbarBox nobianju py-x-22" v-show="isShowMyFileList == true">
- <div class="yiyun_wenjian_list nohover" v-if="this.currentPageType == 0 ">
- <div class="yiyunwenjian_imgbox newbtn" v-on:click="showNewFiledialog">
- <img src="/static/img/newadd.png" alt class="wenjian_bg_img" />
- <span class="newbtn_label">新建文件</span>
- </div>
- </div>
- <!-- zxm修改托拽 start -->
- <!--显示文件 -->
- <draggable
- id="draggleFiles"
- class="list-group"
- :list="myFilesList"
- group="group"
- :move="draggableMove"
- @end="draggableEnd"
- >
- <!-- @remove="draggableRemove"-->
- <div
- class="lisy-group-item"
- v-for="file in myFilesList"
- :key="file.fileID"
- @dblclick="fileClick(file)"
- @mouseover="isShowIcon"
- @mouseout="ishideIcon"
- >
- <el-tooltip
- :content="file.strToolTip"
- :disabled="file.strToolTip == ''"
- placement="right"
- effect="light"
- >
- <div class="yiyun_wenjian_list" v-if="file.isShowFile == true">
- <div>
- <div
- class="defultImage-mid"
- :class="file.extension+'-mid' + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')"
- v-if="file.extension != 'jpg' &&
- file.extension != 'png' &&
- file.extension != 'bmp' &&
- file.extension != 'gif' &&
- file.extension != 'jpeg' "
- @contextmenu.prevent.stop="rightShowMenu($event, file, 1)"
- ></div>
- <div
- :class="'defultImage-mid img_bg-mid' + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')"
- v-if="
- file.extension == 'jpg' ||
- file.extension == 'png' ||
- file.extension == 'bmp' ||
- file.extension == 'gif' ||
- file.extension == 'jpeg'"
- @contextmenu.prevent.stop="rightShowMenu($event, file, 1)"
- >
- <div class="file_Im gbox-mid">
- <img v-lazy="imgSrc + file.alias" alt class="file_Img" />
- </div>
- </div>
- <!-- 標簽 -->
- <div
- class="eidtTip"
- v-if=" file.status == 1 && file.modifyUserID != userId"
- >工作中</div>
-
- <div v-if="file.status == 0" class="yijianxietong isonselect_defual">
- <i
- class="icon font_family icon-icon_status_wenjianbiaojiwancheng yijianIcon"
- title="工作中"
- @click="setFileStatus(file, 2, '更新为已完成',1)"
- ></i>
- </div>
- <div
- v-if="file.status == 1 && file.modifyUserID == userId"
- class="yijianxietong isonselect_update"
- >
- <i
- class="icon font_family icon-icon_status_wenjianbiaojigengxin yijianIcon"
- title="已更新"
- @click="setFileStatus(file, 0, '文件已更新',1)"
- ></i>
- </div>
- <div v-if="file.status == 2" class="yijianxietong isonselect">
- <i
- class="icon font_family icon-icon_status_wenjianbiaojiwancheng yijianIcon"
- title="已完成"
- @click="setFileStatus(file, 0, '更新为工作中',1)"
- ></i>
- </div>
- <div v-if="file.status == 3" class="yijianxietong isonselect_err">
- <i
- class="icon font_family icon-icon_status_wenjianbiaojiquxiao yijianIcon"
- title="已取消协同"
- @click="setFileStatus(file, 0, '已开启文件协同',2)"
- ></i>
- </div>
- <!-- 下载状态 v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)"-->
- <div
- class="downloadIcon"
- @click="clientDownLoad(file,1)"
- v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)"
- >
- <img src="/static/img/download.svg" alt />
- </div>
- <div
- class="downloadIcon"
- v-if="isClient && file.isDownload && file.downloadStatus == 1"
- >
- <span>
- <i class="el-icon-loading largeicon"></i>
- <div class="minifont">下载中</div>
- </span>
- </div>
- <!-- 下拉列表 -->
- <div class="top_optionBar">
- <el-dropdown>
- <span class="el-dropdown-link">
- <i
- class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"
- ></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item
- @click.native="openOffice(file)"
- v-if="file.extension == 'pdf' ||
- file.extension == 'xls' ||
- file.extension == 'xlsx' ||
- file.extension == 'doc' ||
- file.extension == 'docx' ||
- file.extension == 'ppt' ||
- file.extension == 'pptx' ||
- file.extension == 'txt'"
- >
- <span>在线查看</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="fileClick(file)"
- v-if="isClient && file.downloadStatus == 2"
- >
- <span>打开</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="fileClickSelect(file)"
- v-if="isClient && file.downloadStatus == 2"
- >
- <span>打开方式</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="setFileStatus(file, 2, '更新为已完成',1)"
- divided
- v-if="file.status == 1 || file.status == 0"
- >
- <span>搞定</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="setFileStatus(file, 0, '已开启文件协同',2)"
- v-if="isUseShare && file.status == 3"
- >
- <span>开启协同</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="setFileStatus(file, 3, '文件已取消协同',1)"
- v-if="isUseShare && file.status != 3"
- >
- <span>取消协同</span>
- </el-dropdown-item>
- <el-dropdown-item @click.native="createMilestone(file)" divided>
- <span>保存历史文件</span>
- </el-dropdown-item>
- <el-dropdown-item @click.native="showFileMilestone(file)">
- <span>选择历史文件</span>
- </el-dropdown-item>
- <el-dropdown-item @click.native="copyFile(file)" divided>
- <span>建立副本</span>
- </el-dropdown-item>
- <el-dropdown-item
- v-if="isUseCommon && file.commonStatus == 0 && nowFolderName != '公共文件夹'"
- @click.native="updateToPublicFile(file,0)"
- divided
- >
- <span>提交至项目公共文件夹</span>
- </el-dropdown-item>
- <el-dropdown-item
- v-if="isUseCommon && file.commonStatus == 1"
- @click.native="updateToPublicFile(file,1)"
- divided
- >
- <span>取消至项目公共文件夹</span>
- </el-dropdown-item>
- <el-dropdown-item @click.native="copyAndMoveFolder(file, 'move')">
- <span>转移至其他工作</span>
- </el-dropdown-item>
- <el-dropdown-item @click.native="copyAndMoveFolder(file, 'copy')">
- <span>复制至其他工作</span>
- </el-dropdown-item>
- <el-dropdown-item
- divided
- @click.native="downLoadMyFile(file)"
- v-if="file.extension !='map' && file.extension !='supermap' "
- >
- <span>下载至本地</span>
- </el-dropdown-item>
- <el-dropdown-item
- v-if="file.extension == 'svfzip' "
- @click.native="shareMyFile(file)"
- >
- <span>分享</span>
- </el-dropdown-item>
- <el-dropdown-item @click.native="reNameyMyFile(file)">
- <span>重命名</span>
- </el-dropdown-item>
- <el-dropdown-item @click.native="delMyFile(file)">
- <span>移到回收站</span>
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- <strong
- class="yiyunwenjian_name"
- :title="file.archName + '.' + file.extension"
- >{{ file.archName }}</strong>
- <!--<span class="yiyunwenjian_infodesc">{{file.strCreateTime}}</span>-->
- <span
- v-if="nowFolderName == '公共文件夹' && file.createUserID == userId"
- class="yiyunwenjian_infodesc"
- >由我创建</span>
- <span
- v-if="nowFolderName == '公共文件夹' && file.createUserID != userId"
- class="yiyunwenjian_infodesc"
- >{{file.cnName}}创建</span>
- <!--span 本来就注视着呢-->
- <!-- <span
- v-if="nowFolderName != '公共文件夹' && file.createUserID == userId"
- class="yiyunwenjian_infodesc"
- >由我创建</span>-->
- <span
- v-if="nowFolderName != '公共文件夹' && file.createUserID != userId"
- class="yiyunwenjian_infodesc"
- >{{file.cnName}}创建</span>
- </div>
- <!-- 文件状态显示 -->
- <div class="filestate" v-if="false">
- <span>文件编辑中</span>
- </div>
- <span
- v-if="file.version != 1"
- class="visontext"
- @click="showFileMilestone(file)"
- >
- 版本
- {{ file.version }}
- </span>
- </div>
- </el-tooltip>
- </div>
- </draggable>
- <!--显示文件夹组 -->
- <draggable
- id="draggletFolderGroups"
- class="list-group"
- :list="myListFolderGroups"
- group="group"
- :move="draggableMove"
- @end="draggableEnd"
- >
- <div
- class="yiyun_wenjian_list lisy-group-item"
- v-for="foldergroup in myListFolderGroups"
- :key="foldergroup.folderGroupID"
- @dblclick="intoFoldergroup(foldergroup)"
- >
- <div
- class="defultImage-mid foldernew-mid"
- @contextmenu.prevent.stop="rightShowMenu($event, foldergroup, 4)"
- ></div>
- <strong
- class="yiyunwenjian_name"
- :title="foldergroup.folderGroupName"
- >{{ foldergroup.folderGroupName}}</strong>
- <strong class="visontext">{{foldergroup.childrenTotalCount}}个项目</strong>
- </div>
- </draggable>
- <!-- zxm修改托拽 end -->
- <div></div>
- </div>
- <!-- 表格 -->
- <div class="scollbarBox" v-show="isShowMyFileList == false">
- <template>
- <el-table :data="myFilesList" style="width: 100%">
- <el-table-column prop="archName" label="文件名称" align="left"></el-table-column>
- <el-table-column prop="extension" align="left" label="文件分类"></el-table-column>
- <el-table-column prop="modifyTime" align="left" label="修改日期"></el-table-column>
- <el-table-column prop="createTime" align="left" label="创建时间"></el-table-column>
- <el-table-column prop="strSize" align="left" label="文件大小"></el-table-column>
- </el-table>
- </template>
- </div>
- </div>
- <div class="clear"></div>
- <!-- 应用实例列表 -->
- <div class="yinyong_warpBox hidescollbar" v-if="myAppInstanceList.length > 0">
- <div class="yiyun_section_top" id="bignav">
- <div class="section_item fl section_item_aside_fl">
- <h3 class="yiyuntitle">应用实例</h3>
- </div>
- </div>
- <div class="clear"></div>
- <!-- 应用列表(缩略图) -->
- <div class="yiyun_row scollbarBox py-x-22" v-show="isShowMyAppInstanceList">
- <div v-for="(instance, index) in myAppInstanceList" :key="index">
- <div class="yiyun_wenjian_list">
- <div class="defultImage img_bg appbg" @click="openApp(instance)">
- <div class="file_Imgbox">
- <img
- v-if="instance.appType == 1"
- src="../../../static/img/AppHeadImg/appImg_08.png"
- />
- <img
- v-if="instance.appType == 2"
- src="../../../static/img/AppHeadImg/appImg_09.png"
- />
- <img
- v-if="instance.appType == 3"
- src="../../../static/img/AppHeadImg/appImg_10.png"
- />
- </div>
- </div>
- <strong
- class="yiyunwenjian_name"
- :title="instance.showName"
- >{{ instance.showName }}</strong>
- </div>
- </div>
- </div>
- </div>
- </section>
- </section>
-
- <div :class="neibianju" id="bottomBox">
- <div class="titleBox">
- <div class="title_warp">
- <div class="yiyun_section_top orginoverflow" id="bignav">
- <!-- 系统时间 -->
- <div class="section_item fl section_item_aside_fl xiangdui">
- <span class="yiyun_zhediebtn DevtopIcon">
- <i
- class="Cicon text_gray icon font_family icon-icon_zhankai"
- title="展开面板"
- v-show="isShowpageIcon"
- @click="openCopage"
- ></i>
- <i
- class="Cicon text_gray icon font_family icon-icon_shouqi"
- title="折叠面板"
- v-show="!isShowpageIcon"
- @click="closeCopage"
- ></i>
- </span>
- <div class="tabtltlebox">
- <h3
- v-for="(tab, index) in workTabs"
- :key="index"
- :class="{ curactive: curactive == index }"
- class="defualth3"
- v-if="nowFolderName != '公共文件夹'"
- @click="workTab(index)"
- >{{ tab.label }}</h3>
- <h3 class="defualth3" v-if="nowFolderName == '公共文件夹'">由工作提交的文件</h3>
- </div>
- </div>
- <div class="section_item fr section_item_aside_fr">
- <div class="fr ml-10">
- <span class="bj_label">协作文件均只读</span>
- <!-- <span class="yiyun_tishibtn yiyun_text-wenben"><i class="yiyun_icon icon_topnav_listicon" title="列表显示" v-show="isShowTogetherFileList == true"
- @click="showCoFilelist"></i></span>
- <span class="yiyun_tishibtn yiyun_text-wenben"><i class="yiyun_icon icon_topnav_cardicon" title="显示缩略图" v-show="isShowTogetherFileList == false"
- @click="showCoFilecard"></i></span>-->
- </div>
- <div class="fifle_search fr">
- <!-- <div class="searchInputzhankai">
- <i class="icon font_family icon-icon_sousuo searchsize" @click="coFileSearch"></i>
- <el-input type="text" class="el-input_mini searchInput" placeholder="搜索文件" v-model="searchMyCollaborationFile" v-show="isShowCosearch" clearable></el-input>
- </div>-->
- </div>
- </div>
- </div>
- <div class="clear"></div>
- </div>
- </div>
- <div class="fifleBox">
- <div class="yiyun_section_warp layerout_H3">
- <!-- 文件大box -->
- <div class="yinyong_warpBox">
- <!-- 协作文件 -->
- <div v-if="fileindex == 0">
- <div class="py-x-22 mt-12" v-show="isShowTogetherFileList == true">
- <div
- v-for="(file, index) in myCollaborationFilesList"
- :key="index"
- @dblclick="fileClickColl(file)"
- >
- <div
- class="yiyun_wenjian_list"
- v-if="file.isShowFile == true && file.status != 3"
- >
- <div
- class="defultImage-mid"
- :class="
- file.extension +'-mid'+
- (file.status == '2' ? ' opitcy1' : ' opitcy0')
- + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')
- "
- v-if="
- file.extension != 'jpg' &&
- file.extension != 'png' &&
- file.extension != 'bmp' &&
- file.extension != 'gif' &&
- file.extension != 'jpeg'
- "
- @contextmenu.prevent.stop="rightShowMenu($event, file, 2)"
- ></div>
- <div
- class="defultImage-mid img_bg-mid"
- :class="file.status == '2' ? ' opitcy1' : ' opitcy0' + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')"
- v-if="
- file.extension == 'jpg' ||
- file.extension == 'png' ||
- file.extension == 'bmp' ||
- file.extension == 'gif' ||
- file.extension == 'jpeg'
- "
- @contextmenu.prevent.stop="rightShowMenu($event, file, 2)"
- >
- <div class="file_Imgbox-mid">
- <img v-lazy="imgSrc + file.alias" alt class="file_Img" />
- </div>
- </div>
- <strong
- :class="
- 'yiyunwenjian_name ' +
- (file.status == 2 ? ' opitcy1' : ' opitcy0')
- "
- :title="file.archName + '.' + file.extension"
- >
- <i v-if="file.updateStatus == 0" class="yiyun_file_newlabel mr-10"></i>
- {{ file.archName }}
- </strong>
- <div class="eidtTip" v-if="file.status == 0 || file.status == 1">工作中</div>
- <div
- class="downloadIcon"
- v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&&isClient && !file.isDownload && file.status == 2"
- @click="clientDownLoad(file,2)"
- >
- <img src="/static/img/download.svg" alt />
- </div>
- <div
- class="downloadIcon"
- v-if="isClient && file.isDownload && file.downloadStatus == 1"
- >
- <span>
- <i class="el-icon-loading largeicon"></i>
- <div class="minifont">下载中</div>
- </span>
- </div>
- <!-- <div class="eidtTip" v-if="file.status == 1">
- 编辑中
- </div>-->
- <div class="eidtTip" v-if="file.status == 3">文件已取消协同</div>
- <span class="yiyunwenjian_infodesc">{{ file.folderName }}</span>
- <div class="top_optionBar">
- <el-dropdown>
- <span class="el-dropdown-link">
- <i
- v-if="file.status == 2"
- class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"
- ></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item
- @click.native="openOffice(file)"
- v-if="file.status == 2 &&
- (file.extension == 'pdf' ||
- file.extension == 'xls' ||
- file.extension == 'xlsx' ||
- file.extension == 'doc' ||
- file.extension == 'docx' ||
- file.extension == 'ppt' ||
- file.extension == 'pptx' ||
- file.extension == 'txt')
- "
- >
- <span>在线查看</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="fileClickColl(file)"
- v-if="file.status == 2 && isClient && file.downloadStatus == 2"
- >
- <span>打开</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="fileClickSelectColl(file)"
- v-if="file.status == 2 && isClient && file.downloadStatus == 2"
- >
- <span>打开方式</span>
- </el-dropdown-item>
- <el-dropdown-item
- divided
- @click.native="openNativeFolder(file)"
- v-if="file.status == 2 && isClient"
- >
- <span>在文件夹中浏览</span>
- </el-dropdown-item>
- <el-dropdown-item
- divided
- @click.native="downLoadMyFile(file)"
- v-if="file.status ==2 && file.extension !='map' && file.extension!='supermap'"
- >
- <span>下载至本地</span>
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- </div>
- </div>
- </div>
- <!-- 表格 -->
- <div v-show="isShowTogetherFileList == false">
- <template>
- <el-table
- :data="myCollaborationFilesList"
- style="width: 100%"
- class="fileTable"
- >
- <el-table-column prop="archName" label="文件名称" align="left"></el-table-column>
- <el-table-column prop="extension" align="left" label="文件分类"></el-table-column>
- <el-table-column prop="modifyTime" align="left" label="修改日期"></el-table-column>
- <el-table-column prop="createTime" align="left" label="创建时间"></el-table-column>
- <el-table-column prop="strSize" align="left" label="文件大小"></el-table-column>
- </el-table>
- </template>
- </div>
- </div>
- <!-- 公共文件 -->
- <div v-if="fileindex == 1">
- <div class="py-x-22 mt-12" v-show="isShowTogetherFileList == true">
- <div
- v-for="(file, index) in myPublicFilesList"
- :key="index"
- @dblclick="fileClickColl(file)"
- >
- <div class="yiyun_wenjian_list" v-if=" file.status != 3">
- <div
- class="defultImage-mid"
- :class="
- file.extension +'-mid'+
- (file.status == '2' ? ' opitcy1' : ' opitcy0')
- + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')
- "
- v-if="
- file.extension != 'jpg' &&
- file.extension != 'png' &&
- file.extension != 'bmp' &&
- file.extension != 'gif' &&
- file.extension != 'jpeg'
- "
- @contextmenu.prevent.stop="rightShowMenu($event, file, 3)"
- ></div>
- <div
- class="defultImage-mid img_bg-mid"
- :class="file.status == '2' ? ' opitcy1' : ' opitcy0' + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')"
- v-if="
- file.extension == 'jpg' ||
- file.extension == 'png' ||
- file.extension == 'bmp' ||
- file.extension == 'gif' ||
- file.extension == 'jpeg'
- "
- @contextmenu.prevent.stop="rightShowMenu($event, file, 3)"
- >
- <div class="file_Imgbox-mid">
- <img v-lazy="imgSrc + file.alias" alt class="file_Img" />
- </div>
- </div>
- <div class="eidtTip" v-if="file.status == 0 || file.status == 1">工作中</div>
- <div
- class="downloadIcon"
- v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&&isClient && !file.isDownload && file.status == 2"
- @click="clientDownLoad(file,2)"
- >
- <img src="/static/img/download.svg" alt />
- </div>
- <div
- class="downloadIcon"
- v-if="isClient && file.isDownload && file.downloadStatus == 1"
- >
- <span>
- <i class="el-icon-loading largeicon"></i>
- <div class="minifont">下载中</div>
- </span>
- </div>
- <!-- <div class="eidtTip" v-if="file.status == 1">
- 编辑中
- </div>-->
- <div class="eidtTip" v-if="file.status == 3">文件已取消协同</div>
- <strong
- :class="
- 'yiyunwenjian_name ' +
- (file.status == 2 ? ' opitcy1' : ' opitcy0')
- "
- :title="file.archName + '.' + file.extension"
- >
- <i class="yiyun_file_newlabel mr-10" v-show="false"></i>
- {{ file.archName }}
- </strong>
- <span class="yiyunwenjian_infodesc">
- {{
- file.folderName
- }}
- </span>
- <span class="yiyunwenjian_infodesc">{{file.cnName}}创建</span>
- <div class="top_optionBar">
- <el-dropdown>
- <span class="el-dropdown-link">
- <i
- v-if="file.status == 2"
- class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"
- ></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item
- @click.native="openOffice(file)"
- v-if="file.status == 2 &&
- (file.extension == 'pdf' ||
- file.extension == 'xls' ||
- file.extension == 'xlsx' ||
- file.extension == 'doc' ||
- file.extension == 'docx' ||
- file.extension == 'ppt' ||
- file.extension == 'pptx' ||
- file.extension == 'txt')
- "
- >
- <span>在线查看</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="fileClickColl(file)"
- v-if="isClient && file.status == 2 && file.downloadStatus == 2"
- >
- <span>打开</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="fileClickSelectColl(file)"
- v-if="isClient && file.status == 2 && file.downloadStatus == 2"
- >
- <span>打开方式</span>
- </el-dropdown-item>
- <el-dropdown-item
- divided
- @click.native="downLoadMyFile(file)"
- v-if="file.status == 2 && file.extension !='map' && file.extension!='supermap'"
- >
- <span>下载至本地</span>
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- </div>
- </div>
- </div>
- <!-- 表格 -->
- <div v-show="isShowTogetherFileList == false">
- <template>
- <el-table :data="myPublicFilesList" style="width: 100%" class="fileTable">
- <el-table-column prop="archName" label="文件名称" align="left"></el-table-column>
- <el-table-column prop="extension" align="left" label="文件分类"></el-table-column>
- <el-table-column prop="modifyTime" align="left" label="修改日期"></el-table-column>
- <el-table-column prop="createTime" align="left" label="创建时间"></el-table-column>
- <el-table-column prop="strSize" align="left" label="文件大小"></el-table-column>
- </el-table>
- </template>
- </div>
- </div>
- <div v-if="fileindex == 2">
- <div class="py-x-22 mt-12" v-show="isShowTogetherFileList == true">
- <div
- v-for="(file, index) in myPublicFilesList"
- :key="index"
- @dblclick="fileClickColl(file)"
- >
- <div class="yiyun_wenjian_list">
- <div
- class="defultImage-mid"
- :class="
- file.extension + '-mid'+
- (file.status == '2' ? ' opitcy1' : ' opitcy0')
- + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')
- "
- v-if="
- file.extension != 'jpg' &&
- file.extension != 'png' &&
- file.extension != 'bmp' &&
- file.extension != 'gif' &&
- file.extension != 'jpeg'
- "
- @contextmenu.prevent.stop="rightShowMenu($event, file, 3)"
- ></div>
- <div
- class="defultImage-mid img_bg-mid"
- :class="file.status == '2' ? ' opitcy1' : ' opitcy0' + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')"
- v-if="
- file.extension == 'jpg' ||
- file.extension == 'png' ||
- file.extension == 'bmp' ||
- file.extension == 'gif' ||
- file.extension == 'jpeg'
- "
- @contextmenu.prevent.stop="rightShowMenu($event, file, 3)"
- >
- <div class="file_Imgbox-mid">
- <img v-lazy="imgSrc + file.alias" alt class="file_Img" />
- </div>
- </div>
- <div class="eidtTip" v-if="file.status == 0 || file.status == 1">工作中</div>
- <div
- class="downloadIcon"
- v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&&isClient && !file.isDownload && file.status == 2"
- @click="clientDownLoad(file,2)"
- >
- <img src="/static/img/download.svg" alt />
- </div>
- <div
- class="downloadIcon"
- v-if="isClient && file.isDownload && file.downloadStatus == 1"
- >
- <span>
- <i class="el-icon-loading largeicon"></i>
- <div class="minifont">下载中</div>
- </span>
- </div>
- <!-- <div class="eidtTip" v-if="file.status == 1">
- 编辑中
- </div>-->
- <div class="eidtTip" v-if="file.status == 3">文件已取消协同</div>
- <strong
- :class="
- 'yiyunwenjian_name ' +
- (file.status == 2 ? ' opitcy1' : ' opitcy0')
- "
- >
- <i
- class="yiyun_file_newlabel mr-10"
- :title="file.archName + '.' + file.extension"
- ></i>
- {{ file.archName }}
- </strong>
- <span class="yiyunwenjian_infodesc">
- {{
- file.folderName
- }}
- </span>
- <div class="top_optionBar">
- <el-dropdown>
- <span class="el-dropdown-link">
- <i
- v-if="file.status == 2"
- class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"
- ></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item
- @click.native="openOffice(file)"
- v-if="file.status == 2 &&
- (file.extension == 'pdf' ||
- file.extension == 'xls' ||
- file.extension == 'xlsx' ||
- file.extension == 'doc' ||
- file.extension == 'docx' ||
- file.extension == 'ppt' ||
- file.extension == 'pptx' ||
- file.extension == 'txt')
- "
- >
- <span>在线查看</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="fileClickColl(file)"
- v-if="isClient && file.status == 2 && file.downloadStatus == 2"
- >
- <span>打开</span>
- </el-dropdown-item>
- <el-dropdown-item
- @click.native="fileClickSelectColl(file)"
- v-if="isClient && file.status == 2 && file.downloadStatus == 2"
- >
- <span>打开方式</span>
- </el-dropdown-item>
- <el-dropdown-item
- divided
- @click.native="downLoadMyFile(file)"
- v-if="file.status == 2 && file.extension !='map' && file.extension!='supermap'"
- >
- <span>下载至本地</span>
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- </div>
- </div>
- </div>
- <!-- 表格 -->
- <div v-show="isShowTogetherFileList == false">
- <template>
- <el-table :data="myPublicFilesList" style="width: 100%" class="fileTable">
- <el-table-column prop="archName" label="文件名称" align="left"></el-table-column>
- <el-table-column prop="extension" align="left" label="文件分类"></el-table-column>
- <el-table-column prop="modifyTime" align="left" label="修改日期"></el-table-column>
- <el-table-column prop="createTime" align="left" label="创建时间"></el-table-column>
- <el-table-column prop="strSize" align="left" label="文件大小"></el-table-column>
- </el-table>
- </template>
- </div>
- </div>
- </div>
- <div class="clear"></div>
- <!-- 应用实例列表 -->
- <div class="yinyong_warpBox hidescollbar" v-if="myCollaborationApp.length > 0">
- <div class="yiyun_section_top" id="bignav">
- <div class="section_item fl section_item_aside_fl">
- <h3 class="yiyuntitle">应用实例</h3>
- </div>
- </div>
- <div class="clear"></div>
- <!-- 应用列表(缩略图) -->
- <div class="yiyun_row scollbarBox py-x-22">
- <div v-for="(instance, index) in myCollaborationApp" :key="index">
- <div class="yiyun_wenjian_list">
- <div class="defultImage img_bg" @click="openApp(instance)">
- <div class="file_Imgbox">
- <img
- v-if="instance.appType == 1"
- src="../../../static/img/AppHeadImg/appImg_08.png"
- style="width:90px;"
- />
- <img
- v-if="instance.appType == 2"
- src="../../../static/img/AppHeadImg/appImg_09.png"
- style="width:90px;"
- />
- <img
- v-if="instance.appType == 3"
- src="../../../static/img/AppHeadImg/appImg_10.png"
- style="width:90px;"
- />
- </div>
- </div>
- <strong
- class="yiyunwenjian_name"
- :title="instance.showName"
- >{{ instance.showName }}</strong>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="showdowfix" id="bottomoShodow" v-show="showadow"></div>
- </div>
- <!-- 右键菜单 -->
- <div
- v-show="rightMenuvisible"
- :style="{ left: left + 'px', top: top + 'px' }"
- class="contextmenu"
- >
- <ul class="rightMenu" v-if="showType == 1">
- <li
- @click="openOffice(BtnRightFile)"
- v-if="
- (BtnRightFile.extension == 'pdf' ||
- BtnRightFile.extension == 'xls' ||
- BtnRightFile.extension == 'xlsx' ||
- BtnRightFile.extension == 'doc' ||
- BtnRightFile.extension == 'docx' ||
- BtnRightFile.extension == 'ppt' ||
- BtnRightFile.extension == 'pptx' ||
- BtnRightFile.extension == 'txt') && isShowMenuFile==true
- "
- >在线查看</li>
- <li
- @click="openOffice(BtnRightFile)"
- v-else-if="
- (BtnRightFile.extension == 'pdf' ||
- BtnRightFile.extension == 'xls' ||
- BtnRightFile.extension == 'xlsx' ||
- BtnRightFile.extension == 'doc' ||
- BtnRightFile.extension == 'docx' ||
- BtnRightFile.extension == 'ppt' ||
- BtnRightFile.extension == 'pptx' ||
- BtnRightFile.extension == 'txt')"
- >在线查看</li>
- <li
- @click="fileClick(BtnRightFile)"
- v-if="isClient && BtnRightFile.downloadStatus == 2 && isShowMenuFile"
- >打开</li>
- <li
- @click="fileClickSelect(BtnRightFile)"
- v-if="isClient && BtnRightFile.downloadStatus == 2 && !isShowMenuFile"
- >打开方式</li>
- <div class="line" v-if="isClient"></div>
- <li
- @click="setFileStatus(BtnRightFile, 2, '更新为已完成',1)"
- v-if="(BtnRightFile.status == 1 || BtnRightFile.status == 0) && isShowMenuFile==true"
- >搞定</li>
- <li
- @click="setFileStatus(BtnRightFile, 2, '更新为已完成',1)"
- v-else-if="(BtnRightFile.status == 1 || BtnRightFile.status == 0)"
- >搞定</li>
- <li
- @click="setFileStatus(BtnRightFile, 0, '已开启文件协同',2)"
- v-if="isUseShare && BtnRightFile.status == 3 && !isShowMenuFile"
- >开启协同</li>
- <li
- @click="setFileStatus(BtnRightFile, 0, '已开启文件协同',2)"
- v-else-if="isUseShare && BtnRightFile.status == 3"
- >开启协同</li>
- <li
- @click="setFileStatus(BtnRightFile, 3, '文件已取消协同',1)"
- v-if="isUseShare && BtnRightFile.status != 3 && isShowMenuFile==true"
- >取消协同</li>
- <li
- @click="setFileStatus(BtnRightFile, 3, '文件已取消协同',1)"
- v-else-if="isUseShare && BtnRightFile.status != 3"
- >取消协同</li>
- <div class="line"></div>
- <li @click="createMilestone(BtnRightFile)" v-if="!isShowMenuFile">保存历史文件</li>
- <li @click="showFileMilestone(BtnRightFile)" v-if="!isShowMenuFile">选择历史文件</li>
- <div class="line"></div>
- <li @click="copyFile(BtnRightFile)" v-if="isShowMenuFile==true">建立副本</li>
- <li @click="copyFile(BtnRightFile)" v-else-if="!isShowMenuFile==true">建立副本</li>
- <div class="line"></div>
- <li
- @click="updateToPublicFile(BtnRightFile,0)"
- v-if="isUseCommon && BtnRightFile.commonStatus == 0 && nowFolderName != '公共文件夹' && !isShowMenuFile"
- >提交至项目公共文件夹</li>
- <li
- @click="updateToPublicFile(BtnRightFile,1)"
- v-if="isUseCommon && BtnRightFile.commonStatus == 1 && !isShowMenuFile"
- >取消至项目公共文件夹</li>
- <li
- @click="updateToPublicFile(BtnRightFile,1)"
- v-else-if="isUseCommon && BtnRightFile.commonStatus == 1"
- >取消至项目公共文件夹</li>
- <li @click="copyAndMoveFolder(BtnRightFile, 'move')" v-if="!isShowMenuFile">转移至其他工作</li>
- <li @click="copyAndMoveFolder(BtnRightFile, 'copy')" v-if="isShowMenuFile==true">复制至其他工作</li>
- <li
- @click="copyAndMoveFolder(BtnRightFile, 'copy')"
- v-else-if="!isShowMenuFile==true"
- >复制至其他工作</li>
- <div class="line"></div>
- <li
- @click="downLoadMyFile(BtnRightFile)"
- v-if="BtnRightFile.extension !='map' && BtnRightFile.extension !='supermap' && isShowMenuFile==true"
- >下载至本地</li>
- <li
- @click="downLoadMyFile(BtnRightFile)"
- v-else-if="BtnRightFile.extension !='map' && BtnRightFile.extension !='supermap' && !isShowMenuFile==true"
- >下载至本地</li>
- <li @click="shareMyFile(BtnRightFile)" v-if="BtnRightFile.extension == 'svfzip' ">分享</li>
- <li @click="reNameyMyFile(BtnRightFile)" v-if="!isShowMenuFile">重命名</li>
- <li @click="delMyFile(BtnRightFile)" v-if="!isShowMenuFile">移到回收站</li>
- </ul>
- <!-- 协作文件 -->
- <ul class="rightMenu" v-if="showType == 2">
- <li
- @click="openOffice(BtnRightFile)"
- v-if="BtnRightFile.status == 2 &&
- (BtnRightFile.extension == 'pdf' ||
- BtnRightFile.extension == 'xls' ||
- BtnRightFile.extension == 'xlsx' ||
- BtnRightFile.extension == 'doc' ||
- BtnRightFile.extension == 'docx' ||
- BtnRightFile.extension == 'ppt' ||
- BtnRightFile.extension == 'pptx' ||
- BtnRightFile.extension == 'txt')
- "
- >在线查看</li>
- <li
- @click="fileClickColl(BtnRightFile)"
- v-if="isClient && BtnRightFile.status == 2 && BtnRightFile.downloadStatus == 2"
- >打开</li>
- <li
- @click="fileClickSelectColl(BtnRightFile)"
- v-if="isClient && BtnRightFile.status == 2 && BtnRightFile.downloadStatus == 2"
- >打开方式</li>
- <div class="line" v-if="BtnRightFile.status == 2"></div>
- <li
- @click="openNativeFolder(BtnRightFile)"
- v-if="isClient && BtnRightFile.status == 2"
- >在文件夹中浏览</li>
- <li
- @click="downLoadMyFile(BtnRightFile)"
- v-if="BtnRightFile.status == 2 && BtnRightFile.extension !='map' && BtnRightFile.extension!='supermap'"
- >下载至本地</li>
- </ul>
- <!-- 公共文件 -->
- <ul class="rightMenu" v-if="showType == 3">
- <li
- @click="openOffice(BtnRightFile)"
- v-if="BtnRightFile.status == 2 &&
- (BtnRightFile.extension == 'pdf' ||
- BtnRightFile.extension == 'xls' ||
- BtnRightFile.extension == 'xlsx' ||
- BtnRightFile.extension == 'doc' ||
- BtnRightFile.extension == 'docx' ||
- BtnRightFile.extension == 'ppt' ||
- BtnRightFile.extension == 'pptx' ||
- BtnRightFile.extension == 'txt' )
- "
- >在线查看</li>
- <li
- @click="fileClickColl(BtnRightFile)"
- v-if="isClient && BtnRightFile.status == 2 && BtnRightFile.downloadStatus == 2"
- >打开</li>
- <li
- @click="fileClickSelectColl(BtnRightFile)"
- v-if="isClient && BtnRightFile.status == 2 && BtnRightFile.downloadStatus == 2"
- >打开方式</li>
- <div class="line" v-if="BtnRightFile.status == 2"></div>
- <li
- @click="downLoadMyFile(BtnRightFile)"
- v-if="BtnRightFile.status == 2 && BtnRightFile.extension !='map' && BtnRightFile.extension!='supermap'"
- >下载至本地</li>
- </ul>
- <!--新建文件分组-->
- <ul class="rightMenu" v-if="showType == 4 && isShowMenuFoldergroup==true">
- <li @click="newCreateFolderGroup" v-if="isShowMenuItemCreateFoldergroup==true">新建文件夹</li>
- <li
- @click="newCreateFolderGroup"
- v-else-if="!isShowMenuItemCreateFoldergroup==true"
- >新建文件夹</li>
- <li
- @click="intoFoldergroup(btnRightFoldergoup)"
- v-if="!isShowMenuItemCreateFoldergroup==true"
- >打开</li>
- <!-- <li @click="copyAndMoveFoldergroup(btnRightFoldergoup,'move')">转移至其他工作</li>
- <li @click="copyAndMoveFoldergroup(btnRightFoldergoup,'copy')">复制至其它工作</li>-->
- <li
- @click="renameFoldergroup(btnRightFoldergoup)"
- v-if="!isShowMenuItemCreateFoldergroup==true"
- >重命名</li>
- <li
- @click="removeRecycle(btnRightFoldergoup)"
- v-if="!isShowMenuItemCreateFoldergroup==true"
- >移到回收站</li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 新建文件弹框 -->
- <div class="dia_8" v-show="isShowNewFiledialog == true" @click="hideNewFiledialog"></div>
- <div class="newfiledialog" v-show="isShowNewFiledialog == true">
- <div class="dragareaBox">
- <div class="dragarea_top uploadBtn" v-if="!isClient">
- <img src="static\img\upload.png" alt class="uploadBtnImg" />
- <span class="dragarea_area" @click="showNewFiledialog">
- <file-Uploader
- :multiple="true"
- label="点击上传本地文件"
- :auto="true"
- :dragfile="true"
- :accept="acceptType"
- ref="webUploadlist2"
- :btnId="btnUploadFileId"
- :projId="uploadProjId"
- :companyId="uploadCompId"
- :typeId="uploadTypeProj"
- @upload-success="uploadFileSuccess"
- :url="chunkUploadUrl"
- class="addUpfile2 dragbox"
- ></file-Uploader>
- </span>
- </div>
- <div class="dragarea_top uploadBtn" v-if="isClient" @click="clientUpload">
- <img src="static\img\upload.png" alt class="uploadBtnImg" />
- <span class="uploadText">点击上传本地文件</span>
- </div>
- <div class="creatbox_mid mt-10">
- <div class="diahead">
- <div class="fl">
- <b class="diaTitle">创建 云应用文件</b>
- </div>
- <div class="fr">
- <!-- <i class="colosbtn" @click="hideNewFiledialog"></i> -->
- </div>
- </div>
- <div class="yiyun_line2"></div>
- <div>
- <ul class="yiyong_list_dalog">
- <li v-for="(app, appIndex) in listAppComputed" :key="appIndex">
- <img
- v-if="app.appType == 1"
- src="../../../static/img/AppHeadImg/appImg_08.png"
- class="spanImg"
- :title="app.appName"
- @click="createAppInstance(app)"
- />
- <img
- v-if="app.appType == 2"
- src="../../../static/img/AppHeadImg/appImg_09.png"
- class="spanImg"
- :title="app.appName"
- @click="createAppInstance(app)"
- />
- <img
- v-if="app.appType == 3"
- src="../../../static/img/AppHeadImg/appImg_10.png"
- class="spanImg"
- :title="app.appName"
- @click="createAppInstance(app)"
- />
- <span class="spanTitle">{{ app.appName }}</span>
- </li>
- <li v-if="listAppComputed.length < 1">
- <span class="spanTitle">当前工作下应用未启用</span>
- </li>
- </ul>
- </div>
- </div>
- <div class="creatbox_mid mt-10" v-if="this.listCloudFiles.length != 0">
- <div class="diahead">
- <div class="fl">
- <b class="diaTitle">创建 云文件</b>
- </div>
- <div class="fr">
- <!-- <i class="colosbtn" @click="hideNewFiledialog"></i> -->
- </div>
- </div>
- <div class="yiyun_line2"></div>
- <div class="mlr-10">
- <ul class="cardlistbox">
- <li
- @click="fileCloudClick(item)"
- v-for="(item, index) in listCloudFiles"
- :key="index"
- >
- <div
- class="listimg"
- :title="item.name"
- v-if="item.extension == 'doc' || item.extension == 'docx'
- || item.extension == 'dwg' || item.extension == 'dxf'
- || item.extension == 'gif' || item.extension == 'jpeg'
- || item.extension == 'jpg' || item.extension == 'max'
- || item.extension == 'nwc' || item.extension == 'pdf'
- || item.extension == 'png' || item.extension == 'ppt'
- || item.extension == 'pptx' || item.extension == 'rar'
- || item.extension == 'rvt' || item.extension == 'skp'
- || item.extension == 'txt' || item.extension == 'xls'
- || item.extension == 'xlsx' || item.extension == 'xmind'
- || item.extension == 'zip' "
- >
- <img :src="'/static/img/files/file_sample_' + item.extension + '.svg'" alt />
- </div>
- <div
- class="listimg"
- :title="item.name"
- v-if="item.extension != 'doc' && item.extension != 'docx'
- && item.extension != 'dwg' && item.extension != 'dxf'
- && item.extension != 'gif' && item.extension != 'jpeg'
- && item.extension != 'jpg' && item.extension != 'max'
- && item.extension != 'nwc' && item.extension != 'pdf'
- && item.extension != 'png' && item.extension != 'ppt'
- && item.extension != 'pptx' && item.extension != 'rar'
- && item.extension != 'rvt' && item.extension != 'skp'
- && item.extension != 'txt' && item.extension != 'xls'
- && item.extension != 'xlsx' && item.extension != 'xmind'
- && item.extension != 'zip' "
- >
- <img :src="'/static/img/files/file_sample_weizhi.svg'" alt />
- <span class="houzuidinwei">{{item.extension}}</span>
- </div>
- </li>
- </ul>
- </div>
- </div>
- <div class="creatbox_mid mt-10" v-if="this.ListTempFiles != 0">
- <div class="diahead">
- <div class="fl">
- <b>从样板文件中创建</b>
- </div>
- <div class="fr"></div>
- </div>
- <div class="yiyun_line2"></div>
- <div class="mlr-10">
- <ul class="listTemplateList">
- <li
- v-for="(item, index) in ListTempFiles"
- :key="index"
- :class="selctedIndex==index?'slected':''"
- @click="fileTempClick(item,index)"
- >
- <span class="listTemplateTextBig" :title="item.extension">{{item.extension}}</span>
- <span class="listTemplateText">{{item.fileName}}</span>
- </li>
- </ul>
- </div>
- </div>
- <!-- 从样板文件中创建 旧版 -->
- <div class="creatbox_mid mt-10" v-if="this.ListTempFiles != 0" v-show="false">
- <div class="diahead">
- <div class="fl">
- <b class="diaTitle">从样板文件中创建</b>
- </div>
- <div class="fr"></div>
- </div>
- <div class="yiyun_line2"></div>
- <div class="mlr-10">
- <ul class="cardlistbox">
- <li @click="fileTempClick(item)" v-for="(item, index) in ListTempFiles" :key="index">
- <div
- class="listimg"
- :title="item.name"
- v-if="item.extension == 'doc'
- || item.extension == 'docx'
- || item.extension == 'dwg' || item.extension == 'dxf'
- || item.extension == 'gif' || item.extension == 'jpeg'
- || item.extension == 'jpg' || item.extension == 'max'
- || item.extension == 'nwc' || item.extension == 'pdf'
- || item.extension == 'png' || item.extension == 'ppt'
- || item.extension == 'pptx' || item.extension == 'rar'
- || item.extension == 'rvt' || item.extension == 'skp'
- || item.extension == 'txt' || item.extension == 'xls'
- || item.extension == 'xlsx' || item.extension == 'xmind'
- || item.extension == 'zip' "
- >
- <img :src="'/static/img/files/file_sample_' + item.extension + '.svg'" alt />
- </div>
- <div
- class="listimg"
- :title="item.name"
- v-if="item.extension != 'doc' && item.extension != 'docx'
- && item.extension != 'dwg' && item.extension != 'dxf'
- && item.extension != 'gif' && item.extension != 'jpeg'
- && item.extension != 'jpg' && item.extension != 'max'
- && item.extension != 'nwc' && item.extension != 'pdf'
- && item.extension != 'png' && item.extension != 'ppt'
- && item.extension != 'pptx' && item.extension != 'rar'
- && item.extension != 'rvt' && item.extension != 'skp'
- && item.extension != 'txt' && item.extension != 'xls'
- && item.extension != 'xlsx' && item.extension != 'xmind'
- && item.extension != 'zip' "
- >
- <img :src="'/static/img/files/file_sample_weizhi.svg'" alt />
- <span class="houzuidinwei">{{item.extension}}</span>
- </div>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <file-Uploader
- v-show="showDrag"
- :multiple="true"
- label="点击上传本地文件"
- :auto="true"
- :dragfile="true"
- :accept="acceptType"
- ref="webUploadlist3"
- :btnId="btnDragUploadFileId"
- :projId="uploadProjId"
- :companyId="uploadCompId"
- :typeId="uploadTypeProj"
- :dragTag="dragTag"
- @upload-success="uploadFileSuccess"
- @upload-start="uploadBefore"
- :url="chunkUploadUrl"
- class="addUpfile2 dragbox"
- style="height:0;overflow:hidden"
- ></file-Uploader>
- <el-dialog
- title="文件名称"
- :visible.sync="dialogcreateFlie"
- width="460px"
- :close-on-click-modal="false"
- >
- <el-form>
- <el-form-item>
- <el-input></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogcreateFlie = false">取 消</el-button>
- <el-button type="primary" @click="dialogcreateFlie = false">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 版本--历史文件 -->
- <el-dialog
- title="设置协同历史文件"
- :visible.sync="dialogFileHistory"
- width="672px"
- class="linedia footernobianju"
- :close-on-click-modal="false"
- >
- <div>
- <div class="tankuangaodu translatescoall">
- <span class="visionlistTitle">当前协作版本</span>
- <ul class="visionlist">
- <li>
- <el-checkbox
- @change="currMilestoneChange"
- v-model="currentMilestone.check"
- class="largecheck ml-8"
- >
- <span
- class="widthfile midtext"
- :title="currentMilestone.archName"
- >{{currentMilestone.archName}}</span>
- <span class="widthtext1 minitext">版本{{ currentMilestone.number }}</span>
- <span class="widthtext minitext">{{currentMilestone.strCreateTime}}</span>
- <a
- href="javascript:;"
- @click="openMilstoneFile(currentMilestone)"
- class="widthtext1 minitext link"
- >查看</a>
- </el-checkbox>
- </li>
- </ul>
- <span class="visionlistTitle">历史文件</span>
- <ul class="visionlist">
- <li v-for="(item, index) in listMilestones" :key="index">
- <el-checkbox
- @change="milestoneChange(item)"
- v-model="item.check"
- class="largecheck ml-8"
- >
- <span class="widthfile midtext" :title="item.archName">{{item.archName}}</span>
- <span class="widthtext1 minitext">版本{{ item.number }}</span>
- <span class="widthtext minitext">{{ item.strCreateTime }}</span>
- <a
- href="javascript:;"
- @click="openMilstoneFile(item)"
- class="widthtext1 minitext link"
- >查看</a>
- </el-checkbox>
- </li>
- </ul>
- </div>
- </div>
-
- <div slot="footer" class="dialog-footer">
- <div class="pxline mb-15"></div>
- <div class="bianjubtn">
- <el-button class="largeBtn" @click="dialogFileHistory = false">取 消</el-button>
- <el-button class="largeBtn" type="primary" @click="setMilestones">选 定</el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 创建云文件命名弹框 -->
- <el-dialog
- :title="createCloudFileTile"
- :visible.sync="dialogNewCloudFileVisible"
- width="460px"
- @submit.native.prevent
- :close-on-click-modal="false"
- >
- <el-form>
- <el-form-item label>
- <div
- class="appImgiconbox"
- v-if=" fileNameExt == '.doc' || fileNameExt == '.docx'
- || fileNameExt == '.dwg' || fileNameExt == '.dxf'
- || fileNameExt == '.gif' || fileNameExt == '.jpeg'
- || fileNameExt == '.jpg' || fileNameExt == '.max'
- || fileNameExt == '.nwc' || fileNameExt == '.pdf'
- || fileNameExt == '.png' || fileNameExt == '.ppt'
- || fileNameExt == '.pptx' || fileNameExt == '.rar'
- || fileNameExt == '.rvt' || fileNameExt == '.skp'
- || fileNameExt == '.txt' || fileNameExt == '.xls'
- || fileNameExt == '.xlsx' || fileNameExt == '.xmind'
- || fileNameExt == '.zip' "
- >
- <img :src="'/static/img/AppHeadImg/a' + fileNameExt + '.png' " alt />
- </div>
- <div
- class="appImgiconbox"
- v-if=" fileNameExt != '.doc' && fileNameExt != '.docx'
- && fileNameExt != '.dwg' && fileNameExt != '.dxf'
- && fileNameExt != '.gif' && fileNameExt != '.jpeg'
- && fileNameExt != '.jpg' && fileNameExt != '.max'
- && fileNameExt != '.nwc' && fileNameExt != '.pdf'
- && fileNameExt != '.png' && fileNameExt != '.ppt'
- && fileNameExt != '.pptx' && fileNameExt != '.rar'
- && fileNameExt != '.rvt' && fileNameExt != '.skp'
- && fileNameExt != '.txt' && fileNameExt != '.xls'
- && fileNameExt != '.xlsx' && fileNameExt != '.xmind'
- && fileNameExt != '.zip' "
- >
- <img src="/static/img/AppHeadImg/a.png" alt />
- </div>
-
- <div class="centertext">{{ fileNameBefore }}{{ createCloudFileName }}{{ fileNameExt }}</div>
- <el-input v-model="createCloudFileName" @keyup.enter.native="createFileSure"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogNewCloudFileVisible = false">取 消</el-button>
- <el-button type="primary" @click="createFileSure">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 创建超图实例弹框 -->
- <el-dialog
- title="创建超图应用"
- :visible.sync="dialogNewSuperMapVisible"
- width="460px"
- :close-on-click-modal="false"
- >
- <el-form>
- <el-form-item label="应用名称">
- <el-input v-model="newSuperMap.showName"></el-input>
- </el-form-item>
- <el-form-item label="链接地址">
- <el-input v-model="newSuperMap.description"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogNewSuperMapVisible = false">取 消</el-button>
- <el-button type="primary" @click="createSuperMapSure">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 创建地图实例弹框 -->
- <el-dialog
- title="创建地图应用"
- :visible.sync="dialogNewMapVisible"
- width="460px"
- :close-on-click-modal="false"
- >
- <el-form>
- <el-form-item label="应用名称">
- <el-input v-model="newMap.showName"></el-input>
- </el-form-item>
- <el-form-item label="详细地址">
- <el-input v-model="newMap.description"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogNewMapVisible = false">取 消</el-button>
- <el-button type="primary" @click="createMapSure">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 底部弹框 -->
- <div class="bottomdialog" v-show="isBottomNewProj" style="height: 60px;">
- <div style="margin-top: 10px;" class="yiyun_dialog_left yiyun_zhedie">
- <span class="yiyun_zhankaibtn">
- 关闭
- <!-- <i class="Cicon text_gray icon font_family icon-icon_zhankai" title="展开面板"></i> -->
- </span>
- </div>
- <div class="yiyun_dialog_center">
- <div class="bottomdialogbox_list_head newProject_next_taggle1 line_H60">
- <div class="yiyun_col-6 fl">
- <h3>继续-项目设置</h3>
- </div>
- </div>
- </div>
- <div class="yiyun_dialog_right yiyundialog_close" style="margin-top: 15px;">
- <!-- 关闭 -->
- </div>
- </div>
- <!-- 应用弹框 -->
- <el-dialog
- :title="appInstanceTitle"
- :visible.sync="showApp"
- :fullscreen="true"
- class="fullscreenDia"
- :close-on-click-modal="false"
- @close="closeApp"
- >
- <!-- <b-map-component v-if="instanceType == 1" :address="mapAddress" style="height:calc(100vh - 54px)"></b-map-component> -->
- <Forgeview v-if="instanceType == 2" :forgeModelUrl="forgeShowUrl"></Forgeview>
- <Gismap v-if="instanceType == 3" :gisUrl="gisShowUrl"></Gismap>
- </el-dialog>
- <!-- 应用弹框 -->
- <el-dialog
- :title="officeTitle"
- :visible.sync="showOffice"
- :fullscreen="true"
- class="fullscreenDia"
- :close-on-click-modal="false"
- >
- <Officeview :officeUrl="officeUrl"></Officeview>
- </el-dialog>
- <!-- 应用弹框 -->
- <el-dialog
- title="图片查看"
- :visible.sync="showImage"
- :fullscreen="true"
- class="fullscreenDia"
- :close-on-click-modal="false"
- >
- <Imageview :imageUrl="imageUrl"></Imageview>
- </el-dialog>
- <el-dialog :title="shareForgeTitle" :visible.sync="showShare" :close-on-click-modal="false">
- <span>获取分享链接成功,复制链接分享给好友吧</span>
- <div></div>
- <el-input type="textarea" :autosize="{minRows:3,maxRows:5}" v-model="shareUrl" class="mtb-10"></el-input>
- <div class="right-algin">
- <el-button @click="copyShareUrl">复制链接</el-button>
- <el-button @click="openShareUrl">查看分享</el-button>
- </div>
- </el-dialog>
- <!-- 项目设置与职员指派组件 -->
- <transition-group
- v-on:before-enter="distBeforeEnter"
- v-on:enter="distEnter"
- v-on:leave="distLeave"
- v-bind:css="false"
- >
- <div class="bottomdialogbox bg_baise" v-if="isShowEditStaff" style="color: white;" :key="0">
- <DistWork @offDialog="closeDistWork"></DistWork>
- </div>
- <div
- class="bottomdialogbox bg_baise"
- v-show="isShowProjSetting"
- style="color: white;"
- :key="1"
- >
- <ProjSetting
- :isProjManager="isProjectManager"
- :isSetFolder="isEditProjFolder"
- @offDialog="closeProjSet"
- ></ProjSetting>
- </div>
- </transition-group>
- <el-dialog
- :title="dialogTtile"
- :visible.sync="dialogCopyAndMove"
- width="456px"
- class="eldialogheight"
- >
- <div class="DiacenterBox">
- <el-select v-model="dialogSelectedFolder" filterable placeholder="请选择">
- <el-option
- v-for="(currFolder, index) in listUserFolders"
- :key="index"
- :label="currFolder.folderName"
- :value="currFolder.folderID"
- ></el-option>
- </el-select>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogCopyAndMove = false">取 消</el-button>
- <el-button type="primary" @click="copyAndMoveToOtherFile()">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 拖动上传 -->
- <div class="drop_areabox" id="drop_area" v-if="isHasDropevent">请将文件拖拽到此区域上传</div>
- <!-- 创建文件夹组 -->
- <el-dialog
- title="创建文件夹"
- @submit.native.prevent
- :visible.sync="dialogNewFolderGroup"
- width="460px"
- :close-on-click-modal="false"
- >
- <el-form>
- <div class="appImgiconbox">
- <img src="/static/img/folder.png" alt />
- </div>
- <el-form-item>
- <el-input v-model="folderGroupData.folderGroupName" @keyup.enter.native="createFolderGroupSure"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogNewFolderGroup = false">取 消</el-button>
- <el-button @click="createFolderGroupSure()" type="primary">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
-
- <script>
- import commonJs from "../../common/webCommon";
- import forgeview from "../components/forgeview/forgeview.vue";
- import gismap from "../components/gismap/gismap.vue";
- import officeview from "../components/officeview/officeview.vue";
- import imageview from "../components/imageview/imageview.vue";
- // import BMapComponent from "../components/map/bmap";
- import DistWork from "../components_web/distWork/distWork";
- import WorkLine from "../components_web/workLine/workLine";
- import ProjSetting from "../components_web/projSetting/projSetting";
- import FileShare from "../components_web/share_setting/fileshare";
- import draggable from "vuedraggable";
- import vuetify from "vuetify";
- import Vue from "vue";
- Vue.use(vuetify);
- export default {
- props: {
- outWorkSpace: Boolean
- },
- data() {
- return {
- imgSrc: process.env.API_HOST + "archives/cover?path=",
- headSrc: process.env.API_HOST + "archives/head?path=",
- chunkUploadUrl: process.env.API_HOST + "webupload/chunks",
- uploadProjId: sessionStorage.projId,
- acceptType: "*",
- btnUploadFileAppId: "uploadAppFileApp",
- btnUploadFileId: "uploadAppFile",
- btnDragUploadFileId: "uploadAppDragFile",
- showDrag: false,
- loading: false,
- uploadCompId: sessionStorage.companyId,
- uploadTypeProj: 1,
- dragTag: "#app",
- selctedIndex: 1,
- uploadTypeApp: 4, // 企业应用type为4
- // 定义start
- appState: false, //定义开关
- switch2: false, //定义开关
- switch3: false, //定义开关
- switch4: false, //定义开关
- switch5: true, //定义开关
- switch6: false, //定义开关
- switch7: false, //定义开关
- switch8: true, //定义开关
- isShowsearch: false,
- isShowCosearch: false,
- isShowNewFileBtn: false, // 新建文件按钮
- isShowMyFileList: true, // 文件列表显示按钮
- isShowTogetherFileList: true, // 协作文件列表显示按钮
- isShowNewFiledialog: false, // 新建文件弹框
- dialogcreateFlie: false, // 新建文件名称弹框
- isShowRightManager: false, // 右侧项目与应用管理弹框
- dialogNewCloudFileVisible: false, // 创建云文件弹框
- dialogNewAppInstanceVisible: false, // 创建云应用实例弹框
- isShowProjSetting: false,
- isBottomNewProj: false,
- isAloneDistWorkPeople: false, // 分配工作
- isAloneDistWork: false, // 分配人员
- neibianju: "neibianju",
- isHasDropevent: false, //默认不显示上传框
- currentPageType: 0,
- workt: [
- {
- title: "我的文件"
- },
- {
- title: "工作文件"
- }
- ],
- folderFileList: [], // 工作下文件
- //默认neibianju 展开后neibianju1
- //数据初始化-----------
- myFilesList: [],
- listUserFolders: [],
- myCollaborationFilesList: [], //协作文件
- myPublicFilesList: [], //公共文件
- nowProject: "",
- nowFolderIndex: 0,
- nowFolder: "",
- projId: sessionStorage.projId,
- userId: sessionStorage.userId,
- // end
- scrollIndex: 0,
- myCollFilesList: [],
- searchMyFile: "", //搜索我的文件
- searchMyCollaborationFile: "", //搜索协作文件
- listProjFolders: "", // 当前项目下工作
- listNewFolder: "", //自定义文件夹
- showTitle: 1,
- ischeckAll: false, //是否全选
- listDept: [], //项目人员
- activeName: "1",
- newFolderIndex: 1,
- selectedUser: [], // 当前文件夹的已选协作人
- roles: [
- {
- value: 0,
- label: "查看",
- description: "查看"
- },
- {
- value: 1,
- label: "编辑",
- description: "查看和编辑"
- },
- {
- value: 2,
- label: "分配工作",
- description: "编辑和分配工作"
- }
- ],
- workTabs: [
- {
- index: 0,
- label: "协作文件"
- },
- {
- index: 1,
- label: "公共文件"
- }
- ],
- fileindex: 0, // 协作文件与公共文件默认切换状态
- curactive: 0, // 协作文件与公共文件默认样式切换状态
- isShowpageIcon: true, // 协作空间折叠按钮状态
- closepageH: "", // 底部协作文件展开高度 默认为空,展开后高度为closepageH
- rightMenuvisible: false,
- showType: 1, // 右键菜单类型,1 为我的文件,2位协作文件,3为公共文件 ,4为新建文件分组
- top: 0,
- left: 0,
- newFolderLength: 0,
- isShowProManager: 1, // 默认显示项目管理面板
- isShowProInfo: true, // 默认显示项目概况,false为显示编辑概况
- isProjectview: false, // 默认项目概况隐藏
- isEditProjectviewBtn: false,
- isProjectviewbtn: false,
- listProjProp: [], // 项目自定义属性字段集合
- nowFolderName: "",
- isProjectManager: false, // 是否是当前项目负责人
- isFolderManager: false, // 工作负责人
- createCloudFileTile: "", // 创建文件标题
- currentCloudFile: {}, // 当前要创建的云文件
- currentTempFile: {}, // 当前要创建的样板文件
- createType: 1, // 创建云文件类型:1为云文件,2为样板文件
- createCloudFileName: "", // 创建文件名称
- fileNameBefore: "test", // 文件名前缀部分
- fileNameExt: ".png", // 文件名后缀部分
- listApp: [], // 云应用列表
- listFolderApp: [], // 当前工作启用的应用列表
- newAppInstance: {
- appID: "",
- folderID: "",
- showName: "",
- description: "",
- fileName: "",
- alias: "",
- createUserID: ""
- }, // 新建应用实例数据
- createAppInstanceTitle: "", // 创建文件标题
- isShowMyAppInstanceList: true, // 我的应用实例列表
- myAppInstanceList: [], // 我的应用实例数据
- currentApp: {}, // 当前App
- currentAppInstance: {}, // 当前应用实例
- showApp: false, // 显示当前应用
- appInstanceTitle: "", // 查看应用实例标题
- instanceType: 1, // 应用实例类型
- myCollaborationApp: [], // 协作应用实例
- uploadExtention: "", // 上传文件类型
- showOffice: false, // 预览Office文件
- officeTitle: "文件预览", // 预览文件标题
- showImage: false,
- imageUrl: "",
- showShare: false, // 是否显示分享框
- shareUrl: "", // forge分享链接
- shareForgeName: "", // forge分享文件名
- shareForgeTitle: "", // forge分享框标题
- officeUrl: "", // PDF URL
- listCloudFiles: [], // 云文件列表
- ListTempFiles: [], // 样板文件列表
- BtnRightFile: "", //右键文件对象
- dialogCopyAndMove: false, //弹框复制和移动到其它文件夹
- dialogSelectedFolder: "", //选择文件夹值
- dialogTtile: "", //弹框标题
- classif: "", //选择的文件分类
- isShowEditStaff: false, //工作指派
- workheight: "", //工作链高度
- isShowworklink: false, //是否展开我的工作链
- bgTitle: "bgwirte", // bgwirte 为白色
- worklinkHeight: "worklinkHeight", //距离底边55px worklinkHeight
- isOpenMsg: true, //默认开启消息通知
- checkvision: "", //选择版本
- dialogFileHistory: false,
- isonselect: "-2", // -1-------> 表示未完成 0-------> 完成 1-------> 表示已取消 2-------> 表示已更新
- isShowFileShare: false, //是否显示文件交换设置
- listMilestones: [], //
- currentMilestone: "", // 当前版本
- currentMileArchID: "", // 当前版本文件ID
- currentArchID: "", // 当前文件ID
- isCommonPage: false, // 是否是公共文件夹页面
- isUseCommon: true, // 是否开启提交到公共文件夹功能
- isUseShare: true, // 是否开启协同功能
- isUseFolderChange: true, // 是否开启文件夹交换功能
- isEditProjFolder: false, // 是否编辑项目分配
- isCreating: false, // 是否正在创建历史文件,不允许频繁重复操作
- isShowForge: false, // 是否展示forge
- forgeShowUrl: "", // forge展示地址
- gisShowUrl: "", // gis展示地址
- dialogNewMapVisible: false,
- newMap: { showName: "", description: "" },
- dialogNewSuperMapVisible: false,
- newSuperMap: { showName: "", description: "" },
- mapAddress: "北京天安门",
- isClient: process.env.IS_CLIENT, // 是否是客户端
- /**新建文件分组 start*/
- dialogNewFolderGroup: false, //新建文件分组组弹窗
- //文件分组数据
- folderGroupData: {
- folderGroupID: "",
- folderID: "",
- superID: "",
- levelID: "",
- folderGroupName: "",
- childCount: 0,
- createUserID: "",
- createTime: "",
- modifyUserID: "",
- modifyTime: ""
- },
- myListFolderGroups: [], // 我的文件分组数据
- dbClickSelectedFolderGroupData: {}, //双击选中的当前文件夹分组对象
- isShowWorkt: true, //是否显示我的文件和工作文件
- isShowBread: false, //是否显示面包屑
- folderGroupBreads: [], //文件分组面包屑集合
- btnRightFoldergoup: {}, //鼠标右键的文件分组对象
- strFoldergroupCopyOrMove: "", //右键菜单 文件分组 是复制还是移动标记
- strFileOrFoldergroup: "", //右键菜单 移动/复制到其他工作 是文件还是文件分组标记
- draggableData: {}, //记录要移动的数据
- timer: {}, //文件计时器对象
- isShowMenuFoldergroup: true, //右键分组菜单项-显隐
- isShowMenuFile: true, //右键文件菜单项-显隐
- isShowMenuItemCreateFoldergroup: true, //右键分组"新建文件夹"菜单项-显隐
- myFileBreadNodeData: [
- {
- archID: null,
- childCount: 0,
- createTime: "",
- createUserID: "",
- deleted: 0,
- folderGroupID: "myFile",
- folderGroupName: "我的文件",
- folderID: "",
- levelID: "",
- modifyTime: "",
- modifyUserID: "",
- superID: ""
- }
- ],
- myComFileBreadNodeData: [
- {
- archID: null,
- childCount: 0,
- createTime: "",
- createUserID: "",
- deleted: 0,
- folderGroupID: "myComFile",
- folderGroupName: "公共文件",
- folderID: "",
- levelID: "",
- modifyTime: "",
- modifyUserID: "",
- superID: ""
- }
- ],
- showadow:false
- /**新建文件分组 end*/
- };
- },
- created:function(){
- this.myFileBreadNodeData= [
- {
- archID: null,
- childCount: 0,
- createTime: "",
- createUserID: "",
- deleted: 0,
- folderGroupID: "myFile",
- folderGroupName: "我的文件",
- folderID: "",
- levelID: "",
- modifyTime: "",
- modifyUserID: "",
- superID: ""
- }
- ]
- this.myComFileBreadNodeData= [
- {
- archID: null,
- childCount: 0,
- createTime: "",
- createUserID: "",
- deleted: 0,
- folderGroupID: "myComFile",
- folderGroupName: "公共文件",
- folderID: "",
- levelID: "",
- modifyTime: "",
- modifyUserID: "",
- superID: ""
- }
- ]
- },
- mounted: function() {
- window["refreshFiles"] = () => {
- this.refreshPages();
- };
- window["tipUser"] = () => {
- this.tipUser();
- };
- window["setFileStatusSure"] = () => {
- this.setFileStatusSure();
- };
- window.addEventListener("scroll", this.onscroll, true);
- this.loadProjManager();
- this.loadSettings();
- this.listFolders();
- this.updateProjUser();
- window.addEventListener("resize", this.listenBottomHeight, true);
- },
- computed: {
- /**
- * 过滤后的部门列表:去除没有用户数据的部门
- */
- listDeptComputed: function() {
- return this.listDept.filter(function(dept) {
- return dept.listUser.length > 0;
- });
- },
- /**
- * 过滤后的应用列表,已启用应用
- */
- listAppComputed: function() {
- return this.listApp.filter(function(app) {
- return app.enable == 1 && app.appType != 2;
- });
- },
- /**
- * 我的工作列表
- */
- listUserFoldersComputed() {
- var thisApp = this;
- return this.listUserFolders.filter(function(folder) {
- return thisApp.nowFolderName != folder.folderName;
- });
- }
- },
- methods: {
- downLoadStatus:function(){
- var data =back.getProgress();
- console.log(data);
- },
- listenBottomHeight(){
- let oDivH= document.getElementById("bottomBox").offsetHeight;
- let oShodow= document.getElementById("bottomoShodow");
- // console.log(oDivH)
- if(oDivH>259){
- this.showadow = true
- }else{
- this.showadow = false
- }
- },
- /**
- * 刷新页面
- */
- refreshPages(){
- if ( this.dbClickSelectedFolderGroupData != null && JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}") {
- this.intoFoldergroup(this.dbClickSelectedFolderGroupData);
- } else {
- this.listFiles();
- }
- },
- /***
- * 切换文件显示类型
- * 0:我的文件 1:工作文件
- */
- changeWorkdata(i) {
- //clearInterval(this.timer);
- this.currentPageType = i;
- this.dbClickSelectedFolderGroupData = {}; //切换我的文件和工作文件 清空双击的文件分组对象
- if (this.currentPageType == 0) {
- // 加载我的文件
- this.myFilesList = this.folderFileList.listMyFiles;
- //zxm+ 加载我的文件夹组
- this.myListFolderGroups = this.folderFileList.listFolderGroups;
- } else {
- // 加载工作文件
- this.myFilesList = this.folderFileList.listOtherFiles;
- //zxm+ 加载工作文件夹组
- this.myListFolderGroups = this.folderFileList.listOtherFolderGroups;
- }
- },
- /***
- * 监听浏览器是否有拖入文件
- */
- listenerFrapfile(e) {
- let _this = this;
- var dropbox = document.getElementById("drop_area");
- var appbox = document.getElementById("app");
- // 监听浏览器拖入事件
- appbox.addEventListener("drop", this.enentDrop, false);
- appbox.addEventListener("dragleave", function(e) {
- _this.isHasDropevent = false;
- });
- appbox.addEventListener("dragenter", function(e) {
- _this.isHasDropevent = true;
- });
- appbox.addEventListener("dragover", function(e) {
- _this.isHasDropevent = true;
- });
-
- // 监听上传框拖入事件
- dropbox.addEventListener("drop", this.enentDrop, false);
- dropbox.addEventListener("dragleave", function(e) {
- e.stopPropagation();
- e.preventDefault();
- _this.borderhover = false;
- });
- dropbox.addEventListener("dragenter", function(e) {
- e.stopPropagation();
- e.preventDefault();
- _this.borderhover = true;
- });
- dropbox.addEventListener("dragover", function(e) {
- e.stopPropagation();
- e.preventDefault();
- _this.borderhover = true;
- });
- },
- /**
- * 滚动加载更多数据
- */
- scrollLoad: function() {
- if (this.scrollIndex < this.myCollFilesList.length) {
- this.scrollIndex += 7;
- this.myCollaborationFilesList = commonJs.pageData(
- this.scrollIndex,
- 1,
- this.myCollFilesList
- );
- } else {
- this.myCollaborationFilesList = commonJs.pageData(
- this.scrollIndex,
- 1,
- this.myCollFilesList
- );
- }
- },
- /**
- * 获取设置信息
- */
- loadSettings() {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(process.env.API_HOST + "sysinfo/setting")
- })
- .then(response => {
- response.data.forEach(element => {
- if (element.shortName == "公共文件夹") {
- if (element.status == 1) {
- this.isUseCommon = true;
- } else {
- this.isUseCommon = false;
- }
- } else if (element.shortName == "协同") {
- if (element.status == 1) {
- this.isUseShare = true;
- } else {
- this.isUseShare = false;
- }
- } else if (element.shortName == "文件交换") {
- if (element.status == 1) {
- this.isUseFolderChange = true;
- } else {
- this.isUseFolderChange = false;
- }
- }
- });
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 判断用户是否是项目负责人
- */
- loadProjManager: function() {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "projects/manager/" +
- sessionStorage.projId +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- if (response.data != null && response.data != "") {
- this.isProjectManager = response.data.isProjManager;
- this.isFolderManager = response.data.isFolderManager;
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * @description: 应用管理面板
- * @return:
- */
- showAllAppManagement: function() {
- this.yiyunAnimated = "AnimatedRightIn flex_right_pain";
- this.isShowRightManager = true;
- this.isShowProManager = 1;
- },
- /**
- * @description: 工作链中新申请
- * @return:
- */
- showNewAppManagement: function(from) {
- this.yiyunAnimated = "AnimatedRightIn flex_right_pain";
- this.isShowRightManager = true;
- this.isShowProManager = 6;
- },
- /**
- * @description: 关闭工作地图
- * @return:
- */
- closeAppManagePain: function() {
- this.isShowRightManager = false;
- this.yiyunAnimated = "flex_right_pain";
- },
- /**
- * @description: 我的文件显示缩略图
- * @return:
- */
- showMyFilecard: function() {
- this.isShowNewFileBtn = false;
- this.isShowMyFileList = true;
- },
- /**
- * @description: 我的文件显示列表
- * @return:
- */
- showMyFilelist: function() {
- this.isShowNewFileBtn = true;
- this.isShowMyFileList = false;
- },
- /**
- * @description: 协作文件显示缩略图
- * @return:
- */
- showCoFilecard: function() {
- this.isShowTogetherFileList = true;
- },
- /**
- * @description: 协作文件显示列表
- * @return:
- */
- showCoFilelist: function() {
- this.isShowTogetherFileList = false;
- },
- /**
- * @description: 新建文件弹框
- * @return:
- */
- showNewFiledialog: function() {
- this.isShowNewFiledialog = true;
- this.loadlistApp();
- this.loadListFiles();
- this.loadListTempFiles();
- },
- /**
- * @description: 隐藏新建文件弹框
- * @return:
- */
- hideNewFiledialog: function() {
- this.isShowNewFiledialog = false;
- },
- /**
- * @description: 查看工作链页面
- * @return:
- */
- showWorklinkPage: function() {
- this.$emit("isShowOutWorkSpace", true);
- this.isShowworklink = true;
- this.workheight = "workheight";
- },
- /**
- * @description: 隐藏工作链页面
- * @return:
- */
- hideWorklinkPage: function() {
- this.$emit("isShowOutWorkSpace", false);
- this.isShowworklink = false;
- this.workheight = " workheightinit";
- },
- /**
- * 打开文件时更新文件状态及编辑人
- */
- setModifyStatus(file) {
- var thisApp = this;
- file.status = 1; // 设置为编辑中
- file.modifyUserID = sessionStorage.userId;
- this.$axios({
- method: "put",
- url: encodeURI(process.env.API_HOST + "archives/update/status"),
- data: file
- })
- .then(function(response) {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "info",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- },
- /**
- * 更改文件状态
- */
- setFileStatus(file, state, message, type) {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(process.env.API_HOST + "archives/first/" + file.archID)
- })
- .then(function(response) {
- file = response.data;
- if (file.status == 1) {
- if (file.modifyUserID != sessionStorage.userId) {
- thisApp
- .$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST + "sysinfo/user/" + file.modifyUserID
- )
- })
- .then(function(resUser) {
- thisApp.$notify({
- title: "温馨提示",
- message:
- "只有最后编辑人 " + resUser.data.cnName + " 可以修改",
- type: "info",
- offset: 100,
- duration: 2500
- });
- return;
- })
- .catch(function(error) {
- thisApp.$notify({
- title: "温馨提示",
- message: "非编辑人不能进行编辑操作",
- type: "info",
- offset: 100,
- duration: 2500
- });
- return;
- });
- return;
- }
- if (type == 1) {
- if(thisApp.isClient && (state == 0 || state == 2))
- {
- // 启动客户端判断
- thisApp.setFile=file;
- thisApp.setState=state;
- back.getFileStatus(file.archID,sessionStorage.userId)
- return;
- }
- file.status = state;
- thisApp
- .$axios({
- method: "put",
- url: encodeURI(
- process.env.API_HOST + "archives/update/status"
- ),
- data: file
- })
- .then(function(response) {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- if (
- thisApp.dbClickSelectedFolderGroupData == null ||
- JSON.stringify(thisApp.dbClickSelectedFolderGroupData) ==
- "{}"
- ) {
- thisApp.folderGroupBreads = [];
- thisApp.refreshPages();
- } else {
- thisApp.intoFoldergroup(
- thisApp.dbClickSelectedFolderGroupData
- );
- }
- if (thisApp.fileindex == 1 && file.commonStatus == 1) {
- thisApp.loadListCommonFiles();
- }
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "info",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- } else {
- thisApp
- .$confirm(
- "是否重新开启文件【" + file.archName + "】的协同?",
- "文件提示",
- {
- confirmButtonText: "开启协同",
- cancelButtonText: "取消",
- type: "warning"
- }
- )
- .then(() => {
- file.status = state;
- thisApp
- .$axios({
- method: "put",
- url: encodeURI(
- process.env.API_HOST + "archives/update/status"
- ),
- data: file
- })
- .then(function(response) {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- if (
- thisApp.dbClickSelectedFolderGroupData == null ||
- JSON.stringify(
- thisApp.dbClickSelectedFolderGroupData
- ) == "{}"
- ) {
- thisApp.folderGroupBreads = [];
- thisApp.refreshPages();
- } else {
- thisApp.intoFoldergroup(
- thisApp.dbClickSelectedFolderGroupData
- );
- }
- if (thisApp.fileindex == 1 && file.commonStatus == 1) {
- thisApp.loadListCommonFiles();
- }
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "info",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- })
- .catch(function(error) {
- console.log(error);
- });
- }
- } else {
- // state :0/2/3
- if (type == 1) {
- if(thisApp.isClient && (state ==0 || state == 2))
- {
- // 启动客户端判断
- thisApp.setFile=file;
- thisApp.setState=state;
- back.getFileStatus(file.archID,sessionStorage.userId)
- return;
- }
- file.status = state;
- thisApp
- .$axios({
- method: "put",
- url: encodeURI(
- process.env.API_HOST + "archives/update/status"
- ),
- data: file
- })
- .then(function(response) {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: "操作成功",
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.refreshPages();
- if (thisApp.fileindex == 1 && file.commonStatus == 1) {
- thisApp.loadListCommonFiles();
- }
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "info",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- } else {
- thisApp
- .$confirm(
- "是否重新开启文件【" + file.archName + "】的协同?",
- "文件提示",
- {
- confirmButtonText: "开启协同",
- cancelButtonText: "取消",
- type: "warning"
- }
- )
- .then(() => {
- file.status = state;
- thisApp
- .$axios({
- method: "put",
- url: encodeURI(
- process.env.API_HOST + "archives/update/status"
- ),
- data: file
- })
- .then(function(response) {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.refreshPages();
- if (thisApp.fileindex == 1 && file.commonStatus == 1) {
- thisApp.loadListCommonFiles();
- }
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "info",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- })
- .catch(function(error) {
- console.log(error);
- });
- }
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- },
- /**
- * 客户端验证确定可以修改文件状态
- */
- setFileStatusSure(){
- var thisApp=this;
- if(thisApp.setFile.alias == "")
- {
- this.$notify({
- title: "温馨提示",
- message: "文件正在同步中,请稍后操作",
- type: "info",
- offset: 100,
- duration: 2500
- });
- return;
- }
- thisApp.setFile.status = thisApp.setState;
- thisApp
- .$axios({
- method: "put",
- url: encodeURI(
- process.env.API_HOST + "archives/update/status"
- ),
- data: thisApp.setFile
- })
- .then(function(response) {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: "操作成功",
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.refreshPages();
- if (thisApp.fileindex == 1 && file.commonStatus == 1) {
- thisApp.loadListCommonFiles();
- }
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "info",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- },
- /**
- * 不能改变状态时提示用户
- */
- tipUser(){
- this.$notify({
- title: "温馨提示",
- message: "文件正在同步中,请稍后操作",
- type: "info",
- offset: 100,
- duration: 2500
- });
- },
- /**
- * @description: 应用列表鼠标滑入
- * @return:
- */
- isShowIcon() {
- if (this.isonselect == "-2") {
- this.isonselect = "-1";
- }
- },
- /**
- * @description: 应用列表鼠标离开
- * @return:
- */
- ishideIcon() {
- if (
- this.isonselect != "0" ||
- this.isonselect != "1" ||
- this.isonselect != "2"
- ) {
- this.isonselect = "-2";
- }
- },
- /*
- *获取列表文件夹
- */
- listFolders: function() {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "folders/work/" +
- this.userId +
- "/" +
- this.projId
- )
- })
- .then(response => {
- thisApp.listUserFolders = response.data;
- if (thisApp.listUserFolders.length > 0) {
- if (this.$route.params.folderId != undefined) {
- var folderid = this.$route.params.folderId;
- for (
- let index = 0;
- index < thisApp.listUserFolders.length;
- index++
- ) {
- if (thisApp.listUserFolders[index].folderID == folderid) {
- thisApp.nowFolderIndex = index;
- }
- }
- } else {
- if (
- sessionStorage.nowFolderIndex != "" &&
- sessionStorage.nowFolderIndex != undefined
- ) {
- thisApp.nowFolderIndex = parseInt(
- sessionStorage.nowFolderIndex
- );
- } else {
- thisApp.nowFolderIndex = 0;
- }
- }
- thisApp.nowFolder = thisApp.listUserFolders[thisApp.nowFolderIndex];
- thisApp.listFiles();
- if (
- thisApp.dbClickSelectedFolderGroupData == null ||
- JSON.stringify(thisApp.dbClickSelectedFolderGroupData) == "{}"
- ) {
- thisApp.timer = setInterval(() => {
- thisApp.listFiles();
- }, 3 * 1000);
- }
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 更新新项目标识
- */
- updateProjUser() {
- if (sessionStorage.newProjStatus == 1) {
- var thisApp = this;
- var projUserData = {
- projID: sessionStorage.projId,
- userID: sessionStorage.userId,
- newProjStatus: 0
- };
- this.$axios({
- method: "put",
- url: encodeURI(process.env.API_HOST + "projects/projuser"),
- data: projUserData
- })
- .then(response => {})
- .catch(error => {
- console.log(error);
- });
- }
- },
- /**
- * 获取当前工作下文件
- */
- listFiles: function() {
- var thisApp = this;
- thisApp.isCommonPage = false;
- thisApp.nowFolderId =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID
- thisApp.nowFolderName =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderName; // 设置当前工作名称
- var folderPerm =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderPerm;
- if (
- this.listUserFolders[thisApp.nowFolderIndex].folderName == "公共文件夹"
- ) {
- this.fileindex = 2;
- sessionStorage.comFolderId =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
- this.isCommonPage = true;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives" +
- "/all/" +
- thisApp.nowFolderId +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- thisApp.folderFileList = response.data;
- if (this.currentPageType == 0) {
- // 加载我的文件
- this.myFilesList = this.folderFileList.listMyFiles;
- //zxm+ 加载我的文件夹组
- this.myListFolderGroups = this.folderFileList.listFolderGroups;
- } else {
- // 加载工作文件
- this.myFilesList = this.folderFileList.listOtherFiles;
- //zxm+ 加载工作文件夹组
- this.myListFolderGroups = this.folderFileList.listOtherFolderGroups;
- }
- thisApp.loadCommitedComFiles();
- })
- .catch(error => {
- console.log(error);
- });
- } else {
- if(this.fileindex == 2)
- {
- this.fileindex = 0;
- }
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives" +
- "/all/" +
- thisApp.nowFolderId +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- thisApp.folderFileList = response.data;
- if (this.currentPageType == 0) {
- // 加载我的文件
- thisApp.myFilesList = thisApp.folderFileList.listMyFiles;
- // 加载我的文件夹 zxm+
- thisApp.myListFolderGroups =
- thisApp.folderFileList.listFolderGroups;
- } else {
- // 加载工作文件
- thisApp.myFilesList = thisApp.folderFileList.listOtherFiles;
- // 加载工作文件分组 zxm+
- thisApp.myListFolderGroups =
- thisApp.folderFileList.listOtherFolderGroups;
- }
- if(thisApp.curactive==0){
- thisApp.listCollaborationFiles();
- }else if(thisApp.curactive==1){
- thisApp.loadListCommonFiles();
- }
- })
- .catch(error => {
- console.log(error);
- });
- }
- },
- /**
- * 获取协作文件
- */
- listCollaborationFiles: function() {
- var thisApp = this;
- thisApp.nowFolderId =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives/collaboration/" +
- thisApp.nowFolderId +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- response.data.data.forEach(arch => {
- if (arch.createTime != null && arch.modifyTime != null) {
- arch.createTime = arch.createTime.replace(/T/g, " ");
- arch.createTime = arch.createTime.replace(/\+/g, " ");
- arch.modifyTime = arch.modifyTime.replace(/T/g, " ");
- arch.modifyTime = arch.modifyTime.replace(/\+/g, " ");
- }
- arch.isShowFile = true;
- });
- thisApp.myCollFilesList = [];
- if(response.data.data!=null && response.data.data.length > 0){
- thisApp.myCollFilesList = response.data.data;
- }
- if (thisApp.myCollFilesList.length > 0) {
- thisApp.scrollIndex = 7;
- thisApp.scrollLoad();
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 获取公共文件
- */
- loadListCommonFiles: function() {
- var thisApp = this;
- //thisApp.myPublicFilesList = [];
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives/common/all/" +
- sessionStorage.comFolderId +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- thisApp.myPublicFilesList = response.data.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 获取用户提交的公共文件
- */
- loadCommitedComFiles: function() {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives/common/commited/" +
- sessionStorage.comFolderId +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- thisApp.myPublicFilesList = response.data.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 获取协作应用实例
- */
- listCollaborationApps: function() {
- var thisApp = this;
- thisApp.nowFolderId =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives/collaboration/appinstance/" +
- thisApp.nowFolderId
- )
- })
- .then(response => {
- thisApp.myCollaborationApp = response.data.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 加载云文件列表
- */
- loadListFiles: function() {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(process.env.API_HOST + "sysinfo/cloudfile")
- })
- .then(response => {
- thisApp.listCloudFiles = response.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 加载样板文件列表
- */
- loadListTempFiles: function(node) {
- var thisApp = this;
- if (thisApp.listUserFolders[thisApp.nowFolderIndex].folderID == "") {
- thisApp.ListTempFiles = [];
- return;
- }
- var folderId = thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST + "templates/nodes/files/folder/" + folderId
- )
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.ListTempFiles = response.data.data;
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 分享ForgeView
- */
- shareMyFile(file) {
- this.showShare = true;
- this.shareUrl = file.showUrl;
- this.shareForgeName = file.archName;
- this.shareForgeTitle = "分享我的模型-" + file.archName;
- },
- /**
- * 复制Forge分享链接
- */
- copyShareUrl() {
- let inputEle = document.createElement("input");
- inputEle.setAttribute("readonly", "readonly");
- inputEle.setAttribute("value", this.shareUrl);
- document.body.appendChild(inputEle);
- inputEle.select();
- if (document.execCommand("Copy")) {
- document.execCommand("Copy");
- }
- document.body.removeChild(inputEle);
- },
- /**
- * 打开Forge链接
- */
- openShareUrl() {
- window.open(this.shareUrl, this.shareForgeName);
- },
- /**
- * 下载文件
- * item:文件对象
- */
- downLoadMyFile: function(item) {
- if (item.alias != null) {
- var url = process.env.API_HOST + "archives/download/" + item.archID;
- var iframe = document.createElement("iframe");
- iframe.style.display = "none";
- iframe.src = url;
- document.body.appendChild(iframe);
- }
- },
- /**
- * 客户端打开协作文件本地文件夹
- */
- openNativeFolder(file) {
- var folderName = this.listUserFolders[this.nowFolderIndex].folderName;
- var filename = file.archName + "." + file.extension;
- back.openCollFolder(sessionStorage.projName, folderName, filename);
- },
- sayHello: function(file) {
- this.$notify({
- title: "温馨提示",
- message: "功能待研发,敬请期待...",
- type: "info",
- offset: 100,
- duration: 2500
- });
- },
- /**
- * 查看历史文件
- */
- openMilstoneFile(file) {
- if (this.isClient) {
- var archid = file.archID;
- var filename = file.archName + "." + file.extension;
- var folderID = file.folderID;
- var type = "open";
- back.openFile(archid, filename, folderID, type);
- } else {
- this.openOffice(file);
- }
- },
- /**
- * 点击文件事件:直接打开文件
- */
- fileClick: function(file) {
- if (file.downloadStatus == 1) {
- return;
- }
- if (this.isClient) {
- if (file.extension == "map") {
- this.instanceType = 1;
- this.showApp = true;
- this.mapAddress = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "svfzip") {
- window.open(file.showUrl, file.archName);
- // this.showApp = true;
- // this.instanceType = 2;
- // this.forgeShowUrl = file.showUrl;
- // this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "supermap") {
- this.instanceType = 3;
- this.showApp = true;
- this.gisShowUrl = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else {
- var archid = file.archID;
- var filename = file.archName + "." + file.extension;
- if (file.version > 1) {
- filename = file.archName + file.version + "." + file.extension;
- }
- var folderID = file.folderID;
- var type = "open";
- var thisApp = this;
- // 文件为已完成时,标记为更新人
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST + "archives/first/" + file.archID
- )
- })
- .then(function(response) {
- file = response.data;
- if (file.status != 1) {
- file.status = 1; // 设置为编辑中
- file.modifyUserID = sessionStorage.userId;
- thisApp
- .$axios({
- method: "put",
- url: encodeURI(
- process.env.API_HOST + "archives/update/status"
- ),
- data: file
- })
- .then(function(response) {
- if (response.data.state == 1) {
- back.openFile(archid, filename, folderID, type);
- thisApp.refreshPages();
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "info",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- } else {
- if (sessionStorage.userId == file.modifyUserID) {
- back.openFile(archid, filename, folderID, type);
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: "文件正在工作编辑中,请耐心等待",
- type: "warning",
- offset: 30,
- duration: 5000
- });
- thisApp.refreshPages();
- }
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- }
- } else {
- if (
- file.extension == "png" ||
- file.extension == "jpg" ||
- file.extension == "bmp" ||
- file.extension == "gif" ||
- file.extension == "jpeg"
- ) {
- this.showImage = true;
- this.imageUrl = this.imgSrc + file.alias;
- } else if (file.extension == "map") {
- this.instanceType = 1;
- this.showApp = true;
- this.mapAddress = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "svfzip") {
- this.showApp = true;
- this.instanceType = 2;
- this.forgeShowUrl = file.showUrl;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "supermap") {
- this.instanceType = 3;
- this.showApp = true;
- this.gisShowUrl = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else {
- this.openOffice(file);
- }
- }
- this.listCollaborationFiles();
- },
- /**
- * 应用查看窗体关闭事件
- */
- closeApp() {
- this.showApp = false;
- this.instanceType = 4;
- },
- /**
- * 点击文件事件:打开文件并选择打开方式
- */
- fileClickSelect: function(file) {
- if (file.downloadStatus == 1) {
- return;
- }
- if (this.isClient) {
- if (file.extension == "map") {
- this.instanceType = 1;
- this.showApp = true;
- this.mapAddress = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "svfzip") {
- window.open(file.showUrl, file.archName);
- } else if (file.extension == "supermap") {
- this.instanceType = 3;
- this.showApp = true;
- this.gisShowUrl = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else {
- var archid = file.archID;
- var filename = file.archName + "." + file.extension;
- if (file.version > 1) {
- filename = file.archName + file.version + "." + file.extension;
- }
- var folderID = file.folderID;
- var type = "openselect";
- var thisApp = this;
- // 文件为已完成时,标记为更新人
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST + "archives/first/" + file.archID
- )
- })
- .then(function(response) {
- file = response.data;
- if (file.status != 1) {
- file.status = 1; // 设置为编辑中
- file.modifyUserID = sessionStorage.userId;
- thisApp
- .$axios({
- method: "put",
- url: encodeURI(
- process.env.API_HOST + "archives/update/status"
- ),
- data: file
- })
- .then(function(response) {
- if (response.data.state == 1) {
- back.openFile(archid, filename, folderID, type);
- thisApp.refreshPages();
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "info",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- } else {
- if (sessionStorage.userId == file.modifyUserID) {
- back.openFile(archid, filename, folderID, type);
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: "文件正在工作编辑中,请耐心等待",
- type: "warning",
- offset: 30,
- duration: 5000
- });
- thisApp.refreshPages();
- }
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- }
- }
- this.$axios({
- method: "delete",
- url: encodeURI(
- process.env.API_HOST +
- "notices/noticeuser/" +
- file.archID +
- "/" +
- sessionStorage.userId
- )
- });
- },
- /**
- * 协作文件点击文件事件:直接打开文件
- */
- fileClickColl: function(file) {
- if (file.downloadStatus == 1) {
- return;
- }
- if (this.isClient) {
- if (file.status == 1 || file.status == 0) {
- this.$confirm("对方正在工作中,请稍后查看", "", {
- confirmButtonText: "确定",
- showClose: false,
- showCancelButton: false,
- type: "warning",
- center: true
- })
- .then(() => {})
- .catch(error => {});
- } else {
- if (file.extension == "map") {
- this.instanceType = 1;
- this.showApp = true;
- this.mapAddress = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "svfzip") {
- this.showApp = true;
- this.instanceType = 2;
- this.forgeShowUrl = file.showUrl;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "supermap") {
- this.instanceType = 3;
- this.showApp = true;
- this.gisShowUrl = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (
- file.extension == "png" ||
- file.extension == "jpg" ||
- file.extension == "bmp" ||
- file.extension == "gif" ||
- file.extension == "jpeg"
- ) {
- this.showImage = true;
- this.imageUrl = this.imgSrc + file.alias;
- } else {
- // 客户端打开文件
- var archid = file.archID;
- var filename = file.archName + "." + file.extension;
- var folderID = file.folderID;
- var folderName = this.listUserFolders[this.nowFolderIndex]
- .folderName;
- var projID = file.projID;
- var type = "open";
- back.openFile(
- archid,
- filename,
- folderID,
- type,
- sessionStorage.projName,
- folderName
- );
- }
- }
- } else {
- if (file.status == 1 || file.status == 0) {
- this.$notify({
- title: "温馨提示",
- message: "对方正在工作中,请耐心等待",
- type: "warning",
- offset: 30,
- duration: 5000
- });
- return;
- }
- this.openOffice(file);
- }
- this.listCollaborationFiles();
- },
- /**
- * 协作文件点击文件事件:打开文件并选择打开方式
- */
- fileClickSelectColl: function(file) {
- if (file.downloadStatus == 1) {
- return;
- }
- if (this.isClient) {
- if (file.status == 1 || file.status == 0) {
- this.$confirm("对方正在工作中,请稍后查看", "", {
- confirmButtonText: "确定",
- showClose: false,
- showCancelButton: false,
- type: "warning",
- center: true
- })
- .then(() => {})
- .catch(error => {});
- } else {
- if (file.extension == "map") {
- this.instanceType = 1;
- this.showApp = true;
- this.mapAddress = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "svfzip") {
- window.open(file.showUrl, file.archName);
- // this.showApp = true;
- // this.instanceType = 2;
- // this.forgeShowUrl = file.showUrl;
- // this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "supermap") {
- this.instanceType = 3;
- this.showApp = true;
- this.gisShowUrl = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (
- file.extension == "png" ||
- file.extension == "jpg" ||
- file.extension == "bmp" ||
- file.extension == "gif" ||
- file.extension == "jpeg"
- ) {
- this.showImage = true;
- this.imageUrl = this.imgSrc + file.alias;
- } else {
- // 客户端打开文件
- var archid = file.archID;
- var filename = file.archName + "." + file.extension;
- var folderID = file.folderID;
- var folderName = this.listUserFolders[this.nowFolderIndex]
- .folderName;
- var projID = file.projID;
- var type = "openselect";
- back.openFile(
- archid,
- filename,
- folderID,
- type,
- sessionStorage.projName,
- folderName
- );
- }
- }
- }
- this.$axios({
- method: "delete",
- url: encodeURI(
- process.env.API_HOST +
- "notices/noticeuser/" +
- file.archID +
- "/" +
- sessionStorage.userId
- )
- });
- },
- /**
- * 打开Office文件
- */
- openOffice: function(file) {
- this.officeTitle = file.archName + "." + file.extension;
- if (file.extension == "pdf") {
- this.showOffice = true;
- this.officeUrl = process.env.OFFICE_WEB + "?furl=" + file.alias;
- this.$axios({
- method: "delete",
- url: encodeURI(
- process.env.API_HOST +
- "notices/noticeuser/" +
- file.archID +
- "/" +
- sessionStorage.userId
- )
- });
- } else if (
- file.extension == "xls" ||
- file.extension == "xlsx" ||
- file.extension == "doc" ||
- file.extension == "docx" ||
- file.extension == "ppt" ||
- file.extension == "pptx" ||
- file.extension == "txt"
- ) {
- this.$axios({
- method: "delete",
- url: encodeURI(
- process.env.API_HOST +
- "notices/noticeuser/" +
- file.archID +
- "/" +
- sessionStorage.userId
- )
- });
- this.showOffice = true;
- this.officeUrl = process.env.OFFICE_WEB + "?furl=" + file.alias;
- } else if (file.extension == "map") {
- this.instanceType = 1;
- this.showApp = true;
- this.mapAddress = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "svfzip") {
- this.showApp = true;
- this.instanceType = 2;
- this.forgeShowUrl = file.showUrl;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (file.extension == "supermap") {
- this.instanceType = 3;
- this.showApp = true;
- this.gisShowUrl = file.alias;
- this.appInstanceTitle = "应用查看-" + file.archName;
- } else if (
- file.extension == "png" ||
- file.extension == "jpg" ||
- file.extension == "bmp" ||
- file.extension == "gif" ||
- file.extension == "jpeg"
- ) {
- this.showImage = true;
- this.imageUrl = this.imgSrc + file.alias;
- } else {
- var text = "暂不支持" + file.extension + "类型文件查看,请在客户端打开";
- this.$notify({
- title: "温馨提示",
- message: text,
- type: "info",
- offset: 100,
- duration: 5000
- });
- this.$axios({
- method: "delete",
- url: encodeURI(
- process.env.API_HOST +
- "notices/noticeuser/" +
- file.archID +
- "/" +
- sessionStorage.userId
- )
- });
- }
- },
- /**
- * 客户端下载方法
- * type :1 为文件,2位协作文件
- */
- clientDownLoad: function(file, type) {
- var thisApp = this;
- if (this.isClient) {
- this.$axios({
- method: "put",
- url: encodeURI(
- process.env.API_HOST +
- "projects/download/" +
- file.archID +
- "/" +
- sessionStorage.userId +
- "/" +
- type
- )
- })
- .then(response => {
- if (response.data.state == 1) {
- file.downloadStatus = 1;
- file.isDownload = true;
- var archid = file.archID;
- var alias = file.alias;
- var filename = file.archName + "." + file.extension;
- if (file.version > 1) {
- filename = file.archName + file.version + "." + file.extension;
- }
- var folderID = file.folderID;
- var folderName =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderName;
- var projID = file.projID;
- if (type == 1) {
- back.downloadFile(archid, filename, folderID,sessionStorage.userId,sessionStorage.companyId,alias);
- } else {
- var folderName =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderName;
- back.downloadFile(
- archid,
- filename,
- folderID,
- sessionStorage.userId,
- sessionStorage.companyId,
- alias,
- sessionStorage.projName,
- folderName,
- sessionStorage.projId
- );
- }
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 30,
- duration: 2000
- });
- }
- })
- .catch(error => {
- this.$notify({
- title: "温馨提示",
- message: "下载失败",
- type: "error",
- offset: 30,
- duration: 2000
- });
- });
- }
- },
- /**
- * 客户端上传文件
- */
- clientUpload() {
- if (this.isClient) {
- this.isShowNewFiledialog = false;
- var foldergroupId="";
- if(this.dbClickSelectedFolderGroupData != null && JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}")
- {
- foldergroupId = this.dbClickSelectedFolderGroupData.folderGroupID;
- }
- back.uploadFile(
- this.listUserFolders[this.nowFolderIndex].folderID,
- sessionStorage.userId,
- foldergroupId
- );
- }
- },
- /**
- * 重命名我的文件
- * file:源数据
- */
- reNameyMyFile: function(file) {
- var thisApp = this;
- this.$prompt("当前文件名称: " + file.archName, "重命名", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- inputPattern: /\S/,
- closeOnClickModal: false,
- inputErrorMessage: "名称不能为空"
- })
- .then(({ value }) => {
- file.archName = value;
- file.createTime = new Date(file.createTime);
- file.modifyTime = new Date(file.modifyTime);
- this.$axios({
- method: "put",
- url: encodeURI(process.env.API_HOST + "archives/update/name"),
- data: file
- })
- .then(function(response) {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: "重命名成功",
- type: "success",
- offset: 100,
- duration: 2500
- });
- if (thisApp.isClient) {
- var newFileName = file.archName + "." + file.extension;
- // 客户端重命名文件
- // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID
- back.renameFile(
- file.archID,
- newFileName,
- sessionStorage.userId
- );
- }
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- })
- .catch(() => {
- thisApp.$notify.info({
- title: "温馨提示",
- message: "操作已取消",
- offset: 100,
- duration: 2500
- });
- });
- },
- /**
- * 删除我的文件
- * file:源数据
- */
- delMyFile: function(file) {
- var thisApp = this;
- if (file.createUserID != sessionStorage.userId) {
- thisApp.$notify({
- title: "操作提示",
- message: "不能删除他人文件",
- type: "info",
- offset: 100,
- duration: 2500
- });
- return;
- }
- this.$confirm("您正在删除文件【" + file.archName + "】,是否继续?", "", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- showClose: false,
- type: "warning"
- }).then(() => {
- file.deleted = 1;
- file.createTime = new Date(file.createTime);
- file.modifyTime = new Date(file.modifyTime);
- file.modifyUserID = sessionStorage.userId;
- this.$axios({
- method: "put",
- url: encodeURI(process.env.API_HOST + "archives/update/del"),
- data: file
- })
- .then(function(response) {
- thisApp.$notify({
- title: "恭喜您",
- message: response.data.message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.refreshPages();
- })
- .catch(function(error) {
- console.log(error);
- });
- });
- },
- /**
- * 获取全部的Dept数据
- */
- listDeptUsers: function() {
- var companyId = sessionStorage.companyId;
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(process.env.API_HOST + "sysinfo/deptusers/" + companyId)
- })
- .then(response => {
- thisApp.listDept = response.data.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 打开项目设置窗体
- */
- projectEdit: function() {
- this.closeAppManagePain();
- this.isShowProjSetting = true;
- this.isEditProjFolder = false;
- },
- projectFoldeEdit() {
- this.closeAppManagePain();
- this.isShowProjSetting = true;
- this.isEditProjFolder = true;
- },
- /**
- * 工作指派
- */
- EditStaffAndTip: function() {
- this.closeAppManagePain();
- this.isShowEditStaff = true;
- },
- /**
- * 交换工作设置
- */
- FileShareSet: function() {
- this.isShowProManager = 5;
- },
- /**
- * 加载云应用列表
- */
- loadlistApp: function() {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST + "apps/company/" + sessionStorage.companyId
- )
- })
- .then(response => {
- thisApp.listApp = response.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 加载当前工作文件夹启用的应用
- */
- loadlistFolderApp: function() {
- var thisApp = this;
- var folderId = this.listUserFolders[this.nowFolderIndex].folderID;
- this.$axios({
- method: "get",
- url: encodeURI(process.env.API_HOST + "apps/" + folderId)
- })
- .then(response => {
- thisApp.listFolderApp = response.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 创建云应用实例
- */
- createAppInstance: function(app) {
- // 1.地图 2.Forge 3.超图
- this.newAppInstance.appID = app.appID;
- this.dialogNewAppInstanceVisible = true;
- this.createAppInstanceTitle = "创建云应用-" + app.appName + "实例";
- if (app.appType == 1) {
- // forge
- this.uploadExtention = "*";
- this.dialogNewMapVisible = true;
- return;
- } else if (app.appType == 2) {
- this.uploadExtention = "*";
- } else {
- this.dialogNewSuperMapVisible = true;
- }
- },
- /**
- * 保存应用实例数据
- */
- createAppInstanceSure: function() {
- var thisApp = this;
- // 验证数据
- if (this.newAppInstance.showName == "") {
- this.$notify({
- title: "温馨提示",
- message: "请输入实例名称",
- type: "warning",
- offset: 30,
- duration: 5000
- });
- return;
- }
- this.newAppInstance.folderID = this.listUserFolders[
- this.nowFolderIndex
- ].folderID;
- this.newAppInstance.createUserID = sessionStorage.userId;
- this.$axios({
- method: "post",
- url: encodeURI(process.env.API_HOST + "apps/instance"),
- data: this.newAppInstance
- })
- .then(response => {
- if (response.data.state === 1) {
- this.$notify({
- title: "恭喜您",
- message: response.data.message,
- type: "success",
- offset: 30,
- duration: 2500
- });
- this.dialogNewAppInstanceVisible = false;
- this.isShowNewFiledialog = false;
- thisApp.newAppInstance = {
- appID: "",
- folderID: "",
- showName: "",
- description: "",
- fileName: "",
- alias: "",
- createUserID: ""
- };
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 30,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 创建地图应用文件
- */
- createMapSure() {
- var thisApp = this;
- var openFolderId =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
- if (openFolderId !== null) {
- // 文件上传成功时,保存文件数据到DB
- this.$axios({
- method: "post",
- url: encodeURI(process.env.API_HOST + "archives"),
- data: {
- folderId: openFolderId,
- filePath: thisApp.newMap.description,
- fileName: thisApp.newMap.showName + ".map",
- fileSize: 0,
- userId: sessionStorage.userId
- }
- })
- .then(response => {
- thisApp.dialogNewMapVisible = false;
- thisApp.newMap.showName = "";
- thisApp.newMap.description = "";
- if (response.data.state == 1) {
- thisApp.refreshPages();
- this.$notify({
- title: "恭喜您",
- message: "地图应用创建成功!",
- type: "success",
- offset: 100,
- duration: 2500
- });
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- this.$notify({
- title: "温馨提示",
- message: "文件上传失败!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- });
- } else {
- this.$notify({
- title: "温馨提示",
- message: "创建失败!当前目录不允许新建应用",
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- },
- createSuperMapSure() {
- var thisApp = this;
- var openFolderId =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
- if (openFolderId !== null) {
- // 文件上传成功时,保存文件数据到DB
- this.$axios({
- method: "post",
- url: encodeURI(process.env.API_HOST + "archives"),
- data: {
- folderId: openFolderId,
- filePath: thisApp.newSuperMap.description,
- fileName: thisApp.newSuperMap.showName + ".supermap",
- fileSize: 0,
- userId: sessionStorage.userId
- }
- })
- .then(response => {
- thisApp.dialogNewSuperMapVisible = false;
- thisApp.newSuperMap.showName = "";
- thisApp.newSuperMap.description = "";
- if (response.data.state == 1) {
- thisApp.refreshPages();
- this.$notify({
- title: "恭喜您",
- message: "地图应用创建成功!",
- type: "success",
- offset: 100,
- duration: 2500
- });
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- this.$notify({
- title: "温馨提示",
- message: "文件上传失败!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- });
- } else {
- this.$notify({
- title: "温馨提示",
- message: "创建失败!当前目录不允许新建应用",
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- },
- /**
- * 上传文件成功时触发
- */
- uploadAppFileSuccess: function(file) {
- this.newAppInstance.alias = file.filePath;
- this.newAppInstance.fileName = file.fileName;
- this.$notify({
- title: "温馨提示",
- message: "恭喜您,实例文件上传成功!",
- type: "success",
- offset: 30,
- duration: 2000
- });
- },
- /**
- * 加载我的应用实例数据
- */
- loadMyAppInstanceList: function() {
- var thisApp = this;
- var folderId = this.listUserFolders[this.nowFolderIndex].folderID;
- this.$axios({
- method: "get",
- url: encodeURI(process.env.API_HOST + "apps/instances/" + folderId)
- })
- .then(response => {
- thisApp.myAppInstanceList = response.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 更新工作文件夹应用状态
- */
- changeFolderApp: function() {
- var status = 0;
- if (!this.appState) {
- // 启用
- status = 1;
- }
- var folderId = this.listUserFolders[this.nowFolderIndex].folderID;
- var param = {
- folderID: folderId,
- appID: this.currentApp.appID,
- status: status,
- createUserID: sessionStorage.userId,
- modifyUserID: sessionStorage.userId
- };
- this.$axios({
- method: "put",
- url: encodeURI(process.env.API_HOST + "apps/folderapp"),
- data: param
- })
- .then(response => {
- if (response.data.state == 1) {
- this.$notify({
- title: "恭喜您",
- message: "操作成功!",
- type: "success",
- offset: 100,
- duration: 2500
- });
- } else {
- this.$notify({
- title: "温馨提示",
- message: "操作失败!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- this.$notify({
- title: "温馨提示",
- message: "操作失败!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- });
- },
- /**
- * 添加文件到公共文件夹
- */
- updateToPublicFile: function(file, state) {
- var thisApp = this;
- if (state == 0) {
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives/common/" +
- file.archID +
- "/" +
- sessionStorage.comFolderId +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: response.data.message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.loadListCommonFiles();
- thisApp.refreshPages();
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- } else {
- this.$axios({
- method: "delete",
- url: encodeURI(
- process.env.API_HOST +
- "archives/common/" +
- file.archID +
- "/" +
- sessionStorage.comFolderId +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: response.data.message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.loadListCommonFiles();
- thisApp.refreshPages();
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- }
- },
- /**
- * 设置历史文件界面
- */
- showFileMilestone: function(file) {
- if (file.status == 1 && file.modifyUserID != sessionStorage.userId) {
- this.$notify({
- title: "温馨提示",
- message: "其他人编辑中,不能设置历史文件",
- type: "warning",
- offset: 100,
- duration: 5000
- });
- return;
- }
-
- this.dialogFileHistory = true;
- this.loadFileMilestones(file);
- this.currentArchID = file.archID;
- },
- /**
- * 当前版本点击事件
- */
- currMilestoneChange: function() {
- if (this.currentMilestone.check) {
- this.currentMileArchID = this.currentMilestone.archID;
- this.listMilestones.forEach(milestone => {
- milestone.check = false;
- });
- }
- },
- /**
- * 其它版本点击事件
- */
- milestoneChange: function(milestone) {
- if (milestone.check) {
- this.currentMileArchID = milestone.archID;
- this.setOtherDisSelecte(milestone.archID);
- }
- },
- /**
- * 设置其它选择状态
- */
- setOtherDisSelecte: function(archid) {
- this.listMilestones.forEach(milestone => {
- if (milestone.archID != archid) {
- milestone.check = false;
- }
- });
- this.currentMilestone.check = false;
- },
- /**
- * 保存历史文件
- */
- createMilestone: function(file) {
- if (this.isCreating) {
- return;
- }
- if (file.status == 1 && file.modifyUserID != sessionStorage.userId) {
- this.$notify({
- title: "温馨提示",
- message: "其他人编辑中,不能设置历史文件",
- type: "warning",
- offset: 100,
- duration: 5000
- });
- return;
- }
- this.isCreating = true;
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives/milestone/" +
- file.archID +
- "/" +
- sessionStorage.userId +
- "/" +
- this.dbClickSelectedFolderGroupData.folderGroupID
- ),
- data:{
- archid: file.archID,
- userid: sessionStorage.userId,
- foldergroupid: this.dbClickSelectedFolderGroupData.folderGroupID
- }
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.refreshPages();
- this.$notify({
- title: "恭喜您",
- message: response.data.message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.isCreating = false;
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 获取历史文件记录
- */
- loadFileMilestones: function(file) {
- var thisApp = this;
- thisApp.currentMilestone = "";
- thisApp.listMilestones = [];
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST + "archives/milestone/" + file.archID
- )
- })
- .then(response => {
- if (response.data.state == 1) {
- if (response.data.data != null && response.data.data.length > 0) {
- response.data.data.forEach(milestone => {
- if (milestone.archID == file.archID) {
- milestone.check = true;
- thisApp.currentMilestone = milestone;
- thisApp.currentMileArchID = milestone.archID;
- } else {
- milestone.check = false;
- thisApp.listMilestones.push(milestone);
- }
- });
- }
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 设置历史文件
- */
- setMilestones: function() {
- if (this.currentMileArchID == this.currentMilestone.archID) {
- this.dialogFileHistory = false;
- return;
- }
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives/milestone/set/" +
- this.currentArchID +
- "/" +
- this.currentMileArchID +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- if (response.data.state == 1) {
- this.$notify({
- title: "恭喜您",
- message: response.data.message,
- type: "success",
- offset: 100,
- duration: 5000
- });
- thisApp.dialogFileHistory = false;
- thisApp.refreshPages();
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 右键复制文件
- */
- copyFile: function(file) {
- var thisApp = this;
- thisApp.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives/copydup/" +
- file.archID +
- "/" +
- sessionStorage.userId +
- "/" +
- thisApp.dbClickSelectedFolderGroupData.folderGroupID
- ),
- data: {
- archid: file.archID,
- userid: sessionStorage.userId,
- foldergroupid: thisApp.dbClickSelectedFolderGroupData.folderGroupID
- }
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: "复制文件成功",
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.goFolder(thisApp.nowFolderIndex);
- var nowFile = response.data.data;
- var newFileName = nowFile.archName + "." + nowFile.extension;
- if (thisApp.isClient) {
- // 客户复制文件
- // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID;4.strFolderId:目的文件夹ID
- back.copyFile(
- file.archID,
- newFileName,
- sessionStorage.userId,
- nowFile.folderID,
- nowFile.archID
- );
- }
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 30,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 右键复制与移动至其它文件夹
- */
- copyAndMoveFolder: function(file, classif) {
- if (classif == "copy") {
- this.dialogTtile = "复制到其它文件夹";
- } else if (classif == "move") {
- this.dialogTtile = "移动到其它文件夹";
- }
- this.BtnRightFile = file;
- this.classif = classif;
- this.strFileOrFoldergroup = "file"; //zxm+
- this.dialogCopyAndMove = true;
- },
- /**
- * 右键复制与移动至其它文件夹的具体实现
- */
- copyAndMoveToOtherFile: function() {
- var thisApp = this;
- if (
- thisApp.dialogSelectedFolder == thisApp.BtnRightFile.folderID ||
- thisApp.dialogSelectedFolder == thisApp.btnRightFoldergoup.folderID
- ) {
- thisApp.$notify({
- title: "温馨提示",
- message: "当前工作已存在,请选择其他工作",
- type: "success",
- offset: 100,
- duration: 2500
- });
- return;
- }
- //移至/复制 文件操作
- if (thisApp.strFileOrFoldergroup == "file") {
- var file = thisApp.BtnRightFile;
- var url = "";
- if (thisApp.classif == "copy") {
- url = encodeURI(
- process.env.API_HOST +
- "archives/copy/" +
- thisApp.dialogSelectedFolder +
- "/" +
- file.archID +
- "/" +
- sessionStorage.userId
- );
- } else {
- url = encodeURI(
- process.env.API_HOST +
- "archives/move/" +
- thisApp.dialogSelectedFolder +
- "/" +
- file.archID +
- "/" +
- sessionStorage.userId
- );
- }
- thisApp
- .$axios({
- method: "get",
- url: url,
- data: {
- archid: file.archID,
- folderid: thisApp.dialogSelectedFolder,
- userid: sessionStorage.userId
- }
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: "操作成功",
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.dialogCopyAndMove = false;
- thisApp.refreshPages();
- var nowFile = response.data.data;
- var newFileName = nowFile.archName + "." + nowFile.extension;
- if (thisApp.isClient) {
- var file = response.data.data;
- if (thisApp.classif == "copy") {
- // 客户复制文件
- // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID;4.strFolderId:目的文件夹ID;5:strNewFileID:新文件ID
- back.copyFile(
- thisApp.BtnRightFile.archID,
- newFileName,
- sessionStorage.userId,
- nowFile.folderID,
- nowFile.archID
- );
- } else {
- // 客户端移动文件
- // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID;4.strFolderId:目的文件夹ID
- back.moveFile(
- nowFile.archID,
- newFileName,
- sessionStorage.userId,
- nowFile.folderID
- );
- }
- }
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 30,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- }
- //移至/复制 文件分组操作 zxm+
- if (thisApp.strFileOrFoldergroup == "foldergroup") {
- this.copyOrMoveFoldergroupFun();
- }
- },
- /**
- * 打开应用
- */
- openApp: function(appinstance) {
- this.showApp = true;
- this.appInstanceTitle = "查看应用实例-" + appinstance.showName;
- this.instanceType = appinstance.appType;
- this.currentAppInstance = appinstance;
- },
- /**
- * 分配人员
- */
- addUser: function(index) {
- this.selectedUser = this.listNewFolder[parseInt(index)].listUser;
- //左侧选中状态根据右侧人员状态改变
- this.enterIsCheck();
- this.isAloneDistWorkPeople = true;
- this.isAloneDistWork = false;
- },
- /**
- * 保存项目信息
- */
- saveProject: function() {
- this.$axios({
- method: "put",
- url: encodeURI(process.env.API_HOST + "projects"),
- data: {
- projectData: this.nowProject,
- listFolder: this.listNewFolder,
- listProjProp: this.listProjProp,
- userId: sessionStorage.userId
- }
- })
- .then(response => {
- if (response.data.state === 1) {
- this.$notify({
- title: "恭喜您",
- message: response.data.message,
- type: "success",
- offset: 30,
- duration: 2500
- });
- this.isShowProjSetting = false;
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 30,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /*
- * 关闭分配工作弹框
- */
- offProjSetDialog: function() {
- this.isShowProjSetting = false;
- this.isAloneDistWorkPeople = false;
- this.isAloneDistWork = true;
- this.isProjectviewbtn = false;
- this.listNewFolder = [];
- this.listFiles = [];
- this.emptyValue = "";
- },
- /*
- *编辑自定义工作
- */
- eidtTitle: function() {
- this.showTitle = 2;
- },
- /*
- *保存自定义工作
- */
- saveTitle: function() {
- this.showTitle = 1;
- },
- /*
- *删除分配工作的自定义工作
- */
- deleTitle: function(index) {
- this.$confirm("此操作将删除该文件夹, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.$notify({
- title: "恭喜您",
- message: "删除成功!",
- type: "success",
- offset: 30,
- duration: 2500
- });
- this.listNewFolder.splice(index, 1);
- })
- .catch(() => {});
- },
- /*
- *删除分配工作中被选中的人员
- */
- deleteDistWorkUser: function(index, checkIndex) {
- this.listNewFolder[index].listUser.splice(checkIndex, 1);
- },
- /**
- * 添加自定义工作-分配工作时
- */
- addNewFolderWork: function() {
- this.newfolder = {
- folderName: "自定义工作" + this.newFolderIndex,
- default: false,
- listUser: []
- };
- this.listNewFolder.push(this.newfolder);
- this.newFolderIndex = this.newFolderIndex + 1;
- this.newFolderLength = this.listNewFolder.length + 1;
- },
- /*
- *返回单独分配工作页面
- */
- backProjSet: function() {
- this.cancelCheck();
- this.isProjectview = false;
- this.isAloneDistWorkPeople = false;
- this.isAloneDistWork = true;
- this.isEditProjectviewBtn = false;
- this.isProjectviewbtn = false;
- this.isShowProInfo = true;
- },
- /**
- * 查看下一个文件夹文件
- */
- nextFolder: function() {
- this.isShowRightManager = false;
- if (this.nowFolderIndex < this.listUserFolders.length - 1) {
- this.nowFolderIndex = this.nowFolderIndex + 1;
- this.nowFolder = this.listUserFolders[this.nowFolderIndex];
- this.dbClickSelectedFolderGroupData = {}; //zxm+ 点击工作链节点时 清空双击的文件分组对象
- this.folderGroupBreads = []; //zxm+ 点击工作链节点时 清空面包屑
- this.isShowWorkt = true; //zxm+ 点击工作链节点时 显示我的文件和工作文件
- this.isShowBread = false; //zxm+ 点击工作链节点时 隐藏面包屑
- this.listFiles();
- } else {
- this.$notify({
- title: "温馨提示",
- message: "不能再向后了!",
- type: "success",
- offset: 30,
- duration: 2500
- });
- }
- },
- /**
- * 当前工作点击
- */
- nowFolderClick(index) {
- this.isShowRightManager = false;
- this.nowFolderIndex = index;
- sessionStorage.nowFolderIndex = index;
- this.nowFolder = this.listUserFolders[this.nowFolderIndex];
- this.dbClickSelectedFolderGroupData = {}; //zxm+ 点击工作链节点时 清空双击的文件分组对象
- this.folderGroupBreads = []; //zxm+ 点击工作链节点时 清空面包屑
- this.isShowWorkt = true; //zxm+ 点击工作链节点时 显示我的文件和工作文件
- this.isShowBread = false; //zxm+ 点击工作链节点时 隐藏面包屑
- clearInterval(this.timer);
- this.listFiles();
- this.timer = setInterval(() => {
- this.listFiles();
- }, 3 * 1000);
- },
- /**
- * 查看上一个文件夹文件
- */
- previousFolder: function() {
- this.isShowRightManager = false;
- if (this.nowFolderIndex > 0) {
- this.nowFolderIndex = this.nowFolderIndex - 1;
- this.nowFolder = this.listUserFolders[this.nowFolderIndex];
- sessionStorage.nowFolderIndex = this.nowFolderIndex;
- this.dbClickSelectedFolderGroupData = {}; //zxm+ 点击工作链节点时 清空双击的文件分组对象
- this.folderGroupBreads = []; //zxm+ 点击工作链节点时 清空面包屑
- this.isShowWorkt = true; //zxm+ 点击工作链节点时 显示我的文件和工作文件
- this.isShowBread = false; //zxm+ 点击工作链节点时 隐藏面包屑
- clearInterval(this.timer);
- this.listFiles();
- this.timer = setInterval(() => {
- this.listFiles();
- }, 3 * 1000);
- } else {
- this.$notify({
- title: "温馨提示",
- message: "不能再向前了",
- type: "success",
- offset: 30,
- duration: 2500
- });
- }
- },
- /**
- * 跳转到当前工作
- */
- goFolder: function(index) {
- this.nowFolderIndex = index;
- this.nowFolder = this.listUserFolders[this.nowFolderIndex];
- this.refreshPages();
- this.closeAppManagePain();
- sessionStorage.nowFolderIndex = index;
- },
- /**
- * 工作链页面点击
- */
- goFolderAndBack(index) {
- this.goFolder(index);
- this.hideWorklinkPage();
- },
- /**
- * 查询文件
- */
- onSearch: function() {
- var thisApp = this;
- this.isShowMyAppInstanceList = false;
- if (thisApp.searchArchName == "") {
- this.listFiles();
- } else {
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "archives" +
- "/" +
- thisApp.nowFolderId +
- "/search/" +
- thisApp.searchArchName
- )
- })
- .then(response => {
- thisApp.myFilesList = response.data;
- })
- .catch(error => {
- console.log(error);
- });
- }
- },
- /**
- * 导入Forge
- */
- importForge: function() {
- this.$router.push({
- name: "forgeview",
- params: {
- modelPath: "http://123.57.83.204:8000/3d/yey/index.html"
- }
- });
- },
- /**
- * @description: 滚动条
- * @return:
- */
- onscroll: function() {
- if (this.$route.name == "workspace") {
- var topScroll = document.body.scrollTop; //滚动的距离,距离顶部的距离
- var bignav = document.getElementById("bignav"); //获取到导航栏id
- if (topScroll > 350) {
- //当滚动距离大于250px时执行下面的东西
- bignav.style.position = "fixed";
- bignav.style.top = "120px";
- bignav.style.zIndex = "9999";
- } else {
- //当滚动距离小于250的时候执行下面的内容,也就是让导航栏恢复原状
- bignav.style.position = "static";
- }
- }
- },
- /**
- * 跳转到云应用
- */
- toManagerCloudApp: function() {
- this.isShowProManager = 2;
- this.loadlistApp();
- },
- /**
- * @description: 返回
- * @return:
- */
- backProManager: function() {
- this.isShowProManager = 1;
- },
- /**
- * @description: 查看应用
- * @return:
- */
- toAppInfomation: function(app) {
- this.isShowProManager = 3;
- this.currentApp = app;
- var thisApp = this;
- var param = {
- folderid: thisApp.listUserFolders[thisApp.nowFolderIndex].folderID,
- appid: app.appID
- };
- // 获取文件夹应用状态信息
- this.$axios({
- method: "get",
- url: encodeURI(process.env.API_HOST + "apps/folderapp"),
- params: param
- }).then(response => {
- if (response.data.state == 1) {
- if (response.data.data.status == 0) {
- thisApp.appState = true;
- } else {
- thisApp.appState = false;
- }
- } else {
- thisApp.appState = false;
- }
- });
- },
- /**
- * @description: 返回
- * @return:
- */
- backManagerCloudApp: function() {
- this.isShowProManager = 2;
- },
- /**
- * 编辑项目概况
- */
- EidtProjectInfo: function() {
- this.isProjectviewbtn = true;
- this.isEditProjectviewBtn = false;
- this.isShowProInfo = false;
- },
- /**
- * 保存项目概况
- */
- saveProjectInfo: function() {
- this.isProjectviewbtn = false;
- this.isShowProInfo = true;
- this.isEditProjectviewBtn = true;
- },
- /*
- *隐藏新建项目弹框,显示底部弹框
- */
- showzhankai: function() {
- this.isBottomNewProj = true;
- this.isNewProj = false;
- },
- /**
- * 新建项目窗口展现
- */
- showContinueNewProj: function() {
- this.isNewProj = true;
- this.isBottomNewProj = false;
- },
- /*
- * 关闭新建项目弹框
- */
- offDialog: function() {
- this.isNewProj = false;
- this.isBottomNewProj = true;
- },
- /**
- * 新建文件夹显示
- */
- showContinueNewFolder: function() {
- this.isNewFolder = true;
- this.isBottomNewFolder = false;
- },
- /**
- * 打开文件夹
- * item:要打开的文件夹对象
- */
- openFolder: function(item) {
- if (this.openFolderId != item.objectID) {
- if (item.baseType == 0) {
- this.loadData(item.objectID);
- }
- }
- },
- /**
- * 下载文件
- * item:文件对象
- */
- downLoadFile: function(item) {
- if (item.alias != null) {
- var url = process.env.API_HOST + "archives/download/" + item.objectID;
- var iframe = document.createElement("iframe");
- iframe.style.display = "none";
- iframe.src = url;
- document.body.appendChild(iframe);
- // 删除消息通知
- this.$axios({
- method: "delete",
- url: encodeURI(
- process.env.API_HOST +
- "notices/noticeuser/" +
- item.objectID +
- "/" +
- sessionStorage.userId
- )
- });
- }
- },
- /**
- * 删除文件
- * item:文件对象
- */
- deleteFile: function(item) {
- var thisApp = this;
- this.$confirm("删除文件:" + item.objectName + ", 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- item.modifyUserID = sessionStorage.userId;
- item.deleted = 1;
- this.$axios({
- method: "put",
- url: encodeURI(process.env.API_HOST + "archives"),
- data: item
- })
- .then(response => {
- if (response.data.state == 1) {
- this.$notify({
- title: "恭喜您",
- message: "删除成功!",
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.loadData(item.superID);
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 2500
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- })
- .catch(() => {});
- },
- /**
- * 上传文件
- */
- uploadFile: function() {
- $("#upload_btn").click();
- },
- /**
- * 上传文件之前显示上传组件,以显示上传列表
- */
- uploadBefore() {
- this.showDrag = true;
- },
- /**
- * 文件上传成功时回调
- * @param file:文件上传成功时返回的文件信息对象
- */
- uploadFileSuccess: function(file) {
- this.showDrag = false;
- var thisApp = this;
- var openFolderId =
- thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
- if (openFolderId !== null) {
- var foldergroupId = "";
- if (
- this.dbClickSelectedFolderGroupData != null &&
- JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}"
- ) {
- foldergroupId = this.dbClickSelectedFolderGroupData.folderGroupID;
- }
- // 文件上传成功时,保存文件数据到DB
- this.$axios({
- method: "post",
- url: encodeURI(process.env.API_HOST + "archives"),
- data: {
- folderId: openFolderId,
- filePath: file.filePath,
- fileName: file.fileName,
- fileSize: file.fileSize,
- userId: sessionStorage.userId,
- foldergroupId: foldergroupId
- }
- })
- .then(response => {
- // this.isShowNewFiledialog = false;
- if (response.data.state == 1) {
- //zxm修改 如果直接在工作节点下上传文件走listFiles获取数据,否则在文件分组下上传文件则走intoFoldergroup获取数据
- if (foldergroupId == null || foldergroupId == "") {
- this.listFiles();
- } else {
- this.intoFoldergroup(this.dbClickSelectedFolderGroupData);
- }
- this.isShowNewFiledialog = false;
- this.$notify({
- title: "恭喜您",
- message: "文件上传成功!",
- type: "success",
- offset: 100,
- duration: 2500
- });
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- this.$notify({
- title: "温馨提示",
- message: "文件上传失败!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- });
- } else {
- this.$notify({
- title: "温馨提示",
- message: "文件上传失败!当前目录不允许上传文件",
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- },
- /**
- * @description: 搜索文件
- * @return:
- */
- searchFile: function() {
- this.isShowsearch = !this.isShowsearch;
- },
- /**
- * @description: 搜索文件
- * @return:
- */
- coFileSearch: function() {
- this.isShowCosearch = !this.isShowCosearch;
- },
- /**
- * 创建文件
- */
- createFile: function() {
- this.isShowNewFiledialog = true;
- },
- /**
- * 创建云文件类型改变时触发
- */
- fileCloudClick: function(item) {
- this.currentCloudFile = item;
- this.createType = 1;
- this.createCloudFileTile = "创建 " + item.extension + " 云文件";
- this.dialogNewCloudFileVisible = true;
- this.fileNameBefore =
- sessionStorage.projName + "_" + this.nowFolderName + "_";
- this.fileNameExt = "." + item.extension;
- },
- /**
- * 创建云文件类型改变时触发
- */
- fileTempClick: function(item, index) {
- this.selctedIndex = index;
- this.currentTempFile = item;
- this.createType = 2;
- this.createCloudFileTile = "创建 " + item.extension + " 样板文件";
- this.dialogNewCloudFileVisible = true;
- this.fileNameBefore =
- sessionStorage.projName + "_" + this.nowFolderName + "_";
- this.fileNameExt = "." + item.extension;
- },
- /**
- * 创建文件
- */
- createFileSure: function() {
- var actionUrl = "";
- var fileId = "";
- var thisApp=this;
- if (this.createType == 1) {
- actionUrl = encodeURI(process.env.API_HOST + "archives/cloudfile");
- fileId = this.currentCloudFile.fileID;
- }
- if (this.createType == 2) {
- actionUrl = encodeURI(process.env.API_HOST + "archives/tempfile");
- fileId = this.currentTempFile.nodeFileID;
- }
- var folderId = this.listUserFolders[this.nowFolderIndex].folderID;
- var foldergroupId="";
- if(this.dbClickSelectedFolderGroupData != null && JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}")
- {
- foldergroupId = this.dbClickSelectedFolderGroupData.folderGroupID;
- }
- var param = {
- fileName: this.createCloudFileName,
- folderId: folderId,
- fileId: fileId,
- userId: sessionStorage.userId,
- companyId: sessionStorage.companyId,
- folderGroupID:foldergroupId
- };
- this.$axios({
- method: "post",
- url: actionUrl,
- data: param
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.refreshPages();
- this.$notify({
- title: "恭喜您",
- message: response.data.message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- this.dialogNewCloudFileVisible = false;
- this.isShowNewFiledialog = false;
- this.createCloudFileName = "";
- var file = response.data.data;
- if (this.isClient) {
- this.clientDownLoad(file, 1);
- }
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- this.$notify({
- title: "温馨提示",
- message: "文件创建失败!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- });
- },
- /**
- * 协作文件切换公共文件
- */
- workTab(num) {
- this.curactive = num;
- this.fileindex = num;
- if (num == 0) {
- this.listCollaborationFiles();
- } else if (num == 1) {
- this.loadListCommonFiles();
- }
- },
- /**
- * 协作文件展开
- */
- openCopage: function() {
- this.isShowpageIcon = false;
- this.neibianju = "neibianju1";
- this.closepageH = "closepageH";
- },
- /**
- * 协作文件折叠
- */
- closeCopage: function() {
- this.isShowpageIcon = true;
- this.neibianju = "neibianju";
- this.closepageH = "";
- },
- /**
- * 右键菜单
- */
- rightShowMenu: function(e, file, type) {
- const menuMinWidth = 10;
- const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
- const offsetWidth = this.$el.offsetWidth; // container width
- const maxLeft = offsetWidth - menuMinWidth; // left boundary
- const left = e.clientX - offsetLeft; // 15: margin right
- if (left > maxLeft) {
- this.left = maxLeft;
- } else {
- this.left = left;
- }
- this.left = e.clientX; // fix 位置bug
- if (e.clientY < document.body.clientHeight / 2) {
- this.top = e.clientY - 120; // fix 位置bug
- } else {
- this.top = e.clientY; // fix 位置bug
- }
-
- if (type == 2 || type == 3) {
- //工作文件下 指定显示某些菜单项
- if (this.currentPageType == 1) {
- this.isShowMenuFile = true;
- } else {
- this.isShowMenuFile = false;
- }
- if (file.status == 2) {
- if (this.isClient) {
- this.top = this.top - 100;
- } else {
- this.top = this.top - 50;
- }
- } else {
- if (this.isClient) {
- this.top = this.top - 100;
- } else {
- this.top = this.top - 50;
- }
- }
- } else if (type == 4) {
- //工作文件下 不显示“新建文件夹”菜单项
- if (this.currentPageType == 1) {
- this.isShowMenuFoldergroup = false;
- } else {
- this.isShowMenuFoldergroup = true;
- }
- //点击空白处只显示“新建文件夹”
- if (file == "新建文件夹") {
- this.isShowMenuItemCreateFoldergroup = true;
- //"新建文件夹"的位置
- if (e.clientY < document.body.clientHeight / 2) {
- this.top = e.clientY - 120; // fix 位置bug
- } else {
- this.top = e.clientY - 80; // fix 位置bug
- }
- } else {
- this.isShowMenuItemCreateFoldergroup = false;
- }
- //显示分组菜单的位置
- if (this.isClient) {
- this.top = this.top - 0;
- } else {
- this.top = this.top + 75;
- }
- } else {
- //工作文件下 指定显示某些菜单项
- if (this.currentPageType == 1) {
- this.isShowMenuFile = true;
- } else {
- this.isShowMenuFile = false;
- }
- //显示分组菜单的位置
- if (this.isClient) {
- this.top = this.top - 100;
- } else {
- this.top = this.top - 50;
- }
- }
- this.rightMenuvisible = true;
- this.showType = type;
- this.BtnRightFile = file; //鼠标右击的文件
- //this.btnRightFoldergoup = file; //zxm+ 鼠标右击的文件分组
- if (file == "新建文件夹") {
- this.btnRightFoldergoup = {};
- } else {
- this.btnRightFoldergoup = file; //zxm+ 鼠标右击的文件分组
- }
- },
- /**
- * 关闭
- */
- closeShowMenu: function() {
- this.rightMenuvisible = false;
- },
- /*
- *进入前动画
- */
- distBeforeEnter: function(elAlone) {
- elAlone.style.opacity = 0;
- },
- /*
- * 进入后动画
- */
- distEnter: function(elAlone, done) {
- Velocity(
- elAlone,
- {
- opacity: 1,
- bottom: "0px"
- },
- {
- duration: 500,
- complete: done
- }
- );
- },
- /*
- * 离开时动画
- */
- distLeave: function(elAlone, done) {
- Velocity(
- elAlone,
- {
- bottom: "-740px",
- opacity: "0"
- },
- {
- duration: 500,
- complete: done
- }
- );
- },
- /**
- * 关闭职员指派弹框
- */
- closeDistWork: function(data) {
- this.isShowEditStaff = false;
- },
- /**
- * 关闭项目设置窗体
- */
- closeProjSet: function() {
- this.isShowProjSetting = false;
- },
- /**
- * 关闭文件交换设置窗体
- */
- closeFileShareSet: function(data) {
- this.showAllAppManagement();
- },
- /****协作空间 拖拽功能方法 start*/
- /**
- * 新建文件夹显示弹窗
- */
- newCreateFolderGroup: function() {
- this.dialogNewFolderGroup = true;
- this.folderGroupData = {
- folderGroupID: "",
- folderID: "",
- superID: "",
- levelID: "",
- folderGroupName: "",
- childCount: 0,
- createUserID: "",
- createTime: "",
- modifyUserID: "",
- modifyTime: ""
- };
- },
- /**
- * 点击确定 保存文件夹组
- */
- createFolderGroupSure: function() {
- var thisApp=this;
- if (
- this.folderGroupData.folderGroupName == null ||
- this.folderGroupData.folderGroupName == ""
- ) {
- this.$notify({
- title: "温馨提示",
- message: "请输入文件夹名称!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- return;
- }
- this.folderGroupData.folderGroupID = this.dbClickSelectedFolderGroupData.folderGroupID;
- this.folderGroupData.superID = this.dbClickSelectedFolderGroupData.folderGroupID;
- this.folderGroupData.levelID = this.dbClickSelectedFolderGroupData.levelID;
- this.folderGroupData.folderID = this.nowFolder.folderID;
- this.folderGroupData.createUserID = sessionStorage.userId;
- this.$axios({
- method: "post",
- url: encodeURI(process.env.API_HOST + "folders/foldergroup"),
- data: this.folderGroupData
- })
- .then(response => {
- this.dialogNewFolderGroup = false;
- if (response.data.state == 1) {
- thisApp.refreshPages();
- this.$notify({
- title: "恭喜您",
- message: "文件夹创建成功!",
- type: "success",
- offset: 100,
- duration: 2500
- });
- } else {
- this.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- this.$notify({
- title: "温馨提示",
- message: "文件夹创建失败!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- });
- },
- /**
- * 双击文件夹组名称 进入文件夹
- */
- intoFoldergroup: function(foldergroup) {
- if (foldergroup == null || JSON.stringify(foldergroup) == "{}") {
- this.$notify({
- title: "温馨提示",
- message: "请选中文件或新建文件夹",
- type: "info",
- offset: 100,
- duration: 2500
- });
- return;
- }
- this.dbClickSelectedFolderGroupData = foldergroup;
- this.isShowWorkt = false;
- this.isShowBread = true;
- var param = {
- folderId: foldergroup.folderID,
- foldergroupId: foldergroup.folderGroupID,
- levelID: foldergroup.levelID,
- userId: sessionStorage.userId
- };
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST + "folders/foldergroup/intofoldergroup"
- ),
- params: param
- }).then(response => {
- if (response.data.state == 1) {
- //如果是我的文件下的文件和文件组 :0;否则是工作文件下的文件和文件组 :1
- if (this.currentPageType == 0) {
- // 加载我的文件
- this.myFilesList = response.data.data.listMyFiles;
- //zxm+ 加载我的文件夹组
- this.myListFolderGroups = response.data.data.listFolderGroups;
- //zxm+ 加载文件分组面包屑
- this.folderGroupBreads = response.data.data.listBreadFolderGroups;
- } else {
- // 加载我的文件
- this.myFilesList = response.data.data.listOtherFiles;
- //zxm+ 加载我的文件夹组
- this.myListFolderGroups = response.data.data.listOtherFolderGroups;
- //zxm+ 加载文件分组面包屑
- this.folderGroupBreads = response.data.data.listBreadFolderGroups;
- }
- clearInterval(this.timer);
- this.timer = setInterval(() => {
- this.intoFoldergroup(foldergroup);
- }, 3 * 1000);
- }
- });
- },
- /**
- * 点击文件分组面包屑
- * obj 参数对象
- * isBreadFirstNode 是否是面包屑的首节点
- */
- breadNodeClickEvent: function(obj, isBreadFirstNode) {
- var thisApp = this;
- clearInterval(thisApp.timer);
- thisApp.folderGroupBreads = [];
- if (isBreadFirstNode) {
- thisApp.isShowWorkt = true;
- thisApp.isShowBread = false;
- thisApp.dbClickSelectedFolderGroupData = {};
- this.listFiles();
- thisApp.timer = setInterval(() => {
- this.listFiles();
- }, 3 * 1000);
- } else {
- thisApp.intoFoldergroup(obj);
- thisApp.timer = setInterval(() => {
- thisApp.intoFoldergroup(obj);
- }, 3 * 1000);
- }
- },
- /**
- * 文件分组-右键菜单-重命名
- */
- renameFoldergroup: function(btnRightFoldergoup) {
- var thisApp = this;
- if (
- thisApp.btnRightFoldergoup == null ||
- JSON.stringify(thisApp.btnRightFoldergoup) == "{}"
- ) {
- thisApp.$notify({
- title: "温馨提示",
- message: "请选中文件夹或新建文件夹",
- type: "info",
- offset: 100,
- duration: 2500
- });
- return;
- }
- this.$prompt(
- "当前文件夹名称: " + btnRightFoldergoup.folderGroupName,
- "重命名",
- {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- inputPattern: /\S/,
- closeOnClickModal: false,
- inputErrorMessage: "名称不能为空"
- }
- )
- .then(({ value }) => {
- btnRightFoldergoup.folderGroupName = value;
- btnRightFoldergoup.modifyUserID = sessionStorage.userId;
- this.$axios({
- method: "put",
- url: encodeURI(
- process.env.API_HOST + "folders/update/foldergroupname"
- ),
- data: btnRightFoldergoup
- })
- .then(function(response) {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: "重命名成功",
- type: "success",
- offset: 100,
- duration: 2500
- });
- }
- })
- .catch(function(error) {
- console.log(error);
- });
- })
- .catch(() => {
- thisApp.$notify.info({
- title: "温馨提示",
- message: "操作已取消",
- offset: 100,
- duration: 2500
- });
- });
- },
- /**
- * 文件分组-右键菜单-转移至/复制至其他工作
- */
- copyAndMoveFoldergroup: function(btnRightFoldergoup, strCopyOrMove) {
- var thisApp = this;
- if (
- thisApp.btnRightFoldergoup == null ||
- JSON.stringify(thisApp.btnRightFoldergoup) == "{}"
- ) {
- thisApp.$notify({
- title: "温馨提示",
- message: "请选中文件夹或新建文件夹",
- type: "info",
- offset: 100,
- duration: 2500
- });
- return;
- }
- if (strCopyOrMove == "move") {
- thisApp.dialogTtile = "移动到其它文件夹";
- }
- if (strCopyOrMove == "copy") {
- thisApp.dialogTtile = "复制到其它文件夹";
- }
- thisApp.strFoldergroupCopyOrMove = strCopyOrMove;
- thisApp.strFileOrFoldergroup = "foldergroup";
- thisApp.btnRightFoldergoup = btnRightFoldergoup;
- thisApp.dialogCopyAndMove = true;
- },
- /**
- * 文件分组- 转移/复制至其他工作
- */
- copyOrMoveFoldergroupFun: function() {
- var thisApp = this;
- var url = "";
- if (thisApp.strFoldergroupCopyOrMove == "move") {
- url = encodeURI(
- process.env.API_HOST +
- "folders/move/" +
- thisApp.dialogSelectedFolder +
- "/" +
- thisApp.btnRightFoldergoup.folderGroupID +
- "/" +
- sessionStorage.userId
- );
- }
- if (thisApp.strFoldergroupCopyOrMove == "copy") {
- url = encodeURI(
- process.env.API_HOST +
- "folders/copy/" +
- thisApp.dialogSelectedFolder +
- "/" +
- thisApp.btnRightFoldergoup.folderGroupID +
- "/" +
- sessionStorage.userId
- );
- }
- var param = {
- folderId: thisApp.dialogSelectedFolder,
- foldergroupId: this.btnRightFoldergoup.folderGroupID,
- userId: sessionStorage.userId
- };
- thisApp
- .$axios({
- method: "get",
- url: url,
- data: param
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: "操作成功",
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.dialogCopyAndMove = false;
- thisApp.refreshPages();
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 30,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 文件分组- 移到回收站
- */
- removeRecycle: function(btnRightFoldergoup) {
- var thisApp = this;
- if (
- thisApp.btnRightFoldergoup == null ||
- JSON.stringify(thisApp.btnRightFoldergoup) == "{}"
- ) {
- thisApp.$notify({
- title: "温馨提示",
- message: "请选中文件夹或新建文件夹",
- type: "info",
- offset: 100,
- duration: 2500
- });
- return;
- }
- thisApp
- .$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "folders/foldergroup/del/update/" +
- btnRightFoldergoup.folderGroupID +
- "/" +
- sessionStorage.userId
- ),
- data: {
- foldergroupId: btnRightFoldergoup.folderGroupID,
- userId: sessionStorage.userId
- }
- })
- .then(response => {
- if (response.data.state == 1) {
- if (
- thisApp.dbClickSelectedFolderGroupData == null ||
- JSON.stringify(thisApp.dbClickSelectedFolderGroupData) == "{}"
- ) {
- thisApp.folderGroupBreads = [];
- thisApp.refreshPages();
- } else {
- thisApp.intoFoldergroup(thisApp.dbClickSelectedFolderGroupData);
- }
- thisApp.$notify({
- title: "恭喜您",
- message: "移至回收站成功!",
- type: "success",
- offset: 100,
- duration: 2500
- });
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- thisApp.$notify({
- title: "温馨提示",
- message: "移至回收站成功失败!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- });
- },
- /**
- * 托拽移动
- */
- draggableMove: function(evt) {
- var thisApp = this;
- var sourceData = evt.draggedContext.element;
- var targetData = evt.relatedContext.element;
- if (!targetData && (targetData.folderGroupID == "myFile" || targetData.folderGroupID == "myComFile")){
- targetData.folderID = this.nowFolder.folderID;
- }
- var draggableData = {};
- if (sourceData.archID != null) {
- //把文件拖拽到文件分组
- draggableData = {
- sourceArchData: sourceData,
- targetFolderGroupData: targetData,
- userID: sessionStorage.userId
- };
- }
- if (sourceData.folderGroupID != null) {
- //把文件分组拖拽到文件分组
- draggableData = {
- sourceFolderGroupData: sourceData,
- targetFolderGroupData: targetData,
- userID: sessionStorage.userId
- };
- }
- thisApp.draggableData = draggableData;
- },
- /**
- * 拖拽完成发送请求
- */
- draggableEnd: function(evt) {
- var thisApp = this;
- if (thisApp.currentPageType == 1) {
- thisApp.$notify({
- title: "温馨提示",
- message: "工作文件下不能进行拖拽!",
- type: "info",
- offset: 100,
- duration: 2500
- });
- return;
- }
- thisApp
- .$axios({
- method: "post",
- url: encodeURI(
- process.env.API_HOST + "folders/foldergroup/draggable"
- ),
- data: thisApp.draggableData
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.refreshPages();
- thisApp.$notify({
- title: "恭喜您",
- message: "操作成功!",
- type: "success",
- offset: 100,
- duration: 2500
- });
- } else {
- thisApp.$notify({
- title: "温馨提示",
- message: response.data.message,
- type: "error",
- offset: 100,
- duration: 5000
- });
- }
- thisApp.refreshPages();
- })
- .catch(error => {
- console.log(error);
- thisApp.$notify({
- title: "温馨提示",
- message: "操作失败!",
- type: "error",
- offset: 100,
- duration: 5000
- });
- });
- }
- /****协作空间 拖拽功能方法 end*/
- },
- watch: {
- /**
- * 搜索我的文件
- */
- searchMyFile(value) {
- for (var i = 0; i < this.myFilesList.length; i++) {
- this.myFilesList[i].isShowFile = false;
- if (this.myFilesList[i].archName.toLowerCase().indexOf(value) != -1) {
- this.myFilesList[i].isShowFile = true;
- }
- }
- },
- /**
- * 搜索协作文件
- */
- searchMyCollaborationFile(value) {
- for (var i = 0; i < this.myCollaborationFilesList.length; i++) {
- this.myCollaborationFilesList[i].isShowFile = false;
- if (
- this.myCollaborationFilesList[i].archName
- .toLowerCase()
- .indexOf(value) != -1
- ) {
- this.myCollaborationFilesList[i].isShowFile = true;
- }
- }
- },
- rightMenuvisible(value) {
- if (value) {
- document.body.addEventListener("click", this.closeShowMenu);
- } else {
- document.body.removeEventListener("click", this.closeShowMenu);
- }
- },
- outWorkSpace(data) {
- this.hideWorklinkPage();
- }
- },
- destroyed: function() {
- window.removeEventListener("scroll", this.onscroll);
- window.removeEventListener("resize", this.listenBottomHeight);
- clearInterval(this.timer);
- },
- components: {
- Forgeview: forgeview,
- // BMapComponent: BMapComponent,
- Officeview: officeview,
- Imageview: imageview,
- DistWork: DistWork,
- ProjSetting: ProjSetting,
- FileShare: FileShare,
- Gismap: gismap,
- WorkLine: WorkLine,
- draggable: draggable
- }
- };
- </script>
- <style>
- .el-message-box--center .el-message-box__status.el-icon-warning {
- position: absolute;
- left: 0;
- }
- .yywenjiantitle_text1 {
- position: relative;
- top: 2px;
- }
- .youbian {
- color: #a7a8b7;
- position: relative;
- top: 2px;
- }
- </style>
|