From 9314d8cdd5e7a29f1061f59cccd7cce17b7fef3b Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期五, 11 四月 2025 16:14:59 +0800 Subject: [PATCH] 2 --- src/components/public/index.vue | 164 +++++++++++++++++++++--------------------------------- 1 files changed, 64 insertions(+), 100 deletions(-) diff --git a/src/components/public/index.vue b/src/components/public/index.vue index 139adba..c4369c5 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 }} @@ -51,53 +46,28 @@ <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 - :data="dataList" - ref="multipleTable" - v-loading="loading" - @selection-change="handleSelectionChange" - border - height="420px" - > + <el-table :data="dataList" ref="multipleTable" v-loading="loading" @selection-change="handleSelectionChange" + border height="420px"> <el-table-column type="selection" width="40" align="center" /> - <el-table-column - label="搴忓彿" - type="index" - align="center" - width="50px" - /> + <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 style="width: 100%; height: 600px"> <!-- <h3 style="margin-top: -30px;">宸查�夐」鐩�</h3> --> - <el-form - :model="form" - ref="queryForm" - size="small" - label-width="68px" - :inline="true" - > + <el-form :model="form" ref="queryForm" size="small" label-width="68px" :inline="true"> <!-- :inline="true" --> <!-- <el-form-item> <el-input @@ -107,35 +77,23 @@ ></el-input> </el-form-item> --> <el-form-item label="妫�鏌ユ墍瑙�" prop="jcsj"> - <el-input - v-model="form.jcsj" - clearable - type="textarea" - :autosize="{ minRows: 8 }" - style="width: 380px" - /> + <el-input v-model="form.jcsj" clearable type="textarea" :autosize="{ minRows: 8 }" style="width: 380px" /> </el-form-item> <el-form-item label="妫�鏌ョ粨璁�" prop="conclusion"> - <el-input - v-model="form.desc" - clearable - type="textarea" - :autosize="{ minRows: 8 }" - style="width: 380px" - /> + <el-input v-model="form.desc" clearable type="textarea" :autosize="{ minRows: 8 }" style="width: 380px" /> </el-form-item> </el-form> </div> </div> <span slot="footer" class="dialog-footer" style="margin-top: -120px"> - <el-button @click="open = false">鍙� 娑�</el-button> + <el-button @click="callcolos">鍙� 娑�</el-button> <el-button type="primary" @click="handleOk">纭� 瀹�</el-button> </span> </el-dialog> </div> </template> - + <script> import { getlist, getlistByRuleStr } from "@/api/doctor/check"; import { getYxJcXxJg } from "@/api/picture/picture"; @@ -159,10 +117,6 @@ type: Array, default: () => [], }, - proSex: { - type: String, - default: "2" - } }, data() { return { @@ -170,7 +124,7 @@ // 寮瑰嚭灞傛爣棰� title: "", yxbx: "", - proName: "", + proName: '', // lastDesc: "", total: 0, dataList: [], @@ -184,7 +138,7 @@ bingzhong: "", bzPinyin: "", proId: "", - proSex: "2", + proName: "", pageNum: 1, pageSize: 10, }, @@ -209,32 +163,25 @@ if (newVal && newVal.length > 0) { const firstProject = newVal[0]; // 浣犱篃鍙互閬嶅巻鎵�鏈夐」鐩紝鐪嬩綘涓氬姟闇�姹� this.queryParams.proId = firstProject.proId; // 鍋囪椤圭洰涓彨 id - this.proName = firstProject.proName; + this.queryParams.proName = firstProject.proName; // 鍋囪鍙� proName + this.proName = firstProject.proName } }, }, - proSex: { - handler(newVal) { - this.queryParams.proSex = newVal; - this.getList(); - }, - immediate: true - } }, - mounted() {}, + mounted() { }, - created() { - this.queryParams.proSex = this.proSex; - this.getList(); - }, + created() { }, methods: { async getList() { try { this.loading = true; // 娣诲姞鍔犺浇鐘舵�� - const res = await getlist(this.queryParams); this.dataList = res.rows; this.total = res.total; + + this.updateData(this.proResult, this.conclusion); + // 濡傛灉闇�瑕侀�変腑鎿嶄綔锛屽皢鍏跺皝瑁呬负鐙珛鏂规硶 await this.handleAutoSelection(); @@ -271,42 +218,56 @@ }, updateData(proResult, conclusion) { - if (this.checkStatus === "1") { + console.log(proResult, conclusion, 5658) + this.form.jcsj = proResult; // 鏇存柊妫�鏌ユ墍瑙� this.form.desc = conclusion; // 鏇存柊妫�鏌ョ粨璁� - // console.log(proResult, conclusion); - } + if (this.list.length != 0) { + let desc = "" + desc += this.list + .map((item) => item.bingzhong || item.ruleStr) + .filter(Boolean) + .join(","); + let jcsj = "" + jcsj += this.list + .map((item) => item.yxbx) + .filter(Boolean) + .join(","); + this.form.jcsj = this.form.jcsj+jcsj; // 鏇存柊妫�鏌ユ墍瑙� + this.form.desc= this.form.desc+desc; + + } + }, handleSelectionChange(selection) { - // this.list = selection; - this.list = [...selection]; + this.list = selection; this.updateFormContent(selection); }, updateFormContent(selection) { + // if (!selection.length) return; + this.updateData(this.proResult, this.conclusion); // 濡傛灉澶勪簬妫�鏌ョ姸鎬侊紝浣跨敤浼犲叆鐨勫�� - if (this.checkStatus === "1") { - this.updateData(this.proResult, this.conclusion); - return; - } + // if (this.checkStatus === "1") { + // this.updateData(this.proResult, this.conclusion); + // return; + // } // 閲嶇疆琛ㄥ崟鍐呭 - this.form.desc = ""; - this.form.jcsj = ""; + // this.form.desc = ""; + // this.form.jcsj = ""; + // console.log(22222); + // // 浣跨敤map鍜宩oin鏇夸唬forEach鍜屽瓧绗︿覆鎷兼帴 + // this.form.desc = selection + // .map((item) => item.bingzhong || item.ruleStr) + // .filter(Boolean) + // .join(","); - // 浣跨敤map鍜宩oin鏇夸唬forEach鍜屽瓧绗︿覆鎷兼帴 - 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() { @@ -333,6 +294,9 @@ this.$refs.multipleTable.clearSelection(); } }, + callcolos() { + this.open = false; + } }, computed: { isCheckMode() { @@ -345,14 +309,14 @@ }, }; </script> - + <style scoped> .el-dialog__body { padding: 10px 20px; } + ::v-deep .el-dialog__footer { padding: 0 !important; padding-bottom: 40px !important; } -</style> - \ No newline at end of file +</style> \ No newline at end of file -- Gitblit v1.8.0