Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
闫晓茹 2024-03-07 17:35:04 +08:00
commit c9bd446b07

View File

@ -146,13 +146,41 @@
<!-- 添加或修改手术信息对话框 -->
<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-form-item label="科室名称" prop="departmentId">
<el-button
type=""
v-if="departmentName == '请选择科室'"
@click="clickinnerVisible()"
style="
width: 379px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ departmentName }}</el-button
>
<el-button
@click="clickinnerVisible()"
type=""
v-else
style="
width: 379px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ departmentName }}</el-button
>
</el-form-item>
<!-- <el-form-item label="所属科室" prop="departmentName">
<el-input
v-model="form.departmentName"
placeholder="请输入所属科室"
disabled
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="手术名称" prop="operationName">
<el-input
v-model="form.operationName"
@ -184,36 +212,113 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 科室弹框 -->
<el-dialog
title=""
:visible.sync="innerVisibleshow"
width="1000px"
append-to-body
:before-close="innerVisiblecancel"
>
<el-form
ref="queryForm"
:model="informationqueryParams"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-form-item label="科室名称" prop="departmentName" label-width="120">
<el-input
v-model="informationqueryParams.departmentName"
placeholder="请输入科室名称"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="informationInfoinfo"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="addresetQuerylist"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
:data="infolist"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="form.departmentId == scope.row.departmentCode"
circle
@click="nurseclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="departmentName"
label="科室名称"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
</el-table>
<pagination
v-show="totaldepartment > 0"
:total="totaldepartment"
:page.sync="informationqueryParams.pageNum"
:limit.sync="informationqueryParams.pageSize"
@pagination="informationInfoinfo"
/>
</el-dialog>
</div>
</template>
<script>
import { listOperationInfo, getOperationInfo, delOperationInfo, addOperationInfo, updateOperationInfo, listOperationNum } from "@/api/operationInfo/operationInfo";
import { department, listDisease } from "@/api/manage/script";
export default {
name: "OperationInfo",
data() {
return {
itemname: null,
disabled: false,
itemname: null,
departmentName: null,
diseaseTypeName: null,
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",
departmentId: null,
count:'',
innerVisibleshow: false, //
//
informationqueryParams: {
pageNum: 1,
pageSize: 10,
departmentName: null,
},
infolist: [],
totaldepartment: 0,
//
loading: true,
//
@ -268,9 +373,11 @@ export default {
},
//
rules: {
// departmentName: [
// { required: true, message: "", trigger: "blur" }
// ],
departmentId:[
{ required: true, message: "所属科室名称不能为空", trigger: "blur" }
],
operationName: [
{ required: true, message: "手术名称不能为空", trigger: "blur" }
],
@ -294,21 +401,74 @@ export default {
// this.$refs.box.addEventListener('scroll', this.lazyLoading) //
},
methods: {
//
clickinnerVisible() {
this.innerVisibleshow = true;
if (this.itemname) {
this.informationqueryParams.departmentId = this.itemname
} else {
this.informationqueryParams.departmentId = null
}
this.informationInfoinfo();
},
//
informationInfoinfo() {
department(this.informationqueryParams).then((response) => {
this.infolist = response.rows;
this.totaldepartment = response.total;
this.loading = false;
});
// this.informationqueryParams.page = 1;
},
//
addresetQuerylist() {
this.informationqueryParams = {
pageNum: 1,
pageSize: 10,
};
this.informationInfoinfo();
},
innerVisiblecancel() {
this.innerVisibleshow = false;
},
//
nurseclick(row) {
this.form.departmentId = row.departmentCode;
this.departmentName = row.departmentName;
this.form.diseaseTypeId = '';
this.diseaseTypeName = '请选择病种';
this.innerVisibleshow = false;
},
//
// itemdata(item) {
// if (item) {
// 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()
// }
// },
//
itemdata(item) {
if (item) {
this.itemname = item.id
this.form.departmentId = this.itemname
this.form.departmentName = item.departmentName
this.departmentName = item.departmentName
this.loading = true;
this.queryParams.departmentId = this.itemname
this.queryParams.departmentId = item.id
this.getList()
} else {
this.queryParams.departmentId = ''
this.itemname = null
this.getList()
}
},
//
@ -394,19 +554,32 @@ export default {
},
/** 新增按钮操作 */
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;
}
// 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;
// }
// }
this.reset();
if (this.itemname) {
this.form.departmentName = this.departmentName
this.form.departmentId = this.itemname
} else if (this.itemname == null) {
this.departmentName = "请选择科室"
}
else {
this.departmentName = "请选择科室"
}
this.open = true;
this.title = "添加手术信息";
},
/** 修改按钮操作 */
@ -431,9 +604,11 @@ export default {
},
/** 提交按钮 */
submitForm() {
console.log(this.form,'0000')
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id) {
if (this.form.id!=null) {
this.form.departmentName = this.departmentName
updateOperationInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
@ -441,6 +616,14 @@ export default {
this.Departmentlist();
});
} else {
if (this.itemname) {
this.form.departmentName = this.departmentName
this.form.departmentId = this.itemname
} else {
this.form.departmentName = this.departmentName
console.log(this.form,'1111')
}
addOperationInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;