Merge branch 'main' of http://47.97.125.165:8902/jiangs/lis8.0-vue3
This commit is contained in:
commit
2d2cbb28ba
13
pnpm-lock.yaml
generated
13
pnpm-lock.yaml
generated
@ -92,6 +92,9 @@ importers:
|
|||||||
vue3-print-nb:
|
vue3-print-nb:
|
||||||
specifier: ^0.1.4
|
specifier: ^0.1.4
|
||||||
version: 0.1.4(typescript@5.9.3)
|
version: 0.1.4(typescript@5.9.3)
|
||||||
|
vue3-seamless-scroll:
|
||||||
|
specifier: ^3.0.2
|
||||||
|
version: 3.0.2(vue@3.5.23(typescript@5.9.3))
|
||||||
vue3-select2-component:
|
vue3-select2-component:
|
||||||
specifier: ^0.1.7
|
specifier: ^0.1.7
|
||||||
version: 0.1.7
|
version: 0.1.7
|
||||||
@ -2711,6 +2714,9 @@ packages:
|
|||||||
vue3-print-nb@0.1.4:
|
vue3-print-nb@0.1.4:
|
||||||
resolution: {integrity: sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==}
|
resolution: {integrity: sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==}
|
||||||
|
|
||||||
|
vue3-seamless-scroll@3.0.2:
|
||||||
|
resolution: {integrity: sha512-LpKoL1ht71MASabUBsoSqbhLqcuKSrD+u01dgHac+/cthPAShKvcdM7dSGtaxjVntSFqdeViqJssjcwy/KqRSA==}
|
||||||
|
|
||||||
vue3-select2-component@0.1.7:
|
vue3-select2-component@0.1.7:
|
||||||
resolution: {integrity: sha512-8UPZmFl02I47XwW+j8ICmHyAND8wfbavlvMrqh10wwdSVER1aF2kI9XCmfIrNlVQvxSbvc0mJjWQAHHSCW9dkw==}
|
resolution: {integrity: sha512-8UPZmFl02I47XwW+j8ICmHyAND8wfbavlvMrqh10wwdSVER1aF2kI9XCmfIrNlVQvxSbvc0mJjWQAHHSCW9dkw==}
|
||||||
|
|
||||||
@ -5611,6 +5617,13 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
|
vue3-seamless-scroll@3.0.2(vue@3.5.23(typescript@5.9.3)):
|
||||||
|
dependencies:
|
||||||
|
element-plus: 2.11.5(vue@3.5.23(typescript@5.9.3))
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- '@vue/composition-api'
|
||||||
|
- vue
|
||||||
|
|
||||||
vue3-select2-component@0.1.7:
|
vue3-select2-component@0.1.7:
|
||||||
dependencies:
|
dependencies:
|
||||||
jquery: 3.7.1
|
jquery: 3.7.1
|
||||||
|
|||||||
@ -25,6 +25,7 @@ export const getDictData = async (...args: string[]) => {
|
|||||||
if(dictRefs.ITEMCLASS != undefined) dictData.value.ITEMCLASS = toRaw(dictRefs.ITEMCLASS.value) || []
|
if(dictRefs.ITEMCLASS != undefined) dictData.value.ITEMCLASS = toRaw(dictRefs.ITEMCLASS.value) || []
|
||||||
if(dictRefs.YQDL != undefined) dictData.value.YQDL = toRaw(dictRefs.YQDL.value) || []
|
if(dictRefs.YQDL != undefined) dictData.value.YQDL = toRaw(dictRefs.YQDL.value) || []
|
||||||
if(dictRefs.VA != undefined) dictData.value.VA = toRaw(dictRefs.VA.value) || []
|
if(dictRefs.VA != undefined) dictData.value.VA = toRaw(dictRefs.VA.value) || []
|
||||||
|
if(dictRefs.LF != undefined) dictData.value.LF = toRaw(dictRefs.LF.value) || []
|
||||||
}
|
}
|
||||||
|
|
||||||
//字典数据格式化方法
|
//字典数据格式化方法
|
||||||
|
|||||||
2
src/types/Object.d.ts
vendored
2
src/types/Object.d.ts
vendored
@ -15,6 +15,8 @@ export interface DictData {
|
|||||||
YQDL?: Array<any>;
|
YQDL?: Array<any>;
|
||||||
xmlbList?: Array<any>;
|
xmlbList?: Array<any>;
|
||||||
YQ?: Array<any>;
|
YQ?: Array<any>;
|
||||||
|
VA?: Array<any>;
|
||||||
|
LF?: Array<any>;
|
||||||
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
|
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -85,7 +85,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, toRaw, computed } from 'vue';
|
import { onMounted, ref, toRaw, computed } from 'vue';
|
||||||
import Basic from './tab/base/Basic.vue'
|
import Basic from './tab/base/Basic.vue'
|
||||||
import CommmonlyValues from '@/views/liswork/labItem/tab/CommmonlyValues.vue'
|
import CommonlyValues from '@/views/liswork/labItem/tab/CommonlyValues.vue'
|
||||||
import UseInstr from './tab/UseInstr.vue'
|
import UseInstr from './tab/UseInstr.vue'
|
||||||
import Knowledge from './tab/Knowledge.vue'
|
import Knowledge from './tab/Knowledge.vue'
|
||||||
import CommonDescriptions from './tab/CommonDescriptions.vue'
|
import CommonDescriptions from './tab/CommonDescriptions.vue'
|
||||||
@ -131,7 +131,7 @@ const itemclassFields = ref([
|
|||||||
const instrOptions = ref<LabInstr[]>([])
|
const instrOptions = ref<LabInstr[]>([])
|
||||||
const tabList = ref([
|
const tabList = ref([
|
||||||
{ label: '基本资料', value: 'Basic' },
|
{ label: '基本资料', value: 'Basic' },
|
||||||
{ label: '常用取值', value: 'CommmonlyValues' },
|
{ label: '常用取值', value: 'CommonlyValues' },
|
||||||
{ label: '使用仪器', value: 'UseInstr' },
|
{ label: '使用仪器', value: 'UseInstr' },
|
||||||
{ label: '知识库', value: 'Knowledge' },
|
{ label: '知识库', value: 'Knowledge' },
|
||||||
{ label: '整体排序', value: 'Sort' },
|
{ label: '整体排序', value: 'Sort' },
|
||||||
@ -143,7 +143,7 @@ const tabList = ref([
|
|||||||
const activeTab = ref('Basic')
|
const activeTab = ref('Basic')
|
||||||
const activeTabMap = {
|
const activeTabMap = {
|
||||||
Basic,
|
Basic,
|
||||||
CommmonlyValues,
|
CommonlyValues,
|
||||||
UseInstr,
|
UseInstr,
|
||||||
Knowledge,
|
Knowledge,
|
||||||
Sort,
|
Sort,
|
||||||
@ -195,7 +195,7 @@ const yqdlFields = ref([
|
|||||||
])
|
])
|
||||||
|
|
||||||
//tab页数据
|
//tab页数据
|
||||||
const tabDataList = ref<any>();
|
const tabDataList = ref<any>([]);
|
||||||
//选中行数据
|
//选中行数据
|
||||||
const selectRow = ref();
|
const selectRow = ref();
|
||||||
|
|
||||||
@ -265,13 +265,17 @@ const rowChange = (row: any) => {
|
|||||||
queryXmInfoNewDetailService(row.xmid,row.yq,row.xmdh).then((res: any) => {
|
queryXmInfoNewDetailService(row.xmid,row.yq,row.xmdh).then((res: any) => {
|
||||||
switch(activeTab.value){
|
switch(activeTab.value){
|
||||||
case 'Basic':
|
case 'Basic':
|
||||||
tabDataList.value = res.data.xmInfoNewRows[0];
|
tabDataList.value = res.data.xmInfoNewRows[0] || [];
|
||||||
break;
|
break;
|
||||||
case 'CommmonlyValues':
|
case 'CommonlyValues':
|
||||||
tabDataList.value = res.data.xmValNewRows[0];
|
if(res.data.xmValNewRows){
|
||||||
|
tabDataList.value = res.data.xmValNewRows[0] || [];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'UseInstr':
|
case 'UseInstr':
|
||||||
tabDataList.value = res.data.xmInfoVsRows[0];
|
if(res.data.xmInfoVsRows){
|
||||||
|
tabDataList.value = res.data.xmInfoVsRows[0] || [];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'Knowledge':
|
case 'Knowledge':
|
||||||
//tabDataList.value = res.data.xmInfoVsRows[0];
|
//tabDataList.value = res.data.xmInfoVsRows[0];
|
||||||
|
|||||||
@ -7,16 +7,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||||
:config="tableConfig" @row-click="handRowClick">
|
:config="tableConfig" @row-click="handRowClick">
|
||||||
<template #qz>
|
<template #qz = {row}>
|
||||||
<el-select v-model="selectValue" clearable>
|
<el-select v-model="row.qz" clearable allow-create filterable default-first-option>
|
||||||
<el-option
|
<el-option v-for="item in qzOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||||
v-for="item in options"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
<template #jgbz = {row}>
|
||||||
|
<el-select v-model="row.jgbz" clearable>
|
||||||
|
<el-option v-for="item in jgbzOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
<template #srm = {row}>
|
||||||
|
<el-input v-model="row.srm" class="full-width-input"></el-input>
|
||||||
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -24,7 +27,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import { dictData,getDictData } from '@/hooks';
|
import { dictData,getDictData } from '@/hooks';
|
||||||
import { XmValNew } from '@/types';
|
import { DictData, XmValNew } from '@/types';
|
||||||
import { ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -39,11 +42,11 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const tableRef = ref<any>(null);
|
const tableRef = ref<any>(null);
|
||||||
const dataList = ref<Array<XmValNew>>();
|
const dataList = ref<Array<XmValNew>>([]);
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ prop: 'qz', label: '取值', visible: true, align: 'center', slot:'qz', width: 200 },
|
{ prop: 'qz', label: '取值', visible: true, align: 'center', slot:'qz', width: 200 },
|
||||||
{ prop: 'srm', label: '快速输入码', visible: true, align: 'center', width: 100 },
|
{ prop: 'srm', label: '快速输入码', visible: true, align: 'center',slot: 'srm', width: 100 },
|
||||||
{ prop: 'jgbz', label: '结果标志', visible: true, align: 'center', width: 100 }
|
{ prop: 'jgbz', label: '结果标志', visible: true, align: 'center', slot: 'jgbz', width: 100 }
|
||||||
]);
|
]);
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
border: true, // 边框
|
border: true, // 边框
|
||||||
@ -51,9 +54,9 @@ const tableConfig = ref({
|
|||||||
highlightCurrentRow: true, // 高亮当前行
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
// cellStyle: cellStyleHd
|
// cellStyle: cellStyleHd
|
||||||
})
|
})
|
||||||
const options = ref()
|
const qzOptions = ref()
|
||||||
const selectValue = ref()
|
|
||||||
const selectRow = ref()
|
const selectRow = ref()
|
||||||
|
const jgbzOptions = ref()
|
||||||
|
|
||||||
//退拽属性
|
//退拽属性
|
||||||
const handleColumnDragEnd = (data: any) => {
|
const handleColumnDragEnd = (data: any) => {
|
||||||
@ -61,10 +64,6 @@ const handleColumnDragEnd = (data: any) => {
|
|||||||
columns.value = data.columns;
|
columns.value = data.columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
const init = () => {
|
|
||||||
options.value = {...dictData.value}
|
|
||||||
}
|
|
||||||
|
|
||||||
const bClickAdd = () => {
|
const bClickAdd = () => {
|
||||||
const newData: XmValNew = {
|
const newData: XmValNew = {
|
||||||
xmid: props.formData.xmid,
|
xmid: props.formData.xmid,
|
||||||
@ -72,8 +71,8 @@ const bClickAdd = () => {
|
|||||||
srm: '',
|
srm: '',
|
||||||
jgbz: ''
|
jgbz: ''
|
||||||
}
|
}
|
||||||
console.log('@@新增行:',newData);
|
|
||||||
dataList.value?.push(newData);
|
dataList.value?.push(newData);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const bClickDel = async () => {
|
const bClickDel = async () => {
|
||||||
@ -93,12 +92,11 @@ const handRowClick = (row:any) => {
|
|||||||
selectRow.value = row
|
selectRow.value = row
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(()=>{
|
onActivated(async ()=>{
|
||||||
//默认取值
|
//默认取值
|
||||||
getDictData('VA')
|
await getDictData('VA','LF')
|
||||||
init()
|
qzOptions.value = dictData.value.VA
|
||||||
console.log('常用取值:',props.formData);
|
jgbzOptions.value = dictData.value.LF
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -286,10 +286,11 @@ const conditionClick = () => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onActivated(async () => {
|
||||||
getDictData('XMGL');
|
await getDictData('XMGL');
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,10 +2,11 @@
|
|||||||
<!-- 使用仪器 -->
|
<!-- 使用仪器 -->
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<span>筛选:</span><input v-model="yq" style="width: 240px;" @change="handInputChange">
|
<el-button type="primary" @click="onClickAdd">新增</el-button>
|
||||||
|
<el-button type="primary" @click="onClickDel">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- <CustomTable ref="tableRef" :data="yqList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
<CustomTable ref="tableRef" :data="yqList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||||
:config="tableConfig"/> -->
|
:config="tableConfig"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -16,19 +17,21 @@ import { LabInstr } from '@/types';
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 是否显示
|
// 显示数据
|
||||||
dataList: {
|
dataList: {
|
||||||
type: Array<LabInstr>,
|
type: Array,
|
||||||
required: true,
|
required: true,
|
||||||
default: () => []
|
default: () => []
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const yq = ref<string>('');
|
|
||||||
const tableRef = ref<any>(null);
|
|
||||||
const yqList = ref<Array<LabInstr>>(props.dataList);
|
//const yq = ref<string>('');
|
||||||
|
const tableRef = ref<any>();
|
||||||
|
const yqList = ref<any>([]);
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ prop: 'xz', label: '选择', visible: true, align: 'center', width: 50,type: 'selection' },
|
{ prop: 'xz', label: '选择', visible: true, align: 'center', width: 50 },
|
||||||
{ prop: 'yq', label: '仪器代号', visible: true, align: 'center', width: 150 },
|
{ prop: 'yq', label: '仪器代号', visible: true, align: 'center', width: 150 },
|
||||||
{ prop: 'yqmc', label: '仪器名称', visible: true, align: 'center', width: 200},
|
{ prop: 'yqmc', label: '仪器名称', visible: true, align: 'center', width: 200},
|
||||||
{ prop: 'xs', label: '调整系数', visible: true, align: 'center', width: 100 },
|
{ prop: 'xs', label: '调整系数', visible: true, align: 'center', width: 100 },
|
||||||
@ -43,10 +46,10 @@ const tableConfig = ref({
|
|||||||
|
|
||||||
|
|
||||||
//退拽属性
|
//退拽属性
|
||||||
// const handleColumnDragEnd = (data: any) => {
|
const handleColumnDragEnd = (data: any) => {
|
||||||
// // 更新列配置
|
// 更新列配置
|
||||||
// columns.value = data.columns;
|
columns.value = data.columns;
|
||||||
// }
|
}
|
||||||
|
|
||||||
const handInputChange = () => {
|
const handInputChange = () => {
|
||||||
// yqList.value = yqList.value.filter(item => {
|
// yqList.value = yqList.value.filter(item => {
|
||||||
@ -57,7 +60,15 @@ const handInputChange = () => {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() =>{
|
const onClickAdd = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const onClickDel = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onActivated(() =>{
|
||||||
|
yqList.value = props.dataList;
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
Loading…
x
Reference in New Issue
Block a user