From 0b8c300ea2e4dcdbc9b6c58774b40e6a826e754b Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 26 Feb 2024 09:55:29 +0800 Subject: [PATCH] update --- src/api/cost_project.ts | 5 +++ .../task_handling_three_level_review/edit.vue | 23 +++++----- src/views/task_type/edit.vue | 44 +++++++++++++++++-- 3 files changed, 58 insertions(+), 14 deletions(-) diff --git a/src/api/cost_project.ts b/src/api/cost_project.ts index 26c9d68..c1fc8af 100644 --- a/src/api/cost_project.ts +++ b/src/api/cost_project.ts @@ -23,4 +23,9 @@ export function apiCostProjectDelete(params: any) { // 造价项目台账详情 export function apiCostProjectDetail(params: any) { return request.get({ url: '/cost_project.cost_project/detail', params }) +} + +// 造价项目台账下拉列表 +export function apiCostProjectDatas(params: any) { + return request.get({ url: '/cost_project.cost_project/datas', params }) } \ No newline at end of file diff --git a/src/views/task_handling_three_level_review/edit.vue b/src/views/task_handling_three_level_review/edit.vue index 28eee46..70850d5 100644 --- a/src/views/task_handling_three_level_review/edit.vue +++ b/src/views/task_handling_three_level_review/edit.vue @@ -4,12 +4,12 @@ ref="popupRef" :title="popupTitle" :async="true" - width="550px" + width="60%" @confirm="handleSubmit" @close="handleClose" > - - + + @@ -109,16 +109,16 @@ - + - + - + - + @@ -132,6 +132,7 @@ import Popup from '@/components/popup/index.vue' import { apiTaskHandlingThreeLevelReviewAdd, apiTaskHandlingThreeLevelReviewEdit, apiTaskHandlingThreeLevelReviewDetail } from '@/api/task_handling_three_level_review' import { timeFormat } from '@/utils/util' import type { PropType } from 'vue' +import file from "@/components/material/file.vue"; defineProps({ dictData: { type: Object as PropType>, @@ -185,10 +186,10 @@ const formData = reactive({ kaigong: '', jungong: '', bz: '', - result_file: '', - master_annex: '', - bm_annex: '', - shb_annex: '', + result_file: [], + master_annex: [], + bm_annex: [], + shb_annex: [], }) diff --git a/src/views/task_type/edit.vue b/src/views/task_type/edit.vue index 9939295..d0c0985 100644 --- a/src/views/task_type/edit.vue +++ b/src/views/task_type/edit.vue @@ -12,9 +12,25 @@ - - + + + + + + + @@ -40,8 +56,9 @@ import type { FormInstance } from 'element-plus' import Popup from '@/components/popup/index.vue' import { apiTaskTypeAdd, apiTaskTypeEdit, apiTaskTypeDetail } from '@/api/task_type' -import { timeFormat } from '@/utils/util' +import {useDictOptions} from "@/hooks/useDictOptions" import type { PropType } from 'vue' +import {apiCostProjectDatas} from "@/api/cost_project"; defineProps({ dictData: { type: Object as PropType>, @@ -79,6 +96,27 @@ const formRules = reactive({ }) +const { optionsData } = useDictOptions<{ + projectList: any[] +}>({ + projectList: { + api: apiCostProjectDatas, + } +}) + + +const loading = ref(false) + +const queryCostProject= async (query: string) => { + loading.value = true + const projectList = await apiCostProjectDatas({ + name: query ?? '' + }) + optionsData.projectList = projectList + loading.value = false +} + + // 获取详情 const setFormData = async (data: Record) => { for (const key in formData) {