| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <wt-card title="任务列表" class="mt-10">
- <div
- class="flex flex-center full-width flex-justify-between mb-10 flex-col"
- >
- <span class="full-width text-left bold mb-10">编制任务</span>
- <div style="width: 100%" class="mt-10">
- <task-table
- :option="option"
- :data="data"
- :project-id="projectId"
- :total="total"
- @refresh="list"
- ></task-table>
- </div>
- </div>
- </wt-card>
- </template>
- <script>
- import wtCard from '@/components/wt-card/index.vue'
- import TaskTable from '@/views/task/component/task-table.vue'
- export default {
- name: 'info8',
- components: { wtCard, TaskTable },
- props: {
- projectId: {
- required: true,
- type: String,
- default: ''
- }
- },
- watch: {
- projectId: {
- 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.projectId, level: 1 })
- .then(res => {
- if (res.code === 200) {
- this.data = res.data.records
- this.total = res.data.total
- }
- })
- }
- }
- }
- </script>
- <style scoped></style>
|