Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

6159 rindas
218 KiB

  1. <!--
  2. * @Description: 协作空间组件
  3. * @version: 1.0
  4. * @Author: xzx
  5. * @Date: 2019-11-04 17:22:44
  6. * @LastEditors : xzx
  7. * @LastEditTime : 2020-01-13 13:26:49
  8. -->
  9. <template>
  10. <div id="app" v-cloak>
  11. <!-- 应用管理面板 -->
  12. <div
  13. :class="
  14. isShowRightManager == true
  15. ? 'AnimatedRightIn flex_right_pain'
  16. : 'flex_right_pain'
  17. "
  18. >
  19. <!-- 项目与应用管理 -->
  20. <div class="flex_right_pain_body_box" v-if="isShowProManager == 1">
  21. <div class="flex_right_pain_head">
  22. <div class="EC_col_12">
  23. <h4 class="RdiaheaderTitle">工作设置</h4>
  24. </div>
  25. <div class="EC_col_12">
  26. <i
  27. class="Cicon icon font_family icon-icon_quxiaohuoguanbi fr"
  28. title="关闭"
  29. @click="closeAppManagePain"
  30. ></i>
  31. </div>
  32. </div>
  33. <div class="pxline"></div>
  34. <div class="flex_right_pain_body">
  35. <div class="yiyun_app_itemClasss" v-show="nowFolderName != '公共文件夹'">
  36. <span class="yiyun_yinyongname" v-if="isUseFolderChange">协同设置</span>
  37. <ul class="yiyun_app_info_box" v-if="isUseFolderChange">
  38. <li @click="FileShareSet">
  39. <span class="fl">文件协作设置</span>
  40. <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
  41. </li>
  42. </ul>
  43. </div>
  44. <div class="yiyun_app_itemClasss" v-show="nowFolderName == '公共文件夹'">
  45. <span class="yiyun_yinyongname">通用</span>
  46. <ul class="yiyun_app_info_box">
  47. <li @click="projectEdit">
  48. <span class="fl">项目概况</span>
  49. <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
  50. </li>
  51. <li @click="projectFoldeEdit" v-if="isProjectManager">
  52. <span class="fl">项目编辑</span>
  53. <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
  54. </li>
  55. <li @click="EditStaffAndTip" v-if="isFolderManager">
  56. <span class="fl">工作指派</span>
  57. <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
  58. </li>
  59. </ul>
  60. </div>
  61. </div>
  62. </div>
  63. <!-- 项目与应用管理 -- 管理云应用 -->
  64. <div class="flex_right_pain_body_box" v-if="isShowProManager == 2">
  65. <div class="flex_right_pain_head">
  66. <div class="EC_col_4">
  67. <i
  68. class="el-collapse-item__arrow el-icon-arrow-left left-list_btn"
  69. v-on:click="backProManager"
  70. ></i>
  71. </div>
  72. <div class="EC_col_16">
  73. <h4 class="centertext">管理云应用</h4>
  74. </div>
  75. <div class="EC_col_4">
  76. <i
  77. class="Cicon icon font_family icon-icon_quxiaohuoguanbi fr"
  78. title="关闭"
  79. @click="closeAppManagePain"
  80. ></i>
  81. </div>
  82. </div>
  83. <div class="pxline"></div>
  84. <div class="flex_right_pain_body">
  85. <div class="yiyun_app_itemClasss">
  86. <span class="yiyun_yinyongname">云应用</span>
  87. <div
  88. class="appItemlist"
  89. v-for="(app, index) in listAppComputed"
  90. :key="index"
  91. @click="toAppInfomation(app)"
  92. >
  93. <div class="fl appImg">
  94. <img src="static/img/appImg/appicon1.jpg" alt />
  95. <!-- <img v-lazy="imgSrc + app.imageUrl" alt=""> -->
  96. </div>
  97. <div class="appNameBox">
  98. <span class="fl">{{ app.appName }}</span>
  99. <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <!-- 项目与应用管理 -- 管理云应用 -- 应用名称 -->
  106. <div class="flex_right_pain_body_box" v-if="isShowProManager == 3">
  107. <div class="flex_right_pain_head">
  108. <div class="EC_col_4">
  109. <i
  110. class="el-collapse-item__arrow el-icon-arrow-left left-list_btn"
  111. v-on:click="backManagerCloudApp"
  112. ></i>
  113. </div>
  114. <div class="EC_col_16">
  115. <h4 class="centertext" :title="currentApp.appName">{{ currentApp.appName }}</h4>
  116. </div>
  117. <div class="EC_col_4">
  118. <i
  119. class="Cicon icon font_family icon-icon_quxiaohuoguanbi fr"
  120. title="关闭"
  121. @click="closeAppManagePain"
  122. ></i>
  123. </div>
  124. </div>
  125. <div class="pxline"></div>
  126. <div class="flex_right_pain_body">
  127. <div class="yiyun_app_itemClasss">
  128. <span class="yiyun_yinyongname">通用</span>
  129. <ul class="yiyun_app_info_box">
  130. <li>
  131. <span class="fl">在该工作中启用</span>
  132. <el-switch v-model="appState" class="fr" @change="changeFolderApp"></el-switch>
  133. </li>
  134. <li v-if="false">
  135. <span class="fl">文件协同通知</span>
  136. <el-switch v-model="appState" class="fr"></el-switch>
  137. </li>
  138. </ul>
  139. <span class="yiyun_yinyongname" v-if="false">其它</span>
  140. <ul class="yiyun_app_info_box" v-if="false">
  141. <li>
  142. <span class="fl">查看应用描述</span>
  143. <i class="el-collapse-item__arrow el-icon-arrow-right right-list_btn"></i>
  144. </li>
  145. </ul>
  146. </div>
  147. </div>
  148. </div>
  149. <!-- 工作地图 -->
  150. <div class="flex_right_pain_body_box" v-if="isShowProManager == 4">
  151. <div class="flex_right_pain_head">
  152. <div class="EC_col_12">
  153. <h4>工作地图</h4>
  154. </div>
  155. <div class="EC_col_12">
  156. <i
  157. class="Cicon icon font_family icon-icon_quxiaohuoguanbi fr"
  158. title="关闭"
  159. @click="closeAppManagePain"
  160. ></i>
  161. </div>
  162. </div>
  163. <div class="pxline"></div>
  164. <div class="flex_right_pain_body">
  165. <div class="yiyun_app_itemClasss">
  166. <ul class="yiyun_app_info_box">
  167. <li
  168. v-for="(myfolder, index) in listUserFolders"
  169. :key="myfolder.folderID"
  170. @click="goFolder(index)"
  171. >
  172. <span class="fl">{{ myfolder.folderName }}</span>
  173. </li>
  174. </ul>
  175. </div>
  176. </div>
  177. </div>
  178. <!-- 工作设置 -->
  179. <FileShare
  180. v-if="isShowProManager == 5"
  181. @closeSet="closeFileShareSet"
  182. :folderId="nowFolderId"
  183. :folderName="nowFolderName"
  184. ></FileShare>
  185. </div>
  186. <div class="listfilewarp mt-0" v-infinite-scroll="scrollLoad" v-loading="loading">
  187. <!-- 工作链 -->
  188. <WorkLine
  189. :isShowlink="isShowworklink"
  190. :listUserFolders="listUserFolders"
  191. :nowFolderIndex="nowFolderIndex"
  192. :nowFolderName="nowFolderName"
  193. @goFolderAndBack="goFolderAndBack"
  194. @previousFolder="previousFolder"
  195. @showAllAppManagement="showAllAppManagement"
  196. @showWorklinkPage="showWorklinkPage"
  197. @nowFolderClick="nowFolderClick"
  198. @hideWorklinkPage="hideWorklinkPage"
  199. ></WorkLine>
  200. <div class="layout_content2" v-show="!isShowworklink" v-loading="loading">
  201. <section
  202. :class="closepageH + ' layerout_H2'"
  203. @contextmenu.prevent="rightShowMenu($event, '新建文件夹', 4)"
  204. >
  205. <!-- 文件大box -->
  206. <section class="yiyun_section_warp">
  207. <div class="yinyong_warpBox hidescollbar">
  208. <div class="yiyun_section_top titlebar_head" id="bignav">
  209. <div
  210. class="section_item section_item_aside_fl"
  211. v-if="!isCommonPage && (nowFolder.folderPerm != 0 || isProjectManager) "
  212. >
  213. <!--我的文件 工作文件-->
  214. <span
  215. class="yywenjiantitle"
  216. :class="{yyactive:currentPageType == index}"
  217. v-for="(item,index) in workt"
  218. :key="index"
  219. @click="changeWorkdata(index)"
  220. v-if="isShowWorkt"
  221. >{{item.title}}</span>
  222. <!--文件分组面包屑-->
  223. <span v-if="isShowBread" class="yiyun_text-title-workspace mr-20">
  224. <draggable group="group" id="bread1-0" :list="myFileBreadNodeData">
  225. <a
  226. class="yywenjiantitle_text1"
  227. v-if="currentPageType==0"
  228. href="javascript:;"
  229. @click="breadNodeClickEvent(currentPageType,true)"
  230. >我的文件</a>
  231. <i class="el-icon-arrow-left youbian"></i>
  232. <a
  233. class="yywenjiantitle-text"
  234. v-if="currentPageType==1"
  235. href="javascript:;"
  236. @click="breadNodeClickEvent(currentPageType,true)"
  237. >
  238. 工作文件
  239. <i class="el-icon-arrow-left"></i>
  240. </a>
  241. </draggable>
  242. <draggable
  243. class="list-group"
  244. :list="folderGroupBreads"
  245. group="group"
  246. id="bread1">
  247. <a
  248. class="list-group-item yywenjiantitle-text"
  249. v-for="item in folderGroupBreads"
  250. v-bind:key="item.foldergroupID"
  251. href="javascript:;"
  252. @click="breadNodeClickEvent(item,false)"
  253. >
  254. {{ item.folderGroupName }}
  255. <i class="el-icon-arrow-left"></i>
  256. </a>
  257. </draggable>
  258. </span>
  259. </div>
  260. <div
  261. class="section_item section_item_aside_fl"
  262. v-if="!isCommonPage && (nowFolder.folderPerm == 0 && !isProjectManager )"
  263. >
  264. <span class="yywenjiantitle" :class="{yyactive:true}" v-if="isShowWorkt">工作文件</span>
  265. <!--文件分组面包屑-->
  266. <span v-if="isShowBread" class="yiyun_text-title-workspace mr-20">
  267. <draggable group="group" id="bread2-0" :list="myFileBreadNodeData">
  268. <a
  269. class="yywenjiantitle-text"
  270. href="javascript:;"
  271. @click="breadNodeClickEvent(currentPageType,true)"
  272. >
  273. 工作文件
  274. <i class="el-icon-arrow-left"></i>
  275. </a>
  276. </draggable>
  277. <draggable
  278. class="list-group"
  279. :list="folderGroupBreads"
  280. group="group"
  281. id="bread2">
  282. <a
  283. class="yywenjiantitle-text"
  284. v-for="item in folderGroupBreads"
  285. v-bind:key="item.foldergroupID"
  286. href="javascript:;"
  287. @click="breadNodeClickEvent(item,false)"
  288. >
  289. {{ item.folderGroupName }}
  290. <i class="el-icon-arrow-left"></i>
  291. </a>
  292. </draggable>
  293. </span>
  294. </div>
  295. <div class="section_item section_item_aside_fl" v-if="isCommonPage">
  296. <draggable group="group" id="bread3-0" :list="myComFileBreadNodeData">
  297. <span
  298. class="yywenjiantitle fl"
  299. :class="{yyactive:true}"
  300. @click="breadNodeClickEvent(currentPageType,true)"
  301. >公共文件</span>
  302. </draggable>
  303. <span v-if="isShowBread" class="yiyun_text-title-workspace mr-20">
  304. <i class="el-icon-arrow-left first-leftarrow fl"></i>
  305. <draggable
  306. class="list-group"
  307. :list="folderGroupBreads"
  308. group="group"
  309. id="bread3">
  310. <a
  311. class="list-group-item yywenjiantitle-text"
  312. v-for="item in folderGroupBreads"
  313. v-bind:key="item.foldergroupID"
  314. href="javascript:;"
  315. @click="breadNodeClickEvent(item,false)"
  316. >
  317. {{ item.folderGroupName }}
  318. <i class="el-icon-arrow-left"></i>
  319. </a>
  320. </draggable>
  321. </span>
  322. </div>
  323. <!-- 右侧操作栏 -->
  324. <div class="section_item section_item_aside_fr">
  325. <div class="fr ml-10">
  326. <!-- <el-button
  327. v-if="nowFolder.folderPerm == 0"
  328. type="primary"
  329. @click="newCreateFolderGroup"
  330. >新建文件夹</el-button>-->
  331. <!-- <span class="yiyun_tishibtn yiyun_text-wenben"><i class="yiyun_icon icon_topnav_listicon" title="列表显示" v-show="isShowMyFileList == true"
  332. @click="showMyFilelist"></i></span>
  333. <span class="yiyun_tishibtn yiyun_text-wenben"><i class="yiyun_icon icon_topnav_cardicon" title="显示缩略图"
  334. v-show="isShowMyFileList == false" @click="showMyFilecard"></i></span>-->
  335. </div>
  336. <div class="fifle_search fr">
  337. <!-- <div class="searchInputzhankai">
  338. <i class="icon font_family icon-icon_sousuo searchsize" @click="searchFile"></i>
  339. <el-input type="text" class="el-input_mini searchInput" placeholder="搜索文件" v-model="searchMyFile" v-show="isShowsearch" clearable></el-input>
  340. </div>-->
  341. </div>
  342. </div>
  343. </div>
  344. <div class="clear"></div>
  345. <!-- 应用列表(缩略图) -->
  346. <div class="yiyun_row scollbarBox nobianju py-x-22" v-show="isShowMyFileList == true">
  347. <div class="yiyun_wenjian_list nohover" v-if="this.currentPageType == 0 ">
  348. <div class="yiyunwenjian_imgbox newbtn" v-on:click="showNewFiledialog">
  349. <img src="/static/img/newadd.png" alt class="wenjian_bg_img" />
  350. <span class="newbtn_label">新建文件</span>
  351. </div>
  352. </div>
  353. <!-- zxm修改托拽 start -->
  354. <!--显示文件 -->
  355. <draggable
  356. id="draggleFiles"
  357. class="list-group"
  358. :list="myFilesList"
  359. group="group"
  360. :move="draggableMove"
  361. @end="draggableEnd"
  362. >
  363. <!-- @remove="draggableRemove"-->
  364. <div
  365. class="lisy-group-item"
  366. v-for="file in myFilesList"
  367. :key="file.fileID"
  368. @dblclick="fileClick(file)"
  369. @mouseover="isShowIcon"
  370. @mouseout="ishideIcon"
  371. >
  372. <el-tooltip
  373. :content="file.strToolTip"
  374. :disabled="file.strToolTip == ''"
  375. placement="right"
  376. effect="light"
  377. >
  378. <div class="yiyun_wenjian_list" v-if="file.isShowFile == true">
  379. <div>
  380. <div
  381. class="defultImage-mid"
  382. :class="file.extension+'-mid' + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')"
  383. v-if="file.extension != 'jpg' &&
  384. file.extension != 'png' &&
  385. file.extension != 'bmp' &&
  386. file.extension != 'gif' &&
  387. file.extension != 'jpeg' "
  388. @contextmenu.prevent.stop="rightShowMenu($event, file, 1)"
  389. ></div>
  390. <div
  391. :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':'')"
  392. v-if="
  393. file.extension == 'jpg' ||
  394. file.extension == 'png' ||
  395. file.extension == 'bmp' ||
  396. file.extension == 'gif' ||
  397. file.extension == 'jpeg'"
  398. @contextmenu.prevent.stop="rightShowMenu($event, file, 1)"
  399. >
  400. <div class="file_Im gbox-mid">
  401. <img v-lazy="imgSrc + file.alias" alt class="file_Img" />
  402. </div>
  403. </div>
  404. <!-- 標簽 -->
  405. <div
  406. class="eidtTip"
  407. v-if=" file.status == 1 && file.modifyUserID != userId"
  408. >工作中</div>
  409. <div v-if="file.status == 0" class="yijianxietong isonselect_defual">
  410. <i
  411. class="icon font_family icon-icon_status_wenjianbiaojiwancheng yijianIcon"
  412. title="工作中"
  413. @click="setFileStatus(file, 2, '更新为已完成',1)"
  414. ></i>
  415. </div>
  416. <div
  417. v-if="file.status == 1 && file.modifyUserID == userId"
  418. class="yijianxietong isonselect_update"
  419. >
  420. <i
  421. class="icon font_family icon-icon_status_wenjianbiaojigengxin yijianIcon"
  422. title="已更新"
  423. @click="setFileStatus(file, 0, '文件已更新',1)"
  424. ></i>
  425. </div>
  426. <div v-if="file.status == 2" class="yijianxietong isonselect">
  427. <i
  428. class="icon font_family icon-icon_status_wenjianbiaojiwancheng yijianIcon"
  429. title="已完成"
  430. @click="setFileStatus(file, 0, '更新为工作中',1)"
  431. ></i>
  432. </div>
  433. <div v-if="file.status == 3" class="yijianxietong isonselect_err">
  434. <i
  435. class="icon font_family icon-icon_status_wenjianbiaojiquxiao yijianIcon"
  436. title="已取消协同"
  437. @click="setFileStatus(file, 0, '已开启文件协同',2)"
  438. ></i>
  439. </div>
  440. <!-- 下载状态 v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)"-->
  441. <div
  442. class="downloadIcon"
  443. @click="clientDownLoad(file,1)"
  444. v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)"
  445. >
  446. <img src="/static/img/download.svg" alt />
  447. </div>
  448. <div
  449. class="downloadIcon"
  450. v-if="isClient && file.isDownload && file.downloadStatus == 1"
  451. >
  452. <span>
  453. <i class="el-icon-loading largeicon"></i>
  454. <div class="minifont">下载中</div>
  455. </span>
  456. </div>
  457. <!-- 下拉列表 -->
  458. <div class="top_optionBar">
  459. <el-dropdown>
  460. <span class="el-dropdown-link">
  461. <i
  462. class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"
  463. ></i>
  464. </span>
  465. <el-dropdown-menu slot="dropdown">
  466. <el-dropdown-item
  467. @click.native="openOffice(file)"
  468. v-if="file.extension == 'pdf' ||
  469. file.extension == 'xls' ||
  470. file.extension == 'xlsx' ||
  471. file.extension == 'doc' ||
  472. file.extension == 'docx' ||
  473. file.extension == 'ppt' ||
  474. file.extension == 'pptx' ||
  475. file.extension == 'txt'"
  476. >
  477. <span>在线查看</span>
  478. </el-dropdown-item>
  479. <el-dropdown-item
  480. @click.native="fileClick(file)"
  481. v-if="isClient && file.downloadStatus == 2"
  482. >
  483. <span>打开</span>
  484. </el-dropdown-item>
  485. <el-dropdown-item
  486. @click.native="fileClickSelect(file)"
  487. v-if="isClient && file.downloadStatus == 2"
  488. >
  489. <span>打开方式</span>
  490. </el-dropdown-item>
  491. <el-dropdown-item
  492. @click.native="setFileStatus(file, 2, '更新为已完成',1)"
  493. divided
  494. v-if="file.status == 1 || file.status == 0"
  495. >
  496. <span>搞定</span>
  497. </el-dropdown-item>
  498. <el-dropdown-item
  499. @click.native="setFileStatus(file, 0, '已开启文件协同',2)"
  500. v-if="isUseShare && file.status == 3"
  501. >
  502. <span>开启协同</span>
  503. </el-dropdown-item>
  504. <el-dropdown-item
  505. @click.native="setFileStatus(file, 3, '文件已取消协同',1)"
  506. v-if="isUseShare && file.status != 3"
  507. >
  508. <span>取消协同</span>
  509. </el-dropdown-item>
  510. <el-dropdown-item @click.native="createMilestone(file)" divided>
  511. <span>保存历史文件</span>
  512. </el-dropdown-item>
  513. <el-dropdown-item @click.native="showFileMilestone(file)">
  514. <span>选择历史文件</span>
  515. </el-dropdown-item>
  516. <el-dropdown-item @click.native="copyFile(file)" divided>
  517. <span>建立副本</span>
  518. </el-dropdown-item>
  519. <el-dropdown-item
  520. v-if="isUseCommon && file.commonStatus == 0 && nowFolderName != '公共文件夹'"
  521. @click.native="updateToPublicFile(file,0)"
  522. divided
  523. >
  524. <span>提交至项目公共文件夹</span>
  525. </el-dropdown-item>
  526. <el-dropdown-item
  527. v-if="isUseCommon && file.commonStatus == 1"
  528. @click.native="updateToPublicFile(file,1)"
  529. divided
  530. >
  531. <span>取消至项目公共文件夹</span>
  532. </el-dropdown-item>
  533. <el-dropdown-item @click.native="copyAndMoveFolder(file, 'move')">
  534. <span>转移至其他工作</span>
  535. </el-dropdown-item>
  536. <el-dropdown-item @click.native="copyAndMoveFolder(file, 'copy')">
  537. <span>复制至其他工作</span>
  538. </el-dropdown-item>
  539. <el-dropdown-item
  540. divided
  541. @click.native="downLoadMyFile(file)"
  542. v-if="file.extension !='map' && file.extension !='supermap' "
  543. >
  544. <span>下载至本地</span>
  545. </el-dropdown-item>
  546. <el-dropdown-item
  547. v-if="file.extension == 'svfzip' "
  548. @click.native="shareMyFile(file)"
  549. >
  550. <span>分享</span>
  551. </el-dropdown-item>
  552. <el-dropdown-item @click.native="reNameyMyFile(file)">
  553. <span>重命名</span>
  554. </el-dropdown-item>
  555. <el-dropdown-item @click.native="delMyFile(file)">
  556. <span>移到回收站</span>
  557. </el-dropdown-item>
  558. </el-dropdown-menu>
  559. </el-dropdown>
  560. </div>
  561. <strong
  562. class="yiyunwenjian_name"
  563. :title="file.archName + '.' + file.extension"
  564. >{{ file.archName }}</strong>
  565. <!--<span class="yiyunwenjian_infodesc">{{file.strCreateTime}}</span>-->
  566. <span
  567. v-if="nowFolderName == '公共文件夹' && file.createUserID == userId"
  568. class="yiyunwenjian_infodesc"
  569. >由我创建</span>
  570. <span
  571. v-if="nowFolderName == '公共文件夹' && file.createUserID != userId"
  572. class="yiyunwenjian_infodesc"
  573. >{{file.cnName}}创建</span>
  574. <!--span 本来就注视着呢-->
  575. <!-- <span
  576. v-if="nowFolderName != '公共文件夹' && file.createUserID == userId"
  577. class="yiyunwenjian_infodesc"
  578. >由我创建</span>-->
  579. <span
  580. v-if="nowFolderName != '公共文件夹' && file.createUserID != userId"
  581. class="yiyunwenjian_infodesc"
  582. >{{file.cnName}}创建</span>
  583. </div>
  584. <!-- 文件状态显示 -->
  585. <div class="filestate" v-if="false">
  586. <span>文件编辑中</span>
  587. </div>
  588. <span
  589. v-if="file.version != 1"
  590. class="visontext"
  591. @click="showFileMilestone(file)"
  592. >
  593. 版本
  594. {{ file.version }}
  595. </span>
  596. </div>
  597. </el-tooltip>
  598. </div>
  599. </draggable>
  600. <!--显示文件夹组 -->
  601. <draggable
  602. id="draggletFolderGroups"
  603. class="list-group"
  604. :list="myListFolderGroups"
  605. group="group"
  606. :move="draggableMove"
  607. @end="draggableEnd"
  608. >
  609. <div
  610. class="yiyun_wenjian_list lisy-group-item"
  611. v-for="foldergroup in myListFolderGroups"
  612. :key="foldergroup.folderGroupID"
  613. @dblclick="intoFoldergroup(foldergroup)"
  614. >
  615. <div
  616. class="defultImage-mid foldernew-mid"
  617. @contextmenu.prevent.stop="rightShowMenu($event, foldergroup, 4)"
  618. ></div>
  619. <strong
  620. class="yiyunwenjian_name"
  621. :title="foldergroup.folderGroupName"
  622. >{{ foldergroup.folderGroupName}}</strong>
  623. <strong class="visontext">{{foldergroup.childrenTotalCount}}个项目</strong>
  624. </div>
  625. </draggable>
  626. <!-- zxm修改托拽 end -->
  627. <div></div>
  628. </div>
  629. <!-- 表格 -->
  630. <div class="scollbarBox" v-show="isShowMyFileList == false">
  631. <template>
  632. <el-table :data="myFilesList" style="width: 100%">
  633. <el-table-column prop="archName" label="文件名称" align="left"></el-table-column>
  634. <el-table-column prop="extension" align="left" label="文件分类"></el-table-column>
  635. <el-table-column prop="modifyTime" align="left" label="修改日期"></el-table-column>
  636. <el-table-column prop="createTime" align="left" label="创建时间"></el-table-column>
  637. <el-table-column prop="strSize" align="left" label="文件大小"></el-table-column>
  638. </el-table>
  639. </template>
  640. </div>
  641. </div>
  642. <div class="clear"></div>
  643. <!-- 应用实例列表 -->
  644. <div class="yinyong_warpBox hidescollbar" v-if="myAppInstanceList.length > 0">
  645. <div class="yiyun_section_top" id="bignav">
  646. <div class="section_item fl section_item_aside_fl">
  647. <h3 class="yiyuntitle">应用实例</h3>
  648. </div>
  649. </div>
  650. <div class="clear"></div>
  651. <!-- 应用列表(缩略图) -->
  652. <div class="yiyun_row scollbarBox py-x-22" v-show="isShowMyAppInstanceList">
  653. <div v-for="(instance, index) in myAppInstanceList" :key="index">
  654. <div class="yiyun_wenjian_list">
  655. <div class="defultImage img_bg appbg" @click="openApp(instance)">
  656. <div class="file_Imgbox">
  657. <img
  658. v-if="instance.appType == 1"
  659. src="../../../static/img/AppHeadImg/appImg_08.png"
  660. />
  661. <img
  662. v-if="instance.appType == 2"
  663. src="../../../static/img/AppHeadImg/appImg_09.png"
  664. />
  665. <img
  666. v-if="instance.appType == 3"
  667. src="../../../static/img/AppHeadImg/appImg_10.png"
  668. />
  669. </div>
  670. </div>
  671. <strong
  672. class="yiyunwenjian_name"
  673. :title="instance.showName"
  674. >{{ instance.showName }}</strong>
  675. </div>
  676. </div>
  677. </div>
  678. </div>
  679. </section>
  680. </section>
  681. <div :class="neibianju" id="bottomBox">
  682. <div class="titleBox">
  683. <div class="title_warp">
  684. <div class="yiyun_section_top orginoverflow" id="bignav">
  685. <!-- 系统时间 -->
  686. <div class="section_item fl section_item_aside_fl xiangdui">
  687. <span class="yiyun_zhediebtn DevtopIcon">
  688. <i
  689. class="Cicon text_gray icon font_family icon-icon_zhankai"
  690. title="展开面板"
  691. v-show="isShowpageIcon"
  692. @click="openCopage"
  693. ></i>
  694. <i
  695. class="Cicon text_gray icon font_family icon-icon_shouqi"
  696. title="折叠面板"
  697. v-show="!isShowpageIcon"
  698. @click="closeCopage"
  699. ></i>
  700. </span>
  701. <div class="tabtltlebox">
  702. <h3
  703. v-for="(tab, index) in workTabs"
  704. :key="index"
  705. :class="{ curactive: curactive == index }"
  706. class="defualth3"
  707. v-if="nowFolderName != '公共文件夹'"
  708. @click="workTab(index)"
  709. >{{ tab.label }}</h3>
  710. <h3 class="defualth3" v-if="nowFolderName == '公共文件夹'">由工作提交的文件</h3>
  711. </div>
  712. </div>
  713. <div class="section_item fr section_item_aside_fr">
  714. <div class="fr ml-10">
  715. <span class="bj_label">协作文件均只读</span>
  716. <!-- <span class="yiyun_tishibtn yiyun_text-wenben"><i class="yiyun_icon icon_topnav_listicon" title="列表显示" v-show="isShowTogetherFileList == true"
  717. @click="showCoFilelist"></i></span>
  718. <span class="yiyun_tishibtn yiyun_text-wenben"><i class="yiyun_icon icon_topnav_cardicon" title="显示缩略图" v-show="isShowTogetherFileList == false"
  719. @click="showCoFilecard"></i></span>-->
  720. </div>
  721. <div class="fifle_search fr">
  722. <!-- <div class="searchInputzhankai">
  723. <i class="icon font_family icon-icon_sousuo searchsize" @click="coFileSearch"></i>
  724. <el-input type="text" class="el-input_mini searchInput" placeholder="搜索文件" v-model="searchMyCollaborationFile" v-show="isShowCosearch" clearable></el-input>
  725. </div>-->
  726. </div>
  727. </div>
  728. </div>
  729. <div class="clear"></div>
  730. </div>
  731. </div>
  732. <div class="fifleBox">
  733. <div class="yiyun_section_warp layerout_H3">
  734. <!-- 文件大box -->
  735. <div class="yinyong_warpBox">
  736. <!-- 协作文件 -->
  737. <div v-if="fileindex == 0">
  738. <div class="py-x-22 mt-12" v-show="isShowTogetherFileList == true">
  739. <div
  740. v-for="(file, index) in myCollaborationFilesList"
  741. :key="index"
  742. @dblclick="fileClickColl(file)"
  743. >
  744. <div
  745. class="yiyun_wenjian_list"
  746. v-if="file.isShowFile == true && file.status != 3"
  747. >
  748. <div
  749. class="defultImage-mid"
  750. :class="
  751. file.extension +'-mid'+
  752. (file.status == '2' ? ' opitcy1' : ' opitcy0')
  753. + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')
  754. "
  755. v-if="
  756. file.extension != 'jpg' &&
  757. file.extension != 'png' &&
  758. file.extension != 'bmp' &&
  759. file.extension != 'gif' &&
  760. file.extension != 'jpeg'
  761. "
  762. @contextmenu.prevent.stop="rightShowMenu($event, file, 2)"
  763. ></div>
  764. <div
  765. class="defultImage-mid img_bg-mid"
  766. :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':'')"
  767. v-if="
  768. file.extension == 'jpg' ||
  769. file.extension == 'png' ||
  770. file.extension == 'bmp' ||
  771. file.extension == 'gif' ||
  772. file.extension == 'jpeg'
  773. "
  774. @contextmenu.prevent.stop="rightShowMenu($event, file, 2)"
  775. >
  776. <div class="file_Imgbox-mid">
  777. <img v-lazy="imgSrc + file.alias" alt class="file_Img" />
  778. </div>
  779. </div>
  780. <strong
  781. :class="
  782. 'yiyunwenjian_name ' +
  783. (file.status == 2 ? ' opitcy1' : ' opitcy0')
  784. "
  785. :title="file.archName + '.' + file.extension"
  786. >
  787. <i v-if="file.updateStatus == 0" class="yiyun_file_newlabel mr-10"></i>
  788. {{ file.archName }}
  789. </strong>
  790. <div class="eidtTip" v-if="file.status == 0 || file.status == 1">工作中</div>
  791. <div
  792. class="downloadIcon"
  793. v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&&isClient && !file.isDownload && file.status == 2"
  794. @click="clientDownLoad(file,2)"
  795. >
  796. <img src="/static/img/download.svg" alt />
  797. </div>
  798. <div
  799. class="downloadIcon"
  800. v-if="isClient && file.isDownload && file.downloadStatus == 1"
  801. >
  802. <span>
  803. <i class="el-icon-loading largeicon"></i>
  804. <div class="minifont">下载中</div>
  805. </span>
  806. </div>
  807. <!-- <div class="eidtTip" v-if="file.status == 1">
  808. 编辑中
  809. </div>-->
  810. <div class="eidtTip" v-if="file.status == 3">文件已取消协同</div>
  811. <span class="yiyunwenjian_infodesc">{{ file.folderName }}</span>
  812. <div class="top_optionBar">
  813. <el-dropdown>
  814. <span class="el-dropdown-link">
  815. <i
  816. v-if="file.status == 2"
  817. class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"
  818. ></i>
  819. </span>
  820. <el-dropdown-menu slot="dropdown">
  821. <el-dropdown-item
  822. @click.native="openOffice(file)"
  823. v-if="file.status == 2 &&
  824. (file.extension == 'pdf' ||
  825. file.extension == 'xls' ||
  826. file.extension == 'xlsx' ||
  827. file.extension == 'doc' ||
  828. file.extension == 'docx' ||
  829. file.extension == 'ppt' ||
  830. file.extension == 'pptx' ||
  831. file.extension == 'txt')
  832. "
  833. >
  834. <span>在线查看</span>
  835. </el-dropdown-item>
  836. <el-dropdown-item
  837. @click.native="fileClickColl(file)"
  838. v-if="file.status == 2 && isClient && file.downloadStatus == 2"
  839. >
  840. <span>打开</span>
  841. </el-dropdown-item>
  842. <el-dropdown-item
  843. @click.native="fileClickSelectColl(file)"
  844. v-if="file.status == 2 && isClient && file.downloadStatus == 2"
  845. >
  846. <span>打开方式</span>
  847. </el-dropdown-item>
  848. <el-dropdown-item
  849. divided
  850. @click.native="openNativeFolder(file)"
  851. v-if="file.status == 2 && isClient"
  852. >
  853. <span>在文件夹中浏览</span>
  854. </el-dropdown-item>
  855. <el-dropdown-item
  856. divided
  857. @click.native="downLoadMyFile(file)"
  858. v-if="file.status ==2 && file.extension !='map' && file.extension!='supermap'"
  859. >
  860. <span>下载至本地</span>
  861. </el-dropdown-item>
  862. </el-dropdown-menu>
  863. </el-dropdown>
  864. </div>
  865. </div>
  866. </div>
  867. </div>
  868. <!-- 表格 -->
  869. <div v-show="isShowTogetherFileList == false">
  870. <template>
  871. <el-table
  872. :data="myCollaborationFilesList"
  873. style="width: 100%"
  874. class="fileTable"
  875. >
  876. <el-table-column prop="archName" label="文件名称" align="left"></el-table-column>
  877. <el-table-column prop="extension" align="left" label="文件分类"></el-table-column>
  878. <el-table-column prop="modifyTime" align="left" label="修改日期"></el-table-column>
  879. <el-table-column prop="createTime" align="left" label="创建时间"></el-table-column>
  880. <el-table-column prop="strSize" align="left" label="文件大小"></el-table-column>
  881. </el-table>
  882. </template>
  883. </div>
  884. </div>
  885. <!-- 公共文件 -->
  886. <div v-if="fileindex == 1">
  887. <div class="py-x-22 mt-12" v-show="isShowTogetherFileList == true">
  888. <div
  889. v-for="(file, index) in myPublicFilesList"
  890. :key="index"
  891. @dblclick="fileClickColl(file)"
  892. >
  893. <div class="yiyun_wenjian_list" v-if=" file.status != 3">
  894. <div
  895. class="defultImage-mid"
  896. :class="
  897. file.extension +'-mid'+
  898. (file.status == '2' ? ' opitcy1' : ' opitcy0')
  899. + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')
  900. "
  901. v-if="
  902. file.extension != 'jpg' &&
  903. file.extension != 'png' &&
  904. file.extension != 'bmp' &&
  905. file.extension != 'gif' &&
  906. file.extension != 'jpeg'
  907. "
  908. @contextmenu.prevent.stop="rightShowMenu($event, file, 3)"
  909. ></div>
  910. <div
  911. class="defultImage-mid img_bg-mid"
  912. :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':'')"
  913. v-if="
  914. file.extension == 'jpg' ||
  915. file.extension == 'png' ||
  916. file.extension == 'bmp' ||
  917. file.extension == 'gif' ||
  918. file.extension == 'jpeg'
  919. "
  920. @contextmenu.prevent.stop="rightShowMenu($event, file, 3)"
  921. >
  922. <div class="file_Imgbox-mid">
  923. <img v-lazy="imgSrc + file.alias" alt class="file_Img" />
  924. </div>
  925. </div>
  926. <div class="eidtTip" v-if="file.status == 0 || file.status == 1">工作中</div>
  927. <div
  928. class="downloadIcon"
  929. v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&&isClient && !file.isDownload && file.status == 2"
  930. @click="clientDownLoad(file,2)"
  931. >
  932. <img src="/static/img/download.svg" alt />
  933. </div>
  934. <div
  935. class="downloadIcon"
  936. v-if="isClient && file.isDownload && file.downloadStatus == 1"
  937. >
  938. <span>
  939. <i class="el-icon-loading largeicon"></i>
  940. <div class="minifont">下载中</div>
  941. </span>
  942. </div>
  943. <!-- <div class="eidtTip" v-if="file.status == 1">
  944. 编辑中
  945. </div>-->
  946. <div class="eidtTip" v-if="file.status == 3">文件已取消协同</div>
  947. <strong
  948. :class="
  949. 'yiyunwenjian_name ' +
  950. (file.status == 2 ? ' opitcy1' : ' opitcy0')
  951. "
  952. :title="file.archName + '.' + file.extension"
  953. >
  954. <i class="yiyun_file_newlabel mr-10" v-show="false"></i>
  955. {{ file.archName }}
  956. </strong>
  957. <span class="yiyunwenjian_infodesc">
  958. {{
  959. file.folderName
  960. }}
  961. </span>
  962. <span class="yiyunwenjian_infodesc">{{file.cnName}}创建</span>
  963. <div class="top_optionBar">
  964. <el-dropdown>
  965. <span class="el-dropdown-link">
  966. <i
  967. v-if="file.status == 2"
  968. class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"
  969. ></i>
  970. </span>
  971. <el-dropdown-menu slot="dropdown">
  972. <el-dropdown-item
  973. @click.native="openOffice(file)"
  974. v-if="file.status == 2 &&
  975. (file.extension == 'pdf' ||
  976. file.extension == 'xls' ||
  977. file.extension == 'xlsx' ||
  978. file.extension == 'doc' ||
  979. file.extension == 'docx' ||
  980. file.extension == 'ppt' ||
  981. file.extension == 'pptx' ||
  982. file.extension == 'txt')
  983. "
  984. >
  985. <span>在线查看</span>
  986. </el-dropdown-item>
  987. <el-dropdown-item
  988. @click.native="fileClickColl(file)"
  989. v-if="isClient && file.status == 2 && file.downloadStatus == 2"
  990. >
  991. <span>打开</span>
  992. </el-dropdown-item>
  993. <el-dropdown-item
  994. @click.native="fileClickSelectColl(file)"
  995. v-if="isClient && file.status == 2 && file.downloadStatus == 2"
  996. >
  997. <span>打开方式</span>
  998. </el-dropdown-item>
  999. <el-dropdown-item
  1000. divided
  1001. @click.native="downLoadMyFile(file)"
  1002. v-if="file.status == 2 && file.extension !='map' && file.extension!='supermap'"
  1003. >
  1004. <span>下载至本地</span>
  1005. </el-dropdown-item>
  1006. </el-dropdown-menu>
  1007. </el-dropdown>
  1008. </div>
  1009. </div>
  1010. </div>
  1011. </div>
  1012. <!-- 表格 -->
  1013. <div v-show="isShowTogetherFileList == false">
  1014. <template>
  1015. <el-table :data="myPublicFilesList" style="width: 100%" class="fileTable">
  1016. <el-table-column prop="archName" label="文件名称" align="left"></el-table-column>
  1017. <el-table-column prop="extension" align="left" label="文件分类"></el-table-column>
  1018. <el-table-column prop="modifyTime" align="left" label="修改日期"></el-table-column>
  1019. <el-table-column prop="createTime" align="left" label="创建时间"></el-table-column>
  1020. <el-table-column prop="strSize" align="left" label="文件大小"></el-table-column>
  1021. </el-table>
  1022. </template>
  1023. </div>
  1024. </div>
  1025. <div v-if="fileindex == 2">
  1026. <div class="py-x-22 mt-12" v-show="isShowTogetherFileList == true">
  1027. <div
  1028. v-for="(file, index) in myPublicFilesList"
  1029. :key="index"
  1030. @dblclick="fileClickColl(file)"
  1031. >
  1032. <div class="yiyun_wenjian_list">
  1033. <div
  1034. class="defultImage-mid"
  1035. :class="
  1036. file.extension + '-mid'+
  1037. (file.status == '2' ? ' opitcy1' : ' opitcy0')
  1038. + (file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&& isClient && !file.isDownload && (file.status == 0 || file.status == 2)?' toumin':'')
  1039. "
  1040. v-if="
  1041. file.extension != 'jpg' &&
  1042. file.extension != 'png' &&
  1043. file.extension != 'bmp' &&
  1044. file.extension != 'gif' &&
  1045. file.extension != 'jpeg'
  1046. "
  1047. @contextmenu.prevent.stop="rightShowMenu($event, file, 3)"
  1048. ></div>
  1049. <div
  1050. class="defultImage-mid img_bg-mid"
  1051. :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':'')"
  1052. v-if="
  1053. file.extension == 'jpg' ||
  1054. file.extension == 'png' ||
  1055. file.extension == 'bmp' ||
  1056. file.extension == 'gif' ||
  1057. file.extension == 'jpeg'
  1058. "
  1059. @contextmenu.prevent.stop="rightShowMenu($event, file, 3)"
  1060. >
  1061. <div class="file_Imgbox-mid">
  1062. <img v-lazy="imgSrc + file.alias" alt class="file_Img" />
  1063. </div>
  1064. </div>
  1065. <div class="eidtTip" v-if="file.status == 0 || file.status == 1">工作中</div>
  1066. <div
  1067. class="downloadIcon"
  1068. v-if="file.extension!='map'&&file.extension!='svfzip'&&file.extension!='supermap'&&isClient && !file.isDownload && file.status == 2"
  1069. @click="clientDownLoad(file,2)"
  1070. >
  1071. <img src="/static/img/download.svg" alt />
  1072. </div>
  1073. <div
  1074. class="downloadIcon"
  1075. v-if="isClient && file.isDownload && file.downloadStatus == 1"
  1076. >
  1077. <span>
  1078. <i class="el-icon-loading largeicon"></i>
  1079. <div class="minifont">下载中</div>
  1080. </span>
  1081. </div>
  1082. <!-- <div class="eidtTip" v-if="file.status == 1">
  1083. 编辑中
  1084. </div>-->
  1085. <div class="eidtTip" v-if="file.status == 3">文件已取消协同</div>
  1086. <strong
  1087. :class="
  1088. 'yiyunwenjian_name ' +
  1089. (file.status == 2 ? ' opitcy1' : ' opitcy0')
  1090. "
  1091. >
  1092. <i
  1093. class="yiyun_file_newlabel mr-10"
  1094. :title="file.archName + '.' + file.extension"
  1095. ></i>
  1096. {{ file.archName }}
  1097. </strong>
  1098. <span class="yiyunwenjian_infodesc">
  1099. {{
  1100. file.folderName
  1101. }}
  1102. </span>
  1103. <div class="top_optionBar">
  1104. <el-dropdown>
  1105. <span class="el-dropdown-link">
  1106. <i
  1107. v-if="file.status == 2"
  1108. class="icon iconfont icon_small-icon_small_wenjianshezhi settingIcon"
  1109. ></i>
  1110. </span>
  1111. <el-dropdown-menu slot="dropdown">
  1112. <el-dropdown-item
  1113. @click.native="openOffice(file)"
  1114. v-if="file.status == 2 &&
  1115. (file.extension == 'pdf' ||
  1116. file.extension == 'xls' ||
  1117. file.extension == 'xlsx' ||
  1118. file.extension == 'doc' ||
  1119. file.extension == 'docx' ||
  1120. file.extension == 'ppt' ||
  1121. file.extension == 'pptx' ||
  1122. file.extension == 'txt')
  1123. "
  1124. >
  1125. <span>在线查看</span>
  1126. </el-dropdown-item>
  1127. <el-dropdown-item
  1128. @click.native="fileClickColl(file)"
  1129. v-if="isClient && file.status == 2 && file.downloadStatus == 2"
  1130. >
  1131. <span>打开</span>
  1132. </el-dropdown-item>
  1133. <el-dropdown-item
  1134. @click.native="fileClickSelectColl(file)"
  1135. v-if="isClient && file.status == 2 && file.downloadStatus == 2"
  1136. >
  1137. <span>打开方式</span>
  1138. </el-dropdown-item>
  1139. <el-dropdown-item
  1140. divided
  1141. @click.native="downLoadMyFile(file)"
  1142. v-if="file.status == 2 && file.extension !='map' && file.extension!='supermap'"
  1143. >
  1144. <span>下载至本地</span>
  1145. </el-dropdown-item>
  1146. </el-dropdown-menu>
  1147. </el-dropdown>
  1148. </div>
  1149. </div>
  1150. </div>
  1151. </div>
  1152. <!-- 表格 -->
  1153. <div v-show="isShowTogetherFileList == false">
  1154. <template>
  1155. <el-table :data="myPublicFilesList" style="width: 100%" class="fileTable">
  1156. <el-table-column prop="archName" label="文件名称" align="left"></el-table-column>
  1157. <el-table-column prop="extension" align="left" label="文件分类"></el-table-column>
  1158. <el-table-column prop="modifyTime" align="left" label="修改日期"></el-table-column>
  1159. <el-table-column prop="createTime" align="left" label="创建时间"></el-table-column>
  1160. <el-table-column prop="strSize" align="left" label="文件大小"></el-table-column>
  1161. </el-table>
  1162. </template>
  1163. </div>
  1164. </div>
  1165. </div>
  1166. <div class="clear"></div>
  1167. <!-- 应用实例列表 -->
  1168. <div class="yinyong_warpBox hidescollbar" v-if="myCollaborationApp.length > 0">
  1169. <div class="yiyun_section_top" id="bignav">
  1170. <div class="section_item fl section_item_aside_fl">
  1171. <h3 class="yiyuntitle">应用实例</h3>
  1172. </div>
  1173. </div>
  1174. <div class="clear"></div>
  1175. <!-- 应用列表(缩略图) -->
  1176. <div class="yiyun_row scollbarBox py-x-22">
  1177. <div v-for="(instance, index) in myCollaborationApp" :key="index">
  1178. <div class="yiyun_wenjian_list">
  1179. <div class="defultImage img_bg" @click="openApp(instance)">
  1180. <div class="file_Imgbox">
  1181. <img
  1182. v-if="instance.appType == 1"
  1183. src="../../../static/img/AppHeadImg/appImg_08.png"
  1184. style="width:90px;"
  1185. />
  1186. <img
  1187. v-if="instance.appType == 2"
  1188. src="../../../static/img/AppHeadImg/appImg_09.png"
  1189. style="width:90px;"
  1190. />
  1191. <img
  1192. v-if="instance.appType == 3"
  1193. src="../../../static/img/AppHeadImg/appImg_10.png"
  1194. style="width:90px;"
  1195. />
  1196. </div>
  1197. </div>
  1198. <strong
  1199. class="yiyunwenjian_name"
  1200. :title="instance.showName"
  1201. >{{ instance.showName }}</strong>
  1202. </div>
  1203. </div>
  1204. </div>
  1205. </div>
  1206. </div>
  1207. </div>
  1208. <div class="showdowfix" id="bottomoShodow" v-show="showadow"></div>
  1209. </div>
  1210. <!-- 右键菜单 -->
  1211. <div
  1212. v-show="rightMenuvisible"
  1213. :style="{ left: left + 'px', top: top + 'px' }"
  1214. class="contextmenu"
  1215. >
  1216. <ul class="rightMenu" v-if="showType == 1">
  1217. <li
  1218. @click="openOffice(BtnRightFile)"
  1219. v-if="
  1220. (BtnRightFile.extension == 'pdf' ||
  1221. BtnRightFile.extension == 'xls' ||
  1222. BtnRightFile.extension == 'xlsx' ||
  1223. BtnRightFile.extension == 'doc' ||
  1224. BtnRightFile.extension == 'docx' ||
  1225. BtnRightFile.extension == 'ppt' ||
  1226. BtnRightFile.extension == 'pptx' ||
  1227. BtnRightFile.extension == 'txt') && isShowMenuFile==true
  1228. "
  1229. >在线查看</li>
  1230. <li
  1231. @click="openOffice(BtnRightFile)"
  1232. v-else-if="
  1233. (BtnRightFile.extension == 'pdf' ||
  1234. BtnRightFile.extension == 'xls' ||
  1235. BtnRightFile.extension == 'xlsx' ||
  1236. BtnRightFile.extension == 'doc' ||
  1237. BtnRightFile.extension == 'docx' ||
  1238. BtnRightFile.extension == 'ppt' ||
  1239. BtnRightFile.extension == 'pptx' ||
  1240. BtnRightFile.extension == 'txt')"
  1241. >在线查看</li>
  1242. <li
  1243. @click="fileClick(BtnRightFile)"
  1244. v-if="isClient && BtnRightFile.downloadStatus == 2 && isShowMenuFile"
  1245. >打开</li>
  1246. <li
  1247. @click="fileClickSelect(BtnRightFile)"
  1248. v-if="isClient && BtnRightFile.downloadStatus == 2 && !isShowMenuFile"
  1249. >打开方式</li>
  1250. <div class="line" v-if="isClient"></div>
  1251. <li
  1252. @click="setFileStatus(BtnRightFile, 2, '更新为已完成',1)"
  1253. v-if="(BtnRightFile.status == 1 || BtnRightFile.status == 0) && isShowMenuFile==true"
  1254. >搞定</li>
  1255. <li
  1256. @click="setFileStatus(BtnRightFile, 2, '更新为已完成',1)"
  1257. v-else-if="(BtnRightFile.status == 1 || BtnRightFile.status == 0)"
  1258. >搞定</li>
  1259. <li
  1260. @click="setFileStatus(BtnRightFile, 0, '已开启文件协同',2)"
  1261. v-if="isUseShare && BtnRightFile.status == 3 && !isShowMenuFile"
  1262. >开启协同</li>
  1263. <li
  1264. @click="setFileStatus(BtnRightFile, 0, '已开启文件协同',2)"
  1265. v-else-if="isUseShare && BtnRightFile.status == 3"
  1266. >开启协同</li>
  1267. <li
  1268. @click="setFileStatus(BtnRightFile, 3, '文件已取消协同',1)"
  1269. v-if="isUseShare && BtnRightFile.status != 3 && isShowMenuFile==true"
  1270. >取消协同</li>
  1271. <li
  1272. @click="setFileStatus(BtnRightFile, 3, '文件已取消协同',1)"
  1273. v-else-if="isUseShare && BtnRightFile.status != 3"
  1274. >取消协同</li>
  1275. <div class="line"></div>
  1276. <li @click="createMilestone(BtnRightFile)" v-if="!isShowMenuFile">保存历史文件</li>
  1277. <li @click="showFileMilestone(BtnRightFile)" v-if="!isShowMenuFile">选择历史文件</li>
  1278. <div class="line"></div>
  1279. <li @click="copyFile(BtnRightFile)" v-if="isShowMenuFile==true">建立副本</li>
  1280. <li @click="copyFile(BtnRightFile)" v-else-if="!isShowMenuFile==true">建立副本</li>
  1281. <div class="line"></div>
  1282. <li
  1283. @click="updateToPublicFile(BtnRightFile,0)"
  1284. v-if="isUseCommon && BtnRightFile.commonStatus == 0 && nowFolderName != '公共文件夹' && !isShowMenuFile"
  1285. >提交至项目公共文件夹</li>
  1286. <li
  1287. @click="updateToPublicFile(BtnRightFile,1)"
  1288. v-if="isUseCommon && BtnRightFile.commonStatus == 1 && !isShowMenuFile"
  1289. >取消至项目公共文件夹</li>
  1290. <li
  1291. @click="updateToPublicFile(BtnRightFile,1)"
  1292. v-else-if="isUseCommon && BtnRightFile.commonStatus == 1"
  1293. >取消至项目公共文件夹</li>
  1294. <li @click="copyAndMoveFolder(BtnRightFile, 'move')" v-if="!isShowMenuFile">转移至其他工作</li>
  1295. <li @click="copyAndMoveFolder(BtnRightFile, 'copy')" v-if="isShowMenuFile==true">复制至其他工作</li>
  1296. <li
  1297. @click="copyAndMoveFolder(BtnRightFile, 'copy')"
  1298. v-else-if="!isShowMenuFile==true"
  1299. >复制至其他工作</li>
  1300. <div class="line"></div>
  1301. <li
  1302. @click="downLoadMyFile(BtnRightFile)"
  1303. v-if="BtnRightFile.extension !='map' && BtnRightFile.extension !='supermap' && isShowMenuFile==true"
  1304. >下载至本地</li>
  1305. <li
  1306. @click="downLoadMyFile(BtnRightFile)"
  1307. v-else-if="BtnRightFile.extension !='map' && BtnRightFile.extension !='supermap' && !isShowMenuFile==true"
  1308. >下载至本地</li>
  1309. <li @click="shareMyFile(BtnRightFile)" v-if="BtnRightFile.extension == 'svfzip' ">分享</li>
  1310. <li @click="reNameyMyFile(BtnRightFile)" v-if="!isShowMenuFile">重命名</li>
  1311. <li @click="delMyFile(BtnRightFile)" v-if="!isShowMenuFile">移到回收站</li>
  1312. </ul>
  1313. <!-- 协作文件 -->
  1314. <ul class="rightMenu" v-if="showType == 2">
  1315. <li
  1316. @click="openOffice(BtnRightFile)"
  1317. v-if="BtnRightFile.status == 2 &&
  1318. (BtnRightFile.extension == 'pdf' ||
  1319. BtnRightFile.extension == 'xls' ||
  1320. BtnRightFile.extension == 'xlsx' ||
  1321. BtnRightFile.extension == 'doc' ||
  1322. BtnRightFile.extension == 'docx' ||
  1323. BtnRightFile.extension == 'ppt' ||
  1324. BtnRightFile.extension == 'pptx' ||
  1325. BtnRightFile.extension == 'txt')
  1326. "
  1327. >在线查看</li>
  1328. <li
  1329. @click="fileClickColl(BtnRightFile)"
  1330. v-if="isClient && BtnRightFile.status == 2 && BtnRightFile.downloadStatus == 2"
  1331. >打开</li>
  1332. <li
  1333. @click="fileClickSelectColl(BtnRightFile)"
  1334. v-if="isClient && BtnRightFile.status == 2 && BtnRightFile.downloadStatus == 2"
  1335. >打开方式</li>
  1336. <div class="line" v-if="BtnRightFile.status == 2"></div>
  1337. <li
  1338. @click="openNativeFolder(BtnRightFile)"
  1339. v-if="isClient && BtnRightFile.status == 2"
  1340. >在文件夹中浏览</li>
  1341. <li
  1342. @click="downLoadMyFile(BtnRightFile)"
  1343. v-if="BtnRightFile.status == 2 && BtnRightFile.extension !='map' && BtnRightFile.extension!='supermap'"
  1344. >下载至本地</li>
  1345. </ul>
  1346. <!-- 公共文件 -->
  1347. <ul class="rightMenu" v-if="showType == 3">
  1348. <li
  1349. @click="openOffice(BtnRightFile)"
  1350. v-if="BtnRightFile.status == 2 &&
  1351. (BtnRightFile.extension == 'pdf' ||
  1352. BtnRightFile.extension == 'xls' ||
  1353. BtnRightFile.extension == 'xlsx' ||
  1354. BtnRightFile.extension == 'doc' ||
  1355. BtnRightFile.extension == 'docx' ||
  1356. BtnRightFile.extension == 'ppt' ||
  1357. BtnRightFile.extension == 'pptx' ||
  1358. BtnRightFile.extension == 'txt' )
  1359. "
  1360. >在线查看</li>
  1361. <li
  1362. @click="fileClickColl(BtnRightFile)"
  1363. v-if="isClient && BtnRightFile.status == 2 && BtnRightFile.downloadStatus == 2"
  1364. >打开</li>
  1365. <li
  1366. @click="fileClickSelectColl(BtnRightFile)"
  1367. v-if="isClient && BtnRightFile.status == 2 && BtnRightFile.downloadStatus == 2"
  1368. >打开方式</li>
  1369. <div class="line" v-if="BtnRightFile.status == 2"></div>
  1370. <li
  1371. @click="downLoadMyFile(BtnRightFile)"
  1372. v-if="BtnRightFile.status == 2 && BtnRightFile.extension !='map' && BtnRightFile.extension!='supermap'"
  1373. >下载至本地</li>
  1374. </ul>
  1375. <!--新建文件分组-->
  1376. <ul class="rightMenu" v-if="showType == 4 && isShowMenuFoldergroup==true">
  1377. <li @click="newCreateFolderGroup" v-if="isShowMenuItemCreateFoldergroup==true">新建文件夹</li>
  1378. <li
  1379. @click="newCreateFolderGroup"
  1380. v-else-if="!isShowMenuItemCreateFoldergroup==true"
  1381. >新建文件夹</li>
  1382. <li
  1383. @click="intoFoldergroup(btnRightFoldergoup)"
  1384. v-if="!isShowMenuItemCreateFoldergroup==true"
  1385. >打开</li>
  1386. <!-- <li @click="copyAndMoveFoldergroup(btnRightFoldergoup,'move')">转移至其他工作</li>
  1387. <li @click="copyAndMoveFoldergroup(btnRightFoldergoup,'copy')">复制至其它工作</li>-->
  1388. <li
  1389. @click="renameFoldergroup(btnRightFoldergoup)"
  1390. v-if="!isShowMenuItemCreateFoldergroup==true"
  1391. >重命名</li>
  1392. <li
  1393. @click="removeRecycle(btnRightFoldergoup)"
  1394. v-if="!isShowMenuItemCreateFoldergroup==true"
  1395. >移到回收站</li>
  1396. </ul>
  1397. </div>
  1398. </div>
  1399. </div>
  1400. <!-- 新建文件弹框 -->
  1401. <div class="dia_8" v-show="isShowNewFiledialog == true" @click="hideNewFiledialog"></div>
  1402. <div class="newfiledialog" v-show="isShowNewFiledialog == true">
  1403. <div class="dragareaBox">
  1404. <div class="dragarea_top uploadBtn" v-if="!isClient">
  1405. <img src="static\img\upload.png" alt class="uploadBtnImg" />
  1406. <span class="dragarea_area" @click="showNewFiledialog">
  1407. <file-Uploader
  1408. :multiple="true"
  1409. label="点击上传本地文件"
  1410. :auto="true"
  1411. :dragfile="true"
  1412. :accept="acceptType"
  1413. ref="webUploadlist2"
  1414. :btnId="btnUploadFileId"
  1415. :projId="uploadProjId"
  1416. :companyId="uploadCompId"
  1417. :typeId="uploadTypeProj"
  1418. @upload-success="uploadFileSuccess"
  1419. :url="chunkUploadUrl"
  1420. class="addUpfile2 dragbox"
  1421. ></file-Uploader>
  1422. </span>
  1423. </div>
  1424. <div class="dragarea_top uploadBtn" v-if="isClient" @click="clientUpload">
  1425. <img src="static\img\upload.png" alt class="uploadBtnImg" />
  1426. <span class="uploadText">点击上传本地文件</span>
  1427. </div>
  1428. <div class="creatbox_mid mt-10">
  1429. <div class="diahead">
  1430. <div class="fl">
  1431. <b class="diaTitle">创建 云应用文件</b>
  1432. </div>
  1433. <div class="fr">
  1434. <!-- <i class="colosbtn" @click="hideNewFiledialog"></i> -->
  1435. </div>
  1436. </div>
  1437. <div class="yiyun_line2"></div>
  1438. <div>
  1439. <ul class="yiyong_list_dalog">
  1440. <li v-for="(app, appIndex) in listAppComputed" :key="appIndex">
  1441. <img
  1442. v-if="app.appType == 1"
  1443. src="../../../static/img/AppHeadImg/appImg_08.png"
  1444. class="spanImg"
  1445. :title="app.appName"
  1446. @click="createAppInstance(app)"
  1447. />
  1448. <img
  1449. v-if="app.appType == 2"
  1450. src="../../../static/img/AppHeadImg/appImg_09.png"
  1451. class="spanImg"
  1452. :title="app.appName"
  1453. @click="createAppInstance(app)"
  1454. />
  1455. <img
  1456. v-if="app.appType == 3"
  1457. src="../../../static/img/AppHeadImg/appImg_10.png"
  1458. class="spanImg"
  1459. :title="app.appName"
  1460. @click="createAppInstance(app)"
  1461. />
  1462. <span class="spanTitle">{{ app.appName }}</span>
  1463. </li>
  1464. <li v-if="listAppComputed.length < 1">
  1465. <span class="spanTitle">当前工作下应用未启用</span>
  1466. </li>
  1467. </ul>
  1468. </div>
  1469. </div>
  1470. <div class="creatbox_mid mt-10" v-if="this.listCloudFiles.length != 0">
  1471. <div class="diahead">
  1472. <div class="fl">
  1473. <b class="diaTitle">创建 云文件</b>
  1474. </div>
  1475. <div class="fr">
  1476. <!-- <i class="colosbtn" @click="hideNewFiledialog"></i> -->
  1477. </div>
  1478. </div>
  1479. <div class="yiyun_line2"></div>
  1480. <div class="mlr-10">
  1481. <ul class="cardlistbox">
  1482. <li
  1483. @click="fileCloudClick(item)"
  1484. v-for="(item, index) in listCloudFiles"
  1485. :key="index"
  1486. >
  1487. <div
  1488. class="listimg"
  1489. :title="item.name"
  1490. v-if="item.extension == 'doc' || item.extension == 'docx'
  1491. || item.extension == 'dwg' || item.extension == 'dxf'
  1492. || item.extension == 'gif' || item.extension == 'jpeg'
  1493. || item.extension == 'jpg' || item.extension == 'max'
  1494. || item.extension == 'nwc' || item.extension == 'pdf'
  1495. || item.extension == 'png' || item.extension == 'ppt'
  1496. || item.extension == 'pptx' || item.extension == 'rar'
  1497. || item.extension == 'rvt' || item.extension == 'skp'
  1498. || item.extension == 'txt' || item.extension == 'xls'
  1499. || item.extension == 'xlsx' || item.extension == 'xmind'
  1500. || item.extension == 'zip' "
  1501. >
  1502. <img :src="'/static/img/files/file_sample_' + item.extension + '.svg'" alt />
  1503. </div>
  1504. <div
  1505. class="listimg"
  1506. :title="item.name"
  1507. v-if="item.extension != 'doc' && item.extension != 'docx'
  1508. && item.extension != 'dwg' && item.extension != 'dxf'
  1509. && item.extension != 'gif' && item.extension != 'jpeg'
  1510. && item.extension != 'jpg' && item.extension != 'max'
  1511. && item.extension != 'nwc' && item.extension != 'pdf'
  1512. && item.extension != 'png' && item.extension != 'ppt'
  1513. && item.extension != 'pptx' && item.extension != 'rar'
  1514. && item.extension != 'rvt' && item.extension != 'skp'
  1515. && item.extension != 'txt' && item.extension != 'xls'
  1516. && item.extension != 'xlsx' && item.extension != 'xmind'
  1517. && item.extension != 'zip' "
  1518. >
  1519. <img :src="'/static/img/files/file_sample_weizhi.svg'" alt />
  1520. <span class="houzuidinwei">{{item.extension}}</span>
  1521. </div>
  1522. </li>
  1523. </ul>
  1524. </div>
  1525. </div>
  1526. <div class="creatbox_mid mt-10" v-if="this.ListTempFiles != 0">
  1527. <div class="diahead">
  1528. <div class="fl">
  1529. <b>从样板文件中创建</b>
  1530. </div>
  1531. <div class="fr"></div>
  1532. </div>
  1533. <div class="yiyun_line2"></div>
  1534. <div class="mlr-10">
  1535. <ul class="listTemplateList">
  1536. <li
  1537. v-for="(item, index) in ListTempFiles"
  1538. :key="index"
  1539. :class="selctedIndex==index?'slected':''"
  1540. @click="fileTempClick(item,index)"
  1541. >
  1542. <span class="listTemplateTextBig" :title="item.extension">{{item.extension}}</span>
  1543. <span class="listTemplateText">{{item.fileName}}</span>
  1544. </li>
  1545. </ul>
  1546. </div>
  1547. </div>
  1548. <!-- 从样板文件中创建 旧版 -->
  1549. <div class="creatbox_mid mt-10" v-if="this.ListTempFiles != 0" v-show="false">
  1550. <div class="diahead">
  1551. <div class="fl">
  1552. <b class="diaTitle">从样板文件中创建</b>
  1553. </div>
  1554. <div class="fr"></div>
  1555. </div>
  1556. <div class="yiyun_line2"></div>
  1557. <div class="mlr-10">
  1558. <ul class="cardlistbox">
  1559. <li @click="fileTempClick(item)" v-for="(item, index) in ListTempFiles" :key="index">
  1560. <div
  1561. class="listimg"
  1562. :title="item.name"
  1563. v-if="item.extension == 'doc'
  1564. || item.extension == 'docx'
  1565. || item.extension == 'dwg' || item.extension == 'dxf'
  1566. || item.extension == 'gif' || item.extension == 'jpeg'
  1567. || item.extension == 'jpg' || item.extension == 'max'
  1568. || item.extension == 'nwc' || item.extension == 'pdf'
  1569. || item.extension == 'png' || item.extension == 'ppt'
  1570. || item.extension == 'pptx' || item.extension == 'rar'
  1571. || item.extension == 'rvt' || item.extension == 'skp'
  1572. || item.extension == 'txt' || item.extension == 'xls'
  1573. || item.extension == 'xlsx' || item.extension == 'xmind'
  1574. || item.extension == 'zip' "
  1575. >
  1576. <img :src="'/static/img/files/file_sample_' + item.extension + '.svg'" alt />
  1577. </div>
  1578. <div
  1579. class="listimg"
  1580. :title="item.name"
  1581. v-if="item.extension != 'doc' && item.extension != 'docx'
  1582. && item.extension != 'dwg' && item.extension != 'dxf'
  1583. && item.extension != 'gif' && item.extension != 'jpeg'
  1584. && item.extension != 'jpg' && item.extension != 'max'
  1585. && item.extension != 'nwc' && item.extension != 'pdf'
  1586. && item.extension != 'png' && item.extension != 'ppt'
  1587. && item.extension != 'pptx' && item.extension != 'rar'
  1588. && item.extension != 'rvt' && item.extension != 'skp'
  1589. && item.extension != 'txt' && item.extension != 'xls'
  1590. && item.extension != 'xlsx' && item.extension != 'xmind'
  1591. && item.extension != 'zip' "
  1592. >
  1593. <img :src="'/static/img/files/file_sample_weizhi.svg'" alt />
  1594. <span class="houzuidinwei">{{item.extension}}</span>
  1595. </div>
  1596. </li>
  1597. </ul>
  1598. </div>
  1599. </div>
  1600. </div>
  1601. </div>
  1602. <file-Uploader
  1603. v-show="showDrag"
  1604. :multiple="true"
  1605. label="点击上传本地文件"
  1606. :auto="true"
  1607. :dragfile="true"
  1608. :accept="acceptType"
  1609. ref="webUploadlist3"
  1610. :btnId="btnDragUploadFileId"
  1611. :projId="uploadProjId"
  1612. :companyId="uploadCompId"
  1613. :typeId="uploadTypeProj"
  1614. :dragTag="dragTag"
  1615. @upload-success="uploadFileSuccess"
  1616. @upload-start="uploadBefore"
  1617. :url="chunkUploadUrl"
  1618. class="addUpfile2 dragbox"
  1619. style="height:0;overflow:hidden"
  1620. ></file-Uploader>
  1621. <el-dialog
  1622. title="文件名称"
  1623. :visible.sync="dialogcreateFlie"
  1624. width="460px"
  1625. :close-on-click-modal="false"
  1626. >
  1627. <el-form>
  1628. <el-form-item>
  1629. <el-input></el-input>
  1630. </el-form-item>
  1631. </el-form>
  1632. <div slot="footer" class="dialog-footer">
  1633. <el-button @click="dialogcreateFlie = false">取 消</el-button>
  1634. <el-button type="primary" @click="dialogcreateFlie = false">确 定</el-button>
  1635. </div>
  1636. </el-dialog>
  1637. <!-- 版本--历史文件 -->
  1638. <el-dialog
  1639. title="设置协同历史文件"
  1640. :visible.sync="dialogFileHistory"
  1641. width="672px"
  1642. class="linedia footernobianju"
  1643. :close-on-click-modal="false"
  1644. >
  1645. <div>
  1646. <div class="tankuangaodu translatescoall">
  1647. <span class="visionlistTitle">当前协作版本</span>
  1648. <ul class="visionlist">
  1649. <li>
  1650. <el-checkbox
  1651. @change="currMilestoneChange"
  1652. v-model="currentMilestone.check"
  1653. class="largecheck ml-8"
  1654. >
  1655. <span
  1656. class="widthfile midtext"
  1657. :title="currentMilestone.archName"
  1658. >{{currentMilestone.archName}}</span>
  1659. <span class="widthtext1 minitext">版本{{ currentMilestone.number }}</span>
  1660. <span class="widthtext minitext">{{currentMilestone.strCreateTime}}</span>
  1661. <a
  1662. href="javascript:;"
  1663. @click="openMilstoneFile(currentMilestone)"
  1664. class="widthtext1 minitext link"
  1665. >查看</a>
  1666. </el-checkbox>
  1667. </li>
  1668. </ul>
  1669. <span class="visionlistTitle">历史文件</span>
  1670. <ul class="visionlist">
  1671. <li v-for="(item, index) in listMilestones" :key="index">
  1672. <el-checkbox
  1673. @change="milestoneChange(item)"
  1674. v-model="item.check"
  1675. class="largecheck ml-8"
  1676. >
  1677. <span class="widthfile midtext" :title="item.archName">{{item.archName}}</span>
  1678. <span class="widthtext1 minitext">版本{{ item.number }}</span>
  1679. <span class="widthtext minitext">{{ item.strCreateTime }}</span>
  1680. <a
  1681. href="javascript:;"
  1682. @click="openMilstoneFile(item)"
  1683. class="widthtext1 minitext link"
  1684. >查看</a>
  1685. </el-checkbox>
  1686. </li>
  1687. </ul>
  1688. </div>
  1689. </div>
  1690. <div slot="footer" class="dialog-footer">
  1691. <div class="pxline mb-15"></div>
  1692. <div class="bianjubtn">
  1693. <el-button class="largeBtn" @click="dialogFileHistory = false">取 消</el-button>
  1694. <el-button class="largeBtn" type="primary" @click="setMilestones">选 定</el-button>
  1695. </div>
  1696. </div>
  1697. </el-dialog>
  1698. <!-- 创建云文件命名弹框 -->
  1699. <el-dialog
  1700. :title="createCloudFileTile"
  1701. :visible.sync="dialogNewCloudFileVisible"
  1702. width="460px"
  1703. @submit.native.prevent
  1704. :close-on-click-modal="false"
  1705. >
  1706. <el-form>
  1707. <el-form-item label>
  1708. <div
  1709. class="appImgiconbox"
  1710. v-if=" fileNameExt == '.doc' || fileNameExt == '.docx'
  1711. || fileNameExt == '.dwg' || fileNameExt == '.dxf'
  1712. || fileNameExt == '.gif' || fileNameExt == '.jpeg'
  1713. || fileNameExt == '.jpg' || fileNameExt == '.max'
  1714. || fileNameExt == '.nwc' || fileNameExt == '.pdf'
  1715. || fileNameExt == '.png' || fileNameExt == '.ppt'
  1716. || fileNameExt == '.pptx' || fileNameExt == '.rar'
  1717. || fileNameExt == '.rvt' || fileNameExt == '.skp'
  1718. || fileNameExt == '.txt' || fileNameExt == '.xls'
  1719. || fileNameExt == '.xlsx' || fileNameExt == '.xmind'
  1720. || fileNameExt == '.zip' "
  1721. >
  1722. <img :src="'/static/img/AppHeadImg/a' + fileNameExt + '.png' " alt />
  1723. </div>
  1724. <div
  1725. class="appImgiconbox"
  1726. v-if=" fileNameExt != '.doc' && fileNameExt != '.docx'
  1727. && fileNameExt != '.dwg' && fileNameExt != '.dxf'
  1728. && fileNameExt != '.gif' && fileNameExt != '.jpeg'
  1729. && fileNameExt != '.jpg' && fileNameExt != '.max'
  1730. && fileNameExt != '.nwc' && fileNameExt != '.pdf'
  1731. && fileNameExt != '.png' && fileNameExt != '.ppt'
  1732. && fileNameExt != '.pptx' && fileNameExt != '.rar'
  1733. && fileNameExt != '.rvt' && fileNameExt != '.skp'
  1734. && fileNameExt != '.txt' && fileNameExt != '.xls'
  1735. && fileNameExt != '.xlsx' && fileNameExt != '.xmind'
  1736. && fileNameExt != '.zip' "
  1737. >
  1738. <img src="/static/img/AppHeadImg/a.png" alt />
  1739. </div>
  1740. <div class="centertext">{{ fileNameBefore }}{{ createCloudFileName }}{{ fileNameExt }}</div>
  1741. <el-input v-model="createCloudFileName" @keyup.enter.native="createFileSure"></el-input>
  1742. </el-form-item>
  1743. </el-form>
  1744. <div slot="footer" class="dialog-footer">
  1745. <el-button @click="dialogNewCloudFileVisible = false">取 消</el-button>
  1746. <el-button type="primary" @click="createFileSure">确 定</el-button>
  1747. </div>
  1748. </el-dialog>
  1749. <!-- 创建超图实例弹框 -->
  1750. <el-dialog
  1751. title="创建超图应用"
  1752. :visible.sync="dialogNewSuperMapVisible"
  1753. width="460px"
  1754. :close-on-click-modal="false"
  1755. >
  1756. <el-form>
  1757. <el-form-item label="应用名称">
  1758. <el-input v-model="newSuperMap.showName"></el-input>
  1759. </el-form-item>
  1760. <el-form-item label="链接地址">
  1761. <el-input v-model="newSuperMap.description"></el-input>
  1762. </el-form-item>
  1763. </el-form>
  1764. <div slot="footer" class="dialog-footer">
  1765. <el-button @click="dialogNewSuperMapVisible = false">取 消</el-button>
  1766. <el-button type="primary" @click="createSuperMapSure">确 定</el-button>
  1767. </div>
  1768. </el-dialog>
  1769. <!-- 创建地图实例弹框 -->
  1770. <el-dialog
  1771. title="创建地图应用"
  1772. :visible.sync="dialogNewMapVisible"
  1773. width="460px"
  1774. :close-on-click-modal="false"
  1775. >
  1776. <el-form>
  1777. <el-form-item label="应用名称">
  1778. <el-input v-model="newMap.showName"></el-input>
  1779. </el-form-item>
  1780. <el-form-item label="详细地址">
  1781. <el-input v-model="newMap.description"></el-input>
  1782. </el-form-item>
  1783. </el-form>
  1784. <div slot="footer" class="dialog-footer">
  1785. <el-button @click="dialogNewMapVisible = false">取 消</el-button>
  1786. <el-button type="primary" @click="createMapSure">确 定</el-button>
  1787. </div>
  1788. </el-dialog>
  1789. <!-- 底部弹框 -->
  1790. <div class="bottomdialog" v-show="isBottomNewProj" style="height: 60px;">
  1791. <div style="margin-top: 10px;" class="yiyun_dialog_left yiyun_zhedie">
  1792. <span class="yiyun_zhankaibtn">
  1793. 关闭
  1794. <!-- <i class="Cicon text_gray icon font_family icon-icon_zhankai" title="展开面板"></i> -->
  1795. </span>
  1796. </div>
  1797. <div class="yiyun_dialog_center">
  1798. <div class="bottomdialogbox_list_head newProject_next_taggle1 line_H60">
  1799. <div class="yiyun_col-6 fl">
  1800. <h3>继续-项目设置</h3>
  1801. </div>
  1802. </div>
  1803. </div>
  1804. <div class="yiyun_dialog_right yiyundialog_close" style="margin-top: 15px;">
  1805. <!-- 关闭 -->
  1806. </div>
  1807. </div>
  1808. <!-- 应用弹框 -->
  1809. <el-dialog
  1810. :title="appInstanceTitle"
  1811. :visible.sync="showApp"
  1812. :fullscreen="true"
  1813. class="fullscreenDia"
  1814. :close-on-click-modal="false"
  1815. @close="closeApp"
  1816. >
  1817. <!-- <b-map-component v-if="instanceType == 1" :address="mapAddress" style="height:calc(100vh - 54px)"></b-map-component> -->
  1818. <Forgeview v-if="instanceType == 2" :forgeModelUrl="forgeShowUrl"></Forgeview>
  1819. <Gismap v-if="instanceType == 3" :gisUrl="gisShowUrl"></Gismap>
  1820. </el-dialog>
  1821. <!-- 应用弹框 -->
  1822. <el-dialog
  1823. :title="officeTitle"
  1824. :visible.sync="showOffice"
  1825. :fullscreen="true"
  1826. class="fullscreenDia"
  1827. :close-on-click-modal="false"
  1828. >
  1829. <Officeview :officeUrl="officeUrl"></Officeview>
  1830. </el-dialog>
  1831. <!-- 应用弹框 -->
  1832. <el-dialog
  1833. title="图片查看"
  1834. :visible.sync="showImage"
  1835. :fullscreen="true"
  1836. class="fullscreenDia"
  1837. :close-on-click-modal="false"
  1838. >
  1839. <Imageview :imageUrl="imageUrl"></Imageview>
  1840. </el-dialog>
  1841. <el-dialog :title="shareForgeTitle" :visible.sync="showShare" :close-on-click-modal="false">
  1842. <span>获取分享链接成功,复制链接分享给好友吧</span>
  1843. <div></div>
  1844. <el-input type="textarea" :autosize="{minRows:3,maxRows:5}" v-model="shareUrl" class="mtb-10"></el-input>
  1845. <div class="right-algin">
  1846. <el-button @click="copyShareUrl">复制链接</el-button>
  1847. <el-button @click="openShareUrl">查看分享</el-button>
  1848. </div>
  1849. </el-dialog>
  1850. <!-- 项目设置与职员指派组件 -->
  1851. <transition-group
  1852. v-on:before-enter="distBeforeEnter"
  1853. v-on:enter="distEnter"
  1854. v-on:leave="distLeave"
  1855. v-bind:css="false"
  1856. >
  1857. <div class="bottomdialogbox bg_baise" v-if="isShowEditStaff" style="color: white;" :key="0">
  1858. <DistWork @offDialog="closeDistWork"></DistWork>
  1859. </div>
  1860. <div
  1861. class="bottomdialogbox bg_baise"
  1862. v-show="isShowProjSetting"
  1863. style="color: white;"
  1864. :key="1"
  1865. >
  1866. <ProjSetting
  1867. :isProjManager="isProjectManager"
  1868. :isSetFolder="isEditProjFolder"
  1869. @offDialog="closeProjSet"
  1870. ></ProjSetting>
  1871. </div>
  1872. </transition-group>
  1873. <el-dialog
  1874. :title="dialogTtile"
  1875. :visible.sync="dialogCopyAndMove"
  1876. width="456px"
  1877. class="eldialogheight"
  1878. >
  1879. <div class="DiacenterBox">
  1880. <el-select v-model="dialogSelectedFolder" filterable placeholder="请选择">
  1881. <el-option
  1882. v-for="(currFolder, index) in listUserFolders"
  1883. :key="index"
  1884. :label="currFolder.folderName"
  1885. :value="currFolder.folderID"
  1886. ></el-option>
  1887. </el-select>
  1888. </div>
  1889. <div slot="footer" class="dialog-footer">
  1890. <el-button @click="dialogCopyAndMove = false">取 消</el-button>
  1891. <el-button type="primary" @click="copyAndMoveToOtherFile()">确 定</el-button>
  1892. </div>
  1893. </el-dialog>
  1894. <!-- 拖动上传 -->
  1895. <div class="drop_areabox" id="drop_area" v-if="isHasDropevent">请将文件拖拽到此区域上传</div>
  1896. <!-- 创建文件夹组 -->
  1897. <el-dialog
  1898. title="创建文件夹"
  1899. @submit.native.prevent
  1900. :visible.sync="dialogNewFolderGroup"
  1901. width="460px"
  1902. :close-on-click-modal="false"
  1903. >
  1904. <el-form>
  1905. <div class="appImgiconbox">
  1906. <img src="/static/img/folder.png" alt />
  1907. </div>
  1908. <el-form-item>
  1909. <el-input v-model="folderGroupData.folderGroupName" @keyup.enter.native="createFolderGroupSure"></el-input>
  1910. </el-form-item>
  1911. </el-form>
  1912. <div slot="footer" class="dialog-footer">
  1913. <el-button @click="dialogNewFolderGroup = false">取 消</el-button>
  1914. <el-button @click="createFolderGroupSure()" type="primary">确 定</el-button>
  1915. </div>
  1916. </el-dialog>
  1917. </div>
  1918. </template>
  1919. <script>
  1920. import commonJs from "../../common/webCommon";
  1921. import forgeview from "../components/forgeview/forgeview.vue";
  1922. import gismap from "../components/gismap/gismap.vue";
  1923. import officeview from "../components/officeview/officeview.vue";
  1924. import imageview from "../components/imageview/imageview.vue";
  1925. // import BMapComponent from "../components/map/bmap";
  1926. import DistWork from "../components_web/distWork/distWork";
  1927. import WorkLine from "../components_web/workLine/workLine";
  1928. import ProjSetting from "../components_web/projSetting/projSetting";
  1929. import FileShare from "../components_web/share_setting/fileshare";
  1930. import draggable from "vuedraggable";
  1931. import vuetify from "vuetify";
  1932. import Vue from "vue";
  1933. Vue.use(vuetify);
  1934. export default {
  1935. props: {
  1936. outWorkSpace: Boolean
  1937. },
  1938. data() {
  1939. return {
  1940. imgSrc: process.env.API_HOST + "archives/cover?path=",
  1941. headSrc: process.env.API_HOST + "archives/head?path=",
  1942. chunkUploadUrl: process.env.API_HOST + "webupload/chunks",
  1943. uploadProjId: sessionStorage.projId,
  1944. acceptType: "*",
  1945. btnUploadFileAppId: "uploadAppFileApp",
  1946. btnUploadFileId: "uploadAppFile",
  1947. btnDragUploadFileId: "uploadAppDragFile",
  1948. showDrag: false,
  1949. loading: false,
  1950. uploadCompId: sessionStorage.companyId,
  1951. uploadTypeProj: 1,
  1952. dragTag: "#app",
  1953. selctedIndex: 1,
  1954. uploadTypeApp: 4, // 企业应用type为4
  1955. // 定义start
  1956. appState: false, //定义开关
  1957. switch2: false, //定义开关
  1958. switch3: false, //定义开关
  1959. switch4: false, //定义开关
  1960. switch5: true, //定义开关
  1961. switch6: false, //定义开关
  1962. switch7: false, //定义开关
  1963. switch8: true, //定义开关
  1964. isShowsearch: false,
  1965. isShowCosearch: false,
  1966. isShowNewFileBtn: false, // 新建文件按钮
  1967. isShowMyFileList: true, // 文件列表显示按钮
  1968. isShowTogetherFileList: true, // 协作文件列表显示按钮
  1969. isShowNewFiledialog: false, // 新建文件弹框
  1970. dialogcreateFlie: false, // 新建文件名称弹框
  1971. isShowRightManager: false, // 右侧项目与应用管理弹框
  1972. dialogNewCloudFileVisible: false, // 创建云文件弹框
  1973. dialogNewAppInstanceVisible: false, // 创建云应用实例弹框
  1974. isShowProjSetting: false,
  1975. isBottomNewProj: false,
  1976. isAloneDistWorkPeople: false, // 分配工作
  1977. isAloneDistWork: false, // 分配人员
  1978. neibianju: "neibianju",
  1979. isHasDropevent: false, //默认不显示上传框
  1980. currentPageType: 0,
  1981. workt: [
  1982. {
  1983. title: "我的文件"
  1984. },
  1985. {
  1986. title: "工作文件"
  1987. }
  1988. ],
  1989. folderFileList: [], // 工作下文件
  1990. //默认neibianju 展开后neibianju1
  1991. //数据初始化-----------
  1992. myFilesList: [],
  1993. listUserFolders: [],
  1994. myCollaborationFilesList: [], //协作文件
  1995. myPublicFilesList: [], //公共文件
  1996. nowProject: "",
  1997. nowFolderIndex: 0,
  1998. nowFolder: "",
  1999. projId: sessionStorage.projId,
  2000. userId: sessionStorage.userId,
  2001. // end
  2002. scrollIndex: 0,
  2003. myCollFilesList: [],
  2004. searchMyFile: "", //搜索我的文件
  2005. searchMyCollaborationFile: "", //搜索协作文件
  2006. listProjFolders: "", // 当前项目下工作
  2007. listNewFolder: "", //自定义文件夹
  2008. showTitle: 1,
  2009. ischeckAll: false, //是否全选
  2010. listDept: [], //项目人员
  2011. activeName: "1",
  2012. newFolderIndex: 1,
  2013. selectedUser: [], // 当前文件夹的已选协作人
  2014. roles: [
  2015. {
  2016. value: 0,
  2017. label: "查看",
  2018. description: "查看"
  2019. },
  2020. {
  2021. value: 1,
  2022. label: "编辑",
  2023. description: "查看和编辑"
  2024. },
  2025. {
  2026. value: 2,
  2027. label: "分配工作",
  2028. description: "编辑和分配工作"
  2029. }
  2030. ],
  2031. workTabs: [
  2032. {
  2033. index: 0,
  2034. label: "协作文件"
  2035. },
  2036. {
  2037. index: 1,
  2038. label: "公共文件"
  2039. }
  2040. ],
  2041. fileindex: 0, // 协作文件与公共文件默认切换状态
  2042. curactive: 0, // 协作文件与公共文件默认样式切换状态
  2043. isShowpageIcon: true, // 协作空间折叠按钮状态
  2044. closepageH: "", // 底部协作文件展开高度 默认为空,展开后高度为closepageH
  2045. rightMenuvisible: false,
  2046. showType: 1, // 右键菜单类型,1 为我的文件,2位协作文件,3为公共文件 ,4为新建文件分组
  2047. top: 0,
  2048. left: 0,
  2049. newFolderLength: 0,
  2050. isShowProManager: 1, // 默认显示项目管理面板
  2051. isShowProInfo: true, // 默认显示项目概况,false为显示编辑概况
  2052. isProjectview: false, // 默认项目概况隐藏
  2053. isEditProjectviewBtn: false,
  2054. isProjectviewbtn: false,
  2055. listProjProp: [], // 项目自定义属性字段集合
  2056. nowFolderName: "",
  2057. isProjectManager: false, // 是否是当前项目负责人
  2058. isFolderManager: false, // 工作负责人
  2059. createCloudFileTile: "", // 创建文件标题
  2060. currentCloudFile: {}, // 当前要创建的云文件
  2061. currentTempFile: {}, // 当前要创建的样板文件
  2062. createType: 1, // 创建云文件类型:1为云文件,2为样板文件
  2063. createCloudFileName: "", // 创建文件名称
  2064. fileNameBefore: "test", // 文件名前缀部分
  2065. fileNameExt: ".png", // 文件名后缀部分
  2066. listApp: [], // 云应用列表
  2067. listFolderApp: [], // 当前工作启用的应用列表
  2068. newAppInstance: {
  2069. appID: "",
  2070. folderID: "",
  2071. showName: "",
  2072. description: "",
  2073. fileName: "",
  2074. alias: "",
  2075. createUserID: ""
  2076. }, // 新建应用实例数据
  2077. createAppInstanceTitle: "", // 创建文件标题
  2078. isShowMyAppInstanceList: true, // 我的应用实例列表
  2079. myAppInstanceList: [], // 我的应用实例数据
  2080. currentApp: {}, // 当前App
  2081. currentAppInstance: {}, // 当前应用实例
  2082. showApp: false, // 显示当前应用
  2083. appInstanceTitle: "", // 查看应用实例标题
  2084. instanceType: 1, // 应用实例类型
  2085. myCollaborationApp: [], // 协作应用实例
  2086. uploadExtention: "", // 上传文件类型
  2087. showOffice: false, // 预览Office文件
  2088. officeTitle: "文件预览", // 预览文件标题
  2089. showImage: false,
  2090. imageUrl: "",
  2091. showShare: false, // 是否显示分享框
  2092. shareUrl: "", // forge分享链接
  2093. shareForgeName: "", // forge分享文件名
  2094. shareForgeTitle: "", // forge分享框标题
  2095. officeUrl: "", // PDF URL
  2096. listCloudFiles: [], // 云文件列表
  2097. ListTempFiles: [], // 样板文件列表
  2098. BtnRightFile: "", //右键文件对象
  2099. dialogCopyAndMove: false, //弹框复制和移动到其它文件夹
  2100. dialogSelectedFolder: "", //选择文件夹值
  2101. dialogTtile: "", //弹框标题
  2102. classif: "", //选择的文件分类
  2103. isShowEditStaff: false, //工作指派
  2104. workheight: "", //工作链高度
  2105. isShowworklink: false, //是否展开我的工作链
  2106. bgTitle: "bgwirte", // bgwirte 为白色
  2107. worklinkHeight: "worklinkHeight", //距离底边55px worklinkHeight
  2108. isOpenMsg: true, //默认开启消息通知
  2109. checkvision: "", //选择版本
  2110. dialogFileHistory: false,
  2111. isonselect: "-2", // -1-------> 表示未完成 0-------> 完成 1-------> 表示已取消 2-------> 表示已更新
  2112. isShowFileShare: false, //是否显示文件交换设置
  2113. listMilestones: [], //
  2114. currentMilestone: "", // 当前版本
  2115. currentMileArchID: "", // 当前版本文件ID
  2116. currentArchID: "", // 当前文件ID
  2117. isCommonPage: false, // 是否是公共文件夹页面
  2118. isUseCommon: true, // 是否开启提交到公共文件夹功能
  2119. isUseShare: true, // 是否开启协同功能
  2120. isUseFolderChange: true, // 是否开启文件夹交换功能
  2121. isEditProjFolder: false, // 是否编辑项目分配
  2122. isCreating: false, // 是否正在创建历史文件,不允许频繁重复操作
  2123. isShowForge: false, // 是否展示forge
  2124. forgeShowUrl: "", // forge展示地址
  2125. gisShowUrl: "", // gis展示地址
  2126. dialogNewMapVisible: false,
  2127. newMap: { showName: "", description: "" },
  2128. dialogNewSuperMapVisible: false,
  2129. newSuperMap: { showName: "", description: "" },
  2130. mapAddress: "北京天安门",
  2131. isClient: process.env.IS_CLIENT, // 是否是客户端
  2132. /**新建文件分组 start*/
  2133. dialogNewFolderGroup: false, //新建文件分组组弹窗
  2134. //文件分组数据
  2135. folderGroupData: {
  2136. folderGroupID: "",
  2137. folderID: "",
  2138. superID: "",
  2139. levelID: "",
  2140. folderGroupName: "",
  2141. childCount: 0,
  2142. createUserID: "",
  2143. createTime: "",
  2144. modifyUserID: "",
  2145. modifyTime: ""
  2146. },
  2147. myListFolderGroups: [], // 我的文件分组数据
  2148. dbClickSelectedFolderGroupData: {}, //双击选中的当前文件夹分组对象
  2149. isShowWorkt: true, //是否显示我的文件和工作文件
  2150. isShowBread: false, //是否显示面包屑
  2151. folderGroupBreads: [], //文件分组面包屑集合
  2152. btnRightFoldergoup: {}, //鼠标右键的文件分组对象
  2153. strFoldergroupCopyOrMove: "", //右键菜单 文件分组 是复制还是移动标记
  2154. strFileOrFoldergroup: "", //右键菜单 移动/复制到其他工作 是文件还是文件分组标记
  2155. draggableData: {}, //记录要移动的数据
  2156. timer: {}, //文件计时器对象
  2157. isShowMenuFoldergroup: true, //右键分组菜单项-显隐
  2158. isShowMenuFile: true, //右键文件菜单项-显隐
  2159. isShowMenuItemCreateFoldergroup: true, //右键分组"新建文件夹"菜单项-显隐
  2160. myFileBreadNodeData: [
  2161. {
  2162. archID: null,
  2163. childCount: 0,
  2164. createTime: "",
  2165. createUserID: "",
  2166. deleted: 0,
  2167. folderGroupID: "myFile",
  2168. folderGroupName: "我的文件",
  2169. folderID: "",
  2170. levelID: "",
  2171. modifyTime: "",
  2172. modifyUserID: "",
  2173. superID: ""
  2174. }
  2175. ],
  2176. myComFileBreadNodeData: [
  2177. {
  2178. archID: null,
  2179. childCount: 0,
  2180. createTime: "",
  2181. createUserID: "",
  2182. deleted: 0,
  2183. folderGroupID: "myComFile",
  2184. folderGroupName: "公共文件",
  2185. folderID: "",
  2186. levelID: "",
  2187. modifyTime: "",
  2188. modifyUserID: "",
  2189. superID: ""
  2190. }
  2191. ],
  2192. showadow:false
  2193. /**新建文件分组 end*/
  2194. };
  2195. },
  2196. created:function(){
  2197. this.myFileBreadNodeData= [
  2198. {
  2199. archID: null,
  2200. childCount: 0,
  2201. createTime: "",
  2202. createUserID: "",
  2203. deleted: 0,
  2204. folderGroupID: "myFile",
  2205. folderGroupName: "我的文件",
  2206. folderID: "",
  2207. levelID: "",
  2208. modifyTime: "",
  2209. modifyUserID: "",
  2210. superID: ""
  2211. }
  2212. ]
  2213. this.myComFileBreadNodeData= [
  2214. {
  2215. archID: null,
  2216. childCount: 0,
  2217. createTime: "",
  2218. createUserID: "",
  2219. deleted: 0,
  2220. folderGroupID: "myComFile",
  2221. folderGroupName: "公共文件",
  2222. folderID: "",
  2223. levelID: "",
  2224. modifyTime: "",
  2225. modifyUserID: "",
  2226. superID: ""
  2227. }
  2228. ]
  2229. },
  2230. mounted: function() {
  2231. window["refreshFiles"] = () => {
  2232. this.refreshPages();
  2233. };
  2234. window["tipUser"] = () => {
  2235. this.tipUser();
  2236. };
  2237. window["setFileStatusSure"] = () => {
  2238. this.setFileStatusSure();
  2239. };
  2240. window.addEventListener("scroll", this.onscroll, true);
  2241. this.loadProjManager();
  2242. this.loadSettings();
  2243. this.listFolders();
  2244. this.updateProjUser();
  2245. window.addEventListener("resize", this.listenBottomHeight, true);
  2246. },
  2247. computed: {
  2248. /**
  2249. * 过滤后的部门列表:去除没有用户数据的部门
  2250. */
  2251. listDeptComputed: function() {
  2252. return this.listDept.filter(function(dept) {
  2253. return dept.listUser.length > 0;
  2254. });
  2255. },
  2256. /**
  2257. * 过滤后的应用列表,已启用应用
  2258. */
  2259. listAppComputed: function() {
  2260. return this.listApp.filter(function(app) {
  2261. return app.enable == 1 && app.appType != 2;
  2262. });
  2263. },
  2264. /**
  2265. * 我的工作列表
  2266. */
  2267. listUserFoldersComputed() {
  2268. var thisApp = this;
  2269. return this.listUserFolders.filter(function(folder) {
  2270. return thisApp.nowFolderName != folder.folderName;
  2271. });
  2272. }
  2273. },
  2274. methods: {
  2275. downLoadStatus:function(){
  2276. var data =back.getProgress();
  2277. console.log(data);
  2278. },
  2279. listenBottomHeight(){
  2280. let oDivH= document.getElementById("bottomBox").offsetHeight;
  2281. let oShodow= document.getElementById("bottomoShodow");
  2282. // console.log(oDivH)
  2283. if(oDivH>259){
  2284. this.showadow = true
  2285. }else{
  2286. this.showadow = false
  2287. }
  2288. },
  2289. /**
  2290. * 刷新页面
  2291. */
  2292. refreshPages(){
  2293. if ( this.dbClickSelectedFolderGroupData != null && JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}") {
  2294. this.intoFoldergroup(this.dbClickSelectedFolderGroupData);
  2295. } else {
  2296. this.listFiles();
  2297. }
  2298. },
  2299. /***
  2300. * 切换文件显示类型
  2301. * 0:我的文件 1:工作文件
  2302. */
  2303. changeWorkdata(i) {
  2304. //clearInterval(this.timer);
  2305. this.currentPageType = i;
  2306. this.dbClickSelectedFolderGroupData = {}; //切换我的文件和工作文件 清空双击的文件分组对象
  2307. if (this.currentPageType == 0) {
  2308. // 加载我的文件
  2309. this.myFilesList = this.folderFileList.listMyFiles;
  2310. //zxm+ 加载我的文件夹组
  2311. this.myListFolderGroups = this.folderFileList.listFolderGroups;
  2312. } else {
  2313. // 加载工作文件
  2314. this.myFilesList = this.folderFileList.listOtherFiles;
  2315. //zxm+ 加载工作文件夹组
  2316. this.myListFolderGroups = this.folderFileList.listOtherFolderGroups;
  2317. }
  2318. },
  2319. /***
  2320. * 监听浏览器是否有拖入文件
  2321. */
  2322. listenerFrapfile(e) {
  2323. let _this = this;
  2324. var dropbox = document.getElementById("drop_area");
  2325. var appbox = document.getElementById("app");
  2326. // 监听浏览器拖入事件
  2327. appbox.addEventListener("drop", this.enentDrop, false);
  2328. appbox.addEventListener("dragleave", function(e) {
  2329. _this.isHasDropevent = false;
  2330. });
  2331. appbox.addEventListener("dragenter", function(e) {
  2332. _this.isHasDropevent = true;
  2333. });
  2334. appbox.addEventListener("dragover", function(e) {
  2335. _this.isHasDropevent = true;
  2336. });
  2337. // 监听上传框拖入事件
  2338. dropbox.addEventListener("drop", this.enentDrop, false);
  2339. dropbox.addEventListener("dragleave", function(e) {
  2340. e.stopPropagation();
  2341. e.preventDefault();
  2342. _this.borderhover = false;
  2343. });
  2344. dropbox.addEventListener("dragenter", function(e) {
  2345. e.stopPropagation();
  2346. e.preventDefault();
  2347. _this.borderhover = true;
  2348. });
  2349. dropbox.addEventListener("dragover", function(e) {
  2350. e.stopPropagation();
  2351. e.preventDefault();
  2352. _this.borderhover = true;
  2353. });
  2354. },
  2355. /**
  2356. * 滚动加载更多数据
  2357. */
  2358. scrollLoad: function() {
  2359. if (this.scrollIndex < this.myCollFilesList.length) {
  2360. this.scrollIndex += 7;
  2361. this.myCollaborationFilesList = commonJs.pageData(
  2362. this.scrollIndex,
  2363. 1,
  2364. this.myCollFilesList
  2365. );
  2366. } else {
  2367. this.myCollaborationFilesList = commonJs.pageData(
  2368. this.scrollIndex,
  2369. 1,
  2370. this.myCollFilesList
  2371. );
  2372. }
  2373. },
  2374. /**
  2375. * 获取设置信息
  2376. */
  2377. loadSettings() {
  2378. var thisApp = this;
  2379. this.$axios({
  2380. method: "get",
  2381. url: encodeURI(process.env.API_HOST + "sysinfo/setting")
  2382. })
  2383. .then(response => {
  2384. response.data.forEach(element => {
  2385. if (element.shortName == "公共文件夹") {
  2386. if (element.status == 1) {
  2387. this.isUseCommon = true;
  2388. } else {
  2389. this.isUseCommon = false;
  2390. }
  2391. } else if (element.shortName == "协同") {
  2392. if (element.status == 1) {
  2393. this.isUseShare = true;
  2394. } else {
  2395. this.isUseShare = false;
  2396. }
  2397. } else if (element.shortName == "文件交换") {
  2398. if (element.status == 1) {
  2399. this.isUseFolderChange = true;
  2400. } else {
  2401. this.isUseFolderChange = false;
  2402. }
  2403. }
  2404. });
  2405. })
  2406. .catch(error => {
  2407. console.log(error);
  2408. });
  2409. },
  2410. /**
  2411. * 判断用户是否是项目负责人
  2412. */
  2413. loadProjManager: function() {
  2414. var thisApp = this;
  2415. this.$axios({
  2416. method: "get",
  2417. url: encodeURI(
  2418. process.env.API_HOST +
  2419. "projects/manager/" +
  2420. sessionStorage.projId +
  2421. "/" +
  2422. sessionStorage.userId
  2423. )
  2424. })
  2425. .then(response => {
  2426. if (response.data != null && response.data != "") {
  2427. this.isProjectManager = response.data.isProjManager;
  2428. this.isFolderManager = response.data.isFolderManager;
  2429. }
  2430. })
  2431. .catch(error => {
  2432. console.log(error);
  2433. });
  2434. },
  2435. /**
  2436. * @description: 应用管理面板
  2437. * @return:
  2438. */
  2439. showAllAppManagement: function() {
  2440. this.yiyunAnimated = "AnimatedRightIn flex_right_pain";
  2441. this.isShowRightManager = true;
  2442. this.isShowProManager = 1;
  2443. },
  2444. /**
  2445. * @description: 工作链中新申请
  2446. * @return:
  2447. */
  2448. showNewAppManagement: function(from) {
  2449. this.yiyunAnimated = "AnimatedRightIn flex_right_pain";
  2450. this.isShowRightManager = true;
  2451. this.isShowProManager = 6;
  2452. },
  2453. /**
  2454. * @description: 关闭工作地图
  2455. * @return:
  2456. */
  2457. closeAppManagePain: function() {
  2458. this.isShowRightManager = false;
  2459. this.yiyunAnimated = "flex_right_pain";
  2460. },
  2461. /**
  2462. * @description: 我的文件显示缩略图
  2463. * @return:
  2464. */
  2465. showMyFilecard: function() {
  2466. this.isShowNewFileBtn = false;
  2467. this.isShowMyFileList = true;
  2468. },
  2469. /**
  2470. * @description: 我的文件显示列表
  2471. * @return:
  2472. */
  2473. showMyFilelist: function() {
  2474. this.isShowNewFileBtn = true;
  2475. this.isShowMyFileList = false;
  2476. },
  2477. /**
  2478. * @description: 协作文件显示缩略图
  2479. * @return:
  2480. */
  2481. showCoFilecard: function() {
  2482. this.isShowTogetherFileList = true;
  2483. },
  2484. /**
  2485. * @description: 协作文件显示列表
  2486. * @return:
  2487. */
  2488. showCoFilelist: function() {
  2489. this.isShowTogetherFileList = false;
  2490. },
  2491. /**
  2492. * @description: 新建文件弹框
  2493. * @return:
  2494. */
  2495. showNewFiledialog: function() {
  2496. this.isShowNewFiledialog = true;
  2497. this.loadlistApp();
  2498. this.loadListFiles();
  2499. this.loadListTempFiles();
  2500. },
  2501. /**
  2502. * @description: 隐藏新建文件弹框
  2503. * @return:
  2504. */
  2505. hideNewFiledialog: function() {
  2506. this.isShowNewFiledialog = false;
  2507. },
  2508. /**
  2509. * @description: 查看工作链页面
  2510. * @return:
  2511. */
  2512. showWorklinkPage: function() {
  2513. this.$emit("isShowOutWorkSpace", true);
  2514. this.isShowworklink = true;
  2515. this.workheight = "workheight";
  2516. },
  2517. /**
  2518. * @description: 隐藏工作链页面
  2519. * @return:
  2520. */
  2521. hideWorklinkPage: function() {
  2522. this.$emit("isShowOutWorkSpace", false);
  2523. this.isShowworklink = false;
  2524. this.workheight = " workheightinit";
  2525. },
  2526. /**
  2527. * 打开文件时更新文件状态及编辑人
  2528. */
  2529. setModifyStatus(file) {
  2530. var thisApp = this;
  2531. file.status = 1; // 设置为编辑中
  2532. file.modifyUserID = sessionStorage.userId;
  2533. this.$axios({
  2534. method: "put",
  2535. url: encodeURI(process.env.API_HOST + "archives/update/status"),
  2536. data: file
  2537. })
  2538. .then(function(response) {
  2539. if (response.data.state == 1) {
  2540. thisApp.$notify({
  2541. title: "恭喜您",
  2542. message: message,
  2543. type: "success",
  2544. offset: 100,
  2545. duration: 2500
  2546. });
  2547. } else {
  2548. thisApp.$notify({
  2549. title: "温馨提示",
  2550. message: response.data.message,
  2551. type: "info",
  2552. offset: 100,
  2553. duration: 5000
  2554. });
  2555. }
  2556. })
  2557. .catch(function(error) {
  2558. console.log(error);
  2559. });
  2560. },
  2561. /**
  2562. * 更改文件状态
  2563. */
  2564. setFileStatus(file, state, message, type) {
  2565. var thisApp = this;
  2566. this.$axios({
  2567. method: "get",
  2568. url: encodeURI(process.env.API_HOST + "archives/first/" + file.archID)
  2569. })
  2570. .then(function(response) {
  2571. file = response.data;
  2572. if (file.status == 1) {
  2573. if (file.modifyUserID != sessionStorage.userId) {
  2574. thisApp
  2575. .$axios({
  2576. method: "get",
  2577. url: encodeURI(
  2578. process.env.API_HOST + "sysinfo/user/" + file.modifyUserID
  2579. )
  2580. })
  2581. .then(function(resUser) {
  2582. thisApp.$notify({
  2583. title: "温馨提示",
  2584. message:
  2585. "只有最后编辑人 " + resUser.data.cnName + " 可以修改",
  2586. type: "info",
  2587. offset: 100,
  2588. duration: 2500
  2589. });
  2590. return;
  2591. })
  2592. .catch(function(error) {
  2593. thisApp.$notify({
  2594. title: "温馨提示",
  2595. message: "非编辑人不能进行编辑操作",
  2596. type: "info",
  2597. offset: 100,
  2598. duration: 2500
  2599. });
  2600. return;
  2601. });
  2602. return;
  2603. }
  2604. if (type == 1) {
  2605. if(thisApp.isClient && (state == 0 || state == 2))
  2606. {
  2607. // 启动客户端判断
  2608. thisApp.setFile=file;
  2609. thisApp.setState=state;
  2610. back.getFileStatus(file.archID,sessionStorage.userId)
  2611. return;
  2612. }
  2613. file.status = state;
  2614. thisApp
  2615. .$axios({
  2616. method: "put",
  2617. url: encodeURI(
  2618. process.env.API_HOST + "archives/update/status"
  2619. ),
  2620. data: file
  2621. })
  2622. .then(function(response) {
  2623. if (response.data.state == 1) {
  2624. thisApp.$notify({
  2625. title: "恭喜您",
  2626. message: message,
  2627. type: "success",
  2628. offset: 100,
  2629. duration: 2500
  2630. });
  2631. if (
  2632. thisApp.dbClickSelectedFolderGroupData == null ||
  2633. JSON.stringify(thisApp.dbClickSelectedFolderGroupData) ==
  2634. "{}"
  2635. ) {
  2636. thisApp.folderGroupBreads = [];
  2637. thisApp.refreshPages();
  2638. } else {
  2639. thisApp.intoFoldergroup(
  2640. thisApp.dbClickSelectedFolderGroupData
  2641. );
  2642. }
  2643. if (thisApp.fileindex == 1 && file.commonStatus == 1) {
  2644. thisApp.loadListCommonFiles();
  2645. }
  2646. } else {
  2647. thisApp.$notify({
  2648. title: "温馨提示",
  2649. message: response.data.message,
  2650. type: "info",
  2651. offset: 100,
  2652. duration: 5000
  2653. });
  2654. }
  2655. })
  2656. .catch(function(error) {
  2657. console.log(error);
  2658. });
  2659. } else {
  2660. thisApp
  2661. .$confirm(
  2662. "是否重新开启文件【" + file.archName + "】的协同?",
  2663. "文件提示",
  2664. {
  2665. confirmButtonText: "开启协同",
  2666. cancelButtonText: "取消",
  2667. type: "warning"
  2668. }
  2669. )
  2670. .then(() => {
  2671. file.status = state;
  2672. thisApp
  2673. .$axios({
  2674. method: "put",
  2675. url: encodeURI(
  2676. process.env.API_HOST + "archives/update/status"
  2677. ),
  2678. data: file
  2679. })
  2680. .then(function(response) {
  2681. if (response.data.state == 1) {
  2682. thisApp.$notify({
  2683. title: "恭喜您",
  2684. message: message,
  2685. type: "success",
  2686. offset: 100,
  2687. duration: 2500
  2688. });
  2689. if (
  2690. thisApp.dbClickSelectedFolderGroupData == null ||
  2691. JSON.stringify(
  2692. thisApp.dbClickSelectedFolderGroupData
  2693. ) == "{}"
  2694. ) {
  2695. thisApp.folderGroupBreads = [];
  2696. thisApp.refreshPages();
  2697. } else {
  2698. thisApp.intoFoldergroup(
  2699. thisApp.dbClickSelectedFolderGroupData
  2700. );
  2701. }
  2702. if (thisApp.fileindex == 1 && file.commonStatus == 1) {
  2703. thisApp.loadListCommonFiles();
  2704. }
  2705. } else {
  2706. thisApp.$notify({
  2707. title: "温馨提示",
  2708. message: response.data.message,
  2709. type: "info",
  2710. offset: 100,
  2711. duration: 5000
  2712. });
  2713. }
  2714. })
  2715. .catch(function(error) {
  2716. console.log(error);
  2717. });
  2718. })
  2719. .catch(function(error) {
  2720. console.log(error);
  2721. });
  2722. }
  2723. } else {
  2724. // state :0/2/3
  2725. if (type == 1) {
  2726. if(thisApp.isClient && (state ==0 || state == 2))
  2727. {
  2728. // 启动客户端判断
  2729. thisApp.setFile=file;
  2730. thisApp.setState=state;
  2731. back.getFileStatus(file.archID,sessionStorage.userId)
  2732. return;
  2733. }
  2734. file.status = state;
  2735. thisApp
  2736. .$axios({
  2737. method: "put",
  2738. url: encodeURI(
  2739. process.env.API_HOST + "archives/update/status"
  2740. ),
  2741. data: file
  2742. })
  2743. .then(function(response) {
  2744. if (response.data.state == 1) {
  2745. thisApp.$notify({
  2746. title: "恭喜您",
  2747. message: "操作成功",
  2748. type: "success",
  2749. offset: 100,
  2750. duration: 2500
  2751. });
  2752. thisApp.refreshPages();
  2753. if (thisApp.fileindex == 1 && file.commonStatus == 1) {
  2754. thisApp.loadListCommonFiles();
  2755. }
  2756. } else {
  2757. thisApp.$notify({
  2758. title: "温馨提示",
  2759. message: response.data.message,
  2760. type: "info",
  2761. offset: 100,
  2762. duration: 5000
  2763. });
  2764. }
  2765. })
  2766. .catch(function(error) {
  2767. console.log(error);
  2768. });
  2769. } else {
  2770. thisApp
  2771. .$confirm(
  2772. "是否重新开启文件【" + file.archName + "】的协同?",
  2773. "文件提示",
  2774. {
  2775. confirmButtonText: "开启协同",
  2776. cancelButtonText: "取消",
  2777. type: "warning"
  2778. }
  2779. )
  2780. .then(() => {
  2781. file.status = state;
  2782. thisApp
  2783. .$axios({
  2784. method: "put",
  2785. url: encodeURI(
  2786. process.env.API_HOST + "archives/update/status"
  2787. ),
  2788. data: file
  2789. })
  2790. .then(function(response) {
  2791. if (response.data.state == 1) {
  2792. thisApp.$notify({
  2793. title: "恭喜您",
  2794. message: message,
  2795. type: "success",
  2796. offset: 100,
  2797. duration: 2500
  2798. });
  2799. thisApp.refreshPages();
  2800. if (thisApp.fileindex == 1 && file.commonStatus == 1) {
  2801. thisApp.loadListCommonFiles();
  2802. }
  2803. } else {
  2804. thisApp.$notify({
  2805. title: "温馨提示",
  2806. message: response.data.message,
  2807. type: "info",
  2808. offset: 100,
  2809. duration: 5000
  2810. });
  2811. }
  2812. })
  2813. .catch(function(error) {
  2814. console.log(error);
  2815. });
  2816. })
  2817. .catch(function(error) {
  2818. console.log(error);
  2819. });
  2820. }
  2821. }
  2822. })
  2823. .catch(function(error) {
  2824. console.log(error);
  2825. });
  2826. },
  2827. /**
  2828. * 客户端验证确定可以修改文件状态
  2829. */
  2830. setFileStatusSure(){
  2831. var thisApp=this;
  2832. if(thisApp.setFile.alias == "")
  2833. {
  2834. this.$notify({
  2835. title: "温馨提示",
  2836. message: "文件正在同步中,请稍后操作",
  2837. type: "info",
  2838. offset: 100,
  2839. duration: 2500
  2840. });
  2841. return;
  2842. }
  2843. thisApp.setFile.status = thisApp.setState;
  2844. thisApp
  2845. .$axios({
  2846. method: "put",
  2847. url: encodeURI(
  2848. process.env.API_HOST + "archives/update/status"
  2849. ),
  2850. data: thisApp.setFile
  2851. })
  2852. .then(function(response) {
  2853. if (response.data.state == 1) {
  2854. thisApp.$notify({
  2855. title: "恭喜您",
  2856. message: "操作成功",
  2857. type: "success",
  2858. offset: 100,
  2859. duration: 2500
  2860. });
  2861. thisApp.refreshPages();
  2862. if (thisApp.fileindex == 1 && file.commonStatus == 1) {
  2863. thisApp.loadListCommonFiles();
  2864. }
  2865. } else {
  2866. thisApp.$notify({
  2867. title: "温馨提示",
  2868. message: response.data.message,
  2869. type: "info",
  2870. offset: 100,
  2871. duration: 5000
  2872. });
  2873. }
  2874. })
  2875. .catch(function(error) {
  2876. console.log(error);
  2877. });
  2878. },
  2879. /**
  2880. * 不能改变状态时提示用户
  2881. */
  2882. tipUser(){
  2883. this.$notify({
  2884. title: "温馨提示",
  2885. message: "文件正在同步中,请稍后操作",
  2886. type: "info",
  2887. offset: 100,
  2888. duration: 2500
  2889. });
  2890. },
  2891. /**
  2892. * @description: 应用列表鼠标滑入
  2893. * @return:
  2894. */
  2895. isShowIcon() {
  2896. if (this.isonselect == "-2") {
  2897. this.isonselect = "-1";
  2898. }
  2899. },
  2900. /**
  2901. * @description: 应用列表鼠标离开
  2902. * @return:
  2903. */
  2904. ishideIcon() {
  2905. if (
  2906. this.isonselect != "0" ||
  2907. this.isonselect != "1" ||
  2908. this.isonselect != "2"
  2909. ) {
  2910. this.isonselect = "-2";
  2911. }
  2912. },
  2913. /*
  2914. *获取列表文件夹
  2915. */
  2916. listFolders: function() {
  2917. var thisApp = this;
  2918. this.$axios({
  2919. method: "get",
  2920. url: encodeURI(
  2921. process.env.API_HOST +
  2922. "folders/work/" +
  2923. this.userId +
  2924. "/" +
  2925. this.projId
  2926. )
  2927. })
  2928. .then(response => {
  2929. thisApp.listUserFolders = response.data;
  2930. if (thisApp.listUserFolders.length > 0) {
  2931. if (this.$route.params.folderId != undefined) {
  2932. var folderid = this.$route.params.folderId;
  2933. for (
  2934. let index = 0;
  2935. index < thisApp.listUserFolders.length;
  2936. index++
  2937. ) {
  2938. if (thisApp.listUserFolders[index].folderID == folderid) {
  2939. thisApp.nowFolderIndex = index;
  2940. }
  2941. }
  2942. } else {
  2943. if (
  2944. sessionStorage.nowFolderIndex != "" &&
  2945. sessionStorage.nowFolderIndex != undefined
  2946. ) {
  2947. thisApp.nowFolderIndex = parseInt(
  2948. sessionStorage.nowFolderIndex
  2949. );
  2950. } else {
  2951. thisApp.nowFolderIndex = 0;
  2952. }
  2953. }
  2954. thisApp.nowFolder = thisApp.listUserFolders[thisApp.nowFolderIndex];
  2955. thisApp.listFiles();
  2956. if (
  2957. thisApp.dbClickSelectedFolderGroupData == null ||
  2958. JSON.stringify(thisApp.dbClickSelectedFolderGroupData) == "{}"
  2959. ) {
  2960. thisApp.timer = setInterval(() => {
  2961. thisApp.listFiles();
  2962. }, 3 * 1000);
  2963. }
  2964. }
  2965. })
  2966. .catch(error => {
  2967. console.log(error);
  2968. });
  2969. },
  2970. /**
  2971. * 更新新项目标识
  2972. */
  2973. updateProjUser() {
  2974. if (sessionStorage.newProjStatus == 1) {
  2975. var thisApp = this;
  2976. var projUserData = {
  2977. projID: sessionStorage.projId,
  2978. userID: sessionStorage.userId,
  2979. newProjStatus: 0
  2980. };
  2981. this.$axios({
  2982. method: "put",
  2983. url: encodeURI(process.env.API_HOST + "projects/projuser"),
  2984. data: projUserData
  2985. })
  2986. .then(response => {})
  2987. .catch(error => {
  2988. console.log(error);
  2989. });
  2990. }
  2991. },
  2992. /**
  2993. * 获取当前工作下文件
  2994. */
  2995. listFiles: function() {
  2996. var thisApp = this;
  2997. thisApp.isCommonPage = false;
  2998. thisApp.nowFolderId =
  2999. thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID
  3000. thisApp.nowFolderName =
  3001. thisApp.listUserFolders[thisApp.nowFolderIndex].folderName; // 设置当前工作名称
  3002. var folderPerm =
  3003. thisApp.listUserFolders[thisApp.nowFolderIndex].folderPerm;
  3004. if (
  3005. this.listUserFolders[thisApp.nowFolderIndex].folderName == "公共文件夹"
  3006. ) {
  3007. this.fileindex = 2;
  3008. sessionStorage.comFolderId =
  3009. thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
  3010. this.isCommonPage = true;
  3011. this.$axios({
  3012. method: "get",
  3013. url: encodeURI(
  3014. process.env.API_HOST +
  3015. "archives" +
  3016. "/all/" +
  3017. thisApp.nowFolderId +
  3018. "/" +
  3019. sessionStorage.userId
  3020. )
  3021. })
  3022. .then(response => {
  3023. thisApp.folderFileList = response.data;
  3024. if (this.currentPageType == 0) {
  3025. // 加载我的文件
  3026. this.myFilesList = this.folderFileList.listMyFiles;
  3027. //zxm+ 加载我的文件夹组
  3028. this.myListFolderGroups = this.folderFileList.listFolderGroups;
  3029. } else {
  3030. // 加载工作文件
  3031. this.myFilesList = this.folderFileList.listOtherFiles;
  3032. //zxm+ 加载工作文件夹组
  3033. this.myListFolderGroups = this.folderFileList.listOtherFolderGroups;
  3034. }
  3035. thisApp.loadCommitedComFiles();
  3036. })
  3037. .catch(error => {
  3038. console.log(error);
  3039. });
  3040. } else {
  3041. if(this.fileindex == 2)
  3042. {
  3043. this.fileindex = 0;
  3044. }
  3045. this.$axios({
  3046. method: "get",
  3047. url: encodeURI(
  3048. process.env.API_HOST +
  3049. "archives" +
  3050. "/all/" +
  3051. thisApp.nowFolderId +
  3052. "/" +
  3053. sessionStorage.userId
  3054. )
  3055. })
  3056. .then(response => {
  3057. thisApp.folderFileList = response.data;
  3058. if (this.currentPageType == 0) {
  3059. // 加载我的文件
  3060. thisApp.myFilesList = thisApp.folderFileList.listMyFiles;
  3061. // 加载我的文件夹 zxm+
  3062. thisApp.myListFolderGroups =
  3063. thisApp.folderFileList.listFolderGroups;
  3064. } else {
  3065. // 加载工作文件
  3066. thisApp.myFilesList = thisApp.folderFileList.listOtherFiles;
  3067. // 加载工作文件分组 zxm+
  3068. thisApp.myListFolderGroups =
  3069. thisApp.folderFileList.listOtherFolderGroups;
  3070. }
  3071. if(thisApp.curactive==0){
  3072. thisApp.listCollaborationFiles();
  3073. }else if(thisApp.curactive==1){
  3074. thisApp.loadListCommonFiles();
  3075. }
  3076. })
  3077. .catch(error => {
  3078. console.log(error);
  3079. });
  3080. }
  3081. },
  3082. /**
  3083. * 获取协作文件
  3084. */
  3085. listCollaborationFiles: function() {
  3086. var thisApp = this;
  3087. thisApp.nowFolderId =
  3088. thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID
  3089. this.$axios({
  3090. method: "get",
  3091. url: encodeURI(
  3092. process.env.API_HOST +
  3093. "archives/collaboration/" +
  3094. thisApp.nowFolderId +
  3095. "/" +
  3096. sessionStorage.userId
  3097. )
  3098. })
  3099. .then(response => {
  3100. response.data.data.forEach(arch => {
  3101. if (arch.createTime != null && arch.modifyTime != null) {
  3102. arch.createTime = arch.createTime.replace(/T/g, " ");
  3103. arch.createTime = arch.createTime.replace(/\+/g, " ");
  3104. arch.modifyTime = arch.modifyTime.replace(/T/g, " ");
  3105. arch.modifyTime = arch.modifyTime.replace(/\+/g, " ");
  3106. }
  3107. arch.isShowFile = true;
  3108. });
  3109. thisApp.myCollFilesList = [];
  3110. if(response.data.data!=null && response.data.data.length > 0){
  3111. thisApp.myCollFilesList = response.data.data;
  3112. }
  3113. if (thisApp.myCollFilesList.length > 0) {
  3114. thisApp.scrollIndex = 7;
  3115. thisApp.scrollLoad();
  3116. }
  3117. })
  3118. .catch(error => {
  3119. console.log(error);
  3120. });
  3121. },
  3122. /**
  3123. * 获取公共文件
  3124. */
  3125. loadListCommonFiles: function() {
  3126. var thisApp = this;
  3127. //thisApp.myPublicFilesList = [];
  3128. this.$axios({
  3129. method: "get",
  3130. url: encodeURI(
  3131. process.env.API_HOST +
  3132. "archives/common/all/" +
  3133. sessionStorage.comFolderId +
  3134. "/" +
  3135. sessionStorage.userId
  3136. )
  3137. })
  3138. .then(response => {
  3139. thisApp.myPublicFilesList = response.data.data;
  3140. })
  3141. .catch(error => {
  3142. console.log(error);
  3143. });
  3144. },
  3145. /**
  3146. * 获取用户提交的公共文件
  3147. */
  3148. loadCommitedComFiles: function() {
  3149. var thisApp = this;
  3150. this.$axios({
  3151. method: "get",
  3152. url: encodeURI(
  3153. process.env.API_HOST +
  3154. "archives/common/commited/" +
  3155. sessionStorage.comFolderId +
  3156. "/" +
  3157. sessionStorage.userId
  3158. )
  3159. })
  3160. .then(response => {
  3161. thisApp.myPublicFilesList = response.data.data;
  3162. })
  3163. .catch(error => {
  3164. console.log(error);
  3165. });
  3166. },
  3167. /**
  3168. * 获取协作应用实例
  3169. */
  3170. listCollaborationApps: function() {
  3171. var thisApp = this;
  3172. thisApp.nowFolderId =
  3173. thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID
  3174. this.$axios({
  3175. method: "get",
  3176. url: encodeURI(
  3177. process.env.API_HOST +
  3178. "archives/collaboration/appinstance/" +
  3179. thisApp.nowFolderId
  3180. )
  3181. })
  3182. .then(response => {
  3183. thisApp.myCollaborationApp = response.data.data;
  3184. })
  3185. .catch(error => {
  3186. console.log(error);
  3187. });
  3188. },
  3189. /**
  3190. * 加载云文件列表
  3191. */
  3192. loadListFiles: function() {
  3193. var thisApp = this;
  3194. this.$axios({
  3195. method: "get",
  3196. url: encodeURI(process.env.API_HOST + "sysinfo/cloudfile")
  3197. })
  3198. .then(response => {
  3199. thisApp.listCloudFiles = response.data;
  3200. })
  3201. .catch(error => {
  3202. console.log(error);
  3203. });
  3204. },
  3205. /**
  3206. * 加载样板文件列表
  3207. */
  3208. loadListTempFiles: function(node) {
  3209. var thisApp = this;
  3210. if (thisApp.listUserFolders[thisApp.nowFolderIndex].folderID == "") {
  3211. thisApp.ListTempFiles = [];
  3212. return;
  3213. }
  3214. var folderId = thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
  3215. this.$axios({
  3216. method: "get",
  3217. url: encodeURI(
  3218. process.env.API_HOST + "templates/nodes/files/folder/" + folderId
  3219. )
  3220. })
  3221. .then(response => {
  3222. if (response.data.state == 1) {
  3223. thisApp.ListTempFiles = response.data.data;
  3224. }
  3225. })
  3226. .catch(error => {
  3227. console.log(error);
  3228. });
  3229. },
  3230. /**
  3231. * 分享ForgeView
  3232. */
  3233. shareMyFile(file) {
  3234. this.showShare = true;
  3235. this.shareUrl = file.showUrl;
  3236. this.shareForgeName = file.archName;
  3237. this.shareForgeTitle = "分享我的模型-" + file.archName;
  3238. },
  3239. /**
  3240. * 复制Forge分享链接
  3241. */
  3242. copyShareUrl() {
  3243. let inputEle = document.createElement("input");
  3244. inputEle.setAttribute("readonly", "readonly");
  3245. inputEle.setAttribute("value", this.shareUrl);
  3246. document.body.appendChild(inputEle);
  3247. inputEle.select();
  3248. if (document.execCommand("Copy")) {
  3249. document.execCommand("Copy");
  3250. }
  3251. document.body.removeChild(inputEle);
  3252. },
  3253. /**
  3254. * 打开Forge链接
  3255. */
  3256. openShareUrl() {
  3257. window.open(this.shareUrl, this.shareForgeName);
  3258. },
  3259. /**
  3260. * 下载文件
  3261. * item:文件对象
  3262. */
  3263. downLoadMyFile: function(item) {
  3264. if (item.alias != null) {
  3265. var url = process.env.API_HOST + "archives/download/" + item.archID;
  3266. var iframe = document.createElement("iframe");
  3267. iframe.style.display = "none";
  3268. iframe.src = url;
  3269. document.body.appendChild(iframe);
  3270. }
  3271. },
  3272. /**
  3273. * 客户端打开协作文件本地文件夹
  3274. */
  3275. openNativeFolder(file) {
  3276. var folderName = this.listUserFolders[this.nowFolderIndex].folderName;
  3277. var filename = file.archName + "." + file.extension;
  3278. back.openCollFolder(sessionStorage.projName, folderName, filename);
  3279. },
  3280. sayHello: function(file) {
  3281. this.$notify({
  3282. title: "温馨提示",
  3283. message: "功能待研发,敬请期待...",
  3284. type: "info",
  3285. offset: 100,
  3286. duration: 2500
  3287. });
  3288. },
  3289. /**
  3290. * 查看历史文件
  3291. */
  3292. openMilstoneFile(file) {
  3293. if (this.isClient) {
  3294. var archid = file.archID;
  3295. var filename = file.archName + "." + file.extension;
  3296. var folderID = file.folderID;
  3297. var type = "open";
  3298. back.openFile(archid, filename, folderID, type);
  3299. } else {
  3300. this.openOffice(file);
  3301. }
  3302. },
  3303. /**
  3304. * 点击文件事件:直接打开文件
  3305. */
  3306. fileClick: function(file) {
  3307. if (file.downloadStatus == 1) {
  3308. return;
  3309. }
  3310. if (this.isClient) {
  3311. if (file.extension == "map") {
  3312. this.instanceType = 1;
  3313. this.showApp = true;
  3314. this.mapAddress = file.alias;
  3315. this.appInstanceTitle = "应用查看-" + file.archName;
  3316. } else if (file.extension == "svfzip") {
  3317. window.open(file.showUrl, file.archName);
  3318. // this.showApp = true;
  3319. // this.instanceType = 2;
  3320. // this.forgeShowUrl = file.showUrl;
  3321. // this.appInstanceTitle = "应用查看-" + file.archName;
  3322. } else if (file.extension == "supermap") {
  3323. this.instanceType = 3;
  3324. this.showApp = true;
  3325. this.gisShowUrl = file.alias;
  3326. this.appInstanceTitle = "应用查看-" + file.archName;
  3327. } else {
  3328. var archid = file.archID;
  3329. var filename = file.archName + "." + file.extension;
  3330. if (file.version > 1) {
  3331. filename = file.archName + file.version + "." + file.extension;
  3332. }
  3333. var folderID = file.folderID;
  3334. var type = "open";
  3335. var thisApp = this;
  3336. // 文件为已完成时,标记为更新人
  3337. this.$axios({
  3338. method: "get",
  3339. url: encodeURI(
  3340. process.env.API_HOST + "archives/first/" + file.archID
  3341. )
  3342. })
  3343. .then(function(response) {
  3344. file = response.data;
  3345. if (file.status != 1) {
  3346. file.status = 1; // 设置为编辑中
  3347. file.modifyUserID = sessionStorage.userId;
  3348. thisApp
  3349. .$axios({
  3350. method: "put",
  3351. url: encodeURI(
  3352. process.env.API_HOST + "archives/update/status"
  3353. ),
  3354. data: file
  3355. })
  3356. .then(function(response) {
  3357. if (response.data.state == 1) {
  3358. back.openFile(archid, filename, folderID, type);
  3359. thisApp.refreshPages();
  3360. } else {
  3361. thisApp.$notify({
  3362. title: "温馨提示",
  3363. message: response.data.message,
  3364. type: "info",
  3365. offset: 100,
  3366. duration: 5000
  3367. });
  3368. }
  3369. })
  3370. .catch(function(error) {
  3371. console.log(error);
  3372. });
  3373. } else {
  3374. if (sessionStorage.userId == file.modifyUserID) {
  3375. back.openFile(archid, filename, folderID, type);
  3376. } else {
  3377. thisApp.$notify({
  3378. title: "温馨提示",
  3379. message: "文件正在工作编辑中,请耐心等待",
  3380. type: "warning",
  3381. offset: 30,
  3382. duration: 5000
  3383. });
  3384. thisApp.refreshPages();
  3385. }
  3386. }
  3387. })
  3388. .catch(function(error) {
  3389. console.log(error);
  3390. });
  3391. }
  3392. } else {
  3393. if (
  3394. file.extension == "png" ||
  3395. file.extension == "jpg" ||
  3396. file.extension == "bmp" ||
  3397. file.extension == "gif" ||
  3398. file.extension == "jpeg"
  3399. ) {
  3400. this.showImage = true;
  3401. this.imageUrl = this.imgSrc + file.alias;
  3402. } else if (file.extension == "map") {
  3403. this.instanceType = 1;
  3404. this.showApp = true;
  3405. this.mapAddress = file.alias;
  3406. this.appInstanceTitle = "应用查看-" + file.archName;
  3407. } else if (file.extension == "svfzip") {
  3408. this.showApp = true;
  3409. this.instanceType = 2;
  3410. this.forgeShowUrl = file.showUrl;
  3411. this.appInstanceTitle = "应用查看-" + file.archName;
  3412. } else if (file.extension == "supermap") {
  3413. this.instanceType = 3;
  3414. this.showApp = true;
  3415. this.gisShowUrl = file.alias;
  3416. this.appInstanceTitle = "应用查看-" + file.archName;
  3417. } else {
  3418. this.openOffice(file);
  3419. }
  3420. }
  3421. this.listCollaborationFiles();
  3422. },
  3423. /**
  3424. * 应用查看窗体关闭事件
  3425. */
  3426. closeApp() {
  3427. this.showApp = false;
  3428. this.instanceType = 4;
  3429. },
  3430. /**
  3431. * 点击文件事件:打开文件并选择打开方式
  3432. */
  3433. fileClickSelect: function(file) {
  3434. if (file.downloadStatus == 1) {
  3435. return;
  3436. }
  3437. if (this.isClient) {
  3438. if (file.extension == "map") {
  3439. this.instanceType = 1;
  3440. this.showApp = true;
  3441. this.mapAddress = file.alias;
  3442. this.appInstanceTitle = "应用查看-" + file.archName;
  3443. } else if (file.extension == "svfzip") {
  3444. window.open(file.showUrl, file.archName);
  3445. } else if (file.extension == "supermap") {
  3446. this.instanceType = 3;
  3447. this.showApp = true;
  3448. this.gisShowUrl = file.alias;
  3449. this.appInstanceTitle = "应用查看-" + file.archName;
  3450. } else {
  3451. var archid = file.archID;
  3452. var filename = file.archName + "." + file.extension;
  3453. if (file.version > 1) {
  3454. filename = file.archName + file.version + "." + file.extension;
  3455. }
  3456. var folderID = file.folderID;
  3457. var type = "openselect";
  3458. var thisApp = this;
  3459. // 文件为已完成时,标记为更新人
  3460. this.$axios({
  3461. method: "get",
  3462. url: encodeURI(
  3463. process.env.API_HOST + "archives/first/" + file.archID
  3464. )
  3465. })
  3466. .then(function(response) {
  3467. file = response.data;
  3468. if (file.status != 1) {
  3469. file.status = 1; // 设置为编辑中
  3470. file.modifyUserID = sessionStorage.userId;
  3471. thisApp
  3472. .$axios({
  3473. method: "put",
  3474. url: encodeURI(
  3475. process.env.API_HOST + "archives/update/status"
  3476. ),
  3477. data: file
  3478. })
  3479. .then(function(response) {
  3480. if (response.data.state == 1) {
  3481. back.openFile(archid, filename, folderID, type);
  3482. thisApp.refreshPages();
  3483. } else {
  3484. thisApp.$notify({
  3485. title: "温馨提示",
  3486. message: response.data.message,
  3487. type: "info",
  3488. offset: 100,
  3489. duration: 5000
  3490. });
  3491. }
  3492. })
  3493. .catch(function(error) {
  3494. console.log(error);
  3495. });
  3496. } else {
  3497. if (sessionStorage.userId == file.modifyUserID) {
  3498. back.openFile(archid, filename, folderID, type);
  3499. } else {
  3500. thisApp.$notify({
  3501. title: "温馨提示",
  3502. message: "文件正在工作编辑中,请耐心等待",
  3503. type: "warning",
  3504. offset: 30,
  3505. duration: 5000
  3506. });
  3507. thisApp.refreshPages();
  3508. }
  3509. }
  3510. })
  3511. .catch(function(error) {
  3512. console.log(error);
  3513. });
  3514. }
  3515. }
  3516. this.$axios({
  3517. method: "delete",
  3518. url: encodeURI(
  3519. process.env.API_HOST +
  3520. "notices/noticeuser/" +
  3521. file.archID +
  3522. "/" +
  3523. sessionStorage.userId
  3524. )
  3525. });
  3526. },
  3527. /**
  3528. * 协作文件点击文件事件:直接打开文件
  3529. */
  3530. fileClickColl: function(file) {
  3531. if (file.downloadStatus == 1) {
  3532. return;
  3533. }
  3534. if (this.isClient) {
  3535. if (file.status == 1 || file.status == 0) {
  3536. this.$confirm("对方正在工作中,请稍后查看", "", {
  3537. confirmButtonText: "确定",
  3538. showClose: false,
  3539. showCancelButton: false,
  3540. type: "warning",
  3541. center: true
  3542. })
  3543. .then(() => {})
  3544. .catch(error => {});
  3545. } else {
  3546. if (file.extension == "map") {
  3547. this.instanceType = 1;
  3548. this.showApp = true;
  3549. this.mapAddress = file.alias;
  3550. this.appInstanceTitle = "应用查看-" + file.archName;
  3551. } else if (file.extension == "svfzip") {
  3552. this.showApp = true;
  3553. this.instanceType = 2;
  3554. this.forgeShowUrl = file.showUrl;
  3555. this.appInstanceTitle = "应用查看-" + file.archName;
  3556. } else if (file.extension == "supermap") {
  3557. this.instanceType = 3;
  3558. this.showApp = true;
  3559. this.gisShowUrl = file.alias;
  3560. this.appInstanceTitle = "应用查看-" + file.archName;
  3561. } else if (
  3562. file.extension == "png" ||
  3563. file.extension == "jpg" ||
  3564. file.extension == "bmp" ||
  3565. file.extension == "gif" ||
  3566. file.extension == "jpeg"
  3567. ) {
  3568. this.showImage = true;
  3569. this.imageUrl = this.imgSrc + file.alias;
  3570. } else {
  3571. // 客户端打开文件
  3572. var archid = file.archID;
  3573. var filename = file.archName + "." + file.extension;
  3574. var folderID = file.folderID;
  3575. var folderName = this.listUserFolders[this.nowFolderIndex]
  3576. .folderName;
  3577. var projID = file.projID;
  3578. var type = "open";
  3579. back.openFile(
  3580. archid,
  3581. filename,
  3582. folderID,
  3583. type,
  3584. sessionStorage.projName,
  3585. folderName
  3586. );
  3587. }
  3588. }
  3589. } else {
  3590. if (file.status == 1 || file.status == 0) {
  3591. this.$notify({
  3592. title: "温馨提示",
  3593. message: "对方正在工作中,请耐心等待",
  3594. type: "warning",
  3595. offset: 30,
  3596. duration: 5000
  3597. });
  3598. return;
  3599. }
  3600. this.openOffice(file);
  3601. }
  3602. this.listCollaborationFiles();
  3603. },
  3604. /**
  3605. * 协作文件点击文件事件:打开文件并选择打开方式
  3606. */
  3607. fileClickSelectColl: function(file) {
  3608. if (file.downloadStatus == 1) {
  3609. return;
  3610. }
  3611. if (this.isClient) {
  3612. if (file.status == 1 || file.status == 0) {
  3613. this.$confirm("对方正在工作中,请稍后查看", "", {
  3614. confirmButtonText: "确定",
  3615. showClose: false,
  3616. showCancelButton: false,
  3617. type: "warning",
  3618. center: true
  3619. })
  3620. .then(() => {})
  3621. .catch(error => {});
  3622. } else {
  3623. if (file.extension == "map") {
  3624. this.instanceType = 1;
  3625. this.showApp = true;
  3626. this.mapAddress = file.alias;
  3627. this.appInstanceTitle = "应用查看-" + file.archName;
  3628. } else if (file.extension == "svfzip") {
  3629. window.open(file.showUrl, file.archName);
  3630. // this.showApp = true;
  3631. // this.instanceType = 2;
  3632. // this.forgeShowUrl = file.showUrl;
  3633. // this.appInstanceTitle = "应用查看-" + file.archName;
  3634. } else if (file.extension == "supermap") {
  3635. this.instanceType = 3;
  3636. this.showApp = true;
  3637. this.gisShowUrl = file.alias;
  3638. this.appInstanceTitle = "应用查看-" + file.archName;
  3639. } else if (
  3640. file.extension == "png" ||
  3641. file.extension == "jpg" ||
  3642. file.extension == "bmp" ||
  3643. file.extension == "gif" ||
  3644. file.extension == "jpeg"
  3645. ) {
  3646. this.showImage = true;
  3647. this.imageUrl = this.imgSrc + file.alias;
  3648. } else {
  3649. // 客户端打开文件
  3650. var archid = file.archID;
  3651. var filename = file.archName + "." + file.extension;
  3652. var folderID = file.folderID;
  3653. var folderName = this.listUserFolders[this.nowFolderIndex]
  3654. .folderName;
  3655. var projID = file.projID;
  3656. var type = "openselect";
  3657. back.openFile(
  3658. archid,
  3659. filename,
  3660. folderID,
  3661. type,
  3662. sessionStorage.projName,
  3663. folderName
  3664. );
  3665. }
  3666. }
  3667. }
  3668. this.$axios({
  3669. method: "delete",
  3670. url: encodeURI(
  3671. process.env.API_HOST +
  3672. "notices/noticeuser/" +
  3673. file.archID +
  3674. "/" +
  3675. sessionStorage.userId
  3676. )
  3677. });
  3678. },
  3679. /**
  3680. * 打开Office文件
  3681. */
  3682. openOffice: function(file) {
  3683. this.officeTitle = file.archName + "." + file.extension;
  3684. if (file.extension == "pdf") {
  3685. this.showOffice = true;
  3686. this.officeUrl = process.env.OFFICE_WEB + "?furl=" + file.alias;
  3687. this.$axios({
  3688. method: "delete",
  3689. url: encodeURI(
  3690. process.env.API_HOST +
  3691. "notices/noticeuser/" +
  3692. file.archID +
  3693. "/" +
  3694. sessionStorage.userId
  3695. )
  3696. });
  3697. } else if (
  3698. file.extension == "xls" ||
  3699. file.extension == "xlsx" ||
  3700. file.extension == "doc" ||
  3701. file.extension == "docx" ||
  3702. file.extension == "ppt" ||
  3703. file.extension == "pptx" ||
  3704. file.extension == "txt"
  3705. ) {
  3706. this.$axios({
  3707. method: "delete",
  3708. url: encodeURI(
  3709. process.env.API_HOST +
  3710. "notices/noticeuser/" +
  3711. file.archID +
  3712. "/" +
  3713. sessionStorage.userId
  3714. )
  3715. });
  3716. this.showOffice = true;
  3717. this.officeUrl = process.env.OFFICE_WEB + "?furl=" + file.alias;
  3718. } else if (file.extension == "map") {
  3719. this.instanceType = 1;
  3720. this.showApp = true;
  3721. this.mapAddress = file.alias;
  3722. this.appInstanceTitle = "应用查看-" + file.archName;
  3723. } else if (file.extension == "svfzip") {
  3724. this.showApp = true;
  3725. this.instanceType = 2;
  3726. this.forgeShowUrl = file.showUrl;
  3727. this.appInstanceTitle = "应用查看-" + file.archName;
  3728. } else if (file.extension == "supermap") {
  3729. this.instanceType = 3;
  3730. this.showApp = true;
  3731. this.gisShowUrl = file.alias;
  3732. this.appInstanceTitle = "应用查看-" + file.archName;
  3733. } else if (
  3734. file.extension == "png" ||
  3735. file.extension == "jpg" ||
  3736. file.extension == "bmp" ||
  3737. file.extension == "gif" ||
  3738. file.extension == "jpeg"
  3739. ) {
  3740. this.showImage = true;
  3741. this.imageUrl = this.imgSrc + file.alias;
  3742. } else {
  3743. var text = "暂不支持" + file.extension + "类型文件查看,请在客户端打开";
  3744. this.$notify({
  3745. title: "温馨提示",
  3746. message: text,
  3747. type: "info",
  3748. offset: 100,
  3749. duration: 5000
  3750. });
  3751. this.$axios({
  3752. method: "delete",
  3753. url: encodeURI(
  3754. process.env.API_HOST +
  3755. "notices/noticeuser/" +
  3756. file.archID +
  3757. "/" +
  3758. sessionStorage.userId
  3759. )
  3760. });
  3761. }
  3762. },
  3763. /**
  3764. * 客户端下载方法
  3765. * type :1 为文件,2位协作文件
  3766. */
  3767. clientDownLoad: function(file, type) {
  3768. var thisApp = this;
  3769. if (this.isClient) {
  3770. this.$axios({
  3771. method: "put",
  3772. url: encodeURI(
  3773. process.env.API_HOST +
  3774. "projects/download/" +
  3775. file.archID +
  3776. "/" +
  3777. sessionStorage.userId +
  3778. "/" +
  3779. type
  3780. )
  3781. })
  3782. .then(response => {
  3783. if (response.data.state == 1) {
  3784. file.downloadStatus = 1;
  3785. file.isDownload = true;
  3786. var archid = file.archID;
  3787. var alias = file.alias;
  3788. var filename = file.archName + "." + file.extension;
  3789. if (file.version > 1) {
  3790. filename = file.archName + file.version + "." + file.extension;
  3791. }
  3792. var folderID = file.folderID;
  3793. var folderName =
  3794. thisApp.listUserFolders[thisApp.nowFolderIndex].folderName;
  3795. var projID = file.projID;
  3796. if (type == 1) {
  3797. back.downloadFile(archid, filename, folderID,sessionStorage.userId,sessionStorage.companyId,alias);
  3798. } else {
  3799. var folderName =
  3800. thisApp.listUserFolders[thisApp.nowFolderIndex].folderName;
  3801. back.downloadFile(
  3802. archid,
  3803. filename,
  3804. folderID,
  3805. sessionStorage.userId,
  3806. sessionStorage.companyId,
  3807. alias,
  3808. sessionStorage.projName,
  3809. folderName,
  3810. sessionStorage.projId
  3811. );
  3812. }
  3813. } else {
  3814. this.$notify({
  3815. title: "温馨提示",
  3816. message: response.data.message,
  3817. type: "error",
  3818. offset: 30,
  3819. duration: 2000
  3820. });
  3821. }
  3822. })
  3823. .catch(error => {
  3824. this.$notify({
  3825. title: "温馨提示",
  3826. message: "下载失败",
  3827. type: "error",
  3828. offset: 30,
  3829. duration: 2000
  3830. });
  3831. });
  3832. }
  3833. },
  3834. /**
  3835. * 客户端上传文件
  3836. */
  3837. clientUpload() {
  3838. if (this.isClient) {
  3839. this.isShowNewFiledialog = false;
  3840. var foldergroupId="";
  3841. if(this.dbClickSelectedFolderGroupData != null && JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}")
  3842. {
  3843. foldergroupId = this.dbClickSelectedFolderGroupData.folderGroupID;
  3844. }
  3845. back.uploadFile(
  3846. this.listUserFolders[this.nowFolderIndex].folderID,
  3847. sessionStorage.userId,
  3848. foldergroupId
  3849. );
  3850. }
  3851. },
  3852. /**
  3853. * 重命名我的文件
  3854. * file:源数据
  3855. */
  3856. reNameyMyFile: function(file) {
  3857. var thisApp = this;
  3858. this.$prompt("当前文件名称: " + file.archName, "重命名", {
  3859. confirmButtonText: "确定",
  3860. cancelButtonText: "取消",
  3861. inputPattern: /\S/,
  3862. closeOnClickModal: false,
  3863. inputErrorMessage: "名称不能为空"
  3864. })
  3865. .then(({ value }) => {
  3866. file.archName = value;
  3867. file.createTime = new Date(file.createTime);
  3868. file.modifyTime = new Date(file.modifyTime);
  3869. this.$axios({
  3870. method: "put",
  3871. url: encodeURI(process.env.API_HOST + "archives/update/name"),
  3872. data: file
  3873. })
  3874. .then(function(response) {
  3875. if (response.data.state == 1) {
  3876. thisApp.$notify({
  3877. title: "恭喜您",
  3878. message: "重命名成功",
  3879. type: "success",
  3880. offset: 100,
  3881. duration: 2500
  3882. });
  3883. if (thisApp.isClient) {
  3884. var newFileName = file.archName + "." + file.extension;
  3885. // 客户端重命名文件
  3886. // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID
  3887. back.renameFile(
  3888. file.archID,
  3889. newFileName,
  3890. sessionStorage.userId
  3891. );
  3892. }
  3893. }
  3894. })
  3895. .catch(function(error) {
  3896. console.log(error);
  3897. });
  3898. })
  3899. .catch(() => {
  3900. thisApp.$notify.info({
  3901. title: "温馨提示",
  3902. message: "操作已取消",
  3903. offset: 100,
  3904. duration: 2500
  3905. });
  3906. });
  3907. },
  3908. /**
  3909. * 删除我的文件
  3910. * file:源数据
  3911. */
  3912. delMyFile: function(file) {
  3913. var thisApp = this;
  3914. if (file.createUserID != sessionStorage.userId) {
  3915. thisApp.$notify({
  3916. title: "操作提示",
  3917. message: "不能删除他人文件",
  3918. type: "info",
  3919. offset: 100,
  3920. duration: 2500
  3921. });
  3922. return;
  3923. }
  3924. this.$confirm("您正在删除文件【" + file.archName + "】,是否继续?", "", {
  3925. confirmButtonText: "确定",
  3926. cancelButtonText: "取消",
  3927. showClose: false,
  3928. type: "warning"
  3929. }).then(() => {
  3930. file.deleted = 1;
  3931. file.createTime = new Date(file.createTime);
  3932. file.modifyTime = new Date(file.modifyTime);
  3933. file.modifyUserID = sessionStorage.userId;
  3934. this.$axios({
  3935. method: "put",
  3936. url: encodeURI(process.env.API_HOST + "archives/update/del"),
  3937. data: file
  3938. })
  3939. .then(function(response) {
  3940. thisApp.$notify({
  3941. title: "恭喜您",
  3942. message: response.data.message,
  3943. type: "success",
  3944. offset: 100,
  3945. duration: 2500
  3946. });
  3947. thisApp.refreshPages();
  3948. })
  3949. .catch(function(error) {
  3950. console.log(error);
  3951. });
  3952. });
  3953. },
  3954. /**
  3955. * 获取全部的Dept数据
  3956. */
  3957. listDeptUsers: function() {
  3958. var companyId = sessionStorage.companyId;
  3959. var thisApp = this;
  3960. this.$axios({
  3961. method: "get",
  3962. url: encodeURI(process.env.API_HOST + "sysinfo/deptusers/" + companyId)
  3963. })
  3964. .then(response => {
  3965. thisApp.listDept = response.data.data;
  3966. })
  3967. .catch(error => {
  3968. console.log(error);
  3969. });
  3970. },
  3971. /**
  3972. * 打开项目设置窗体
  3973. */
  3974. projectEdit: function() {
  3975. this.closeAppManagePain();
  3976. this.isShowProjSetting = true;
  3977. this.isEditProjFolder = false;
  3978. },
  3979. projectFoldeEdit() {
  3980. this.closeAppManagePain();
  3981. this.isShowProjSetting = true;
  3982. this.isEditProjFolder = true;
  3983. },
  3984. /**
  3985. * 工作指派
  3986. */
  3987. EditStaffAndTip: function() {
  3988. this.closeAppManagePain();
  3989. this.isShowEditStaff = true;
  3990. },
  3991. /**
  3992. * 交换工作设置
  3993. */
  3994. FileShareSet: function() {
  3995. this.isShowProManager = 5;
  3996. },
  3997. /**
  3998. * 加载云应用列表
  3999. */
  4000. loadlistApp: function() {
  4001. var thisApp = this;
  4002. this.$axios({
  4003. method: "get",
  4004. url: encodeURI(
  4005. process.env.API_HOST + "apps/company/" + sessionStorage.companyId
  4006. )
  4007. })
  4008. .then(response => {
  4009. thisApp.listApp = response.data;
  4010. })
  4011. .catch(error => {
  4012. console.log(error);
  4013. });
  4014. },
  4015. /**
  4016. * 加载当前工作文件夹启用的应用
  4017. */
  4018. loadlistFolderApp: function() {
  4019. var thisApp = this;
  4020. var folderId = this.listUserFolders[this.nowFolderIndex].folderID;
  4021. this.$axios({
  4022. method: "get",
  4023. url: encodeURI(process.env.API_HOST + "apps/" + folderId)
  4024. })
  4025. .then(response => {
  4026. thisApp.listFolderApp = response.data;
  4027. })
  4028. .catch(error => {
  4029. console.log(error);
  4030. });
  4031. },
  4032. /**
  4033. * 创建云应用实例
  4034. */
  4035. createAppInstance: function(app) {
  4036. // 1.地图 2.Forge 3.超图
  4037. this.newAppInstance.appID = app.appID;
  4038. this.dialogNewAppInstanceVisible = true;
  4039. this.createAppInstanceTitle = "创建云应用-" + app.appName + "实例";
  4040. if (app.appType == 1) {
  4041. // forge
  4042. this.uploadExtention = "*";
  4043. this.dialogNewMapVisible = true;
  4044. return;
  4045. } else if (app.appType == 2) {
  4046. this.uploadExtention = "*";
  4047. } else {
  4048. this.dialogNewSuperMapVisible = true;
  4049. }
  4050. },
  4051. /**
  4052. * 保存应用实例数据
  4053. */
  4054. createAppInstanceSure: function() {
  4055. var thisApp = this;
  4056. // 验证数据
  4057. if (this.newAppInstance.showName == "") {
  4058. this.$notify({
  4059. title: "温馨提示",
  4060. message: "请输入实例名称",
  4061. type: "warning",
  4062. offset: 30,
  4063. duration: 5000
  4064. });
  4065. return;
  4066. }
  4067. this.newAppInstance.folderID = this.listUserFolders[
  4068. this.nowFolderIndex
  4069. ].folderID;
  4070. this.newAppInstance.createUserID = sessionStorage.userId;
  4071. this.$axios({
  4072. method: "post",
  4073. url: encodeURI(process.env.API_HOST + "apps/instance"),
  4074. data: this.newAppInstance
  4075. })
  4076. .then(response => {
  4077. if (response.data.state === 1) {
  4078. this.$notify({
  4079. title: "恭喜您",
  4080. message: response.data.message,
  4081. type: "success",
  4082. offset: 30,
  4083. duration: 2500
  4084. });
  4085. this.dialogNewAppInstanceVisible = false;
  4086. this.isShowNewFiledialog = false;
  4087. thisApp.newAppInstance = {
  4088. appID: "",
  4089. folderID: "",
  4090. showName: "",
  4091. description: "",
  4092. fileName: "",
  4093. alias: "",
  4094. createUserID: ""
  4095. };
  4096. } else {
  4097. this.$notify({
  4098. title: "温馨提示",
  4099. message: response.data.message,
  4100. type: "error",
  4101. offset: 30,
  4102. duration: 5000
  4103. });
  4104. }
  4105. })
  4106. .catch(error => {
  4107. console.log(error);
  4108. });
  4109. },
  4110. /**
  4111. * 创建地图应用文件
  4112. */
  4113. createMapSure() {
  4114. var thisApp = this;
  4115. var openFolderId =
  4116. thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
  4117. if (openFolderId !== null) {
  4118. // 文件上传成功时,保存文件数据到DB
  4119. this.$axios({
  4120. method: "post",
  4121. url: encodeURI(process.env.API_HOST + "archives"),
  4122. data: {
  4123. folderId: openFolderId,
  4124. filePath: thisApp.newMap.description,
  4125. fileName: thisApp.newMap.showName + ".map",
  4126. fileSize: 0,
  4127. userId: sessionStorage.userId
  4128. }
  4129. })
  4130. .then(response => {
  4131. thisApp.dialogNewMapVisible = false;
  4132. thisApp.newMap.showName = "";
  4133. thisApp.newMap.description = "";
  4134. if (response.data.state == 1) {
  4135. thisApp.refreshPages();
  4136. this.$notify({
  4137. title: "恭喜您",
  4138. message: "地图应用创建成功!",
  4139. type: "success",
  4140. offset: 100,
  4141. duration: 2500
  4142. });
  4143. } else {
  4144. this.$notify({
  4145. title: "温馨提示",
  4146. message: response.data.message,
  4147. type: "error",
  4148. offset: 100,
  4149. duration: 5000
  4150. });
  4151. }
  4152. })
  4153. .catch(error => {
  4154. console.log(error);
  4155. this.$notify({
  4156. title: "温馨提示",
  4157. message: "文件上传失败!",
  4158. type: "error",
  4159. offset: 100,
  4160. duration: 5000
  4161. });
  4162. });
  4163. } else {
  4164. this.$notify({
  4165. title: "温馨提示",
  4166. message: "创建失败!当前目录不允许新建应用",
  4167. type: "error",
  4168. offset: 100,
  4169. duration: 5000
  4170. });
  4171. }
  4172. },
  4173. createSuperMapSure() {
  4174. var thisApp = this;
  4175. var openFolderId =
  4176. thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
  4177. if (openFolderId !== null) {
  4178. // 文件上传成功时,保存文件数据到DB
  4179. this.$axios({
  4180. method: "post",
  4181. url: encodeURI(process.env.API_HOST + "archives"),
  4182. data: {
  4183. folderId: openFolderId,
  4184. filePath: thisApp.newSuperMap.description,
  4185. fileName: thisApp.newSuperMap.showName + ".supermap",
  4186. fileSize: 0,
  4187. userId: sessionStorage.userId
  4188. }
  4189. })
  4190. .then(response => {
  4191. thisApp.dialogNewSuperMapVisible = false;
  4192. thisApp.newSuperMap.showName = "";
  4193. thisApp.newSuperMap.description = "";
  4194. if (response.data.state == 1) {
  4195. thisApp.refreshPages();
  4196. this.$notify({
  4197. title: "恭喜您",
  4198. message: "地图应用创建成功!",
  4199. type: "success",
  4200. offset: 100,
  4201. duration: 2500
  4202. });
  4203. } else {
  4204. this.$notify({
  4205. title: "温馨提示",
  4206. message: response.data.message,
  4207. type: "error",
  4208. offset: 100,
  4209. duration: 5000
  4210. });
  4211. }
  4212. })
  4213. .catch(error => {
  4214. console.log(error);
  4215. this.$notify({
  4216. title: "温馨提示",
  4217. message: "文件上传失败!",
  4218. type: "error",
  4219. offset: 100,
  4220. duration: 5000
  4221. });
  4222. });
  4223. } else {
  4224. this.$notify({
  4225. title: "温馨提示",
  4226. message: "创建失败!当前目录不允许新建应用",
  4227. type: "error",
  4228. offset: 100,
  4229. duration: 5000
  4230. });
  4231. }
  4232. },
  4233. /**
  4234. * 上传文件成功时触发
  4235. */
  4236. uploadAppFileSuccess: function(file) {
  4237. this.newAppInstance.alias = file.filePath;
  4238. this.newAppInstance.fileName = file.fileName;
  4239. this.$notify({
  4240. title: "温馨提示",
  4241. message: "恭喜您,实例文件上传成功!",
  4242. type: "success",
  4243. offset: 30,
  4244. duration: 2000
  4245. });
  4246. },
  4247. /**
  4248. * 加载我的应用实例数据
  4249. */
  4250. loadMyAppInstanceList: function() {
  4251. var thisApp = this;
  4252. var folderId = this.listUserFolders[this.nowFolderIndex].folderID;
  4253. this.$axios({
  4254. method: "get",
  4255. url: encodeURI(process.env.API_HOST + "apps/instances/" + folderId)
  4256. })
  4257. .then(response => {
  4258. thisApp.myAppInstanceList = response.data;
  4259. })
  4260. .catch(error => {
  4261. console.log(error);
  4262. });
  4263. },
  4264. /**
  4265. * 更新工作文件夹应用状态
  4266. */
  4267. changeFolderApp: function() {
  4268. var status = 0;
  4269. if (!this.appState) {
  4270. // 启用
  4271. status = 1;
  4272. }
  4273. var folderId = this.listUserFolders[this.nowFolderIndex].folderID;
  4274. var param = {
  4275. folderID: folderId,
  4276. appID: this.currentApp.appID,
  4277. status: status,
  4278. createUserID: sessionStorage.userId,
  4279. modifyUserID: sessionStorage.userId
  4280. };
  4281. this.$axios({
  4282. method: "put",
  4283. url: encodeURI(process.env.API_HOST + "apps/folderapp"),
  4284. data: param
  4285. })
  4286. .then(response => {
  4287. if (response.data.state == 1) {
  4288. this.$notify({
  4289. title: "恭喜您",
  4290. message: "操作成功!",
  4291. type: "success",
  4292. offset: 100,
  4293. duration: 2500
  4294. });
  4295. } else {
  4296. this.$notify({
  4297. title: "温馨提示",
  4298. message: "操作失败!",
  4299. type: "error",
  4300. offset: 100,
  4301. duration: 5000
  4302. });
  4303. }
  4304. })
  4305. .catch(error => {
  4306. this.$notify({
  4307. title: "温馨提示",
  4308. message: "操作失败!",
  4309. type: "error",
  4310. offset: 100,
  4311. duration: 5000
  4312. });
  4313. });
  4314. },
  4315. /**
  4316. * 添加文件到公共文件夹
  4317. */
  4318. updateToPublicFile: function(file, state) {
  4319. var thisApp = this;
  4320. if (state == 0) {
  4321. this.$axios({
  4322. method: "get",
  4323. url: encodeURI(
  4324. process.env.API_HOST +
  4325. "archives/common/" +
  4326. file.archID +
  4327. "/" +
  4328. sessionStorage.comFolderId +
  4329. "/" +
  4330. sessionStorage.userId
  4331. )
  4332. })
  4333. .then(response => {
  4334. if (response.data.state == 1) {
  4335. thisApp.$notify({
  4336. title: "恭喜您",
  4337. message: response.data.message,
  4338. type: "success",
  4339. offset: 100,
  4340. duration: 2500
  4341. });
  4342. thisApp.loadListCommonFiles();
  4343. thisApp.refreshPages();
  4344. } else {
  4345. thisApp.$notify({
  4346. title: "温馨提示",
  4347. message: response.data.message,
  4348. type: "error",
  4349. offset: 100,
  4350. duration: 5000
  4351. });
  4352. }
  4353. })
  4354. .catch(error => {
  4355. console.log(error);
  4356. });
  4357. } else {
  4358. this.$axios({
  4359. method: "delete",
  4360. url: encodeURI(
  4361. process.env.API_HOST +
  4362. "archives/common/" +
  4363. file.archID +
  4364. "/" +
  4365. sessionStorage.comFolderId +
  4366. "/" +
  4367. sessionStorage.userId
  4368. )
  4369. })
  4370. .then(response => {
  4371. if (response.data.state == 1) {
  4372. thisApp.$notify({
  4373. title: "恭喜您",
  4374. message: response.data.message,
  4375. type: "success",
  4376. offset: 100,
  4377. duration: 2500
  4378. });
  4379. thisApp.loadListCommonFiles();
  4380. thisApp.refreshPages();
  4381. } else {
  4382. thisApp.$notify({
  4383. title: "温馨提示",
  4384. message: response.data.message,
  4385. type: "error",
  4386. offset: 100,
  4387. duration: 5000
  4388. });
  4389. }
  4390. })
  4391. .catch(error => {
  4392. console.log(error);
  4393. });
  4394. }
  4395. },
  4396. /**
  4397. * 设置历史文件界面
  4398. */
  4399. showFileMilestone: function(file) {
  4400. if (file.status == 1 && file.modifyUserID != sessionStorage.userId) {
  4401. this.$notify({
  4402. title: "温馨提示",
  4403. message: "其他人编辑中,不能设置历史文件",
  4404. type: "warning",
  4405. offset: 100,
  4406. duration: 5000
  4407. });
  4408. return;
  4409. }
  4410. this.dialogFileHistory = true;
  4411. this.loadFileMilestones(file);
  4412. this.currentArchID = file.archID;
  4413. },
  4414. /**
  4415. * 当前版本点击事件
  4416. */
  4417. currMilestoneChange: function() {
  4418. if (this.currentMilestone.check) {
  4419. this.currentMileArchID = this.currentMilestone.archID;
  4420. this.listMilestones.forEach(milestone => {
  4421. milestone.check = false;
  4422. });
  4423. }
  4424. },
  4425. /**
  4426. * 其它版本点击事件
  4427. */
  4428. milestoneChange: function(milestone) {
  4429. if (milestone.check) {
  4430. this.currentMileArchID = milestone.archID;
  4431. this.setOtherDisSelecte(milestone.archID);
  4432. }
  4433. },
  4434. /**
  4435. * 设置其它选择状态
  4436. */
  4437. setOtherDisSelecte: function(archid) {
  4438. this.listMilestones.forEach(milestone => {
  4439. if (milestone.archID != archid) {
  4440. milestone.check = false;
  4441. }
  4442. });
  4443. this.currentMilestone.check = false;
  4444. },
  4445. /**
  4446. * 保存历史文件
  4447. */
  4448. createMilestone: function(file) {
  4449. if (this.isCreating) {
  4450. return;
  4451. }
  4452. if (file.status == 1 && file.modifyUserID != sessionStorage.userId) {
  4453. this.$notify({
  4454. title: "温馨提示",
  4455. message: "其他人编辑中,不能设置历史文件",
  4456. type: "warning",
  4457. offset: 100,
  4458. duration: 5000
  4459. });
  4460. return;
  4461. }
  4462. this.isCreating = true;
  4463. var thisApp = this;
  4464. this.$axios({
  4465. method: "get",
  4466. url: encodeURI(
  4467. process.env.API_HOST +
  4468. "archives/milestone/" +
  4469. file.archID +
  4470. "/" +
  4471. sessionStorage.userId +
  4472. "/" +
  4473. this.dbClickSelectedFolderGroupData.folderGroupID
  4474. ),
  4475. data:{
  4476. archid: file.archID,
  4477. userid: sessionStorage.userId,
  4478. foldergroupid: this.dbClickSelectedFolderGroupData.folderGroupID
  4479. }
  4480. })
  4481. .then(response => {
  4482. if (response.data.state == 1) {
  4483. thisApp.refreshPages();
  4484. this.$notify({
  4485. title: "恭喜您",
  4486. message: response.data.message,
  4487. type: "success",
  4488. offset: 100,
  4489. duration: 2500
  4490. });
  4491. thisApp.isCreating = false;
  4492. } else {
  4493. this.$notify({
  4494. title: "温馨提示",
  4495. message: response.data.message,
  4496. type: "error",
  4497. offset: 100,
  4498. duration: 5000
  4499. });
  4500. }
  4501. })
  4502. .catch(error => {
  4503. console.log(error);
  4504. });
  4505. },
  4506. /**
  4507. * 获取历史文件记录
  4508. */
  4509. loadFileMilestones: function(file) {
  4510. var thisApp = this;
  4511. thisApp.currentMilestone = "";
  4512. thisApp.listMilestones = [];
  4513. this.$axios({
  4514. method: "get",
  4515. url: encodeURI(
  4516. process.env.API_HOST + "archives/milestone/" + file.archID
  4517. )
  4518. })
  4519. .then(response => {
  4520. if (response.data.state == 1) {
  4521. if (response.data.data != null && response.data.data.length > 0) {
  4522. response.data.data.forEach(milestone => {
  4523. if (milestone.archID == file.archID) {
  4524. milestone.check = true;
  4525. thisApp.currentMilestone = milestone;
  4526. thisApp.currentMileArchID = milestone.archID;
  4527. } else {
  4528. milestone.check = false;
  4529. thisApp.listMilestones.push(milestone);
  4530. }
  4531. });
  4532. }
  4533. } else {
  4534. this.$notify({
  4535. title: "温馨提示",
  4536. message: response.data.message,
  4537. type: "error",
  4538. offset: 100,
  4539. duration: 5000
  4540. });
  4541. }
  4542. })
  4543. .catch(error => {
  4544. console.log(error);
  4545. });
  4546. },
  4547. /**
  4548. * 设置历史文件
  4549. */
  4550. setMilestones: function() {
  4551. if (this.currentMileArchID == this.currentMilestone.archID) {
  4552. this.dialogFileHistory = false;
  4553. return;
  4554. }
  4555. var thisApp = this;
  4556. this.$axios({
  4557. method: "get",
  4558. url: encodeURI(
  4559. process.env.API_HOST +
  4560. "archives/milestone/set/" +
  4561. this.currentArchID +
  4562. "/" +
  4563. this.currentMileArchID +
  4564. "/" +
  4565. sessionStorage.userId
  4566. )
  4567. })
  4568. .then(response => {
  4569. if (response.data.state == 1) {
  4570. this.$notify({
  4571. title: "恭喜您",
  4572. message: response.data.message,
  4573. type: "success",
  4574. offset: 100,
  4575. duration: 5000
  4576. });
  4577. thisApp.dialogFileHistory = false;
  4578. thisApp.refreshPages();
  4579. } else {
  4580. this.$notify({
  4581. title: "温馨提示",
  4582. message: response.data.message,
  4583. type: "error",
  4584. offset: 100,
  4585. duration: 5000
  4586. });
  4587. }
  4588. })
  4589. .catch(error => {
  4590. console.log(error);
  4591. });
  4592. },
  4593. /**
  4594. * 右键复制文件
  4595. */
  4596. copyFile: function(file) {
  4597. var thisApp = this;
  4598. thisApp.$axios({
  4599. method: "get",
  4600. url: encodeURI(
  4601. process.env.API_HOST +
  4602. "archives/copydup/" +
  4603. file.archID +
  4604. "/" +
  4605. sessionStorage.userId +
  4606. "/" +
  4607. thisApp.dbClickSelectedFolderGroupData.folderGroupID
  4608. ),
  4609. data: {
  4610. archid: file.archID,
  4611. userid: sessionStorage.userId,
  4612. foldergroupid: thisApp.dbClickSelectedFolderGroupData.folderGroupID
  4613. }
  4614. })
  4615. .then(response => {
  4616. if (response.data.state == 1) {
  4617. thisApp.$notify({
  4618. title: "恭喜您",
  4619. message: "复制文件成功",
  4620. type: "success",
  4621. offset: 100,
  4622. duration: 2500
  4623. });
  4624. thisApp.goFolder(thisApp.nowFolderIndex);
  4625. var nowFile = response.data.data;
  4626. var newFileName = nowFile.archName + "." + nowFile.extension;
  4627. if (thisApp.isClient) {
  4628. // 客户复制文件
  4629. // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID;4.strFolderId:目的文件夹ID
  4630. back.copyFile(
  4631. file.archID,
  4632. newFileName,
  4633. sessionStorage.userId,
  4634. nowFile.folderID,
  4635. nowFile.archID
  4636. );
  4637. }
  4638. } else {
  4639. this.$notify({
  4640. title: "温馨提示",
  4641. message: response.data.message,
  4642. type: "error",
  4643. offset: 30,
  4644. duration: 5000
  4645. });
  4646. }
  4647. })
  4648. .catch(error => {
  4649. console.log(error);
  4650. });
  4651. },
  4652. /**
  4653. * 右键复制与移动至其它文件夹
  4654. */
  4655. copyAndMoveFolder: function(file, classif) {
  4656. if (classif == "copy") {
  4657. this.dialogTtile = "复制到其它文件夹";
  4658. } else if (classif == "move") {
  4659. this.dialogTtile = "移动到其它文件夹";
  4660. }
  4661. this.BtnRightFile = file;
  4662. this.classif = classif;
  4663. this.strFileOrFoldergroup = "file"; //zxm+
  4664. this.dialogCopyAndMove = true;
  4665. },
  4666. /**
  4667. * 右键复制与移动至其它文件夹的具体实现
  4668. */
  4669. copyAndMoveToOtherFile: function() {
  4670. var thisApp = this;
  4671. if (
  4672. thisApp.dialogSelectedFolder == thisApp.BtnRightFile.folderID ||
  4673. thisApp.dialogSelectedFolder == thisApp.btnRightFoldergoup.folderID
  4674. ) {
  4675. thisApp.$notify({
  4676. title: "温馨提示",
  4677. message: "当前工作已存在,请选择其他工作",
  4678. type: "success",
  4679. offset: 100,
  4680. duration: 2500
  4681. });
  4682. return;
  4683. }
  4684. //移至/复制 文件操作
  4685. if (thisApp.strFileOrFoldergroup == "file") {
  4686. var file = thisApp.BtnRightFile;
  4687. var url = "";
  4688. if (thisApp.classif == "copy") {
  4689. url = encodeURI(
  4690. process.env.API_HOST +
  4691. "archives/copy/" +
  4692. thisApp.dialogSelectedFolder +
  4693. "/" +
  4694. file.archID +
  4695. "/" +
  4696. sessionStorage.userId
  4697. );
  4698. } else {
  4699. url = encodeURI(
  4700. process.env.API_HOST +
  4701. "archives/move/" +
  4702. thisApp.dialogSelectedFolder +
  4703. "/" +
  4704. file.archID +
  4705. "/" +
  4706. sessionStorage.userId
  4707. );
  4708. }
  4709. thisApp
  4710. .$axios({
  4711. method: "get",
  4712. url: url,
  4713. data: {
  4714. archid: file.archID,
  4715. folderid: thisApp.dialogSelectedFolder,
  4716. userid: sessionStorage.userId
  4717. }
  4718. })
  4719. .then(response => {
  4720. if (response.data.state == 1) {
  4721. thisApp.$notify({
  4722. title: "恭喜您",
  4723. message: "操作成功",
  4724. type: "success",
  4725. offset: 100,
  4726. duration: 2500
  4727. });
  4728. thisApp.dialogCopyAndMove = false;
  4729. thisApp.refreshPages();
  4730. var nowFile = response.data.data;
  4731. var newFileName = nowFile.archName + "." + nowFile.extension;
  4732. if (thisApp.isClient) {
  4733. var file = response.data.data;
  4734. if (thisApp.classif == "copy") {
  4735. // 客户复制文件
  4736. // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID;4.strFolderId:目的文件夹ID;5:strNewFileID:新文件ID
  4737. back.copyFile(
  4738. thisApp.BtnRightFile.archID,
  4739. newFileName,
  4740. sessionStorage.userId,
  4741. nowFile.folderID,
  4742. nowFile.archID
  4743. );
  4744. } else {
  4745. // 客户端移动文件
  4746. // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID;4.strFolderId:目的文件夹ID
  4747. back.moveFile(
  4748. nowFile.archID,
  4749. newFileName,
  4750. sessionStorage.userId,
  4751. nowFile.folderID
  4752. );
  4753. }
  4754. }
  4755. } else {
  4756. thisApp.$notify({
  4757. title: "温馨提示",
  4758. message: response.data.message,
  4759. type: "error",
  4760. offset: 30,
  4761. duration: 5000
  4762. });
  4763. }
  4764. })
  4765. .catch(error => {
  4766. console.log(error);
  4767. });
  4768. }
  4769. //移至/复制 文件分组操作 zxm+
  4770. if (thisApp.strFileOrFoldergroup == "foldergroup") {
  4771. this.copyOrMoveFoldergroupFun();
  4772. }
  4773. },
  4774. /**
  4775. * 打开应用
  4776. */
  4777. openApp: function(appinstance) {
  4778. this.showApp = true;
  4779. this.appInstanceTitle = "查看应用实例-" + appinstance.showName;
  4780. this.instanceType = appinstance.appType;
  4781. this.currentAppInstance = appinstance;
  4782. },
  4783. /**
  4784. * 分配人员
  4785. */
  4786. addUser: function(index) {
  4787. this.selectedUser = this.listNewFolder[parseInt(index)].listUser;
  4788. //左侧选中状态根据右侧人员状态改变
  4789. this.enterIsCheck();
  4790. this.isAloneDistWorkPeople = true;
  4791. this.isAloneDistWork = false;
  4792. },
  4793. /**
  4794. * 保存项目信息
  4795. */
  4796. saveProject: function() {
  4797. this.$axios({
  4798. method: "put",
  4799. url: encodeURI(process.env.API_HOST + "projects"),
  4800. data: {
  4801. projectData: this.nowProject,
  4802. listFolder: this.listNewFolder,
  4803. listProjProp: this.listProjProp,
  4804. userId: sessionStorage.userId
  4805. }
  4806. })
  4807. .then(response => {
  4808. if (response.data.state === 1) {
  4809. this.$notify({
  4810. title: "恭喜您",
  4811. message: response.data.message,
  4812. type: "success",
  4813. offset: 30,
  4814. duration: 2500
  4815. });
  4816. this.isShowProjSetting = false;
  4817. } else {
  4818. this.$notify({
  4819. title: "温馨提示",
  4820. message: response.data.message,
  4821. type: "error",
  4822. offset: 30,
  4823. duration: 5000
  4824. });
  4825. }
  4826. })
  4827. .catch(error => {
  4828. console.log(error);
  4829. });
  4830. },
  4831. /*
  4832. * 关闭分配工作弹框
  4833. */
  4834. offProjSetDialog: function() {
  4835. this.isShowProjSetting = false;
  4836. this.isAloneDistWorkPeople = false;
  4837. this.isAloneDistWork = true;
  4838. this.isProjectviewbtn = false;
  4839. this.listNewFolder = [];
  4840. this.listFiles = [];
  4841. this.emptyValue = "";
  4842. },
  4843. /*
  4844. *编辑自定义工作
  4845. */
  4846. eidtTitle: function() {
  4847. this.showTitle = 2;
  4848. },
  4849. /*
  4850. *保存自定义工作
  4851. */
  4852. saveTitle: function() {
  4853. this.showTitle = 1;
  4854. },
  4855. /*
  4856. *删除分配工作的自定义工作
  4857. */
  4858. deleTitle: function(index) {
  4859. this.$confirm("此操作将删除该文件夹, 是否继续?", "提示", {
  4860. confirmButtonText: "确定",
  4861. cancelButtonText: "取消",
  4862. type: "warning"
  4863. })
  4864. .then(() => {
  4865. this.$notify({
  4866. title: "恭喜您",
  4867. message: "删除成功!",
  4868. type: "success",
  4869. offset: 30,
  4870. duration: 2500
  4871. });
  4872. this.listNewFolder.splice(index, 1);
  4873. })
  4874. .catch(() => {});
  4875. },
  4876. /*
  4877. *删除分配工作中被选中的人员
  4878. */
  4879. deleteDistWorkUser: function(index, checkIndex) {
  4880. this.listNewFolder[index].listUser.splice(checkIndex, 1);
  4881. },
  4882. /**
  4883. * 添加自定义工作-分配工作时
  4884. */
  4885. addNewFolderWork: function() {
  4886. this.newfolder = {
  4887. folderName: "自定义工作" + this.newFolderIndex,
  4888. default: false,
  4889. listUser: []
  4890. };
  4891. this.listNewFolder.push(this.newfolder);
  4892. this.newFolderIndex = this.newFolderIndex + 1;
  4893. this.newFolderLength = this.listNewFolder.length + 1;
  4894. },
  4895. /*
  4896. *返回单独分配工作页面
  4897. */
  4898. backProjSet: function() {
  4899. this.cancelCheck();
  4900. this.isProjectview = false;
  4901. this.isAloneDistWorkPeople = false;
  4902. this.isAloneDistWork = true;
  4903. this.isEditProjectviewBtn = false;
  4904. this.isProjectviewbtn = false;
  4905. this.isShowProInfo = true;
  4906. },
  4907. /**
  4908. * 查看下一个文件夹文件
  4909. */
  4910. nextFolder: function() {
  4911. this.isShowRightManager = false;
  4912. if (this.nowFolderIndex < this.listUserFolders.length - 1) {
  4913. this.nowFolderIndex = this.nowFolderIndex + 1;
  4914. this.nowFolder = this.listUserFolders[this.nowFolderIndex];
  4915. this.dbClickSelectedFolderGroupData = {}; //zxm+ 点击工作链节点时 清空双击的文件分组对象
  4916. this.folderGroupBreads = []; //zxm+ 点击工作链节点时 清空面包屑
  4917. this.isShowWorkt = true; //zxm+ 点击工作链节点时 显示我的文件和工作文件
  4918. this.isShowBread = false; //zxm+ 点击工作链节点时 隐藏面包屑
  4919. this.listFiles();
  4920. } else {
  4921. this.$notify({
  4922. title: "温馨提示",
  4923. message: "不能再向后了!",
  4924. type: "success",
  4925. offset: 30,
  4926. duration: 2500
  4927. });
  4928. }
  4929. },
  4930. /**
  4931. * 当前工作点击
  4932. */
  4933. nowFolderClick(index) {
  4934. this.isShowRightManager = false;
  4935. this.nowFolderIndex = index;
  4936. sessionStorage.nowFolderIndex = index;
  4937. this.nowFolder = this.listUserFolders[this.nowFolderIndex];
  4938. this.dbClickSelectedFolderGroupData = {}; //zxm+ 点击工作链节点时 清空双击的文件分组对象
  4939. this.folderGroupBreads = []; //zxm+ 点击工作链节点时 清空面包屑
  4940. this.isShowWorkt = true; //zxm+ 点击工作链节点时 显示我的文件和工作文件
  4941. this.isShowBread = false; //zxm+ 点击工作链节点时 隐藏面包屑
  4942. clearInterval(this.timer);
  4943. this.listFiles();
  4944. this.timer = setInterval(() => {
  4945. this.listFiles();
  4946. }, 3 * 1000);
  4947. },
  4948. /**
  4949. * 查看上一个文件夹文件
  4950. */
  4951. previousFolder: function() {
  4952. this.isShowRightManager = false;
  4953. if (this.nowFolderIndex > 0) {
  4954. this.nowFolderIndex = this.nowFolderIndex - 1;
  4955. this.nowFolder = this.listUserFolders[this.nowFolderIndex];
  4956. sessionStorage.nowFolderIndex = this.nowFolderIndex;
  4957. this.dbClickSelectedFolderGroupData = {}; //zxm+ 点击工作链节点时 清空双击的文件分组对象
  4958. this.folderGroupBreads = []; //zxm+ 点击工作链节点时 清空面包屑
  4959. this.isShowWorkt = true; //zxm+ 点击工作链节点时 显示我的文件和工作文件
  4960. this.isShowBread = false; //zxm+ 点击工作链节点时 隐藏面包屑
  4961. clearInterval(this.timer);
  4962. this.listFiles();
  4963. this.timer = setInterval(() => {
  4964. this.listFiles();
  4965. }, 3 * 1000);
  4966. } else {
  4967. this.$notify({
  4968. title: "温馨提示",
  4969. message: "不能再向前了",
  4970. type: "success",
  4971. offset: 30,
  4972. duration: 2500
  4973. });
  4974. }
  4975. },
  4976. /**
  4977. * 跳转到当前工作
  4978. */
  4979. goFolder: function(index) {
  4980. this.nowFolderIndex = index;
  4981. this.nowFolder = this.listUserFolders[this.nowFolderIndex];
  4982. this.refreshPages();
  4983. this.closeAppManagePain();
  4984. sessionStorage.nowFolderIndex = index;
  4985. },
  4986. /**
  4987. * 工作链页面点击
  4988. */
  4989. goFolderAndBack(index) {
  4990. this.goFolder(index);
  4991. this.hideWorklinkPage();
  4992. },
  4993. /**
  4994. * 查询文件
  4995. */
  4996. onSearch: function() {
  4997. var thisApp = this;
  4998. this.isShowMyAppInstanceList = false;
  4999. if (thisApp.searchArchName == "") {
  5000. this.listFiles();
  5001. } else {
  5002. this.$axios({
  5003. method: "get",
  5004. url: encodeURI(
  5005. process.env.API_HOST +
  5006. "archives" +
  5007. "/" +
  5008. thisApp.nowFolderId +
  5009. "/search/" +
  5010. thisApp.searchArchName
  5011. )
  5012. })
  5013. .then(response => {
  5014. thisApp.myFilesList = response.data;
  5015. })
  5016. .catch(error => {
  5017. console.log(error);
  5018. });
  5019. }
  5020. },
  5021. /**
  5022. * 导入Forge
  5023. */
  5024. importForge: function() {
  5025. this.$router.push({
  5026. name: "forgeview",
  5027. params: {
  5028. modelPath: "http://123.57.83.204:8000/3d/yey/index.html"
  5029. }
  5030. });
  5031. },
  5032. /**
  5033. * @description: 滚动条
  5034. * @return:
  5035. */
  5036. onscroll: function() {
  5037. if (this.$route.name == "workspace") {
  5038. var topScroll = document.body.scrollTop; //滚动的距离,距离顶部的距离
  5039. var bignav = document.getElementById("bignav"); //获取到导航栏id
  5040. if (topScroll > 350) {
  5041. //当滚动距离大于250px时执行下面的东西
  5042. bignav.style.position = "fixed";
  5043. bignav.style.top = "120px";
  5044. bignav.style.zIndex = "9999";
  5045. } else {
  5046. //当滚动距离小于250的时候执行下面的内容,也就是让导航栏恢复原状
  5047. bignav.style.position = "static";
  5048. }
  5049. }
  5050. },
  5051. /**
  5052. * 跳转到云应用
  5053. */
  5054. toManagerCloudApp: function() {
  5055. this.isShowProManager = 2;
  5056. this.loadlistApp();
  5057. },
  5058. /**
  5059. * @description: 返回
  5060. * @return:
  5061. */
  5062. backProManager: function() {
  5063. this.isShowProManager = 1;
  5064. },
  5065. /**
  5066. * @description: 查看应用
  5067. * @return:
  5068. */
  5069. toAppInfomation: function(app) {
  5070. this.isShowProManager = 3;
  5071. this.currentApp = app;
  5072. var thisApp = this;
  5073. var param = {
  5074. folderid: thisApp.listUserFolders[thisApp.nowFolderIndex].folderID,
  5075. appid: app.appID
  5076. };
  5077. // 获取文件夹应用状态信息
  5078. this.$axios({
  5079. method: "get",
  5080. url: encodeURI(process.env.API_HOST + "apps/folderapp"),
  5081. params: param
  5082. }).then(response => {
  5083. if (response.data.state == 1) {
  5084. if (response.data.data.status == 0) {
  5085. thisApp.appState = true;
  5086. } else {
  5087. thisApp.appState = false;
  5088. }
  5089. } else {
  5090. thisApp.appState = false;
  5091. }
  5092. });
  5093. },
  5094. /**
  5095. * @description: 返回
  5096. * @return:
  5097. */
  5098. backManagerCloudApp: function() {
  5099. this.isShowProManager = 2;
  5100. },
  5101. /**
  5102. * 编辑项目概况
  5103. */
  5104. EidtProjectInfo: function() {
  5105. this.isProjectviewbtn = true;
  5106. this.isEditProjectviewBtn = false;
  5107. this.isShowProInfo = false;
  5108. },
  5109. /**
  5110. * 保存项目概况
  5111. */
  5112. saveProjectInfo: function() {
  5113. this.isProjectviewbtn = false;
  5114. this.isShowProInfo = true;
  5115. this.isEditProjectviewBtn = true;
  5116. },
  5117. /*
  5118. *隐藏新建项目弹框,显示底部弹框
  5119. */
  5120. showzhankai: function() {
  5121. this.isBottomNewProj = true;
  5122. this.isNewProj = false;
  5123. },
  5124. /**
  5125. * 新建项目窗口展现
  5126. */
  5127. showContinueNewProj: function() {
  5128. this.isNewProj = true;
  5129. this.isBottomNewProj = false;
  5130. },
  5131. /*
  5132. * 关闭新建项目弹框
  5133. */
  5134. offDialog: function() {
  5135. this.isNewProj = false;
  5136. this.isBottomNewProj = true;
  5137. },
  5138. /**
  5139. * 新建文件夹显示
  5140. */
  5141. showContinueNewFolder: function() {
  5142. this.isNewFolder = true;
  5143. this.isBottomNewFolder = false;
  5144. },
  5145. /**
  5146. * 打开文件夹
  5147. * item:要打开的文件夹对象
  5148. */
  5149. openFolder: function(item) {
  5150. if (this.openFolderId != item.objectID) {
  5151. if (item.baseType == 0) {
  5152. this.loadData(item.objectID);
  5153. }
  5154. }
  5155. },
  5156. /**
  5157. * 下载文件
  5158. * item:文件对象
  5159. */
  5160. downLoadFile: function(item) {
  5161. if (item.alias != null) {
  5162. var url = process.env.API_HOST + "archives/download/" + item.objectID;
  5163. var iframe = document.createElement("iframe");
  5164. iframe.style.display = "none";
  5165. iframe.src = url;
  5166. document.body.appendChild(iframe);
  5167. // 删除消息通知
  5168. this.$axios({
  5169. method: "delete",
  5170. url: encodeURI(
  5171. process.env.API_HOST +
  5172. "notices/noticeuser/" +
  5173. item.objectID +
  5174. "/" +
  5175. sessionStorage.userId
  5176. )
  5177. });
  5178. }
  5179. },
  5180. /**
  5181. * 删除文件
  5182. * item:文件对象
  5183. */
  5184. deleteFile: function(item) {
  5185. var thisApp = this;
  5186. this.$confirm("删除文件:" + item.objectName + ", 是否继续?", "提示", {
  5187. confirmButtonText: "确定",
  5188. cancelButtonText: "取消",
  5189. type: "warning"
  5190. })
  5191. .then(() => {
  5192. item.modifyUserID = sessionStorage.userId;
  5193. item.deleted = 1;
  5194. this.$axios({
  5195. method: "put",
  5196. url: encodeURI(process.env.API_HOST + "archives"),
  5197. data: item
  5198. })
  5199. .then(response => {
  5200. if (response.data.state == 1) {
  5201. this.$notify({
  5202. title: "恭喜您",
  5203. message: "删除成功!",
  5204. type: "success",
  5205. offset: 100,
  5206. duration: 2500
  5207. });
  5208. thisApp.loadData(item.superID);
  5209. } else {
  5210. this.$notify({
  5211. title: "温馨提示",
  5212. message: response.data.message,
  5213. type: "error",
  5214. offset: 100,
  5215. duration: 2500
  5216. });
  5217. }
  5218. })
  5219. .catch(error => {
  5220. console.log(error);
  5221. });
  5222. })
  5223. .catch(() => {});
  5224. },
  5225. /**
  5226. * 上传文件
  5227. */
  5228. uploadFile: function() {
  5229. $("#upload_btn").click();
  5230. },
  5231. /**
  5232. * 上传文件之前显示上传组件,以显示上传列表
  5233. */
  5234. uploadBefore() {
  5235. this.showDrag = true;
  5236. },
  5237. /**
  5238. * 文件上传成功时回调
  5239. * @param file:文件上传成功时返回的文件信息对象
  5240. */
  5241. uploadFileSuccess: function(file) {
  5242. this.showDrag = false;
  5243. var thisApp = this;
  5244. var openFolderId =
  5245. thisApp.listUserFolders[thisApp.nowFolderIndex].folderID;
  5246. if (openFolderId !== null) {
  5247. var foldergroupId = "";
  5248. if (
  5249. this.dbClickSelectedFolderGroupData != null &&
  5250. JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}"
  5251. ) {
  5252. foldergroupId = this.dbClickSelectedFolderGroupData.folderGroupID;
  5253. }
  5254. // 文件上传成功时,保存文件数据到DB
  5255. this.$axios({
  5256. method: "post",
  5257. url: encodeURI(process.env.API_HOST + "archives"),
  5258. data: {
  5259. folderId: openFolderId,
  5260. filePath: file.filePath,
  5261. fileName: file.fileName,
  5262. fileSize: file.fileSize,
  5263. userId: sessionStorage.userId,
  5264. foldergroupId: foldergroupId
  5265. }
  5266. })
  5267. .then(response => {
  5268. // this.isShowNewFiledialog = false;
  5269. if (response.data.state == 1) {
  5270. //zxm修改 如果直接在工作节点下上传文件走listFiles获取数据,否则在文件分组下上传文件则走intoFoldergroup获取数据
  5271. if (foldergroupId == null || foldergroupId == "") {
  5272. this.listFiles();
  5273. } else {
  5274. this.intoFoldergroup(this.dbClickSelectedFolderGroupData);
  5275. }
  5276. this.isShowNewFiledialog = false;
  5277. this.$notify({
  5278. title: "恭喜您",
  5279. message: "文件上传成功!",
  5280. type: "success",
  5281. offset: 100,
  5282. duration: 2500
  5283. });
  5284. } else {
  5285. this.$notify({
  5286. title: "温馨提示",
  5287. message: response.data.message,
  5288. type: "error",
  5289. offset: 100,
  5290. duration: 5000
  5291. });
  5292. }
  5293. })
  5294. .catch(error => {
  5295. console.log(error);
  5296. this.$notify({
  5297. title: "温馨提示",
  5298. message: "文件上传失败!",
  5299. type: "error",
  5300. offset: 100,
  5301. duration: 5000
  5302. });
  5303. });
  5304. } else {
  5305. this.$notify({
  5306. title: "温馨提示",
  5307. message: "文件上传失败!当前目录不允许上传文件",
  5308. type: "error",
  5309. offset: 100,
  5310. duration: 5000
  5311. });
  5312. }
  5313. },
  5314. /**
  5315. * @description: 搜索文件
  5316. * @return:
  5317. */
  5318. searchFile: function() {
  5319. this.isShowsearch = !this.isShowsearch;
  5320. },
  5321. /**
  5322. * @description: 搜索文件
  5323. * @return:
  5324. */
  5325. coFileSearch: function() {
  5326. this.isShowCosearch = !this.isShowCosearch;
  5327. },
  5328. /**
  5329. * 创建文件
  5330. */
  5331. createFile: function() {
  5332. this.isShowNewFiledialog = true;
  5333. },
  5334. /**
  5335. * 创建云文件类型改变时触发
  5336. */
  5337. fileCloudClick: function(item) {
  5338. this.currentCloudFile = item;
  5339. this.createType = 1;
  5340. this.createCloudFileTile = "创建 " + item.extension + " 云文件";
  5341. this.dialogNewCloudFileVisible = true;
  5342. this.fileNameBefore =
  5343. sessionStorage.projName + "_" + this.nowFolderName + "_";
  5344. this.fileNameExt = "." + item.extension;
  5345. },
  5346. /**
  5347. * 创建云文件类型改变时触发
  5348. */
  5349. fileTempClick: function(item, index) {
  5350. this.selctedIndex = index;
  5351. this.currentTempFile = item;
  5352. this.createType = 2;
  5353. this.createCloudFileTile = "创建 " + item.extension + " 样板文件";
  5354. this.dialogNewCloudFileVisible = true;
  5355. this.fileNameBefore =
  5356. sessionStorage.projName + "_" + this.nowFolderName + "_";
  5357. this.fileNameExt = "." + item.extension;
  5358. },
  5359. /**
  5360. * 创建文件
  5361. */
  5362. createFileSure: function() {
  5363. var actionUrl = "";
  5364. var fileId = "";
  5365. var thisApp=this;
  5366. if (this.createType == 1) {
  5367. actionUrl = encodeURI(process.env.API_HOST + "archives/cloudfile");
  5368. fileId = this.currentCloudFile.fileID;
  5369. }
  5370. if (this.createType == 2) {
  5371. actionUrl = encodeURI(process.env.API_HOST + "archives/tempfile");
  5372. fileId = this.currentTempFile.nodeFileID;
  5373. }
  5374. var folderId = this.listUserFolders[this.nowFolderIndex].folderID;
  5375. var foldergroupId="";
  5376. if(this.dbClickSelectedFolderGroupData != null && JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}")
  5377. {
  5378. foldergroupId = this.dbClickSelectedFolderGroupData.folderGroupID;
  5379. }
  5380. var param = {
  5381. fileName: this.createCloudFileName,
  5382. folderId: folderId,
  5383. fileId: fileId,
  5384. userId: sessionStorage.userId,
  5385. companyId: sessionStorage.companyId,
  5386. folderGroupID:foldergroupId
  5387. };
  5388. this.$axios({
  5389. method: "post",
  5390. url: actionUrl,
  5391. data: param
  5392. })
  5393. .then(response => {
  5394. if (response.data.state == 1) {
  5395. thisApp.refreshPages();
  5396. this.$notify({
  5397. title: "恭喜您",
  5398. message: response.data.message,
  5399. type: "success",
  5400. offset: 100,
  5401. duration: 2500
  5402. });
  5403. this.dialogNewCloudFileVisible = false;
  5404. this.isShowNewFiledialog = false;
  5405. this.createCloudFileName = "";
  5406. var file = response.data.data;
  5407. if (this.isClient) {
  5408. this.clientDownLoad(file, 1);
  5409. }
  5410. } else {
  5411. this.$notify({
  5412. title: "温馨提示",
  5413. message: response.data.message,
  5414. type: "error",
  5415. offset: 100,
  5416. duration: 5000
  5417. });
  5418. }
  5419. })
  5420. .catch(error => {
  5421. this.$notify({
  5422. title: "温馨提示",
  5423. message: "文件创建失败!",
  5424. type: "error",
  5425. offset: 100,
  5426. duration: 5000
  5427. });
  5428. });
  5429. },
  5430. /**
  5431. * 协作文件切换公共文件
  5432. */
  5433. workTab(num) {
  5434. this.curactive = num;
  5435. this.fileindex = num;
  5436. if (num == 0) {
  5437. this.listCollaborationFiles();
  5438. } else if (num == 1) {
  5439. this.loadListCommonFiles();
  5440. }
  5441. },
  5442. /**
  5443. * 协作文件展开
  5444. */
  5445. openCopage: function() {
  5446. this.isShowpageIcon = false;
  5447. this.neibianju = "neibianju1";
  5448. this.closepageH = "closepageH";
  5449. },
  5450. /**
  5451. * 协作文件折叠
  5452. */
  5453. closeCopage: function() {
  5454. this.isShowpageIcon = true;
  5455. this.neibianju = "neibianju";
  5456. this.closepageH = "";
  5457. },
  5458. /**
  5459. * 右键菜单
  5460. */
  5461. rightShowMenu: function(e, file, type) {
  5462. const menuMinWidth = 10;
  5463. const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
  5464. const offsetWidth = this.$el.offsetWidth; // container width
  5465. const maxLeft = offsetWidth - menuMinWidth; // left boundary
  5466. const left = e.clientX - offsetLeft; // 15: margin right
  5467. if (left > maxLeft) {
  5468. this.left = maxLeft;
  5469. } else {
  5470. this.left = left;
  5471. }
  5472. this.left = e.clientX; // fix 位置bug
  5473. if (e.clientY < document.body.clientHeight / 2) {
  5474. this.top = e.clientY - 120; // fix 位置bug
  5475. } else {
  5476. this.top = e.clientY; // fix 位置bug
  5477. }
  5478. if (type == 2 || type == 3) {
  5479. //工作文件下 指定显示某些菜单项
  5480. if (this.currentPageType == 1) {
  5481. this.isShowMenuFile = true;
  5482. } else {
  5483. this.isShowMenuFile = false;
  5484. }
  5485. if (file.status == 2) {
  5486. if (this.isClient) {
  5487. this.top = this.top - 100;
  5488. } else {
  5489. this.top = this.top - 50;
  5490. }
  5491. } else {
  5492. if (this.isClient) {
  5493. this.top = this.top - 100;
  5494. } else {
  5495. this.top = this.top - 50;
  5496. }
  5497. }
  5498. } else if (type == 4) {
  5499. //工作文件下 不显示“新建文件夹”菜单项
  5500. if (this.currentPageType == 1) {
  5501. this.isShowMenuFoldergroup = false;
  5502. } else {
  5503. this.isShowMenuFoldergroup = true;
  5504. }
  5505. //点击空白处只显示“新建文件夹”
  5506. if (file == "新建文件夹") {
  5507. this.isShowMenuItemCreateFoldergroup = true;
  5508. //"新建文件夹"的位置
  5509. if (e.clientY < document.body.clientHeight / 2) {
  5510. this.top = e.clientY - 120; // fix 位置bug
  5511. } else {
  5512. this.top = e.clientY - 80; // fix 位置bug
  5513. }
  5514. } else {
  5515. this.isShowMenuItemCreateFoldergroup = false;
  5516. }
  5517. //显示分组菜单的位置
  5518. if (this.isClient) {
  5519. this.top = this.top - 0;
  5520. } else {
  5521. this.top = this.top + 75;
  5522. }
  5523. } else {
  5524. //工作文件下 指定显示某些菜单项
  5525. if (this.currentPageType == 1) {
  5526. this.isShowMenuFile = true;
  5527. } else {
  5528. this.isShowMenuFile = false;
  5529. }
  5530. //显示分组菜单的位置
  5531. if (this.isClient) {
  5532. this.top = this.top - 100;
  5533. } else {
  5534. this.top = this.top - 50;
  5535. }
  5536. }
  5537. this.rightMenuvisible = true;
  5538. this.showType = type;
  5539. this.BtnRightFile = file; //鼠标右击的文件
  5540. //this.btnRightFoldergoup = file; //zxm+ 鼠标右击的文件分组
  5541. if (file == "新建文件夹") {
  5542. this.btnRightFoldergoup = {};
  5543. } else {
  5544. this.btnRightFoldergoup = file; //zxm+ 鼠标右击的文件分组
  5545. }
  5546. },
  5547. /**
  5548. * 关闭
  5549. */
  5550. closeShowMenu: function() {
  5551. this.rightMenuvisible = false;
  5552. },
  5553. /*
  5554. *进入前动画
  5555. */
  5556. distBeforeEnter: function(elAlone) {
  5557. elAlone.style.opacity = 0;
  5558. },
  5559. /*
  5560. * 进入后动画
  5561. */
  5562. distEnter: function(elAlone, done) {
  5563. Velocity(
  5564. elAlone,
  5565. {
  5566. opacity: 1,
  5567. bottom: "0px"
  5568. },
  5569. {
  5570. duration: 500,
  5571. complete: done
  5572. }
  5573. );
  5574. },
  5575. /*
  5576. * 离开时动画
  5577. */
  5578. distLeave: function(elAlone, done) {
  5579. Velocity(
  5580. elAlone,
  5581. {
  5582. bottom: "-740px",
  5583. opacity: "0"
  5584. },
  5585. {
  5586. duration: 500,
  5587. complete: done
  5588. }
  5589. );
  5590. },
  5591. /**
  5592. * 关闭职员指派弹框
  5593. */
  5594. closeDistWork: function(data) {
  5595. this.isShowEditStaff = false;
  5596. },
  5597. /**
  5598. * 关闭项目设置窗体
  5599. */
  5600. closeProjSet: function() {
  5601. this.isShowProjSetting = false;
  5602. },
  5603. /**
  5604. * 关闭文件交换设置窗体
  5605. */
  5606. closeFileShareSet: function(data) {
  5607. this.showAllAppManagement();
  5608. },
  5609. /****协作空间 拖拽功能方法 start*/
  5610. /**
  5611. * 新建文件夹显示弹窗
  5612. */
  5613. newCreateFolderGroup: function() {
  5614. this.dialogNewFolderGroup = true;
  5615. this.folderGroupData = {
  5616. folderGroupID: "",
  5617. folderID: "",
  5618. superID: "",
  5619. levelID: "",
  5620. folderGroupName: "",
  5621. childCount: 0,
  5622. createUserID: "",
  5623. createTime: "",
  5624. modifyUserID: "",
  5625. modifyTime: ""
  5626. };
  5627. },
  5628. /**
  5629. * 点击确定 保存文件夹组
  5630. */
  5631. createFolderGroupSure: function() {
  5632. var thisApp=this;
  5633. if (
  5634. this.folderGroupData.folderGroupName == null ||
  5635. this.folderGroupData.folderGroupName == ""
  5636. ) {
  5637. this.$notify({
  5638. title: "温馨提示",
  5639. message: "请输入文件夹名称!",
  5640. type: "error",
  5641. offset: 100,
  5642. duration: 5000
  5643. });
  5644. return;
  5645. }
  5646. this.folderGroupData.folderGroupID = this.dbClickSelectedFolderGroupData.folderGroupID;
  5647. this.folderGroupData.superID = this.dbClickSelectedFolderGroupData.folderGroupID;
  5648. this.folderGroupData.levelID = this.dbClickSelectedFolderGroupData.levelID;
  5649. this.folderGroupData.folderID = this.nowFolder.folderID;
  5650. this.folderGroupData.createUserID = sessionStorage.userId;
  5651. this.$axios({
  5652. method: "post",
  5653. url: encodeURI(process.env.API_HOST + "folders/foldergroup"),
  5654. data: this.folderGroupData
  5655. })
  5656. .then(response => {
  5657. this.dialogNewFolderGroup = false;
  5658. if (response.data.state == 1) {
  5659. thisApp.refreshPages();
  5660. this.$notify({
  5661. title: "恭喜您",
  5662. message: "文件夹创建成功!",
  5663. type: "success",
  5664. offset: 100,
  5665. duration: 2500
  5666. });
  5667. } else {
  5668. this.$notify({
  5669. title: "温馨提示",
  5670. message: response.data.message,
  5671. type: "error",
  5672. offset: 100,
  5673. duration: 5000
  5674. });
  5675. }
  5676. })
  5677. .catch(error => {
  5678. console.log(error);
  5679. this.$notify({
  5680. title: "温馨提示",
  5681. message: "文件夹创建失败!",
  5682. type: "error",
  5683. offset: 100,
  5684. duration: 5000
  5685. });
  5686. });
  5687. },
  5688. /**
  5689. * 双击文件夹组名称 进入文件夹
  5690. */
  5691. intoFoldergroup: function(foldergroup) {
  5692. if (foldergroup == null || JSON.stringify(foldergroup) == "{}") {
  5693. this.$notify({
  5694. title: "温馨提示",
  5695. message: "请选中文件或新建文件夹",
  5696. type: "info",
  5697. offset: 100,
  5698. duration: 2500
  5699. });
  5700. return;
  5701. }
  5702. this.dbClickSelectedFolderGroupData = foldergroup;
  5703. this.isShowWorkt = false;
  5704. this.isShowBread = true;
  5705. var param = {
  5706. folderId: foldergroup.folderID,
  5707. foldergroupId: foldergroup.folderGroupID,
  5708. levelID: foldergroup.levelID,
  5709. userId: sessionStorage.userId
  5710. };
  5711. this.$axios({
  5712. method: "get",
  5713. url: encodeURI(
  5714. process.env.API_HOST + "folders/foldergroup/intofoldergroup"
  5715. ),
  5716. params: param
  5717. }).then(response => {
  5718. if (response.data.state == 1) {
  5719. //如果是我的文件下的文件和文件组 :0;否则是工作文件下的文件和文件组 :1
  5720. if (this.currentPageType == 0) {
  5721. // 加载我的文件
  5722. this.myFilesList = response.data.data.listMyFiles;
  5723. //zxm+ 加载我的文件夹组
  5724. this.myListFolderGroups = response.data.data.listFolderGroups;
  5725. //zxm+ 加载文件分组面包屑
  5726. this.folderGroupBreads = response.data.data.listBreadFolderGroups;
  5727. } else {
  5728. // 加载我的文件
  5729. this.myFilesList = response.data.data.listOtherFiles;
  5730. //zxm+ 加载我的文件夹组
  5731. this.myListFolderGroups = response.data.data.listOtherFolderGroups;
  5732. //zxm+ 加载文件分组面包屑
  5733. this.folderGroupBreads = response.data.data.listBreadFolderGroups;
  5734. }
  5735. clearInterval(this.timer);
  5736. this.timer = setInterval(() => {
  5737. this.intoFoldergroup(foldergroup);
  5738. }, 3 * 1000);
  5739. }
  5740. });
  5741. },
  5742. /**
  5743. * 点击文件分组面包屑
  5744. * obj 参数对象
  5745. * isBreadFirstNode 是否是面包屑的首节点
  5746. */
  5747. breadNodeClickEvent: function(obj, isBreadFirstNode) {
  5748. var thisApp = this;
  5749. clearInterval(thisApp.timer);
  5750. thisApp.folderGroupBreads = [];
  5751. if (isBreadFirstNode) {
  5752. thisApp.isShowWorkt = true;
  5753. thisApp.isShowBread = false;
  5754. thisApp.dbClickSelectedFolderGroupData = {};
  5755. this.listFiles();
  5756. thisApp.timer = setInterval(() => {
  5757. this.listFiles();
  5758. }, 3 * 1000);
  5759. } else {
  5760. thisApp.intoFoldergroup(obj);
  5761. thisApp.timer = setInterval(() => {
  5762. thisApp.intoFoldergroup(obj);
  5763. }, 3 * 1000);
  5764. }
  5765. },
  5766. /**
  5767. * 文件分组-右键菜单-重命名
  5768. */
  5769. renameFoldergroup: function(btnRightFoldergoup) {
  5770. var thisApp = this;
  5771. if (
  5772. thisApp.btnRightFoldergoup == null ||
  5773. JSON.stringify(thisApp.btnRightFoldergoup) == "{}"
  5774. ) {
  5775. thisApp.$notify({
  5776. title: "温馨提示",
  5777. message: "请选中文件夹或新建文件夹",
  5778. type: "info",
  5779. offset: 100,
  5780. duration: 2500
  5781. });
  5782. return;
  5783. }
  5784. this.$prompt(
  5785. "当前文件夹名称: " + btnRightFoldergoup.folderGroupName,
  5786. "重命名",
  5787. {
  5788. confirmButtonText: "确定",
  5789. cancelButtonText: "取消",
  5790. inputPattern: /\S/,
  5791. closeOnClickModal: false,
  5792. inputErrorMessage: "名称不能为空"
  5793. }
  5794. )
  5795. .then(({ value }) => {
  5796. btnRightFoldergoup.folderGroupName = value;
  5797. btnRightFoldergoup.modifyUserID = sessionStorage.userId;
  5798. this.$axios({
  5799. method: "put",
  5800. url: encodeURI(
  5801. process.env.API_HOST + "folders/update/foldergroupname"
  5802. ),
  5803. data: btnRightFoldergoup
  5804. })
  5805. .then(function(response) {
  5806. if (response.data.state == 1) {
  5807. thisApp.$notify({
  5808. title: "恭喜您",
  5809. message: "重命名成功",
  5810. type: "success",
  5811. offset: 100,
  5812. duration: 2500
  5813. });
  5814. }
  5815. })
  5816. .catch(function(error) {
  5817. console.log(error);
  5818. });
  5819. })
  5820. .catch(() => {
  5821. thisApp.$notify.info({
  5822. title: "温馨提示",
  5823. message: "操作已取消",
  5824. offset: 100,
  5825. duration: 2500
  5826. });
  5827. });
  5828. },
  5829. /**
  5830. * 文件分组-右键菜单-转移至/复制至其他工作
  5831. */
  5832. copyAndMoveFoldergroup: function(btnRightFoldergoup, strCopyOrMove) {
  5833. var thisApp = this;
  5834. if (
  5835. thisApp.btnRightFoldergoup == null ||
  5836. JSON.stringify(thisApp.btnRightFoldergoup) == "{}"
  5837. ) {
  5838. thisApp.$notify({
  5839. title: "温馨提示",
  5840. message: "请选中文件夹或新建文件夹",
  5841. type: "info",
  5842. offset: 100,
  5843. duration: 2500
  5844. });
  5845. return;
  5846. }
  5847. if (strCopyOrMove == "move") {
  5848. thisApp.dialogTtile = "移动到其它文件夹";
  5849. }
  5850. if (strCopyOrMove == "copy") {
  5851. thisApp.dialogTtile = "复制到其它文件夹";
  5852. }
  5853. thisApp.strFoldergroupCopyOrMove = strCopyOrMove;
  5854. thisApp.strFileOrFoldergroup = "foldergroup";
  5855. thisApp.btnRightFoldergoup = btnRightFoldergoup;
  5856. thisApp.dialogCopyAndMove = true;
  5857. },
  5858. /**
  5859. * 文件分组- 转移/复制至其他工作
  5860. */
  5861. copyOrMoveFoldergroupFun: function() {
  5862. var thisApp = this;
  5863. var url = "";
  5864. if (thisApp.strFoldergroupCopyOrMove == "move") {
  5865. url = encodeURI(
  5866. process.env.API_HOST +
  5867. "folders/move/" +
  5868. thisApp.dialogSelectedFolder +
  5869. "/" +
  5870. thisApp.btnRightFoldergoup.folderGroupID +
  5871. "/" +
  5872. sessionStorage.userId
  5873. );
  5874. }
  5875. if (thisApp.strFoldergroupCopyOrMove == "copy") {
  5876. url = encodeURI(
  5877. process.env.API_HOST +
  5878. "folders/copy/" +
  5879. thisApp.dialogSelectedFolder +
  5880. "/" +
  5881. thisApp.btnRightFoldergoup.folderGroupID +
  5882. "/" +
  5883. sessionStorage.userId
  5884. );
  5885. }
  5886. var param = {
  5887. folderId: thisApp.dialogSelectedFolder,
  5888. foldergroupId: this.btnRightFoldergoup.folderGroupID,
  5889. userId: sessionStorage.userId
  5890. };
  5891. thisApp
  5892. .$axios({
  5893. method: "get",
  5894. url: url,
  5895. data: param
  5896. })
  5897. .then(response => {
  5898. if (response.data.state == 1) {
  5899. thisApp.$notify({
  5900. title: "恭喜您",
  5901. message: "操作成功",
  5902. type: "success",
  5903. offset: 100,
  5904. duration: 2500
  5905. });
  5906. thisApp.dialogCopyAndMove = false;
  5907. thisApp.refreshPages();
  5908. } else {
  5909. thisApp.$notify({
  5910. title: "温馨提示",
  5911. message: response.data.message,
  5912. type: "error",
  5913. offset: 30,
  5914. duration: 5000
  5915. });
  5916. }
  5917. })
  5918. .catch(error => {
  5919. console.log(error);
  5920. });
  5921. },
  5922. /**
  5923. * 文件分组- 移到回收站
  5924. */
  5925. removeRecycle: function(btnRightFoldergoup) {
  5926. var thisApp = this;
  5927. if (
  5928. thisApp.btnRightFoldergoup == null ||
  5929. JSON.stringify(thisApp.btnRightFoldergoup) == "{}"
  5930. ) {
  5931. thisApp.$notify({
  5932. title: "温馨提示",
  5933. message: "请选中文件夹或新建文件夹",
  5934. type: "info",
  5935. offset: 100,
  5936. duration: 2500
  5937. });
  5938. return;
  5939. }
  5940. thisApp
  5941. .$axios({
  5942. method: "get",
  5943. url: encodeURI(
  5944. process.env.API_HOST +
  5945. "folders/foldergroup/del/update/" +
  5946. btnRightFoldergoup.folderGroupID +
  5947. "/" +
  5948. sessionStorage.userId
  5949. ),
  5950. data: {
  5951. foldergroupId: btnRightFoldergoup.folderGroupID,
  5952. userId: sessionStorage.userId
  5953. }
  5954. })
  5955. .then(response => {
  5956. if (response.data.state == 1) {
  5957. if (
  5958. thisApp.dbClickSelectedFolderGroupData == null ||
  5959. JSON.stringify(thisApp.dbClickSelectedFolderGroupData) == "{}"
  5960. ) {
  5961. thisApp.folderGroupBreads = [];
  5962. thisApp.refreshPages();
  5963. } else {
  5964. thisApp.intoFoldergroup(thisApp.dbClickSelectedFolderGroupData);
  5965. }
  5966. thisApp.$notify({
  5967. title: "恭喜您",
  5968. message: "移至回收站成功!",
  5969. type: "success",
  5970. offset: 100,
  5971. duration: 2500
  5972. });
  5973. } else {
  5974. thisApp.$notify({
  5975. title: "温馨提示",
  5976. message: response.data.message,
  5977. type: "error",
  5978. offset: 100,
  5979. duration: 5000
  5980. });
  5981. }
  5982. })
  5983. .catch(error => {
  5984. console.log(error);
  5985. thisApp.$notify({
  5986. title: "温馨提示",
  5987. message: "移至回收站成功失败!",
  5988. type: "error",
  5989. offset: 100,
  5990. duration: 5000
  5991. });
  5992. });
  5993. },
  5994. /**
  5995. * 托拽移动
  5996. */
  5997. draggableMove: function(evt) {
  5998. var thisApp = this;
  5999. var sourceData = evt.draggedContext.element;
  6000. var targetData = evt.relatedContext.element;
  6001. if (!targetData && (targetData.folderGroupID == "myFile" || targetData.folderGroupID == "myComFile")){
  6002. targetData.folderID = this.nowFolder.folderID;
  6003. }
  6004. var draggableData = {};
  6005. if (sourceData.archID != null) {
  6006. //把文件拖拽到文件分组
  6007. draggableData = {
  6008. sourceArchData: sourceData,
  6009. targetFolderGroupData: targetData,
  6010. userID: sessionStorage.userId
  6011. };
  6012. }
  6013. if (sourceData.folderGroupID != null) {
  6014. //把文件分组拖拽到文件分组
  6015. draggableData = {
  6016. sourceFolderGroupData: sourceData,
  6017. targetFolderGroupData: targetData,
  6018. userID: sessionStorage.userId
  6019. };
  6020. }
  6021. thisApp.draggableData = draggableData;
  6022. },
  6023. /**
  6024. * 拖拽完成发送请求
  6025. */
  6026. draggableEnd: function(evt) {
  6027. var thisApp = this;
  6028. if (thisApp.currentPageType == 1) {
  6029. thisApp.$notify({
  6030. title: "温馨提示",
  6031. message: "工作文件下不能进行拖拽!",
  6032. type: "info",
  6033. offset: 100,
  6034. duration: 2500
  6035. });
  6036. return;
  6037. }
  6038. thisApp
  6039. .$axios({
  6040. method: "post",
  6041. url: encodeURI(
  6042. process.env.API_HOST + "folders/foldergroup/draggable"
  6043. ),
  6044. data: thisApp.draggableData
  6045. })
  6046. .then(response => {
  6047. if (response.data.state == 1) {
  6048. thisApp.refreshPages();
  6049. thisApp.$notify({
  6050. title: "恭喜您",
  6051. message: "操作成功!",
  6052. type: "success",
  6053. offset: 100,
  6054. duration: 2500
  6055. });
  6056. } else {
  6057. thisApp.$notify({
  6058. title: "温馨提示",
  6059. message: response.data.message,
  6060. type: "error",
  6061. offset: 100,
  6062. duration: 5000
  6063. });
  6064. }
  6065. thisApp.refreshPages();
  6066. })
  6067. .catch(error => {
  6068. console.log(error);
  6069. thisApp.$notify({
  6070. title: "温馨提示",
  6071. message: "操作失败!",
  6072. type: "error",
  6073. offset: 100,
  6074. duration: 5000
  6075. });
  6076. });
  6077. }
  6078. /****协作空间 拖拽功能方法 end*/
  6079. },
  6080. watch: {
  6081. /**
  6082. * 搜索我的文件
  6083. */
  6084. searchMyFile(value) {
  6085. for (var i = 0; i < this.myFilesList.length; i++) {
  6086. this.myFilesList[i].isShowFile = false;
  6087. if (this.myFilesList[i].archName.toLowerCase().indexOf(value) != -1) {
  6088. this.myFilesList[i].isShowFile = true;
  6089. }
  6090. }
  6091. },
  6092. /**
  6093. * 搜索协作文件
  6094. */
  6095. searchMyCollaborationFile(value) {
  6096. for (var i = 0; i < this.myCollaborationFilesList.length; i++) {
  6097. this.myCollaborationFilesList[i].isShowFile = false;
  6098. if (
  6099. this.myCollaborationFilesList[i].archName
  6100. .toLowerCase()
  6101. .indexOf(value) != -1
  6102. ) {
  6103. this.myCollaborationFilesList[i].isShowFile = true;
  6104. }
  6105. }
  6106. },
  6107. rightMenuvisible(value) {
  6108. if (value) {
  6109. document.body.addEventListener("click", this.closeShowMenu);
  6110. } else {
  6111. document.body.removeEventListener("click", this.closeShowMenu);
  6112. }
  6113. },
  6114. outWorkSpace(data) {
  6115. this.hideWorklinkPage();
  6116. }
  6117. },
  6118. destroyed: function() {
  6119. window.removeEventListener("scroll", this.onscroll);
  6120. window.removeEventListener("resize", this.listenBottomHeight);
  6121. clearInterval(this.timer);
  6122. },
  6123. components: {
  6124. Forgeview: forgeview,
  6125. // BMapComponent: BMapComponent,
  6126. Officeview: officeview,
  6127. Imageview: imageview,
  6128. DistWork: DistWork,
  6129. ProjSetting: ProjSetting,
  6130. FileShare: FileShare,
  6131. Gismap: gismap,
  6132. WorkLine: WorkLine,
  6133. draggable: draggable
  6134. }
  6135. };
  6136. </script>
  6137. <style>
  6138. .el-message-box--center .el-message-box__status.el-icon-warning {
  6139. position: absolute;
  6140. left: 0;
  6141. }
  6142. .yywenjiantitle_text1 {
  6143. position: relative;
  6144. top: 2px;
  6145. }
  6146. .youbian {
  6147. color: #a7a8b7;
  6148. position: relative;
  6149. top: 2px;
  6150. }
  6151. </style>