From ad54cf427ee94e01e8c72a01f738615eb2b6569d Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期五, 04 七月 2025 17:58:34 +0800 Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb --- src/components/public/index.vue | 200 +++++++++++++++++++++++++++++++------------------ 1 files changed, 125 insertions(+), 75 deletions(-) diff --git a/src/components/public/index.vue b/src/components/public/index.vue index 98c8513..b14b956 100644 --- a/src/components/public/index.vue +++ b/src/components/public/index.vue @@ -10,14 +10,19 @@ <h3 v-if="fList.proResult"> 妫�娴嬬粨鏋� :{{ fList.proResult }}{{ fList.project.proMetering }} </h3> - <!-- <el-form - :model="queryParams" - ref="queryForm" - size="small" - :inline="true" - label-width="68px" - > --> - <!-- <el-form-item label="鐥呯鍚嶇О" prop="bingzhong"> + + <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" + @submit.native.prevent + > + <!-- <el-form-item label="鐥呯鍚嶇О" prop="bingzhong"> <el-input v-model="queryParams.bingzhong" placeholder="璇疯緭鍏ョ畝绉�" @@ -25,42 +30,39 @@ @keyup.enter.native="handleQuery" style="width: 120px" /> - </el-form-item> - <el-form-item label="鎷奸煶鐮�" prop="bzPinyin"> - <el-input - v-model="queryParams.bzPinyin" - placeholder="璇疯緭鍏ユ嫾闊崇爜" - clearable - @keyup.enter.native="handleQuery" - style="width: 130px" - /> - </el-form-item> - <el-form-item> - <el-button - type="primary" - icon="el-icon-search" - size="mini" - @click="handleQuery" - >鎼滅储</el-button - > - </el-form-item> --> - <!-- <el-form-item> + </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-form-item> + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="mini" + @click="getList" + >鎼滅储</el-button + > + </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> - <div style="display: flex; width: 100%"> - <div style="width: 50%; margin-right: 40px"> + </el-form> <el-table :data="dataList" ref="multipleTable" v-loading="loading" @selection-change="handleSelectionChange" border - height="420px" + height="480px" > <el-table-column type="selection" width="40" align="center" /> <el-table-column @@ -87,14 +89,14 @@ </div> </div> - <div style="width: 100%; height: 600px"> + <div class="jianc"> <!-- <h3 style="margin-top: -30px;">宸查�夐」鐩�</h3> --> <el-form :model="form" ref="queryForm" size="small" label-width="68px" - :inline="true" + :label-position="labelPosition" > <!-- :inline="true" --> <!-- <el-form-item> @@ -109,16 +111,16 @@ v-model="form.jcsj" clearable type="textarea" - :autosize="{ minRows: 8 }" + :autosize="{ minRows: 7 }" style="width: 380px" /> </el-form-item> - <el-form-item label="妫�鏌ョ粨璁�" prop="conclusion"> + <el-form-item label="妫�鏌ョ粨璁�" prop="desc"> <el-input v-model="form.desc" clearable type="textarea" - :autosize="{ minRows: 8 }" + :autosize="{ minRows: 7 }" style="width: 380px" /> </el-form-item> @@ -126,14 +128,14 @@ </div> </div> - <span slot="footer" class="dialog-footer" style="margin-top: -120px"> - <el-button @click="open = false">鍙� 娑�</el-button> + <span slot="footer" class="dialog-footer" style="margin-top: -20px"> + <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"; @@ -161,10 +163,11 @@ data() { return { open: false, + labelPosition: "top", // 寮瑰嚭灞傛爣棰� title: "", yxbx: "", - proName:'', + proName: "", // lastDesc: "", total: 0, dataList: [], @@ -175,10 +178,7 @@ jcsj: "", }, queryParams: { - bingzhong: "", - bzPinyin: "", - proId:"", - proName:"", + ruleStr: "", pageNum: 1, pageSize: 10, }, @@ -190,6 +190,7 @@ }, watch: { checkStatus(newValue) { + console.log(565658); if (newValue === "1") { this.updateData(this.proResult, this.conclusion); } @@ -203,8 +204,8 @@ 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.queryParams.proName = firstProject.proName; + this.proName = firstProject.proName; } }, }, @@ -216,10 +217,12 @@ async getList() { try { this.loading = true; // 娣诲姞鍔犺浇鐘舵�� - const res = await getlist(this.queryParams); - this.dataList = res.rows; - this.total = res.total; + this.dataList = res.data.rows; + if (res.data.total) { + this.total = res.data.total; + } + this.updateData(this.proResult, this.conclusion); // 濡傛灉闇�瑕侀�変腑鎿嶄綔锛屽皢鍏跺皝瑁呬负鐙珛鏂规硶 await this.handleAutoSelection(); @@ -256,10 +259,28 @@ }, updateData(proResult, conclusion) { - if (this.checkStatus === "1") { + console.log(proResult, conclusion, 5658); + if (this.checkStatus == 1) { this.form.jcsj = proResult; // 鏇存柊妫�鏌ユ墍瑙� this.form.desc = conclusion; // 鏇存柊妫�鏌ョ粨璁� - // console.log(proResult, conclusion); + } else { + this.form.desc = ""; + this.form.jcsj = ""; + } + + 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; } }, @@ -269,34 +290,49 @@ }, updateFormContent(selection) { - if (!selection.length) return; + // if (!selection.length) return; + console.log(selection, 123456); + 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鍜屽瓧绗︿覆鎷兼帴 - 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() { if (!this.form.desc && !this.form.jcsj) { this.$message.warning("璇烽�夋嫨鏁版嵁"); return; + } else { + const desc = this.form.desc?.trim(); + const jcsj = this.form.jcsj?.trim(); + + // 濡傛灉娌℃湁閫変腑琛ㄦ牸椤� + if (!this.list || this.list.length === 0) { + if (!desc && !jcsj) { + this.$message.warning( + "璇峰~鍐欐湁鏁堢殑妫�鏌ユ墍瑙佸拰妫�鏌ョ粨璁猴紝鎴栭�夋嫨琛ㄦ牸鏁版嵁" + ); + return; + } + } } try { @@ -317,6 +353,9 @@ this.$refs.multipleTable.clearSelection(); } }, + callcolos() { + this.open = false; + }, }, computed: { isCheckMode() { @@ -329,14 +368,25 @@ }, }; </script> - + <style scoped> .el-dialog__body { - padding: 10px 20px; + padding: 0px 20px; } + +::v-deep .el-dialog__header { + padding: 0px !important; + padding-bottom: 0px !important; +} + ::v-deep .el-dialog__footer { padding: 0 !important; padding-bottom: 40px !important; } -</style> - \ No newline at end of file + +.jianc { + width: 100%; + height: 600px; + padding-top: 40px; +} +</style> \ No newline at end of file -- Gitblit v1.8.0