Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
c9bd446b07
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user