|
@@ -2,19 +2,13 @@
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent>
|
|
|
<el-form-item label="问题模板id" prop="templateId">
|
|
|
- <el-input v-model="queryParams.templateId" placeholder="请输入问题模板id" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
+ <el-input v-model="queryParams.templateId" placeholder="请输入问题模板id" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="患者id" prop="userId">
|
|
|
- <el-input v-model="queryParams.userId" placeholder="请输入患者id" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
+ <el-input v-model="queryParams.userId" placeholder="请输入患者id" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="状态" prop="state">
|
|
|
- <el-input v-model="queryParams.state" placeholder="请输入状态" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="医生id" prop="doctorId">
|
|
|
- <el-input v-model="queryParams.doctorId" placeholder="请输入医生id" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="部门ID" prop="deptId">
|
|
|
- <el-input v-model="queryParams.deptId" placeholder="请输入部门ID" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
+ <el-input v-model="queryParams.state" 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>
|
|
@@ -22,9 +16,9 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <el-button type="primary" icon="el-icon-plus" :disabled="ids.length > 0" @click="op('add')" v-hasPermi="['work:record:add']">新增</el-button>
|
|
|
- <el-button type="success" icon="el-icon-edit" :disabled="ids.length != 1" @click="op('edit',ids)" v-hasPermi="['work:record:edit']">修改</el-button>
|
|
|
- <el-button type="danger" icon="el-icon-delete" :disabled="ids.length == 0" @click="del" v-hasPermi="['work:record:remove']">删除{{ids.length>0?'('+ids.length+')':''}}</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-plus" :disabled="ids.length > 0" @click="op('add')" v-hasPermi="['work:record:add']">新增</el-button>
|
|
|
+ <el-button type="success" icon="el-icon-edit" :disabled="ids.length != 1" @click="op('edit', ids)" v-hasPermi="['work:record:edit']">修改</el-button>
|
|
|
+ <el-button type="danger" icon="el-icon-delete" :disabled="ids.length == 0" @click="del" v-hasPermi="['work:record:remove']">删除{{ ids.length > 0 ? '(' + ids.length + ')' : '' }}</el-button>
|
|
|
</el-row>
|
|
|
|
|
|
<el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
|
|
@@ -37,34 +31,34 @@
|
|
|
<el-table-column label="部门ID" align="center" prop="deptId" />
|
|
|
<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="op('edit',scope.row)" v-hasPermi="['work:record:edit']">修改</el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit', scope.row)" v-hasPermi="['work:record:edit']">修改</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:record:remove']">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template slot="empty">
|
|
|
- <el-empty></el-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"/>
|
|
|
+ <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 edit from './edit';
|
|
|
export default {
|
|
|
- name: "Record",
|
|
|
+ name: 'Record',
|
|
|
data() {
|
|
|
return {
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- templateId: null,
|
|
|
- userId: null,
|
|
|
- state: null,
|
|
|
- doctorId: null,
|
|
|
- deptId: null,
|
|
|
- orderByColumn:'id', //排序字段
|
|
|
- isAsc: 'desc' //排序方式
|
|
|
+ templateId: null,
|
|
|
+ userId: null,
|
|
|
+ state: null,
|
|
|
+ doctorId: null,
|
|
|
+ deptId: null,
|
|
|
+ orderByColumn: 'id', //排序字段
|
|
|
+ isAsc: 'desc' //排序方式
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -73,8 +67,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
- this.ajax({ url: '/work/record/list', data: this.queryParams }).then(response => {
|
|
|
- this.response = response;
|
|
|
+ this.ajax({ url: '/work/record/list', data: this.queryParams }).then((response) => {
|
|
|
+ this.response = response;
|
|
|
});
|
|
|
},
|
|
|
handleQuery() {
|
|
@@ -82,28 +76,28 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
+ this.resetForm('queryForm');
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
selects(rows) {
|
|
|
- this.ids = rows.map(item => item.id)
|
|
|
+ this.ids = rows.map((item) => item.id);
|
|
|
},
|
|
|
op(tag, row) {
|
|
|
- if (tag == 'add') {
|
|
|
- this.iframe({ obj: edit, param: {}, title:'新增',width: '45%', height: '55%'});
|
|
|
- }
|
|
|
- if (tag == 'edit') {
|
|
|
- const id = row.id || this.ids[0];
|
|
|
- this.iframe({ obj: edit, param: {id: id}, title:'编辑',width: '50%', height: '50%'});
|
|
|
- }
|
|
|
+ if (tag == 'add') {
|
|
|
+ this.iframe({ obj: edit, param: {}, title: '新增', width: '45%', height: '55%' });
|
|
|
+ }
|
|
|
+ if (tag == 'edit') {
|
|
|
+ const id = row.id || this.ids[0];
|
|
|
+ this.iframe({ obj: edit, param: { id: id }, title: '编辑', width: '50%', height: '50%' });
|
|
|
+ }
|
|
|
},
|
|
|
del(row) {
|
|
|
- this.$confirm('是否确认删除选中数据?', '警告', { type: 'warning' }).then(() => {
|
|
|
- this.get({ url: '/work/record/remove/' + (row.id || this.ids) }).then(response => {
|
|
|
- this.$modal.msgSuccess('删除成功');
|
|
|
- this.getList();
|
|
|
- });
|
|
|
+ this.$confirm('是否确认删除选中数据?', '警告', { type: 'warning' }).then(() => {
|
|
|
+ this.get({ url: '/work/record/remove/' + (row.id || this.ids) }).then((response) => {
|
|
|
+ this.$modal.msgSuccess('删除成功');
|
|
|
+ this.getList();
|
|
|
});
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|