Compare commits

...

2 Commits

@ -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>

@ -190,7 +190,7 @@
</div>
<div class="footer-container">
<div >
<a-button @click="resetForm" style="width:100%;">取消</a-button>
<a-button v-if="!paramValue" @click="resetForm" style="width:100%;"></a-button>
</div>
<div v-if="submitForm.status == 0">
<a-button style="width:100%;" type="primary" @click="onSubmit"></a-button>
@ -204,6 +204,9 @@ import { ref, defineEmits, defineProps, watch } from "vue";
import { PlusOutlined,LeftOutlined,DeleteOutlined,MoreOutlined } from '@ant-design/icons-vue';
import { addTask,editTask } from "@/api/sys/workplan";
import { Modal, message } from 'ant-design-vue';
import { useRoute } from 'vue-router'
const router = useRoute()
const paramValue = router.query.taskid
const formRef = ref();
const labelCol = { span: 24 };
@ -245,7 +248,8 @@ const props = defineProps({
"expectedFileCount": 0,
"uploadedFileCount": 0,
"flightId": null,
"reason": null
"reason": null,
"externalTaskId": null
})
},
"editMode":{
@ -256,8 +260,6 @@ const props = defineProps({
const weekdays = ref([
{
'label':'周日',
@ -369,7 +371,8 @@ const submitForm = ref({
"expectedFileCount": 0,
"uploadedFileCount": 0,
"flightId": null,
"reason": null
"reason": null,
"externalTaskId": null
})
@ -510,6 +513,9 @@ const onSubmit =async () => {
message.error("操作失败!");
}
}else{
if(paramValue){
submitForm.value.externalTaskId = paramValue
}
//
let res = await addTask(submitForm.value);
if(res){

@ -72,6 +72,11 @@ import axios from 'axios';
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
import { useRoute } from 'vue-router'
const router = useRoute()
const paramValue = router.query.taskid
const airLineForm = ref({
"id": null,
"airLineName": null,
@ -112,6 +117,10 @@ const aircraftShow = ref(false);
const createAirLineShow = ref(false);
const importAirLineShow = ref(true);
if(paramValue){
planListShow.value = false;
workPlanFormShow.value = true;
}
const selectAriLine = ()=> {
ariLineShow.value = true;
aircraftShow.value = false;

Loading…
Cancel
Save