疾病目录接口修改,药品目录画面修正 up by dh

This commit is contained in:
duhe
2025-02-26 15:55:44 +08:00
parent 4078acba45
commit 3ebeb1a013
5 changed files with 545 additions and 115 deletions

View File

@@ -12,19 +12,33 @@
style="margin-bottom: 20px"
/>
</div> -->
<!-- <div class="head-container">
<div class="head-container">
<el-tree
:data="conditionDefinitionOptions"
:props="{ label: 'label', children: 'children' }"
:props="{ label: 'info', children: 'children' }"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="deptTreeRef"
node-key="id"
node-key="value"
highlight-current
default-expand-all
@node-click="handleNodeClick"
/>
</div> -->
>
<template v-slot="{ node, data }">
<span class="custom-tree-node">
<i
:class="{
'el-icon-folder': !node.expanded && !data.children.length,
'el-icon-folder-opened': node.expanded,
'el-icon-document': data.children.length === 0,
}"
style="color: #409eff"
/>
<span>{{ node.label }}</span>
</span>
</template>
</el-tree>
</div>
</el-col>
<!--用户数据-->
<el-col :span="20" :xs="24">
@@ -287,18 +301,22 @@ import {
addDisease,
getDiseaseCategory,
getDiseaseOne,
stopDisease,
startDisease
} from "./components/disease";
const router = useRouter();
const { proxy } = getCurrentInstance();
const { sys_normal_disable, sys_user_sex } = proxy.useDict( "sys_normal_disable","sys_user_sex");
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
"sys_normal_disable",
"sys_user_sex"
);
const diseaseList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const selectedData = ref([]); // 存储选择的行数据
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
@@ -317,12 +335,10 @@ const data = reactive({
status: undefined, // 状态(包括 1预置2启用3停用
},
rules: {
name: [
{ required: true, message: "名称不能为空", trigger: "blur" },
],
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
conditionCode: [
{ required: true, message: "编码不能为空", trigger: "blur" },
]
],
},
});
@@ -374,17 +390,12 @@ function handleQuery() {
// handleQuery();
// };
/** 启用按钮操作 */
function handleStart() {
selectedData.value.forEach((item) => {
item.statusEnum = "2";
});
const data = selectedData.value;
// selectedData
console.log(data, "data");
function handleStart(row) {
const stardIds = row.id || ids.value;
proxy.$modal
.confirm("是否确定启用数据!")
.then(function () {
return editDisease(data);
return startDisease(stardIds);
})
.then(() => {
getList();
@@ -393,16 +404,12 @@ function handleStart() {
.catch(() => {});
}
/** 停用按钮操作 */
function handleClose() {
selectedData.value.forEach((item) => {
item.statusEnum = "3";
});
const data = selectedData.value;
console.log(data, "data");
function handleClose(row) {
const stopIds = row.id || ids.value;
proxy.$modal
.confirm("是否确认停用数据!")
.then(function () {
return editDisease(data);
return stopDisease(stopIds);
})
.then(() => {
getList();
@@ -435,7 +442,8 @@ function handleExport() {
/** 选择条数 */
function handleSelectionChange(selection) {
console.log(selection, "selection");
selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
ids.value = selection.map(item => item.userId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
@@ -487,9 +495,7 @@ function submitForm() {
// ? (form.value.statusEnum = "3")
// : (form.value.statusEnum = "2");
console.log(form.value, "editDisease", form.value.statusEnum);
let param = [];
param.push(form.value);
editDisease(param).then((response) => {
editDisease(form.value).then((response) => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
@@ -518,3 +524,9 @@ function handleView(row) {
getDiseaseCategoryList();
getList();
</script>
<style scoped>
.custom-tree-node {
display: flex;
align-items: center;
}
</style>