This commit is contained in:
hezi66677 2024-12-21 22:24:46 +08:00
parent 78b0e3ab4b
commit eef905fd41
13 changed files with 1788 additions and 65 deletions

44
src/api/system/mydrug1.js Normal file
View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询药品管理列表
export function listMydrug1(query) {
return request({
url: '/system/mydrug1/list',
method: 'get',
params: query
})
}
// 查询药品管理详细
export function getMydrug1(id) {
return request({
url: '/system/mydrug1/' + id,
method: 'get'
})
}
// 新增药品管理
export function addMydrug1(data) {
return request({
url: '/system/mydrug1',
method: 'post',
data: data
})
}
// 修改药品管理
export function updateMydrug1(data) {
return request({
url: '/system/mydrug1',
method: 'put',
data: data
})
}
// 删除药品管理
export function delMydrug1(id) {
return request({
url: '/system/mydrug1/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询病症图片管理列表
export function listMylesion(query) {
return request({
url: '/system/mylesion/list',
method: 'get',
params: query
})
}
// 查询病症图片管理详细
export function getMylesion(id) {
return request({
url: '/system/mylesion/' + id,
method: 'get'
})
}
// 新增病症图片管理
export function addMylesion(data) {
return request({
url: '/system/mylesion',
method: 'post',
data: data
})
}
// 修改病症图片管理
export function updateMylesion(data) {
return request({
url: '/system/mylesion',
method: 'put',
data: data
})
}
// 删除病症图片管理
export function delMylesion(id) {
return request({
url: '/system/mylesion/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询患者管理列表
export function listMypatient(query) {
return request({
url: '/system/mypatient/list',
method: 'get',
params: query
})
}
// 查询患者管理详细
export function getMypatient(id) {
return request({
url: '/system/mypatient/' + id,
method: 'get'
})
}
// 新增患者管理
export function addMypatient(data) {
return request({
url: '/system/mypatient',
method: 'post',
data: data
})
}
// 修改患者管理
export function updateMypatient(data) {
return request({
url: '/system/mypatient',
method: 'put',
data: data
})
}
// 删除患者管理
export function delMypatient(id) {
return request({
url: '/system/mypatient/' + id,
method: 'delete'
})
}

44
src/api/system/mysmell.js Normal file
View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询患者描述记录列表
export function listMysmell(query) {
return request({
url: '/system/mysmell/list',
method: 'get',
params: query
})
}
// 查询患者描述记录详细
export function getMysmell(id) {
return request({
url: '/system/mysmell/' + id,
method: 'get'
})
}
// 新增患者描述记录
export function addMysmell(data) {
return request({
url: '/system/mysmell',
method: 'post',
data: data
})
}
// 修改患者描述记录
export function updateMysmell(data) {
return request({
url: '/system/mysmell',
method: 'put',
data: data
})
}
// 删除患者描述记录
export function delMysmell(id) {
return request({
url: '/system/mysmell/' + id,
method: 'delete'
})
}

View File

@ -7,8 +7,7 @@
<span style="font - size: 20px;">历史处方</span>
</template>
<el-table :data="prescriptionData" style="width: 100%">
<el-table-column prop="id" label="id">
</el-table-column>
<el-table-column prop="username" label="患者名">
</el-table-column>
<el-table-column prop="disease" label="病症">
@ -19,8 +18,7 @@
</el-table-column>
<el-table-column prop="remark" label="备注">
</el-table-column>
<el-table-column prop="doctorname" label="主治医师">
</el-table-column>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button plain @click="dialogVisible(scope.row)">
@ -33,13 +31,36 @@
</el-col>
</el-row>
<el-dialog :title="title" v-model="open" width="500px">
<div v-if="currentRowData">
<p><strong>患者名</strong>{{ currentRowData.username }}</p>
<p><strong>病症</strong>{{ currentRowData.disease }}</p>
<p><strong>药物</strong>{{ currentRowData.medicine }}</p>
</div>
</el-dialog>
<el-dialog :title="title" v-model="open" width="500px"
style="background-color: #f9f9f9; border: 1px solid #ccc; padding: 20px; margin: 50px auto;">
<div v-if="currentRowData">
<img v-if="currentRowData.avatar" :src="currentRowData.avatar" alt="用户头像"
style="width: 100px; height: 100px; border-radius: 50%; object-fit: cover;">
<span v-else>暂无头像</span>
<div style="margin: 15px 0;"></div>
<hr style="border: none; border-bottom: 1px solid #eee; margin: 10px 0;">
<p style="font-size: 16px; font-family: Arial, sans-serif; color: #666;">
<strong>患者名</strong>{{ currentRowData.username }}</p>
<p style="font-size: 16px; font-family: Arial, sans-serif; color: #666;">
<strong>病症</strong>{{ currentRowData.disease }}</p>
<div style="margin: 15px 0;"></div>
<hr style="border: none; border-bottom: 1px solid #eee; margin: 10px 0;">
<p style="font-size: 16px; font-family: Arial, sans-serif; color: #666;">
<strong>药物</strong>{{ currentRowData.medicine }}</p>
<p style="font-size: 16px; font-family: Arial, sans-serif; color: #666;">
<strong>时间</strong>{{ currentRowData.timeinfo }}</p>
<el-card style="max-width: 480px">
<div v-for="card in currentRowMedicalCardsData" :key="card.id">
<p><strong>就诊卡账号</strong>{{ card.vercode }}</p>
<p><strong>身份证号</strong>{{ card.idcard }}</p>
<p><strong>电话号码</strong>{{ card.phonenumber }}</p>
</div>
</el-card>
</div>
</el-dialog>
</div>
@ -61,16 +82,8 @@
} from '@/api/monitor/cache';
import * as echarts from 'echarts';
const open = ref(false);
const currentRowData = ref(null); //
const title = ref('');
function dialogVisible(rowData) {
open.value = true;
title.value = "查看";
currentRowData.value = rowData;
}
//
let token = " ";
//......
@ -90,6 +103,8 @@
token = res.data.token
console.log(token)
getmyprescription(token);
getmyuser(token);
getmymedicalcard(token);
}).catch(err => {
console.log(err)
})
@ -115,6 +130,65 @@
}
}
const open = ref(false);
const currentRowData = ref(null); //
const title = ref('');
const userData = ref([]);
async function getmyuser(token) {
try {
const response = await axios({
method: 'GET',
url: 'http://127.0.0.1:8080/system/myuser/list',
headers: {
'Authorization': `Bearer ${token}`
}
});
userData.value = response.data.rows;
console.log(userData);
} catch (err) {
console.log(err);
}
}
const cardData = ref([]);
async function getmymedicalcard(token) {
try {
const response = await axios({
method: 'GET',
url: 'http://127.0.0.1:8080/system/mymedicalcard/list',
headers: {
'Authorization': `Bearer ${token}`
}
});
cardData.value = response.data.rows;
console.log(cardData);
} catch (err) {
console.log(err);
}
}
const currentRowMedicalCardsData = ref([]);
function dialogVisible(rowData) {
open.value = true;
title.value = "查看";
currentRowData.value = rowData;
const matcheUser = userData.value.find(user => user.name === rowData.username);
if (matcheUser) {
const avatarUrl = matcheUser.avatar;
currentRowData.value.avatar = avatarUrl;
}
//
const matchedMedicalCards = cardData.value.filter(card => card.name === rowData.username);
currentRowMedicalCardsData.value = matchedMedicalCards;
}
onMounted(() => {
console.log("onMounted");
myClick();

View File

@ -1,10 +1,10 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="用户名" prop="username">
<el-form-item label="患者名" prop="username">
<el-input
v-model="queryParams.username"
placeholder="请输入用户名"
placeholder="请输入患者名"
clearable
@keyup.enter="handleQuery"
/>
@ -54,7 +54,7 @@
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:myprescription1:add']"
v-hasPermi="['system:myprescription:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
@ -64,7 +64,7 @@
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:myprescription1:edit']"
v-hasPermi="['system:myprescription:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
@ -74,7 +74,7 @@
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:myprescription1:remove']"
v-hasPermi="['system:myprescription:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
@ -83,16 +83,16 @@
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:myprescription1:export']"
v-hasPermi="['system:myprescription:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="myprescription1List" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="myprescriptionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="用户名" align="center" prop="username" />
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="患者名" align="center" prop="username" />
<el-table-column label="病症" align="center" prop="disease" />
<el-table-column label="药物" align="center" prop="medicine" />
<el-table-column label="开具处方时间" align="center" prop="timeinfo" />
@ -100,8 +100,8 @@
<el-table-column label="主治医师" align="center" prop="doctorname" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:myprescription1:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:myprescription1:remove']">删除</el-button>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:myprescription:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:myprescription:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -114,11 +114,11 @@
@pagination="getList"
/>
<!-- 添加或修改医生处方管理对话框 -->
<!-- 添加或修改处方管理对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="myprescription1Ref" :model="form" :rules="rules" label-width="80px">
<el-form-item label="用户名" prop="username">
<el-input v-model="form.username" placeholder="请输入用户名" />
<el-form ref="myprescriptionRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="患者名" prop="username">
<el-input v-model="form.username" placeholder="请输入患者名" />
</el-form-item>
<el-form-item label="病症" prop="disease">
<el-input v-model="form.disease" placeholder="请输入病症" />
@ -146,12 +146,12 @@
</div>
</template>
<script setup name="Myprescription1">
import { listMyprescription1, getMyprescription1, delMyprescription1, addMyprescription1, updateMyprescription1 } from "@/api/system/myprescription1";
<script setup name="Myprescription">
import { listMyprescription, getMyprescription, delMyprescription, addMyprescription, updateMyprescription } from "@/api/system/myprescription";
const { proxy } = getCurrentInstance();
const myprescription1List = ref([]);
const myprescriptionList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
@ -178,11 +178,11 @@ const data = reactive({
const { queryParams, form, rules } = toRefs(data);
/** 查询医生处方管理列表 */
/** 查询处方管理列表 */
function getList() {
loading.value = true;
listMyprescription1(queryParams.value).then(response => {
myprescription1List.value = response.rows;
listMyprescription(queryParams.value).then(response => {
myprescriptionList.value = response.rows;
total.value = response.total;
loading.value = false;
});
@ -205,7 +205,7 @@ function reset() {
remark: null,
doctorname: null
};
proxy.resetForm("myprescription1Ref");
proxy.resetForm("myprescriptionRef");
}
/** 搜索按钮操作 */
@ -231,32 +231,32 @@ function handleSelectionChange(selection) {
function handleAdd() {
reset();
open.value = true;
title.value = "添加医生处方管理";
title.value = "添加处方管理";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value
getMyprescription1(_id).then(response => {
getMyprescription(_id).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改医生处方管理";
title.value = "修改处方管理";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["myprescription1Ref"].validate(valid => {
proxy.$refs["myprescriptionRef"].validate(valid => {
if (valid) {
if (form.value.id != null) {
updateMyprescription1(form.value).then(response => {
updateMyprescription(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addMyprescription1(form.value).then(response => {
addMyprescription(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
@ -269,8 +269,8 @@ function submitForm() {
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除医生处方管理编号为"' + _ids + '"的数据项?').then(function() {
return delMyprescription1(_ids);
proxy.$modal.confirm('是否确认删除处方管理编号为"' + _ids + '"的数据项?').then(function() {
return delMyprescription(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
@ -279,9 +279,9 @@ function handleDelete(row) {
/** 导出按钮操作 */
function handleExport() {
proxy.download('system/myprescription1/export', {
proxy.download('system/myprescription/export', {
...queryParams.value
}, `myprescription1_${new Date().getTime()}.xlsx`)
}, `myprescription_${new Date().getTime()}.xlsx`)
}
getList();

View File

@ -0,0 +1,281 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="药品名称" prop="drugname">
<el-input
v-model="queryParams.drugname"
placeholder="请输入药品名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="药品规格" prop="drugspecification">
<el-input
v-model="queryParams.drugspecification"
placeholder="请输入药品入库时间"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="药品分类" prop="drugclassification">
<el-input
v-model="queryParams.drugclassification"
placeholder="请输入药品分类"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="批准文号" prop="approvalnumber">
<el-input
v-model="queryParams.approvalnumber"
placeholder="请输入批准文号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="库存" prop="inventory">
<el-input
v-model="queryParams.inventory"
placeholder="请输入库存"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:mydrug:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:mydrug:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:mydrug:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:mydrug:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="mydrugList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="药品名称" align="center" prop="drugname" />
<el-table-column label="药品入库时间" align="center" prop="drugspecification" />
<el-table-column label="库存" align="center" prop="inventory" />
<el-table-column label="操作人" align="center" prop="sysOperLog.operName" />
<el-table-column label="操作时间" align="center" prop="sysOperLog.operTime" />
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改药品管理对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="mydrugRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="药品名称" prop="drugname">
<el-input v-model="form.drugname" placeholder="请输入药品名称" />
</el-form-item>
<el-form-item label="药品分类" prop="drugclassification">
<el-input v-model="form.drugclassification" placeholder="请输入药品分类" />
</el-form-item>
<el-form-item label="批准文号" prop="approvalnumber">
<el-input v-model="form.approvalnumber" placeholder="请输入批准文号" />
</el-form-item>
<el-form-item label="入库时间" prop="drugspecification">
<el-input v-model="form.drugspecification" placeholder="请输入药品规格" />
</el-form-item>
<el-form-item label="库存" prop="inventory">
<el-input v-model="form.inventory" placeholder="请输入库存" />
</el-form-item>
<el-form-item label="库存" prop="inventory">
<el-input v-model="form.inventory" placeholder="请输入库存" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Mydrug">
import { listMydrug, getMydrug, delMydrug, addMydrug, updateMydrug } from "@/api/system/mydrug";
const { proxy } = getCurrentInstance();
const mydrugList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
drugname: null,
drugspecification: null,
drugclassification: null,
approvalnumber: null,
inventory: null
},
rules: {
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询药品管理列表 */
function getList() {
loading.value = true;
listMydrug(queryParams.value).then(response => {
mydrugList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
id: null,
drugname: null,
drugspecification: null,
drugclassification: null,
approvalnumber: null,
inventory: null
};
proxy.resetForm("mydrugRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加药品管理";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value
getMydrug(_id).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改药品管理";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["mydrugRef"].validate(valid => {
if (valid) {
if (form.value.id != null) {
updateMydrug(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addMydrug(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除药品管理编号为"' + _ids + '"的数据项?').then(function() {
return delMydrug(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download('system/mydrug/export', {
...queryParams.value
}, `mydrug_${new Date().getTime()}.xlsx`)
}
getList();
</script>

View File

@ -12,7 +12,7 @@
<el-form-item label="药品规格" prop="drugspecification">
<el-input
v-model="queryParams.drugspecification"
placeholder="请输入药品规格"
placeholder="请输入药品入库时间"
clearable
@keyup.enter="handleQuery"
/>
@ -91,11 +91,10 @@
<el-table v-loading="loading" :data="mydrugList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="药品名称" align="center" prop="drugname" />
<el-table-column label="药品规格" align="center" prop="drugspecification" />
<el-table-column label="药品分类" align="center" prop="drugclassification" />
<el-table-column label="批准文号" align="center" prop="approvalnumber" />
<el-table-column label="药品入库时间" align="center" prop="drugspecification" />
<el-table-column label="库存" align="center" prop="inventory" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
@ -119,15 +118,16 @@
<el-form-item label="药品名称" prop="drugname">
<el-input v-model="form.drugname" placeholder="请输入药品名称" />
</el-form-item>
<el-form-item label="药品规格" prop="drugspecification">
<el-input v-model="form.drugspecification" placeholder="请输入药品规格" />
</el-form-item>
<el-form-item label="药品分类" prop="drugclassification">
<el-input v-model="form.drugclassification" placeholder="请输入药品分类" />
</el-form-item>
<el-form-item label="批准文号" prop="approvalnumber">
<el-input v-model="form.approvalnumber" placeholder="请输入批准文号" />
</el-form-item>
<el-form-item label="入库时间" prop="drugspecification">
<el-input v-model="form.drugspecification" placeholder="请输入药品规格" />
</el-form-item>
<el-form-item label="库存" prop="inventory">
<el-input v-model="form.inventory" placeholder="请输入库存" />
</el-form-item>

View File

@ -0,0 +1,283 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="药品名称" prop="drugname">
<el-input
v-model="queryParams.drugname"
placeholder="请输入药品名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="药品规格" prop="drugspecification">
<el-input
v-model="queryParams.drugspecification"
placeholder="请输入药品规格"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="药品分类" prop="drugclassification">
<el-input
v-model="queryParams.drugclassification"
placeholder="请输入药品分类"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="批准文号" prop="approvalnumber">
<el-input
v-model="queryParams.approvalnumber"
placeholder="请输入批准文号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="库存" prop="inventory">
<el-input
v-model="queryParams.inventory"
placeholder="请输入库存"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:mydrug1:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:mydrug1:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:mydrug1:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:mydrug1:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="mydrug1List" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="药品名称" align="center" prop="drugname" />
<el-table-column label="药品规格" align="center" prop="drugspecification" />
<el-table-column label="药品分类" align="center" prop="drugclassification" />
<el-table-column label="批准文号" align="center" prop="approvalnumber" />
<el-table-column label="库存" align="center" prop="inventory" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:mydrug1:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:mydrug1:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改药品管理对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="mydrug1Ref" :model="form" :rules="rules" label-width="80px">
<el-form-item label="药品名称" prop="drugname">
<el-input v-model="form.drugname" placeholder="请输入药品名称" />
</el-form-item>
<el-form-item label="药品规格" prop="drugspecification">
<el-input v-model="form.drugspecification" placeholder="请输入药品规格" />
</el-form-item>
<el-form-item label="药品分类" prop="drugclassification">
<el-input v-model="form.drugclassification" placeholder="请输入药品分类" />
</el-form-item>
<el-form-item label="批准文号" prop="approvalnumber">
<el-input v-model="form.approvalnumber" placeholder="请输入批准文号" />
</el-form-item>
<el-form-item label="库存" prop="inventory">
<el-input v-model="form.inventory" placeholder="请输入库存" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Mydrug1">
import { listMydrug1, getMydrug1, delMydrug1, addMydrug1, updateMydrug1 } from "@/api/system/mydrug1";
const { proxy } = getCurrentInstance();
const mydrug1List = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
drugname: null,
drugspecification: null,
drugclassification: null,
approvalnumber: null,
inventory: null
},
rules: {
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询药品管理列表 */
function getList() {
loading.value = true;
listMydrug1(queryParams.value).then(response => {
mydrug1List.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
id: null,
drugname: null,
drugspecification: null,
drugclassification: null,
approvalnumber: null,
inventory: null
};
proxy.resetForm("mydrug1Ref");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加药品管理";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value
getMydrug1(_id).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改药品管理";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["mydrug1Ref"].validate(valid => {
if (valid) {
if (form.value.id != null) {
updateMydrug1(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addMydrug1(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除药品管理编号为"' + _ids + '"的数据项?').then(function() {
return delMydrug1(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download('system/mydrug1/export', {
...queryParams.value
}, `mydrug1_${new Date().getTime()}.xlsx`)
}
getList();
</script>

View File

@ -0,0 +1,259 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="图片编号" prop="imagesNumber">
<el-input
v-model="queryParams.imagesNumber"
placeholder="请输入图片编号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="病灶图片" prop="lesionImages">
<el-input
v-model="queryParams.lesionImages"
placeholder="请输入病灶图片"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="患者编号" prop="patientid">
<el-input
v-model="queryParams.patientid"
placeholder="请输入患者编号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:mylesion:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:mylesion:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:mylesion:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:mylesion:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="mylesionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="图片编号" align="center" prop="imagesNumber" />
<el-table-column label="病灶图片" align="center" prop="lesionImages">
<template #default="scope">
<img v-if="scope.row.lesionImages" :src="scope.row.lesionImages" alt="头像" style="width: 50px; height: 50px; border-radius: 50%; object-fit: cover;">
<span v-else>暂无头像</span>
</template>
</el-table-column>
<el-table-column label="患者名" align="center" prop="mypatient.patientName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:mylesion:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:mylesion:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改病症图片管理对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="mylesionRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="图片编号" prop="imagesNumber">
<el-input v-model="form.imagesNumber" placeholder="请输入图片编号" />
</el-form-item>
<el-form-item label="病灶图片" prop="lesionImages">
<el-input v-model="form.lesionImages" placeholder="请输入病灶图片" />
</el-form-item>
<el-form-item label="患者编号" prop="patientid">
<el-input v-model="form.patientid" placeholder="请输入患者编号" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Mylesion">
import { listMylesion, getMylesion, delMylesion, addMylesion, updateMylesion } from "@/api/system/mylesion";
const { proxy } = getCurrentInstance();
const mylesionList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
imagesNumber: null,
lesionImages: null,
patientid: null
},
rules: {
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询病症图片管理列表 */
function getList() {
loading.value = true;
listMylesion(queryParams.value).then(response => {
mylesionList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
id: null,
imagesNumber: null,
lesionImages: null,
patientid: null
};
proxy.resetForm("mylesionRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加病症图片管理";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value
getMylesion(_id).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改病症图片管理";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["mylesionRef"].validate(valid => {
if (valid) {
if (form.value.id != null) {
updateMylesion(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addMylesion(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除病症图片管理编号为"' + _ids + '"的数据项?').then(function() {
return delMylesion(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download('system/mylesion/export', {
...queryParams.value
}, `mylesion_${new Date().getTime()}.xlsx`)
}
getList();
</script>

View File

@ -101,7 +101,7 @@
<el-table v-loading="loading" :data="mymedicalcardList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="就诊卡卡号" align="center" prop="vercode" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="电话号" align="center" prop="phonenumber" />
<el-table-column label="性别" align="center" prop="sex">
@ -110,8 +110,8 @@
</template>
</el-table-column>
<el-table-column label="身份证卡号" align="center" prop="idcard" />
<el-table-column label="验证码" align="center" prop="vercode" />
<el-table-column label="用户id" align="center" prop="userid" />
<el-table-column label="持卡用户" align="center" prop="myuser.name" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:mymedicalcard:edit']">修改</el-button>
@ -153,9 +153,7 @@
<el-form-item label="验证码" prop="vercode">
<el-input v-model="form.vercode" placeholder="请输入验证码" />
</el-form-item>
<el-form-item label="用户id" prop="userid">
<el-input v-model="form.userid" placeholder="请输入用户id" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
@ -292,7 +290,8 @@ function submitForm() {
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除就诊卡管理编号为"' + _ids + '"的数据项?').then(function() {
const _names = row.name || names.value;
proxy.$modal.confirm('是否确认删除就诊卡姓名"' + _names + '"的数据项?').then(function() {
return delMymedicalcard(_ids);
}).then(() => {
getList();

View File

@ -0,0 +1,362 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="患者编号" prop="patientNumber">
<el-input
v-model="queryParams.patientNumber"
placeholder="请输入患者编号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="患者姓名" prop="patientName">
<el-input
v-model="queryParams.patientName"
placeholder="请输入患者姓名"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="性别" prop="patientSex">
<el-select v-model="queryParams.patientSex" placeholder="请选择性别" clearable>
<el-option
v-for="dict in sys_user_sex"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="联系方式" prop="patientPhone">
<el-input
v-model="queryParams.patientPhone"
placeholder="请输入联系方式"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="过敏史" prop="patientAllergicHistory">
<el-input
v-model="queryParams.patientAllergicHistory"
placeholder="请输入过敏史"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:mypatient:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:mypatient:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:mypatient:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:mypatient:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="mypatientList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="患者编号" align="center" prop="patientNumber" />
<el-table-column label="患者姓名" align="center" prop="patientName" />
<el-table-column label="性别" align="center" prop="patientSex">
<template #default="scope">
<dict-tag :options="sys_user_sex" :value="scope.row.patientSex"/>
</template>
</el-table-column>
<el-table-column label="联系方式" align="center" prop="patientPhone" />
<el-table-column label="过敏史" align="center" prop="patientAllergicHistory" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:mypatient:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:mypatient:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改患者管理对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="mypatientRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="患者编号" prop="patientNumber">
<el-input v-model="form.patientNumber" placeholder="请输入患者编号" />
</el-form-item>
<el-form-item label="患者姓名" prop="patientName">
<el-input v-model="form.patientName" placeholder="请输入患者姓名" />
</el-form-item>
<el-form-item label="性别" prop="patientSex">
<el-select v-model="form.patientSex" placeholder="请选择性别">
<el-option
v-for="dict in sys_user_sex"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="联系方式" prop="patientPhone">
<el-input v-model="form.patientPhone" placeholder="请输入联系方式" />
</el-form-item>
<el-form-item label="过敏史" prop="patientAllergicHistory">
<el-input v-model="form.patientAllergicHistory" placeholder="请输入过敏史" />
</el-form-item>
<el-divider content-position="center">病症图片管理信息</el-divider>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="Plus" @click="handleAddMylesion">添加</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="Delete" @click="handleDeleteMylesion">删除</el-button>
</el-col>
</el-row>
<el-table :data="mylesionList" :row-class-name="rowMylesionIndex" @selection-change="handleMylesionSelectionChange" ref="mylesion">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="图片编号" prop="imagesNumber" width="150">
<template #default="scope">
<el-input v-model="scope.row.imagesNumber" placeholder="请输入图片编号" />
</template>
</el-table-column>
<el-table-column label="病灶图片" prop="lesionImages" width="150">
<template #default="scope">
<el-input v-model="scope.row.lesionImages" placeholder="请输入病灶图片" />
</template>
</el-table-column>
<el-table-column label="患者编号" prop="patientid" width="150">
<template #default="scope">
<el-input v-model="scope.row.patientid" placeholder="请输入患者编号" />
</template>
</el-table-column>
</el-table>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Mypatient">
import { listMypatient, getMypatient, delMypatient, addMypatient, updateMypatient } from "@/api/system/mypatient";
const { proxy } = getCurrentInstance();
const { sys_user_sex } = proxy.useDict('sys_user_sex');
const mypatientList = ref([]);
const mylesionList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const checkedMylesion = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
patientNumber: null,
patientName: null,
patientSex: null,
patientPhone: null,
patientAllergicHistory: null
},
rules: {
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询患者管理列表 */
function getList() {
loading.value = true;
listMypatient(queryParams.value).then(response => {
mypatientList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
id: null,
patientNumber: null,
patientName: null,
patientSex: null,
patientPhone: null,
patientAllergicHistory: null
};
mylesionList.value = [];
proxy.resetForm("mypatientRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加患者管理";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value
getMypatient(_id).then(response => {
form.value = response.data;
mylesionList.value = response.data.mylesionList;
open.value = true;
title.value = "修改患者管理";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["mypatientRef"].validate(valid => {
if (valid) {
form.value.mylesionList = mylesionList.value;
if (form.value.id != null) {
updateMypatient(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addMypatient(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除患者管理编号为"' + _ids + '"的数据项?').then(function() {
return delMypatient(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 病症图片管理序号 */
function rowMylesionIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
}
/** 病症图片管理添加按钮操作 */
function handleAddMylesion() {
let obj = {};
obj.imagesNumber = "";
obj.lesionImages = "";
obj.patientid = "";
mylesionList.value.push(obj);
}
/** 病症图片管理删除按钮操作 */
function handleDeleteMylesion() {
if (checkedMylesion.value.length == 0) {
proxy.$modal.msgError("请先选择要删除的病症图片管理数据");
} else {
const mylesions = mylesionList.value;
const checkedMylesions = checkedMylesion.value;
mylesionList.value = mylesions.filter(function(item) {
return checkedMylesions.indexOf(item.index) == -1
});
}
}
/** 复选框选中数据 */
function handleMylesionSelectionChange(selection) {
checkedMylesion.value = selection.map(item => item.index)
}
/** 导出按钮操作 */
function handleExport() {
proxy.download('system/mypatient/export', {
...queryParams.value
}, `mypatient_${new Date().getTime()}.xlsx`)
}
getList();
</script>

View File

@ -0,0 +1,289 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="描述编号" prop="smellid">
<el-input
v-model="queryParams.smellid"
placeholder="请输入描述编号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="上传时间" prop="registrationTime">
<el-input
v-model="queryParams.registrationTime"
placeholder="请输入上传时间"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="病症" prop="disease">
<el-input
v-model="queryParams.disease"
placeholder="请输入病症"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="患者描述" prop="description">
<el-input
v-model="queryParams.description"
placeholder="请输入患者描述"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="医生编号" prop="doctorid">
<el-input
v-model="queryParams.doctorid"
placeholder="请输入医生编号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:mysmell:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:mysmell:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:mysmell:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:mysmell:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="mysmellList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="描述编号" align="center" prop="smellid" />
<el-table-column label="上传时间" align="center" prop="registrationTime" />
<el-table-column label="病症" align="center" prop="disease" />
<el-table-column label="患者描述" align="center" prop="description" />
<el-table-column label="患者姓名" align="center" prop="mypatient.patientName" />
<el-table-column label="医生姓名" align="center" prop="mydoctor.medicname" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:mysmell:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:mysmell:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改徐天乐对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="mysmellRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="描述编号" prop="smellid">
<el-input v-model="form.smellid" placeholder="请输入描述编号" />
</el-form-item>
<el-form-item label="上传时间" prop="registrationTime">
<el-input v-model="form.registrationTime" placeholder="请输入上传时间" />
</el-form-item>
<el-form-item label="病症" prop="disease">
<el-input v-model="form.disease" placeholder="请输入病症" />
</el-form-item>
<el-form-item label="患者描述" prop="description">
<editor v-model="form.description" placeholder="请输入患者描述" />
</el-form-item>
<el-form-item label="患者编号" prop="patientid">
<el-input v-model="form.patientid" placeholder="请输入患者编号"/>
</el-form-item>
<el-form-item label="医生编号" prop="doctorid">
<el-input v-model="form.doctorid" placeholder="请输入医生编号" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Mysmell">
import { listMysmell, getMysmell, delMysmell, addMysmell, updateMysmell } from "@/api/system/mysmell";
const { proxy } = getCurrentInstance();
const mysmellList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
smellid: null,
registrationTime: null,
disease: null,
description: null,
patientid: null,
doctorid: null
},
rules: {
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询徐天乐列表 */
function getList() {
loading.value = true;
listMysmell(queryParams.value).then(response => {
mysmellList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
id: null,
smellid: null,
registrationTime: null,
disease: null,
description: null,
patientid: null,
doctorid: null
};
proxy.resetForm("mysmellRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加徐天乐";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value
getMysmell(_id).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改徐天乐";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["mysmellRef"].validate(valid => {
if (valid) {
if (form.value.id != null) {
updateMysmell(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addMysmell(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除徐天乐编号为"' + _ids + '"的数据项?').then(function() {
return delMysmell(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download('system/mysmell/export', {
...queryParams.value
}, `mysmell_${new Date().getTime()}.xlsx`)
}
getList();
</script>