|
@@ -0,0 +1,109 @@
|
|
|
+<template>
|
|
|
+ <div class="cmain">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent>
|
|
|
+ <el-form-item label="科室" prop="deptId" v-if="user.roleName != '医生'">
|
|
|
+ <dtree v-model="queryParams.deptId" @handleQuery="handleQuery" :tree="false"></dtree>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="患者姓名" prop="patientName">
|
|
|
+ <el-input v-model="queryParams.patientName" placeholder="请输入患者姓名" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-button type="primary" icon="el-icon-success" :disabled="ids.length == 0" @click="op('revert')" v-hasPermi="['work:record:remove', 'work:up:remove']">还原{{ ids.length > 0 ? '(' + ids.length + ')' : '' }}</el-button>
|
|
|
+ <el-button type="danger" icon="el-icon-delete" :disabled="ids.length == 0" @click="del" v-hasPermi="['work:record:remove', 'work:up:remove']">删除{{ ids.length > 0 ? '(' + ids.length + ')' : '' }}</el-button>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column :label="queryParams.type == 0 ? '提醒标题' : '模板名称'" align="left" prop="templateName" />
|
|
|
+ <el-table-column label="患者姓名" align="center" prop="patientName" width="100" />
|
|
|
+ <el-table-column label="住院号" align="center" prop="blh" width="120" />
|
|
|
+ <el-table-column label="创建人" align="center" prop="createBy" width="120" />
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
|
|
|
+ <el-table-column label="删除时间" align="center" prop="updateTime" width="160" />
|
|
|
+ <el-table-column label="所属科室" align="center" prop="deptName" width="160" />
|
|
|
+ <el-table-column label="操作" align="center" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-view" @click="op('detail', scope.row)" v-hasPermi="['work:record:list', 'work:up:list']">查看</el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="op('revert', scope.row)" v-hasPermi="['work:record:edit', 'work:up:edit']">还原</el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:record:remove', 'work:up:remove']">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <template slot="empty">
|
|
|
+ <el-empty></el-empty>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ <pagination v-if="response.total > 0" :total="response.total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import detail from './detail';
|
|
|
+export default {
|
|
|
+ name: 'recycle',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ user: this.$store.state.user,
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ state: null,
|
|
|
+ deptId: null,
|
|
|
+ delFlag: 1,
|
|
|
+ patientName: null,
|
|
|
+ orderByColumn: 'k.id', //排序字段
|
|
|
+ isAsc: 'desc' //排序方式
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.queryParams.type = this.param.type;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList() {
|
|
|
+ this.ajax({ url: '/work/record/list', data: this.queryParams }).then((response) => {
|
|
|
+ this.response = response;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm('queryForm');
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ selects(rows) {
|
|
|
+ this.ids = rows.map((item) => item.id);
|
|
|
+ },
|
|
|
+ op(tag, row = {}) {
|
|
|
+ if (tag == 'detail') {
|
|
|
+ this.iframe({ obj: detail, param: { id: row.id, detail: true, patientName: row.patientName }, title: '查看详情', width: '35%', height: '85%' });
|
|
|
+ }
|
|
|
+ if (tag == 'revert') {
|
|
|
+ this.$confirm('是否确认还原选中数据?', '警告', { type: 'warning' }).then(() => {
|
|
|
+ let ids = row.id ? [row.id] : this.ids;
|
|
|
+ this.ajax({ method: 'post', url: '/work/record/removeOrRevertByIds', data: { ids: ids, op: 0 } }).then((response) => {
|
|
|
+ this.$modal.msgSuccess('还原成功');
|
|
|
+ this.getList();
|
|
|
+ this.$parent.getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ del(row) {
|
|
|
+ this.$confirm('是否确认删除选中数据? 删除后无法恢复', '警告', { type: 'warning' }).then(() => {
|
|
|
+ this.get({ url: '/work/record/remove/' + (row.id || this.ids) }).then((response) => {
|
|
|
+ this.$modal.msgSuccess('删除成功');
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|