From f1bd530bc3fcfc006426ebd2e79d0b09c31ba41f Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期二, 24 六月 2025 16:34:47 +0800 Subject: [PATCH] 1 --- src/views/hosp/advicerules/index.vue | 140 ++++++++++++++++++++++++++++------------------ 1 files changed, 86 insertions(+), 54 deletions(-) diff --git a/src/views/hosp/advicerules/index.vue b/src/views/hosp/advicerules/index.vue index abbb93c..b61755d 100644 --- a/src/views/hosp/advicerules/index.vue +++ b/src/views/hosp/advicerules/index.vue @@ -50,7 +50,6 @@ <el-col :span="1.5"> <el-button type="primary" - plain icon="el-icon-plus" size="mini" @click="handleAdd" @@ -60,8 +59,7 @@ </el-col> <el-col :span="1.5"> <el-button - type="success" - plain + type="primary" icon="el-icon-edit" size="mini" :disabled="single" @@ -72,8 +70,7 @@ </el-col> <el-col :span="1.5"> <el-button - type="danger" - plain + type="primary" icon="el-icon-delete" size="mini" :disabled="multiple" @@ -82,35 +79,23 @@ >鍒犻櫎 </el-button> </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-upload2" - size="mini" - @click="handleImport" - >瀵煎叆 + <!-- <el-col :span="1.5"> + <el-button type="primary" icon="el-icon-upload2" size="mini" @click="handleImport">瀵煎叆 </el-button> </el-col> <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - v-hasPermi="['hosp:advicerules:export']" - >瀵煎嚭 + <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport" + v-hasPermi="['hosp:advicerules:export']">瀵煎嚭 </el-button> - </el-col> - <right-toolbar + </el-col> --> + <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" - ></right-toolbar> + ></right-toolbar> --> </el-row> <el-row :gutter="20" style="display: flex"> - <el-col :span="4" :xs="24"> + <el-col :span="3" :xs="24"> <div class="head-container"> <el-input v-model="xmmc" @@ -137,7 +122,7 @@ </div> </div> </el-col> - <div style="width: 100%"> + <el-col :span="20" :xs="24"> <el-table v-loading="loading" :data="advicerulesList" @@ -222,15 +207,19 @@ </template> </el-table-column> </el-table> - </div> + <div class="pag"> + <div class="pag1"> + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getListByXmId" + /> + </div> + </div> + </el-col> </el-row> - <pagination - v-show="total > 0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getListByXmId" - /> <!-- 娣诲姞鎴栦慨鏀逛綋妫�椤圭洰寤鸿瑙勫垯鏂拌〃瀵硅瘽妗� --> <el-dialog @@ -249,6 +238,7 @@ > <el-form-item label="绉戝" prop="ks"> <el-select + :rules="rules" v-model="form.ks" placeholder="璇烽�夋嫨绉戝" style="width: 200px" @@ -299,11 +289,24 @@ /> </el-form-item> <el-form-item label="寮傚父鏍囧織" prop="ycbz"> - <el-input + <!-- <el-input v-model="form.ycbz" style="width: 200px" placeholder="璇疯緭鍏ュ紓甯告爣蹇�" - /> + /> --> + <el-select + v-model="form.ycbz" + placeholder="璇烽�夋嫨寮傚父鏍囧織" + style="width: 200px" + clearable + > + <el-option + v-for="item in ycdata" + :key="item.value" + :label="item.label" + :value="item.label" + ></el-option> + </el-select> </el-form-item> <el-form-item label="鐤剧梾" prop="sfjb"> @@ -537,6 +540,22 @@ loading: true, // 閫変腑鏁扮粍 ids: [], + ycdata: [ + { label: "鈫�", value: "up" }, + { label: "鈫�", value: "down" }, + { label: "闃虫��", value: "positive" }, + { label: "寮遍槼鎬�", value: "weak_positive" }, + { label: "4+", value: "4plus" }, + { label: "3+", value: "3plus" }, + { label: "2+", value: "2plus" }, + { label: "1+", value: "1plus" }, + { label: "+1", value: "plus1" }, + { label: "+2", value: "plus2" }, + { label: "+3", value: "plus3" }, + { label: "+4", value: "plus4" }, + { label: "+", value: "plus" }, + { label: "+-", value: "plus_minus" }, + ], // 闈炲崟涓鐢� single: true, // 闈炲涓鐢� @@ -593,10 +612,12 @@ }, // 琛ㄥ崟鍙傛暟 form: { - xb: "2", + // xb: "2", }, // 琛ㄥ崟鏍¢獙 - rules: {}, + rules: { + ks: [{ required: true, message: " ", trigger: ["blur", "change"] }], + }, upload: { // 鏄惁鏄剧ず寮瑰嚭灞傦紙鐢ㄦ埛瀵煎叆锛� open: false, @@ -625,9 +646,14 @@ treeId(newVal, oldVal) { if (newVal) { this.$nextTick(() => { - document - .querySelector(".el-tree-node__children .el-tree-node__content") - .click(); + const node = document.querySelector( + ".el-tree-node__children .el-tree-node__content" + ); + if (node) { + node.click(); + } else { + console.warn("娌℃湁鎵惧埌 el-tree 鑺傜偣锛屾棤娉曡Е鍙戠偣鍑�"); + } }); } }, @@ -641,6 +667,7 @@ this.total = response.total; this.loading = false; }); */ + getTjProAdvicerulesKsList().then((response) => { this.deptOptions = response.data.map((name, index) => { return { @@ -658,6 +685,8 @@ getListByXmId() { this.loading = true; listAdvicerules(this.queryParams).then((response) => { + console.log(response,123456); + response.rows.forEach((item, index) => { item.newID = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + @@ -722,7 +751,7 @@ createBy: null, updateBy: null, deleted: null, - xb: "2", + // xb: "2", }; if (this.$refs.form) { this.$refs.form.resetFields(); @@ -731,7 +760,7 @@ /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { this.queryParams.pageNum = 1; - this.getList(); + this.getListByXmId(); }, handlecharge() { this.querycharge.pageNum = 1; @@ -831,19 +860,18 @@ submitForm() { this.$refs["form"].validate((valid) => { if (valid) { + this.form.xb = this.form.xb === "1" ? "1" : null; if (this.form.id != null) { updateAdvicerules(this.form).then((response) => { - console.log(response, 1111333); - this.$modal.msgSuccess("淇敼鎴愬姛"); this.open = false; - this.getList(); + this.getListByXmId(); }); } else { addAdvicerules(this.form).then((response) => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; - this.getList(); + this.getListByXmId(); }); } } @@ -924,16 +952,11 @@ </script> <style scoped> .scrollable-container { - width: 260px; - /* 璁剧疆瀹瑰櫒鐨勫搴� */ - height: 629px; - /* 璁剧疆瀹瑰櫒鐨勯珮搴� */ + width: 200px; + height: 520px; overflow: auto; - /* 鍏佽鍐呭婧㈠嚭鏃舵樉绀烘粴鍔ㄦ潯 */ border: 1px solid #ccc; - /* 鍙�夛細娣诲姞杈规浠ユ洿濂藉湴鏄剧ず瀹瑰櫒 */ position: relative; - /* 鍙�夛細浣垮鍣ㄥ唴鐨勭粷瀵瑰畾浣嶅厓绱犺兘澶熸纭樉绀� */ } .content { @@ -942,4 +965,13 @@ height: 1000px; /* 璁剧疆鍐呭鐨勯珮搴︼紝浠ヨЕ鍙戝瀭鐩存粴鍔ㄦ潯 */ } +.pag { + width: 100%; + display: flex; + justify-content: center; +} + +.pag1 { + width: 65%; +} </style> -- Gitblit v1.8.0