|
@@ -1,17 +1,19 @@
|
|
|
<template>
|
|
|
<el-container>
|
|
|
- <el-header height="36px" style="margin-top: 8px">
|
|
|
- <el-input size="small" placeholder="姓名" @keyup.enter="query" v-model="queryTerm.name" clearable prefix-icon="Search" style="width: 300px">
|
|
|
+ <el-header height="36px">
|
|
|
+ <el-input size="small" placeholder="姓名" @keyup.enter="query" v-model="queryTerm.name" clearable
|
|
|
+ prefix-icon="Search" style="width: 300px">
|
|
|
<template #prepend>姓名</template>
|
|
|
</el-input>
|
|
|
- <el-date-picker v-model="queryTerm.executeDate" type="date" size="small" placeholder="选择预约日期"></el-date-picker>
|
|
|
+ <el-date-picker v-model="queryTerm.executeDate" type="date" size="small"
|
|
|
+ placeholder="选择预约日期"></el-date-picker>
|
|
|
<el-button type="primary" style="margin-left: 10px" icon="Search" @click="query">查询</el-button>
|
|
|
<el-button type="primary" v-show="data.list.length" icon="Download" @click="excel">导出excel</el-button>
|
|
|
<el-button type="success" icon="CirclePlusOutline" @click="xinZengYiMiaoDialog = true">新增疫苗</el-button>
|
|
|
<el-button type="info" icon="Tools" @click="openMaintain" style="margin-left: 10px">疫苗数据维护</el-button>
|
|
|
</el-header>
|
|
|
<el-main>
|
|
|
- <el-table :data="data.list" :height="tableHeight" stripe highlight-current-row>
|
|
|
+ <el-table :data="data.list" stripe highlight-current-row>
|
|
|
<el-table-column prop="patientId" width="70" label="门诊id"></el-table-column>
|
|
|
<el-table-column prop="name" width="50" label="姓名"></el-table-column>
|
|
|
<el-table-column width="50" label="性别" prop="sex">
|
|
@@ -33,29 +35,30 @@
|
|
|
<el-dialog title="新增疫苗" v-model="xinZengYiMiaoDialog">
|
|
|
<el-form label-width="100px" :rules="yiMiaoRules" ref="yiMiaoForm" :model="newVaccines">
|
|
|
<el-form-item label="疫苗名称:" prop="name">
|
|
|
- <el-input v-model="newVaccines.name" clearable show-word-limit maxlength="32" @blur="newVaccines.name = $event.target.value.trim()"></el-input>
|
|
|
+ <el-input v-model="newVaccines.name" clearable show-word-limit maxlength="32"
|
|
|
+ @blur="newVaccines.name = $event.target.value.trim()"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="可否预约:" prop="enableFlag">
|
|
|
<el-switch
|
|
|
- v-model="newVaccines.enableFlag"
|
|
|
- active-color="#13ce66"
|
|
|
- inactive-color="#ff4949"
|
|
|
- active-text="开启"
|
|
|
- inactive-text="关闭"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0"
|
|
|
+ v-model="newVaccines.enableFlag"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ active-text="开启"
|
|
|
+ inactive-text="关闭"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
>
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="预约提示:" prop="bookTip">
|
|
|
<el-input
|
|
|
- type="textarea"
|
|
|
- clearable
|
|
|
- :rows="4"
|
|
|
- v-model="newVaccines.bookTip"
|
|
|
- show-word-limit
|
|
|
- maxlength="120"
|
|
|
- @blur="newVaccines.bookTip = $event.target.value.trim()"
|
|
|
+ type="textarea"
|
|
|
+ clearable
|
|
|
+ :rows="4"
|
|
|
+ v-model="newVaccines.bookTip"
|
|
|
+ show-word-limit
|
|
|
+ maxlength="120"
|
|
|
+ @blur="newVaccines.bookTip = $event.target.value.trim()"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
<el-button type="success" @click="yiMiaoFormSubmit()">保存</el-button>
|
|
@@ -65,15 +68,18 @@
|
|
|
<!-- 添加疫苗厂家 -->
|
|
|
<el-drawer title="添加厂家" v-model="xinZengChangJiaDrawer" size="50%" :before-close="handleClose">
|
|
|
<div style="width: 80%">
|
|
|
- <el-form label-width="100px" :rules="changJiaRules" :model="covidVaccinateFactory" ref="covidVaccinateFactoryForm">
|
|
|
+ <el-form label-width="100px" :rules="changJiaRules" :model="covidVaccinateFactory"
|
|
|
+ ref="covidVaccinateFactoryForm">
|
|
|
<el-form-item label="产品编码" prop="code">
|
|
|
<el-input v-model="covidVaccinateFactory.code"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="厂家名称" prop="name">
|
|
|
- <el-input v-model="covidVaccinateFactory.name" @blur="covidVaccinateFactory.name = $event.target.value.trim()"></el-input>
|
|
|
+ <el-input v-model="covidVaccinateFactory.name"
|
|
|
+ @blur="covidVaccinateFactory.name = $event.target.value.trim()"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="规格" prop="specification" show-word-limit maxlength="16">
|
|
|
- <el-input v-model.trim="covidVaccinateFactory.specification" @blur="covidVaccinateFactory.specification = $event.target.value.trim()"></el-input>
|
|
|
+ <el-input v-model.trim="covidVaccinateFactory.specification"
|
|
|
+ @blur="covidVaccinateFactory.specification = $event.target.value.trim()"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="价格" prop="price">
|
|
|
<el-input v-model="covidVaccinateFactory.price"></el-input>
|
|
@@ -81,13 +87,13 @@
|
|
|
|
|
|
<el-form-item label="可否预约:" prop="enableFlag">
|
|
|
<el-switch
|
|
|
- v-model="covidVaccinateFactory.enableFlag"
|
|
|
- active-color="#13ce66"
|
|
|
- inactive-color="#ff4949"
|
|
|
- active-text="开启"
|
|
|
- inactive-text="关闭"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0"
|
|
|
+ v-model="covidVaccinateFactory.enableFlag"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ active-text="开启"
|
|
|
+ inactive-text="关闭"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
>
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
@@ -95,7 +101,7 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<el-divider></el-divider>
|
|
|
- <el-table :data="tableChangJia" :height="tableHeight - 350">
|
|
|
+ <el-table :data="tableChangJia" >
|
|
|
<el-table-column label="编码" prop="code"></el-table-column>
|
|
|
<el-table-column label="厂家名称" prop="name"></el-table-column>
|
|
|
<el-table-column label="规格" prop="specification"></el-table-column>
|
|
@@ -111,39 +117,47 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-button type="success" style="margin-left: 20px; margin-top: 20px" v-show="tableChangJia.length > 0" @click="baoCunChangJia">保存 </el-button>
|
|
|
+ <el-button type="success" style="margin-left: 20px; margin-top: 20px" v-show="tableChangJia.length > 0"
|
|
|
+ @click="baoCunChangJia">保存
|
|
|
+ </el-button>
|
|
|
</el-drawer>
|
|
|
<!-- 新冠疫苗数据维护 -->
|
|
|
- <el-dialog title="新冠疫苗数据维护" v-model="xinGuanYiMiaoShuJuWeiHu" @close="closeXinGuanYiMiaoShuJuWeiHuDialog" fullscreen>
|
|
|
- <VccntMaintain :init="initProp" />
|
|
|
+ <el-dialog title="新冠疫苗数据维护" v-model="xinGuanYiMiaoShuJuWeiHu" @close="closeXinGuanYiMiaoShuJuWeiHuDialog"
|
|
|
+ fullscreen>
|
|
|
+ <VccntMaintain :init="initProp"/>
|
|
|
</el-dialog>
|
|
|
</el-main>
|
|
|
<el-footer style="height: 40px">
|
|
|
<el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="queryTerm.currentPage"
|
|
|
- :page-sizes="[20, 30, 40, 50, 100]"
|
|
|
- :page-size="queryTerm.pageSize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="data.total"
|
|
|
- style="margin-top: 5px"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="queryTerm.currentPage"
|
|
|
+ :page-sizes="[20, 30, 40, 50, 100]"
|
|
|
+ :page-size="queryTerm.pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="data.total"
|
|
|
+ style="margin-top: 5px"
|
|
|
></el-pagination>
|
|
|
</el-footer>
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { reactive, ref, unref } from '@vue/reactivity'
|
|
|
-import { formatDate } from '@/utils/date'
|
|
|
-import { queryXGYM, xinZengChangJia, xinZengYiMiao, yiJianXiuGaiRiQi } from '@/api/querydata/query-covidVaccinateAppointment'
|
|
|
+import {reactive, ref, unref} from '@vue/reactivity'
|
|
|
+import {formatDate} from '@/utils/date'
|
|
|
+import {
|
|
|
+ queryXGYM,
|
|
|
+ xinZengChangJia,
|
|
|
+ xinZengYiMiao,
|
|
|
+ yiJianXiuGaiRiQi
|
|
|
+} from '@/api/querydata/query-covidVaccinateAppointment'
|
|
|
import store from '@/store'
|
|
|
-import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
-import { downloadExcel } from '@/utils/excel'
|
|
|
-import { computed, onMounted } from 'vue'
|
|
|
-import { cptSex, enableFlagToString } from '@/utils/computed'
|
|
|
+import {ElMessage, ElMessageBox} from 'element-plus'
|
|
|
+import {downloadExcel} from '@/utils/excel'
|
|
|
+import {computed, onMounted} from 'vue'
|
|
|
+import {cptSex, enableFlagToString} from '@/utils/computed'
|
|
|
import VccntMaintain from './XinGuanYiMiaoWeiHu.vue'
|
|
|
-import { clone } from '@/utils/clone'
|
|
|
+import {clone} from '@/utils/clone'
|
|
|
|
|
|
export default {
|
|
|
name: 'CovidVaccinateAppointment',
|
|
@@ -207,17 +221,18 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
//修改阈值
|
|
|
- let list = [{ id: scope.row.id, value: value }]
|
|
|
+ let list = [{id: scope.row.id, value: value}]
|
|
|
ElMessageBox.confirm('确认要修改日期为:<span style="color:teal">' + scope.row.date + '</span> 的阈值', '提示', {
|
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消',
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
type: 'info',
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- yiJianXiuGaiRiQi(list)
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ .then(() => {
|
|
|
+ yiJianXiuGaiRiQi(list)
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ })
|
|
|
}
|
|
|
//一键修改全部的日期
|
|
|
const yiJianXiuGaiRiQiValue = ref(undefined)
|
|
@@ -228,26 +243,27 @@ export default {
|
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消',
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- let reg = /^[0-9]+$/
|
|
|
- if (!reg.test(value)) {
|
|
|
- ElMessage({
|
|
|
- type: 'error',
|
|
|
- message: '只能输入整数',
|
|
|
- showClose: true,
|
|
|
- duration: 2500,
|
|
|
+ .then(() => {
|
|
|
+ let reg = /^[0-9]+$/
|
|
|
+ if (!reg.test(value)) {
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '只能输入整数',
|
|
|
+ showClose: true,
|
|
|
+ duration: 2500,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let list = []
|
|
|
+ for (let i = 0; i < yuZhiTabel.value.length; i++) {
|
|
|
+ list.push({id: yuZhiTabel.value[i].id, value: value})
|
|
|
+ }
|
|
|
+ yiJianXiuGaiRiQi(list).then((res) => {
|
|
|
+ yiJianXiuGaiRiQiValue.value = undefined
|
|
|
})
|
|
|
- return
|
|
|
- }
|
|
|
- let list = []
|
|
|
- for (let i = 0; i < yuZhiTabel.value.length; i++) {
|
|
|
- list.push({ id: yuZhiTabel.value[i].id, value: value })
|
|
|
- }
|
|
|
- yiJianXiuGaiRiQi(list).then((res) => {
|
|
|
- yiJianXiuGaiRiQiValue.value = undefined
|
|
|
})
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ .catch(() => {
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
@@ -270,13 +286,13 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
queryXGYM(queryTerm)
|
|
|
- .then((res) => {
|
|
|
- data.list = res.data
|
|
|
- data.total = res.total
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- data.list = []
|
|
|
- })
|
|
|
+ .then((res) => {
|
|
|
+ data.list = res.data
|
|
|
+ data.total = res.total
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ data.list = []
|
|
|
+ })
|
|
|
}
|
|
|
//这个是从后端导
|
|
|
const excel = () => {
|
|
@@ -299,7 +315,7 @@ export default {
|
|
|
/**
|
|
|
* 点击新增疫苗
|
|
|
*/
|
|
|
- //点击打开 log
|
|
|
+ //点击打开 log
|
|
|
const xinZengYiMiaoDialog = ref(false)
|
|
|
|
|
|
const yiMiaoForm = ref(null)
|
|
@@ -351,35 +367,35 @@ export default {
|
|
|
}
|
|
|
//疫苗的表单验证
|
|
|
const yiMiaoRules = ref({
|
|
|
- id: [{ required: true, message: '疫苗id不能为空', trigger: 'blur' }],
|
|
|
+ id: [{required: true, message: '疫苗id不能为空', trigger: 'blur'}],
|
|
|
name: [
|
|
|
- { required: true, message: '疫苗名称不能为空', trigger: 'blur' },
|
|
|
- { min: 3, max: 32, message: '长度在 3 到 32 个字', trigger: 'blur' },
|
|
|
+ {required: true, message: '疫苗名称不能为空', trigger: 'blur'},
|
|
|
+ {min: 3, max: 32, message: '长度在 3 到 32 个字', trigger: 'blur'},
|
|
|
],
|
|
|
- enableFlag: [{ required: true, message: '至少选中一项', trigger: 'blur' }],
|
|
|
+ enableFlag: [{required: true, message: '至少选中一项', trigger: 'blur'}],
|
|
|
bookTip: [
|
|
|
- { required: true, message: '不能为空', trigger: 'blur' },
|
|
|
- { min: 3, max: 120, message: '长度在 3 到 120 个字', trigger: 'blur' },
|
|
|
+ {required: true, message: '不能为空', trigger: 'blur'},
|
|
|
+ {min: 3, max: 120, message: '长度在 3 到 120 个字', trigger: 'blur'},
|
|
|
],
|
|
|
})
|
|
|
|
|
|
//厂家的表单验证
|
|
|
const changJiaRules = ref({
|
|
|
price: [
|
|
|
- { required: true, trigger: 'blur', message: '价格不能为空' },
|
|
|
+ {required: true, trigger: 'blur', message: '价格不能为空'},
|
|
|
{
|
|
|
pattern: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/,
|
|
|
message: '请输入正确的价格',
|
|
|
trigger: 'blur',
|
|
|
},
|
|
|
],
|
|
|
- name: [{ required: true, trigger: 'blur', validator: factoryName }],
|
|
|
+ name: [{required: true, trigger: 'blur', validator: factoryName}],
|
|
|
specification: [
|
|
|
- { required: true, message: '规格不能为空', trigger: 'blur' },
|
|
|
- { min: 1, max: 16, message: '规格字数在 1 ~ 16', trigger: 'blur' },
|
|
|
+ {required: true, message: '规格不能为空', trigger: 'blur'},
|
|
|
+ {min: 1, max: 16, message: '规格字数在 1 ~ 16', trigger: 'blur'},
|
|
|
],
|
|
|
- code: [{ required: true, trigger: 'blur', validator: code }],
|
|
|
- enableFlag: [{ required: true, message: '至少选中一项', trigger: 'blur' }],
|
|
|
+ code: [{required: true, trigger: 'blur', validator: code}],
|
|
|
+ enableFlag: [{required: true, message: '至少选中一项', trigger: 'blur'}],
|
|
|
})
|
|
|
|
|
|
//提交添加疫苗信息 添加成功后 打开添加厂家的 抽屉并且把这个疫苗的id 给到vaccinateId 因为这两个表是要关联的
|
|
@@ -395,14 +411,16 @@ export default {
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
type: 'info',
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- xinZengYiMiao(newVaccines).then((res) => {
|
|
|
- covidVaccinateFactory.vaccinateId = res
|
|
|
- xinZengChangJiaDrawer.value = true
|
|
|
+ .then(() => {
|
|
|
+ xinZengYiMiao(newVaccines).then((res) => {
|
|
|
+ covidVaccinateFactory.vaccinateId = res
|
|
|
+ xinZengChangJiaDrawer.value = true
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
- } catch (error) {}
|
|
|
+ .catch(() => {
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ }
|
|
|
}
|
|
|
//点击重置数据 一个是重置疫苗的数据 一个是重置厂家的数据
|
|
|
//当重置 疫苗数据的时候需要把厂家 疫苗表的id 给清空
|
|
@@ -437,7 +455,8 @@ export default {
|
|
|
await form.validate()
|
|
|
tableChangJia.value.push(clone(covidVaccinateFactory))
|
|
|
resetForm(covidVaccinateFactoryForm)
|
|
|
- } catch (e) {}
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//点击删除按钮 删除掉厂家表格中的数据 tableChangJia这个表
|
|
@@ -475,8 +494,10 @@ export default {
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'error',
|
|
|
})
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {})
|
|
|
+ .then(() => {
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|