From 60cb43453ec2c4b07743fd297fc4c69928ff5853 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期四, 31 七月 2025 17:54:48 +0800 Subject: [PATCH] 1 --- src/views/system/comp/index.vue | 33 +++++++++++++++++++++++++++++---- src/views/hosp/project/index.vue | 7 ++++--- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue index e51de15..7dbb889 100644 --- a/src/views/hosp/project/index.vue +++ b/src/views/hosp/project/index.vue @@ -1188,7 +1188,7 @@ }, created() { // this.getConsumables(); - // this.getDeptList(); + this.getDeptList(); // this.getDeptTree().then(() => { // this.precomputePinyin(); // }); @@ -1351,15 +1351,16 @@ this.form.hisXmbm = ""; this.form.hisXmmc = ""; this.form.hisdj = ""; - this.loading = true; + // this.loading = true; this.proParent = false; this.form.proPrice = 0.0; this.form.proName = ""; this.form.proId = null; this.form.resultType = "1"; + this.getDeptList(); getlist().then((response) => { if (response.code == 200) { - this.loading = false; + // this.loading = false; this.projectOptions = []; const project = { proId: 0, proName: "涓荤被鐩�", children: [] }; project.children = this.handleTree(response.data.list, "proId"); diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue index b364f81..f9a7a08 100644 --- a/src/views/system/comp/index.vue +++ b/src/views/system/comp/index.vue @@ -365,7 +365,7 @@ <el-form-item label="椤圭洰鍚嶇О" prop="proName"> <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable - @keyup.enter.native="handleSearchFor" style="width: 140px" /> + @keyup.enter.native="handleSearchFor" @clear="handleClearSearch" style="width: 140px" /> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchFor">鎼滅储</el-button> @@ -458,7 +458,7 @@ <el-form-item label="椤圭洰鍚嶇О" prop="proName"> <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable - @keyup.enter.native="handleSearchFor" style="width: 140px" /> + @keyup.enter.native="handleSearchFor" @clear="handleClearSearch" style="width: 140px" /> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchFor">鎼滅储</el-button> @@ -550,7 +550,7 @@ <el-form-item label="椤圭洰鍚嶇О" prop="proName"> <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable - @keyup.enter.native="handleSearchFor" style="width: 140px" /> + @keyup.enter.native="handleSearchFor" @clear="handleClearSearch" style="width: 140px" /> </el-form-item> <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchFor">鎼滅储</el-button> @@ -1445,7 +1445,7 @@ }); } }, - handleSearchFor() { + /* handleSearchFor() { // 鍒ゆ柇鏄惁涓烘眽瀛� const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char) if (isChineseChar(this.queryParams1.proName)) { @@ -1460,7 +1460,29 @@ this.Treedata = response.data; }); } + }, */ + handleSearchFor() { + // 鍒ゆ柇鏄惁涓烘眽瀛� + const keyword = this.queryParams1.proName?.trim() || ''; + const isChineseChar = /[\u4E00-\u9FA5]/.test(keyword); + const query = { + ...this.queryParams1, + proName: isChineseChar ? keyword : null, + pym: isChineseChar ? null : keyword + }; + getProjectList(query).then((response) => { + this.Treedata = response.data; + }); }, + handleClearSearch() { + this.queryParams1.proName = ''; + this.queryParams1.pym = null; + // 閲嶆柊鍔犺浇琛ㄦ牸鏁版嵁 + getProjectList({}).then((response) => { + this.Treedata = response.data; + }); + }, + // 鍗曢」鏁版嵁鑾峰彇 handleChangesingle(selection) { console.log(selection,22222222) @@ -1683,6 +1705,9 @@ this.title = "鍒嗙粍椤圭洰缁存姢"; this.OnenewpacName = []; this.queryParams.price = 0; + // 娓呯┖椤圭洰鍚嶇О鎼滅储妗� + this.queryParams1.proName = ''; + this.queryParams1.pym = null; this.loading = true; if (this.groupList[0]) { let id = this.groupList[0].id || ''; -- Gitblit v1.8.0