Commit 4338daf0 by 唐玉峰

..

parent 5fa364f5
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<el-form :model="formData" label-width="15px" label-position="left" ref="formData" class="formData"> <el-form :model="formData" label-width="15px" label-position="left" ref="formData" class="formData">
<el-table <el-table
ref="multipleTable" ref="multipleTable"
row-key="id" row-key="uidd"
:data="formData.tableList" :data="formData.tableList"
height="100%" height="100%"
style="width: 100%" style="width: 100%"
...@@ -588,11 +588,14 @@ export default { ...@@ -588,11 +588,14 @@ export default {
if (queue.length > 0) { if (queue.length > 0) {
[...queue].forEach((child, i) => { [...queue].forEach((child, i) => {
child.customIndex = i; child.customIndex = i;
child.uidd = this.$uuid();
if (child.children && child.children.length > 0) { if (child.children && child.children.length > 0) {
child.children.map((item, i) => { child.children.map((item, i) => {
item.uidd = this.$uuid();
item.customIndex = child.customIndex + ".children." + i; item.customIndex = child.customIndex + ".children." + i;
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
item.children.map((el, i) => { item.children.map((el, i) => {
el.uidd = this.$uuid();
el.customIndex = item.customIndex + ".children." + i; el.customIndex = item.customIndex + ".children." + i;
}); });
} }
...@@ -1253,10 +1256,10 @@ export default { ...@@ -1253,10 +1256,10 @@ export default {
} }
}); });
// this.getlefttime(); // this.getlefttime();
// this.getTableData(); this.getTableData();
setTimeout(() => { // setTimeout(() => {
location.reload(); // location.reload();
}, 5500); // }, 5500);
}) })
.catch((error) => {}); .catch((error) => {});
......
...@@ -2,17 +2,7 @@ ...@@ -2,17 +2,7 @@
<div class="relationMapping"> <div class="relationMapping">
<div style="height: 10px; background-color: #0283bb"></div> <div style="height: 10px; background-color: #0283bb"></div>
<div <div style="padding: 15px 20px; border-bottom: 1px solid #f0f2f5; font-size: 16px; color: #333; display: flex; justify-content: space-between">
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="text-align: left; font-size: 16px; color: #333"> <div style="text-align: left; font-size: 16px; color: #333">
{{ $route.query.clinical_route_name }} {{ $route.query.clinical_route_name }}
<span style="font-size: 12px; color: #999">{{ $route.query.applicable_objects }}</span> <span style="font-size: 12px; color: #999">{{ $route.query.applicable_objects }}</span>
...@@ -30,13 +20,13 @@ ...@@ -30,13 +20,13 @@
<div class="relationMapping_tablebox"> <div class="relationMapping_tablebox">
<!-- 左侧的表格 --> <!-- 左侧的表格 -->
<div class="relationMapping_tablebox_lefttable"> <div class="relationMapping_tablebox_lefttable">
<div style="display: flex; justify-content: space-between; align-items: center; height: 40px"> <div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap">
<el-radio-group v-model="radio" @change="radiochange"> <el-radio-group v-model="radio" @change="radiochange" style="margin: 5px 0">
<el-radio :label="1">长期医嘱</el-radio> <el-radio :label="1">长期医嘱</el-radio>
<el-radio :label="2">临时医嘱</el-radio> <el-radio :label="2">临时医嘱</el-radio>
</el-radio-group> </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="leftadd()">添加</el-button>
<el-button size="mini" type="primary" @click="edit(currentRow, 1)">复制</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> <el-button size="mini" type="primary" @click="edit(currentRow, 2)">编辑</el-button>
...@@ -88,11 +78,16 @@ ...@@ -88,11 +78,16 @@
</div> </div>
<div class="relationMapping_tablebox_righttable_tablebox"> <div class="relationMapping_tablebox_righttable_tablebox">
<el-table :data="righttableData" style="width: 100%" height="99%" size="mini" border @selection-change="righthandleSelectionChange"> <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 type="selection" width="40" fixed />
<el-table-column prop="project_name" label="收费项目名称" show-overflow-tooltip /> <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="project_type" label="类型" show-overflow-tooltip />
<el-table-column prop="sort" label="排序" width="80" type="index" /> <el-table-column prop="medicUseQuantity" label="用量" show-overflow-tooltip />
<el-table-column label="操作" width="280"> <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"> <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, 3, righttableData)">置顶 </el-button>
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 1, righttableData)">上移 </el-button> <el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 1, righttableData)">上移 </el-button>
...@@ -181,8 +176,8 @@ ...@@ -181,8 +176,8 @@
]" ]"
> >
<el-select clearable v-model="ruleForm.choice" placeholder="请选择" style="width: 100%"> <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-select>
</el-form-item> </el-form-item>
...@@ -252,8 +247,8 @@ ...@@ -252,8 +247,8 @@
<template #default="scope"> <template #default="scope">
<el-form-item :prop="'leftaddtable.' + scope.$index + '.choice'" :rules="{ required: true, message: '不能为空' }"> <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-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-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -308,7 +303,7 @@ ...@@ -308,7 +303,7 @@
</el-dialog> </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">
<div class="relationMapping_rightdiaglogbox_top_input"> <div class="relationMapping_rightdiaglogbox_top_input">
<span class="relationMapping_rightdiaglogbox_top_input_span">项目名称:</span> <span class="relationMapping_rightdiaglogbox_top_input_span">项目名称:</span>
...@@ -326,11 +321,62 @@ ...@@ -326,11 +321,62 @@
<el-button type="primary" size="mini" style="background-color: #0283bb" @click="rightok()">保存</el-button> <el-button type="primary" size="mini" style="background-color: #0283bb" @click="rightok()">保存</el-button>
</div> </div>
</div> </div>
<el-table :data="rightdialogData" @selection-change="rightselectchange" max-height="400px" border size="mini"> <el-table
<el-table-column type="selection" width="55" /> :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" label="项目编码"></el-table-column>
<el-table-column prop="code_name" label="类型"></el-table-column> <el-table-column prop="code_name" label="类型"></el-table-column>
<el-table-column prop="name" label="规则名称" /> <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-table>
</el-dialog> </el-dialog>
<!--右侧的添加弹框结束 --> <!--右侧的添加弹框结束 -->
...@@ -386,11 +432,17 @@ export default { ...@@ -386,11 +432,17 @@ export default {
currentRow: null, currentRow: null,
type: 0, type: 0,
options: [], options: [],
medicUseModeoptions: [], //途径
medicUseModeoptionsLise: [],
medicUsePlanoptions: [], //频率
medicUsePlanoptionsList: [],
}; };
}, },
mounted() { mounted() {
this.getleftlist(1); this.getleftlist(1);
this.GetMapCRAdviceType(); this.GetMapCRAdviceType();
this.gemedicUseModeoptions();
this.gemedicUsePlanoptions();
}, },
methods: { methods: {
remoteMethod(query) { remoteMethod(query) {
...@@ -583,6 +635,11 @@ export default { ...@@ -583,6 +635,11 @@ export default {
id: 0, id: 0,
create_time: transformTimestamp(new Date()), create_time: transformTimestamp(new Date()),
sort: 0, 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); arr.push(item);
}); });
...@@ -606,6 +663,16 @@ export default { ...@@ -606,6 +663,16 @@ export default {
if (this.rightnameinput) { if (this.rightnameinput) {
http.post(`/ClinicalRoute/ClinicalRoute/GetProjectInfo?searchQuery=${this.rightnameinput}`, {}) http.post(`/ClinicalRoute/ClinicalRoute/GetProjectInfo?searchQuery=${this.rightnameinput}`, {})
.then((data) => { .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; this.rightdialogData = data;
}) })
.catch((error) => {}); .catch((error) => {});
...@@ -763,6 +830,88 @@ export default { ...@@ -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> </script>
...@@ -783,13 +932,14 @@ export default { ...@@ -783,13 +932,14 @@ export default {
align-items: flex-start; align-items: flex-start;
// overflow-y: auto; // overflow-y: auto;
&_lefttable { &_lefttable {
width: 40%; width: 44%;
background-color: #ffff; background-color: #ffff;
// margin-right: 20px;
height: 100%; height: 100%;
display: flex;
flex-flow: column;
&_tablebox { &_tablebox {
width: 100%; width: 100%;
height: calc(100% - 40px); flex: 1;
overflow: hidden; overflow: hidden;
} }
&_addbox { &_addbox {
...@@ -808,11 +958,13 @@ export default { ...@@ -808,11 +958,13 @@ export default {
} }
} }
&_righttable { &_righttable {
width: 58%; width: 55%;
height: 100%; height: 100%;
display: flex;
flex-flow: column;
&_tablebox { &_tablebox {
width: 100%; width: 100%;
height: calc(100% - 40px); flex: 1;
overflow: hidden; overflow: hidden;
.el-checkbox { .el-checkbox {
height: 20px; 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