panel.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <template>
  2. <div class="w-main project-panel">
  3. <v-title>{{$L('项目面板')}}-{{$L('轻量级的团队在线协作')}}</v-title>
  4. <div class="w-nav">
  5. <div class="nav-row">
  6. <div class="w-nav-left">
  7. <div class="page-nav-left">
  8. <span class="bold">{{projectDetail.title}}</span>
  9. <div v-if="loadIng > 0" class="page-nav-loading"><w-loading></w-loading></div>
  10. <div v-else class="page-nav-refresh"><em @click="getDetail(true)">{{$L('刷新')}}</em></div>
  11. </div>
  12. </div>
  13. <div class="w-nav-flex"></div>
  14. <div class="w-nav-right">
  15. <span class="ft hover" @click="openProjectDrawer('lists')"><i class="ft icon">&#xE89E;</i> {{$L('任务列表')}}</span>
  16. <span class="ft hover" @click="openProjectDrawer('files')"><i class="ft icon">&#xE701;</i> {{$L('文件列表')}}</span>
  17. <span class="ft hover" @click="openProjectDrawer('logs')"><i class="ft icon">&#xE753;</i> {{$L('项目动态')}}</span>
  18. <span class="ft hover" @click="openProjectSettingDrawer('archived')"><i class="ft icon">&#xE7A7;</i> {{$L('设置')}}</span>
  19. </div>
  20. </div>
  21. </div>
  22. <w-content>
  23. <draggable
  24. v-if="projectLabel.length > 0"
  25. v-model="projectLabel"
  26. class="label-box"
  27. draggable=".label-draggable"
  28. :animation="150"
  29. :disabled="projectSortDisabled"
  30. @sort="projectSortUpdate(true)">
  31. <div v-for="label in projectLabel" :key="label.id" class="label-item label-draggable">
  32. <div class="label-body">
  33. <div class="title-box">
  34. <div v-if="label.loadIng === true" class="title-loading">
  35. <w-loading></w-loading>
  36. </div>
  37. <h2>{{label.title}}</h2>
  38. <Dropdown trigger="click" @on-click="handleLabel($event, label)" transfer>
  39. <Icon type="ios-more"/>
  40. <DropdownMenu slot="list">
  41. <Dropdown-item name="refresh">{{$L('刷新列表')}}</Dropdown-item>
  42. <Dropdown-item name="rename">{{$L('重命名')}}</Dropdown-item>
  43. <Dropdown-item name="delete">{{$L('删除')}}</Dropdown-item>
  44. </DropdownMenu>
  45. </Dropdown>
  46. </div>
  47. <draggable
  48. v-model="label.taskLists"
  49. class="task-box"
  50. group="task"
  51. draggable=".task-draggable"
  52. :animation="150"
  53. :disabled="projectSortDisabled"
  54. @sort="projectSortUpdate(false)"
  55. @remove="projectSortUpdate(false)">
  56. <div v-for="task in label.taskLists" :key="task.id" class="task-item task-draggable">
  57. <div class="task-shadow" :class="[
  58. 'p'+task.level,
  59. task.complete ? 'complete' : '',
  60. task.overdue ? 'overdue' : '',
  61. task.isNewtask === true ? 'newtask' : ''
  62. ]" @click="openTaskModal(task)">
  63. <div class="task-title">{{task.title}}</div>
  64. <div class="task-more">
  65. <div v-if="task.overdue" class="task-status">{{$L('已超期')}}</div>
  66. <div v-else-if="task.complete" class="task-status">{{$L('已完成')}}</div>
  67. <div v-else class="task-status">{{$L('未完成')}}</div>
  68. <Tooltip class="task-userimg" :content="task.nickname || task.username" transfer><img :src="task.userimg"/></Tooltip>
  69. </div>
  70. </div>
  71. </div>
  72. <div slot="footer">
  73. <project-add-task :placeholder='`${$L("添加任务至")}"${label.title}"`' :projectid="label.projectid" :labelid="label.id" @on-add-success="addTaskSuccess($event, label)"></project-add-task>
  74. </div>
  75. </draggable>
  76. </div>
  77. </div>
  78. <div v-if="loadDetailed" slot="footer" class="label-item label-create" @click="addLabel">
  79. <div class="label-body">
  80. <div class="trigger-box ft hover"><i class="ft icon">&#xE8C8;</i>{{$L('添加一个新列表')}}</div>
  81. </div>
  82. </div>
  83. </draggable>
  84. </w-content>
  85. <WDrawer v-model="projectDrawerShow" maxWidth="1080">
  86. <Tabs v-if="projectDrawerShow" v-model="projectDrawerTab">
  87. <TabPane :label="$L('任务列表')" name="lists">
  88. <project-task-lists :canload="projectDrawerShow && projectDrawerTab == 'lists'" :projectid="projectid" :labelLists="projectSimpleLabel"></project-task-lists>
  89. </TabPane>
  90. <TabPane :label="$L('文件列表')" name="files">
  91. <project-task-files :canload="projectDrawerShow && projectDrawerTab == 'files'" :projectid="projectid"></project-task-files>
  92. </TabPane>
  93. <TabPane :label="$L('项目动态')" name="logs">
  94. <project-task-logs :canload="projectDrawerShow && projectDrawerTab == 'logs'" :projectid="projectid"></project-task-logs>
  95. </TabPane>
  96. </Tabs>
  97. </WDrawer>
  98. <WDrawer v-model="projectSettingDrawerShow" maxWidth="1000">
  99. <Tabs v-if="projectSettingDrawerShow" v-model="projectSettingDrawerTab">
  100. <TabPane :label="$L('已归档任务')" name="archived">
  101. <project-archived :canload="projectSettingDrawerShow && projectSettingDrawerTab == 'archived'" :projectid="projectid"></project-archived>
  102. </TabPane>
  103. <TabPane :label="$L('项目统计')" name="statistics">
  104. <project-statistics :canload="projectSettingDrawerShow && projectSettingDrawerTab == 'statistics'" :projectid="projectid"></project-statistics>
  105. </TabPane>
  106. <TabPane :label="$L('成员管理')" name="member">
  107. <project-users :canload="projectSettingDrawerShow && projectSettingDrawerTab == 'member'" :projectid="projectid"></project-users>
  108. </TabPane>
  109. </Tabs>
  110. </WDrawer>
  111. </div>
  112. </template>
  113. <style lang="scss">
  114. #project-panel-enter-textarea {
  115. background: transparent;
  116. background: none;
  117. outline: none;
  118. border: 0;
  119. resize: none;
  120. padding: 0;
  121. margin: 8px 0;
  122. line-height: 22px;
  123. border-radius: 0;
  124. color: rgba(0, 0, 0, 0.85);
  125. &:focus {
  126. border-color: transparent;
  127. box-shadow: none;
  128. }
  129. }
  130. </style>
  131. <style lang="scss" scoped>
  132. .project-panel {
  133. .label-box {
  134. display: flex;
  135. flex-direction: row;
  136. align-items: flex-start;
  137. justify-content: flex-start;
  138. flex-wrap: nowrap;
  139. overflow-x: auto;
  140. overflow-y: hidden;
  141. -webkit-overflow-scrolling: touch;
  142. width: 100%;
  143. height: 100%;
  144. padding: 15px;
  145. transform: translateZ(0);
  146. .label-item {
  147. flex-grow: 0;
  148. flex-shrink: 0;
  149. flex-basis: auto;
  150. height: 100%;
  151. padding-right: 15px;
  152. &.label-create {
  153. cursor: pointer;
  154. &:hover {
  155. .trigger-box {
  156. transform: translate(0, -50%) scale(1.1);
  157. }
  158. }
  159. }
  160. .label-body {
  161. width: 300px;
  162. height: 100%;
  163. border-radius: 0.15rem;
  164. background-color: #ebecf0;
  165. overflow: hidden;
  166. position: relative;
  167. display: flex;
  168. flex-direction: column;
  169. .title-box {
  170. padding: 0 12px;
  171. font-weight: bold;
  172. color: #666666;
  173. position: relative;
  174. cursor: move;
  175. display: flex;
  176. align-items: center;
  177. width: 100%;
  178. height: 42px;
  179. .title-loading {
  180. width: 16px;
  181. height: 16px;
  182. margin-right: 6px;
  183. }
  184. h2 {
  185. flex: 1;
  186. font-size: 16px;
  187. overflow: hidden;
  188. text-overflow: ellipsis;
  189. white-space: nowrap;
  190. }
  191. i {
  192. font-weight: 500;
  193. font-size: 18px;
  194. height: 100%;
  195. line-height: 42px;
  196. width: 42px;
  197. text-align: right;
  198. cursor: pointer;
  199. }
  200. }
  201. .task-box {
  202. flex: 1;
  203. width: 100%;
  204. overflow: auto;
  205. display: flex;
  206. flex-direction: column;
  207. padding: 0 12px 2px;
  208. transform: translateZ(0);
  209. .task-item {
  210. width: 100%;
  211. .task-shadow {
  212. margin: 5px 0 4px;
  213. padding: 8px;
  214. background-color: #ffffff;
  215. border-left: 2px solid #BF9F03;
  216. border-right: 2px solid #ffffff;
  217. color: #091e42;
  218. border-radius: 3px;
  219. cursor: pointer;
  220. box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
  221. transition: all 0.3s;
  222. transform: scale(1);
  223. &:hover{
  224. box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.38);
  225. }
  226. &.p1 {
  227. border-left-color: #ff0000;
  228. }
  229. &.p2 {
  230. border-left-color: #BB9F35;
  231. }
  232. &.p3 {
  233. border-left-color: #449EDD;
  234. }
  235. &.p4 {
  236. border-left-color: #84A83B;
  237. }
  238. &.complete {
  239. .task-more {
  240. .task-status {
  241. color: #666666;
  242. }
  243. }
  244. }
  245. &.overdue {
  246. .task-title {
  247. font-weight: bold;
  248. }
  249. .task-more {
  250. .task-status {
  251. color: #ff0000;
  252. }
  253. }
  254. }
  255. &.newtask {
  256. transform: scale(1.5);
  257. }
  258. .task-title {
  259. font-size: 12px;
  260. color: #091e42;
  261. word-break: break-all;
  262. }
  263. .task-more {
  264. min-height: 30px;
  265. display: flex;
  266. align-items: flex-end;
  267. .task-status {
  268. color: #19be6b;
  269. font-size: 12px;
  270. flex: 1;
  271. }
  272. .task-userimg {
  273. width: 26px;
  274. height: 26px;
  275. img {
  276. object-fit: cover;
  277. width: 100%;
  278. height: 100%;
  279. border-radius: 50%;
  280. }
  281. }
  282. }
  283. }
  284. }
  285. }
  286. .trigger-box {
  287. text-align: center;
  288. font-size: 16px;
  289. color: #666;
  290. width: 100%;
  291. position: absolute;
  292. top: 50%;
  293. transform: translate(0, -50%) scale(1);
  294. transition: all 0.3s;
  295. }
  296. }
  297. }
  298. }
  299. }
  300. </style>
  301. <script>
  302. import draggable from 'vuedraggable'
  303. import WContent from "../../components/WContent";
  304. import ProjectAddTask from "../../components/project/task/add";
  305. import ProjectTaskLists from "../../components/project/task/lists";
  306. import ProjectTaskFiles from "../../components/project/task/files";
  307. import ProjectTaskLogs from "../../components/project/task/logs";
  308. import ProjectArchived from "../../components/project/archived";
  309. import ProjectUsers from "../../components/project/users";
  310. import ProjectStatistics from "../../components/project/statistics";
  311. import WDrawer from "../../components/iview/WDrawer";
  312. export default {
  313. components: {
  314. WDrawer,
  315. ProjectStatistics,
  316. ProjectUsers,
  317. ProjectArchived,
  318. ProjectTaskLogs,
  319. ProjectTaskFiles, ProjectTaskLists, ProjectAddTask, draggable, WContent},
  320. data () {
  321. return {
  322. loadIng: 0,
  323. loadDetailed: false,
  324. projectid: 0,
  325. projectDetail: {},
  326. projectLabel: [],
  327. projectSimpleLabel: [],
  328. projectSortData: '',
  329. projectSortDisabled: false,
  330. projectDrawerShow: false,
  331. projectDrawerTab: 'lists',
  332. projectSettingDrawerShow: false,
  333. projectSettingDrawerTab: 'archived',
  334. }
  335. },
  336. mounted() {
  337. $A.setOnTaskInfoListener('pages/project-panel',(act, detail) => {
  338. if (detail.projectid != this.projectid) {
  339. return;
  340. }
  341. //
  342. switch (act) {
  343. case 'deleteproject': // 删除项目
  344. case 'deletelabel': // 删除分类
  345. return;
  346. case 'tasklevel': // 调整级别
  347. this.getDetail(true);
  348. return;
  349. }
  350. //
  351. this.projectLabel.forEach((label) => {
  352. label.taskLists.some((task, i) => {
  353. if (task.id == detail.id) {
  354. label.taskLists.splice(i, 1, detail);
  355. return true;
  356. }
  357. });
  358. });
  359. //
  360. switch (act) {
  361. case "delete": // 删除任务
  362. case "archived": // 归档
  363. this.projectLabel.forEach((label) => {
  364. label.taskLists.some((task, i) => {
  365. if (task.id == detail.id) {
  366. label.taskLists.splice(i, 1,);
  367. return true;
  368. }
  369. });
  370. });
  371. this.projectSortData = this.getProjectSort();
  372. break;
  373. case "unarchived": // 取消归档
  374. this.projectLabel.forEach((label) => {
  375. if (label.id == detail.labelid) {
  376. let index = label.taskLists.length;
  377. label.taskLists.some((task, i) => {
  378. if (detail.inorder > task.inorder || (detail.inorder == task.inorder && detail.id > task.id)) {
  379. index = i;
  380. return true;
  381. }
  382. });
  383. label.taskLists.splice(index, 0, detail);
  384. }
  385. });
  386. this.projectSortData = this.getProjectSort();
  387. break;
  388. }
  389. }, true);
  390. },
  391. activated() {
  392. this.projectid = this.$route.params.projectid;
  393. if (typeof this.$route.params.other === "object") {
  394. this.$set(this.projectDetail, 'title', $A.getObject(this.$route.params.other, 'title'))
  395. }
  396. },
  397. deactivated() {
  398. if ($A.getToken() === false) {
  399. this.projectid = 0;
  400. }
  401. this.projectDrawerShow = false;
  402. this.projectSettingDrawerShow = false;
  403. },
  404. watch: {
  405. projectid(val) {
  406. if ($A.runNum(val) <= 0) {
  407. this.goBack();
  408. return;
  409. }
  410. this.projectDetail = {};
  411. this.projectLabel = [];
  412. this.projectSimpleLabel = [];
  413. this.getDetail();
  414. }
  415. },
  416. methods: {
  417. getDetail(successTip) {
  418. this.loadIng++;
  419. $A.aAjax({
  420. url: 'project/detail',
  421. data: {
  422. projectid: this.projectid,
  423. },
  424. complete: () => {
  425. this.loadIng--;
  426. this.loadDetailed = true;
  427. },
  428. error: () => {
  429. this.goBack();
  430. alert(this.$L('网络繁忙,请稍后再试!'));
  431. },
  432. success: (res) => {
  433. if (res.ret === 1) {
  434. this.projectDetail = res.data.project;
  435. this.projectLabel = res.data.label;
  436. this.projectSimpleLabel = res.data.simpleLabel;
  437. this.projectSortData = this.getProjectSort();
  438. if (successTip === true) {
  439. this.$Message.success(this.$L('刷新成功!'));
  440. }
  441. } else {
  442. this.$Modal.error({title: this.$L('温馨提示'), content: res.msg});
  443. this.goBack();
  444. }
  445. }
  446. });
  447. },
  448. getProjectSort() {
  449. let sortData = "",
  450. taskData = "";
  451. this.projectLabel.forEach((label) => {
  452. taskData = "";
  453. label.taskLists.forEach((task) => {
  454. if (taskData) taskData+= "-";
  455. taskData+= task.id;
  456. });
  457. if (sortData) sortData+= ";";
  458. sortData+= label.id + ":" + taskData;
  459. });
  460. return sortData;
  461. },
  462. handleLabel(event, labelDetail) {
  463. switch (event) {
  464. case 'refresh': {
  465. this.refreshLabel(labelDetail);
  466. break;
  467. }
  468. case 'rename': {
  469. this.renameLabel(labelDetail);
  470. break;
  471. }
  472. case 'delete': {
  473. this.deleteLabel(labelDetail);
  474. break;
  475. }
  476. }
  477. },
  478. refreshLabel(item) {
  479. this.$set(item, 'loadIng', true);
  480. $A.aAjax({
  481. url: 'project/task/lists',
  482. data: {
  483. projectid: this.projectid,
  484. labelid: item.id,
  485. },
  486. complete: () => {
  487. this.$set(item, 'loadIng', false);
  488. },
  489. error: () => {
  490. window.location.reload();
  491. },
  492. success: (res) => {
  493. if (res.ret === 1) {
  494. this.$set(item, 'taskLists', res.data.lists);
  495. } else {
  496. window.location.reload();
  497. }
  498. }
  499. });
  500. },
  501. renameLabel(item) {
  502. this.renameValue = "";
  503. this.$Modal.confirm({
  504. render: (h) => {
  505. return h('div', [
  506. h('div', {
  507. style: {
  508. fontSize: '16px',
  509. fontWeight: '500',
  510. marginBottom: '20px',
  511. }
  512. }, this.$L('重命名列表')),
  513. h('Input', {
  514. props: {
  515. value: this.renameValue,
  516. autofocus: true,
  517. placeholder: this.$L('请输入新的列表名称')
  518. },
  519. on: {
  520. input: (val) => {
  521. this.renameValue = val;
  522. }
  523. }
  524. })
  525. ])
  526. },
  527. loading: true,
  528. onOk: () => {
  529. if (this.renameValue) {
  530. this.$set(item, 'loadIng', true);
  531. let title = this.renameValue;
  532. $A.aAjax({
  533. url: 'project/label/rename',
  534. data: {
  535. projectid: this.projectid,
  536. labelid: item.id,
  537. title: title,
  538. },
  539. complete: () => {
  540. this.$set(item, 'loadIng', false);
  541. },
  542. error: () => {
  543. this.$Modal.remove();
  544. alert(this.$L('网络繁忙,请稍后再试!'));
  545. },
  546. success: (res) => {
  547. this.$Modal.remove();
  548. this.$set(item, 'title', title);
  549. setTimeout(() => {
  550. if (res.ret === 1) {
  551. this.$Message.success(res.msg);
  552. } else {
  553. this.$Modal.error({title: this.$L('温馨提示'), content: res.msg});
  554. }
  555. }, 350);
  556. }
  557. });
  558. } else {
  559. this.$Modal.remove();
  560. }
  561. },
  562. });
  563. },
  564. deleteLabel(item) {
  565. let redTip = item.taskLists.length > 0 ? ('<div style="color:red;font-weight:500">' + this.$L('注:将同时删除列表下所有任务') + '</div>') : '';
  566. this.$Modal.confirm({
  567. title: this.$L('删除列表'),
  568. content: '<div>' + this.$L('你确定要删除此列表吗?') + '</div>' + redTip,
  569. loading: true,
  570. onOk: () => {
  571. $A.aAjax({
  572. url: 'project/label/delete',
  573. data: {
  574. projectid: this.projectid,
  575. labelid: item.id,
  576. },
  577. error: () => {
  578. this.$Modal.remove();
  579. alert(this.$L('网络繁忙,请稍后再试!'));
  580. },
  581. success: (res) => {
  582. this.$Modal.remove();
  583. this.projectLabel.some((label, index) => {
  584. if (label.id == item.id) {
  585. this.projectLabel.splice(index, 1);
  586. this.projectSortData = this.getProjectSort();
  587. return true;
  588. }
  589. });
  590. setTimeout(() => {
  591. if (res.ret === 1) {
  592. this.$Message.success(res.msg);
  593. $A.triggerTaskInfoListener('deletelabel', {labelid: item.id, projectid: item.projectid});
  594. } else {
  595. this.$Modal.error({title: this.$L('温馨提示'), content: res.msg });
  596. }
  597. }, 350);
  598. }
  599. });
  600. }
  601. });
  602. },
  603. addLabel() {
  604. this.labelValue = "";
  605. this.$Modal.confirm({
  606. render: (h) => {
  607. return h('div', [
  608. h('div', {
  609. style: {
  610. fontSize: '16px',
  611. fontWeight: '500',
  612. marginBottom: '20px',
  613. }
  614. }, this.$L('添加列表')),
  615. h('Input', {
  616. props: {
  617. value: this.labelValue,
  618. autofocus: true,
  619. placeholder: this.$L('请输入列表名称')
  620. },
  621. on: {
  622. input: (val) => {
  623. this.labelValue = val;
  624. }
  625. }
  626. })
  627. ])
  628. },
  629. loading: true,
  630. onOk: () => {
  631. if (this.labelValue) {
  632. $A.aAjax({
  633. url: 'project/label/add',
  634. data: {
  635. projectid: this.projectid,
  636. title: this.labelValue
  637. },
  638. error: () => {
  639. this.$Modal.remove();
  640. alert(this.$L('网络繁忙,请稍后再试!'));
  641. },
  642. success: (res) => {
  643. this.$Modal.remove();
  644. this.projectLabel.push(res.data);
  645. this.projectSortData = this.getProjectSort();
  646. setTimeout(() => {
  647. if (res.ret === 1) {
  648. this.$Message.success(res.msg);
  649. } else {
  650. this.$Modal.error({title: this.$L('温馨提示'), content: res.msg});
  651. }
  652. }, 350);
  653. }
  654. });
  655. } else {
  656. this.$Modal.remove();
  657. }
  658. },
  659. });
  660. },
  661. addTaskSuccess(taskDetail, label) {
  662. if (label.taskLists instanceof Array) {
  663. taskDetail.isNewtask = true;
  664. label.taskLists.unshift(taskDetail);
  665. this.$nextTick(() => {
  666. this.$set(taskDetail, 'isNewtask', false);
  667. });
  668. } else {
  669. this.refreshLabel(label);
  670. }
  671. },
  672. openProjectDrawer(tab) {
  673. this.projectDrawerTab = tab;
  674. this.projectDrawerShow = true;
  675. },
  676. openProjectSettingDrawer(tab) {
  677. this.projectSettingDrawerTab = tab;
  678. this.projectSettingDrawerShow = true;
  679. },
  680. projectSortUpdate(isLabel) {
  681. let oldSort = this.projectSortData;
  682. let newSort = this.getProjectSort();
  683. if (oldSort == newSort) {
  684. return;
  685. }
  686. this.projectSortData = newSort;
  687. this.projectSortDisabled = true;
  688. this.loadIng++;
  689. $A.aAjax({
  690. url: 'project/sort',
  691. data: {
  692. projectid: this.projectid,
  693. oldsort: oldSort,
  694. newsort: newSort,
  695. label: isLabel === true ? 1 : 0
  696. },
  697. complete: () => {
  698. this.projectSortDisabled = false;
  699. this.loadIng--;
  700. },
  701. error: () => {
  702. this.getDetail();
  703. alert(this.$L('网络繁忙,请稍后再试!'));
  704. },
  705. success: (res) => {
  706. if (res.ret === 1) {
  707. this.$Message.success(res.msg);
  708. } else {
  709. this.getDetail();
  710. this.$Modal.error({title: this.$L('温馨提示'), content: res.msg});
  711. }
  712. }
  713. });
  714. },
  715. openTaskModal(taskDetail) {
  716. this.taskDetail(taskDetail);
  717. },
  718. },
  719. }
  720. </script>