From 1456d943075f3013f0374b2278b809e433b9ada2 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期一, 21 七月 2025 18:02:40 +0800 Subject: [PATCH] 1 --- src/components/proposal/index.vue | 97 ++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 81 insertions(+), 16 deletions(-) diff --git a/src/components/proposal/index.vue b/src/components/proposal/index.vue index 472fd2a..93bf7c9 100644 --- a/src/components/proposal/index.vue +++ b/src/components/proposal/index.vue @@ -25,7 +25,7 @@ </el-form-item> <el-form-item v-show="tjproposal == 0"> <el-input - v-model="queryParams1.zyzd" + v-model="searchAdv" style="width: 180px" placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" clearable @@ -35,6 +35,17 @@ <el-button type="primary" @click="search" v-show="tjproposal == 0" >鎼滅储</el-button > + <el-form-item v-show="tjproposal == 1"> + <el-input + v-model="searchCyjy" + style="width: 180px" + placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" + clearable + @clear="search1" + ></el-input> + </el-form-item> + <el-button type="primary" @click="search1" v-show="tjproposal == 1" + >鎼滅储</el-button> </el-form> <el-table @@ -47,7 +58,7 @@ height="500px" > <el-table-column type="selection" width="40" align="center" /> - <el-table-column label="缂栫爜" width="70" align="center" prop="id" /> + <!-- <el-table-column label="缂栫爜" width="70" align="center" prop="id" /> --> <el-table-column label="鏍囬" width="120" align="center" prop="title" /> <el-table-column label="寤鸿鍐呭" align="left" prop="advice" /> <!-- <el-table-column @@ -89,14 +100,14 @@ prop="createTime" /> --> </el-table> - <div class="pag" v-if="tjproposal == 1"> + <div class="pag" v-if="tjproposal == 1"> <div class="pag1"> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" - @pagination="radiotjproposalChange" + @pagination="radiotjproposalChange1" /> </div> </div> @@ -105,7 +116,7 @@ <pagination v-show="total > 0" :total="total" - :page.sync="queryParams1.pageNum" + :page.sync="queryParams1.pageNum" :limit.sync="queryParams1.pageSize" @pagination="radiotjproposalChange" /> @@ -124,9 +135,7 @@ getKjTjAdviceKjbqBySex, getCyTjAdviceKjbqBySex, } from "@/api/hosp/project"; -import { - listAdvicerules, -} from "@/api/hosp/advicerules"; +import { listAdvicerules } from "@/api/hosp/advicerules"; import { getInfo } from "@/api/login"; export default { name: "Packagese", @@ -138,6 +147,7 @@ tjproposal: "0", open: false, openone: false, + prevOpen: false, // 寮瑰嚭灞傛爣棰� title: "", total: 0, @@ -146,10 +156,11 @@ // 閬僵灞� loading: false, searchAdv: "", + searchCyjy:"", queryParams1: { pageNum: 1, pageSize: 10, - zyzd: '' + zyzd: "", }, queryParams: { sex: "", @@ -158,7 +169,7 @@ page: 1, pageSize: 10, jynr: "", - jybt:"" + jybt: "", }, list: [], fList: {}, @@ -173,17 +184,30 @@ this.tjproposal = "0"; this.getList(); }, + mrjy(val) { + const mode = val === "Y" ? "1" : "0"; + this.setTjProposal(mode); + }, }, mounted() { // this.getList() }, - created() { // if( this.queryParams){ // this.getList() // } }, methods: { + clearSearchFields() { + this.searchAdv = '' + this.searchCyjy = '' + }, + setTjProposal(mode) { + if (this.tjproposal !== mode) { + this.tjproposal = mode; + this.radiotjproposalChange(mode); // 鎵ц鍒囨崲閫昏緫 + } + }, getAllList() { this.loading = true; this.openone = true; @@ -212,18 +236,33 @@ console.log(this.list); }, search() { - // this.queryParams.jybt = this.searchAdv; - // this.queryParams.page = 1; + this.queryParams1.zyzd = this.searchAdv; + this.queryParams.pageNum = 1; this.loading = true; listAdvicerules(this.queryParams1).then((res) => { - this.dataList = res.rows; + this.dataList = res.rows; this.total = res.total; this.loading = false; }); }, + search1() { + this.queryParams.nr = this.searchCyjy; + this.queryParams.page = 1; + this.loading = true; + getInfo().then((res) => { + this.queryParams.userId = res.user.userId; + this.queryParams.isZj = null; + getCyTjAdviceKjbqBySex(this.queryParams).then((res) => { + this.dataList = res.data.records; + this.total = res.data.total; + + this.loading = false; + }); + }); + }, radiotjproposalChange() { if (this.tjproposal == "0") { - this.searchAdv = ""; + // this.searchAdv = ""; // this.queryParams.isZj = this.fList.isZj; // this.queryParams.userId = null; this.getList(); @@ -246,6 +285,32 @@ }); } }, + radiotjproposalChange1() { + if (this.tjproposal == "0") { + // this.searchCyjy = ""; + this.queryParams.isZj = this.fList.isZj; + this.queryParams.userId = null; + this.getList(); + } else { + this.loading = true; + getInfo().then((res) => { + this.queryParams.userId = res.user.userId; + this.queryParams.isZj = null; + getCyTjAdviceKjbqBySex(this.queryParams).then((res) => { + if (res.data) { + this.dataList = res.data.records; + this.total = res.data.total; + } else { + this.dataList = []; + this.total = 0; + this.$modal.msgError(res.msg); + } + this.loading = false; + }); + }); + } + }, + handleOk() { this.open = false; if (this.list.length != 0) { @@ -266,7 +331,7 @@ .pag1 { width: 30%; } -::v-deep .el-dialog__body{ +::v-deep .el-dialog__body { padding: 7px 20px; } </style> -- Gitblit v1.8.0