|
@@ -0,0 +1,121 @@
|
|
|
+<template>
|
|
|
+ <div class="cmain">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent>
|
|
|
+ <el-form-item label="创建日期">
|
|
|
+ <el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :clearable="false"></el-date-picker>
|
|
|
+ </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-button style="float: right" type="primary" icon="el-icon-plus" :disabled="ids.length > 0" @click="op('add')" v-hasPermi="['work:record:add', 'work:up:add']">{{ queryParams.type == 0 ? '新增提醒' : '新增回访' }}</el-button>
|
|
|
+ <el-button style="float: right" type="primary" icon="el-icon-download" @click="handleExport" v-hasPermi="['work:record:export', 'work:up:add']" v-if="queryParams.type == 1">导出</el-button>
|
|
|
+ </el-form>
|
|
|
+ <el-table :data="response.rows" border>
|
|
|
+ <el-table-column label="模板名称" 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="queryParams.type == 0 ? '提醒状态' : '随访状态'" align="center" prop="state" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="queryParams.type == 0">
|
|
|
+ <el-tag type="danger" v-if="scope.row.state == 0">待查看</el-tag>
|
|
|
+ <el-tag type="success" v-if="scope.row.state == 1">已阅</el-tag>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <el-tag type="danger" v-if="scope.row.state == 0">待回访</el-tag>
|
|
|
+ <el-tag type="success" v-if="scope.row.state == 1">已回访</el-tag>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="queryParams.type == 0 ? '查看时间' : '随访时间'" align="center" prop="returnTime" width="160" />
|
|
|
+ <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="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('edit', scope.row)" v-hasPermi="['work:record:edit', 'work:up:edit']" v-if="scope.row.state != 1">编辑</el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:record:remove', 'work:up:remove']" v-if="scope.row.state != 1">删除</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 edit from './edit';
|
|
|
+import detail from './detail';
|
|
|
+import recycle from './recycle';
|
|
|
+export default {
|
|
|
+ name: 'Record',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dateRange: [],
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ state: null,
|
|
|
+ delFlag: 0,
|
|
|
+ orderByColumn: 'k.id', //排序字段
|
|
|
+ isAsc: 'desc' //排序方式
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.queryParams.type = this.param.type;
|
|
|
+ this.queryParams.patientId = this.param.patientId;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList() {
|
|
|
+ if (this.dateRange) {
|
|
|
+ this.queryParams.dateBegin = this.dateRange[0];
|
|
|
+ this.queryParams.dateEnd = this.dateRange[1];
|
|
|
+ }
|
|
|
+ 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.dateRange = [];
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ op(tag, row) {
|
|
|
+ if (tag == 'add') {
|
|
|
+ this.iframe({ obj: edit, param: { type: this.queryParams.type }, title: this.queryParams.type == 0 ? '新增提醒' : '新增回访', width: '57%', height: '85%' });
|
|
|
+ }
|
|
|
+ if (tag == 'edit') {
|
|
|
+ this.iframe({ obj: edit, param: { id: row.id, type: this.queryParams.type, patientName: row.patientName }, title: '编辑', width: '57%', height: '85%' });
|
|
|
+ }
|
|
|
+ if (tag == 'detail') {
|
|
|
+ this.iframe({ obj: detail, param: { id: row.id, detail: true, patientName: row.patientName }, title: '查看详情', width: '35%', height: '85%' });
|
|
|
+ }
|
|
|
+ if (tag == 'recycle') {
|
|
|
+ this.iframe({ obj: recycle, param: { type: this.queryParams.type }, title: '回收站', width: '75%', height: '85%' });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ del(row) {
|
|
|
+ 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: 1 } }).then((response) => {
|
|
|
+ this.$modal.msgSuccess('删除成功');
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ this.download('/work/record/export', { ...this.queryParams }, '随访信息.xlsx');
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|