From 6bb2a23358624f72c886fccff39bfb54de868e4f Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期五, 01 八月 2025 14:59:39 +0800 Subject: [PATCH] jgjl --- src/components/public/index.vue | 128 ++++++++++++++---------------------------- public/yuanqu.ini | 5 - 2 files changed, 44 insertions(+), 89 deletions(-) diff --git a/public/yuanqu.ini b/public/yuanqu.ini index d1f03b7..a4bb16d 100644 --- a/public/yuanqu.ini +++ b/public/yuanqu.ini @@ -1,12 +1,7 @@ [development] 8094=pbkwyy -<<<<<<< HEAD 81=xatlgcyy 82=sqyy -======= -81=jdczgzyy -82=bjxjyy ->>>>>>> 97ddbdb0827051db8fb25e42b964185fa6a9a3b5 8095=jdczgzyy 8096=sqyy 8097=wbzxyy diff --git a/src/components/public/index.vue b/src/components/public/index.vue index edf5d28..8048334 100644 --- a/src/components/public/index.vue +++ b/src/components/public/index.vue @@ -1,11 +1,6 @@ <template> <div> - <el-dialog - :title="title" - :visible.sync="open" - width="1080px" - append-to-body - > + <el-dialog :title="title" :visible.sync="open" width="1080px" append-to-body> <h3 v-if="fList.proResult">妫�娴嬮」鐩� :{{ fList.project.proName }}</h3> <h3 v-if="fList.proResult"> 妫�娴嬬粨鏋� :{{ fList.proResult }}{{ fList.project.proMetering }} @@ -14,13 +9,7 @@ <h2 style="text-align: center">{{ proName || "鏆傛棤椤圭洰鍚嶇О" }}</h2> <div style="display: flex; width: 100%"> <div style="width: 50%; margin-right: 40px"> - <el-form - :model="queryParams" - ref="queryForm" - size="small" - :inline="true" - label-width="68px" - > + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px"> <!-- <el-form-item label="鐥呯鍚嶇О" prop="bingzhong"> <el-input v-model="queryParams.bingzhong" @@ -31,22 +20,11 @@ /> </el-form-item>--> <el-form-item label="妫�鏌ョ粨璁�" prop="ruleStr"> - <el-input - v-model="queryParams.ruleStr" - placeholder="璇疯緭鍏ユ鏌ョ粨璁�" - clearable - @keyup.enter.native="getList" - style="width: 130px" - /> + <el-input v-model="queryParams.ruleStr" placeholder="璇疯緭鍏ユ鏌ョ粨璁�" clearable @keyup.enter.native="getList" + style="width: 130px" /> </el-form-item> <el-form-item> - <el-button - type="primary" - icon="el-icon-search" - size="mini" - @click="getList" - >鎼滅储</el-button - > + <el-button type="primary" icon="el-icon-search" size="mini" @click="getList">鎼滅储</el-button> </el-form-item> <!-- <el-form-item> <h3 >{{ queryParams.proName || '鏆傛棤椤圭洰鍚嶇О' }}</h3> @@ -55,48 +33,25 @@ <h3 style="margin-left: 160px">宸查�夐」鐩�</h3> </el-form-item> --> </el-form> - <el-table - :data="dataList" - ref="multipleTable" - v-loading="loading" - @selection-change="handleSelectionChange" - border - height="480px" - > - <el-table-column type="selection" width="40" align="center" /> - <el-table-column - label="搴忓彿" - type="index" - align="center" - width="50px" - /> + <el-table :data="dataList" ref="multipleTable" row-key="aid" v-loading="loading" @selection-change="handleSelectionChange" + border height="480px"> + <el-table-column type="selection" width="40" align="center" :reserve-selection="true"/> + <el-table-column label="搴忓彿" type="index" align="center" width="50px" /> <!-- <el-table-column label="瑙勫垯" align="center" prop="ruleStr" /> --> <el-table-column label="妫�鏌ユ墍瑙�" align="center" prop="yxbx" /> <el-table-column label="妫�鏌ョ粨璁�" align="center" prop="ruleStr" /> </el-table> <div class="pag"> <div class="pag1" style="margin-left: 630px"> - <pagination - small - v-show="total > 0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> + <pagination small v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" @pagination="getList" /> </div> </div> </div> <div class="jianc"> <!-- <h3 style="margin-top: -30px;">宸查�夐」鐩�</h3> --> - <el-form - :model="form" - ref="queryForm" - size="small" - label-width="68px" - :label-position="labelPosition" - > + <el-form :model="form" ref="queryForm" size="small" label-width="68px" :label-position="labelPosition"> <!-- :inline="true" --> <!-- <el-form-item> <el-input @@ -106,22 +61,10 @@ ></el-input> </el-form-item> --> <el-form-item label="妫�鏌ユ墍瑙�" prop="jcsj"> - <el-input - v-model="form.jcsj" - clearable - type="textarea" - :autosize="{ minRows: 7 }" - style="width: 380px" - /> + <el-input v-model="form.jcsj" clearable type="textarea" :autosize="{ minRows: 7 }" style="width: 380px" /> </el-form-item> <el-form-item label="妫�鏌ョ粨璁�" prop="desc"> - <el-input - v-model="form.desc" - clearable - type="textarea" - :autosize="{ minRows: 7 }" - style="width: 380px" - /> + <el-input v-model="form.desc" clearable type="textarea" :autosize="{ minRows: 7 }" style="width: 380px" /> </el-form-item> </el-form> </div> @@ -179,7 +122,7 @@ queryParams: { ruleStr: "", pageNum: 1, - pageSize: 10, + pageSize: 50, }, list: [], fList: {}, @@ -189,16 +132,16 @@ }, watch: { checkStatus(newValue) { - console.log(565658); if (newValue === "1") { this.updateData(this.proResult, this.conclusion); + }else{ + } }, projectList: { immediate: true, deep: true, handler(newVal) { - console.log("鏀跺埌鐨勯」鐩暟鎹�:", newVal); // 浣犲彲浠ュ湪杩欓噷澶勭悊鏁版嵁锛屾瘮濡備繚瀛樺埌 data 鎴栧仛閫昏緫鍒ゆ柇 if (newVal && newVal.length > 0) { const firstProject = newVal[0]; // 浣犱篃鍙互閬嶅巻鎵�鏈夐」鐩紝鐪嬩綘涓氬姟闇�姹� @@ -209,9 +152,11 @@ }, }, }, - mounted() {}, + mounted() { }, - created() {}, + created() { + + }, methods: { async getList() { try { @@ -258,14 +203,11 @@ }, updateData(proResult, conclusion) { - console.log(proResult, conclusion, 5658); if (this.checkStatus == 1) { this.form.jcsj = proResult; // 鏇存柊妫�鏌ユ墍瑙� this.form.desc = conclusion; // 鏇存柊妫�鏌ョ粨璁� - } else { - this.form.desc = ""; - this.form.jcsj = ""; } + if (this.list.length != 0) { let desc = ""; @@ -278,13 +220,29 @@ .map((item) => item.yxbx) .filter(Boolean) .join(","); - this.form.jcsj = this.form.jcsj + jcsj; // 鏇存柊妫�鏌ユ墍瑙� - this.form.desc = this.form.desc + desc; + this.form.jcsj = jcsj; // 鏇存柊妫�鏌ユ墍瑙� + this.form.desc = desc; + // if (this.queryParams.pageNum == 1) { + + // } else { + // this.form.jcsj = this.form.jcsj + jcsj; // 鏇存柊妫�鏌ユ墍瑙� + // this.form.desc = this.form.desc + desc; + // this.form.jcsj = this.uniqueStrings(this.form.jcsj) + // this.form.desc = this.uniqueStrings(this.form.desc) + // } + }else{ + this.form.jcsj = ""; // 鏇存柊妫�鏌ユ墍瑙� + this.form.desc = ""; } - }, + }, + // uniqueStrings(strings) { + // // 浣跨敤Set鏉ュ幓閲� + // const uniqueSet = new Set(strings); + // return Array.from(uniqueSet).join("") + // }, handleSelectionChange(selection) { - this.list = selection; + this.list = selection this.updateFormContent(selection); }, @@ -340,6 +298,7 @@ console.error("澶勭悊鏁版嵁澶辫触:", error); this.$message.error("鎿嶄綔澶辫触"); } + this.$refs.multipleTable?.clearSelection(); }, resetForm() { @@ -352,6 +311,7 @@ }, callcolos() { this.open = false; + this.$refs.multipleTable?.clearSelection(); }, }, computed: { -- Gitblit v1.8.0