|
@@ -2,7 +2,6 @@
|
|
|
<div>
|
|
|
<crumbs title="医院管理" linkTo="MedicalTermCDSS" style="min-width: 1300px">
|
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
|
-
|
|
|
<el-form-item label="医院名称:" class="selectMedicine">
|
|
|
<el-select size="mini" v-model="filter.hospitalName" placeholder="请选择" clearable>
|
|
|
<el-option
|
|
@@ -28,10 +27,33 @@
|
|
|
<el-table-column :resizable="false" prop="spell" label="医院名称拼音" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column :resizable="false" prop="address" label="医院地址" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column :resizable="false" prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ :resizable="false"
|
|
|
+ prop="status"
|
|
|
+ label="状态"
|
|
|
+ show-overflow-tooltip
|
|
|
+ width="180"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">{{scope.row.status == 1 ? '已启用': '已禁用'}}</template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column :resizable="false" prop="operate" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
|
|
|
<span style="margin:0 3px;">|</span>
|
|
|
+ <el-button
|
|
|
+ @click="startOrEndHos(scope.row,'start')"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ v-if="scope.row.status === 0"
|
|
|
+ >启用</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="startOrEndHos(scope.row,'end')"
|
|
|
+ class="delete"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ v-if="scope.row.status === 1"
|
|
|
+ >禁用</el-button>
|
|
|
+ <span style="margin:0 3px;">|</span>
|
|
|
<el-button @click="showDelDialog(scope.row)" class="delete" type="text" size="small">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -113,6 +135,43 @@ export default {
|
|
|
this.getDataList();
|
|
|
},
|
|
|
|
|
|
+ // 启用/禁用医院
|
|
|
+ startOrEndHos(row, type) {
|
|
|
+ let msg = '';
|
|
|
+ let status = 1;
|
|
|
+ if (type === 'start') {
|
|
|
+ msg = `确定要启用${row.name}吗?`;
|
|
|
+ status = 1;
|
|
|
+ } else {
|
|
|
+ msg = `确定要禁用用${row.name}吗?`;
|
|
|
+ status = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$alert(msg, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ api
|
|
|
+ .changeStatusCDSS({
|
|
|
+ id: row.id,
|
|
|
+ status: status
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code === '0') {
|
|
|
+ this.getDataList();
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '保存成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 1000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+
|
|
|
// 获取列表数据
|
|
|
getDataList(isTurnPage) {
|
|
|
const params = this.getFilterItems(isTurnPage);
|