From c70ffa07e49c0711b79156f00f80b1883d07450f Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期二, 15 四月 2025 10:44:35 +0800 Subject: [PATCH] 11 --- src/views/hosp/rules/index.vue | 434 ++++++++++++++++++++++++++++++------------------------ 1 files changed, 240 insertions(+), 194 deletions(-) diff --git a/src/views/hosp/rules/index.vue b/src/views/hosp/rules/index.vue index 7b40803..a0f3a50 100644 --- a/src/views/hosp/rules/index.vue +++ b/src/views/hosp/rules/index.vue @@ -184,165 +184,174 @@ ></right-toolbar> </el-row> - <el-table - border - v-loading="loading" - :data="rulesList" - @selection-change="handleSelectionChange" - > - <el-table-column type="selection" width="55" align="center" /> - <el-table-column - label="搴忓彿" - align="center" - prop="newID" - width="55" - /> - <!-- <el-table-column label="椤圭洰id" align="center" prop="proId" /> --> - <el-table-column - label="椤圭洰鍚�" - align="center" - prop="proName" - :show-overflow-tooltip="true" - /> - <el-table-column - label="瑙勫垯绫诲瀷" - align="center" - prop="ruleType" - :show-overflow-tooltip="true" + <div style="width: 100%;"> + <el-table + border + v-loading="loading" + :data="rulesList" + @selection-change="handleSelectionChange" + height="520" > - <template slot-scope="scope"> - <dict-tag - :options="dict.type.tj_rule_type" - :value="scope.row.ruleType" - /> - </template> - </el-table-column> - <el-table-column - label="瑙勫垯" - align="center" - prop="ruleStr" - :show-overflow-tooltip="true" - /> - <el-table-column - label="鐥呯" - align="center" - prop="bingzhong" - :show-overflow-tooltip="true" - /> - <el-table-column - label="鐥呯鎷奸煶" - align="center" - prop="bzPinyin" - :show-overflow-tooltip="true" - /> - <el-table-column - label="鎬у埆" - align="center" - prop="sex" - :show-overflow-tooltip="true" - > - <template slot-scope="scope"> - <dict-tag - :options="dict.type.tj_rule_sex" - :value="scope.row.sex" - /> - </template> - </el-table-column> - <el-table-column - label="骞撮緞-" - align="center" - prop="ageLt" - :show-overflow-tooltip="true" - /> - <el-table-column - label="骞撮緞+" - align="center" - prop="ageGt" - :show-overflow-tooltip="true" - /> - <el-table-column - label="瑙勫垯鑼冨洿-" - align="center" - prop="ruleLt" - :show-overflow-tooltip="true" - /> - <el-table-column - label="瑙勫垯鑼冨洿+" - align="center" - prop="ruleGt" - width="90" - :show-overflow-tooltip="true" - /> - <el-table-column - label="鏍囪瘑" - align="center" - prop="sign" - :show-overflow-tooltip="true" - /> - <el-table-column - label="绉瀬鎬�" - align="center" - prop="idPositive" - :show-overflow-tooltip="true" - /> - <el-table-column - label="鑼冨洿" - align="center" - prop="reference" - :show-overflow-tooltip="true" - /> - <el-table-column - label="浼樺厛绾�" - align="center" - prop="sort" - :show-overflow-tooltip="true" - /> - <el-table-column - label="灏忎簬鏍囪瘑" - align="center" - prop="lowSymbol" - :show-overflow-tooltip="true" - /> - <el-table-column - label="澶т簬鏍囪瘑" - align="center" - prop="heighSymbol" - :show-overflow-tooltip="true" - /> - <el-table-column - label="鎿嶄綔" - align="center" - class-name="small-padding fixed-width" - > - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - v-hasPermi="['hosp:rules:edit']" - title="淇敼" - > - </el-button> - <el-button - size="mini" - type="text" - icon="el-icon-tickets" - @click="handleDetail(scope.row)" - title="璇︽儏" - ></el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - v-hasPermi="['hosp:rules:remove']" - title="鍒犻櫎" - > - </el-button> - </template> - </el-table-column> - </el-table> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column + label="搴忓彿" + align="center" + prop="newID" + width="55" + /> + <!-- <el-table-column label="椤圭洰id" align="center" prop="proId" /> --> + <el-table-column + label="椤圭洰鍚�" + align="center" + prop="proName" + :show-overflow-tooltip="true" + /> + <el-table-column + label="瑙勫垯绫诲瀷" + align="center" + prop="ruleType" + :show-overflow-tooltip="true" + > + <template slot-scope="scope"> + <dict-tag + :options="dict.type.tj_rule_type" + :value="scope.row.ruleType" + /> + </template> + </el-table-column> + <el-table-column + label="瑙勫垯" + align="center" + prop="ruleStr" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鐥呯" + align="center" + prop="bingzhong" + :show-overflow-tooltip="true" + /> + <el-table-column + label="褰卞儚琛ㄧ幇" + align="center" + prop="yxbx" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鐥呯鎷奸煶" + align="center" + prop="bzPinyin" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鎬у埆" + align="center" + prop="sex" + :show-overflow-tooltip="true" + > + <template slot-scope="scope"> + <dict-tag + :options="dict.type.tj_rule_sex" + :value="scope.row.sex" + /> + </template> + </el-table-column> + <el-table-column + label="骞撮緞-" + align="center" + prop="ageLt" + :show-overflow-tooltip="true" + /> + <el-table-column + label="骞撮緞+" + align="center" + prop="ageGt" + :show-overflow-tooltip="true" + /> + <el-table-column + label="瑙勫垯鑼冨洿-" + align="center" + prop="ruleLt" + :show-overflow-tooltip="true" + /> + <el-table-column + label="瑙勫垯鑼冨洿+" + align="center" + prop="ruleGt" + width="90" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鏍囪瘑" + align="center" + prop="sign" + :show-overflow-tooltip="true" + /> + <el-table-column + label="绉瀬鎬�" + align="center" + prop="idPositive" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鑼冨洿" + align="center" + prop="reference" + :show-overflow-tooltip="true" + /> + <el-table-column + label="浼樺厛绾�" + align="center" + prop="sort" + :show-overflow-tooltip="true" + /> + <el-table-column + label="灏忎簬鏍囪瘑" + align="center" + prop="lowSymbol" + :show-overflow-tooltip="true" + /> + <el-table-column + label="澶т簬鏍囪瘑" + align="center" + prop="heighSymbol" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鎿嶄綔" + align="center" + class-name="small-padding fixed-width" + > + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-edit" + @click="handleUpdate(scope.row)" + v-hasPermi="['hosp:rules:edit']" + title="淇敼" + > + </el-button> + <el-button + size="mini" + type="text" + icon="el-icon-tickets" + @click="handleDetail(scope.row)" + title="璇︽儏" + ></el-button> + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="handleDelete(scope.row)" + v-hasPermi="['hosp:rules:remove']" + title="鍒犻櫎" + > + </el-button> + </template> + </el-table-column> + </el-table> + </div> <div class="pag"> <div class="pag1"> @@ -351,7 +360,7 @@ :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" - @pagination="getList" + @pagination="getListByXmId" /> </div> </div> @@ -411,20 +420,28 @@ ></el-option> </el-select> </el-form-item> - <el-form-item label="瑙勫垯" prop="ruleStr"> - <el-input - v-model="form.ruleStr" - placeholder="璇疯緭鍏ヨ鍒�" + <el-form-item label="鎬у埆" prop="sex"> + <el-select + v-model="form.sex" + placeholder="璇烽�夋嫨鎬у埆" style="width: 200px" - /> + > + <el-option + v-for="dict in dict.type.tj_rule_sex" + :key="dict.value" + :label="dict.label" + :value="dict.value" + ></el-option> + </el-select> </el-form-item> + <el-form-item label="鐥呯" prop="bingzhong"> <el-select :remote-method="getRemoteData1" v-model="form.bingzhong" remote filterable - style="width: 200px" + style="width: 490px" placeholder="璇烽�夋嫨鐥呯" clearable @change="idFn1" @@ -441,6 +458,7 @@ <!-- <el-form-item label="鐥呯鎷奸煶" prop="bzPinyin"> <el-input v-model="form.bzPinyin" placeholder="璇疯緭鍏ョ梾绉嶆嫾闊�" style="width:200px" /> </el-form-item> --> + <el-form-item label="鐤剧梾缂栫爜 " prop="icdCode"> <el-input v-model="form.icdCode" @@ -449,20 +467,7 @@ disabled /> </el-form-item> - <el-form-item label="鎬у埆" prop="sex"> - <el-select - v-model="form.sex" - placeholder="璇烽�夋嫨鎬у埆" - style="width: 200px" - > - <el-option - v-for="dict in dict.type.tj_rule_sex" - :key="dict.value" - :label="dict.label" - :value="dict.value" - ></el-option> - </el-select> - </el-form-item> + <el-form-item label="骞撮緞-" prop="ageLt"> <el-input v-model="form.ageLt" @@ -539,6 +544,33 @@ style="width: 200px" /> </el-form-item> + <el-form-item label="瑙勫垯琛ㄧ幇" prop="yxbx"> + <el-input + type="textarea" + :rows="3" + v-model="form.yxbx" + placeholder="璇疯緭鍏ヨ鍒欒〃鐜�" + style="width: 782px" + /> + </el-form-item> + <el-form-item label="瑙勫垯缁撹 " prop="ruleStr"> + <el-input + type="textarea" + :rows="3" + v-model="form.ruleStr" + placeholder="璇疯緭鍏ヨ鍒欑粨璁�" + style="width: 782px" + /> + </el-form-item> + <!-- <el-form-item label="褰卞儚琛ㄧ幇 " prop="yxbx"> + <el-input + v-model="form.yxbx" + placeholder="璇疯緭鍏ュ奖鍍忚〃鐜�" + style="width: 782px" + type="textarea" + :rows="3" + /> + </el-form-item> --> <el-form-item label="寤鸿鍚嶇О" prop="adviceBt"> <el-input v-model="form.adviceBt" @@ -547,6 +579,7 @@ > </el-input> </el-form-item> + <el-form-item label="寤鸿鍐呭" prop="adviceNr"> <span slot="label" @@ -1090,14 +1123,16 @@ getListByXmId() { this.loading = true; listRules(this.queryParams).then((response) => { - response.rows.forEach((item, index) => { + response.data.rows.forEach((item, index) => { item.newID = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + index + 1; }); - this.rulesList = response.rows; - this.total = response.total; + this.rulesList = response.data.rows; + console.log(this.rulesList, 999); + + this.total = response.data.total; this.loading = false; }); }, @@ -1111,7 +1146,12 @@ // 绛涢�夎妭鐐� filterNode(value, data) { if (!value) return true; - return data.label.indexOf(value) !== -1; + // return data.label.indexOf(value) !== -1; + return ( + data.label && + typeof data.label === "string" && + data.label.indexOf(value) !== -1 + ); }, // 鍙栨秷鎸夐挳 cancel() { @@ -1258,13 +1298,13 @@ this.$modal.msgSuccess("淇敼鎴愬姛"); this.open = false; - this.getList(); + this.getListByXmId(); }); } else { addRules(this.form).then((response) => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; - this.getList(); + this.getListByXmId(); }); } } @@ -1279,7 +1319,7 @@ return delRules(ids); }) .then(() => { - this.getList(); + this.getListByXmId(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); }) .catch(() => {}); @@ -1299,18 +1339,24 @@ } .scrollable-container { - width: 260px; /* 璁剧疆瀹瑰櫒鐨勫搴� */ - height: 629px; /* 璁剧疆瀹瑰櫒鐨勯珮搴� */ - overflow: auto; /* 鍏佽鍐呭婧㈠嚭鏃舵樉绀烘粴鍔ㄦ潯 */ - border: 1px solid #ccc; /* 鍙�夛細娣诲姞杈规浠ユ洿濂藉湴鏄剧ず瀹瑰櫒 */ - position: relative; /* 鍙�夛細浣垮鍣ㄥ唴鐨勭粷瀵瑰畾浣嶅厓绱犺兘澶熸纭樉绀� */ + width: 260px; + /* 璁剧疆瀹瑰櫒鐨勫搴� */ + height: 629px; + /* 璁剧疆瀹瑰櫒鐨勯珮搴� */ + overflow: auto; + /* 鍏佽鍐呭婧㈠嚭鏃舵樉绀烘粴鍔ㄦ潯 */ + border: 1px solid #ccc; + /* 鍙�夛細娣诲姞杈规浠ユ洿濂藉湴鏄剧ず瀹瑰櫒 */ + position: relative; + /* 鍙�夛細浣垮鍣ㄥ唴鐨勭粷瀵瑰畾浣嶅厓绱犺兘澶熸纭樉绀� */ } .content { - width: 1000px; /* 璁剧疆鍐呭鐨勫搴︼紝浠ヨЕ鍙戞按骞虫粴鍔ㄦ潯 */ - height: 1000px; /* 璁剧疆鍐呭鐨勯珮搴︼紝浠ヨЕ鍙戝瀭鐩存粴鍔ㄦ潯 */ + width: 1000px; + /* 璁剧疆鍐呭鐨勫搴︼紝浠ヨЕ鍙戞按骞虫粴鍔ㄦ潯 */ + height: 1000px; + /* 璁剧疆鍐呭鐨勯珮搴︼紝浠ヨЕ鍙戝瀭鐩存粴鍔ㄦ潯 */ } - /* .guding { position: fixed; -- Gitblit v1.8.0