解决合并冲突
This commit is contained in:
@@ -116,7 +116,7 @@ const props = defineProps({
|
||||
})
|
||||
const userStore = useUserStore();
|
||||
const formRef = ref(null)
|
||||
|
||||
console.log(components,'----components');
|
||||
const dialogVisible= defineModel( 'dialogVisible', {
|
||||
type: Boolean,
|
||||
default: false
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<div class="LaboratoryTests-container">
|
||||
<el-dialog
|
||||
title="批量导入项目"
|
||||
:model-value="props.dialogVisible"
|
||||
@update:modelValue="(val) => emit('update:dialogVisible', val)"
|
||||
width="842"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
:draggable="true"
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-form ref="formEl" :rules="rules" :model="form" label-width="100px">
|
||||
<el-form-item label="项目类型" prop="clinicalType">
|
||||
<el-select
|
||||
v-model="form.clinicalType"
|
||||
placeholder="请选择"
|
||||
@change="getList()"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in categoryCodeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="30" style="margin-top: 30px">
|
||||
<el-col :span="24">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
:data="applicationList"
|
||||
filter-placeholder="项目代码/名称"
|
||||
filterable
|
||||
:titles="['未选择', '已选择']"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="onCancel">取消</el-button>
|
||||
<el-button type="primary" @click="onConfirm"> 确认 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="LaboratoryTests">
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue';
|
||||
import {
|
||||
getApplicationList,
|
||||
editImplementDepartment,
|
||||
addImplementDepartment,
|
||||
} from './implementDepartment.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 属性
|
||||
const props = defineProps({
|
||||
// 弹框显示信息
|
||||
dialogVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 选择科室
|
||||
organizationId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:dialogVisible', 'confirm', 'cancel', 'submitOk']);
|
||||
// 申请项目列表
|
||||
const applicationListAll = ref();
|
||||
// 获取所有申请项目
|
||||
const applicationList = ref();
|
||||
// 申请项目列表
|
||||
const transferValue = ref([]);
|
||||
// 项目类型
|
||||
const formEl = ref();
|
||||
const form = reactive({ clinicalType: '23' });
|
||||
// 加载中
|
||||
const loading = ref(false);
|
||||
// 弹窗显隐由父组件控制,通过 v-model 事件同步
|
||||
// 项目类型
|
||||
const categoryCodeList = ref([
|
||||
{ label: '治疗', value: '21' },
|
||||
{ label: '检验', value: '22' },
|
||||
{ label: '检查', value: '23' },
|
||||
{ label: '手术', value: '24' },
|
||||
]);
|
||||
// 规则校验
|
||||
const rules = ref({
|
||||
clinicalType: [{ required: true, message: '请选择项目类型', trigger: 'change' }],
|
||||
});
|
||||
const getList = () => {
|
||||
if (!form.clinicalType) {
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
getApplicationList({
|
||||
pageSize: 10000,
|
||||
pageNum: 1,
|
||||
// 项目类型 枚举类中
|
||||
categoryCode: form.clinicalType,
|
||||
adviceTypes: '3', //1 药品 2耗材 3诊疗
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
loading.value = false;
|
||||
applicationListAll.value = res.data.records;
|
||||
applicationList.value = res.data.records.map((item) => {
|
||||
return {
|
||||
label: item.adviceName + item.adviceDefinitionId,
|
||||
key: item.adviceDefinitionId,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
proxy.$message.error(res.message);
|
||||
applicationList.value = [];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function onCancel() {
|
||||
emit('cancel');
|
||||
emit('update:dialogVisible', false);
|
||||
}
|
||||
|
||||
// 批量添加
|
||||
async function onConfirm() {
|
||||
if (!formEl) return;
|
||||
formEl.value.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
if (!transferValue.value || transferValue.value.length === 0) {
|
||||
proxy.$message.error('请选择至少一个项目');
|
||||
return;
|
||||
}
|
||||
const requests = (transferValue.value || []).map((defId) => {
|
||||
const params = {
|
||||
// 诊疗定义id
|
||||
activityDefinitionId: defId,
|
||||
// 科室ID
|
||||
organizationId: props.organizationId,
|
||||
// 诊疗类型
|
||||
activityCategoryCode: form.clinicalType,
|
||||
// 开始时间
|
||||
startTime: '00:00:00',
|
||||
// 结束时间
|
||||
endTime: '23:59:59',
|
||||
/*
|
||||
方法类别:DistributionCategoryCodeEnum 枚举
|
||||
desription: 8代表诊疗
|
||||
*/
|
||||
distributionCategoryCode: '8',
|
||||
};
|
||||
return handleSave(params);
|
||||
});
|
||||
await Promise.all(requests);
|
||||
emit('submitOk');
|
||||
emit('update:dialogVisible', false);
|
||||
transferValue.value = [];
|
||||
});
|
||||
}
|
||||
// 保存
|
||||
async function handleSave(params) {
|
||||
if (params.id) {
|
||||
return editImplementDepartment(params).then((res) => {
|
||||
proxy.$modal.msgSuccess('保存成功!');
|
||||
return res;
|
||||
});
|
||||
} else {
|
||||
delete params.id;
|
||||
return addImplementDepartment(params).then((res) => {
|
||||
proxy.$modal.msgSuccess('保存成功!');
|
||||
return res;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-transfer-panel) {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,68 +1,83 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 初始化
|
||||
export function getImplementDepartmentList(query) {
|
||||
return request({
|
||||
export function getImplementDepartmentList (query) {
|
||||
return request ({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询诊疗目录列表
|
||||
export function getDiagnosisTreatmentList(query) {
|
||||
return request({
|
||||
export function getDiagnosisTreatmentList (query) {
|
||||
return request ({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//查询诊疗目录详细
|
||||
export function getImplementDepartmentOne(query) {
|
||||
return request({
|
||||
export function getImplementDepartmentOne (query) {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-page',
|
||||
method: 'get',
|
||||
params: query // 确保参数正确传递
|
||||
})
|
||||
params: query, // 确保参数正确传递
|
||||
});
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function addImplementDepartment(data) {
|
||||
return request({
|
||||
export function addImplementDepartment (data) {
|
||||
return request ({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function editImplementDepartment(data) {
|
||||
return request({
|
||||
export function editImplementDepartment (data) {
|
||||
return request ({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteImplementDepartment(data) {
|
||||
return request({
|
||||
export function deleteImplementDepartment (data) {
|
||||
return request ({
|
||||
url: '/base-data-manage/org-loc/org-loc?orgLocId=' + data.orgLocId,
|
||||
method: 'delete',
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
export function getDiseaseTreatmentInit () {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/init',
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 目录分类子查询
|
||||
export function getDiseaseTreatmentInitLoc(id) {
|
||||
return request({
|
||||
export function getDiseaseTreatmentInitLoc (id) {
|
||||
return request ({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-one?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//医嘱大下拉
|
||||
export function getApplicationList (queryParams) {
|
||||
return request ({
|
||||
url: '/doctor-station/advice/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
// 获取所有诊疗项目
|
||||
export function getAllTreatmentList () {
|
||||
return request ({
|
||||
url: '/app-common/activity-definition',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -33,6 +33,17 @@
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Plus"
|
||||
:disabled="isAddDisable"
|
||||
@click="handleBacthAddItem"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>批量新增项目配置</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@@ -41,54 +52,49 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="100" align="center" />
|
||||
<el-table-column label="诊疗目录" width="150" align="center" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-select
|
||||
v-model="scope.row.activityCategoryCode"
|
||||
placeholder="请选择"
|
||||
ref="dropdown"
|
||||
@change="DiagnosisTreatmentList(scope.row,scope.$index,1)"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in catagoryDicts"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
label="诊疗目录"
|
||||
width="150"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-select
|
||||
v-model="scope.row.activityDefinitionId"
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请选择"
|
||||
remote-show-suffix
|
||||
:remote-method="(query) => debouncedRemoteMethod(query, scope.row)"
|
||||
:loading="loading"
|
||||
style="width: 350px"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in scope.row.projectList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-select
|
||||
v-model="scope.row.activityCategoryCode"
|
||||
placeholder="请选择"
|
||||
ref="dropdown"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in catagoryDicts"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<el-select
|
||||
v-model="scope.row.activityDefinitionId"
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请选择"
|
||||
remote-show-suffix
|
||||
style="width: 400px; max-width: 500px"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in allImplementDepartmentList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -97,18 +103,15 @@
|
||||
key="startTime"
|
||||
prop="startTime"
|
||||
:show-overflow-tooltip="true"
|
||||
width="300"
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-time-picker
|
||||
v-model="scope.row.startTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
>
|
||||
</el-time-picker>
|
||||
</div>
|
||||
<el-time-picker
|
||||
v-model="scope.row.startTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
>
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -117,19 +120,16 @@
|
||||
align="center"
|
||||
key="endTime"
|
||||
prop="endTime"
|
||||
:show-overflow-tooltip="true"
|
||||
width="300"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-time-picker
|
||||
v-model="scope.row.endTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
>
|
||||
</el-time-picker>
|
||||
</div>
|
||||
<el-time-picker
|
||||
v-model="scope.row.endTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
>
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -169,6 +169,11 @@
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<BacthAddItemDialog
|
||||
v-model:dialogVisible="bacthAddItemDialogVisible"
|
||||
:organizationId="organizationId"
|
||||
@submitOk="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -178,14 +183,12 @@ import {
|
||||
getImplementDepartmentList,
|
||||
getDiagnosisTreatmentList,
|
||||
getDiseaseTreatmentInit,
|
||||
getImplementDepartmentOne,
|
||||
// getDiseaseTreatmentInitLoc,
|
||||
getAllTreatmentList,
|
||||
addImplementDepartment,
|
||||
editImplementDepartment,
|
||||
deleteImplementDepartment,
|
||||
} from './components/implementDepartment';
|
||||
import { debounce } from 'lodash-es';
|
||||
import { fa } from 'element-plus/es/locales.mjs';
|
||||
import BacthAddItemDialog from './components/batchAddDialog.vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const organization = ref([]);
|
||||
const loading = ref(true);
|
||||
@@ -194,10 +197,11 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const catagoryList = ref([]);
|
||||
const projectList = ref([]);
|
||||
const catagoryDicts = ref([]);
|
||||
const isAddDisable = ref(true);
|
||||
const organizationId = ref('');
|
||||
// 批量添加
|
||||
const bacthAddItemDialogVisible = ref(false);
|
||||
//默认传8(诊疗)
|
||||
const distributionCategoryCode = ref('8');
|
||||
const data = reactive({
|
||||
@@ -212,29 +216,15 @@ const data = reactive({
|
||||
},
|
||||
isAdding: false,
|
||||
});
|
||||
const debouncedRemoteMethod = debounce((query, row) => {
|
||||
remoteMethod(query, row);
|
||||
}, 300);
|
||||
|
||||
const { queryParams, tableRules } = toRefs(data);
|
||||
|
||||
/** 查询表格数据列表 */
|
||||
function getList() {
|
||||
let params = {
|
||||
// 科室id
|
||||
organizationId: organizationId.value,
|
||||
// 类别
|
||||
distributionCategoryCode: distributionCategoryCode.value,
|
||||
};
|
||||
getDiagnosisTreatmentList(params).then((res) => {
|
||||
console.log(res.data.records)
|
||||
queryParams.value.organizationId = organizationId.value;
|
||||
queryParams.value.distributionCategoryCode = distributionCategoryCode.value;
|
||||
loading.value = true;
|
||||
getDiagnosisTreatmentList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
catagoryList.value = res.data.records
|
||||
catagoryList.value.map((k,index)=>{
|
||||
// if(k.activityCategoryCode){
|
||||
DiagnosisTreatmentList(k,index, 2)
|
||||
// }
|
||||
})
|
||||
catagoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
@@ -243,69 +233,21 @@ const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
//下拉诊疗目录点击事件
|
||||
function DiagnosisTreatmentList(row,index,type) {
|
||||
let params = {
|
||||
statusEnum: 2, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
...row,
|
||||
categoryCode: row.activityCategoryCode,
|
||||
pageSize:100,
|
||||
}
|
||||
if(type == 1){
|
||||
catagoryList.value[index].activityDefinitionId =''
|
||||
}else if(type == 2){
|
||||
params.searchKey = row.activityDefinitionId_dictText
|
||||
}
|
||||
console.log(params,'params');
|
||||
getImplementDepartmentOne(params)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
projectList.value = [];
|
||||
row.name = null;
|
||||
projectList.value = res.data.records.map((item) => ({ value: item.id, info: item.name }));
|
||||
|
||||
catagoryList.value[index].projectList = projectList.value
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('请求失败', error);
|
||||
});
|
||||
}
|
||||
|
||||
function remoteMethod(query, row) {
|
||||
// 所有诊疗项目列表
|
||||
const allImplementDepartmentList = ref([]);
|
||||
function getAllImplementDepartment() {
|
||||
loading.value = true;
|
||||
const params = {
|
||||
statusEnum: 2,
|
||||
activityCategoryCode: row.activityCategoryCode, // 确保已选诊疗目录
|
||||
searchKey: query, // 模糊搜索关键字
|
||||
...row,
|
||||
categoryCode: row.activityCategoryCode,
|
||||
pageSize:100,
|
||||
};
|
||||
console.log(params,row,query,'params');
|
||||
|
||||
getImplementDepartmentOne(params).then((res) => {
|
||||
getAllTreatmentList().then((res) => {
|
||||
allImplementDepartmentList.value = res.data.map((item) => ({
|
||||
value: item.activityDefinitionId,
|
||||
label: item.activityDefinitionName,
|
||||
}));
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
// 更新当前行的 projectList 数据
|
||||
row.projectList = res.data.records.map((item) => ({
|
||||
value: item.id,
|
||||
info: item.name,
|
||||
}));
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
});
|
||||
loading.value = false;
|
||||
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
@@ -317,13 +259,18 @@ function handleAddItem() {
|
||||
return;
|
||||
}
|
||||
const newRow = {
|
||||
startTime:'00:00:00',
|
||||
endTime:'23:59:59'
|
||||
startTime: '00:00:00',
|
||||
endTime: '23:59:59',
|
||||
};
|
||||
catagoryList.value.push(newRow);
|
||||
total.value = organization.value.length;
|
||||
data.isAdding = true; // 设置标志位为 true,表示有未保存的
|
||||
}
|
||||
// 批量添加
|
||||
function handleBacthAddItem() {
|
||||
// 批量添加显示对话框
|
||||
bacthAddItemDialogVisible.value = true;
|
||||
}
|
||||
// 检验 编辑或 保存数据
|
||||
function handleBlur(row, index) {
|
||||
let hasError = false;
|
||||
@@ -336,8 +283,7 @@ function handleBlur(row, index) {
|
||||
if (message) {
|
||||
proxy.$message.error(message);
|
||||
} else {
|
||||
console.error(`No rule defined for field: ${field}`);
|
||||
proxy.$message.error(`No rule defined for field: ${field}`);
|
||||
proxy.$message.error(`检验未通过`);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -357,6 +303,7 @@ function openSaveImplementDepartment(row) {
|
||||
handleBlur(row);
|
||||
if (row.error) {
|
||||
hasError = true;
|
||||
return;
|
||||
}
|
||||
const startTime = params.startTime;
|
||||
const endTime = params.endTime;
|
||||
@@ -383,22 +330,22 @@ function openSaveImplementDepartment(row) {
|
||||
}
|
||||
// 删除当前所选行
|
||||
function deleteSelectedRows(row) {
|
||||
if (row.id) {
|
||||
deleteImplementDepartment({ orgLocId: row.id }).then((res) => {});
|
||||
} else {
|
||||
catagoryList.value.pop();
|
||||
}
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
data.isAdding = false;
|
||||
getList();
|
||||
proxy.$modal.confirm('是否删除选中数据').then(() => {
|
||||
if (row.id) {
|
||||
deleteImplementDepartment({ orgLocId: row.id }).then((res) => {});
|
||||
} else {
|
||||
catagoryList.value.pop();
|
||||
}
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
data.isAdding = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data, node) {
|
||||
catagoryList.value.map(k=>{
|
||||
if(!k.id){
|
||||
openSaveImplementDepartment(k)
|
||||
}
|
||||
})
|
||||
function handleNodeClick(res, node) {
|
||||
// 新增按钮是否 disable
|
||||
data.isAdding = false;
|
||||
|
||||
// 新增按钮是否 disable
|
||||
if (node.parent === null || node.level === 1) {
|
||||
isAddDisable.value = true;
|
||||
@@ -418,7 +365,10 @@ function handleNodeClick(data, node) {
|
||||
|
||||
/** 目录分类查询 */
|
||||
function getDiseaseTreatmentList() {
|
||||
loading.value = true;
|
||||
getDiseaseTreatmentInit().then(({ data }) => {
|
||||
loading.value = false;
|
||||
|
||||
//分类目录初始化获取
|
||||
catagoryDicts.value = data.diagnosisCategoryOptions.sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
@@ -431,6 +381,7 @@ function getDiseaseTreatmentList() {
|
||||
}
|
||||
// 诊疗目录分类查询下拉树结d构
|
||||
function getImplDepartList() {
|
||||
loading.value = true;
|
||||
getImplementDepartmentList().then((res) => {
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
@@ -450,8 +401,10 @@ function getImplDepartList() {
|
||||
}
|
||||
});
|
||||
}
|
||||
// 获取左侧执行科室配置目录
|
||||
getDiseaseTreatmentList();
|
||||
onMounted(() => {
|
||||
getAllImplementDepartment();
|
||||
getDiseaseTreatmentList();
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
@@ -463,15 +416,4 @@ getDiseaseTreatmentList();
|
||||
.error-border {
|
||||
border: 1px solid red;
|
||||
}
|
||||
/* ::v-deep.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{ */
|
||||
/* background-color: #c5e1ff!important; */
|
||||
/* #d8ebff!important; */
|
||||
/* #c5e1ff!important; */
|
||||
/* #9fceff!important; */
|
||||
/* } */
|
||||
/* ::v-deep.el-tree--highlight-current{ */
|
||||
/* background-color:#f8f8f9 !important; */
|
||||
/* #ebf5ff!important; */
|
||||
/* } */
|
||||
|
||||
</style>
|
||||
@@ -48,7 +48,7 @@ const currentSelectRow = ref({});
|
||||
const queryParams = ref({
|
||||
pageSize: 100,
|
||||
pageNum: 1,
|
||||
adviceTypes: '2,3',
|
||||
adviceTypes: '1,2,3',
|
||||
});
|
||||
const adviceBaseList = ref([]);
|
||||
// 节流函数
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -35,59 +35,27 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
>添加</el-button
|
||||
>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd">添加</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Remove"
|
||||
:disabled="multiple"
|
||||
@click="handleClose"
|
||||
<el-button type="danger" plain icon="Remove" :disabled="multiple" @click="handleClose"
|
||||
>停用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="CirclePlus"
|
||||
:disabled="multiple"
|
||||
@click="handleStart"
|
||||
<el-button type="success" plain icon="CirclePlus" :disabled="multiple" @click="handleStart"
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="getList"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button type="primary" plain icon="Search" @click="getList">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
>清空条件</el-button
|
||||
>
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">清空条件</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="supplierList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table v-loading="loading" :data="supplierList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="编号" align="center" key="busNo" prop="busNo" />
|
||||
<el-table-column
|
||||
@@ -111,26 +79,9 @@
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="地址"
|
||||
align="center"
|
||||
key="address"
|
||||
prop="address"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="联系人电话"
|
||||
align="center"
|
||||
key="phone"
|
||||
prop="phone"
|
||||
/>
|
||||
<el-table-column
|
||||
label="联系人邮箱"
|
||||
align="center"
|
||||
key="email"
|
||||
prop="email"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column label="地址" align="center" key="address" prop="address" width="120" />
|
||||
<el-table-column label="联系人电话" align="center" key="phone" prop="phone" />
|
||||
<el-table-column label="联系人邮箱" align="center" key="email" prop="email" width="160" />
|
||||
<el-table-column
|
||||
label="活动标识"
|
||||
align="center"
|
||||
@@ -152,20 +103,10 @@
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -179,28 +120,16 @@
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="supplierRef"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form :model="form" :rules="rules" ref="supplierRef" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入名称"
|
||||
/>
|
||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="form.id != undefined">
|
||||
<el-form-item label="编码" prop="busNo">
|
||||
<el-input
|
||||
v-model="form.busNo"
|
||||
placeholder="请输入编码"
|
||||
disabled
|
||||
/>
|
||||
<el-input v-model="form.busNo" placeholder="请输入编码" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -261,17 +190,17 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-form-item label="机构编号" prop="orgId"> -->
|
||||
<!-- <el-input v-model="form.orgId" maxlength="11" /> -->
|
||||
<el-form-item label="提供部门" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
<!-- <el-input v-model="form.orgId" maxlength="11" /> -->
|
||||
<el-form-item label="提供部门" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
<!-- </el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -297,14 +226,11 @@ import {
|
||||
startSupplier,
|
||||
getSupplierInit,
|
||||
deptTreeSelect,
|
||||
} from "./components/supplier";
|
||||
} from './components/supplier';
|
||||
|
||||
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 supplierList = ref([]);
|
||||
const open = ref(false);
|
||||
@@ -314,7 +240,7 @@ const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const title = ref('');
|
||||
const supplierTypeOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
// 是否停用
|
||||
@@ -334,8 +260,10 @@ const data = reactive({
|
||||
// sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
typeEnum: [{ required: true, message: "类型不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
typeEnum: [{ required: true, message: '类型不能为空', trigger: 'blur' }],
|
||||
orgId: [{ required: true, message: '提供部门不能为空', trigger: 'blur' }],
|
||||
|
||||
// address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||
// phone: [{ required: true, message: "联系人电话不能为空", trigger: "blur" }],
|
||||
// email: [{ required: true, message: "联系人邮箱不能为空", trigger: "blur" },
|
||||
@@ -347,30 +275,30 @@ const data = reactive({
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 验证邮箱地址是否有效*/
|
||||
function validateEmail (rule, value, callback) {
|
||||
function validateEmail(rule, value, callback) {
|
||||
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
||||
if (!emailRegex.test(value)) {
|
||||
callback(new Error('请输入有效的邮箱地址'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** 厂商种类查询下拉树结构 */
|
||||
function getsupplierTypeList() {
|
||||
getSupplierInit().then((response) => {
|
||||
console.log(response, "response");
|
||||
console.log(response, 'response');
|
||||
supplierTypeOptions.value = response.data.supplierTypeOptions;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
console.log("查询部门下拉树结构");
|
||||
console.log('查询部门下拉树结构');
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
console.log(deptOptions.value, '部门下拉树结构');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -378,14 +306,14 @@ function getDeptTree() {
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
console.log(queryParams.value, "queryParams.value");
|
||||
console.log(queryParams.value, 'queryParams.value');
|
||||
getSupplierList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res", res.data.records);
|
||||
console.log(res, 'res', res.data.records);
|
||||
supplierList.value = res.data.records;
|
||||
console.log(supplierList.value, "supplierList.value");
|
||||
console.log(supplierList.value, 'supplierList.value');
|
||||
total.value = res.data.total;
|
||||
console.log(total.value, "total.value");
|
||||
console.log(total.value, 'total.value');
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
@@ -403,13 +331,13 @@ function handleQuery() {
|
||||
function handleStart(row) {
|
||||
const stardIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确定启用数据!")
|
||||
.confirm('是否确定启用数据!')
|
||||
.then(function () {
|
||||
return startSupplier(stardIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("启用成功");
|
||||
proxy.$modal.msgSuccess('启用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
@@ -417,13 +345,13 @@ function handleStart(row) {
|
||||
function handleClose(row) {
|
||||
const stopIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
.confirm('是否确认停用数据!')
|
||||
.then(function () {
|
||||
return stopSupplier(stopIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("停用成功");
|
||||
proxy.$modal.msgSuccess('停用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
@@ -435,13 +363,13 @@ function handleClear() {
|
||||
// queryParams.value.sourceEnum = undefined;
|
||||
// queryParams.value.busNo = undefined;
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
console.log(selection, 'selection');
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
@@ -457,7 +385,7 @@ function reset() {
|
||||
status: undefined,
|
||||
statusEnum: undefined,
|
||||
};
|
||||
proxy.resetForm("supplierRef");
|
||||
proxy.resetForm('supplierRef');
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
@@ -468,34 +396,34 @@ function cancel() {
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "新增";
|
||||
title.value = '新增';
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
console.log(row, "row");
|
||||
console.log(row, 'row');
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
form.value.activeFlag == 1 ? (form.value.activeFlag = true) : (form.value.activeFlag = false); //是否为活性
|
||||
// console.log(form.value.ty, "form.value");
|
||||
open.value = true;
|
||||
title.value = "厂商/产地编辑";
|
||||
title.value = '厂商/产地编辑';
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["supplierRef"].validate((valid) => {
|
||||
proxy.$refs['supplierRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
form.value.activeFlag == true ? (form.value.activeFlag = 1) : (form.value.activeFlag = 0); //是否为活性
|
||||
console.log(form.value, "*****************");
|
||||
console.log(form.value, '*****************');
|
||||
if (form.value.id != undefined) {
|
||||
console.log(form.value, "editSupplier");
|
||||
console.log(form.value, 'editSupplier');
|
||||
editSupplier(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addSupplier(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
proxy.$modal.msgSuccess('新增成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@@ -507,10 +435,10 @@ function submitForm() {
|
||||
/** 详细按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
title.value = "查看";
|
||||
title.value = '查看';
|
||||
open.value = true;
|
||||
getSupplierOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
console.log(response, 'responsebbbb', row.id);
|
||||
form.value = response.data;
|
||||
});
|
||||
}
|
||||
@@ -523,4 +451,4 @@ getDeptTree();
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user