344 lines
10 KiB
Vue
344 lines
10 KiB
Vue
<template>
|
|
<div class="app-container">
|
|
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
|
|
|
<a-form-item field="inquiry_type" label="问诊类型">
|
|
<a-select v-model="queryForm.inquiry_type" placeholder="请选择服务类型" :style="{ width: '182px' }">
|
|
<!-- 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 -->
|
|
<a-option :value="1">专家问诊</a-option>
|
|
<a-option :value="2">快速问诊</a-option>
|
|
<a-option :value="3">公益问诊</a-option>
|
|
<a-option :value="4">问诊购药</a-option>
|
|
<a-option :value="5">糖组检测</a-option>
|
|
</a-select>
|
|
|
|
</a-form-item>
|
|
<a-form-item field="inquiry_mode" label="接诊方式">
|
|
<a-select v-model="queryForm.inquiry_mode" placeholder="请选择接诊方式" :style="{ width: '182px' }">
|
|
<a-option :value="1">图文</a-option>
|
|
<a-option :value="2">视频</a-option>
|
|
<a-option :value="3">语音</a-option>
|
|
<a-option :value="4">电话</a-option>
|
|
<a-option :value="5">会员</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:sysFamilyList: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-space>
|
|
</div> -->
|
|
|
|
<!-- table -->
|
|
<a-table :columns="columns" :data="tableData"
|
|
:scroll="{ x: 1400 }"
|
|
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
|
|
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
|
row-key="doctor_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 #inquiry_mode="{ record }">
|
|
<div>{{ formatMode(record.inquiry_mode) }}</div>
|
|
</template>
|
|
<template #inquiry_price="{ record }">
|
|
<div v-if="record.inquiry_price">{{ record.inquiry_price}}</div>
|
|
</template>
|
|
|
|
<template #inquiry_type="{record}">
|
|
<div>{{ formatInquiryType(record.inquiry_type) }}</div>
|
|
</template>
|
|
<template #times_number="{record}">
|
|
<div v-if="record.times_number==0" >不限次数</div>
|
|
<div v-else>{{record.times_number}}次</div>
|
|
</template>
|
|
<template #duration="{record}">
|
|
<div v-if="record.duration==0" >不限时长</div>
|
|
<div v-else-if="record.duration>0 && record.duration<60">{{record.duration}}分钟</div>
|
|
<div v-else-if="record.duration>=60">{{record.duration/60}}小时</div>
|
|
</template>
|
|
|
|
<template #action="{ record }">
|
|
<a-space>
|
|
<a-button v-has="'admin:sysconfigList:edit'" type="text"
|
|
@click="handleDetail(record)"><icon-edit />修改</a-button>
|
|
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
|
修改</a-button> -->
|
|
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="text"
|
|
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
|
</a-space>
|
|
</template>
|
|
</a-table>
|
|
|
|
|
|
<addSysconfigModal :modalVisible="modalVisible" :inquiry_config_id="inquiry_config_id" :modalForm="modalForm" @freshList="getInquiryInfo(pager);" @familyVisibleChange="()=>{modalVisible=false;inquiry_config_id='';}"></addSysconfigModal>
|
|
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
|
<!-- <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>
|
|
<div>确定保存当前信息?</div>
|
|
</a-modal>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
|
import { getSysconfigList} from '@/api/inquiry/sysconfig';
|
|
import {formatMode,formatInquiryType} from "@/utils/format"
|
|
|
|
// Akiraka 20230210 删除数据
|
|
const deleteData = ref([])
|
|
// Akiraka 20230210 删除对话框
|
|
const deleteVisible = ref(false)
|
|
// Akiraka 20230210 监听删除事件
|
|
const okVisible = ref(false);
|
|
const inquiry_config_id=ref("");
|
|
watch(() => deleteVisible.value, (value) => {
|
|
if (value == false) {
|
|
getInquiryInfo(pager);
|
|
}
|
|
});
|
|
|
|
const file = ref();
|
|
const { proxy } = getCurrentInstance();
|
|
const currentPage = ref(1);
|
|
const family_data=ref([]);
|
|
const family_columns=ref([{
|
|
title: '编号',
|
|
dataIndex: 'code',
|
|
slotName:'code'
|
|
},{
|
|
title: '就诊人姓名',
|
|
dataIndex: 'card_name_mask',
|
|
},{
|
|
title: '身份证号',
|
|
dataIndex: 'id_number_mask',
|
|
},{
|
|
title: '与账号关系',
|
|
dataIndex: 'relation',
|
|
slotName:'relation'
|
|
},{
|
|
title: '添加时间',
|
|
dataIndex: 'created_at',
|
|
slotName:'created_at'
|
|
}, { title: '操作', slotName: 'action'}])
|
|
// Pager
|
|
const pager = {
|
|
total: 0,
|
|
page: 1,
|
|
page_size: 10,
|
|
};
|
|
// form
|
|
const queryForm = reactive({
|
|
|
|
});
|
|
const modalForm = reactive({
|
|
user:{},
|
|
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
|
|
|
});
|
|
// Modal
|
|
const modalVisible = ref(false);
|
|
const modalTitle = ref('默认标题');
|
|
|
|
// Batch Del List
|
|
let batchList = [];
|
|
|
|
// Table Columns
|
|
const columns = [
|
|
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
|
{
|
|
title: '问诊类型',
|
|
dataIndex: 'inquiry_type',
|
|
slotName:'inquiry_type'
|
|
},{
|
|
title: '接诊方式',
|
|
dataIndex: 'inquiry_mode',
|
|
slotName:'inquiry_mode'
|
|
},{
|
|
title: '接诊价格',
|
|
dataIndex: 'inquiry_price',
|
|
slotName:'inquiry_price'
|
|
},
|
|
{
|
|
title: '最高接诊价格',
|
|
dataIndex: 'max_inquiry_price',
|
|
slotName:'max_inquiry_price'
|
|
},
|
|
{
|
|
title: '最低接诊价格',
|
|
dataIndex: 'min_inquiry_price',
|
|
slotName:'min_inquiry_price'
|
|
},
|
|
{
|
|
title: '沟通次数',
|
|
dataIndex: 'times_number',
|
|
slotName:'times_number'
|
|
},
|
|
{
|
|
title: '沟通时长',
|
|
dataIndex: 'duration',
|
|
slotName:'duration'
|
|
},
|
|
{ title: '操作', slotName: 'action', fixed: "right", width: 150 }]
|
|
|
|
// Table Data
|
|
const tableData = ref([]);
|
|
//弹框状态
|
|
const modalSatus = ref('add');
|
|
|
|
// 新增Satus
|
|
const handleAdd = () => {
|
|
modalVisible.value = true;
|
|
inquiry_config_id.value='';
|
|
};
|
|
|
|
//详情
|
|
const handleDetail = async (record) => {
|
|
inquiry_config_id.value=record.system_inquiry_config_id;
|
|
modalVisible.value = true;
|
|
};
|
|
|
|
/**
|
|
* 分页改变
|
|
* @param {Number} [page]
|
|
*/
|
|
const handlePageChange = (page) => {
|
|
pager.page = page;
|
|
|
|
// 修改当前页码
|
|
currentPage.value = page;
|
|
getInquiryInfo({ ...pager, ...queryForm });
|
|
};
|
|
|
|
// 每页数据量
|
|
const handlepage_sizeChange = (page_size) => {
|
|
pager.page_size = page_size;
|
|
getInquiryInfo({ ...pager, ...queryForm });
|
|
};
|
|
|
|
// 获取患者信息
|
|
const getInquiryInfo = async (params = {}) => {
|
|
const { data, code, message } = await getSysconfigList(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,
|
|
};
|
|
|
|
getInquiryInfo(params);
|
|
};
|
|
|
|
// 重置搜索
|
|
const handleResetQuery = () => {
|
|
proxy.$refs.queryFormRef.resetFields();
|
|
getInquiryInfo(queryForm);
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
getInquiryInfo(pager);
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.action {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.okmodal div {
|
|
text-align: center;
|
|
}
|
|
|
|
.hospital_name {
|
|
width: 140px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.headImg {
|
|
margin-right: 20px;
|
|
border-radius: 50%;
|
|
width: 80px;
|
|
height: 80px;
|
|
}
|
|
|
|
.arco-form-item-layout-horizontal:first-child,
|
|
.arco-form-item-layout-horizontal:nth-child(2) {
|
|
align-items: center;
|
|
}
|
|
.cellbox{
|
|
margin-top: 35px;
|
|
}
|
|
.cellbox .cell{
|
|
width:50%;
|
|
border-bottom:1px dashed #efefef;
|
|
margin-bottom: 20px;
|
|
}
|
|
.cellbox .cell:first-child{
|
|
border: none;
|
|
}
|
|
.cell{
|
|
.arco-form-item{
|
|
margin-bottom: 10px;
|
|
}
|
|
}
|
|
.box {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.cert .arco-form-item-label-col {
|
|
flex: 0 0 8px !important;
|
|
}
|
|
|
|
.red {
|
|
display: inline-block;
|
|
margin-right: 5px;
|
|
font-size: 14px;
|
|
color: red;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.cardNum {
|
|
width: 148px;
|
|
}
|
|
.codbox{
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.reason{
|
|
width:250px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
</style> |