Compare commits

..

No commits in common. "c2bf4656eb900fa4149cc3a9f8a98c87b572f649" and "229198c53bde8ac9b5f6e39b29cee800596ad51e" have entirely different histories.

6 changed files with 58 additions and 283 deletions

View File

@ -23,14 +23,3 @@ export function queryXmInfoNewDetailService(xmid: any, yq: any, xmdh: any){
}
})
}
//获取项目基本信息
export function queryXmInfoNew(xmgl: any){
return request({
url: '/xminfo/queryXmInfoNew',
method: 'get',
params: {
xmgl
}
})
}

View File

@ -58,7 +58,7 @@
{{ formatDict(row.xmgl, 'XMGL') }}
</template>
<template #xmlb ="{ row }">
{{ xmlbList.find(item => item.value === row.xmlb).label }}
{{ formatDict(row.xmlb, 'XMLB') }}
</template>
<template #jsxm ="{ row }">
{{ row.jsxm === 'Y' ? '是' : '否' }}
@ -85,7 +85,7 @@
<script setup lang="ts">
import { onMounted, ref, toRaw, computed } from 'vue';
import Basic from './tab/base/Basic.vue'
import CommmonlyValues from '@/views/liswork/labItem/tab/CommmonlyValues.vue'
import CommmonlyValues from './tab/CommmonlyValues.vue'
import UseInstr from './tab/UseInstr.vue'
import Knowledge from './tab/Knowledge.vue'
import CommonDescriptions from './tab/CommonDescriptions.vue'
@ -169,7 +169,7 @@ const columns = ref([
{ prop: 'uflag', label: '停用', visible: true, align: 'center', slot: 'uflag', width: 100 },
{ prop: 'yqdl', label: '仪器大类', visible: true, align: 'center', slot: 'yqdl', width: 100 },
{ prop: 'xmid', label: '项目ID', visible: true, align: 'center', width: 100 },
{ prop: 'knowledge', label: '知识库编码', visible: true, align: 'center', width: 100 },
{ prop: 'knowledge', label: '项目编码', visible: true, align: 'center', width: 100 },
{ prop: 'val1', label: '外部代码1', visible: true, align: 'center', width: 100 },
{ prop: 'val2', label: '外部代码2', visible: true, align: 'center', width: 100 },
{ prop: 'val3', label: '外部代码3', visible: true, align: 'center', width: 100 },

View File

@ -5,8 +5,11 @@
<span class="text-span">基本参数:</span>
<el-divider style="margin: 5px 0;"/>
<el-form-item label="项目类别" prop="xmgl">
<SelectTable v-model:data="formData.xmgl" :fields="xmglFields" :tableData="dictData.XMGL" label="label" value="value" objKey="value" width="140px" placeholder="项目类别"
size="small" />
<el-input placeholder="项目类别" v-model="formData.xmgl">
<template #default="{ row }">
{{ formatDict(row.xmgl, 'XMGL') }}
</template>
</el-input>
</el-form-item>
<el-form-item label="英文缩写" prop="xmdh">
<el-input placeholder="英文缩写" v-model="formData.xmdh"></el-input>
@ -94,15 +97,25 @@
</el-form-item>
<el-form-item label="公式" prop="jsgs" label-width="40px" >
<el-input placeholder="公式" v-model="formData.jsgs"></el-input>
<el-button v-show="formData.jsxm === 'Y'" type="primary" @click="calcGuildeClick">向导...</el-button>
<el-button type="primary" @click="calcGuildeClick">向导...</el-button>
</el-form-item>
<el-form-item>
<el-checkbox label="参考值与性别有关" v-model="ygxbCheck"></el-checkbox>
<el-checkbox label="与年龄有关" v-model="ygnlCheck"></el-checkbox>
<el-checkbox label="与标本有关" v-model="ygbbCheck"></el-checkbox>
<el-checkbox label="与生理周期有关" v-model="ygzqCheck"></el-checkbox>
<el-checkbox label="与诊断有关" v-model="ygzdCheck"></el-checkbox>
<el-checkbox label="计算项目" v-model="jsxmCheck"></el-checkbox>
<el-form-item prop="ygxb" >
<el-checkbox label="参考值与性别有关" v-model="formData.ygxb"></el-checkbox>
</el-form-item>
<el-form-item prop="ygnl" >
<el-checkbox label="与年龄有关" v-model="formData.ygnl"></el-checkbox>
</el-form-item>
<el-form-item prop="ygbb">
<el-checkbox label="与标本有关" v-model="formData.ygbb"></el-checkbox>
</el-form-item>
<el-form-item prop="ygzq">
<el-checkbox label="与生理周期有关" v-model="formData.ygzq"></el-checkbox>
</el-form-item>
<el-form-item prop="ygzd">
<el-checkbox label="与诊断有关" v-model="formData.ygzd"></el-checkbox>
</el-form-item>
<el-form-item prop="jsxm">
<el-checkbox label="计算项目" v-model="formData.jsxm"></el-checkbox>
</el-form-item>
<span class="text-span">医学审核条件:</span>
<el-divider style="margin: 5px 0;"/>
@ -151,16 +164,15 @@
</el-form>
<MultiRef :refData="formData.dyckz" v-model:dialog-table-visible="mulitDialogTableVisible" @closeWithReturn="closeWithReturnMultiRef" />
<CalcGuilde v-model="calcDialogTableVisible" :xmgl="formData.xmgl" :form-data="formData" @confirm="handleDialogConfirm"/>
<CalcGuilde v-model="calcDialogTableVisible" @confirm="handleDialogConfirm"/>
</div>
</template>
<script setup lang="ts">
import { formatDict,getDictData ,dictData} from '@/hooks';
import { formatDict,getDictData } from '@/hooks';
import MultiRef from './child/MultiRef.vue';
import CalcGuilde from './child/CalcGuilde.vue';
import SelectTable from '@/components/SelectTable/index.vue'
const props = defineProps({
dataList: {
@ -169,14 +181,11 @@ const props = defineProps({
}
});
const formRef = ref();
const formData = ref<any>({});
const mulitDialogTableVisible = ref(false)
const calcDialogTableVisible = ref(false)
const xmglFields = ref([
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
{ prop: 'label', label: '名称', enablePinyinSearch: true },
])
computed(() => {
switch(formData.value.jgbz){
@ -185,64 +194,10 @@ computed(() => {
break;
case '2':
formData.value.cp_jgz = formData.value.jgz + '%';
break;
break
}
});
const jsxmCheck = computed({
get(){
return formData.value.jsxm === 'Y'
},
set(checked: boolean){
formData.value.jsxm = checked ? 'Y' : 'N';
}
})
const ygzqCheck = computed({
get(){
return formData.value.ygzq === 'Y'
},
set(checked: boolean){
formData.value.ygzq = checked ? 'Y' : 'N';
}
})
const ygzdCheck = computed({
get(){
return formData.value.ygzd === 'Y'
},
set(checked: boolean){
formData.value.ygzd = checked ? 'Y' : 'N';
}
})
const ygbbCheck = computed({
get(){
return formData.value.ygbb === 'Y'
},
set(checked: boolean){
formData.value.ygbb = checked ? 'Y' : 'N';
}
})
const ygnlCheck = computed({
get(){
return formData.value.ygnl === 'Y'
},
set(checked: boolean){
formData.value.ygnl = checked ? 'Y' : 'N';
}
})
const ygxbCheck = computed({
get(){
return formData.value.ygxb === 'Y'
},
set(checked: boolean){
formData.value.ygxb = checked ? 'Y' : 'N';
}
})
watch(
() => props.dataList,
(newVal) => {
@ -269,6 +224,7 @@ const calcGuildeClick = () => {
calcDialogTableVisible.value = true
}
onMounted(() => {
getDictData('XMGL');
})

View File

@ -1,16 +1,11 @@
<template>
<!-- 计算项目表达式生成向导 -->
<el-dialog :model-value="visible" @update:model-value="handleVisibleChange" title="计算项目表达式生成向导" width="600px" @close="onClose">
<el-row class="input-text">
<el-input type="textarea" v-model="formData.jsgs"></el-input>
</el-row>
<el-dialog :model-value="visible" @update:model-value="handleVisibleChange" title="计算项目表达式生成向导" width="400px" @close="onClose">
<el-row>
<el-col :span="12">
<el-input type="textarea" v-model="inputText"></el-input>
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig"
@row-click="rowHandle" :enableColumnDrag="true"
@column-drag-end="handleColumnDragEnd"/>
</el-col>
<el-col :span="12" class="right">
<el-button type="" @click="bClickAdd">+ 加</el-button>
<el-button type="" @click="bClickSub">- 减</el-button>
<el-button type="" @click="bClickMul">* 乘</el-button>
@ -18,55 +13,37 @@
<el-button type="" @click="bClickLeft">(</el-button>
<el-button type="" @click="bClickRight">)</el-button>
<el-button type="" @click="bClickPower">^次方</el-button>
<el-button type="" @click="bClickSex">性别</el-button>
<el-button type="" @click="bClickAge">年龄</el-button>
<h4>说明:</h4>
<h4>1.计算公式中不可包括其他计算项目,若有需要,</h4>
<h4>一律转换为最原始的计算公式</h4>
<h4>2.所有项目代号必须使用“[”和“]”括起来</h4>
<h4>3.表达式可以为一个常数或空字符串</h4>
</el-col>
<el-button type="" @click="">性别</el-button>
<el-button type="" @click="">年龄</el-button>
</el-row>
<!-- 底部按钮(可选) -->
<template #footer>
<el-button type="primary" @click="handleOk">确定</el-button>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleOk">确定</el-button>
</template>
</el-dialog>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
import { queryXmInfoNew } from '@/api/liswork/labItem/labItemApi'
const props = defineProps({
xmgl:{
type: String,
},
text: {
type: String,
},
formData:{
type: Object,
default: {}
}
})
let visible = ref<boolean>()
const tableData = ref()
const inputText = ref('')
const emit = defineEmits(['update:model-value', 'confirm'])
const columns = ref([
{ prop: 'xmdh', label: '项目代号', align: 'center', visible: true, width: 100 },
{ prop: 'xmmc', label: '项目名称', align: 'center', visible: true, width: 180 }
{ prop: 'xmmc', label: '项目名称', align: 'center', visible: true, width: 100 }
])
// 表格配置
const tableConfig = ref(
{
// stripe: true, // 斑马纹
border: true, // 边框
height: '350', // 高度
height: '', // 高度
highlightCurrentRow: true, // 高亮当前行
fit: true
}
@ -76,8 +53,8 @@ const handleColumnDragEnd = (newColumns: any) => {
columns.value = newColumns.columns
}
const rowHandle = (row: any) => {
inputText.value += '['+row.xmdh+']'
const rowHandle = () => {
}
const onClose = () => {
@ -99,61 +76,34 @@ const handleVisibleChange = (newVisible: boolean) => {
}
const bClickAdd = () => {
inputText.value += '+'
}
const bClickSub = () => {
inputText.value += '-'
}
const bClickMul = () => {
inputText.value += '*'
}
const bClickDiv = () => {
inputText.value += '/'
}
const bClickLeft = () => {
inputText.value += '('
}
const bClickRight = () => {
inputText.value += ')'
}
const bClickPower = () => {
inputText.value += '^'
}
const bClickSex = () => {
inputText.value += '[SEX]'
}
const bClickAge = () => {
inputText.value += '[AGE]'
}
const init = async () => {
const res = await queryXmInfoNew(props.xmgl);
tableData.value = res.data
//inputText.value = props.text
}
onMounted(()=>{
init();
})
</script>
<style scoped lang="scss">
.input-text {
margin-bottom: 10px;
}
// .right {
// margin-left: 2px;
// }
.el-button {
margin-bottom: 5px;
}
</style>

View File

@ -1,76 +0,0 @@
<template>
<!-- 特定审核条件 -->
<el-row>
<el-button type="" @click="">增加</el-button>
<el-button type="" @click="">删除</el-button>
<CustomTable ref="tableRefs" :data="tableDataUp" :columns="columnsUp" :config="tableConfig"
@row-click="rowHandleUp" :enableColumnDrag="true"
@column-drag-end="handleColumnDragEnd"/>
</el-row>
<el-row>
<el-col :span="12">
<CustomTable ref="tableRefs" :data="tableDataDown" :columns="columnsDown" :config="tableConfig"
@row-click="rowHandleDown" :enableColumnDrag="true"
@column-drag-end="handleColumnDragEnd"/>
</el-col>
<el-col :span="12">
<el-button type="" @click="">科室</el-button>
<el-button type="" @click="">诊断</el-button>
<el-button type="" @click="">初报</el-button>
<el-button type="" @click="">结果</el-button>
<el-button type="" @click="">样本状态</el-button>
<h4>1公式举例:科室诊断条件:[科室] = '血液科' or [诊断] ='白血病' 当前结果判断条件:[结果] &gt; 20 or [结果] &lt;2 or [结果] ='阳性'</h4>
<h4>2公式举例:科室诊断条件(其他项目代号如):[WBC] = '阳性' or [WBC] &gt; 20 or [WBC] &lt;20 当前结果判断条件: [结果] &gt; 20 or [结果] &lt;2</h4>
<h4>3公式举例:只发一次危急值病人条件:[初报] = 'brdh' and [初报] = 'brxm' 当前结果判断条件:[结果] &gt; 20 or [结果] &lt;2 or [结果] ='阳性'</h4>
<h4>只要符合科室或诊断条件的,就不会再断默认的危机值标准了</h4>
<h4>注意科室用中文,结果如果是字符型用单引号引起来</h4>
</el-col>
</el-row>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
const columnsUp = ref([
{ prop: 'xmdh', label: '项目代号', align: 'center', visible: true, width: 100 },
{ prop: 'xmmc', label: '项目名称', align: 'center', visible: true, width: 100 }
])
const columnsDown = ref([
{ prop: 'xmdh', label: '项目代号', align: 'center', visible: true, width: 100 },
{ prop: 'xmmc', label: '项目名称', align: 'center', visible: true, width: 100 }
])
const tableDataUp = ref()
const tableDataDown = ref()
// 表格配置
const tableConfig = ref(
{
// stripe: true, // 斑马纹
border: true, // 边框
height: '', // 高度
highlightCurrentRow: true, // 高亮当前行
fit: true
}
)
const handleColumnDragEnd = (newColumns: any) => {
columnsUp.value = newColumns.columns
columnsDown.value = newColumns.columns
}
const rowHandleUp = () => {
}
const rowHandleDown = () => {
}
</script>
<style scoped lang="scss">
</style>

View File

@ -1,44 +0,0 @@
<template>
<!-- 报告项目维护 -->
<el-form ref="form" :model="formData" label-width="80px">
<el-form-item label="项目代号" prop="xmdh">
<el-input placeholder="项目代号" v-model="formData.xmdh"></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="xmmc">
<el-input placeholder="项目名称" v-model="formData.xmmc"></el-input>
</el-form-item>
</el-form>
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
:config="tableConfig"/>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
const formData = ref()
const dataList = ref()
const columns = ref([
{ prop: 'xmz', label: '所属组', visible: true, align: 'center', width: 100 },
{ prop: 'xmdh', label: '项目代号', visible: true, align: 'center', width: 200 },
{ prop: 'xmmc', label: '项目名称', visible: true, align: 'center', width: 200 },
{ prop: 'dw', label: '单位', visible: true, align: 'center', width: 100 },
{ prop: 'ckxx', label: '参考下限', visible: true, align: 'center', width: 100 },
{ prop: 'ckxx', label: '参考上限', visible: true, align: 'center', width: 100 },
{ prop: 'dyckz', label: '打印参考值', visible: true, align: 'center', width: 100 },
]);
const tableConfig = ref({
border: true, // 边框
height: '76vh', // 高度
highlightCurrentRow: true, // 高亮当前行
// cellStyle: cellStyleHd
})
//退拽属性
const handleColumnDragEnd = (data: any) => {
// 更新列配置
columns.value = data.columns;
}
</script>
<style scoped lang="scss">
</style>