diff --git a/src/api/superviseReport/superviseReport.ts b/src/api/superviseReport/superviseReport.ts new file mode 100644 index 0000000..8ba4737 --- /dev/null +++ b/src/api/superviseReport/superviseReport.ts @@ -0,0 +1,46 @@ +import request from "@/api/request"; + +/** + * 获取数据 + * */ +export function getListData(query) { + return request.get({ + url: '/supervise/report', + query + }); +} +/** + * 获取附件 + * */ +export function getReportFile(query){ + return request.get({ + url: '/supervise/report/getReportFile', + query + }); +} + + +/** + * 新增 + * */ +export function addOrUpDataFun(body){ + return request.post({ + url:'/supervise/report', + body + }) +} +/** + * 删除数据 + * */ +export function removeByIdFun(id){ + return request.del({ + url:`/supervise/report/${id}` + }) +} + + +export function getReportDetailFun(id){ + return request.get({ + url:`/supervise/report/getReportDetail/${id}` + }) +} diff --git a/src/components/data/distrbute.vue b/src/components/data/distrbute.vue index dca1bef..002e479 100644 --- a/src/components/data/distrbute.vue +++ b/src/components/data/distrbute.vue @@ -290,4 +290,4 @@ async function handleSubmit() { } \ No newline at end of file + diff --git a/src/components/negative/add.vue b/src/components/negative/add.vue index a63dbaf..95fb4d6 100644 --- a/src/components/negative/add.vue +++ b/src/components/negative/add.vue @@ -111,10 +111,25 @@ trigger: ['blur'], }" > - + + + + + + + @@ -265,7 +280,7 @@ + + + reportData.value,(val)=>{ + if(val){ + form.value.reportNumber = reportList.value.find(s=>s.id == val).reportName; + form.value.reportId = val; + } +},{deep:true,immediate:true}) + + +const reportQuery = ref({ + current: 1, + size: 100, + departBranch:false +}) +const reportList = ref([]); +const reportLoading = ref(false); +const getReportListDataFun =async (val=null)=>{ + reportLoading.value=true; + try{ + if(val){ + reportQuery.value.reportName = val; + }else{ + reportQuery.value.reportName =null; + } + console.log('reportQuery.value.reportName',reportQuery.value.reportName) + const res = await getListData(reportQuery.value); + reportList.value=res.records; + reportLoading.value=false; + }catch (e){ + reportLoading.value=false; + } +} +const reportFiles = computed(()=> { + if( form.value.reportNumber){ + let data= reportList.value.find(s=>s.id === form.value.reportId); + console.log('data',data) + return data.files; + }else{ + return [] + } + +}) + \ No newline at end of file + diff --git a/src/components/negative/confirmation-completion.vue b/src/components/negative/confirmation-completion.vue index ecb34b8..e8c0424 100644 --- a/src/components/negative/confirmation-completion.vue +++ b/src/components/negative/confirmation-completion.vue @@ -178,6 +178,25 @@ + + + + + + + + + +