From 6ca45612f4564a741c56c8179e594a72fa79dbc7 Mon Sep 17 00:00:00 2001 From: su1124 <1583764726@qq.com> Date: 星期三, 10 一月 2024 15:33:27 +0800 Subject: [PATCH] su --- src/views/hosp/inspection/index.vue | 30 ++++++++++++++++++++++++------ 1 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/views/hosp/inspection/index.vue b/src/views/hosp/inspection/index.vue index 1fd0b57..c24d5dc 100644 --- a/src/views/hosp/inspection/index.vue +++ b/src/views/hosp/inspection/index.vue @@ -2,7 +2,7 @@ <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label="浣撴鍙�" prop="tjNum"> - <el-input v-model="queryParams.tjNum" placeholder="璇疯緭鍏ヤ綋妫�鍙�" clearable @keyup.enter.native="handleQuery" /> + <el-input v-model="queryParams.tjNum" placeholder="璇疯緭鍏ヤ綋妫�鍙�" clearable @keyup.enter.native="handleQuery" ref="inputName" @blur="handleQuery" /> </el-form-item> <el-form-item label="瀹㈡埛濮撳悕" prop="cusName"> <el-input v-model="queryParams.cusName" placeholder="璇疯緭鍏ュ鎴峰鍚�" clearable @keyup.enter.native="handleQuery" /> @@ -23,13 +23,13 @@ <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> - <el-button type="primary" plain icon="el-icon-plus" size="mini" - v-hasPermi="['hosp:detail:add']">鎭㈠</el-button> + <el-button type="primary" plain size="mini" v-hasPermi="['hosp:detail:add']" + @click="handlerestore">鎭㈠</el-button> </el-col> </el-row> - <el-table v-loading="loading" :data="inspectionList" border> + <el-table v-loading="loading" :data="inspectionList" border @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="搴忓彿" align="center" prop="newID" width="55px" /> <el-table-column label="浣撴鍙�" align="center" prop="tjNum" :show-overflow-tooltip="true" /> @@ -66,7 +66,7 @@ <script> import { - listInspection + listInspection, recall } from "@/api/hosp/inspection"; export default { @@ -85,6 +85,7 @@ showSearch: true, // 鎬绘潯鏁� total: 0, + allList: [], // 寮冩琛ㄦ牸鏁版嵁 inspectionList: [], @@ -106,6 +107,11 @@ created() { this.getList(); }, + mounted() { + this.$nextTick(() => { + this.$refs.inputName.focus(); + }); + }, methods: { /** 鏌ヨ寮冩鍒楄〃 */ getList() { @@ -152,7 +158,19 @@ this.resetForm("queryForm"); this.handleQuery(); }, - + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.allList = selection + console.log(this.allList ) + }, + handlerestore() { + recall(this.allList).then(res => { + if(res.code == 200){ + this.$modal.msgSuccess("宸叉挙鍥炴垚鍔�"); + this.getList(); + } + }) + } } }; </script> -- Gitblit v1.8.0