From c3e7f99b9070230896865a7a0f805473aeed83ea Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期五, 11 四月 2025 15:58:06 +0800 Subject: [PATCH] 1 --- src/components/public/index.vue | 58 +++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 37 insertions(+), 21 deletions(-) diff --git a/src/components/public/index.vue b/src/components/public/index.vue index 98c8513..139adba 100644 --- a/src/components/public/index.vue +++ b/src/components/public/index.vue @@ -17,7 +17,7 @@ :inline="true" label-width="68px" > --> - <!-- <el-form-item label="鐥呯鍚嶇О" prop="bingzhong"> + <!-- <el-form-item label="鐥呯鍚嶇О" prop="bingzhong"> <el-input v-model="queryParams.bingzhong" placeholder="璇疯緭鍏ョ畝绉�" @@ -44,14 +44,16 @@ >鎼滅储</el-button > </el-form-item> --> - <!-- <el-form-item> + <!-- <el-form-item> <h3 >{{ queryParams.proName || '鏆傛棤椤圭洰鍚嶇О' }}</h3> </el-form-item> --> - <!-- <el-form-item> + <!-- <el-form-item> <h3 style="margin-left: 160px">宸查�夐」鐩�</h3> </el-form-item> --> <!-- </el-form> --> - <h2 style="text-align: center;margin-top: -30px;">{{ queryParams.proName || '鏆傛棤椤圭洰鍚嶇О' }}</h2> + <h2 style="text-align: center; margin-top: -30px"> + {{ queryParams.proName || "鏆傛棤椤圭洰鍚嶇О" }} + </h2> <div style="display: flex; width: 100%"> <div style="width: 50%; margin-right: 40px"> <el-table @@ -157,6 +159,10 @@ type: Array, default: () => [], }, + proSex: { + type: String, + default: "2" + } }, data() { return { @@ -164,7 +170,7 @@ // 寮瑰嚭灞傛爣棰� title: "", yxbx: "", - proName:'', + proName: "", // lastDesc: "", total: 0, dataList: [], @@ -177,8 +183,8 @@ queryParams: { bingzhong: "", bzPinyin: "", - proId:"", - proName:"", + proId: "", + proSex: "2", pageNum: 1, pageSize: 10, }, @@ -203,15 +209,24 @@ if (newVal && newVal.length > 0) { const firstProject = newVal[0]; // 浣犱篃鍙互閬嶅巻鎵�鏈夐」鐩紝鐪嬩綘涓氬姟闇�姹� this.queryParams.proId = firstProject.proId; // 鍋囪椤圭洰涓彨 id - this.queryParams.proName = firstProject.proName; // 鍋囪鍙� proName - this.proName = firstProject.proName + this.proName = firstProject.proName; } }, }, + proSex: { + handler(newVal) { + this.queryParams.proSex = newVal; + this.getList(); + }, + immediate: true + } }, mounted() {}, - created() {}, + created() { + this.queryParams.proSex = this.proSex; + this.getList(); + }, methods: { async getList() { try { @@ -264,13 +279,12 @@ }, handleSelectionChange(selection) { - this.list = selection; + // this.list = selection; + this.list = [...selection]; this.updateFormContent(selection); }, updateFormContent(selection) { - if (!selection.length) return; - // 濡傛灉澶勪簬妫�鏌ョ姸鎬侊紝浣跨敤浼犲叆鐨勫�� if (this.checkStatus === "1") { this.updateData(this.proResult, this.conclusion); @@ -282,15 +296,17 @@ this.form.jcsj = ""; // 浣跨敤map鍜宩oin鏇夸唬forEach鍜屽瓧绗︿覆鎷兼帴 - this.form.desc = selection - .map((item) => item.bingzhong || item.ruleStr) - .filter(Boolean) - .join(","); + if (selection.length > 0) { + this.form.desc = selection + .map((item) => item.bingzhong || item.ruleStr) + .filter(Boolean) + .join(","); - this.form.jcsj = selection - .map((item) => item.yxbx) - .filter(Boolean) - .join(","); + this.form.jcsj = selection + .map((item) => item.yxbx) + .filter(Boolean) + .join(","); + } }, handleOk() { -- Gitblit v1.8.0