From 4b6eabfb56d2b736c5f16796614318770c606fd6 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期四, 24 七月 2025 17:53:54 +0800 Subject: [PATCH] 1 --- src/components/proposal/index.vue | 186 +++++++++++++++++++++++++++++++++++++++------ 1 files changed, 159 insertions(+), 27 deletions(-) diff --git a/src/components/proposal/index.vue b/src/components/proposal/index.vue index 0d8f006..99714b8 100644 --- a/src/components/proposal/index.vue +++ b/src/components/proposal/index.vue @@ -16,9 +16,11 @@ </el-form-item> </el-form> --> - <el-form inline> + <el-form inline @submit.native.prevent="search"> <el-form-item> <el-radio-group v-model="tjproposal" @input="radiotjproposalChange"> + <!-- <el-radio-button label="0">甯哥敤寤鸿</el-radio-button> + <el-radio-button label="1">蹇嵎寤鸿</el-radio-button> --> <el-radio-button label="0">蹇嵎寤鸿</el-radio-button> <el-radio-button label="1">甯哥敤寤鸿</el-radio-button> </el-radio-group> @@ -35,9 +37,53 @@ <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 + v-if="tjproposal == '0'" + :data="advicerulesList" + ref="elTable" + v-loading="loading" + @selection-change="handleSelectionChange" + border + height="500px" + > + <el-table-column type="selection" width="40" align="center" /> + <el-table-column label="绉戝" width="70" align="center" prop="ks" /> + <el-table-column + label="寤鸿鍚嶇О" + width="120" + align="center" + prop="jymc" + /> + <el-table-column label="寤鸿鍐呭" align="left" prop="jynr" /> + </el-table> + <div class="pag" v-if="tjproposal == '0'"> + <div class="pag1"> + <pagination + v-show="total1 > 0" + :total="total1" + :page.sync="queryParams1.pageNum" + :limit.sync="queryParams1.pageSize" + @pagination="radiotjproposalChange" + /> + </div> + </div> + + <el-table + v-if="tjproposal == '1'" :data="dataList" ref="elTable" v-loading="loading" @@ -46,7 +92,13 @@ 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="70" + align="center" + prop="userName" + /> --> <el-table-column label="鏍囬" width="120" align="center" prop="title" /> <el-table-column label="寤鸿鍐呭" align="left" prop="advice" /> <!-- <el-table-column @@ -62,14 +114,14 @@ prop="createTime" /> --> </el-table> - <div class="pag"> + <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> @@ -86,11 +138,14 @@ getKjTjAdviceKjbqBySex, getCyTjAdviceKjbqBySex, } from "@/api/hosp/project"; +import { listAdvicerules } from "@/api/hosp/advicerules"; import { getInfo } from "@/api/login"; +import { get } from "sortablejs"; export default { name: "Packagese", props: { cusobj: Object, + mrjy: String, }, data() { return { @@ -100,19 +155,30 @@ // 寮瑰嚭灞傛爣棰� title: "", total: 0, + total1: 0, dataList: [], + advicerulesList: [], // 閬僵灞� loading: false, searchAdv: "", + searchCyjy: "", queryParams: { + page: 1, + pageSize: 10, + jymc: "", + // sex: "", + isZj: "", + userId: "", + nr: "", + }, + queryParams1: { + pageNum: 1, + pageSize: 10, + jymc: "", sex: "", isZj: "", userId: "", - page: 1, - pageSize: 10, - jynr: "", - jybt:"" }, list: [], fList: {}, @@ -122,22 +188,32 @@ cusobj(val, newVla) { console.log(val, newVla, 1111); this.fList = val; - this.queryParams.sex = val.sex; + // this.queryParams.sex = val.sex; this.queryParams.isZj = val.isZj; - this.tjproposal = "0"; + // this.tjproposal = "0"; this.getList(); }, - }, - mounted() { - // this.getList() + mrjy(val) { + /* if (val === "Y") { + this.tjproposal = "1"; // 榛樿閫変腑鈥滃父鐢ㄥ缓璁�� + this.radiotjproposalChange("1"); // 鎵嬪姩瑙﹀彂鐩稿叧閫昏緫 + } */ + const mode = val === "Y" ? "1" : "0"; + this.setTjProposal(mode); + }, }, - 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; @@ -148,11 +224,21 @@ }, getList() { this.loading = true; - getKjTjAdviceKjbqBySex(this.queryParams).then((res) => { + /* getKjTjAdviceKjbqBySex(this.queryParams).then((res) => { this.dataList = res.data.records; this.total = res.data.total; this.loading = false; - }); + }); */ + listAdvicerules(this.queryParams1) + .then((response) => { + this.advicerulesList = response.rows; + this.total1 = response.total; + this.loading = false; + }) + .catch((error) => { + console.error("绛涢�夊揩鎹峰缓璁け璐�:", error); + this.$message.error("绛涢�夊揩鎹峰缓璁け璐�"); + }); }, handleQuery() { this.getAllList(); @@ -166,18 +252,63 @@ console.log(this.list); }, search() { - this.queryParams.jybt = this.searchAdv; + this.queryParams1.jymc = this.searchAdv; + this.queryParams1.pageNum = 1; + this.loading = true; + listAdvicerules(this.queryParams1).then((res) => { + this.advicerulesList = res.rows; + this.total1 = res.total; + this.loading = false; + }); + }, + search1() { + this.queryParams.nr = this.searchCyjy; this.queryParams.page = 1; this.loading = true; - getKjTjAdviceKjbqBySex(this.queryParams).then((res) => { - this.dataList = res.data.records; - this.total = res.data.total; - this.loading = false; + 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.searchCyjy = ""; + this.queryParams1.isZj = this.fList.isZj; + this.queryParams1.userId = null; + this.getList(); + } else { + this.loading = true; + getInfo().then((res) => { + this.queryParams1.userId = res.user.userId; + this.queryParams1.isZj = null; + getCyTjAdviceKjbqBySex(this.queryParams1).then((res) => { + if (res.data) { + this.advicerulesList = res.data.records; + this.total1 = res.data.total; + this.dataList = res.data.records; + this.total = res.data.total; + } else { + this.advicerulesList = []; + this.total1 = 0; + this.dataList = []; + this.total = 0; + this.$modal.msgError(res.msg); + } + this.loading = false; + }); + }); + } + }, + radiotjproposalChange1() { + if (this.tjproposal == "0") { + // this.searchCyjy = ""; this.queryParams.isZj = this.fList.isZj; this.queryParams.userId = null; this.getList(); @@ -200,6 +331,7 @@ }); } }, + handleOk() { this.open = false; if (this.list.length != 0) { @@ -220,7 +352,7 @@ .pag1 { width: 30%; } -::v-deep .el-dialog__body{ +::v-deep .el-dialog__body { padding: 7px 20px; } </style> -- Gitblit v1.8.0