|
|
@@ -0,0 +1,85 @@
|
|
|
+<template>
|
|
|
+ <div
|
|
|
+ class="flex flex-center full-width flex-justify-between mt-10 mb-10 flex-col"
|
|
|
+ >
|
|
|
+ <span class="full-width text-left bold mt-20 mb-10">编制任务</span>
|
|
|
+ <div style="width: 92%">
|
|
|
+ <task-table
|
|
|
+ :option="option"
|
|
|
+ :data="data"
|
|
|
+ :project-id="detail.id"
|
|
|
+ :total="total"
|
|
|
+ @refresh="list"
|
|
|
+ ></task-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import TaskTable from '@/views/task/component/task-table.vue'
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: { TaskTable },
|
|
|
+ props: {
|
|
|
+ detail: {
|
|
|
+ type: Object,
|
|
|
+ default: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ detail: {
|
|
|
+ handler(val) {
|
|
|
+ if (val !== null && val !== undefined) {
|
|
|
+ this.list()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ data: [],
|
|
|
+ task: {},
|
|
|
+ total: 0,
|
|
|
+ option: {
|
|
|
+ showCheckBox: false,
|
|
|
+ folderChecked: true,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '共20个任务',
|
|
|
+ prop: 'title',
|
|
|
+ display: false,
|
|
|
+ width: 300
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '标签',
|
|
|
+ prop: 'createUserName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '时间',
|
|
|
+ prop: 'createUserName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '执行人',
|
|
|
+ prop: 'createTime'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ list() {
|
|
|
+ this.$api.task
|
|
|
+ .taskListByProject({ projectId: this.detail.id, level: 1 })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.data = res.data.records
|
|
|
+ this.total = res.data.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|