|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
<template>
|
|
|
|
|
<BasicTable @register="registerTable">
|
|
|
|
|
<template #toolbar>
|
|
|
|
|
<!-- <a-button type="primary" @click=""></a-button> -->
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
|
<a-button v-if="!record.tasklist" type="primary" @click="openDraw(record)">生成任务</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicTable>
|
|
|
|
|
</template>
|
|
|
|
@ -11,6 +13,9 @@ import { ref, defineProps, onMounted, watch, nextTick } from "vue"
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
|
|
|
|
import { columns, searchFormSchema } from './utils'
|
|
|
|
|
import { GetDataList } from '@/api/demo/provincetasks'
|
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
const [registerTable, { reload, expandAll, getForm,getDataSource,setTableData }] = useTable({
|
|
|
|
|
title: '任务列表',
|
|
|
|
@ -29,6 +34,11 @@ const [registerTable, { reload, expandAll, getForm,getDataSource,setTableData }]
|
|
|
|
|
// 显示表格设置工具
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
bordered: false,
|
|
|
|
|
actionColumn: {
|
|
|
|
|
width: 160,
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'action',
|
|
|
|
|
},
|
|
|
|
|
beforeFetch(data) {
|
|
|
|
|
return data
|
|
|
|
|
},
|
|
|
|
@ -41,6 +51,14 @@ const [registerTable, { reload, expandAll, getForm,getDataSource,setTableData }]
|
|
|
|
|
return info;
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
const openDraw = (e) =>{
|
|
|
|
|
router.push({
|
|
|
|
|
path: '/workmanagement/workplan',
|
|
|
|
|
query: {
|
|
|
|
|
taskid: e.id
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|