From eac6b7989a6cbb9d09b20a1c46f51bb68d9f5ae7 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期三, 19 二月 2025 10:01:50 +0800 Subject: [PATCH] 项目信息一对多的情况列表不显示、相关文书不要了 --- src/views/projectEngineering/projectLibrary/component/BasicInfo.vue | 104 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 88 insertions(+), 16 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue index 7b6c23b..22b8c0f 100644 --- a/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue +++ b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue @@ -9,12 +9,23 @@ </el-col> <el-col :span="6"> <el-form-item class="item" label="椤圭洰浠g爜" label-width="100px" prop="projectCode"> - <el-input v-model.trim="projectForm.projectCode" class="item" clearable disabled maxlength="255" + <el-input v-model.trim="projectForm.projectCode" class="item" clearable maxlength="255" placeholder="璇疯緭鍏�"/> </el-form-item> </el-col> <el-col :span="12" style="position: relative"> - <div style="width: 150px; position: absolute;"><img alt="" src="../../../../assets/images/s.png"/></div> + <div style="width: 100%; height: 100%; position: absolute;"> + <el-form-item class="item" label="璧嬬爜" label-width="50px" prop="coding"> + <template slot-scope="scope"> + <!-- <div class="yellow-dot" v-if="scope.row.coding === 'yellow'"></div>--> + <!-- <div class="green-dot" v-if="scope.row.coding === 'green'"></div>--> + <!-- <div class="red-dot" v-if="scope.row.coding === 'red'"></div>--> + <div class="red-dot"></div> + <tag-list></tag-list> + </template> + </el-form-item> + <!-- <img alt="" src="../../../../assets/images/s.png"/>--> + </div> </el-col> </el-row> <el-row :gutter="20"> @@ -43,10 +54,10 @@ </el-form-item> </el-col> <el-col :span="6"> - <el-form-item label="椤圭洰闃舵" label-width="100px" prop="fundsType" style="width: 100%"> - <el-input v-model.trim="projectForm.projectPhase" class="item" clearable disabled maxlength="255" - placeholder="璇疯緭鍏�"/> - </el-form-item> +<!-- <el-form-item label="椤圭洰闃舵" label-width="100px" prop="fundsType" style="width: 100%">--> +<!-- <el-input v-model.trim="projectForm.projectPhase" class="item" clearable disabled maxlength="255"--> +<!-- placeholder="璇疯緭鍏�"/>--> +<!-- </el-form-item>--> </el-col> </el-row> <el-row :gutter="20"> @@ -60,18 +71,24 @@ </el-col> <el-col :span="6"> <el-form-item label="椤圭洰鐘舵��" label-width="100px" prop="projectstatus" style="width: 100%"> - <el-select v-model="projectForm.projectStatus" clearable placeholder="璇烽�夋嫨" style="width: 100%"> + <el-select v-model="projectForm.projectStatus" clearable placeholder="璇烽�夋嫨" @change="handleProjectStatusChange" style="width: 100%"> <el-option v-for="item in dict.type.sys_project_status" :key="item.value" :label="item.label" :value="item.value"/> </el-select> </el-form-item> </el-col> <el-col :span="6"> - <el-form-item label="椤圭洰涓氫富鍗曚綅" label-width="100px" prop="projectOwnerUnit" style="width: 100%"> - <el-input v-model.trim="projectForm.projectOwnerUnit" class="item" clearable maxlength="255" - placeholder="璇疯緭鍏�"/> - </el-form-item> + <el-form-item label="椤圭洰闃舵" label-width="100px" prop="fundsType" style="width: 100%"> + <el-input v-model.trim="projectForm.projectPhase" class="item" clearable disabled maxlength="255" + placeholder="璇疯緭鍏�"/> + </el-form-item> </el-col> +<!-- <el-col :span="6">--> +<!-- <el-form-item label="椤圭洰涓氫富鍗曚綅" label-width="100px" prop="projectOwnerUnit" style="width: 100%">--> +<!-- <el-input v-model.trim="projectForm.projectOwnerUnit" class="item" clearable maxlength="255"--> +<!-- placeholder="璇疯緭鍏�"/>--> +<!-- </el-form-item>--> +<!-- </el-col>--> </el-row> <el-row :gutter="20"> <el-col :span="6"> @@ -252,6 +269,19 @@ <span style="margin-left: 2px">鍏�</span> </el-form-item> </el-col> + <el-col :span="6"> + <el-form-item label="寤鸿鎬ц川" label-width="100px" prop="constructionNature" style="width: 100%; min-width: 260px"> + <el-select + v-model="projectForm.constructionNature" + clearable + placeholder="璇烽�夋嫨" + style="width: 100%" + > + <el-option v-for="item in dict.type.construction_nature" :key="item.value" :label="item.label" + :value="item.value"/> + </el-select> + </el-form-item> + </el-col> </el-row> <el-row :gutter="0"> <el-col :span="18"> @@ -294,6 +324,7 @@ <script> // import Upload from '@element-plus/icons-vue/dist/Upload.vue'; import Map from '@/views/components/Map/index.vue'; +import TagList from "./TagList.vue"; // import MapMouseEvent from '@/views/components/Map/types'; // import UploadStandard from '@/components/uploadStandard.vue'; // import { usePlanLibrary } from '@/hooks/detailsInformation'; @@ -304,10 +335,12 @@ import {approvalList} from "@/api/system/dept"; export default { + name: 'BasicInfo', dicts: ['sys_funding_type', 'sys_investment_type', 'sys_project_type', 'sys_project_status', 'sys_competent_department' - , 'sys_administrative_divisions', 'sys_centralized_management', 'sys_approval_type', 'sys_key_categories', 'sys_annual_plan'], + , 'sys_administrative_divisions', 'sys_centralized_management', 'sys_approval_type', 'sys_key_categories', 'sys_annual_plan', 'construction_nature'], components: { Map, + TagList, // UploadStandard, // RemoteSelect }, @@ -328,7 +361,7 @@ projectName: '', projectCode: '', projectType: '', - projectStatus: 'working', + projectStatus: 'pendding', fundType: '', investType: '', importanceType: '', @@ -353,8 +386,9 @@ projectAddress: '', engineeringIdList: [], content: '', + constructionNature: '', contact: '', - projectOwnerUnit: '', + projectOwnerUnit: null, planStartTime: '', planCompleteTime: '', projectContactPerson: '', @@ -364,6 +398,7 @@ yearInvestAmount: '', competentDepartmentList: [], managementCentralizationList: [], + remark: '' }, subclass: '', largeCategory: '', @@ -407,7 +442,7 @@ if (this.projectForm.id) { this.getProjectInfo(this.projectForm.id); } else { - this.getProjectCodeApi(); + // this.getProjectCodeApi(); this.$emit('updateIsShow', true); } // this.handleLoadMore(1); @@ -417,10 +452,21 @@ localStorage.setItem("projectForm", JSON.stringify(this.projectForm)); }, methods: { + handleProjectStatusChange(value) { + // 鏍规嵁閫変腑鐨� projectStatus 淇敼 anotherField 鐨勫�� + if (value === 'working' || value === 'stop') { + this.projectForm.projectPhase = '瀹炴柦闃舵'; + } else if (value === 'finish') { + this.projectForm.projectPhase = '绔e伐鎶曠敤闃舵'; + } else if (value === 'pendding') { + this.projectForm.projectPhase = '鍌ㄥ瑙勫垝闃舵'; + } + }, getProjectInfo(id) { getProject(id).then(res => { this.projectForm = res.data; this.$emit('updateIsShow', true); + }); }, getApprovalList() { @@ -428,9 +474,10 @@ this.approvalList = res.data; }); }, - submit() { + submit(usedStatus) { this.$refs["projectForm"].validate(valid => { if (valid) { + this.projectForm.usedStatus = usedStatus; if (this.projectForm.id) { updateProject(this.projectForm).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); @@ -530,6 +577,7 @@ this.largeCategory = labels.join(','); } }, 1000); + this.$emit('basicInfoForm', newVal) }, deep: true } @@ -570,4 +618,28 @@ width: 20px; } } + +.yellow-dot { + width: 10px; /* 鍦嗙偣鐨勫搴� */ + height: 10px; /* 鍦嗙偣鐨勯珮搴� */ + background-color: yellow; /* 鍦嗙偣鐨勯鑹� */ + border-radius: 50%; /* 浣垮厓绱犲彉鎴愬渾褰� */ + display: inline-block; /* 纭繚鍏冪礌鍙互鍜屽叾浠栧唴鑱斿厓绱犱竴璧锋樉绀� */ +} + +.red-dot { + width: 10px; /* 鍦嗙偣鐨勫搴� */ + height: 10px; /* 鍦嗙偣鐨勯珮搴� */ + background-color: red; /* 鍦嗙偣鐨勯鑹� */ + border-radius: 50%; /* 浣垮厓绱犲彉鎴愬渾褰� */ + display: inline-block; /* 纭繚鍏冪礌鍙互鍜屽叾浠栧唴鑱斿厓绱犱竴璧锋樉绀� */ +} + +.green-dot { + width: 10px; /* 鍦嗙偣鐨勫搴� */ + height: 10px; /* 鍦嗙偣鐨勯珮搴� */ + background-color: green; /* 鍦嗙偣鐨勯鑹� */ + border-radius: 50%; /* 浣垮厓绱犲彉鎴愬渾褰� */ + display: inline-block; /* 纭繚鍏冪礌鍙互鍜屽叾浠栧唴鑱斿厓绱犱竴璧锋樉绀� */ +} </style> -- Gitblit v1.8.0