From 51123d5ad145745f855280783c01cc2906b693d0 Mon Sep 17 00:00:00 2001 From: su1124 <1583764726@qq.com> Date: 星期三, 24 一月 2024 18:00:20 +0800 Subject: [PATCH] su --- src/views/hosp/hzlog/index.vue | 804 ++++++++++++++++++++++++++++++-------------------------- 1 files changed, 431 insertions(+), 373 deletions(-) diff --git a/src/views/hosp/hzlog/index.vue b/src/views/hosp/hzlog/index.vue index 2c4573b..afb809f 100644 --- a/src/views/hosp/hzlog/index.vue +++ b/src/views/hosp/hzlog/index.vue @@ -1,19 +1,46 @@ <template> - <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="tjNumber"> - <el-input ref="inputName" v-model="queryParams.tjNumber" placeholder="璇疯緭鍏ヤ綋妫�鍙�" clearable @keyup.enter.native="handleQuery" @blur="handleQuery" /> - </el-form-item> - <el-form-item label="鐢ㄦ埛鍚�" prop="userName"> - <el-input v-model="queryParams.userName" placeholder="璇疯緭鍏ョ敤鎴峰悕" clearable @keyup.enter.native="handleQuery" /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> + <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="tjNumber"> + <el-input + ref="inputName" + v-model="queryParams.tjNumber" + placeholder="璇疯緭鍏ヤ綋妫�鍙�" + clearable + @keyup.enter.native="handleQuery" + @blur="hb" + /> + </el-form-item> + <el-form-item label="鐢ㄦ埛鍚�" prop="userName"> + <el-input + v-model="queryParams.userName" + placeholder="璇疯緭鍏ョ敤鎴峰悕" + clearable + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="mini" + @click="handleQuery" + >鎼滅储</el-button + > + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" + >閲嶇疆</el-button + > + </el-form-item> + </el-form> - <!-- <el-row :gutter="10" class="mb8"> + <!-- <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['hosp:hzlog:add']">鏂板 @@ -37,56 +64,84 @@ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> --> - <el-table v-loading="loading" :data="hzlogList" @selection-change="handleSelectionChange" border> - <el-table-column type="selection" width="55" align="center" /> - <!-- <el-table-column label="浼氳瘖id" align="center" prop="id" /> --> - <!-- <el-table-column label="浼氳瘖璁㈠崟" align="center" prop="orderId" /> --> - <!-- <el-table-column label="鐢ㄦ埛" align="center" prop="userId" /> --> - <el-table-column label="浣撴鍙�" align="center" prop="tjNumber" /> - <el-table-column label="鐢ㄦ埛鍚�" align="center" prop="userName" /> - <el-table-column label="浼氳瘖绫诲瀷" align="center" prop="hzType"> - <template slot-scope="scope"> - <span v-if="scope.row.hzType == '0'">鍏ㄩ櫌浼氳瘖</span> - <span v-if="scope.row.hzType == '1'">绉戝浼氳瘖</span> - - </template> - </el-table-column> - <!-- 0鍏ㄩ櫌浼氳瘖1绉戝浼氳瘖 --> - <el-table-column label="浼氳瘖绉戝" align="center" prop="hzDeptName" /> - <!-- <el-table-column label="浼氳瘖鐢宠浜�" align="center" prop="hzDoctorId" /> --> - <el-table-column label="浼氳瘖鐢宠浜�" align="center" prop="hzDoctorName" /> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button size="mini" type="text" @click="handleUpdate(scope.row)" - v-hasPermi="['hosp:hzlog:edit']">鏌ョ湅鍥炲 - </el-button> - <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" + <el-table + v-loading="loading" + :data="hzlogList" + @selection-change="handleSelectionChange" + border + > + <el-table-column type="selection" width="55" align="center" /> + <!-- <el-table-column label="浼氳瘖id" align="center" prop="id" /> --> + <!-- <el-table-column label="浼氳瘖璁㈠崟" align="center" prop="orderId" /> --> + <!-- <el-table-column label="鐢ㄦ埛" align="center" prop="userId" /> --> + <el-table-column label="浣撴鍙�" align="center" prop="tjNumber" /> + <el-table-column label="鐢ㄦ埛鍚�" align="center" prop="userName" /> + <el-table-column label="浼氳瘖绫诲瀷" align="center" prop="hzType"> + <template slot-scope="scope"> + <dict-tag + :options="dict.type.hz_type" + :value="scope.row.hzType" + /> + </template> + </el-table-column> + <!-- 0鍏ㄩ櫌浼氳瘖1绉戝浼氳瘖 --> + <el-table-column label="浼氳瘖绉戝" align="center" prop="hzDeptName" /> + <!-- <el-table-column label="浼氳瘖鐢宠浜�" align="center" prop="hzDoctorId" /> --> + <el-table-column label="浼氳瘖鐢宠浜�" align="center" prop="hzDoctorName" /> + <el-table-column + label="鎿嶄綔" + align="center" + class-name="small-padding fixed-width" + > + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + @click="handleUpdate(scope.row)" + v-hasPermi="['hosp:hzlog:edit']" + >鏌ョ湅鍥炲 + </el-button> + <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['hosp:hzlog:remove']">鍒犻櫎 </el-button> --> - </template> - </el-table-column> - </el-table> + </template> + </el-table-column> + </el-table> - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" - @pagination="getList" /> + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> - <el-drawer title="浼氳瘖鍥炲璁板綍" :visible.sync="drawer" :before-close="handleClose" > - <div class="block"> - <el-timeline > - <el-timeline-item v-for="(item,index) in hzReplyLogsList" :key="index" :timestamp=item.createTime placement="top"> - <el-card> - <h2>绉戝锛歿{ item.replyDeptName}}</h2> - <h3>鍥炲鍐呭锛歿{ item.replyContent}}</h3> - <p>{{ item.replyDoctorName}} 鎻愪氦浜� {{item.createTime}}</p> - </el-card> - </el-timeline-item> - </el-timeline> - </div> - </el-drawer> + <el-drawer + title="浼氳瘖鍥炲璁板綍" + :visible.sync="drawer" + :before-close="handleClose" + > + <div class="block"> + <el-timeline> + <el-timeline-item + v-for="(item, index) in hzReplyLogsList" + :key="index" + :timestamp="item.createTime" + placement="top" + > + <el-card> + <h2>绉戝锛歿{ item.replyDeptName }}</h2> + <h3>鍥炲鍐呭锛歿{ item.replyContent }}</h3> + <p>{{ item.replyDoctorName }} 鎻愪氦浜� {{ item.createTime }}</p> + </el-card> + </el-timeline-item> + </el-timeline> + </div> + </el-drawer> - <!-- 娣诲姞鎴栦慨鏀逛細璇婄敵璇疯褰� + <!-- 娣诲姞鎴栦慨鏀逛細璇婄敵璇疯褰� 瀵硅瘽妗� --> - <!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> + <!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="浼氳瘖璁㈠崟id" prop="orderId"> <el-input v-model="form.orderId" placeholder="璇疯緭鍏ヤ細璇婅鍗昳d" /> @@ -115,331 +170,334 @@ <el-button @click="cancel">鍙� 娑�</el-button> </div> </el-dialog> --> - </div> + </div> </template> <script> import { - listHzlog, - getHzlog, - delHzlog, - addHzlog, - updateHzlog + listHzlog, + getHzlog, + delHzlog, + addHzlog, + updateHzlog, } from "@/api/hosp/hzlog"; export default { - name: "Hzlog", - data() { - return { - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // 浼氳瘖鐢宠璁板綍 - // 琛ㄦ牸鏁版嵁 - hzlogList: [], - hzReplyLogsList:[], - drawer: false, - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - tjNumber: null, - userName: null, - hzType: null, - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - // 琛ㄥ崟鏍¢獙 - rules: { - } - }; - }, - created() { - this.getList(); - }, - mounted() { + name: "Hzlog", + dicts: ["hz_type"], + data() { + return { + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 浼氳瘖鐢宠璁板綍 + // 琛ㄦ牸鏁版嵁 + hzlogList: [], + hzReplyLogsList: [], + drawer: false, + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + tjNumber: null, + userName: null, + hzType: null, + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: {}, + }; + }, + created() { + this.getList(); + }, + mounted() { this.$nextTick(() => { this.$refs.inputName.focus(); }); }, - methods: { - /** 鏌ヨ浼氳瘖鐢宠璁板綍 + methods: { + /** 鏌ヨ浼氳瘖鐢宠璁板綍 鍒楄〃 */ - getList() { - this.loading = true; - listHzlog(this.queryParams).then(response => { - this.hzlogList = response.rows; - this.total = response.total; - this.loading = false; - }); - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); - }, - handleClose() { - this.drawer = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - id: null, - orderId: null, - userId: null, - tjNumber: null, - userName: null, - hzType: null, - hzDeptId: null, - createTime: null, - updateTime: null, - createBy: null, - updateBy: null, - deleted: null, - hzDoctorId: null, - hzDoctorName: null - }; - this.resetForm("form"); - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - this.single = selection.length !== 1 - this.multiple = !selection.length - }, - handleUpdate(row) { - this.reset(); - this.drawer = true; - this.hzReplyLogsList = row.hzReplyLogsList - - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - // handleAdd() { - // this.reset(); - // this.open = true; - // this.title = "娣诲姞浼氳瘖鐢宠璁板綍 - // "; - // }, - // /** 淇敼鎸夐挳鎿嶄綔 */ - // handleUpdate(row) { - // this.reset(); - // const id = row.id || this.ids - // getHzlog(id).then(response => { - // this.form = response.data; - // this.open = true; - // this.title = "淇敼浼氳瘖鐢宠璁板綍 - // "; - // }); - // }, - /** 鎻愪氦鎸夐挳 */ - // submitForm() { - // this.$]] - // #refs["form"].validate(valid => { - // if (valid) { - // #foreach($column in $columns) - // #if($column.htmlType == "checkbox") - // this.form.$column.javaField = this.form.$ - // { - // column.javaField - // } - // . - // join(","); - // #end - // #end - // #if($table.sub) - // this.form.$ - // { - // subclassName - // } - // List = this.$ - // { - // subclassName - // } - // List; - // #end - // if (this.form.${ - // pkColumn.javaField - // } - // != - // null - // ) - // { - // update$ - // { - // BusinessName - // } - // (this.form).then(response => { - // this.#[[$modal]] - // #.msgSuccess("淇敼鎴愬姛"); - // this.open = false; - // this.getList(); - // }); - // } - // else - // { - // add$ - // { - // BusinessName - // } - // (this.form).then(response => { - // this.#[[$modal]] - // #.msgSuccess("鏂板鎴愬姛"); - // this.open = false; - // this.getList(); - // }); - // } - // } - // }); - // }, - // /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - // handleDelete(row) { - // const ${ pkColumn.javaField }s = row.$ - // { - // pkColumn.javaField - // } - // || - // this.ids; - // this.#[[$modal]] - // #.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + ${ pkColumn.javaField }s + '"鐨勬暟鎹」锛�').then(function () { - // return del$ - // { - // BusinessName - // } - // (${ pkColumn.javaField }s); - // }).then(() => { - // this.getList(); - // this.#[[$modal]] - // #.msgSuccess("鍒犻櫎鎴愬姛"); - // }).catch(() => { - // }); - // }, - // #if($table.sub) - // /** ${subTable.functionName}搴忓彿 */ - // row$ - // { - // subClassName - // } - // Index({ row, rowIndex }) - // { - // row.index = rowIndex + 1; - // } - // , - // /** ${subTable.functionName}娣诲姞鎸夐挳鎿嶄綔 */ - // handleAdd$ - // { - // subClassName - // } - // () - // { - // let obj = {}; - // #foreach($column in $subTable.columns) - // #if($column.pk || $column.javaField == ${ subTableFkclassName }) - // #elseif($column.list && "" != $javaField) - // obj.$column.javaField = ""; - // #end - // #end - // this.$ - // { - // subclassName - // } - // List.push(obj); - // } - // , - // /** ${subTable.functionName}鍒犻櫎鎸夐挳鎿嶄綔 */ - // handleDelete$ - // { - // subClassName - // } - // () - // { - // if (this.checked${ - // subClassName - // } - // . - // length == 0 - // ) - // { - // this.#[[$modal]] - // #.msgError("璇峰厛閫夋嫨瑕佸垹闄ょ殑${subTable.functionName}鏁版嵁"); - // } - // else - // { - // const ${ subclassName }List = this.$ - // { - // subclassName - // } - // List; - // const checked$ - // { - // subClassName - // } - // = this.checked$ - // { - // subClassName - // } - // ; - // this.$ - // { - // subclassName - // } - // List = ${ subclassName } List.filter(function (item) { - // return checked$ - // { - // subClassName - // } - // . - // indexOf(item.index) == -1 - // }); - // } - // } - // , - // /** 澶嶉�夋閫変腑鏁版嵁 */ - // handle$ - // { - // subClassName - // } - // SelectionChange(selection) - // { - // this.checked$ - // { - // subClassName - // } - // = selection.map(item => item.index) - // } - // , - // #end - // /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - // handleExport() - // { - // this.download('${moduleName}/${businessName}/export', { - // ...this.queryParams - // }, `${businessName}_#[[${new Date().getTime()}.xlsx`) - // } - } -} - ; + getList() { + this.loading = true; + listHzlog(this.queryParams).then((response) => { + this.hzlogList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + handleClose() { + this.drawer = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + orderId: null, + userId: null, + tjNumber: null, + userName: null, + hzType: null, + hzDeptId: null, + createTime: null, + updateTime: null, + createBy: null, + updateBy: null, + deleted: null, + hzDoctorId: null, + hzDoctorName: null, + }; + this.resetForm("form"); + }, + hb() { + if (this.queryParams.tjNumber != null) { + this.handleQuery(); + } + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.resetForm("queryForm"); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.id); + this.single = selection.length !== 1; + this.multiple = !selection.length; + }, + handleUpdate(row) { + this.reset(); + this.drawer = true; + this.hzReplyLogsList = row.hzReplyLogsList; + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + // handleAdd() { + // this.reset(); + // this.open = true; + // this.title = "娣诲姞浼氳瘖鐢宠璁板綍 + // "; + // }, + // /** 淇敼鎸夐挳鎿嶄綔 */ + // handleUpdate(row) { + // this.reset(); + // const id = row.id || this.ids + // getHzlog(id).then(response => { + // this.form = response.data; + // this.open = true; + // this.title = "淇敼浼氳瘖鐢宠璁板綍 + // "; + // }); + // }, + /** 鎻愪氦鎸夐挳 */ + // submitForm() { + // this.$]] + // #refs["form"].validate(valid => { + // if (valid) { + // #foreach($column in $columns) + // #if($column.htmlType == "checkbox") + // this.form.$column.javaField = this.form.$ + // { + // column.javaField + // } + // . + // join(","); + // #end + // #end + // #if($table.sub) + // this.form.$ + // { + // subclassName + // } + // List = this.$ + // { + // subclassName + // } + // List; + // #end + // if (this.form.${ + // pkColumn.javaField + // } + // != + // null + // ) + // { + // update$ + // { + // BusinessName + // } + // (this.form).then(response => { + // this.#[[$modal]] + // #.msgSuccess("淇敼鎴愬姛"); + // this.open = false; + // this.getList(); + // }); + // } + // else + // { + // add$ + // { + // BusinessName + // } + // (this.form).then(response => { + // this.#[[$modal]] + // #.msgSuccess("鏂板鎴愬姛"); + // this.open = false; + // this.getList(); + // }); + // } + // } + // }); + // }, + // /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + // handleDelete(row) { + // const ${ pkColumn.javaField }s = row.$ + // { + // pkColumn.javaField + // } + // || + // this.ids; + // this.#[[$modal]] + // #.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + ${ pkColumn.javaField }s + '"鐨勬暟鎹」锛�').then(function () { + // return del$ + // { + // BusinessName + // } + // (${ pkColumn.javaField }s); + // }).then(() => { + // this.getList(); + // this.#[[$modal]] + // #.msgSuccess("鍒犻櫎鎴愬姛"); + // }).catch(() => { + // }); + // }, + // #if($table.sub) + // /** ${subTable.functionName}搴忓彿 */ + // row$ + // { + // subClassName + // } + // Index({ row, rowIndex }) + // { + // row.index = rowIndex + 1; + // } + // , + // /** ${subTable.functionName}娣诲姞鎸夐挳鎿嶄綔 */ + // handleAdd$ + // { + // subClassName + // } + // () + // { + // let obj = {}; + // #foreach($column in $subTable.columns) + // #if($column.pk || $column.javaField == ${ subTableFkclassName }) + // #elseif($column.list && "" != $javaField) + // obj.$column.javaField = ""; + // #end + // #end + // this.$ + // { + // subclassName + // } + // List.push(obj); + // } + // , + // /** ${subTable.functionName}鍒犻櫎鎸夐挳鎿嶄綔 */ + // handleDelete$ + // { + // subClassName + // } + // () + // { + // if (this.checked${ + // subClassName + // } + // . + // length == 0 + // ) + // { + // this.#[[$modal]] + // #.msgError("璇峰厛閫夋嫨瑕佸垹闄ょ殑${subTable.functionName}鏁版嵁"); + // } + // else + // { + // const ${ subclassName }List = this.$ + // { + // subclassName + // } + // List; + // const checked$ + // { + // subClassName + // } + // = this.checked$ + // { + // subClassName + // } + // ; + // this.$ + // { + // subclassName + // } + // List = ${ subclassName } List.filter(function (item) { + // return checked$ + // { + // subClassName + // } + // . + // indexOf(item.index) == -1 + // }); + // } + // } + // , + // /** 澶嶉�夋閫変腑鏁版嵁 */ + // handle$ + // { + // subClassName + // } + // SelectionChange(selection) + // { + // this.checked$ + // { + // subClassName + // } + // = selection.map(item => item.index) + // } + // , + // #end + // /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + // handleExport() + // { + // this.download('${moduleName}/${businessName}/export', { + // ...this.queryParams + // }, `${businessName}_#[[${new Date().getTime()}.xlsx`) + // } + }, +}; </script> -- Gitblit v1.8.0