SharedFile.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. <template>
  2. <div class="sharedsile-all">
  3. <div style="color: red;margin-bottom: 5px;">文件类型与团组名称选择哪个就是上传到对应的类型和团组!!!</div>
  4. <div style="display: flex;justify-content: space-between;align-items: baseline;">
  5. <div class="sharedsile-Groups">
  6. <div class="sharedsile-Groups-li">
  7. <label>文件类型:</label>
  8. <el-select size="small" @change="QuerySharedFile" v-model="filetype" clearable filterable placeholder="团组选择"
  9. style="width: 150px;">
  10. <el-option v-for="item in filetypelist" :key="item.id" :label="item.name" :value="item.id">
  11. </el-option>
  12. </el-select>
  13. </div>
  14. <div v-if="filetype == 1412" class="sharedsile-Groups-li">
  15. <label>团组名称:</label>
  16. <el-select size="small" @change="QuerySharedFilegroup" v-model="diIdselect" clearable filterable placeholder="团组选择"
  17. style="width: 300px;">
  18. <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
  19. :value="item.id">
  20. </el-option>
  21. </el-select>
  22. </div>
  23. </div>
  24. <div>
  25. <el-upload class="upload-demo" ref="upload" action="" :multiple="true" :on-change="handleChange"
  26. :on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false">
  27. <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
  28. <el-button style="margin-left: 10px;" size="small" type="success"
  29. @click="submitUpload">上传到服务器</el-button>
  30. <div slot="tip" class="el-upload__tip">请不要上传过大的文件!</div>
  31. </el-upload>
  32. </div>
  33. </div>
  34. <div class="share-table">
  35. <div style="margin-bottom: 8px;">
  36. <el-date-picker
  37. size="small"
  38. v-model="shdatetime"
  39. type="daterange"
  40. range-separator="至"
  41. start-placeholder="开始日期"
  42. end-placeholder="结束日期">
  43. </el-date-picker>
  44. <el-input size="small" v-model="fileName" placeholder="请输入文件名称搜索" style="width: 300px; margin-right: 10px;"
  45. clearable @clear="handleSearch"></el-input>
  46. <el-button size="small" type="primary" @click="handleSearch">搜索</el-button>
  47. </div>
  48. <el-table :data="tabledata" border style="width: 100%">
  49. <el-table-column prop="fileName" label="文件名称">
  50. </el-table-column>
  51. <el-table-column prop="createTime" label="上传时间" width="180">
  52. </el-table-column>
  53. <el-table-column label="操作" width="200">
  54. <template slot-scope="scope">
  55. <el-button size="mini" @click="Downloadshare(scope.row)" type="primary">下载</el-button>
  56. <el-button size="mini" @click="handleDelete(scope.row)" type="danger">删除</el-button>
  57. </template>
  58. </el-table-column>
  59. </el-table>
  60. <el-pagination style="margin-top: 20px; text-align: center;" background
  61. layout="prev, pager, next, sizes, total" :current-page="currentPage" :page-size="pageSize"
  62. :page-sizes="[1, 5, 10, 15]" :total="total" @current-change="handlePageChange"
  63. @size-change="handleSizeChange">
  64. </el-pagination>
  65. </div>
  66. <div v-if="filetype == 1412" class="sharedsile-ps">PS:请先选择团组再下载!</div>
  67. <div v-if="filetype == 1412" class="sharedsile-table">
  68. <div class="sharedsile-table-tr">
  69. <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-name">文件名称
  70. </div>
  71. <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-type">版本格式
  72. </div>
  73. <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-Language">语言
  74. </div>
  75. <div style="font-size: 14px;color: #909399;font-weight: 600;" class="sharedsile-table-tb tb-download">操作
  76. </div>
  77. </div>
  78. <div class="sharedsile-table-tr">
  79. <div class="sharedsile-table-tb tb-name">OP行程单</div>
  80. <div class="sharedsile-table-tb tb-type">WORD</div>
  81. <div class="sharedsile-table-tb tb-Language">中文</div>
  82. <div class="sharedsile-table-tb tb-download">
  83. <el-button size="small" @click="dcwzxc(0)" type="primary">下载</el-button>
  84. </div>
  85. </div>
  86. <div class="sharedsile-table-tr">
  87. <div class="sharedsile-table-tb tb-name">OP行程单</div>
  88. <div class="sharedsile-table-tb tb-type">PDF</div>
  89. <div class="sharedsile-table-tb tb-Language">中文</div>
  90. <div class="sharedsile-table-tb tb-download">
  91. <el-button size="small" @click="dcwzxc(1)" type="primary">下载</el-button>
  92. </div>
  93. </div>
  94. <div class="sharedsile-table-tr">
  95. <div class="sharedsile-table-tb tb-name">团组名单</div>
  96. <div class="sharedsile-table-tb tb-type">WORD</div>
  97. <div class="sharedsile-table-tb tb-Language">中文</div>
  98. <div class="sharedsile-table-tb tb-download">
  99. <el-button size="small" @click="Exportlist(0)" type="primary">下载</el-button>
  100. </div>
  101. </div>
  102. <div class="sharedsile-table-tr">
  103. <div class="sharedsile-table-tb tb-name">团组名单</div>
  104. <div class="sharedsile-table-tb tb-type">WORD</div>
  105. <div class="sharedsile-table-tb tb-Language">英文</div>
  106. <div class="sharedsile-table-tb tb-download">
  107. <el-button size="small" @click="Exportlist(1)" type="primary">下载</el-button>
  108. </div>
  109. </div>
  110. <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
  111. <div class="sharedsile-table-tb tb-name">倒推表</div>
  112. <div class="sharedsile-table-tb tb-type">WORD</div>
  113. <div class="sharedsile-table-tb tb-Language">中文</div>
  114. <div class="sharedsile-table-tb tb-download">
  115. <el-button size="small" @click="PostInvertedListFileDownload" type="primary">下载</el-button>
  116. </div>
  117. </div>
  118. <div v-if="!isMarketingDepartment">
  119. <div v-for="(item,index) in filesidarrs" :key="index" class="sharedsile-table-tr">
  120. <div class="sharedsile-table-tb tb-name">{{ item.name }}</div>
  121. <div class="sharedsile-table-tb tb-type">WORD</div>
  122. <div class="sharedsile-table-tb tb-Language">中文</div>
  123. <div class="sharedsile-table-tb tb-download">
  124. <el-button size="small" @click="eptschedule(item.filetype, item.id)" type="primary">下载</el-button>
  125. </div>
  126. </div>
  127. </div>
  128. <!-- <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
  129. <div class="sharedsile-table-tb tb-name">出国出境经费审核计算明细</div>
  130. <div class="sharedsile-table-tb tb-type">WORD</div>
  131. <div class="sharedsile-table-tb tb-Language">中文</div>
  132. <div class="sharedsile-table-tb tb-download">
  133. <el-button size="small" @click="eptschedule(1, filesidarrs[0])" type="primary">下载</el-button>
  134. </div>
  135. </div>
  136. <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
  137. <div class="sharedsile-table-tb tb-name">因公出国(境)经费测算明细表</div>
  138. <div class="sharedsile-table-tb tb-type">WORD</div>
  139. <div class="sharedsile-table-tb tb-Language">中文</div>
  140. <div class="sharedsile-table-tb tb-download">
  141. <el-button size="small" @click="eptschedule(1, filesidarrs[1])" type="primary">下载</el-button>
  142. </div>
  143. </div>
  144. <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
  145. <div class="sharedsile-table-tb tb-name">四川省商务厅出国经费财政先行审核表</div>
  146. <div class="sharedsile-table-tb tb-type">EXCEL</div>
  147. <div class="sharedsile-table-tb tb-Language">中文</div>
  148. <div class="sharedsile-table-tb tb-download">
  149. <el-button size="small" @click="eptschedule(1, filesidarrs[2])" type="primary">下载</el-button>
  150. </div>
  151. </div>
  152. <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
  153. <div class="sharedsile-table-tb tb-name">成都市因公临时出国任务和预算审批意见表(外专培训团专用)</div>
  154. <div class="sharedsile-table-tb tb-type">WORD</div>
  155. <div class="sharedsile-table-tb tb-Language">中文</div>
  156. <div class="sharedsile-table-tb tb-download">
  157. <el-button size="small" @click="eptschedule(1, filesidarrs[3])" type="primary">下载</el-button>
  158. </div>
  159. </div>
  160. <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
  161. <div class="sharedsile-table-tb tb-name">派员单位出(境)任务和预算审批意见表</div>
  162. <div class="sharedsile-table-tb tb-type">WORD</div>
  163. <div class="sharedsile-table-tb tb-Language">中文</div>
  164. <div class="sharedsile-table-tb tb-download">
  165. <el-button size="small" @click="eptschedule(2, filesidarrs[4])" type="primary">下载</el-button>
  166. </div>
  167. </div>
  168. <div v-if="!isMarketingDepartment" class="sharedsile-table-tr">
  169. <div class="sharedsile-table-tb tb-name">省级单位出(境)经费报销单</div>
  170. <div class="sharedsile-table-tb tb-type">WORD</div>
  171. <div class="sharedsile-table-tb tb-Language">中文</div>
  172. <div class="sharedsile-table-tb tb-download">
  173. <el-button size="small" @click="eptschedule(2, filesidarrs[5])" type="primary">下载</el-button>
  174. </div>
  175. </div> -->
  176. </div>
  177. </div>
  178. </template>
  179. <script>
  180. export default {
  181. data() {
  182. return {
  183. diIdselect: '',
  184. delegationInfoList: [],
  185. filetype: '',
  186. filetypelist: [],
  187. pageloadData: {
  188. "portType": 1,
  189. "pageIndex": 1,
  190. "pageSize": 10,
  191. "contact": "",
  192. "location": "",
  193. "client": "",
  194. "userid": "",
  195. "lvlid": 0,
  196. "business": "",
  197. "Range": 0,
  198. "Category": 0,
  199. "operationUserId": 0
  200. },
  201. token: '',
  202. pageId: '',
  203. userId: '',
  204. fileList: [],
  205. tabledata: [],
  206. currentPage: 1, // 当前页码
  207. pageSize: 5, // 每页显示条数
  208. total: 0, // 总条数
  209. isMarketingDepartment:false,
  210. fileName:'',
  211. shdatetime:[],
  212. filesidarrs:[],
  213. grouptodiid:0
  214. }
  215. },
  216. methods: {
  217. //处理时间
  218. disposeTime(val){
  219. var date = new Date(val);
  220. var y = date.getFullYear();
  221. var m = date.getMonth() + 1;
  222. m = m < 10 ? ('0' + m) : m;
  223. var d = date.getDate();
  224. d = d < 10 ? ('0' + d) : d;
  225. let time = y + '-' + m + '-' + d;
  226. return time
  227. },
  228. //基础数据
  229. SharedFileInit() {
  230. var url = "/api/Groups/SharedFileInit?userid="+this.userId+"&portType=1"
  231. var that = this
  232. this.$axios({
  233. method: 'get',
  234. url: url,
  235. }).then(function (res) {
  236. if (res.data.code == 200) {
  237. that.delegationInfoList = res.data.data.dropDownGroupList;
  238. that.filetypelist = res.data.data.dropDownType;
  239. that.filetype = that.filetypelist[0].id;
  240. that.isMarketingDepartment=res.data.data.isMarketingDepartment;
  241. if (that.grouptodiid!==that.grouptodiid) {
  242. that.diIdselect = that.delegationInfoList[0].id;
  243. that.EnterExitCostFileOwner(that.delegationInfoList[0].provinceId);
  244. }else{
  245. that.diIdselect = that.grouptodiid;
  246. var objs = {}
  247. objs = that.delegationInfoList.find(function (i) {
  248. return i.id === that.grouptodiid
  249. });
  250. that.EnterExitCostFileOwner(objs.provinceId);
  251. }
  252. that.QuerySharedFile();
  253. } else {
  254. that.$message.error(res.data.msg);
  255. }
  256. })
  257. },
  258. handleSearch(){
  259. console.log(this.shdatetime);
  260. this.QuerySharedFile();
  261. },
  262. //获取文件id
  263. EnterExitCostFileOwner(val) {
  264. var url = "/api/Groups/EnterExitCostFileOwner/"+val
  265. var that = this
  266. this.$axios({
  267. method: 'get',
  268. url: url,
  269. }).then(function (res) {
  270. var filesidarr=[];
  271. var filesidarrs=[];
  272. if (res.data.code == 200) {
  273. var files=res.data.data;
  274. for(let i=0;i<files.wordTypeData.length;i++){
  275. files.wordTypeData[i].filetype=1
  276. filesidarr.push(files.wordTypeData[i]);
  277. }
  278. for(let j=0;j<files.excelTypeData.length;j++){
  279. files.excelTypeData[j].filetype=2
  280. filesidarr.push(files.excelTypeData[j])
  281. }
  282. that.filesidarrs=filesidarr;
  283. }else {
  284. that.$message.error(res.data.msg);
  285. }
  286. })
  287. },
  288. //页面加载
  289. padeload() {
  290. var url = "/api/Business/PostGroupNameScreen"
  291. var that = this
  292. this.$axios({
  293. method: 'post',
  294. url: url,
  295. headers: {
  296. Authorization: 'Bearer ' + this.token
  297. },
  298. data: {
  299. portType: 1,
  300. pageIndex: 1,
  301. pageSize: 9000,
  302. groupName: '',
  303. userId: that.userId == 21 ? -1 : that.userId,
  304. }
  305. }).then(function (res) {
  306. console.log(res)
  307. if (res.data.code == 200) {
  308. that.delegationInfoList = res.data.data;
  309. that.diIdselect = that.delegationInfoList[0].id;
  310. } else {
  311. that.$message.error(res.data.msg);
  312. }
  313. })
  314. },
  315. QuerySharedFilegroup(val){
  316. var obj = {}
  317. obj = this.delegationInfoList.find(function (i) {
  318. return i.id === val
  319. });
  320. this.EnterExitCostFileOwner(obj.provinceId);
  321. this.QuerySharedFile();
  322. },
  323. //文件列表
  324. QuerySharedFile() {
  325. if (this.shdatetime==null) {
  326. this.shdatetime=[]
  327. }
  328. var url = "/api/Groups/QuerySharedFile"
  329. var that = this
  330. this.$axios({
  331. method: 'post',
  332. url: url,
  333. headers: {
  334. Authorization: 'Bearer ' + this.token
  335. },
  336. data: {
  337. pageIndex: that.currentPage,
  338. pageSize: that.pageSize,
  339. fileType: that.filetype,
  340. diid: that.filetype != 1412 ? 0 : that.diIdselect==""?0:that.diIdselect,
  341. fileName:that.fileName,
  342. startTime:that.shdatetime.length!=0?that.disposeTime(that.shdatetime[0]):"",
  343. endTime:that.shdatetime.length!=0?that.disposeTime(that.shdatetime[1]):"",
  344. }
  345. }).then(function (res) {
  346. if (res.data.code == 200) {
  347. that.tabledata = res.data.data.fileList;
  348. that.total = res.data.data.totalCount;
  349. } else {
  350. that.$message.error(res.data.msg);
  351. }
  352. })
  353. },
  354. // 分页页码改变事件
  355. handlePageChange(val) {
  356. this.currentPage = val; // 更新当前页码
  357. this.QuerySharedFile(); // 重新查询数据
  358. },
  359. // 每页显示条数改变事件
  360. handleSizeChange(val) {
  361. this.pageSize = val; // 更新每页显示条数
  362. this.currentPage = 1; // 重置当前页码
  363. this.QuerySharedFile(); // 重新查询数据
  364. },
  365. //ctable获取团组
  366. PostGroupListByCTableAndUserId() {
  367. var url = "/api/Business/PostGroupListByCTableAndUserId"
  368. var that = this
  369. this.$axios({
  370. method: 'post',
  371. url: url,
  372. headers: {
  373. Authorization: 'Bearer ' + this.token
  374. },
  375. data: {
  376. portType: 1,
  377. pageIndex: 1,
  378. pageSize: 9000,
  379. cTable: 1081,
  380. userId: that.userId,
  381. teamName: "",
  382. }
  383. }).then(function (res) {
  384. if (res.data.code == 200) {
  385. that.delegationInfoList = res.data.data;
  386. that.diIdselect = that.delegationInfoList[0].id;
  387. } else {
  388. that.$message.error(res.data.msg);
  389. }
  390. })
  391. },
  392. //导出完整行程
  393. dcwzxc(val) {
  394. var url = "/api/Groups/ExportTravel"
  395. var that = this
  396. this.$axios({
  397. method: 'post',
  398. url: url,
  399. headers: {
  400. Authorization: 'Bearer ' + that.token
  401. },
  402. data: {
  403. diid: that.diIdselect,
  404. isPDF: val
  405. }
  406. }).then(function (res) {
  407. if (res.data.code == 200) {
  408. that.$message({
  409. message: res.data.msg,
  410. type: 'success',
  411. offset: 50
  412. });
  413. window.open(res.data.data.replace('C:/Server/File/OA2023/', 'http://132.232.92.186:24/'));
  414. } else {
  415. that.$message.error(res.data.msg);
  416. }
  417. }).catch(function (error) {
  418. that.$message.error(error);
  419. });
  420. },
  421. //团组名单
  422. Exportlist(val) {
  423. var url = "/api/Groups/PostTourClientListDownloadFile"
  424. var that = this
  425. this.$axios({
  426. method: 'post',
  427. url: url,
  428. headers: {
  429. Authorization: 'Bearer ' + this.token
  430. },
  431. data: {
  432. portType: 1,
  433. userId: that.userId,
  434. pageId: that.pageId,
  435. diId: that.diIdselect,
  436. language: val
  437. }
  438. }).then(function (res) {
  439. console.log(res)
  440. if (res.data.code == 200) {
  441. window.location.href = res.data.data
  442. that.$message({
  443. type: 'success',
  444. message: res.data.msg
  445. });
  446. } else {
  447. that.$message.error(res.data.msg);
  448. }
  449. }).catch(function (error) {
  450. that.$message.error("下载失败!");
  451. });
  452. },
  453. //导出倒推表
  454. PostInvertedListFileDownload() {
  455. var url = "/api/Groups/PostInvertedListFileDownload"
  456. var that = this
  457. this.$axios({
  458. method: 'post',
  459. url: url,
  460. headers: {
  461. Authorization: 'Bearer ' + that.token
  462. },
  463. data: {
  464. portType: 1,
  465. diId: that.diIdselect
  466. }
  467. }).then(function (res) {
  468. if (res.data.code == 200) {
  469. that.$message({
  470. message: res.data.msg,
  471. type: 'success',
  472. offset: 50
  473. });
  474. window.open(res.data.data);
  475. } else {
  476. that.$message.error(res.data.msg);
  477. }
  478. }).catch(function (error) {
  479. that.$message.error(error);
  480. });
  481. },
  482. //三公导出
  483. eptschedule(val1, val2) {
  484. var url = "/api/Groups/PostEnterExitCostDownload"
  485. var that = this
  486. this.$axios({
  487. method: 'post',
  488. url: url,
  489. headers: {
  490. Authorization: 'Bearer ' + this.token
  491. },
  492. data: {
  493. portType: 1,
  494. diId: that.diIdselect,
  495. exportType: val1,
  496. subTypeId: val2
  497. }
  498. }).then(function (res) {
  499. console.log(res)
  500. if (res.data.code == 200) {
  501. that.$message({
  502. type: 'success',
  503. message: res.data.msg
  504. });
  505. window.open(res.data.data.url);
  506. } else {
  507. that.$message.error(res.data.msg);
  508. }
  509. })
  510. },
  511. // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用,function(file, fileList)
  512. handleChange(file, fileList) {
  513. // if (fileList.length > 1 && fileList.status !== "fail") {
  514. // fileList.splice(0, 1);
  515. // } else if (fileList.status === "fail") {
  516. // errorMsg("上传失败,请重新上传!");
  517. // fileList.splice(0, 1);
  518. // }
  519. this.fileList = fileList
  520. },
  521. //上传服务器
  522. submitUpload() {
  523. var verdict = false
  524. //判断是否有文件再上传
  525. console.log(this.fileList);
  526. if (this.fileList.length === 0) {
  527. return this.$message.warning('请选取文件后再上传!');
  528. }
  529. // 下面的代码将创建一个空的FormData对象:
  530. const formData = new FormData()
  531. // 你可以使用FormData.append来添加键/值对到表单里面;
  532. this.fileList.forEach((file) => {
  533. if (file.raw != undefined) {
  534. verdict = true;
  535. formData.append('Files', file.raw);
  536. }
  537. })
  538. formData.append('Diid', this.filetype != 1412 ? 0 : this.diIdselect);
  539. formData.append('Userid', this.userId);
  540. formData.append('FileType', this.filetype);
  541. if (!verdict) {
  542. return
  543. }
  544. var that = this;
  545. var url = "/api/Groups/SharedFileUpload"
  546. this.$axios({
  547. method: 'post',
  548. url: url,
  549. headers: {
  550. Authorization: 'Bearer ' + that.token
  551. },
  552. data: formData
  553. }).then(function (res) {
  554. if (res.data.code == 200) {
  555. that.clearFileList(); // 上传成功后清空文件列表
  556. that.QuerySharedFile();
  557. that.$message.success(res.data.msg);
  558. // window.open(res.data.data.url)
  559. } else {
  560. that.$message.error(res.data.msg);
  561. }
  562. })
  563. },
  564. // 清空文件列表
  565. clearFileList() {
  566. this.$refs.upload.clearFiles(); // 调用 el-upload 的 clearFiles 方法
  567. this.fileList = []; // 清空本地文件列表
  568. },
  569. handleRemove(file, fileList) {
  570. console.log(file, fileList);
  571. },
  572. handlePreview(file) {
  573. console.log(file);
  574. },
  575. Downloadshare(val) {
  576. window.open(val.filePath)
  577. },
  578. handleDelete(val) {
  579. this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  580. confirmButtonText: '确定',
  581. cancelButtonText: '取消',
  582. type: 'warning'
  583. }).then(() => {
  584. var url = "/api/Groups/DeleteSharedFile"
  585. var that = this
  586. this.$axios({
  587. method: 'post',
  588. url: url,
  589. headers: {
  590. Authorization: 'Bearer '
  591. },
  592. data:{
  593. id: val.id,
  594. userId: that.userId,
  595. }
  596. }).then(function (res) {
  597. if(res.data.code==200){
  598. that.$message({
  599. message:res.data.msg ,
  600. type: 'success',
  601. });
  602. that.QuerySharedFile();
  603. }else{
  604. that.$message({
  605. message:res.data.msg ,
  606. type: 'warning',
  607. });
  608. }
  609. })
  610. }).catch(() => {
  611. this.$message({
  612. type: 'info',
  613. message: '已取消删除'
  614. });
  615. });
  616. }
  617. },
  618. created() {
  619. this.grouptodiid = Number(this.$route.query.diId);
  620. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  621. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
  622. this.pageId = Number(localStorage.getItem('indexs').split('-')[1]);//页面id
  623. // this.PostGroupListByCTableAndUserId()
  624. this.SharedFileInit();
  625. }
  626. }
  627. </script>
  628. <style>
  629. .sharedsile-all {
  630. background-color: #fff;
  631. padding: 20px;
  632. box-shadow: 0 0 5px #0005;
  633. border-radius: 10px;
  634. min-height: 810px;
  635. }
  636. .sharedsile-Groups {
  637. display: flex;
  638. flex-wrap: wrap;
  639. }
  640. .sharedsile-btn {
  641. width: 200px;
  642. }
  643. .sharedsile-table-tr {
  644. display: flex;
  645. }
  646. .sharedsile-ps {
  647. margin-top: 20px;
  648. font-size: 14px;
  649. }
  650. .sharedsile-table {
  651. max-height: 700px;
  652. border-bottom: 1px solid #DCDFE6;
  653. overflow: hidden;
  654. overflow: auto;
  655. }
  656. .sharedsile-table-tr {
  657. border-top: 1px solid #DCDFE6;
  658. }
  659. .sharedsile-table-tb {
  660. padding: 10px;
  661. text-align: center;
  662. border-left: 1px solid #DCDFE6;
  663. font-size: 14px;
  664. color: #555;
  665. display: flex;
  666. justify-content: center;
  667. align-items: center;
  668. }
  669. .sharedsile-table-tb:last-child {
  670. border-right: 1px solid #DCDFE6;
  671. }
  672. .tb-name {
  673. width: 40%;
  674. }
  675. .tb-type {
  676. width: 25%;
  677. }
  678. .tb-Language {
  679. width: 25%;
  680. }
  681. .tb-download {
  682. width: 10%;
  683. }
  684. .sharedsile-Groups-li {
  685. display: flex;
  686. align-items: center;
  687. margin-right: 10px;
  688. }
  689. .sharedsile-Groups-li label {
  690. width: 60px;
  691. }
  692. .share-table {
  693. margin-top: 10px;
  694. }
  695. </style>