6.12
This commit is contained in:
parent
500a9d578d
commit
80121827e1
2
components.d.ts
vendored
2
components.d.ts
vendored
@ -21,8 +21,10 @@ declare module '@vue/runtime-core' {
|
|||||||
CouponDetail: typeof import('./src/components/couponDetail.vue')['default']
|
CouponDetail: typeof import('./src/components/couponDetail.vue')['default']
|
||||||
DeleteModal: typeof import('./src/components/DeleteModal.vue')['default']
|
DeleteModal: typeof import('./src/components/DeleteModal.vue')['default']
|
||||||
DoctorModal: typeof import('./src/components/doctorModal.vue')['default']
|
DoctorModal: typeof import('./src/components/doctorModal.vue')['default']
|
||||||
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
|
ElTree: typeof import('element-plus/es')['ElTree']
|
||||||
FamilyModal: typeof import('./src/components/familyModal.vue')['default']
|
FamilyModal: typeof import('./src/components/familyModal.vue')['default']
|
||||||
GiveCouponModal: typeof import('./src/components/giveCouponModal.vue')['default']
|
GiveCouponModal: typeof import('./src/components/giveCouponModal.vue')['default']
|
||||||
HospitalDetailModal: typeof import('./src/components/hospitalDetailModal.vue')['default']
|
HospitalDetailModal: typeof import('./src/components/hospitalDetailModal.vue')['default']
|
||||||
|
|||||||
@ -132,7 +132,7 @@
|
|||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item field="" label="" no-style>
|
<a-form-item field="" label="" no-style>
|
||||||
<a-space >
|
<a-space >
|
||||||
<a-button type="primary" @click="handleSubmit" v-has="'admin:sysDoctorconfigList:save'">保存</a-button>
|
<a-button type="primary" @click="handleSubmit" v-has="'admin:sysHealthconfigList:save'">保存</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|||||||
@ -103,7 +103,7 @@
|
|||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item field="" label="" no-style>
|
<a-form-item field="" label="" no-style>
|
||||||
<a-space >
|
<a-space >
|
||||||
<a-button type="primary" @click="handleSubmit" v-has="'admin:sysDoctorconfigList:save'">保存</a-button>
|
<a-button type="primary" @click="handleSubmit" v-has="'admin:sysHealthList:save'">保存</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|||||||
@ -146,7 +146,7 @@
|
|||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleSubmit"
|
@click="handleSubmit"
|
||||||
v-has="'admin:sysDoctorconfigList:save'"
|
v-has="'admin:sysVisitconfigList:save'"
|
||||||
>保存</a-button
|
>保存</a-button
|
||||||
>
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
|
|||||||
@ -137,7 +137,7 @@
|
|||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item field="" label="" no-style>
|
<a-form-item field="" label="" no-style>
|
||||||
<a-space >
|
<a-space >
|
||||||
<a-button type="primary" @click="handleSubmit">保存</a-button>
|
<a-button type="primary" @click="handleSubmit" v-has="'admin:sysHospitalList:save'">保存</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import App from './App.vue';
|
|||||||
import ArcoVue from '@arco-design/web-vue';
|
import ArcoVue from '@arco-design/web-vue';
|
||||||
import { Message, Modal, Notification } from '@arco-design/web-vue';
|
import { Message, Modal, Notification } from '@arco-design/web-vue';
|
||||||
import '@arco-design/web-vue/dist/arco.css';
|
import '@arco-design/web-vue/dist/arco.css';
|
||||||
|
import 'element-plus/dist/index.css'
|
||||||
import router from './router/';
|
import router from './router/';
|
||||||
import { parseTime } from '@/utils/parseTime';
|
import { parseTime } from '@/utils/parseTime';
|
||||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||||
|
|||||||
@ -1,116 +1,85 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
<el-tree
|
||||||
|
style="max-width: 600px"
|
||||||
|
accordion
|
||||||
|
lazy
|
||||||
|
:default-expanded-keys="expandKey"
|
||||||
|
:key="key"
|
||||||
|
ref="tree"
|
||||||
|
:load="loadNode"
|
||||||
|
:props="defaultProps"
|
||||||
|
node-key="id"
|
||||||
|
|
||||||
<a-form-item field="hospital_name" label="医院名称">
|
@node-click="handleNodeClick"
|
||||||
<a-input :style="{ width: '182px' }" v-model="queryForm.hospital_name" placeholder="请输入药品名称或通用名" @press-enter="handleQuery" />
|
>
|
||||||
|
<template #default="{ node, data }">
|
||||||
</a-form-item>
|
<span class="custom-tree-node" >
|
||||||
<a-form-item field="hospital_level_name" label="医院等级">
|
<span>{{ node.label }}</span>
|
||||||
<a-select v-model="queryForm.hospital_level_name" placeholder="请选择医院等级" :style="{ width: '182px' }">
|
<span >
|
||||||
<a-option value="一级">一级</a-option>
|
<icon-plus-circle-fill v-has="'admin:sysArea:add'" @click="append(data)" title="添加" style="margin-left: 8px;font-size: 16px;color:#165DFF" v-if="node.level!=3"/>
|
||||||
<a-option value="二级">二级</a-option>
|
<icon-edit title="修改" v-has="'admin:sysArea:edit'" @click="edit(node, data)" style="margin-left: 8px;font-size: 16px;color:#165DFF"/>
|
||||||
<a-option value="三级">三级</a-option>
|
</span>
|
||||||
</a-select>
|
</span>
|
||||||
</a-form-item>
|
|
||||||
<a-form-item field="province_id" label="省份">
|
|
||||||
<a-select v-model="queryForm.province_id" placeholder="请选择省份" :style="{ width: '182px' }" @change="changeProvice">
|
|
||||||
<a-option v-for="item in provinceData" :key="item.area_id" :value="Number(item.area_id)"
|
|
||||||
:label="item.area_name">{{ item.area_name}}</a-option>
|
|
||||||
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item field="city_id" label="城市">
|
|
||||||
<a-select v-model="queryForm.city_id" placeholder="请选择城市" :style="{ width: '182px' }" @change="changeCity">
|
|
||||||
<a-option v-for="item in cityData" :key="item.area_id" :value="Number(item.area_id)"
|
|
||||||
:label="item.area_name">{{ item.area_name}}</a-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item field="county_id" label="区县">
|
|
||||||
<a-select v-model="queryForm.county_id" placeholder="请选择区县" :style="{ width: '182px' }">
|
|
||||||
<a-option v-for="item in countryData" :key="item.area_id" :value="Number(item.area_id)"
|
|
||||||
:label="item.area_name">{{ item.area_name}}</a-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item>
|
|
||||||
<a-space>
|
|
||||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
|
||||||
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
|
|
||||||
</a-space>
|
|
||||||
</a-form-item>
|
|
||||||
</a-form>
|
|
||||||
|
|
||||||
<a-divider />
|
|
||||||
|
|
||||||
<!-- action -->
|
|
||||||
<div class="action">
|
|
||||||
<a-space>
|
|
||||||
<a-button v-has="'admin:platformMedinceList:selectExport'" type="primary" @click="handleAdd"><icon-plus /> 添加 </a-button>
|
|
||||||
<!-- <a-button v-has="'admin:platformMedinceList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
|
||||||
<a-button v-has="'admin:platformMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button> -->
|
|
||||||
</a-space>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- table -->
|
|
||||||
<!-- :row-selection="{ type: 'checkbox', showCheckedAll: true }" -->
|
|
||||||
<a-table :columns="columns" :data="tableData"
|
|
||||||
:scroll="{ x: 1600 }"
|
|
||||||
|
|
||||||
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
|
||||||
row-key="hospital_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
|
|
||||||
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
|
|
||||||
<template #doctor_id="{record,rowIndex}">
|
|
||||||
<div>{{(rowIndex+1)+(pager.page-1)*pager.page_size}}</div>
|
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ record }">
|
</el-tree>
|
||||||
<a-space>
|
|
||||||
<a-button v-has="'admin:platformMedinceList:detail'" type="text"
|
|
||||||
@click="handleDetail(record)"><icon-book />详情</a-button>
|
|
||||||
<!-- <a-button v-has="'admin:platformMedinceList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
|
||||||
修改</a-button> -->
|
|
||||||
<!-- <a-button v-has="'admin:platformMedinceList:remove'" type="text"
|
|
||||||
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
|
||||||
</a-space>
|
|
||||||
</template>
|
|
||||||
</a-table>
|
|
||||||
|
|
||||||
<hospitalDetailModal ref="hospitalChild" :modalVisible="modalVisible" :modalForm="modalForm" :id="modalForm.hospital_id" @freshDetail="handleQuery" @familyVisibleChange="()=>{modalVisible=false,modalForm.hospital_id=''}"></hospitalDetailModal>
|
<a-modal v-model:visible="okVisible" :modal-style="{width:'420px'}" body-class="okmodal" @ok="handleConfirm"
|
||||||
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
@cancel="handleClose" >
|
||||||
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
|
|
||||||
@deleteVisibleChange="() => deleteVisible = false" /> -->
|
|
||||||
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
|
||||||
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal"
|
|
||||||
@cancel="()=>okVisible=false">
|
|
||||||
<template #title>
|
<template #title>
|
||||||
提示
|
{{ title }}
|
||||||
</template>
|
</template>
|
||||||
<div>确定保存当前信息?</div>
|
<a-form :model="form" :rules="rules" ref="modalFormRef" size="medium" label-align="left" auto-label-width>
|
||||||
|
<a-form-item field="area_name" label="名称" >
|
||||||
|
<a-textarea v-model.trim="form.area_name" allow-clear placeholder="请输入名称"></a-textarea>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="label" label="上级名称" v-if="title=='添加区域'">
|
||||||
|
<a-input v-model="form.label" disabled placeholder="请输入级名称" size="large" class="input-demo" />
|
||||||
|
</a-form-item>
|
||||||
|
|
||||||
|
</a-form>
|
||||||
|
<template #footer>
|
||||||
|
<a-button @click="handleClose"><template #icon><icon-close /></template>取消</a-button>
|
||||||
|
<a-button type="primary" @click="handleConfirm"><template #icon><icon-check /></template>确认</a-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||||
import { getHospitalList,getHospitalDetail,getAreaList} from '@/api/basic/list';
|
import {getAreaList,addArea,updateArea} from '@/api/basic/list';
|
||||||
import { downloadFile } from '@/utils/downloadFile';
|
import { Message } from '@arco-design/web-vue';
|
||||||
// Akiraka 20230210 删除数据
|
// Akiraka 20230210 删除数据
|
||||||
const deleteData = ref([])
|
const key = ref(1);
|
||||||
// Akiraka 20230210 删除对话框
|
// Akiraka 20230210 删除对话框
|
||||||
const deleteVisible = ref(false)
|
const deleteVisible = ref(false)
|
||||||
// Akiraka 20230210 监听删除事件
|
// Akiraka 20230210 监听删除事件
|
||||||
const okVisible = ref(false);
|
const okVisible = ref(false);
|
||||||
|
const tree=ref(null);
|
||||||
const hospitalChild=ref(null);
|
const hospitalChild=ref(null);
|
||||||
|
const current=reactive({});
|
||||||
watch(() => deleteVisible.value, (value) => {
|
watch(() => deleteVisible.value, (value) => {
|
||||||
if (value == false) {
|
if (value == false) {
|
||||||
getMedinceInfo(pager);
|
getMedinceInfo(pageaer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const expandKey=ref([]);
|
||||||
const file = ref();
|
const title=ref('');
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
|
label: 'label',
|
||||||
|
isLeaf:'isLeaf'
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleNodeClick = (data) => {
|
||||||
|
|
||||||
|
}
|
||||||
// Pager
|
// Pager
|
||||||
const pager = {
|
const pager = {
|
||||||
total: 0,
|
total: 0,
|
||||||
@ -121,205 +90,148 @@
|
|||||||
const queryForm = reactive({
|
const queryForm = reactive({
|
||||||
|
|
||||||
});
|
});
|
||||||
const modalForm = reactive({
|
|
||||||
|
const form = reactive({
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
const provinceData = ref([]);
|
const provinceData = ref([]);
|
||||||
const cityData = ref([]);
|
const cityData = ref([]);
|
||||||
const countryData = ref([]);
|
const countryData = ref([]);
|
||||||
|
const rules= reactive({
|
||||||
|
area_name: [{ required: true, message: '请输入名称' }]
|
||||||
|
});
|
||||||
|
let id = 1000;
|
||||||
|
const append=(data)=>{
|
||||||
|
console.log(data);
|
||||||
|
title.value="添加区域";
|
||||||
|
okVisible.value=true;
|
||||||
|
form.parent_id=data.id;
|
||||||
|
form.label=data.label;
|
||||||
|
current.label=data.label;
|
||||||
|
current.id=data.id;
|
||||||
|
current.parent_id=data.parent_id;
|
||||||
|
current.level=data.level;
|
||||||
|
form.area_name='';
|
||||||
|
// console.log(data)
|
||||||
|
// const newChild = { id: id++, label: 'testtest', children: [] };
|
||||||
|
// tree.value.append(newChild,data.id)
|
||||||
|
};
|
||||||
|
const edit=(node,data)=>{
|
||||||
|
console.log(data);
|
||||||
|
title.value="修改区域";
|
||||||
|
form.parent_id=node.data.id;
|
||||||
|
form.area_name=node.data.label;
|
||||||
|
okVisible.value=true;
|
||||||
|
current.id=data.id;
|
||||||
|
current.parent_id=data.parent_id;
|
||||||
|
}
|
||||||
//获取区域列表
|
//获取区域列表
|
||||||
const handelAreaList = (area_id = '', parent_id = '', area_type) => {
|
const handelAreaList = (area_id = '', parent_id = '', area_type,resolve) => {
|
||||||
getAreaList({
|
getAreaList({
|
||||||
area_id,
|
area_id,
|
||||||
area_type,
|
area_type,
|
||||||
parent_id
|
parent_id
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
const { data, code, message } = res;
|
const { data, code, message } = res;
|
||||||
|
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
if (area_type == 2) {
|
if (area_type == 2) {
|
||||||
provinceData.value = data;
|
let result=data.map(item=>{
|
||||||
|
return {
|
||||||
|
level:0,
|
||||||
|
label:item.area_name,
|
||||||
|
id:item.area_id,
|
||||||
|
parent_id:item.parent_id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
resolve(result);
|
||||||
}
|
}
|
||||||
if (area_type == 3) {
|
if (area_type == 3) {
|
||||||
cityData.value = data;
|
let result=data.map(item=>{
|
||||||
|
return {
|
||||||
|
label:item.area_name,
|
||||||
|
level:1,
|
||||||
|
id:item.area_id,
|
||||||
|
parent_id:item.parent_id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
resolve(result);
|
||||||
};
|
};
|
||||||
if (area_type == 4) {
|
if (area_type == 4) {
|
||||||
countryData.value = data;
|
let result=data.map(item=>{
|
||||||
|
return {
|
||||||
|
isLeaf: true,
|
||||||
|
level:2,
|
||||||
|
label:item.area_name,
|
||||||
|
id:item.area_id,
|
||||||
|
parent_id:item.parent_id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log(result)
|
||||||
|
resolve(result);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//切换省份
|
const handleConfirm=()=>{
|
||||||
const changeProvice = (value) => {
|
proxy.$refs.modalFormRef.validate(async(valid) => {
|
||||||
queryForm.city_id = '';
|
if (!valid) {
|
||||||
queryForm.county_id = '';
|
let type=null;
|
||||||
handelAreaList('', value, 3);
|
if(current.level==0){
|
||||||
};
|
type=3
|
||||||
//切换省份
|
}else if(current.level==1){
|
||||||
const changeCity = (value) => {
|
type=4
|
||||||
queryForm.county_id = '';
|
}
|
||||||
handelAreaList("", value, 4);
|
let {code,data}= title.value=="添加区域"?await addArea({
|
||||||
|
area_name:form.area_name,
|
||||||
|
parent_id:form.parent_id,
|
||||||
|
area_type:type
|
||||||
|
}):await updateArea(form.parent_id,{
|
||||||
|
area_name:form.area_name
|
||||||
|
})
|
||||||
|
if(code==200){
|
||||||
|
if(title.value=="添加区域"){
|
||||||
|
Message.success("添加成功");
|
||||||
|
|
||||||
|
}else{
|
||||||
|
Message.success("修改成功");
|
||||||
|
//tree.value.updateKeyChildren(form.parent_id,{id:form.parent_id,label:form.area_name,children: [] })
|
||||||
|
}
|
||||||
|
key.value= key.value+1;
|
||||||
|
okVisible.value=false;
|
||||||
|
setTimeout(()=>{
|
||||||
|
expandKey.value=[current.parent_id,current.id]
|
||||||
|
// tree.value.setCurrentKey(current.id,true);
|
||||||
|
},1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
const handleClose=()=>{
|
||||||
|
okVisible.value=false;
|
||||||
|
}
|
||||||
|
const loadNode=(node, resolve)=>{
|
||||||
|
if (node.level === 0) {
|
||||||
|
handelAreaList("", "", 2,resolve);
|
||||||
|
}else if(node.level === 1){
|
||||||
|
handelAreaList("", node.data.id, 3,resolve);
|
||||||
|
}else if(node.level === 2){
|
||||||
|
handelAreaList("", node.data.id, 4,resolve);
|
||||||
|
}else{
|
||||||
|
resolve([])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Modal
|
// Modal
|
||||||
const modalVisible = ref(false);
|
const modalVisible = ref(false);
|
||||||
const modalTitle = ref('默认标题');
|
const modalTitle = ref('默认标题');
|
||||||
|
|
||||||
// Batch Del List
|
|
||||||
let batchList = [];
|
|
||||||
|
|
||||||
// Table Columns
|
|
||||||
const columns = [
|
|
||||||
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
|
||||||
{ title: '医院名字', dataIndex: 'hospital_name',width:200 },
|
|
||||||
{ title: '省份', dataIndex: 'province',width:200 },
|
|
||||||
{ title: '城市', dataIndex: 'city', slotName: 'product_price',width: 150 },
|
|
||||||
{ title: '区县', dataIndex: 'county',width:200 },
|
|
||||||
{ title: '地址', dataIndex: 'address',width:200 },
|
|
||||||
{ title: '创建时间', dataIndex: 'created_at',width:200 },
|
|
||||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
|
||||||
];
|
|
||||||
|
|
||||||
// Table Data
|
|
||||||
const tableData = ref([]);
|
|
||||||
//弹框状态
|
|
||||||
const modalSatus = ref('add');
|
|
||||||
|
|
||||||
// 新增Satus
|
|
||||||
const handleAdd = () => {
|
|
||||||
modalVisible.value = true;
|
|
||||||
modalTitle.value = '新增患者';
|
|
||||||
modalForm.hospital_id ='';
|
|
||||||
modalForm.hospital_name='',
|
|
||||||
modalForm.hospital_status=1,
|
|
||||||
modalForm.hospital_level_name='',
|
|
||||||
modalForm.post_code='',
|
|
||||||
modalForm.tele_phone='',
|
|
||||||
modalForm.province_id='',
|
|
||||||
modalForm.city_id='',
|
|
||||||
modalForm.county_id='',
|
|
||||||
modalForm.address='',
|
|
||||||
modalForm.desc=''
|
|
||||||
};
|
|
||||||
|
|
||||||
//详情
|
|
||||||
const handleDetail = async (record) => {
|
|
||||||
const { code, data, message } = await getHospitalDetail(record.hospital_id)
|
|
||||||
hospitalChild.value.getData();
|
|
||||||
if (code == 200) {
|
|
||||||
Object.assign(modalForm, data);
|
|
||||||
modalVisible.value = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// 批量删除
|
|
||||||
const handleBatchDelete = () => {
|
|
||||||
if (batchList.length !== 0) {
|
|
||||||
proxy.$modal.warning({
|
|
||||||
title: '提示',
|
|
||||||
content: '是否批量删除以下选中的数据?',
|
|
||||||
hideCancel: false,
|
|
||||||
onOk: async () => {
|
|
||||||
const res = await removeFamily({ ids: batchList });
|
|
||||||
proxy.$message.success(res.message);
|
|
||||||
getMedinceInfo(pager);
|
|
||||||
},
|
|
||||||
onCancel: () => {
|
|
||||||
proxy.$message.info('已取消批量删除数据');
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
proxy.$message.error('请勾选需要删除的数据!');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页改变
|
|
||||||
* @param {Number} [page]
|
|
||||||
*/
|
|
||||||
const handlePageChange = (page) => {
|
|
||||||
pager.page = page;
|
|
||||||
|
|
||||||
// 修改当前页码
|
|
||||||
currentPage.value = page;
|
|
||||||
getMedinceInfo({ ...pager, ...queryForm });
|
|
||||||
};
|
|
||||||
|
|
||||||
// 每页数据量
|
|
||||||
const handlepage_sizeChange = (page_size) => {
|
|
||||||
pager.page_size = page_size;
|
|
||||||
getMedinceInfo({ ...pager, ...queryForm });
|
|
||||||
};
|
|
||||||
|
|
||||||
// 获取患者信息
|
|
||||||
const getMedinceInfo = async (params = {}) => {
|
|
||||||
const { data, code, message } = await getHospitalList(params);
|
|
||||||
if (code == 200) {
|
|
||||||
tableData.value = data.data;
|
|
||||||
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 查询患者信息
|
|
||||||
const handleQuery = async () => {
|
|
||||||
pager.page = 1;
|
|
||||||
const params = {
|
|
||||||
page: pager.page,
|
|
||||||
page_size: pager.page_size,
|
|
||||||
...queryForm,
|
|
||||||
};
|
|
||||||
|
|
||||||
getMedinceInfo(params);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 重置搜索
|
|
||||||
const handleResetQuery = () => {
|
|
||||||
proxy.$refs.queryFormRef.resetFields();
|
|
||||||
getMedinceInfo(queryForm);
|
|
||||||
}
|
|
||||||
const handlExport=async(type)=>{
|
|
||||||
proxy.$loading.show();
|
|
||||||
let fromData=null;
|
|
||||||
if(type==1){
|
|
||||||
fromData={
|
|
||||||
type,
|
|
||||||
...queryForm
|
|
||||||
}
|
|
||||||
}else if(type==2){
|
|
||||||
if(deleteData.value.length==0){
|
|
||||||
proxy.$message.warning('请勾选数据');
|
|
||||||
proxy.$loading.hide();
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
let id='';
|
|
||||||
deleteData.value.forEach((item)=>{
|
|
||||||
if(id){
|
|
||||||
id+=","+item
|
|
||||||
}else{
|
|
||||||
id=item;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
fromData={
|
|
||||||
type,
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}else if(type==3){
|
|
||||||
fromData={
|
|
||||||
type
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const {code,data}=await exportFamily(fromData);
|
|
||||||
if(code==200){
|
|
||||||
downloadFile(data,'就诊人列表');
|
|
||||||
}
|
|
||||||
proxy.$loading.hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getMedinceInfo(pager);
|
|
||||||
handelAreaList("", "", 2);
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
<!-- action -->
|
<!-- action -->
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:platformMedinceList:selectExport'" type="primary" @click="handleAdd"><icon-plus /> 添加 </a-button>
|
<a-button v-has="'admin:sysHospitalList:add'" type="primary" @click="handleAdd"><icon-plus /> 添加 </a-button>
|
||||||
<!-- <a-button v-has="'admin:platformMedinceList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
<!-- <a-button v-has="'admin:platformMedinceList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||||
<a-button v-has="'admin:platformMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button> -->
|
<a-button v-has="'admin:platformMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button> -->
|
||||||
</a-space>
|
</a-space>
|
||||||
@ -64,7 +64,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:platformMedinceList:detail'" type="text"
|
<a-button v-has="'admin:sysHospitalList:detail'" type="text"
|
||||||
@click="handleDetail(record)"><icon-book />详情</a-button>
|
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||||
<!-- <a-button v-has="'admin:platformMedinceList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
<!-- <a-button v-has="'admin:platformMedinceList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||||
修改</a-button> -->
|
修改</a-button> -->
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<!-- action -->
|
<!-- action -->
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:sysDoctorconfigList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
<a-button v-has="'admin:sysHealthList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
||||||
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
|
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:sysDoctorconfigList:edit'" type="text"
|
<a-button v-has="'admin:sysHealthList:edit'" type="text"
|
||||||
@click="handleDetail(record)"><icon-edit />修改</a-button>
|
@click="handleDetail(record)"><icon-edit />修改</a-button>
|
||||||
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||||
修改</a-button> -->
|
修改</a-button> -->
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<!-- action -->
|
<!-- action -->
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:sysDoctorconfigList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
<a-button v-has="'admin:sysHealthconfigList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
||||||
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
|
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
@ -37,7 +37,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:sysDoctorconfigList:edit'" type="text"
|
<a-button v-has="'admin:sysHealthconfigList:edit'" type="text"
|
||||||
@click="handleDetail(record)"><icon-edit />修改</a-button>
|
@click="handleDetail(record)"><icon-edit />修改</a-button>
|
||||||
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||||
修改</a-button> -->
|
修改</a-button> -->
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<!-- action -->
|
<!-- action -->
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:sysDoctorconfigList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
<a-button v-has="'admin:sysVisitconfigList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
||||||
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
|
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
</template> -->
|
</template> -->
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:sysDoctorconfigList:edit'" type="text"
|
<a-button v-has="'admin:sysVisitconfigList:edit'" type="text"
|
||||||
@click="handleDetail(record)"><icon-edit />修改</a-button>
|
@click="handleDetail(record)"><icon-edit />修改</a-button>
|
||||||
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||||
修改</a-button> -->
|
修改</a-button> -->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user