企微工作任务迁移完成
This commit is contained in:
		| @@ -37,10 +37,9 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { mapState } from 'vuex' | ||||
|   import { mapState } from 'vuex' | ||||
|   export default { | ||||
|     appName: '工作任务', | ||||
|     // components: {AiTopFixed, AiAdd, AiEmpty}, | ||||
|     data() { | ||||
|       return { | ||||
|         index: 0, | ||||
| @@ -50,6 +49,7 @@ import { mapState } from 'vuex' | ||||
|         userSelect: false, | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']), | ||||
|       tabs() { | ||||
| @@ -63,8 +63,24 @@ import { mapState } from 'vuex' | ||||
|       }, | ||||
|     }, | ||||
|  | ||||
|     onLoad() { | ||||
|       this.$dict.load("workTaskType") | ||||
|     created() { | ||||
|       this.$dict.load("workTaskType").then(() => { | ||||
|         this.getList() | ||||
|       }) | ||||
|       uni.$on('getList', () => { | ||||
|         this.current = 1 | ||||
|         this.getList() | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     onShow() { | ||||
|       document.title = '工作任务' | ||||
|       // uni.pageScrollTo({ | ||||
|       //   duration: 0, | ||||
|       //   scrollTop: 0 | ||||
|       // }) | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
| @@ -77,12 +93,13 @@ import { mapState } from 'vuex' | ||||
|       }, | ||||
|       handleClick(item) { | ||||
|         uni.navigateTo({ | ||||
|           url: "/pages/workTask/components/detail?id=" + item.id + "&taskCode=" + item.taskCode + "&isMine=" + this.index | ||||
|           url: "./detail?id=" + item.id + "&taskCode=" + item.taskCode + "&isMine=" + this.index | ||||
|         }) | ||||
|       }, | ||||
|       add() { | ||||
|         console.log(123) | ||||
|         uni.navigateTo({ | ||||
|           url: "/pages/workTask/components/create" | ||||
|           url: "./create" | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
| @@ -136,15 +153,6 @@ import { mapState } from 'vuex' | ||||
|     onReachBottom() { | ||||
|       this.current = this.current + 1; | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     onShow() { | ||||
|       uni.pageScrollTo({ | ||||
|         duration: 0, | ||||
|         scrollTop: 0 | ||||
|       }) | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|   | ||||
| @@ -106,12 +106,9 @@ | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
|   import AiBack from "../../../components/AiBack"; | ||||
|   import AiSelectEnterprise from "../../../components/AiSelectEnterprise/AiSelectEnterprise"; | ||||
| 
 | ||||
|   export default { | ||||
|     name: "create", | ||||
|     components: {AiBack, AiSelectEnterprise}, | ||||
|     data() { | ||||
|       return { | ||||
|         index: null, | ||||
| @@ -159,7 +156,13 @@ | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.$u.toast("创建成功") | ||||
|             this.$refs["aiBack"].back() | ||||
|             uni.$emit('getList') | ||||
|             setTimeout(() => { | ||||
|               uni.navigateBack({ | ||||
|                 delta: 1 | ||||
|               }) | ||||
|             }, 500) | ||||
| 
 | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
| @@ -109,14 +109,10 @@ | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
|   import AiTopFixed from "../../../components/AiTopFixed"; | ||||
|   import AiBack from "../../../components/AiBack"; | ||||
|   import AiEmpty from "../../../components/AiEmpty/AiEmpty"; | ||||
|   import {mapActions} from "vuex"; | ||||
| 
 | ||||
|   export default { | ||||
|     name: "detail", | ||||
|     components: {AiTopFixed, AiBack,AiEmpty}, | ||||
|     data() { | ||||
|       return { | ||||
|         current: 1, | ||||
| @@ -180,17 +176,17 @@ | ||||
|       }, | ||||
|       createSubTask() { | ||||
|         uni.navigateTo({ | ||||
|           url: "/pages/workTask/components/create?taskCode=" + this.taskCode | ||||
|           url: "./create?taskCode=" + this.taskCode | ||||
|         }) | ||||
|       }, | ||||
|       subDetail({id}) { | ||||
|         uni.navigateTo({ | ||||
|           url: "/pages/workTask/components/subDetail?id=" + id | ||||
|           url: "./subDetail?id=" + id | ||||
|         }) | ||||
|       }, | ||||
|       handleClick() { | ||||
|         uni.navigateTo({ | ||||
|           url: "/pages/workTask/components/finish?taskCode=" + this.detail.taskCode + "&percent=" + this.detail.myUserInfo.percent | ||||
|           url: "./finish?taskCode=" + this.detail.taskCode + "&percent=" + this.detail.myUserInfo.percent | ||||
|         }) | ||||
|       }, | ||||
|       change(e) { | ||||
| @@ -31,11 +31,9 @@ | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import AiBack from "../../../components/AiBack"; | ||||
| 
 | ||||
| export default { | ||||
|   name: "finish", | ||||
|   components: {AiBack}, | ||||
|   data() { | ||||
|     return { | ||||
|       value: 0, | ||||
| @@ -62,7 +60,11 @@ export default { | ||||
|       }).then(res => { | ||||
|         if (res.code == 0) { | ||||
|           this.$u.toast("提交成功") | ||||
|           this.$refs["aiBack"].back() | ||||
|           setTimeout(() => { | ||||
|             uni.navigateBack({ | ||||
|               delta: 1 | ||||
|             }) | ||||
|           }, 500) | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
| @@ -42,11 +42,9 @@ | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
|   import AiBack from "../../../components/AiBack"; | ||||
| 
 | ||||
|   export default { | ||||
|     name: "finishDetail", | ||||
|     components: {AiBack}, | ||||
|     data() { | ||||
|       return { | ||||
|         id: null, | ||||
| @@ -75,11 +75,9 @@ | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
|   import AiBack from "../../../components/AiBack"; | ||||
| 
 | ||||
|   export default { | ||||
|     name: "subDetail", | ||||
|     components: {AiBack}, | ||||
|     data() { | ||||
|       return { | ||||
|         id: null, | ||||
| @@ -97,7 +95,7 @@ | ||||
|     methods: { | ||||
|       finishDetail({id}){ | ||||
|         uni.navigateTo({ | ||||
|           url:"/pages/workTask/components/finishDetail?id=" + id | ||||
|           url:"./finishDetail?id=" + id | ||||
|         }) | ||||
|       }, | ||||
|       confirm() { | ||||
		Reference in New Issue
	
	Block a user