|
|
|
@ -1,8 +1,8 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div class="head">
|
|
|
|
<div class="head">
|
|
|
|
<el-row>
|
|
|
|
<el-row style="display: flex; justify-content: end;">
|
|
|
|
<el-form-item>
|
|
|
|
<!-- <el-form-item>
|
|
|
|
<el-select :filterable="true" clearable v-model="searchInfo.department_id" placeholder="选择科室"
|
|
|
|
<el-select :filterable="true" clearable v-model="searchInfo.department_id" placeholder="选择科室"
|
|
|
|
style="margin-left: 8px;width: 150px;">
|
|
|
|
style="margin-left: 8px;width: 150px;">
|
|
|
|
<el-option v-for="(item,index) in EnableDepartmentList" :key="index"
|
|
|
|
<el-option v-for="(item,index) in EnableDepartmentList" :key="index"
|
|
|
|
@ -37,68 +37,76 @@
|
|
|
|
<el-option label="关闭" value="0" />
|
|
|
|
<el-option label="关闭" value="0" />
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-button @click="GetList()" style="margin-left: 10px;">搜索</el-button>
|
|
|
|
<el-button @click="GetList()" style="margin-left: 10px;">搜索</el-button> -->
|
|
|
|
<el-button type="primary" @click="Add()" style="margin-left: 10px;">添加</el-button>
|
|
|
|
<el-button type="primary" @click="Add()" style="margin-left: 10px;">添加</el-button>
|
|
|
|
<el-button type="danger" @click="Del()" style="margin-left: 10px;">删除</el-button>
|
|
|
|
<el-button type="danger" @click="Del()" style="margin-left: 10px;">删除</el-button>
|
|
|
|
<el-button type="success" @click="CreatedPlanClick()" style="margin-left: 20px;">生成选中的计划</el-button>
|
|
|
|
<el-button type="success" @click="CreatedPlanClick()" style="margin-left: 20px;">生成选中的计划</el-button>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-radio-group style="margin-bottom: 8px;" v-model="searchInfo.date_type"
|
|
|
|
<el-radio-group style="margin-bottom: 8px;" v-model="searchInfo.date_type" @change="DateTypeChange()">
|
|
|
|
@change="DateTypeChange()">
|
|
|
|
|
|
|
|
<el-radio-button :label="1">工作日</el-radio-button>
|
|
|
|
<el-radio-button :label="1">工作日</el-radio-button>
|
|
|
|
<el-radio-button :label="2">节假日</el-radio-button>
|
|
|
|
<el-radio-button :label="2">节假日</el-radio-button>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-table :data="tableData" :span-method="arraySpanMethod" border style="width: 100%;" row-key="id"
|
|
|
|
<div style="display: flex;" class="planInfo">
|
|
|
|
v-loading="loading" @selection-change="handleSelectionChange">
|
|
|
|
<div style=" border-right: 1px solid #dadada;padding-right: 4px;">
|
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
|
<div v-for="(item,index) in zhenShiList" :key="index" @click="zhenshiClick(item.resources_name)"
|
|
|
|
<el-table-column prop="id" label="Id" width="70" />
|
|
|
|
:class="{'zhenshiButton zhenshiButtonActive':item.resources_name===activeZhenShi,'zhenshiButton':item.resources_name !==activeZhenShi}">
|
|
|
|
<el-table-column prop="weekname" label="星期" width="80" v-if="searchInfo.date_type==1"/>
|
|
|
|
{{item.resources_name}}
|
|
|
|
<el-table-column prop="resources_id" label="" v-if="false" />
|
|
|
|
</div>
|
|
|
|
<el-table-column prop="department_resources_name" label="资源" width="150" />
|
|
|
|
</div>
|
|
|
|
<el-table-column prop="" label="服务组" show-overflow-tooltip width="150">
|
|
|
|
<div v-loading="loading" style="border: 1px solid #efefef;width: 100%;">
|
|
|
|
<template #default="scope">
|
|
|
|
<table class="planTable" v-if="planTableData.length>0" >
|
|
|
|
<div class="type_count" v-if="scope.row.devices.length>0">
|
|
|
|
<tr style="background-color: #f1f1f1;position: relative;">
|
|
|
|
<div v-for="(item,index) in scope.row.devices" :key="index"
|
|
|
|
<td style="width: 120px;display: flex;font-size: 12px;">
|
|
|
|
:class="(item.status==1 && item.is_del==0) ? '':'hongzi'">{{ item.device_name }}</div>
|
|
|
|
<div style="margin-left: 30px;margin-right: 6px;">全选</div>
|
|
|
|
</div>
|
|
|
|
<div :class="{'plan_checkAllbox plan_checkAllbox_active':PlanSelectedAll===1,'plan_checkAllbox ':PlanSelectedAll===0}"
|
|
|
|
</template>
|
|
|
|
@click="selectedAllPlanFunc()">
|
|
|
|
</el-table-column>
|
|
|
|
<el-icon v-if="PlanSelectedAll===1" color="#ffffff"><Select /></el-icon>
|
|
|
|
<el-table-column prop="period_name" label="时段" width="100" />
|
|
|
|
</div>
|
|
|
|
<el-table-column prop="begin_time" label="开始时间" width="100" />
|
|
|
|
</td>
|
|
|
|
<el-table-column prop="end_time" label="结束时间" width="100" />
|
|
|
|
<td style="font-weight: 700;" v-for="(item,index) in xingqi">{{item.label}}</td>
|
|
|
|
<el-table-column prop="" label="类型数量" show-overflow-tooltip>
|
|
|
|
</tr>
|
|
|
|
<template #default="scope">
|
|
|
|
<tr v-for="(item,index) in planTableData" :key="index">
|
|
|
|
<div class="type_count" v-if="scope.row.countsInfo.length>0">
|
|
|
|
<td v-for="(item2,index2) in item" :key="index2" @mouseover="showTools(item2.id)"
|
|
|
|
<div style="font-weight: 700">最大数量:{{ scope.row.countsInfo[0].max_total }}</div>
|
|
|
|
@mouseleave="hideTools(item2.id)">
|
|
|
|
<div v-for="(item,index) in scope.row.countsInfo" :key="index">{{ item.name }}:{{ item.count
|
|
|
|
<span v-if="index2=='time_range'">{{item2}}</span>
|
|
|
|
}}
|
|
|
|
<div v-if="item2.countsInfo && item2.countsInfo.length>0" :class="{'planInfo_k':item2.status==1,'planInfo_k planInfo_k_disabled':item2.status==0}">
|
|
|
|
</div>
|
|
|
|
<div v-if="hoverIndex==item2.id" class="hoverTools">
|
|
|
|
</div>
|
|
|
|
<div class="icon_k" @click="Add(item2)">
|
|
|
|
</template>
|
|
|
|
<el-icon color="#409eff" size="20">
|
|
|
|
</el-table-column>
|
|
|
|
<Edit />
|
|
|
|
<el-table-column prop="end_reservation_time" label="预约截止时间" width="120" />
|
|
|
|
</el-icon>
|
|
|
|
<!-- <el-table-column prop="time_unit" label="可用时长" width="80" /> -->
|
|
|
|
</div>
|
|
|
|
<el-table-column prop="roster_status" label="状态" width="80">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
</div>
|
|
|
|
<el-tag v-if="scope.row.status === 1" class="ml-2" type="success">正常</el-tag>
|
|
|
|
<div :class="{'plan_checkbox plan_checkbox_active':isSelected(item2.id),'plan_checkbox':!isSelected(item2.id)}"
|
|
|
|
<el-tag v-if="scope.row.status === 0" class="ml-2" type="danger">关闭</el-tag>
|
|
|
|
@click="checkBoxCheckFunc(item2.id)">
|
|
|
|
</template>
|
|
|
|
<el-icon v-if="isSelected(item2.id)" color="#ffffff"><Select /></el-icon>
|
|
|
|
</el-table-column>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="" label="操作" width="80">
|
|
|
|
<div class="qudao_count_row">
|
|
|
|
<template #default="scope">
|
|
|
|
<div class="qudao_title_zong"><span>总</span>{{item2.countsInfo[0].max_total}}
|
|
|
|
<el-button type="primary" @click="Add(scope.row)" size="small" style="margin-left: 10px;">修改
|
|
|
|
</div>
|
|
|
|
</el-button>
|
|
|
|
<div v-for="(item3,index3) in item2.countsInfo" :key="index3">
|
|
|
|
</template>
|
|
|
|
<span> {{item3.jiancheng}}</span><span>{{item3.count}} </span>
|
|
|
|
</el-table-column>
|
|
|
|
</div>
|
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
<!-- <div class="page">
|
|
|
|
<div class="patient_type_row">
|
|
|
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize"
|
|
|
|
<div class="tps" v-for="(item3,index3) in item2.patient_type_label">
|
|
|
|
:page-sizes="[15, 50, 100, 200]" layout="total,sizes, prev, pager, next" :total="total"
|
|
|
|
{{item3}}
|
|
|
|
@size-change="PageSizeChange" @current-change="PageCurrentChange" />
|
|
|
|
</div>
|
|
|
|
</div> -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div v-if="planTableData.length==0" style="width: 100%;background-color: #fff;">
|
|
|
|
|
|
|
|
<el-empty description="暂无" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<el-dialog v-model="dialogVisible" :title="'时间段('+date_type_name+')'" width="45%">
|
|
|
|
<el-dialog v-model="dialogVisible" :title="'时间段('+date_type_name+')'" width="45%">
|
|
|
|
<el-form ref="PlanInfoForm" :model="PlanInfo" label-width="100px" v-loading="loading"
|
|
|
|
<el-form ref="PlanInfoForm" :model="PlanInfo" label-width="100px" v-loading="loading"
|
|
|
|
style="padding-right: 40px;">
|
|
|
|
style="padding-right: 40px;">
|
|
|
|
@ -125,8 +133,8 @@
|
|
|
|
v-model="PlanInfo.max_total" :min="1" placeholder="0"
|
|
|
|
v-model="PlanInfo.max_total" :min="1" placeholder="0"
|
|
|
|
oninput="value=value.replace(/^0|[^0-9]/g, '')" />
|
|
|
|
oninput="value=value.replace(/^0|[^0-9]/g, '')" />
|
|
|
|
<el-input v-if="CountType==2" style="width: 220px;" @input="TimeLongChange" type="number"
|
|
|
|
<el-input v-if="CountType==2" style="width: 220px;" @input="TimeLongChange" type="number"
|
|
|
|
v-model="PlanInfo.time_long" :min="1" placeholder="0"
|
|
|
|
v-model="PlanInfo.time_long" :min="1" placeholder="0"
|
|
|
|
oninput="value=value.replace(/^0|[^0-9]/g, '')" />
|
|
|
|
oninput="value=value.replace(/^0|[^0-9]/g, '')" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div style="font-size: 12px;color: #999">设置渠道比例可自动分配</div>
|
|
|
|
<div style="font-size: 12px;color: #999">设置渠道比例可自动分配</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -226,8 +234,8 @@
|
|
|
|
end-placeholder="结束时间" value-format="YYYY-MM-DD" />
|
|
|
|
end-placeholder="结束时间" value-format="YYYY-MM-DD" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="节假日生成:">
|
|
|
|
<el-form-item label="节假日生成:">
|
|
|
|
<el-switch v-model="HolidayEnable" size="large" active-text="是" inactive-text="否"
|
|
|
|
<el-switch v-model="HolidayEnable" size="large" active-text="是" inactive-text="否" :active-value="1"
|
|
|
|
:active-value="1" :inactive-value="0" />
|
|
|
|
:inactive-value="0" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<template #footer>
|
|
|
|
<template #footer>
|
|
|
|
@ -268,10 +276,14 @@
|
|
|
|
} from 'element-plus'
|
|
|
|
} from 'element-plus'
|
|
|
|
let CountType = ref("1"); //渠道数量设置方式
|
|
|
|
let CountType = ref("1"); //渠道数量设置方式
|
|
|
|
let loading = ref(false)
|
|
|
|
let loading = ref(false)
|
|
|
|
let tableData = ref([])
|
|
|
|
|
|
|
|
let currentPage = ref(1) //当前页码
|
|
|
|
let currentPage = ref(1) //当前页码
|
|
|
|
let pageSize = ref(15) //每页数量
|
|
|
|
let pageSize = ref(15) //每页数量
|
|
|
|
let total = 0 //总数量
|
|
|
|
let total = 0 //总数量
|
|
|
|
|
|
|
|
let zhenShiList = ref([])
|
|
|
|
|
|
|
|
let activeZhenShi = ref('');
|
|
|
|
|
|
|
|
let planTableData = ref([])
|
|
|
|
|
|
|
|
let selectedPlanArr = ref([]) //选中的号源id数组
|
|
|
|
|
|
|
|
let PlanSelectedAll = ref(0)
|
|
|
|
const PageSizeChange = (e) => { // 修改每页数量
|
|
|
|
const PageSizeChange = (e) => { // 修改每页数量
|
|
|
|
pageSize.value = e
|
|
|
|
pageSize.value = e
|
|
|
|
GetList()
|
|
|
|
GetList()
|
|
|
|
@ -280,33 +292,69 @@
|
|
|
|
currentPage.value = e
|
|
|
|
currentPage.value = e
|
|
|
|
GetList()
|
|
|
|
GetList()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let tableSelected = ref([])
|
|
|
|
|
|
|
|
const handleSelectionChange = (e) => {
|
|
|
|
|
|
|
|
tableSelected.value = e
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let dateRange = ref([]) //生成计划明细时,选择的日期范围
|
|
|
|
let dateRange = ref([]) //生成计划明细时,选择的日期范围
|
|
|
|
let CreatePlanDialogVisible = ref(false)
|
|
|
|
let CreatePlanDialogVisible = ref(false)
|
|
|
|
const CreatedPlanClick = () => { //点击生成计划明细按钮
|
|
|
|
const CreatedPlanClick = () => { //点击生成计划明细按钮
|
|
|
|
if (tableSelected.value.length === 0) {
|
|
|
|
if (selectedPlanArr.value.length === 0) {
|
|
|
|
ElMessage.error("请至少勾选1条记录")
|
|
|
|
ElMessage.error("请至少勾选1条记录")
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CreatePlanDialogVisible.value = true;
|
|
|
|
CreatePlanDialogVisible.value = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const zhenshiClick = (zhenshi) => {
|
|
|
|
|
|
|
|
activeZhenShi.value = zhenshi
|
|
|
|
|
|
|
|
PlanSelectedAll.value = 0
|
|
|
|
|
|
|
|
selectedPlanArr.value = []
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const selectedAllPlanFunc = () => {
|
|
|
|
|
|
|
|
PlanSelectedAll.value = PlanSelectedAll.value === 0 ? 1 : 0;
|
|
|
|
|
|
|
|
if (PlanSelectedAll.value === 0) {
|
|
|
|
|
|
|
|
selectedPlanArr.value = []
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (PlanSelectedAll.value === 1) {
|
|
|
|
|
|
|
|
planTableData.value.forEach((v, i) => {
|
|
|
|
|
|
|
|
console.log(v)
|
|
|
|
|
|
|
|
for (let key in v) {
|
|
|
|
|
|
|
|
if (key != 'time_range') {
|
|
|
|
|
|
|
|
selectedPlanArr.value.push(v[key].id)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let hoverIndex = ref(null)
|
|
|
|
|
|
|
|
const showTools = (index) => {
|
|
|
|
|
|
|
|
hoverIndex.value = index
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const hideTools = (index) => {
|
|
|
|
|
|
|
|
hoverIndex.value = null
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const isSelected = (id) => {
|
|
|
|
|
|
|
|
return selectedPlanArr.value.includes(id)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const checkBoxCheckFunc = (id) => {
|
|
|
|
|
|
|
|
const index = selectedPlanArr.value.indexOf(id);
|
|
|
|
|
|
|
|
if (index === -1) {
|
|
|
|
|
|
|
|
selectedPlanArr.value.push(id);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
selectedPlanArr.value = selectedPlanArr.value.filter(item => item !== id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
const CreatedPlanAction = () => { //调用生成计划明细接口
|
|
|
|
const CreatedPlanAction = () => { //调用生成计划明细接口
|
|
|
|
if (dateRange.value.length === 0) {
|
|
|
|
if (dateRange.value.length === 0) {
|
|
|
|
ElMessage.error("请选择日期范围")
|
|
|
|
ElMessage.error("请选择日期范围")
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let ids = [];
|
|
|
|
|
|
|
|
tableSelected.value.forEach((v, i) => {
|
|
|
|
|
|
|
|
ids.push(v.id)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
CreatePlanList({
|
|
|
|
CreatePlanList({
|
|
|
|
dateRange: dateRange.value,
|
|
|
|
dateRange: dateRange.value,
|
|
|
|
ids: ids,
|
|
|
|
ids: selectedPlanArr.value,
|
|
|
|
HolidayEnable:HolidayEnable.value,
|
|
|
|
HolidayEnable: HolidayEnable.value,
|
|
|
|
date_type:searchInfo.value.date_type
|
|
|
|
date_type: searchInfo.value.date_type
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
if (res.status) {
|
|
|
|
if (res.status) {
|
|
|
|
CreatePlanDialogVisible.value = false;
|
|
|
|
CreatePlanDialogVisible.value = false;
|
|
|
|
@ -331,17 +379,86 @@
|
|
|
|
xingqi: null,
|
|
|
|
xingqi: null,
|
|
|
|
status: null,
|
|
|
|
status: null,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
let HolidayEnable=ref(1)
|
|
|
|
let HolidayEnable = ref(1)
|
|
|
|
let date_type_name =ref('工作日')
|
|
|
|
let date_type_name = ref('工作日')
|
|
|
|
let dialogVisible = ref(false)
|
|
|
|
let dialogVisible = ref(false)
|
|
|
|
const GetList = () => {
|
|
|
|
const GetList = () => {
|
|
|
|
|
|
|
|
loading.value=true
|
|
|
|
PlanModelGetList({
|
|
|
|
PlanModelGetList({
|
|
|
|
page: currentPage.value,
|
|
|
|
page: currentPage.value,
|
|
|
|
pageSize: pageSize.value,
|
|
|
|
pageSize: pageSize.value,
|
|
|
|
searchInfo: searchInfo.value
|
|
|
|
searchInfo: searchInfo.value
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
tableData.value = res.data.list
|
|
|
|
loading.value=false
|
|
|
|
total = res.data.count
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
planTableData.value = []
|
|
|
|
|
|
|
|
selectedPlanArr.value = []
|
|
|
|
|
|
|
|
let plans = res.data.list
|
|
|
|
|
|
|
|
if (plans.length > 0) {
|
|
|
|
|
|
|
|
if (activeZhenShi.value == '') activeZhenShi.value = plans[0].department_resources_name
|
|
|
|
|
|
|
|
const timeSlotsSet = new Set();
|
|
|
|
|
|
|
|
const uniqueMap = new Map();
|
|
|
|
|
|
|
|
plans.forEach((v, i) => {
|
|
|
|
|
|
|
|
if (v.department_resources_name == activeZhenShi.value) {
|
|
|
|
|
|
|
|
const timeRange =
|
|
|
|
|
|
|
|
`${v.begin_time.substring(0,5)}-${v.end_time.substring(0,5)}`;
|
|
|
|
|
|
|
|
timeSlotsSet.add(timeRange);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const key = v.resources_id; // 按照你要去重的字段
|
|
|
|
|
|
|
|
if (!uniqueMap.has(key)) {
|
|
|
|
|
|
|
|
uniqueMap.set(key, {
|
|
|
|
|
|
|
|
resources_id: v.resources_id,
|
|
|
|
|
|
|
|
resources_name: v.department_resources_name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
zhenShiList.value = Array.from(uniqueMap.values());
|
|
|
|
|
|
|
|
const timeSlots = Array.from(timeSlotsSet).sort(); // 排序可选
|
|
|
|
|
|
|
|
// Step 2: 构建表格数据
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
timeSlots.forEach(timeRange => {
|
|
|
|
|
|
|
|
const row = {
|
|
|
|
|
|
|
|
time_range: timeRange
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xingqi.value.forEach(xingqi => {
|
|
|
|
|
|
|
|
const matchingPlan = plans.find(
|
|
|
|
|
|
|
|
v =>
|
|
|
|
|
|
|
|
`${v.begin_time.substring(0,5)}-${v.end_time.substring(0,5)}` ===
|
|
|
|
|
|
|
|
timeRange && v.weekname === xingqi.label && v
|
|
|
|
|
|
|
|
.department_resources_name == activeZhenShi.value
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
let plan_enable = false
|
|
|
|
|
|
|
|
if (matchingPlan) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
row[xingqi.label] = {
|
|
|
|
|
|
|
|
countsInfo: matchingPlan.countsInfo,
|
|
|
|
|
|
|
|
patient_type_label: matchingPlan.patient_type_label,
|
|
|
|
|
|
|
|
status: matchingPlan.status,
|
|
|
|
|
|
|
|
id: matchingPlan.id,
|
|
|
|
|
|
|
|
resources_id:matchingPlan.resources_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
row[xingqi.label] = {
|
|
|
|
|
|
|
|
countsInfo: null,
|
|
|
|
|
|
|
|
patient_type_label: null,
|
|
|
|
|
|
|
|
status: null,
|
|
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
|
|
resources_id:null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
planTableData.value.push(row);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -388,6 +505,7 @@
|
|
|
|
let PlanInfo = ref(DataDefault())
|
|
|
|
let PlanInfo = ref(DataDefault())
|
|
|
|
|
|
|
|
|
|
|
|
const Add = (row = null) => {
|
|
|
|
const Add = (row = null) => {
|
|
|
|
|
|
|
|
devicesList.value=[]
|
|
|
|
CheckedAll.value = false
|
|
|
|
CheckedAll.value = false
|
|
|
|
dialogVisible.value = true
|
|
|
|
dialogVisible.value = true
|
|
|
|
PlanInfo.value = DataDefault()
|
|
|
|
PlanInfo.value = DataDefault()
|
|
|
|
@ -406,9 +524,9 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const DateTypeChange=()=>{
|
|
|
|
const DateTypeChange = () => {
|
|
|
|
if(searchInfo.value.date_type==1) date_type_name.value='工作日'
|
|
|
|
if (searchInfo.value.date_type == 1) date_type_name.value = '工作日'
|
|
|
|
if(searchInfo.value.date_type==2) date_type_name.value='节假日'
|
|
|
|
if (searchInfo.value.date_type == 2) date_type_name.value = '节假日'
|
|
|
|
GetList()
|
|
|
|
GetList()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const Save = () => {
|
|
|
|
const Save = () => {
|
|
|
|
@ -433,7 +551,7 @@
|
|
|
|
.then(() => {
|
|
|
|
.then(() => {
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
PlanModelSave({
|
|
|
|
PlanModelSave({
|
|
|
|
date_type:searchInfo.value.date_type,
|
|
|
|
date_type: searchInfo.value.date_type,
|
|
|
|
planInfo: PlanInfo.value
|
|
|
|
planInfo: PlanInfo.value
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
@ -448,14 +566,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const Del = () => {
|
|
|
|
const Del = () => {
|
|
|
|
if (tableSelected.value.length == 0) {
|
|
|
|
if (selectedPlanArr.value.length == 0) {
|
|
|
|
ElMessage.error("请至少勾选1条记录")
|
|
|
|
ElMessage.error("请至少勾选1条记录")
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let ids = []
|
|
|
|
|
|
|
|
tableSelected.value.map((item) => {
|
|
|
|
|
|
|
|
ids.push(item.id)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
ElMessageBox.confirm(
|
|
|
|
ElMessageBox.confirm(
|
|
|
|
'确定删除吗?',
|
|
|
|
'确定删除吗?',
|
|
|
|
'提示', {
|
|
|
|
'提示', {
|
|
|
|
@ -466,7 +581,7 @@
|
|
|
|
).then(() => {
|
|
|
|
).then(() => {
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
PlanModelDel({
|
|
|
|
PlanModelDel({
|
|
|
|
ids: ids
|
|
|
|
ids: selectedPlanArr.value
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
if (res.status) {
|
|
|
|
if (res.status) {
|
|
|
|
@ -581,7 +696,9 @@
|
|
|
|
let TimePeriodList = ref([])
|
|
|
|
let TimePeriodList = ref([])
|
|
|
|
const GetEnableTimePeriod = () => {
|
|
|
|
const GetEnableTimePeriod = () => {
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
TimePeriodGetEnableList({date_type:searchInfo.value.date_type}).then(res => {
|
|
|
|
TimePeriodGetEnableList({
|
|
|
|
|
|
|
|
date_type: searchInfo.value.date_type
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
if (res.status) {
|
|
|
|
if (res.status) {
|
|
|
|
TimePeriodList.value = res.data
|
|
|
|
TimePeriodList.value = res.data
|
|
|
|
@ -700,60 +817,7 @@
|
|
|
|
PlanInfo.value.xingqi = []
|
|
|
|
PlanInfo.value.xingqi = []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//合并显示
|
|
|
|
|
|
|
|
let bb_countRowspan = 1;
|
|
|
|
|
|
|
|
const arraySpanMethod = ({
|
|
|
|
|
|
|
|
row,
|
|
|
|
|
|
|
|
column,
|
|
|
|
|
|
|
|
rowIndex,
|
|
|
|
|
|
|
|
columnIndex,
|
|
|
|
|
|
|
|
}) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const fields = ['weekname']
|
|
|
|
|
|
|
|
const cellValue = row[column.property]
|
|
|
|
|
|
|
|
let countRowspan = 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (cellValue && fields.includes(column.property)) {
|
|
|
|
|
|
|
|
const prevRow = tableData.value[rowIndex - 1]
|
|
|
|
|
|
|
|
let nextRow = tableData.value[rowIndex + 1]
|
|
|
|
|
|
|
|
if (prevRow && prevRow[column.property] === cellValue && prevRow.declareRegion == row.declareRegion) {
|
|
|
|
|
|
|
|
bb_countRowspan = countRowspan
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
rowspan: 0,
|
|
|
|
|
|
|
|
colspan: 0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
while (nextRow && nextRow[column.property] === cellValue && nextRow.declareRegion == row
|
|
|
|
|
|
|
|
.declareRegion) {
|
|
|
|
|
|
|
|
nextRow = tableData.value[++countRowspan + rowIndex]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (countRowspan > 1) {
|
|
|
|
|
|
|
|
bb_countRowspan = countRowspan
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
rowspan: countRowspan,
|
|
|
|
|
|
|
|
colspan: 1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// if (columnIndex === 3) {
|
|
|
|
|
|
|
|
// if (bb_countRowspan > 1) {
|
|
|
|
|
|
|
|
// return {
|
|
|
|
|
|
|
|
// rowspan: bb_countRowspan,
|
|
|
|
|
|
|
|
// colspan: 1
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// return {
|
|
|
|
|
|
|
|
// rowspan: 0,
|
|
|
|
|
|
|
|
// colspan: 0
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//总量设置方式切换
|
|
|
|
//总量设置方式切换
|
|
|
|
const CountTypeChange = (e) => {
|
|
|
|
const CountTypeChange = (e) => {
|
|
|
|
CountType.value = e
|
|
|
|
CountType.value = e
|
|
|
|
@ -764,7 +828,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//监听时长输入
|
|
|
|
//监听时长输入
|
|
|
|
const TimeLongChange=(timelong)=>{
|
|
|
|
const TimeLongChange = (timelong) => {
|
|
|
|
if (CountType.value == 2) { //如果是根据时长计算总量
|
|
|
|
if (CountType.value == 2) { //如果是根据时长计算总量
|
|
|
|
if (PlanInfo.value.begin_time == '' || PlanInfo.value.end_time == '') {
|
|
|
|
if (PlanInfo.value.begin_time == '' || PlanInfo.value.end_time == '') {
|
|
|
|
ElMessage.error("请先设置时段")
|
|
|
|
ElMessage.error("请先设置时段")
|
|
|
|
@ -776,31 +840,31 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//根据时长计算总量
|
|
|
|
//根据时长计算总量
|
|
|
|
const ComPuteCountByTime = (timelong) => {
|
|
|
|
const ComPuteCountByTime = (timelong) => {
|
|
|
|
let count=calculateTimeSegments(PlanInfo.value.begin_time,PlanInfo.value.end_time,timelong)
|
|
|
|
let count = calculateTimeSegments(PlanInfo.value.begin_time, PlanInfo.value.end_time, timelong)
|
|
|
|
PlanInfo.value.max_total=count
|
|
|
|
PlanInfo.value.max_total = count
|
|
|
|
MaxCountChange(count)
|
|
|
|
MaxCountChange(count)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//根据时间段和跨度算出数量
|
|
|
|
//根据时间段和跨度算出数量
|
|
|
|
function calculateTimeSegments(startTime, endTime, span) {
|
|
|
|
function calculateTimeSegments(startTime, endTime, span) {
|
|
|
|
// 将时间字符串转换为分钟数
|
|
|
|
// 将时间字符串转换为分钟数
|
|
|
|
function timeToMinutes(timeStr) {
|
|
|
|
function timeToMinutes(timeStr) {
|
|
|
|
const [hours, minutes] = timeStr.split(':').map(Number);
|
|
|
|
const [hours, minutes] = timeStr.split(':').map(Number);
|
|
|
|
return hours * 60 + minutes;
|
|
|
|
return hours * 60 + minutes;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const startMinutes = timeToMinutes(startTime);
|
|
|
|
const startMinutes = timeToMinutes(startTime);
|
|
|
|
const endMinutes = timeToMinutes(endTime);
|
|
|
|
const endMinutes = timeToMinutes(endTime);
|
|
|
|
|
|
|
|
|
|
|
|
// 计算总的时间差(以分钟为单位)
|
|
|
|
// 计算总的时间差(以分钟为单位)
|
|
|
|
const totalMinutes = endMinutes - startMinutes;
|
|
|
|
const totalMinutes = endMinutes - startMinutes;
|
|
|
|
|
|
|
|
|
|
|
|
// 计算可以划分的时间段数量
|
|
|
|
// 计算可以划分的时间段数量
|
|
|
|
const segments = Math.floor(totalMinutes / span);
|
|
|
|
const segments = Math.floor(totalMinutes / span);
|
|
|
|
|
|
|
|
|
|
|
|
return segments;
|
|
|
|
return segments;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
searchInfo.value.date_type=1
|
|
|
|
searchInfo.value.date_type = 1
|
|
|
|
GetList()
|
|
|
|
GetList()
|
|
|
|
GetDepartmentEnableList()
|
|
|
|
GetDepartmentEnableList()
|
|
|
|
getEnableResource()
|
|
|
|
getEnableResource()
|
|
|
|
@ -810,7 +874,7 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.type_count {
|
|
|
|
.type_count {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -831,4 +895,168 @@
|
|
|
|
.hongzi {
|
|
|
|
.hongzi {
|
|
|
|
color: #b25252;
|
|
|
|
color: #b25252;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.planInfo {
|
|
|
|
|
|
|
|
.planTable {
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
border: 1px solid #f1f1f1;
|
|
|
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
|
|
|
/* 合并边框 */
|
|
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
td {
|
|
|
|
|
|
|
|
border: 1px solid #f1f1f1;
|
|
|
|
|
|
|
|
// padding: 6px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.table_plan_row td:first-child {
|
|
|
|
|
|
|
|
background-color: #f1f1f1;
|
|
|
|
|
|
|
|
border-bottom: 1px solid #e8e8e8;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.table_plan_row> :not(:first-child):hover {
|
|
|
|
|
|
|
|
background-color: #aeebf0;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.planActive {
|
|
|
|
|
|
|
|
background-color: #5bc0de;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plandisable {
|
|
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
opacity: 0.4;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.shuxian {
|
|
|
|
|
|
|
|
border-left: 1px solid #dfdfdf;
|
|
|
|
|
|
|
|
margin-left: 40px;
|
|
|
|
|
|
|
|
margin-right: 40px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.do_button {
|
|
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.zhenshiButton {
|
|
|
|
|
|
|
|
width: 150px;
|
|
|
|
|
|
|
|
line-height: 36px;
|
|
|
|
|
|
|
|
height: 36px;
|
|
|
|
|
|
|
|
border: 1px solid #e8e8e8;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
cursor: default;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.zhenshiButtonActive {
|
|
|
|
|
|
|
|
background-color: #5bc0de;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.planInfo_k_disabled{
|
|
|
|
|
|
|
|
background-color: #ffd6d2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.planInfo_k {
|
|
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
padding-top: 18px;
|
|
|
|
|
|
|
|
padding-bottom: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_checkbox {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 2px;
|
|
|
|
|
|
|
|
left: 2px;
|
|
|
|
|
|
|
|
height: 16px;
|
|
|
|
|
|
|
|
width: 16px;
|
|
|
|
|
|
|
|
border: 1px solid #98c4cc;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_checkbox_active {
|
|
|
|
|
|
|
|
background-color: #409eff;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.qudao_count_row {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
div {
|
|
|
|
|
|
|
|
margin-left: 6px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.qudao_title_zong {
|
|
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.patient_type_row {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.tps {
|
|
|
|
|
|
|
|
background-color: #ebfff4;
|
|
|
|
|
|
|
|
border: 1px solid #9fdebc;
|
|
|
|
|
|
|
|
color: #83b69a;
|
|
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
|
|
padding: 1px 2px;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
margin-left: 4px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.hoverTools {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 0px;
|
|
|
|
|
|
|
|
left: 0px;
|
|
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
.icon_k {
|
|
|
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
|
|
width: 30px;
|
|
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_checkAllbox {
|
|
|
|
|
|
|
|
height: 20px;
|
|
|
|
|
|
|
|
width: 20px;
|
|
|
|
|
|
|
|
border: 1px solid #7cccc7;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_checkAllbox_active {
|
|
|
|
|
|
|
|
background-color: #409eff;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|