手术信息 话术信息

This commit is contained in:
shidongli 2024-02-28 11:50:32 +08:00
parent cb95f361c9
commit 059a993009
4 changed files with 1877 additions and 0 deletions

71
src/api/manage/script.js Normal file
View File

@ -0,0 +1,71 @@
import request from '@/utils/request'
// 查询话术信息列表
export function listScript(query) {
return request({
url: '/manage/script/list',
method: 'get',
params: query
})
}
// 查询科室病种信息列表
export function departmentDisease(query) {
return request({
url: '/system/departmentDisease/listV1',
method: 'get',
params: query
})
}
// 科室分页列表
export function department(query) {
return request({
url: '/system/department/list',
method: 'get',
params: query
})
}
// 病种分页
export function listDisease(query) {
return request({
url: '/system/departmentDisease/list',
method: 'get',
params: query
})
}
// 查询话术信息详细
export function getScript(id) {
return request({
url: '/manage/script/' + id,
method: 'get'
})
}
// 新增话术信息
export function addScript(data) {
return request({
url: '/manage/script/add',
method: 'post',
data: data
})
}
// 修改话术信息
export function updateScript(data) {
return request({
url: '/manage/script/edit',
method: 'put',
data: data
})
}
// 删除话术信息
export function delScript(id) {
return request({
url: '/manage/script/remove/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,61 @@
import request from '@/utils/request'
// 查询手术信息列表
export function listOperationInfo(query) {
return request({
url: '/manage/operationInfo/list',
method: 'get',
params: query
})
}
// 查询手术信息详细
export function getOperationInfo(id) {
return request({
url: '/operationInfo/operationInfo/' + id,
method: 'get'
})
}
// 新增手术信息
export function addOperationInfo(data) {
return request({
url: '/operationInfo/operationInfo/add',
method: 'post',
data: data
})
}
// 修改手术信息
export function updateOperationInfo(data) {
return request({
url: '/operationInfo/operationInfo/edit',
method: 'put',
data: data
})
}
// 删除手术信息
export function delOperationInfo(id) {
return request({
url: '/operationInfo/operationInfo/remove/' + id,
method: 'delete'
})
}
// 科室列表
export function getDepartmentLis(query) {
return request({
url: '/system/department/getDepartmentList',
method: 'get',
params: query
})
}
// 手术左侧列表
export function listOperationNum(query) {
return request({
url: '/system/department/listOperationNum',
method: 'get',
params: query
})
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,589 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="手术名称" prop="operationName">
<el-input
v-model="queryParams.operationName"
placeholder="请输入手术名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @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="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['operationInfo:operationInfo:add']"
>新增手术</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-row :gutter="20">
<el-col :span="5">
<div class="left" ref="box">
<div class="name">科室名称</div>
<div>
<el-input
v-model="name"
placeholder="请输入科室名称"
clearable
@keyup.enter.native="handleQuery"
/>
</div>
<div class="listitem">
<div
:class="itemname == null ? 'allactive' : 'all'"
@click="itemdata()"
>
全部
</div>
<span class="count">{{count}}</span>
</div>
<div
class="listitem"
v-for="(item, index) in DepartmentoList"
:key="index"
@click="itemdata(item)"
>
<div :class="itemname == item.id ? 'allactive' : 'all'">
{{ item.departmentName }}
</div>
<span class="count">{{item.countNum}}</span>
</div>
</div>
</el-col>
<el-col :span="19">
<el-table
v-loading="loading"
:data="operationInfoList"
@selection-change="handleSelectionChange"
>
<el-table-column
label="序号"
align="center"
prop="sort"
type="index"
/>
<el-table-column
label="手术名称"
align="center"
prop="operationName"
/>
<el-table-column
label="术式信息"
align="center"
prop="operationInfo"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['operationInfo:operationInfo:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['operationInfo:operationInfo:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改手术信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属科室" prop="departmentName">
<el-input
v-model="form.departmentName"
placeholder="请输入所属科室"
disabled
/>
</el-form-item>
<el-form-item label="手术名称" prop="operationName">
<el-input
v-model="form.operationName"
placeholder="请输入手术名称"
:disabled="disabled"
/>
</el-form-item>
<el-form-item label="术式信息" prop="operationInfo">
<el-input
v-model="form.operationInfo"
placeholder="请输入术式信息"
type="textarea"
/>
<!-- <span class="button">
<el-button
style=""
type="primary"
plain
size="mini"
@click="handleImport"
>导入</el-button
>
</span> -->
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 用户导入对话框 -->
<el-dialog
:title="upload.title"
:visible.sync="upload.open"
width="400px"
append-to-body
>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listOperationInfo, getOperationInfo, delOperationInfo, addOperationInfo, updateOperationInfo, listOperationNum } from "@/api/operationInfo/operationInfo";
export default {
name: "OperationInfo",
data() {
return {
itemname: null,
disabled: false,
name: '',
count:'',//
//
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
updateSupport: 0,
//
// headers: { Authorization: "Bearer " + getToken() },
headers: {},
//
url: process.env.VUE_APP_BASE_API + "/system/user/importData",
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
operationInfoList: [],
DepartmentoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
departmentId: null,
departmentName: null,
operationName: null,
operationCode: null,
operationInfo: null,
operationRemark: null,
sort: null,
},
querydepartmen: {
departmentName: "",
// pageNum: 1,
// pageSize: 10,
},
//
form: {
id: null,
departmentId: null,
departmentName: null,
operationName: null,
operationCode: null,
operationInfo: null,
operationRemark: null,
sort: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
},
//
rules: {
// departmentName: [
// { required: true, message: "", trigger: "blur" }
// ],
operationName: [
{ required: true, message: "手术名称不能为空", trigger: "blur" }
],
operationInfo: [
{ required: true, message: "术式信息不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.Departmentlist();
listOperationInfo(this.queryParams).then(response => {
this.count = response.total;
this.loading = false;
});
},
watch: {
name(val) {
this.querydepartmen.departmentName = val
this.Departmentlist();
}
},
mounted() {
// this.$refs.box.addEventListener('scroll', this.lazyLoading) //
},
methods: {
//
itemdata(item) {
if (item) {
console.log(item, '9999')
this.itemname = item.id
this.form.departmentId = this.itemname
this.form.departmentName = item.departmentName
this.loading = true;
this.queryParams.departmentId = this.itemname
this.getList()
} else {
this.queryParams.departmentId = ''
this.itemname = null
this.getList()
}
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = "导入手术名称";
this.upload.open = true;
},
/** 下载模板操作 */
importTemplate() {
this.download(
"system/user/importTemplate",
{},
`user_template_${new Date().getTime()}.xlsx`
);
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.getList();
},
//
submitFileForm() {
this.$refs.upload.submit();
},
//
Departmentlist() {
this.loading = true;
listOperationNum(this.querydepartmen).then(response => {
this.DepartmentoList = response.data;
// this.count=this.DepartmentoList.length
console.log(this.DepartmentoList)
// this.total = response.total;
this.loading = false;
});
},
/** 查询手术信息列表 */
getList() {
this.loading = true;
listOperationInfo(this.queryParams).then(response => {
this.operationInfoList = response.rows;
this.operationInfoList.forEach(e=>{
console.log(e)
})
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.form.operationName = '';
this.form.operationInfo = '';
// this.reset();
},
//
reset() {
this.form = {
// id: null,
// departmentId: null,
// departmentName: null,
operationName: null,
operationCode: null,
operationInfo: null,
operationRemark: null,
sort: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
if (this.itemname) {
this.queryParams.departmentId = this.itemname
} else {
this.queryParams.departmentId = null;
this.itemname = null;
}
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.departmentId = null;
this.itemname = null;
this.resetForm("queryForm");
this.getList();
// this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
console.log(this.itemname)
if (!this.itemname) {
this.$modal.msgError("请先选择科室");
} else {
// this.reset();
this.form.operationName = null;
this.form.operationInfo = null;
this.open = true;
this.title = "添加手术信息";
if (this.title == "添加手术信息") {
this.disabled = false;
}
}
},
/** 修改按钮操作 */
handleUpdate(row) {
if (!this.itemname) {
this.$modal.msgError("请先选择科室");
} else {
// this.reset()
this.form.operationInfo = '';
this.open = true;
const id = row.id || this.ids
getOperationInfo(id).then(response => {
this.form.operationInfo= response.data.operationInfo;
this.form.operationName= response.data.operationName;
this.form.departmentId= response.data.departmentId;
this.open = true;
this.title = "修改手术信息";
if (this.title == "修改手术信息") {
this.disabled = true
}
});
}
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateOperationInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addOperationInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('确认要删除该手术?').then(function () {
return delOperationInfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('operationInfo/operationInfo/export', {
...this.queryParams
}, `operationInfo_${new Date().getTime()}.xlsx`)
}
}
};
</script>
<style lang="scss">
.left {
height: 530px;
overflow: auto;
.name {
font-weight: 700;
margin-bottom: 10px;
}
.listitem {
width: 100%;
height: 50px;
border-bottom: 1px solid #dcdfe6;
.count{
display: inline-block;
position: relative;
// right: -172px;
left: 210px;
color: #a4a6aa;
top: -35px;
font-size: 13px;
}
.all {
height: 50px;
line-height: 50px;
padding-left: 13px;
}
.allactive {
background: #e8f4ff;
height: 50px;
line-height: 50px;
padding-left: 13px;
border-left: 3px solid #4d9de7;
}
}
}
.button {
display: inline-block;
position: relative;
left: 20px;
top: -11px;
}
</style>