检验项目

This commit is contained in:
jiangs 2025-11-04 15:14:07 +08:00
parent 6de3f69bb7
commit 341555f68d
4 changed files with 138 additions and 32 deletions

View File

@ -7,6 +7,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"dev:prod": "vite",
"build:prod": "vite build",
"build:stage": "vite build --mode staging",
"preview": "vite preview"

View File

@ -73,34 +73,39 @@
</el-col>
<!-- 右侧区域-->
<el-col :span="10" :xs="24">
<tabView :tabList="tabList" v-model:activeTab="activeTab" />
<KeepAlive>
<component :is="activeTabN"></component>
</KeepAlive>
<!-- {{ activeTab }} -->
<div class="tabDiv">
<template v-if="activeTab === 1">
<KeepAlive :is="Basic"><Basic :visible="true" :dataList="basicTabData"/></KeepAlive>
<Basic :visible="true" :dataList="basicTabData"/>
</template>
<template v-if="activeTab === 2">
<KeepAlive><CommmonlyValues :visible="true"/></KeepAlive>
<CommmonlyValues :visible="true"/>
</template>
<template v-if="activeTab === 3">
<KeepAlive><UseInstr :visible="true" :dataList="instrOptions"/></KeepAlive>
<UseInstr :visible="true" :dataList="instrOptions"/>
</template>
<template v-if="activeTab === 4">
<KeepAlive><Knowledge :visible="true"/></KeepAlive>
<Knowledge :visible="true"/>
</template>
<template v-if="activeTab === 5">
<KeepAlive><Sort :visible="true"/></KeepAlive>
<Sort :visible="true"/>
</template>
<template v-if="activeTab === 6">
<KeepAlive><CommonDescriptions :visible="true"/></KeepAlive>
<CommonDescriptions :visible="true"/>
</template>
<template v-if="activeTab === 7">
<KeepAlive><Parameter :visible="true"/></KeepAlive>
<Parameter :visible="true"/>
</template>
<template v-if="activeTab === 8">
<KeepAlive><ChannelNumber :visible="true"/></KeepAlive>
<ChannelNumber :visible="true"/>
</template>
<template v-if="activeTab === 9">
<KeepAlive><ReferenceValueDetails :visible="true"/></KeepAlive>
<ReferenceValueDetails :visible="true"/>
</template>
</div>
</el-col>
@ -166,7 +171,32 @@ const tabList = ref([
// { label: '通道号', value: 8 },
{ label: '参考值明细', value: 9 },
]);
const activeTab = ref(1)
const activeTab = ref('Basic')
const activeTabMap = {
Basic,
CommmonlyValues,
UseInstr,
}
const activeTabN = computed(() => activeTabMap[0])
// const activeTabName = computed(()=> {
// switch(activeTab.value){
// case 1:
// console.log('activeTabName:','Basic')
// return Basic;
// case 2:
// console.log('activeTabName:','CommmonlyValues')
// return CommmonlyValues;
// case 3:
// console.log('activeTabName:','UseInstr')
// return UseInstr;
// case 4:
// console.log('activeTabName:','Knowledge')
// return 'Knowledge';
// case 5:
// return 'Sort';
// }
// })
//table表格列
const columns = ref([
@ -227,7 +257,6 @@ const getYqConfig = () => {
//获取表格数据
const getList = () => {
console.log('queryParams',queryParams.value);
queryXmInfoNewService(queryParams.value).then((res: any) => {
dataList.value = res.data;
})

View File

@ -97,7 +97,7 @@
</el-form-item>
<el-form-item label="公式" prop="jsgs" label-width="40px" >
<el-input placeholder="公式" v-model="formData.jsgs"></el-input>
<el-button type="primary">向导...</el-button>
<el-button type="primary" @click="calcGuildeClick">向导...</el-button>
</el-form-item>
<el-form-item prop="ygxb" >
<el-checkbox label="参考值与性别有关" v-model="formData.ygxb"></el-checkbox>
@ -164,6 +164,7 @@
</el-form>
<MultiRef :refData="formData.dyckz" v-model:dialog-table-visible="mulitDialogTableVisible" @closeWithReturn="closeWithReturnMultiRef" />
<CalcGuilde v-model="calcDialogTableVisible" @confirm="handleDialogConfirm"/>
</div>
</template>
@ -171,6 +172,7 @@
<script setup lang="ts">
import { formatDict,getDictData } from '@/hooks';
import MultiRef from './child/MultiRef.vue';
import CalcGuilde from './child/CalcGuilde.vue';
const props = defineProps({
//是否显示
@ -189,6 +191,7 @@ const props = defineProps({
const formRef = ref();
const formData = ref<any>({});
const mulitDialogTableVisible = ref(false)
const calcDialogTableVisible = ref(false)
computed(() => {
switch(formData.value.jgbz){
@ -218,6 +221,15 @@ const closeWithReturnMultiRef = (val: string) => {
mulitDialogTableVisible.value = false;
}
const handleDialogConfirm = (val:string) => {
formData.value.jsgs = val;
calcDialogTableVisible.value = false
}
const calcGuildeClick = () => {
calcDialogTableVisible.value = true
}
onMounted(() => {
getDictData('XMGL');

View File

@ -1,44 +1,108 @@
<template>
<!-- 计算项目表达式生成向导 -->
<el-dialog title="计算项目表达式生成向导" width="600px" @close="onClose">
<el-row :gutter="0">
<el-dialog :model-value="visible" @update:model-value="handleVisibleChange" title="计算项目表达式生成向导" width="400px" @close="onClose">
<el-row>
<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-button type="" @click="bClickAdd">+ 加</el-button>
<el-button type="" @click="bClickSub">- 减</el-button>
<el-button type="" @click="bClickMul">* 乘</el-button>
<el-button type="" @click="bClickDiv">/ 除</el-button>
<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="">性别</el-button>
<el-button type="" @click="">年龄</el-button>
</el-row>
<el-row :gutter="0">
</el-row>
<!-- <el-form ref="form" :model="formData" label-width="80px">
<el-form-item>
<el-input type="textarea" v-model="formData.name"></el-input>
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-select placeholder="请选择性别" v-model="formData.sex"></el-select>
</el-form-item>
<el-form-item label="" prop="">
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click="handleOk">确 定</el-button>
</el-form-item>
</el-form> -->
<!-- 底部按钮(可选) -->
<template #footer>
<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'
const formData = ref()
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: 100 }
])
// 表格配置
const tableConfig = ref(
{
// stripe: true, // 斑马纹
border: true, // 边框
height: '', // 高度
highlightCurrentRow: true, // 高亮当前行
fit: true
}
)
const handleColumnDragEnd = (newColumns: any) => {
columns.value = newColumns.columns
}
const rowHandle = () => {
}
const onClose = () => {
emit('update:model-value', false)
}
const handleOk = () => {
emit('confirm',inputText.value) // 通知外部执行确认操作
emit('update:model-value', false) // 确认后关闭
}
const handleCancel = () => {
emit('update:model-value', false)
}
const handleVisibleChange = (newVisible: boolean) => {
// 通知父组件:状态变为 newVisible(可能是 true 或 false)
emit('update:model-value', newVisible)
}
const bClickAdd = () => {
}
const bClickSub = () => {
}
const bClickMul = () => {
}
const bClickDiv = () => {
}
const bClickLeft = () => {
}
const bClickRight = () => {
}
const bClickPower = () => {
}
</script>
<style scoped lang="scss">