|
|
|
|
@ -11,20 +11,50 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="tableData" style="width: 100%;" row-key="id">
|
|
|
|
|
<el-table :data="tableData" style="width: 100%;" row-key="id" v-loading="loading">
|
|
|
|
|
<el-table-column prop="id" label="Id" width="100" v-if="false" />
|
|
|
|
|
<el-table-column prop="name" label="类型名称" />
|
|
|
|
|
<el-table-column prop="describe" label="描述" />
|
|
|
|
|
<el-table-column prop="limosis" label="要求空腹" width="100">
|
|
|
|
|
<el-table-column prop="is_vip" label="Vip">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tag v-if="scope.row.is_vip==0" class="ml-2" type="info">否</el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.is_vip==1" class="ml-2" type="warning">VIP</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="use_type" label="个检/团检">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tag v-if="scope.row.use_type==0" class="ml-2">个检、团检</el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.use_type==1" class="ml-2" type="info">个检</el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.use_type==2" class="ml-2" type="warning">团检</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="sex" label="性别">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tag v-if="scope.row.sex==0" class="ml-2">全部</el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.sex==1" class="ml-2" type="info">男</el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.sex==2" class="ml-2" type="warning">女</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="" label="体检类型" show-overflow-tooltip>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tag type="info" v-for="(item,index) in scope.row.check_type_name" :key="index" class="ml-2">{{item}}</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="limosis" label="状态" width="100">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tag v-if="scope.row.status==0" class="ml-2" type="danger">停用</el-tag>
|
|
|
|
|
<el-tag v-if="scope.row.status==1" class="ml-2" type="success">正常</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="updated_at" label="更新时间" />
|
|
|
|
|
<el-table-column prop="" label="更新时间">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<span v-if="scope.row.updated_at">{{scope.row.updated_at}}</span>
|
|
|
|
|
<span v-else>{{scope.row.created_at}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="" label="操作" width="150">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button type="primary" @click="EditItem(scope.row)" size="small">修改</el-button>
|
|
|
|
|
<el-button type="primary" @click="Edit(scope.row)" size="small">修改</el-button>
|
|
|
|
|
<el-button type="danger" @click="Del(scope.row.id)" size="small">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
@ -34,20 +64,20 @@
|
|
|
|
|
@size-change="PageSizeChange" @current-change="PageCurrentChange" />
|
|
|
|
|
</div>
|
|
|
|
|
<el-dialog v-model="dialogVisible" title="号源类型设置">
|
|
|
|
|
<div class="chuansuokuang">
|
|
|
|
|
<div class="chuansuokuang" v-loading="loading">
|
|
|
|
|
<el-form :model="Info" label-width="150" style="max-width: 600px">
|
|
|
|
|
<el-form-item label="名称">
|
|
|
|
|
<el-input v-model="Info.name" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="是否 VIP">
|
|
|
|
|
<el-radio-group v-model="Info.is_vip">
|
|
|
|
|
<el-radio label="1">是</el-radio>
|
|
|
|
|
<el-radio label="0">否</el-radio>
|
|
|
|
|
<el-radio :label="1">是</el-radio>
|
|
|
|
|
<el-radio :label="0">否</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="个检/团检">
|
|
|
|
|
<el-select :filterable="true" clearable v-model="Info.use_type" @change="UseTypeChange()" placeholder="选择个检/团检"
|
|
|
|
|
style="margin-left: 8px;width: 150px;">
|
|
|
|
|
<el-select :filterable="true" clearable v-model="Info.use_type"
|
|
|
|
|
placeholder="选择个检/团检" >
|
|
|
|
|
<el-option label="不限" :value="0" />
|
|
|
|
|
<el-option label="个检" :value="1" />
|
|
|
|
|
<el-option label="团检" :value="2" />
|
|
|
|
|
@ -55,7 +85,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="性别">
|
|
|
|
|
<el-select :filterable="true" clearable v-model="Info.sex" placeholder="选择性别"
|
|
|
|
|
style="margin-left: 8px;width: 150px;">
|
|
|
|
|
>
|
|
|
|
|
<el-option label="不限" :value="0" />
|
|
|
|
|
<el-option label="男" :value="1" />
|
|
|
|
|
<el-option label="女" :value="2" />
|
|
|
|
|
@ -104,7 +134,11 @@
|
|
|
|
|
ElMessageBox
|
|
|
|
|
} from 'element-plus'
|
|
|
|
|
import {
|
|
|
|
|
PlanTypeGetList,CheckUpTypeGetEnableList,PlanTypeSave
|
|
|
|
|
PlanTypeGetList,
|
|
|
|
|
CheckUpTypeGetEnableList,
|
|
|
|
|
PlanTypeSave,
|
|
|
|
|
PlanTypeGetDetail,
|
|
|
|
|
PlanTypeDel
|
|
|
|
|
} from '@/api/api.js'
|
|
|
|
|
let loading = ref(false)
|
|
|
|
|
let searchInfo = ref({})
|
|
|
|
|
@ -165,14 +199,44 @@
|
|
|
|
|
}).then(res => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
|
|
dialogVisible.value = false
|
|
|
|
|
GetList()
|
|
|
|
|
} else {
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const UseTypeChange=()=>{
|
|
|
|
|
|
|
|
|
|
const Edit=(row)=>{
|
|
|
|
|
dialogVisible.value = true
|
|
|
|
|
Info.value = {}
|
|
|
|
|
GetDetailFunc(row.id)
|
|
|
|
|
}
|
|
|
|
|
//获取详情
|
|
|
|
|
const GetDetailFunc=(id)=>{
|
|
|
|
|
loading.value = true
|
|
|
|
|
PlanTypeGetDetail({
|
|
|
|
|
id: id
|
|
|
|
|
}).then(res => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
if (res.status) {
|
|
|
|
|
Info.value=res.data
|
|
|
|
|
} else {
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const Del=(id)=>{
|
|
|
|
|
loading.value = true
|
|
|
|
|
PlanTypeDel({
|
|
|
|
|
id: id
|
|
|
|
|
}).then(res => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
if (res.status) {
|
|
|
|
|
GetList()
|
|
|
|
|
} else {
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
GetList()
|
|
|
|
|
|