panel.vue 32 KB

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