Commit 4338daf0 by 唐玉峰

..

parent 5fa364f5
......@@ -86,7 +86,7 @@
<el-form :model="formData" label-width="15px" label-position="left" ref="formData" class="formData">
<el-table
ref="multipleTable"
row-key="id"
row-key="uidd"
:data="formData.tableList"
height="100%"
style="width: 100%"
......@@ -588,11 +588,14 @@ export default {
if (queue.length > 0) {
[...queue].forEach((child, i) => {
child.customIndex = i;
child.uidd = this.$uuid();
if (child.children && child.children.length > 0) {
child.children.map((item, i) => {
item.uidd = this.$uuid();
item.customIndex = child.customIndex + ".children." + i;
if (item.children && item.children.length > 0) {
item.children.map((el, i) => {
el.uidd = this.$uuid();
el.customIndex = item.customIndex + ".children." + i;
});
}
......@@ -1253,10 +1256,10 @@ export default {
}
});
// this.getlefttime();
// this.getTableData();
setTimeout(() => {
location.reload();
}, 5500);
this.getTableData();
// setTimeout(() => {
// location.reload();
// }, 5500);
})
.catch((error) => {});
......
......@@ -2,17 +2,7 @@
<div class="relationMapping">
<div style="height: 10px; background-color: #0283bb"></div>
<div
style="
margin-bottom: 10px;
padding: 15px 20px;
border-bottom: 1px solid #f0f2f5;
font-size: 16px;
color: #333;
display: flex;
justify-content: space-between;
"
>
<div style="padding: 15px 20px; border-bottom: 1px solid #f0f2f5; font-size: 16px; color: #333; display: flex; justify-content: space-between">
<div style="text-align: left; font-size: 16px; color: #333">
{{ $route.query.clinical_route_name }}
<span style="font-size: 12px; color: #999">{{ $route.query.applicable_objects }}</span>
......@@ -30,13 +20,13 @@
<div class="relationMapping_tablebox">
<!-- 左侧的表格 -->
<div class="relationMapping_tablebox_lefttable">
<div style="display: flex; justify-content: space-between; align-items: center; height: 40px">
<el-radio-group v-model="radio" @change="radiochange">
<div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap">
<el-radio-group v-model="radio" @change="radiochange" style="margin: 5px 0">
<el-radio :label="1">长期医嘱</el-radio>
<el-radio :label="2">临时医嘱</el-radio>
</el-radio-group>
<div class="">
<div class="" style="margin: 5px 0">
<el-button size="mini" type="primary" @click="leftadd()">添加</el-button>
<el-button size="mini" type="primary" @click="edit(currentRow, 1)">复制</el-button>
<el-button size="mini" type="primary" @click="edit(currentRow, 2)">编辑</el-button>
......@@ -88,11 +78,16 @@
</div>
<div class="relationMapping_tablebox_righttable_tablebox">
<el-table :data="righttableData" style="width: 100%" height="99%" size="mini" border @selection-change="righthandleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column prop="project_name" label="收费项目名称" show-overflow-tooltip />
<el-table-column type="selection" width="40" fixed />
<el-table-column prop="project_name" min-width="100" label="收费项目名称" fixed show-overflow-tooltip />
<el-table-column prop="project_type" label="类型" show-overflow-tooltip />
<el-table-column prop="sort" label="排序" width="80" type="index" />
<el-table-column label="操作" width="280">
<el-table-column prop="medicUseQuantity" label="用量" show-overflow-tooltip />
<el-table-column prop="medicUseMode" label="途径" show-overflow-tooltip />
<el-table-column prop="medicUsePlan" label="频率" show-overflow-tooltip />
<el-table-column prop="dropNumber" label="滴数" show-overflow-tooltip />
<el-table-column prop="remark" label="嘱托" show-overflow-tooltip />
<el-table-column prop="sort" label="排序" width="60" type="index" />
<el-table-column label="操作" width="280" fixed="right">
<template #default="scope">
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 3, righttableData)">置顶 </el-button>
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 1, righttableData)">上移 </el-button>
......@@ -181,8 +176,8 @@
]"
>
<el-select clearable v-model="ruleForm.choice" placeholder="请选择" style="width: 100%">
<el-option value="1" label="可选"></el-option>
<el-option value="2" label="必选"></el-option>
<el-option value="2" label="可选"></el-option>
<el-option value="1" label="必选"></el-option>
</el-select>
</el-form-item>
......@@ -252,8 +247,8 @@
<template #default="scope">
<el-form-item :prop="'leftaddtable.' + scope.$index + '.choice'" :rules="{ required: true, message: '不能为空' }">
<el-select clearable v-model="scope.row.choice" placeholder="请选择" style="width: 100%" size="mini">
<el-option value="1" label="可选"></el-option>
<el-option value="2" label="必选"></el-option>
<el-option value="2" label="可选"></el-option>
<el-option value="1" label="必选"></el-option>
</el-select>
</el-form-item>
</template>
......@@ -308,7 +303,7 @@
</el-dialog>
<!-- 右侧的添加弹框开始 -->
<el-dialog :visible.sync="RightdialogTableVisible" class="relationMapping_rightdiaglogbox" max-height="600px">
<el-dialog :visible.sync="RightdialogTableVisible" class="relationMapping_rightdiaglogbox" width="70%" max-height="600px">
<div class="relationMapping_rightdiaglogbox_top">
<div class="relationMapping_rightdiaglogbox_top_input">
<span class="relationMapping_rightdiaglogbox_top_input_span">项目名称:</span>
......@@ -326,11 +321,62 @@
<el-button type="primary" size="mini" style="background-color: #0283bb" @click="rightok()">保存</el-button>
</div>
</div>
<el-table :data="rightdialogData" @selection-change="rightselectchange" max-height="400px" border size="mini">
<el-table-column type="selection" width="55" />
<el-table
:data="rightdialogData"
@selection-change="rightselectchange"
max-height="400px"
border
size="mini"
ref="multipleTable"
@select="select"
@select-all="selectAll"
>
<el-table-column type="selection" width="40" />
<el-table-column prop="code" label="项目编码"></el-table-column>
<el-table-column prop="code_name" label="类型"></el-table-column>
<el-table-column prop="name" label="规则名称" />
<el-table-column prop="medicUseQuantity" label="用量" show-overflow-tooltip>
<template #default="scope">
<el-input v-if="scope.row.show" v-model.trim="scope.row.medicUseQuantity" size="mini" placeholder="请输入"></el-input>
<span v-else>{{ scope.row.medicUseQuantity }}</span>
</template>
</el-table-column>
<el-table-column prop="medicUseMode" label="途径" show-overflow-tooltip>
<template #default="scope">
<span v-if="!scope.row.show">
{{ scope.row.medicUseMode }}
</span>
<el-select size="mini" v-model="scope.row.medicUseMode" filterable remote v-else :filter-method="remoteMethod1" clearable>
<el-option v-for="item in medicUseModeoptions" :key="item.id" :label="item.describe" :value="item.describe"> </el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="medicUsePlan" label="频率" show-overflow-tooltip>
<template #default="scope">
<span v-if="!scope.row.show">
{{ scope.row.medicUsePlan }}
</span>
<el-select size="mini" filterable remote v-else :filter-method="remotemedicUsePlan" v-model="scope.row.medicUsePlan" clearable>
<el-option v-for="item in medicUsePlanoptions" :key="item.id" :label="item.describe" :value="item.describe"> </el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="dropNumber" label="滴数" show-overflow-tooltip>
<template #default="scope">
<span v-if="!scope.row.show">
{{ scope.row.dropNumber }}
</span>
<el-input v-else v-model.trim="scope.row.dropNumber" placeholder="请输入" size="mini" clearable></el-input>
</template>
</el-table-column>
<el-table-column prop="remark" label="嘱托" show-overflow-tooltip>
<template #default="scope">
<span v-if="!scope.row.show">
{{ scope.row.remark }}
</span>
<el-input v-else v-model.trim="scope.row.remark" placeholder="请输入" size="mini" clearable></el-input>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!--右侧的添加弹框结束 -->
......@@ -386,11 +432,17 @@ export default {
currentRow: null,
type: 0,
options: [],
medicUseModeoptions: [], //途径
medicUseModeoptionsLise: [],
medicUsePlanoptions: [], //频率
medicUsePlanoptionsList: [],
};
},
mounted() {
this.getleftlist(1);
this.GetMapCRAdviceType();
this.gemedicUseModeoptions();
this.gemedicUsePlanoptions();
},
methods: {
remoteMethod(query) {
......@@ -583,6 +635,11 @@ export default {
id: 0,
create_time: transformTimestamp(new Date()),
sort: 0,
medicUseQuantity: this.rightchange[key].medicUseQuantity,
medicUseMode: this.rightchange[key].medicUseMode,
medicUsePlan: this.rightchange[key].medicUsePlan,
dropNumber: this.rightchange[key].dropNumber,
remark: this.rightchange[key].remark,
};
arr.push(item);
});
......@@ -606,6 +663,16 @@ export default {
if (this.rightnameinput) {
http.post(`/ClinicalRoute/ClinicalRoute/GetProjectInfo?searchQuery=${this.rightnameinput}`, {})
.then((data) => {
if (data && data.length) {
data.map((item) => {
item.medicUseQuantity = "";
item.medicUseMode = "";
item.medicUsePlan = "";
item.dropNumber = "";
item.remark = "";
item.show = false;
});
}
this.rightdialogData = data;
})
.catch((error) => {});
......@@ -763,6 +830,88 @@ export default {
});
});
},
//获取途径,频率的下拉数据
gemedicUseModeoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=1`, {})
.then((data) => {
this.medicUseModeoptions = data;
this.medicUseModeoptionsLise = data;
})
.catch((error) => {});
},
remoteMethod1(query) {
if (query !== "") {
this.medicUseModeoptions = this.medicUseModeoptions.filter((item) => {
return item.describe.toLowerCase().indexOf(query.toLowerCase()) > -1 || item.pinyin.toLowerCase().indexOf(query.toLowerCase()) > -1;
});
} else {
this.medicUseModeoptions = this.medicUseModeoptionsLise;
}
},
//获取频率,频率的下拉数据
gemedicUsePlanoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=2`, {})
.then((data) => {
this.medicUsePlanoptions = data;
this.medicUsePlanoptionsList = data;
})
.catch((error) => {});
},
remotemedicUsePlan(query) {
if (query !== "") {
this.medicUsePlanoptions = this.medicUsePlanoptions.filter((item) => {
return item.describe.toLowerCase().indexOf(query.toLowerCase()) > -1 || item.pinyin.toLowerCase().indexOf(query.toLowerCase()) > -1;
});
} else {
this.medicUsePlanoptions = this.medicUsePlanoptionsList;
}
},
select(selection, row) {
if (selection.some((item) => item.code == row.code)) {
row.show = true;
// this.toggleSelection(row, true);
} else {
row.show = false;
// this.toggleSelection(row, false);
}
},
selectAll(selection) {
// tabledata第一层只要有在selection里面就是全选
const isSelect = selection.some((el) => {
const tableDataIds = this.rightdialogData.map((j) => j.code);
return tableDataIds.includes(el.code);
});
// tableDate第一层只要有不在selection里面就是全不选
const isCancel = !this.rightdialogData.every((el) => {
const selectIds = selection.map((j) => j.code);
return selectIds.includes(el.code);
});
if (isSelect) {
this.rightdialogData.map((el) => {
el.show = true;
});
}
if (isCancel) {
this.rightdialogData.map((el) => {
el.show = false;
});
}
},
// 控制选框是否被选中
toggleSelection(row, select) {
if (row) {
this.$nextTick(() => {
this.$refs.multipleTable && this.$refs.multipleTable.toggleRowSelection(row, select);
});
if (select == true) {
row.show = true;
} else {
row.show = false;
}
}
},
},
};
</script>
......@@ -783,13 +932,14 @@ export default {
align-items: flex-start;
// overflow-y: auto;
&_lefttable {
width: 40%;
width: 44%;
background-color: #ffff;
// margin-right: 20px;
height: 100%;
display: flex;
flex-flow: column;
&_tablebox {
width: 100%;
height: calc(100% - 40px);
flex: 1;
overflow: hidden;
}
&_addbox {
......@@ -808,11 +958,13 @@ export default {
}
}
&_righttable {
width: 58%;
width: 55%;
height: 100%;
display: flex;
flex-flow: column;
&_tablebox {
width: 100%;
height: calc(100% - 40px);
flex: 1;
overflow: hidden;
.el-checkbox {
height: 20px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment