|
|
|
@ -0,0 +1,848 @@
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<div v-loading="loading">
|
|
|
|
|
|
|
|
<el-dialog title="预约列表" class="iframeDialog" v-model="iframe_show" @opened="dialogopened" @closed="closeYuYueDialog()">
|
|
|
|
|
|
|
|
<iframe id="bdIframe" :src="selectedUrl" class="iframe" :key="YuYueKey" scrolling="auto"></iframe>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<el-dialog v-model="YuYueVueDialogVisible" width="100%" @close="closeYuYueDialog()">
|
|
|
|
|
|
|
|
<YuYue202506 :reg_num="tableSelected[0].reg_num" :entrust_ids="entrust_ids" :key="YuYueKey" :episode_id="tableSelected[0].episodeid" appointment_type="4" :dotype="do_type" :do_user="loginUserinfo.id" :special_privileges="loginUserinfo.special_privileges" :scope="'department'"></YuYue202506>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<div class="head">
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-select :filterable="true" clearable v-model="selectedDeptId" placeholder="选择科室"
|
|
|
|
|
|
|
|
@change="deptChange" style="margin-left: 8px;width: 180px;">
|
|
|
|
|
|
|
|
<el-option label="全部科室" :value="0" />
|
|
|
|
|
|
|
|
<el-option v-for="(item,index) in deptList" :key="index"
|
|
|
|
|
|
|
|
:label="item.department_name" :value="item.id" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-select v-model="searchInfo.dateType" placeholder="时间筛选类型"
|
|
|
|
|
|
|
|
style="margin-left: 8px;width: 150px;">
|
|
|
|
|
|
|
|
<el-option label="预约日期" value="reservation_date" />
|
|
|
|
|
|
|
|
<el-option label="医嘱日期" value="entrust_date" />
|
|
|
|
|
|
|
|
<el-option label="同时生效" value="both" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-date-picker style="margin-left: 8px; width: 150px" v-model="searchInfo.dateRange[0]"
|
|
|
|
|
|
|
|
type="date" placeholder="开始时间" value-format="YYYY-MM-DD" />
|
|
|
|
|
|
|
|
<span style="margin: 0 4px;">至</span>
|
|
|
|
|
|
|
|
<el-date-picker style="width: 150px" v-model="searchInfo.dateRange[1]"
|
|
|
|
|
|
|
|
type="date" placeholder="结束时间" value-format="YYYY-MM-DD" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-select :filterable="true" clearable v-model="searchInfo.list_status" placeholder="状态"
|
|
|
|
|
|
|
|
style="margin-left: 8px;width: 150px;">
|
|
|
|
|
|
|
|
<el-option label="申请中" value="0" />
|
|
|
|
|
|
|
|
<el-option label="已预约" value="1" />
|
|
|
|
|
|
|
|
<el-option label="已报道" value="2" />
|
|
|
|
|
|
|
|
<el-option label="已结束" value="3" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-select :filterable="true" clearable v-model="searchInfo.patient_type" placeholder="患者类型"
|
|
|
|
|
|
|
|
style="margin-left: 8px;width: 150px;">
|
|
|
|
|
|
|
|
<el-option label="住院" value="0" />
|
|
|
|
|
|
|
|
<el-option label="门诊" value="1" />
|
|
|
|
|
|
|
|
<el-option label="急诊" value="2" />
|
|
|
|
|
|
|
|
<el-option label="体检" value="3" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-select multiple :filterable="true" clearable v-model="searchInfo.resources" placeholder="资源"
|
|
|
|
|
|
|
|
style="margin-left: 8px;width: 250px;">
|
|
|
|
|
|
|
|
<el-option v-for="(item,index) in enableResourceList" :key="index"
|
|
|
|
|
|
|
|
:label="item.department_resources_name" :value="item.id" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-input v-model="searchInfo.reg_num" placeholder="登记号" style="width: 200px;margin-left: 8px;" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-input v-model="searchInfo.user_name" placeholder="患者姓名"
|
|
|
|
|
|
|
|
style="width: 200px;margin-left: 8px;" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="searchInfo.apply_department"
|
|
|
|
|
|
|
|
filterable
|
|
|
|
|
|
|
|
remote
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
reserve-keyword
|
|
|
|
|
|
|
|
placeholder="申请科室"
|
|
|
|
|
|
|
|
style="width: 200px;margin-left: 8px;"
|
|
|
|
|
|
|
|
:remote-method="debouncedSearchDept"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in deptOptions"
|
|
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
|
|
:label="item.department_name + ' (' + item.department_number + ')'"
|
|
|
|
|
|
|
|
:value="item.department_name"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-input v-model="searchInfo.doctor" placeholder="医生"
|
|
|
|
|
|
|
|
style="width: 200px;margin-left: 8px;" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-button type="primary" @click="GetList()" style="margin-left: 10px;">查询</el-button>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row style="margin: 0px 0px 8px 8px; border-top: 1px solid #ccc;padding-top: 8px">
|
|
|
|
|
|
|
|
<el-button type="success" @click.prevent="openIframe(1)">预 约</el-button>
|
|
|
|
|
|
|
|
<el-button type="danger" @click="cancel()">取消预约</el-button>
|
|
|
|
|
|
|
|
<el-button type="warning" @click="openIframe(2)">更改预约时间</el-button>
|
|
|
|
|
|
|
|
<el-button type="primary" @click="SignInFunc()" style="margin-left: 40px;">报到</el-button>
|
|
|
|
|
|
|
|
<el-button style="display: none;" ref="print_shenqingdan_button" v-print="'#shenqingdan'">打印申请单隐藏按钮</el-button>
|
|
|
|
|
|
|
|
<el-button @click="print_shenqingdan()" >打印申请单</el-button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<el-table :data="tableData" id="tablelist" style="width: 100%;" row-key="id" v-loading="loading" ref="tableref"
|
|
|
|
|
|
|
|
@select="handleSelect">
|
|
|
|
|
|
|
|
<el-table-column type="selection" width="50" />
|
|
|
|
|
|
|
|
<el-table-column prop="list_status" label="状态" width="80">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.list_status===0" class="ml-2" type="info">申请中</el-tag>
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.list_status===1" class="ml-2" type="success">已预约</el-tag>
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.list_status===2" class="ml-2">登记</el-tag>
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.list_status===3" class="ml-2" type="warning">完成</el-tag>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="门诊号" width="120">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<span v-if="scope.row.patient_type != 0">{{ scope.row.reg_num }}</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="住院号" width="120">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<span v-if="scope.row.patient_type == 0">{{ scope.row.episodeid?.slice(-10) }}</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="user_name" label="姓名" />
|
|
|
|
|
|
|
|
<el-table-column prop="user_sex" label="性别" width="60">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<span v-if="scope.row.user_sex==1">男</span>
|
|
|
|
|
|
|
|
<span v-if="scope.row.user_sex==2">女</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="age" label="年龄" width="115" />
|
|
|
|
|
|
|
|
<el-table-column prop="entrust" label="医嘱" width="200" />
|
|
|
|
|
|
|
|
<el-table-column prop="is_pay" label="是否交费" width="80">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<span v-if="scope.row.is_pay==1">是</span>
|
|
|
|
|
|
|
|
<span v-if="scope.row.is_pay==0">否</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="reservation_date" label="预约日期" width="120" />
|
|
|
|
|
|
|
|
<el-table-column prop="check_begin_time" label="预约时间" width="120">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
|
|
|
v-if="scope.row.period_begin_time && scope.row.period_end_time ">{{scope.row.period_begin_time.substring(0, 5)}}~{{scope.row.period_end_time.substring(0, 5)}}</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="department_resources_name" label="排班" width="120" />
|
|
|
|
|
|
|
|
<el-table-column prop="reservation_department" label="申请科室" width="120" />
|
|
|
|
|
|
|
|
<el-table-column prop="" label="医嘱时间" width="160">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
{{scope.row.entrust_date}} {{scope.row.entrust_time}}
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="docotr" label="申请医生" width="80" />
|
|
|
|
|
|
|
|
<el-table-column prop="patient_type" label="病人类型" width="80">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<span v-if="scope.row.patient_type==0">住院</span>
|
|
|
|
|
|
|
|
<span v-if="scope.row.patient_type==1">门诊</span>
|
|
|
|
|
|
|
|
<span v-if="scope.row.patient_type==2">急诊</span>
|
|
|
|
|
|
|
|
<span v-if="scope.row.patient_type==3">体检</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="user_phone" label="电话" width="120" />
|
|
|
|
|
|
|
|
<el-table-column prop="department_resources_name" label="操作" width="120">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<el-button @click="showLog(scope.row)" size="small">查看日志</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<div class="page">
|
|
|
|
|
|
|
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize"
|
|
|
|
|
|
|
|
:page-sizes="[15, 50, 100, 200]" layout="total,sizes, prev, pager, next" :total="total"
|
|
|
|
|
|
|
|
@size-change="PageSizeChange" @current-change="PageCurrentChange" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<el-dialog v-model="LogShow" title="变更记录" width="50%">
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-table :data="LogList" style="width: 100%;" row-key="id">
|
|
|
|
|
|
|
|
<el-table-column prop="list_status" label="状态" width="100">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.new_status==0" class="ml-2" type="info">申请中</el-tag>
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.new_status==1" class="ml-2" type="success">已预约</el-tag>
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.new_status==2" class="ml-2">登记</el-tag>
|
|
|
|
|
|
|
|
<el-tag v-if="scope.row.new_status==3" class="ml-2" type="warning">完成</el-tag>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="reg_num" label="登记号" />
|
|
|
|
|
|
|
|
<el-table-column prop="note" label="说明" />
|
|
|
|
|
|
|
|
<el-table-column prop="create_user" label="操作人/ID" />
|
|
|
|
|
|
|
|
<el-table-column prop="created_at" label="记录时间" />
|
|
|
|
|
|
|
|
<el-table-column prop="data" label="状态" width="100">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<el-button @click="showLogJson(scope.row.data)" size="small">查看data</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<el-dialog v-model="LogDataShow" title="查看dataJson" width="40%">
|
|
|
|
|
|
|
|
<div style="word-break: break-all">
|
|
|
|
|
|
|
|
{{LogDataJson}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<el-dialog v-model="ItemGroupShow" title="选择可一起预约的项目" width="40%">
|
|
|
|
|
|
|
|
<div v-if="ItemGroup.length>0">
|
|
|
|
|
|
|
|
<div style="display: flex; border:1px solid #ccc;color: #999;">
|
|
|
|
|
|
|
|
<div style="width: 50%; border-right: 1px solid #ccc;padding: 8px; text-align: center;">
|
|
|
|
|
|
|
|
可一起预约项目
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style="width: 50%; padding: 8px;text-align: center;">
|
|
|
|
|
|
|
|
关联的排班
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-for="(group,index) in ItemGroup" :key="index" class="dialogitem" @click="ClickGroup(group)">
|
|
|
|
|
|
|
|
<div style="width: 50%; display: flex;border-right: 1px solid #ccc;padding: 8px;">
|
|
|
|
|
|
|
|
<div v-for="(item,i) in group">
|
|
|
|
|
|
|
|
<span style="margin-left: 8px; width: 200px;">{{item.item_name}}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style="margin-left: 8px;padding: 8px;display: flex;">
|
|
|
|
|
|
|
|
<div>{{group[0].device_name}}</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<div id="shenqingdan" v-if="shenqingdan_show" style="position: relative;">
|
|
|
|
|
|
|
|
<div v-for="(item,index) in shenqingdan_list" :key="index">
|
|
|
|
|
|
|
|
<ShenQingDan :printInfo="item.maininfo"></ShenQingDan>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<el-dialog v-model="TiShiShow" title="提示" width="40%" >
|
|
|
|
|
|
|
|
<div v-for="(item,index) in successItem" :key="index" style="font-size:16px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<table style="margin-top: -30px;">
|
|
|
|
|
|
|
|
<tr><td colspan="2" style="font-weight: 700; font-size: 18px;color:#4b6493">{{item.entrust}}<el-tag type="success" size="large">预约成功</el-tag></td></tr>
|
|
|
|
|
|
|
|
<tr><td style="font-weight: 700;">体检号:</td><td>{{item.signInData[0].checkNo}}</td></tr>
|
|
|
|
|
|
|
|
<tr><td style="font-weight: 700;">排队号:</td><td>{{item.signInData[0].queueNo}}</td></tr>
|
|
|
|
|
|
|
|
<tr><td style="font-weight: 700;">等待人数:</td><td>{{item.signInData[0].currentNum}}</td></tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-for="(item,index) in failItem" :key="index+200" style="color: crimson;">
|
|
|
|
|
|
|
|
{{item}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
ref,
|
|
|
|
|
|
|
|
onMounted,
|
|
|
|
|
|
|
|
nextTick,watch
|
|
|
|
|
|
|
|
} from 'vue'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
GetMainListByDept,
|
|
|
|
|
|
|
|
CancelYuYue,
|
|
|
|
|
|
|
|
GetEnableDeviceList,
|
|
|
|
|
|
|
|
DepartmentResourceGetEnableList,
|
|
|
|
|
|
|
|
GetFilteredDepartmentList,
|
|
|
|
|
|
|
|
GetServiceDateTime,
|
|
|
|
|
|
|
|
GetLoglist,
|
|
|
|
|
|
|
|
CheckEntrstItemGroup,
|
|
|
|
|
|
|
|
getMainDetail,
|
|
|
|
|
|
|
|
SignIn,
|
|
|
|
|
|
|
|
CancelSign,
|
|
|
|
|
|
|
|
SearchDepartment
|
|
|
|
|
|
|
|
} from '@/api/api.js'
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
usePinia
|
|
|
|
|
|
|
|
} from '@/stores/index.js'
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
ElMessage,
|
|
|
|
|
|
|
|
ElMessageBox
|
|
|
|
|
|
|
|
} from 'element-plus'
|
|
|
|
|
|
|
|
import ShenQingDan from '@/components/Yewu/PrintShenQingDan.vue'
|
|
|
|
|
|
|
|
import YuYue202506 from '@/components/Yewu/YuYue202506.vue'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let pinia = usePinia()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let YuYueVueDialogVisible=ref(false);
|
|
|
|
|
|
|
|
let YuYueKey=ref(0);
|
|
|
|
|
|
|
|
let AutoGroup=ref(true);
|
|
|
|
|
|
|
|
let shenqingdan_show=ref(false);
|
|
|
|
|
|
|
|
let do_type = ref(0)
|
|
|
|
|
|
|
|
let loading = ref(false)
|
|
|
|
|
|
|
|
let entrust_ids=ref('')
|
|
|
|
|
|
|
|
let searchInfo = ref({
|
|
|
|
|
|
|
|
dateType: 'both',
|
|
|
|
|
|
|
|
dateRange: [],
|
|
|
|
|
|
|
|
list_status: null,
|
|
|
|
|
|
|
|
patient_type: null,
|
|
|
|
|
|
|
|
resources: [],
|
|
|
|
|
|
|
|
services_group: null,
|
|
|
|
|
|
|
|
reg_num: null,
|
|
|
|
|
|
|
|
user_name: null,
|
|
|
|
|
|
|
|
apply_department: null
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
let loginType=ref('');
|
|
|
|
|
|
|
|
let tableData = ref([])
|
|
|
|
|
|
|
|
let tableref = ref(null)
|
|
|
|
|
|
|
|
let currentPage = ref(1)
|
|
|
|
|
|
|
|
let pageSize = ref(15)
|
|
|
|
|
|
|
|
let total = 0
|
|
|
|
|
|
|
|
let deptOptions = ref([])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 科室切换相关
|
|
|
|
|
|
|
|
let selectedDeptId = ref(0)
|
|
|
|
|
|
|
|
let deptList = ref([])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const debounce = (fn, delay) => {
|
|
|
|
|
|
|
|
let timer = null
|
|
|
|
|
|
|
|
return function(...args) {
|
|
|
|
|
|
|
|
clearTimeout(timer)
|
|
|
|
|
|
|
|
timer = setTimeout(() => fn.apply(this, args), delay)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const searchDept = (keyword) => {
|
|
|
|
|
|
|
|
if (!keyword) {
|
|
|
|
|
|
|
|
deptOptions.value = []
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
SearchDepartment({ keyword }).then(res => {
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
deptOptions.value = res.data.list
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
deptOptions.value = []
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const debouncedSearchDept = debounce(searchDept, 300)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const GetList = () => {
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
GetMainListByDept({
|
|
|
|
|
|
|
|
searchInfo: searchInfo.value,
|
|
|
|
|
|
|
|
page: currentPage.value,
|
|
|
|
|
|
|
|
pageSize: pageSize.value,
|
|
|
|
|
|
|
|
department_id: selectedDeptId.value
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
tableData.value = res.data.list
|
|
|
|
|
|
|
|
total = res.data.count
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const PageSizeChange = (e) => {
|
|
|
|
|
|
|
|
pageSize.value = e
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const PageCurrentChange = (e) => {
|
|
|
|
|
|
|
|
currentPage.value = e
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let tableSelected = ref([])
|
|
|
|
|
|
|
|
const handleSelect = (e) => {
|
|
|
|
|
|
|
|
if (e.length > 1) {
|
|
|
|
|
|
|
|
const firstStatus = e[0].list_status;
|
|
|
|
|
|
|
|
const allEqual = e.every(item => item.list_status === firstStatus);
|
|
|
|
|
|
|
|
if (!allEqual) {
|
|
|
|
|
|
|
|
SelectClear()
|
|
|
|
|
|
|
|
e = [e[e.length - 1]]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (e[e.length - 1].list_status != 0) {
|
|
|
|
|
|
|
|
SelectClear()
|
|
|
|
|
|
|
|
e = [e[e.length - 1]]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let select_qian = tableSelected.value ? tableSelected.value.length : 0
|
|
|
|
|
|
|
|
autoSeleted(e)
|
|
|
|
|
|
|
|
if (select_qian > tableSelected.value.length) {
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
FindMatchItem()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const handleSelectionChange = (e) => {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const SelectClear = () => {
|
|
|
|
|
|
|
|
tableref.value.clearSelection()
|
|
|
|
|
|
|
|
tableSelected.value = []
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const autoSeleted = (rows) => {
|
|
|
|
|
|
|
|
if (rows) {
|
|
|
|
|
|
|
|
rows.forEach((row) => {
|
|
|
|
|
|
|
|
if(row!=undefined){
|
|
|
|
|
|
|
|
tableref.value.toggleRowSelection(row, true)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
tableSelected.value = rows
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
SelectClear()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let ItemGroupShow = ref(false);
|
|
|
|
|
|
|
|
let ItemGroup = ref(null);
|
|
|
|
|
|
|
|
const FindMatchItem = () => {
|
|
|
|
|
|
|
|
console.log(tableSelected.value)
|
|
|
|
|
|
|
|
tableSelected.value.reverse();
|
|
|
|
|
|
|
|
let temp_reg_num=''
|
|
|
|
|
|
|
|
let chongzhi=false;
|
|
|
|
|
|
|
|
tableSelected.value.forEach((v, i) => {
|
|
|
|
|
|
|
|
if(temp_reg_num==''){
|
|
|
|
|
|
|
|
temp_reg_num=v.reg_num
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(temp_reg_num!='' && temp_reg_num!=v.reg_num){
|
|
|
|
|
|
|
|
chongzhi=true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if(chongzhi===true){
|
|
|
|
|
|
|
|
let a=tableSelected.value[0]
|
|
|
|
|
|
|
|
SelectClear();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
autoSeleted([a])
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(tableSelected.value)
|
|
|
|
|
|
|
|
let list = []
|
|
|
|
|
|
|
|
if(tableSelected.value[0].list_status!=0)return false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tableData.value.forEach((v, i) => {
|
|
|
|
|
|
|
|
if (v.list_status == 0 && v.reg_num == tableSelected.value[0].reg_num && v.episodeid ==
|
|
|
|
|
|
|
|
tableSelected.value[0].episodeid) {
|
|
|
|
|
|
|
|
if (v.id == tableSelected.value[0].id) {
|
|
|
|
|
|
|
|
list.push({
|
|
|
|
|
|
|
|
name: v.entrust,
|
|
|
|
|
|
|
|
rowid: i,
|
|
|
|
|
|
|
|
first: 1
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
list.push({
|
|
|
|
|
|
|
|
name: v.entrust,
|
|
|
|
|
|
|
|
rowid: i,
|
|
|
|
|
|
|
|
first: 0
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (list.length >= 2) {
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
CheckEntrstItemGroup({
|
|
|
|
|
|
|
|
items: list
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
let group = res.data.group
|
|
|
|
|
|
|
|
if (group.length > 1000000000) {
|
|
|
|
|
|
|
|
ItemGroupShow.value = true;
|
|
|
|
|
|
|
|
ItemGroup.value = group
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
SelectClear();
|
|
|
|
|
|
|
|
let d = []
|
|
|
|
|
|
|
|
group[0].forEach((vv, ii) => {
|
|
|
|
|
|
|
|
d.push(tableData.value[vv.rowid])
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
autoSeleted(d)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const ClickGroup = (group) => {
|
|
|
|
|
|
|
|
SelectClear();
|
|
|
|
|
|
|
|
let d = []
|
|
|
|
|
|
|
|
group.forEach((v, i) => {
|
|
|
|
|
|
|
|
d.push(tableData.value[v.rowid])
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
autoSeleted(d)
|
|
|
|
|
|
|
|
ItemGroupShow.value = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let selectedUrl = ref('')
|
|
|
|
|
|
|
|
let fileUrl = import.meta.env.VITE_APP_FILE
|
|
|
|
|
|
|
|
let iframe_show = ref(false)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const openIframe = (type) => {
|
|
|
|
|
|
|
|
console.log(tableSelected.value)
|
|
|
|
|
|
|
|
let entrustids=[]
|
|
|
|
|
|
|
|
do_type.value = type
|
|
|
|
|
|
|
|
console.log(tableSelected.value);
|
|
|
|
|
|
|
|
if (tableSelected.value.length === 0) {
|
|
|
|
|
|
|
|
ElMessage.error('请勾选1条记录')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let next=true
|
|
|
|
|
|
|
|
tableSelected.value.forEach((v,i)=>{
|
|
|
|
|
|
|
|
if(type==1 && v.list_status!=0){
|
|
|
|
|
|
|
|
ElMessage.error(v.entrust+" 不可进行预约操作")
|
|
|
|
|
|
|
|
next=false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(type==2 && v.list_status!=1){
|
|
|
|
|
|
|
|
ElMessage.error(v.entrust+" 不可进行改约操作")
|
|
|
|
|
|
|
|
next=false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
entrustids.push(v.entrust_id)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if(next==false) return false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
YuYueKey.value++
|
|
|
|
|
|
|
|
entrust_ids.value=entrustids.join(',')
|
|
|
|
|
|
|
|
YuYueVueDialogVisible.value=true
|
|
|
|
|
|
|
|
selectedUrl.value = fileUrl + '/jq_page/appointment.html?' + 'regnum=' + encodeURIComponent(tableSelected
|
|
|
|
|
|
|
|
.value[0].reg_num) + '&entrustid=' + encodeURIComponent(entrustids) + '&episodeid=' + encodeURIComponent(tableSelected
|
|
|
|
|
|
|
|
.value[0].episodeid) + '&dotype=' + do_type.value + '&appointment_type=4'
|
|
|
|
|
|
|
|
console.log(selectedUrl.value)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const dialogopened = () => {
|
|
|
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
|
|
|
const oIframe = document.getElementById('bdIframe')
|
|
|
|
|
|
|
|
const deviceHeight = document.getElementsByClassName('el-dialog')[0].clientHeight
|
|
|
|
|
|
|
|
oIframe.style.height = (deviceHeight - 105) + 'px'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const cancel = () => {
|
|
|
|
|
|
|
|
if (tableSelected.value.length === 0) {
|
|
|
|
|
|
|
|
ElMessage.error('请勾选1条记录')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let next = true
|
|
|
|
|
|
|
|
tableSelected.value.forEach((v) => {
|
|
|
|
|
|
|
|
if (v.list_status != 1) {
|
|
|
|
|
|
|
|
ElMessage.error(`${v.entrust} 无需取消`)
|
|
|
|
|
|
|
|
next = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (!next) return false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleSuccessAction = (password) => {
|
|
|
|
|
|
|
|
CancelYuYue({
|
|
|
|
|
|
|
|
MainListId: tableSelected.value[0].id,
|
|
|
|
|
|
|
|
reg_num: tableSelected.value[0].reg_num,
|
|
|
|
|
|
|
|
do_user: loginUserinfo.value.id,
|
|
|
|
|
|
|
|
password: password,
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
ElMessage({
|
|
|
|
|
|
|
|
message: res.msg,
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
console.error(err)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (loginType.value === 'SysLogin') {
|
|
|
|
|
|
|
|
ElMessageBox.prompt('请输入登录密码后再操作', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
|
|
inputType: 'password',
|
|
|
|
|
|
|
|
inputPattern: /.+/,
|
|
|
|
|
|
|
|
inputErrorMessage: '密码不能为空'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(({ value }) => {
|
|
|
|
|
|
|
|
handleSuccessAction(value)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (loginType.value === 'HisLogin' || loginType.value === 'CasLogin') {
|
|
|
|
|
|
|
|
ElMessageBox.confirm('确定要执行取消操作吗?', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
handleSuccessAction('noPassword')
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
ElMessage.error('未知的操作类型配置')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let EnableDeviceList = ref([])
|
|
|
|
|
|
|
|
const GetEnableDeviceListFunc = () => {
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
GetEnableDeviceList().then(res => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
EnableDeviceList.value = res.data
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let enableResourceList = ref([])
|
|
|
|
|
|
|
|
const getEnableResource = () => {
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
DepartmentResourceGetEnableList({
|
|
|
|
|
|
|
|
department_id: selectedDeptId.value || undefined
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
enableResourceList.value = res.data
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 获取科室列表
|
|
|
|
|
|
|
|
const getDeptList = () => {
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
GetFilteredDepartmentList({}).then(res => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
deptList.value = res.data.list
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 切换科室:联动更新资源列表,重置已选资源
|
|
|
|
|
|
|
|
const deptChange = () => {
|
|
|
|
|
|
|
|
searchInfo.value.resources = []
|
|
|
|
|
|
|
|
enableResourceList.value = []
|
|
|
|
|
|
|
|
getEnableResource()
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const GetServiceDate = () => {
|
|
|
|
|
|
|
|
GetServiceDateTime().then(res => {
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
let datetime = res.data.datetime.substr(0, 10)
|
|
|
|
|
|
|
|
searchInfo.value.dateRange = [datetime, datetime]
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let LogShow = ref(false);
|
|
|
|
|
|
|
|
let LogList = ref(null);
|
|
|
|
|
|
|
|
let LogDataShow = ref(false);
|
|
|
|
|
|
|
|
const showLog = (row) => {
|
|
|
|
|
|
|
|
LogShow.value = true
|
|
|
|
|
|
|
|
GetLoglist({
|
|
|
|
|
|
|
|
id: row.id
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
LogList.value = res.data
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let LogDataJson = ref('');
|
|
|
|
|
|
|
|
const showLogJson = (data) => {
|
|
|
|
|
|
|
|
LogDataShow.value = true
|
|
|
|
|
|
|
|
LogDataJson.value = data
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let loginUserinfo=ref(null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let print_shenqingdan_button=ref(null);
|
|
|
|
|
|
|
|
let shenqingdan_list=ref([])
|
|
|
|
|
|
|
|
const print_shenqingdan=()=>{
|
|
|
|
|
|
|
|
if(tableSelected.value.length !==1){
|
|
|
|
|
|
|
|
ElMessage.error('请选择1项进行打印')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getMainDetail({
|
|
|
|
|
|
|
|
regnum: tableSelected.value[0].reg_num,
|
|
|
|
|
|
|
|
entrustid: tableSelected.value[0].entrust_id,
|
|
|
|
|
|
|
|
episodeid: tableSelected.value[0].episodeid,
|
|
|
|
|
|
|
|
appointment_type:4
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
let enable=true
|
|
|
|
|
|
|
|
shenqingdan_list.value=res.data.info
|
|
|
|
|
|
|
|
shenqingdan_list.value.forEach((v,i)=>{
|
|
|
|
|
|
|
|
if(v.maininfo.list_status!=1){
|
|
|
|
|
|
|
|
ElMessage.error(v.maininfo.entrust+" 不可打印,请重新选择")
|
|
|
|
|
|
|
|
enable=false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if(enable){
|
|
|
|
|
|
|
|
shenqingdan_show.value=true
|
|
|
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
|
|
|
print_shenqingdan_button.value.$el.click();
|
|
|
|
|
|
|
|
shenqingdan_show.value=false
|
|
|
|
|
|
|
|
},500)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const closeYuYueDialog=()=>{
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let TiShiShow=ref(false);
|
|
|
|
|
|
|
|
let successItem=ref([]);
|
|
|
|
|
|
|
|
let failItem=ref([]);
|
|
|
|
|
|
|
|
const SignInFunc=()=>{
|
|
|
|
|
|
|
|
if (tableSelected.value.length === 0) {
|
|
|
|
|
|
|
|
ElMessage.error('请勾选1条记录')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let ids=[];
|
|
|
|
|
|
|
|
tableSelected.value.forEach((v,i)=>{
|
|
|
|
|
|
|
|
ids.push(v.id)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
loading.value=true;
|
|
|
|
|
|
|
|
SignIn({
|
|
|
|
|
|
|
|
MainListIds:ids
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
loading.value=false
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
if(res.data.success.length==ids.length){
|
|
|
|
|
|
|
|
ElMessage({
|
|
|
|
|
|
|
|
message: "签到成功",
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
TiShiShow.value=true
|
|
|
|
|
|
|
|
successItem.value=res.data.success
|
|
|
|
|
|
|
|
failItem.value=res.data.fail
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
TiShiShow.value=true
|
|
|
|
|
|
|
|
successItem.value=res.data.success
|
|
|
|
|
|
|
|
failItem.value=res.data.fail
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const CancelSignFunc=()=>{
|
|
|
|
|
|
|
|
if (tableSelected.value.length === 0) {
|
|
|
|
|
|
|
|
ElMessage.error('请勾选1条记录')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let ids=[];
|
|
|
|
|
|
|
|
tableSelected.value.forEach((v,i)=>{
|
|
|
|
|
|
|
|
ids.push(v.id)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
loading.value=true;
|
|
|
|
|
|
|
|
CancelSign({
|
|
|
|
|
|
|
|
MainListIds:ids
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
loading.value=false
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
if(res.data.success.length==ids.length){
|
|
|
|
|
|
|
|
ElMessage({
|
|
|
|
|
|
|
|
message: "取消成功",
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
TiShiShow.value=true
|
|
|
|
|
|
|
|
successItem.value=res.data.success
|
|
|
|
|
|
|
|
failItem.value=res.data.fail
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const getStorageData=()=>{
|
|
|
|
|
|
|
|
if(sessionStorage.getItem("LoginUserInfo")){
|
|
|
|
|
|
|
|
loginUserinfo.value=JSON.parse(sessionStorage.getItem("LoginUserInfo"))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if((loginUserinfo.value && loginUserinfo.value.group==7) || loginType.value==='HisLogin'){
|
|
|
|
|
|
|
|
searchInfo.value.doctor=loginUserinfo.value.cn_name
|
|
|
|
|
|
|
|
let default_reg_num=sessionStorage.getItem("default_reg_num")
|
|
|
|
|
|
|
|
if(default_reg_num && default_reg_num!='null' && default_reg_num!=''){
|
|
|
|
|
|
|
|
searchInfo.value.reg_num=default_reg_num
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
loginType.value=sessionStorage.getItem('LoginType')
|
|
|
|
|
|
|
|
GetEnableDeviceListFunc()
|
|
|
|
|
|
|
|
getDeptList()
|
|
|
|
|
|
|
|
if(pinia.baseInfoStatus){
|
|
|
|
|
|
|
|
getStorageData()
|
|
|
|
|
|
|
|
getEnableResource()
|
|
|
|
|
|
|
|
GetServiceDate()
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
const unwatch = watch(
|
|
|
|
|
|
|
|
() => pinia.baseInfoStatus,
|
|
|
|
|
|
|
|
(newVal) => {
|
|
|
|
|
|
|
|
if (newVal) {
|
|
|
|
|
|
|
|
getStorageData()
|
|
|
|
|
|
|
|
getEnableResource()
|
|
|
|
|
|
|
|
GetServiceDate()
|
|
|
|
|
|
|
|
unwatch();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style >
|
|
|
|
|
|
|
|
.iframe {
|
|
|
|
|
|
|
|
border: 0px;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
margin-top: -20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.iframeDialog {
|
|
|
|
|
|
|
|
margin-top: 40px;
|
|
|
|
|
|
|
|
height: 90%;
|
|
|
|
|
|
|
|
width: 90%;
|
|
|
|
|
|
|
|
overflow: auto;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
.dialogitem {
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
border-left: 1px solid #ccc;
|
|
|
|
|
|
|
|
border-right: 1px solid #ccc;
|
|
|
|
|
|
|
|
border-bottom: 1px solid #ccc;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.dialogitem:hover {
|
|
|
|
|
|
|
|
background-color: darkcyan;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|