|
@@ -22,7 +22,7 @@
|
|
</el-form>
|
|
</el-form>
|
|
</crumbs>
|
|
</crumbs>
|
|
<div class="contents">
|
|
<div class="contents">
|
|
- <el-table :data="list" border style="width: 100%">
|
|
|
|
|
|
+ <el-table :data="list" border style="width: 100%" ref="">
|
|
<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="hospitalId" label="医院ID" show-overflow-tooltip></el-table-column>
|
|
<el-table-column :resizable="false" prop="hospitalId" label="医院ID" show-overflow-tooltip></el-table-column>
|
|
<el-table-column :resizable="false" prop="hospitalName" label="医院名称" show-overflow-tooltip></el-table-column>
|
|
<el-table-column :resizable="false" prop="hospitalName" label="医院名称" show-overflow-tooltip></el-table-column>
|
|
@@ -56,15 +56,17 @@
|
|
v-if="scope.row.planStatus === 1"
|
|
v-if="scope.row.planStatus === 1"
|
|
class="disable"
|
|
class="disable"
|
|
>修改</el-button>
|
|
>修改</el-button>
|
|
- <el-button plain 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
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
- class="delete"
|
|
|
|
|
|
+ :class="scope.row.hospitalId===-1&&codeArr.includes(scope.row.planCode) ? 'active-t': 'delete'"
|
|
|
|
+ :disabled = 'scope.row.hospitalId===-1&&codeArr.includes(scope.row.planCode)'
|
|
@click="enableOrAble(scope.row,0)"
|
|
@click="enableOrAble(scope.row,0)"
|
|
v-if="scope.row.planStatus === 1"
|
|
v-if="scope.row.planStatus === 1"
|
|
>禁用</el-button>
|
|
>禁用</el-button>
|
|
|
|
+
|
|
<el-button type="text" size="small" @click="enableOrAble(scope.row,1)" v-else>启用</el-button>
|
|
<el-button type="text" size="small" @click="enableOrAble(scope.row,1)" v-else>启用</el-button>
|
|
<span style="margin:0 3px;">|</span>
|
|
<span style="margin:0 3px;">|</span>
|
|
<el-button
|
|
<el-button
|
|
@@ -74,7 +76,7 @@
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
>删除</el-button>
|
|
>删除</el-button>
|
|
- <el-button plain type="text" size="small" v-else disabled>删除</el-button>
|
|
|
|
|
|
+ <el-button type="text" size="small" v-else disabled>删除</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -95,33 +97,36 @@
|
|
</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: 'Plan',
|
|
|
|
|
|
+ name: "Plan",
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
list: [],
|
|
list: [],
|
|
searched: false,
|
|
searched: false,
|
|
filter: {
|
|
filter: {
|
|
- planName: '', //标准诊断名称
|
|
|
|
- hospitalId: ''
|
|
|
|
|
|
+ planName: "", //标准诊断名称
|
|
|
|
+ hospitalId: ""
|
|
},
|
|
},
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
pageSize: config.pageSize,
|
|
pageSize: config.pageSize,
|
|
pageSizeArr: config.pageSizeArr,
|
|
pageSizeArr: config.pageSizeArr,
|
|
pageLayout: config.pageLayout,
|
|
pageLayout: config.pageLayout,
|
|
total: 0,
|
|
total: 0,
|
|
- hospitalId: '',
|
|
|
|
- HospitalInfoList: []
|
|
|
|
|
|
+ hospitalId: "",
|
|
|
|
+ HospitalInfoList: [],
|
|
|
|
+ disablelist: [],
|
|
|
|
+ codeArr: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
|
|
+ created(row) {
|
|
const that = this;
|
|
const that = this;
|
|
//返回时避免参数未赋值就获取列表
|
|
//返回时避免参数未赋值就获取列表
|
|
setTimeout(function() {
|
|
setTimeout(function() {
|
|
|
|
+ that.getDisabel()
|
|
that.getDataList();
|
|
that.getDataList();
|
|
that._getHospitalInfo();
|
|
that._getHospitalInfo();
|
|
});
|
|
});
|
|
@@ -159,27 +164,46 @@ 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;
|
|
|
|
+ console.log("医院列表>>", this.HospitalInfoList);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 使plan_default禁用
|
|
|
|
+ async getDisabel(row){
|
|
|
|
+ const res = await api.getListBack()
|
|
|
|
+ if(res.data.code === '0'){
|
|
|
|
+ this.disablelist = res.data.data[60]
|
|
|
|
+ console.log('禁用2', this.codeArr);
|
|
|
|
+ this.codeArr = this.disablelist.map(item => {
|
|
|
|
+ return item.val
|
|
|
|
+ })
|
|
|
|
+ console.log('禁用2021', this.codeArr);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
async getDataList(isTurnPage) {
|
|
async getDataList(isTurnPage) {
|
|
|
|
+
|
|
let params = await this.getFilterItems(isTurnPage);
|
|
let params = await this.getFilterItems(isTurnPage);
|
|
// return;
|
|
// return;
|
|
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.getPlanInfoPages(params).then(res => {
|
|
api.getPlanInfoPages(params).then(res => {
|
|
|
|
+ console.log("列表数据", res);
|
|
loading.close();
|
|
loading.close();
|
|
- if (res.data.code === '0') {
|
|
|
|
|
|
+ if (res.data.code === "0") {
|
|
this.list = res.data.data && res.data.data.records;
|
|
this.list = res.data.data && res.data.data.records;
|
|
|
|
+ console.log("hello>>", this.list);
|
|
}
|
|
}
|
|
this.total = res.data.data && res.data.data.total;
|
|
this.total = res.data.data && res.data.data.total;
|
|
if (this.inCurrentPage !== undefined) {
|
|
if (this.inCurrentPage !== undefined) {
|
|
@@ -189,6 +213,8 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 返回字典信息数据
|
|
|
|
+
|
|
// 处理列表请求数据参数
|
|
// 处理列表请求数据参数
|
|
async getFilterItems(isTurnPage) {
|
|
async getFilterItems(isTurnPage) {
|
|
//翻页时筛选条件没点确定则清空
|
|
//翻页时筛选条件没点确定则清空
|
|
@@ -206,7 +232,7 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
escapeRegExp(text) {
|
|
escapeRegExp(text) {
|
|
- return text.replace(/[-[\]{}()*+?._,\\^$|#\s]/g, '\\$&');
|
|
|
|
|
|
+ return text.replace(/[-[\]{}()*+?._,\\^$|#\s]/g, "\\$&");
|
|
},
|
|
},
|
|
|
|
|
|
filterDatas() {
|
|
filterDatas() {
|
|
@@ -221,7 +247,7 @@ export default {
|
|
filter: this.filter
|
|
filter: this.filter
|
|
}
|
|
}
|
|
: { currentPage: this.currentPage, pageSize: this.pageSize };
|
|
: { currentPage: this.currentPage, pageSize: this.pageSize };
|
|
- this.$router.push({ name: 'AddPlan', params: pam });
|
|
|
|
|
|
+ this.$router.push({ name: "AddPlan", params: pam });
|
|
},
|
|
},
|
|
// 修改诊断关联-跳转至编辑页面
|
|
// 修改诊断关联-跳转至编辑页面
|
|
modifyRelation(row) {
|
|
modifyRelation(row) {
|
|
@@ -234,8 +260,8 @@ export default {
|
|
}
|
|
}
|
|
: { currentPage: this.currentPage, pageSize: this.pageSize };
|
|
: { currentPage: this.currentPage, pageSize: this.pageSize };
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- name: 'AddPlan',
|
|
|
|
- params: Object.assign(pam, { isEdit: true, data: item })
|
|
|
|
|
|
+ name: "AddPlan",
|
|
|
|
+ params: Object.assign(pam, { isEdit: true, data: item, needDisable: row.hospitalId===-1&&this.codeArr.includes(row.planCode)})
|
|
});
|
|
});
|
|
},
|
|
},
|
|
currentChange(next) {
|
|
currentChange(next) {
|
|
@@ -250,8 +276,8 @@ export default {
|
|
// 清空搜索参数
|
|
// 清空搜索参数
|
|
clearFilter() {
|
|
clearFilter() {
|
|
this.filter = {
|
|
this.filter = {
|
|
- hisName: '',
|
|
|
|
- planName: ''
|
|
|
|
|
|
+ hisName: "",
|
|
|
|
+ planName: ""
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -265,26 +291,26 @@ export default {
|
|
this.$message({
|
|
this.$message({
|
|
showClose: true,
|
|
showClose: true,
|
|
message: msg,
|
|
message: msg,
|
|
- type: type || 'warning'
|
|
|
|
|
|
+ type: type || "warning"
|
|
});
|
|
});
|
|
},
|
|
},
|
|
showConfirmDialog(msg, resolve, type) {
|
|
showConfirmDialog(msg, resolve, type) {
|
|
- let showInfo = '启用';
|
|
|
|
- let btnNameClass = 'confirmBtn2';
|
|
|
|
- if (type === 'Del') {
|
|
|
|
- showInfo = '禁用';
|
|
|
|
- btnNameClass = 'delBtn';
|
|
|
|
- } else if (type === 'Del1') {
|
|
|
|
- showInfo = '删除';
|
|
|
|
- btnNameClass = 'delBtn';
|
|
|
|
|
|
+ let showInfo = "启用";
|
|
|
|
+ let btnNameClass = "confirmBtn2";
|
|
|
|
+ if (type === "Del") {
|
|
|
|
+ showInfo = "禁用";
|
|
|
|
+ btnNameClass = "delBtn";
|
|
|
|
+ } else if (type === "Del1") {
|
|
|
|
+ showInfo = "删除";
|
|
|
|
+ btnNameClass = "delBtn";
|
|
}
|
|
}
|
|
|
|
|
|
- this.$alert(msg, '提示', {
|
|
|
|
|
|
+ this.$alert(msg, "提示", {
|
|
confirmButtonText: showInfo,
|
|
confirmButtonText: showInfo,
|
|
// cancelButtonText: '取消',
|
|
// cancelButtonText: '取消',
|
|
// cancelButtonClass: 'cancelBtn',
|
|
// cancelButtonClass: 'cancelBtn',
|
|
// confirmButtonClass: btnNameClass,
|
|
// confirmButtonClass: btnNameClass,
|
|
- type: 'warning'
|
|
|
|
|
|
+ type: "warning"
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
resolve();
|
|
resolve();
|
|
@@ -302,13 +328,13 @@ export default {
|
|
// 删除关联
|
|
// 删除关联
|
|
showDelDialog(id, status, info, row) {
|
|
showDelDialog(id, status, info, row) {
|
|
if (status === 1) {
|
|
if (status === 1) {
|
|
- this.$alert(`${info}正在启用中,无法删除。`, '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
|
|
+ this.$alert(`${info}正在启用中,无法删除。`, "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
// cancelButtonText: '取消',
|
|
// cancelButtonText: '取消',
|
|
// cancelButtonClass: 'cancelSureL',
|
|
// cancelButtonClass: 'cancelSureL',
|
|
// confirmButtonClass: 'sureL',
|
|
// confirmButtonClass: 'sureL',
|
|
// customClass: 'exportBoxL',
|
|
// customClass: 'exportBoxL',
|
|
- type: 'warning'
|
|
|
|
|
|
+ type: "warning"
|
|
})
|
|
})
|
|
.then(() => {})
|
|
.then(() => {})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
@@ -316,13 +342,13 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
if (id === -1) {
|
|
if (id === -1) {
|
|
- this.$alert(`该方案为默认方案,无法删除。`, '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
|
|
+ this.$alert(`该方案为默认方案,无法删除。`, "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
// cancelButtonText: '取消',
|
|
// cancelButtonText: '取消',
|
|
// cancelButtonClass: 'cancelSureL',
|
|
// cancelButtonClass: 'cancelSureL',
|
|
// confirmButtonClass: 'sureL',
|
|
// confirmButtonClass: 'sureL',
|
|
// customClass: 'exportBoxL',
|
|
// customClass: 'exportBoxL',
|
|
- type: 'warning'
|
|
|
|
|
|
+ type: "warning"
|
|
})
|
|
})
|
|
.then(() => {})
|
|
.then(() => {})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
@@ -330,7 +356,7 @@ export default {
|
|
}
|
|
}
|
|
// return
|
|
// return
|
|
this.showConfirmDialog(
|
|
this.showConfirmDialog(
|
|
- '是否删除该方案配置?',
|
|
|
|
|
|
+ "是否删除该方案配置?",
|
|
() => {
|
|
() => {
|
|
let params = {
|
|
let params = {
|
|
planId: id,
|
|
planId: id,
|
|
@@ -339,7 +365,7 @@ export default {
|
|
api
|
|
api
|
|
.cancelPlanDatas(params)
|
|
.cancelPlanDatas(params)
|
|
.then(res => {
|
|
.then(res => {
|
|
- if (res.data.code == '0') {
|
|
|
|
|
|
+ if (res.data.code == "0") {
|
|
if (!this.searched) {
|
|
if (!this.searched) {
|
|
//未点确认时清空搜索条件
|
|
//未点确认时清空搜索条件
|
|
this.clearFilter();
|
|
this.clearFilter();
|
|
@@ -350,19 +376,19 @@ export default {
|
|
this.currentPage === 1 ? 1 : this.currentPage - 1;
|
|
this.currentPage === 1 ? 1 : this.currentPage - 1;
|
|
}
|
|
}
|
|
this.getDataList();
|
|
this.getDataList();
|
|
- this.warning(res.data.msg || '操作成功', 'success');
|
|
|
|
|
|
+ this.warning(res.data.msg || "操作成功", "success");
|
|
} else {
|
|
} else {
|
|
this.warning(res.data.msg);
|
|
this.warning(res.data.msg);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch(error => {
|
|
.catch(error => {
|
|
- if (error.code === '900010001') {
|
|
|
|
|
|
+ if (error.code === "900010001") {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
this.warning(error);
|
|
this.warning(error);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- 'Del1'
|
|
|
|
|
|
+ "Del1"
|
|
);
|
|
);
|
|
},
|
|
},
|
|
|
|
|
|
@@ -374,11 +400,12 @@ export default {
|
|
status: type
|
|
status: type
|
|
})
|
|
})
|
|
.then(res => {
|
|
.then(res => {
|
|
- if (res.data.code === '0') {
|
|
|
|
|
|
+ console.log("禁用", res);
|
|
|
|
+ if (res.data.code === "0") {
|
|
this.$message({
|
|
this.$message({
|
|
showClose: true,
|
|
showClose: true,
|
|
- message: '操作成功',
|
|
|
|
- type: 'success',
|
|
|
|
|
|
+ message: "操作成功",
|
|
|
|
+ type: "success",
|
|
duration: 1000
|
|
duration: 1000
|
|
});
|
|
});
|
|
this.getDataList();
|
|
this.getDataList();
|
|
@@ -389,7 +416,7 @@ export default {
|
|
|
|
|
|
// 启用/禁用
|
|
// 启用/禁用
|
|
enableOrAble(row, type) {
|
|
enableOrAble(row, type) {
|
|
- // console.log('启用planName', row, type);
|
|
|
|
|
|
+ console.log("启用planName", row, type);
|
|
if (type === 1) {
|
|
if (type === 1) {
|
|
// 启用
|
|
// 启用
|
|
this.showConfirmDialog(
|
|
this.showConfirmDialog(
|
|
@@ -397,7 +424,7 @@ export default {
|
|
() => {
|
|
() => {
|
|
this.sendAbleOrEn(row, type);
|
|
this.sendAbleOrEn(row, type);
|
|
},
|
|
},
|
|
- 'Reuse'
|
|
|
|
|
|
+ "Reuse"
|
|
);
|
|
);
|
|
} else {
|
|
} else {
|
|
// 禁用
|
|
// 禁用
|
|
@@ -406,7 +433,7 @@ export default {
|
|
() => {
|
|
() => {
|
|
this.sendAbleOrEn(row, type);
|
|
this.sendAbleOrEn(row, type);
|
|
},
|
|
},
|
|
- 'Del'
|
|
|
|
|
|
+ "Del"
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -416,7 +443,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;
|
|
}
|
|
}
|
|
@@ -477,7 +504,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.el-table__row {
|
|
.el-table__row {
|
|
- /deep/ .is-disabled {
|
|
|
|
|
|
+ /deep/ .is-disabled,.el-button.is-disabled.is-plain {
|
|
border-color: transparent !important;
|
|
border-color: transparent !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -491,4 +518,8 @@ export default {
|
|
top: -2px;
|
|
top: -2px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/deep/.el-button.is-disabled.active-t {
|
|
|
|
+ color: #dad7d7;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|