|
@ -72,7 +72,8 @@ |
|
|
</a-row> |
|
|
</a-row> |
|
|
<a-row> |
|
|
<a-row> |
|
|
<a-col :span="24"> |
|
|
<a-col :span="24"> |
|
|
<a-table :columns="serviceColumns" |
|
|
<a-table |
|
|
|
|
|
:columns="serviceColumns" |
|
|
:data-source="serviceProjectOptions" |
|
|
:data-source="serviceProjectOptions" |
|
|
:row-selection="serviceRowSelection" |
|
|
:row-selection="serviceRowSelection" |
|
|
rowKey="id" |
|
|
rowKey="id" |
|
@ -89,10 +90,17 @@ |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { PageWrapper } from '@/components/Page'; |
|
|
import { PageWrapper } from '@/components/Page'; |
|
|
import { BasicTable, useTable } from '@/components/Table'; |
|
|
import { BasicTable, useTable } from '@/components/Table'; |
|
|
import { list, removeByIds, createPlansByHands, getCategory,findLeafNodeInfos,createPautoCreatePlanslans } from './api'; |
|
|
import { |
|
|
|
|
|
list, |
|
|
|
|
|
removeByIds, |
|
|
|
|
|
createPlansByHands, |
|
|
|
|
|
getCategory, |
|
|
|
|
|
findLeafNodeInfos, |
|
|
|
|
|
createPautoCreatePlanslans, |
|
|
|
|
|
} from './api'; |
|
|
import { formSchemas, columns } from './data'; |
|
|
import { formSchemas, columns } from './data'; |
|
|
import detailDrawer from './detailDrawer.vue'; |
|
|
import detailDrawer from './detailDrawer.vue'; |
|
|
import { ref, reactive } from 'vue'; |
|
|
import { ref, reactive, onActivated } from 'vue'; |
|
|
import addModal from './addModal.vue'; |
|
|
import addModal from './addModal.vue'; |
|
|
import { message } from 'ant-design-vue'; |
|
|
import { message } from 'ant-design-vue'; |
|
|
import { commonDownload } from '@/api/common/index'; |
|
|
import { commonDownload } from '@/api/common/index'; |
|
@ -150,7 +158,7 @@ |
|
|
contractId: null, |
|
|
contractId: null, |
|
|
categoryId: null, |
|
|
categoryId: null, |
|
|
serviceProjectList: [], |
|
|
serviceProjectList: [], |
|
|
auto:false |
|
|
auto: false, |
|
|
}); |
|
|
}); |
|
|
const serviceVisible = ref(false); |
|
|
const serviceVisible = ref(false); |
|
|
const serviceRef = ref(); |
|
|
const serviceRef = ref(); |
|
@ -161,7 +169,7 @@ |
|
|
let params = { |
|
|
let params = { |
|
|
contractId: serviceForm.contractId, |
|
|
contractId: serviceForm.contractId, |
|
|
categoryId: serviceForm.categoryId, |
|
|
categoryId: serviceForm.categoryId, |
|
|
serviceProjectList:serviceForm.serviceProjectList |
|
|
serviceProjectList: serviceForm.serviceProjectList, |
|
|
}; |
|
|
}; |
|
|
if (serviceForm.auto) { |
|
|
if (serviceForm.auto) { |
|
|
createPautoCreatePlanslans(params).then((_) => { |
|
|
createPautoCreatePlanslans(params).then((_) => { |
|
@ -175,9 +183,8 @@ |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
message.warning('请选择服务协议') |
|
|
message.warning('请选择服务协议'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
@ -191,10 +198,10 @@ |
|
|
}; |
|
|
}; |
|
|
const closeService = () => { |
|
|
const closeService = () => { |
|
|
serviceVisible.value = false; |
|
|
serviceVisible.value = false; |
|
|
serviceRef.value.resetFields() |
|
|
serviceRef.value.resetFields(); |
|
|
serviceForm.serviceProjectList = [] |
|
|
serviceForm.serviceProjectList = []; |
|
|
serviceProjectOptions.value = [] |
|
|
serviceProjectOptions.value = []; |
|
|
serviceRowKeys.value = [] |
|
|
serviceRowKeys.value = []; |
|
|
}; |
|
|
}; |
|
|
const contractOptions = ref([]); |
|
|
const contractOptions = ref([]); |
|
|
const getContractOptions = () => { |
|
|
const getContractOptions = () => { |
|
@ -209,11 +216,11 @@ |
|
|
categoryOptions.value = res; |
|
|
categoryOptions.value = res; |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|
const serviceProjectOptions = ref([]) |
|
|
const serviceProjectOptions = ref([]); |
|
|
const categoryIdChange = async (val: any) => { |
|
|
const categoryIdChange = async (val: any) => { |
|
|
const res = await findLeafNodeInfos({categoryId:val }) |
|
|
const res = await findLeafNodeInfos({ categoryId: val }); |
|
|
serviceProjectOptions.value = res |
|
|
serviceProjectOptions.value = res; |
|
|
} |
|
|
}; |
|
|
const getOptions = () => { |
|
|
const getOptions = () => { |
|
|
getCategoryOptions(); |
|
|
getCategoryOptions(); |
|
|
getContractOptions(); |
|
|
getContractOptions(); |
|
@ -265,20 +272,18 @@ |
|
|
dataIndex: 'deliverResult', |
|
|
dataIndex: 'deliverResult', |
|
|
key: 'deliverResult', |
|
|
key: 'deliverResult', |
|
|
}, |
|
|
}, |
|
|
] |
|
|
]; |
|
|
const serviceRowKeys = ref([]) |
|
|
const serviceRowKeys = ref([]); |
|
|
const serviceRowSelection = ref( |
|
|
const serviceRowSelection = ref({ |
|
|
{ |
|
|
|
|
|
selectedRowKeys: serviceRowKeys, |
|
|
selectedRowKeys: serviceRowKeys, |
|
|
onChange: (selectedRowKeys: any) => { |
|
|
onChange: (selectedRowKeys: any) => { |
|
|
serviceForm.serviceProjectList = selectedRowKeys |
|
|
serviceForm.serviceProjectList = selectedRowKeys; |
|
|
serviceRowKeys.value = selectedRowKeys |
|
|
serviceRowKeys.value = selectedRowKeys; |
|
|
} |
|
|
}, |
|
|
} |
|
|
}); |
|
|
) |
|
|
|
|
|
//下载 |
|
|
//下载 |
|
|
const download = async (record: any) => { |
|
|
const download = async (record: any) => { |
|
|
const attachments = JSON.parse(record.attachment) |
|
|
const attachments = JSON.parse(record.attachment); |
|
|
if (attachments && attachments.length > 0) { |
|
|
if (attachments && attachments.length > 0) { |
|
|
attachments.forEach((i: any) => { |
|
|
attachments.forEach((i: any) => { |
|
|
commonDownload(i.url).then((res) => { |
|
|
commonDownload(i.url).then((res) => { |
|
@ -288,6 +293,9 @@ |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
onActivated(() => { |
|
|
|
|
|
reload(); |
|
|
|
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped></style> |
|
|
<style scoped></style> |
|
|