|
@@ -22,7 +22,7 @@
|
|
<div class="contents">
|
|
<div class="contents">
|
|
<el-table :data="list" border style="width: 100%">
|
|
<el-table :data="list" border style="width: 100%">
|
|
<el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
|
|
<el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
|
|
- <el-table-column :resizable="false" prop="id" label="医院ID"></el-table-column>
|
|
|
|
|
|
+ <el-table-column :resizable="false" prop="id" label="医院ID"></el-table-column>
|
|
<el-table-column :resizable="false" prop="name" label="医院名称" show-overflow-tooltip></el-table-column>
|
|
<el-table-column :resizable="false" prop="name" label="医院名称" show-overflow-tooltip></el-table-column>
|
|
<el-table-column :resizable="false" prop="spell" label="医院名称拼音" show-overflow-tooltip></el-table-column>
|
|
<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="address" label="医院地址" show-overflow-tooltip></el-table-column>
|
|
@@ -40,7 +40,13 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
|
|
<el-button @click="modifyRelation(scope.row)" type="text" size="small">修改</el-button>
|
|
<span style="margin:0 3px;">|</span>
|
|
<span style="margin:0 3px;">|</span>
|
|
- <el-button @click="resetFildF(scope.row)" v-if="scope.row.id !== -1" :style="scope.row.id !== -1? 'color: #48c5d7;' : 'color: #bfbfbf;'" type="text" size="small">方案重置</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ @click="resetFildF(scope.row)"
|
|
|
|
+ v-if="scope.row.id !== -1"
|
|
|
|
+ :style="scope.row.id !== -1? 'color: #48c5d7;' : 'color: #bfbfbf;'"
|
|
|
|
+ type="text"
|
|
|
|
+ size="small"
|
|
|
|
+ >方案重置</el-button>
|
|
<el-button type="text" size="small" v-else disabled>方案重置</el-button>
|
|
<el-button type="text" size="small" v-else disabled>方案重置</el-button>
|
|
<span style="margin:0 3px;">|</span>
|
|
<span style="margin:0 3px;">|</span>
|
|
<el-button
|
|
<el-button
|
|
@@ -78,18 +84,18 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import api from '@api/cdss.js';
|
|
|
|
-import config from '@api/config.js';
|
|
|
|
-import utils from '@api/utils.js';
|
|
|
|
|
|
+import api from "@api/cdss.js";
|
|
|
|
+import config from "@api/config.js";
|
|
|
|
+import utils from "@api/utils.js";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: 'HospitalCDSS',
|
|
|
|
|
|
+ name: "HospitalCDSS",
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
list: [],
|
|
list: [],
|
|
searched: false,
|
|
searched: false,
|
|
filter: {
|
|
filter: {
|
|
- hospitalName: '' // 医院名称
|
|
|
|
|
|
+ hospitalName: "" // 医院名称
|
|
},
|
|
},
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
pageSize: config.pageSize,
|
|
pageSize: config.pageSize,
|
|
@@ -140,9 +146,9 @@ export default {
|
|
|
|
|
|
// 启用/禁用医院
|
|
// 启用/禁用医院
|
|
startOrEndHos(row, type) {
|
|
startOrEndHos(row, type) {
|
|
- let msg = '';
|
|
|
|
|
|
+ let msg = "";
|
|
let status = 1;
|
|
let status = 1;
|
|
- if (type === 'start') {
|
|
|
|
|
|
+ if (type === "start") {
|
|
msg = `确定要启用${row.name}吗?`;
|
|
msg = `确定要启用${row.name}吗?`;
|
|
status = 1;
|
|
status = 1;
|
|
} else {
|
|
} else {
|
|
@@ -150,9 +156,9 @@ export default {
|
|
status = 0;
|
|
status = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- this.$alert(msg, '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- type: 'warning'
|
|
|
|
|
|
+ this.$alert(msg, "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ type: "warning"
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
api
|
|
api
|
|
@@ -161,12 +167,12 @@ export default {
|
|
status: status
|
|
status: status
|
|
})
|
|
})
|
|
.then(res => {
|
|
.then(res => {
|
|
- if (res.data.code === '0') {
|
|
|
|
|
|
+ if (res.data.code === "0") {
|
|
this.getDataList();
|
|
this.getDataList();
|
|
this.$message({
|
|
this.$message({
|
|
showClose: true,
|
|
showClose: true,
|
|
- message: '保存成功',
|
|
|
|
- type: 'success',
|
|
|
|
|
|
+ message: "保存成功",
|
|
|
|
+ type: "success",
|
|
duration: 1000
|
|
duration: 1000
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -181,13 +187,14 @@ export default {
|
|
this.searched = true;
|
|
this.searched = true;
|
|
const loading = this.$loading({
|
|
const loading = this.$loading({
|
|
lock: true,
|
|
lock: true,
|
|
- text: 'Loading',
|
|
|
|
- spinner: 'el-icon-loading',
|
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
|
+ text: "Loading",
|
|
|
|
+ spinner: "el-icon-loading",
|
|
|
|
+ background: "rgba(0, 0, 0, 0.7)"
|
|
});
|
|
});
|
|
api.getHospitalPageCDSS(params).then(res => {
|
|
api.getHospitalPageCDSS(params).then(res => {
|
|
loading.close();
|
|
loading.close();
|
|
- if (res.data.code === '0') {
|
|
|
|
|
|
+ console.log('数据列表???', res);
|
|
|
|
+ if (res.data.code === "0") {
|
|
this.list = res.data.data && res.data.data.records;
|
|
this.list = res.data.data && res.data.data.records;
|
|
}
|
|
}
|
|
this.total = res.data.data && res.data.data.total;
|
|
this.total = res.data.data && res.data.data.total;
|
|
@@ -216,7 +223,7 @@ export default {
|
|
// 获取医院下拉列表
|
|
// 获取医院下拉列表
|
|
_getHospitalInfo() {
|
|
_getHospitalInfo() {
|
|
api.getHospitalInfo().then(res => {
|
|
api.getHospitalInfo().then(res => {
|
|
- if (res.data.code === '0') {
|
|
|
|
|
|
+ if (res.data.code === "0") {
|
|
this.HospitalInfoList = res.data.data;
|
|
this.HospitalInfoList = res.data.data;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -235,7 +242,7 @@ export default {
|
|
}
|
|
}
|
|
: { currentPage: this.currentPage, pageSize: this.pageSize };
|
|
: { currentPage: this.currentPage, pageSize: this.pageSize };
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- name: 'AddHospitalCDSS',
|
|
|
|
|
|
+ name: "AddHospitalCDSS",
|
|
params: Object.assign(pam, {
|
|
params: Object.assign(pam, {
|
|
isEdit: false
|
|
isEdit: false
|
|
})
|
|
})
|
|
@@ -252,7 +259,7 @@ export default {
|
|
}
|
|
}
|
|
: { currentPage: this.currentPage, pageSize: this.pageSize };
|
|
: { currentPage: this.currentPage, pageSize: this.pageSize };
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- name: 'AddHospitalCDSS',
|
|
|
|
|
|
+ name: "AddHospitalCDSS",
|
|
params: Object.assign(pam, {
|
|
params: Object.assign(pam, {
|
|
isEdit: true,
|
|
isEdit: true,
|
|
data: { ...item }
|
|
data: { ...item }
|
|
@@ -267,7 +274,7 @@ export default {
|
|
// 清空搜索参数
|
|
// 清空搜索参数
|
|
clearFilter() {
|
|
clearFilter() {
|
|
this.filter = {
|
|
this.filter = {
|
|
- hospitalName: ''
|
|
|
|
|
|
+ hospitalName: ""
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -281,16 +288,16 @@ export default {
|
|
this.$message({
|
|
this.$message({
|
|
showClose: true,
|
|
showClose: true,
|
|
message: msg,
|
|
message: msg,
|
|
- type: type || 'warning'
|
|
|
|
|
|
+ type: type || "warning"
|
|
});
|
|
});
|
|
},
|
|
},
|
|
showConfirmDialog(msg, resolve) {
|
|
showConfirmDialog(msg, resolve) {
|
|
- this.$alert(msg, '提示', {
|
|
|
|
- confirmButtonText: '删除',
|
|
|
|
|
|
+ this.$alert(msg, "提示", {
|
|
|
|
+ confirmButtonText: "删除",
|
|
// cancelButtonText: '取消',
|
|
// cancelButtonText: '取消',
|
|
// cancelButtonClass: 'cancelBtn',
|
|
// cancelButtonClass: 'cancelBtn',
|
|
// confirmButtonClass: 'confirmC',
|
|
// confirmButtonClass: 'confirmC',
|
|
- type: 'warning'
|
|
|
|
|
|
+ type: "warning"
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
resolve();
|
|
resolve();
|
|
@@ -299,63 +306,69 @@ export default {
|
|
},
|
|
},
|
|
// 删除关联
|
|
// 删除关联
|
|
showDelDialog(row) {
|
|
showDelDialog(row) {
|
|
- // console.log(row); return
|
|
|
|
- this.showConfirmDialog(`医院删除后无法恢复,确定要删除${row.name}吗?`, () => {
|
|
|
|
- api
|
|
|
|
- .deleteHosRecordCDSS({ id: row.id })
|
|
|
|
- .then(res => {
|
|
|
|
- // console.log(res, '=============');
|
|
|
|
- if (res.data.code == '0') {
|
|
|
|
- if (!this.searched) {
|
|
|
|
- //未点确认时清空搜索条件
|
|
|
|
- this.clearFilter();
|
|
|
|
|
|
+ // console.log(row); return
|
|
|
|
+ this.showConfirmDialog(
|
|
|
|
+ `医院删除后无法恢复,确定要删除${row.name}吗?`,
|
|
|
|
+ () => {
|
|
|
|
+ api
|
|
|
|
+ .deleteHosRecordCDSS({ id: row.id })
|
|
|
|
+ .then(res => {
|
|
|
|
+ // console.log(res, '=============');
|
|
|
|
+ if (res.data.code == "0") {
|
|
|
|
+ if (!this.searched) {
|
|
|
|
+ //未点确认时清空搜索条件
|
|
|
|
+ this.clearFilter();
|
|
|
|
+ }
|
|
|
|
+ if (this.list.length == 1) {
|
|
|
|
+ //当前在最后一页且只有一条数据时,删除后跳到前一页
|
|
|
|
+ this.currentPage =
|
|
|
|
+ this.currentPage === 1 ? 1 : this.currentPage - 1;
|
|
|
|
+ }
|
|
|
|
+ this.getDataList();
|
|
|
|
+ this._getHospitalInfo(); // 更新下拉列表
|
|
|
|
+ this.warning(res.data.msg || "操作成功", "success");
|
|
|
|
+ } else {
|
|
|
|
+ this.warning(res.data.msg);
|
|
}
|
|
}
|
|
- if (this.list.length == 1) {
|
|
|
|
- //当前在最后一页且只有一条数据时,删除后跳到前一页
|
|
|
|
- this.currentPage =
|
|
|
|
- this.currentPage === 1 ? 1 : this.currentPage - 1;
|
|
|
|
|
|
+ })
|
|
|
|
+ .catch(error => {
|
|
|
|
+ if (error.code === "900010001") {
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
- this.getDataList();
|
|
|
|
- this._getHospitalInfo(); // 更新下拉列表
|
|
|
|
- this.warning(res.data.msg || '操作成功', 'success');
|
|
|
|
- } else {
|
|
|
|
- this.warning(res.data.msg);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- .catch(error => {
|
|
|
|
- if (error.code === '900010001') {
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- this.warning(error);
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+ this.warning(error);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
},
|
|
},
|
|
// 方案重置
|
|
// 方案重置
|
|
- resetFildF(row){
|
|
|
|
- this.$confirm(`此操作将重置${row.name}数据, 是否继续?`, '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- }).then(() => {
|
|
|
|
|
|
+ resetFildF(row) {
|
|
|
|
+ this.$confirm(`此操作将重置${row.name}数据, 是否继续?`, "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
api.getResetFildF({
|
|
api.getResetFildF({
|
|
- id: row.id
|
|
|
|
- })
|
|
|
|
- .then(res => {
|
|
|
|
- if(res.data.code === '0'){
|
|
|
|
- this.getDataList()
|
|
|
|
|
|
+ hospitalId: row.id
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log("重置数据", res);
|
|
|
|
+ const tokenStr = JSON.parse(localStorage.getItem("token"));
|
|
|
|
+ if (res.data.code === "0" && tokenStr) {
|
|
|
|
+ this.getDataList();
|
|
this.$message({
|
|
this.$message({
|
|
- showClose: true,
|
|
|
|
- message: '重置成功',
|
|
|
|
- type: 'success',
|
|
|
|
- duration: 1000
|
|
|
|
- });
|
|
|
|
|
|
+ showClose: true,
|
|
|
|
+ message: "重置成功",
|
|
|
|
+ type: "success",
|
|
|
|
+ duration: 1000
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- })
|
|
|
|
- }).catch(() => {
|
|
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
- type: 'info',
|
|
|
|
- message: '已取消重置'
|
|
|
|
- });
|
|
|
|
|
|
+ type: "info",
|
|
|
|
+ message: "已取消重置"
|
|
|
|
+ });
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -364,7 +377,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
-@import '../../../less/admin.less';
|
|
|
|
|
|
+@import "../../../less/admin.less";
|
|
.delete {
|
|
.delete {
|
|
color: red;
|
|
color: red;
|
|
}
|
|
}
|