Merge branch 'main' of http://47.97.125.165:8902/jiangs/lis8.0-vue3
This commit is contained in:
commit
dde16d4d02
28
pnpm-lock.yaml
generated
28
pnpm-lock.yaml
generated
@ -68,6 +68,9 @@ importers:
|
|||||||
pinia:
|
pinia:
|
||||||
specifier: 2.1.7
|
specifier: 2.1.7
|
||||||
version: 2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3))
|
version: 2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3))
|
||||||
|
pinia-plugin-persistedstate:
|
||||||
|
specifier: ^4.0.0
|
||||||
|
version: 4.7.1(pinia@2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3)))
|
||||||
pinyin-pro:
|
pinyin-pro:
|
||||||
specifier: ^3.26.0
|
specifier: ^3.26.0
|
||||||
version: 3.27.0
|
version: 3.27.0
|
||||||
@ -1136,6 +1139,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==}
|
resolution: {integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
|
||||||
|
defu@6.1.4:
|
||||||
|
resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==}
|
||||||
|
|
||||||
delayed-stream@1.0.0:
|
delayed-stream@1.0.0:
|
||||||
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
|
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
|
||||||
engines: {node: '>=0.4.0'}
|
engines: {node: '>=0.4.0'}
|
||||||
@ -2128,6 +2134,20 @@ packages:
|
|||||||
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
|
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
|
|
||||||
|
pinia-plugin-persistedstate@4.7.1:
|
||||||
|
resolution: {integrity: sha512-WHOqh2esDlR3eAaknPbqXrkkj0D24h8shrDPqysgCFR6ghqP/fpFfJmMPJp0gETHsvrh9YNNg6dQfo2OEtDnIQ==}
|
||||||
|
peerDependencies:
|
||||||
|
'@nuxt/kit': '>=3.0.0'
|
||||||
|
'@pinia/nuxt': '>=0.10.0'
|
||||||
|
pinia: '>=3.0.0'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@nuxt/kit':
|
||||||
|
optional: true
|
||||||
|
'@pinia/nuxt':
|
||||||
|
optional: true
|
||||||
|
pinia:
|
||||||
|
optional: true
|
||||||
|
|
||||||
pinia@2.1.7:
|
pinia@2.1.7:
|
||||||
resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==}
|
resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -3760,6 +3780,8 @@ snapshots:
|
|||||||
is-descriptor: 1.0.3
|
is-descriptor: 1.0.3
|
||||||
isobject: 3.0.1
|
isobject: 3.0.1
|
||||||
|
|
||||||
|
defu@6.1.4: {}
|
||||||
|
|
||||||
delayed-stream@1.0.0: {}
|
delayed-stream@1.0.0: {}
|
||||||
|
|
||||||
delegate@3.2.0: {}
|
delegate@3.2.0: {}
|
||||||
@ -4885,6 +4907,12 @@ snapshots:
|
|||||||
|
|
||||||
picomatch@4.0.2: {}
|
picomatch@4.0.2: {}
|
||||||
|
|
||||||
|
pinia-plugin-persistedstate@4.7.1(pinia@2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3))):
|
||||||
|
dependencies:
|
||||||
|
defu: 6.1.4
|
||||||
|
optionalDependencies:
|
||||||
|
pinia: 2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3))
|
||||||
|
|
||||||
pinia@2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3)):
|
pinia@2.1.7(typescript@5.9.3)(vue@3.5.23(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-api': 6.6.4
|
'@vue/devtools-api': 6.6.4
|
||||||
|
|||||||
@ -1,39 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="topForm">
|
<div class="app-container">
|
||||||
|
<div class="topForm">
|
||||||
<el-form ref="formRef" :model="formData" inline label-width="80px" class="mb8" @submit.prevent="handleSubmit">
|
<el-form ref="formRef" :model="formData" inline label-width="80px" class="mb8" @submit.prevent="handleSubmit">
|
||||||
<el-form-item label="检索" prop="js">
|
<el-form-item label="检索" prop="js">
|
||||||
<el-input placeholder="项目代号,名称,简拼" v-model="formData.js" style="width: 200px;" @keyup.enter="getList"></el-input>
|
<el-input placeholder="项目代号,名称,简拼" v-model="formData.js" style="width: 200px;"
|
||||||
|
@keyup.enter="getList"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-button type="primary" @click="onQueryClick">查询</el-button>
|
<el-button type="primary" @click="onQueryClick">查询</el-button>
|
||||||
<el-button type="primary" @click="onAddClick">新增</el-button>
|
<el-button type="primary" @click="onAddClick">新增</el-button>
|
||||||
<el-button type="primary" @click="onDelClick">删除</el-button>
|
<el-button type="primary" @click="onDelClick">删除</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :enable-column-drag="true"
|
||||||
:config="tableConfig" @row-dblclick="onDBClick" @row-click="onClick" :pagination="pagination" @size-change="sizeChange" @page-change="currentChange">
|
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-dblclick="onDBClick" @row-click="onClick"
|
||||||
<template #xsbz="{row}">
|
:pagination="pagination" @size-change="sizeChange" @page-change="currentChange">
|
||||||
<el-checkbox :model-value="row.xsbz === '1'"/>
|
<template #xsbz="{ row }">
|
||||||
|
<el-checkbox :model-value="row.xsbz === '1'" />
|
||||||
</template>
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<TableRight :data-list="dataListRight"/>
|
<TableRight :data-list="dataListRight" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<Modify ref="modifyRef" v-model="modifyVisible" :title="modifyTitle" :type="modifyType"
|
||||||
|
@close-with-return="closeWithReturn" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<Modify ref="modifyRef" v-model="modifyVisible" :title="modifyTitle" :type="modifyType" @close-with-return="closeWithReturn"/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import {queryService,queryDetailService,delService} from '@/api/liswork/xmKnowledge/xmKnowledgeApi'
|
import { queryService, queryDetailService, delService } from '@/api/liswork/xmKnowledge/xmKnowledgeApi'
|
||||||
import TableRight from './TableData.vue'
|
import TableRight from './TableData.vue'
|
||||||
import Modify from './Modify.vue'
|
import Modify from './Modify.vue'
|
||||||
import { ElMessage,ElMessageBox } from 'element-plus';
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
|
|
||||||
const dataListLeft = ref([]);
|
const dataListLeft = ref([]);
|
||||||
const dataListRight = ref([]);
|
const dataListRight = ref([]);
|
||||||
@ -96,7 +102,7 @@ const formData = ref({
|
|||||||
js: ''
|
js: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
const closeWithReturn = () =>{
|
const closeWithReturn = () => {
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,17 +110,17 @@ const handleSubmit = (event: any) => {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
const onClick = async (row:any) => {
|
const onClick = async (row: any) => {
|
||||||
const res = await queryDetailService(row.xmid);
|
const res = await queryDetailService(row.xmid);
|
||||||
dataListRight.value = res.data
|
dataListRight.value = res.data
|
||||||
selectRow.value = row
|
selectRow.value = row
|
||||||
}
|
}
|
||||||
|
|
||||||
const onDBClick = ()=>{
|
const onDBClick = () => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onAddClick = ()=> {
|
const onAddClick = () => {
|
||||||
modifyVisible.value = true
|
modifyVisible.value = true
|
||||||
modifyTitle.value = '新增'
|
modifyTitle.value = '新增'
|
||||||
modifyType.value = '新增'
|
modifyType.value = '新增'
|
||||||
@ -122,8 +128,8 @@ const onAddClick = ()=> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onDelClick = async () => {
|
const onDelClick = async () => {
|
||||||
if(selectRow.value){
|
if (selectRow.value) {
|
||||||
await ElMessageBox.confirm('是否要删除选中的数据?','警告',{confirmButtonText: '确定',cancelButtonText: '取消',});
|
await ElMessageBox.confirm('是否要删除选中的数据?', '警告', { confirmButtonText: '确定', cancelButtonText: '取消', });
|
||||||
await delService(selectRow.value.xmid)
|
await delService(selectRow.value.xmid)
|
||||||
ElMessage.success('删除成功!')
|
ElMessage.success('删除成功!')
|
||||||
}
|
}
|
||||||
@ -135,7 +141,7 @@ const onQueryClick = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
const data = {pageSize: pagination.value.pageSize, pageNum: pagination.value.currentPage,inputData: formData.value.js }
|
const data = { pageSize: pagination.value.pageSize, pageNum: pagination.value.currentPage, inputData: formData.value.js }
|
||||||
const res = await queryService(data);
|
const res = await queryService(data);
|
||||||
dataListLeft.value = res.rows
|
dataListLeft.value = res.rows
|
||||||
pagination.value.total = res.total
|
pagination.value.total = res.total
|
||||||
@ -145,7 +151,7 @@ const getList = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
<!--报告单设定-->
|
<!--报告单设定-->
|
||||||
<el-form ref="form" :model="formData" label-width="80px">
|
<el-form ref="form" :model="formData" label-width="80px">
|
||||||
<el-form-item label="仪器" prop="yq">
|
<el-form-item label="仪器" prop="yq">
|
||||||
<YQSelectTable v-model:data="formData.yq" width="200px" @getDataValue="getList"/>
|
<YQSelectTable v-model:data="formData.yq" width="200px" @getDataValue="getList" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="handAdd" size="default">新增</el-button>
|
<el-button type="primary" @click="handAdd" size="default">新增</el-button>
|
||||||
@ -11,22 +12,25 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table ref="reportTable" :data="tableData" border width="100%" height="700px" @row-click="onRowClick" highlight-current-row>
|
<el-table ref="reportTable" :data="tableData" border width="100%" height="700px" @row-click="onRowClick"
|
||||||
|
highlight-current-row>
|
||||||
<el-table-column label="仪器" prop="yq" align="center">
|
<el-table-column label="仪器" prop="yq" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatInstr(scope.row.yq) }}
|
{{ formatInstr(scope.row.yq) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="序号" prop="xh" align="center"></el-table-column>
|
<el-table-column label="序号" prop="xh" align="center"></el-table-column>
|
||||||
<el-table-column label="报告单号" prop="bgdh" align="center" >
|
<el-table-column label="报告单号" prop="bgdh" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.bgdh" placeholder="请输入报告单号" class="full-width-input" @change="handleRowChange(scope.row, scope.$index)"></el-input>
|
<el-input v-model="scope.row.bgdh" placeholder="请输入报告单号" class="full-width-input"
|
||||||
|
@change="handleRowChange(scope.row, scope.$index)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="医疗机构" prop="yljg" align="center"></el-table-column>
|
<el-table-column label="医疗机构" prop="yljg" align="center"></el-table-column>
|
||||||
<el-table-column label="使用类型" prop="type" align="center">
|
<el-table-column label="使用类型" prop="type" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select v-model="scope.row.type" placeholder="请选择" class="full-width-input" @change="handleRowChange(scope.row, scope.$index)">
|
<el-select v-model="scope.row.type" placeholder="请选择" class="full-width-input"
|
||||||
|
@change="handleRowChange(scope.row, scope.$index)">
|
||||||
<el-option label="默认" value="1"></el-option>
|
<el-option label="默认" value="1"></el-option>
|
||||||
<el-option label="参数" value="2"></el-option>
|
<el-option label="参数" value="2"></el-option>
|
||||||
<el-option label="根据项目来判断" value="3"></el-option>
|
<el-option label="根据项目来判断" value="3"></el-option>
|
||||||
@ -35,18 +39,21 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="使用条件" prop="condition" align="center">
|
<el-table-column label="使用条件" prop="condition" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.condition" placeholder="请输入使用条件" class="full-width-input" @change="handleRowChange(scope.row, scope.$index)"></el-input>
|
<el-input v-model="scope.row.condition" placeholder="请输入使用条件" class="full-width-input"
|
||||||
|
@change="handleRowChange(scope.row, scope.$index)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {addReportService,queryReportService,updateReportService,deleteReportService} from '@/api/liswork/xtwh/reportSettingApi';
|
import { addReportService, queryReportService, updateReportService, deleteReportService } from '@/api/liswork/xtwh/reportSettingApi';
|
||||||
import { LabReportInstr } from '@/types/index';
|
import { LabReportInstr } from '@/types/index';
|
||||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
||||||
import { ElMessage,ElMessageBox } from 'element-plus';
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
import { formatInstr,getYqData } from '@/hooks/index';
|
import { formatInstr, getYqData } from '@/hooks/index';
|
||||||
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
yq: ''
|
yq: ''
|
||||||
@ -63,7 +70,7 @@ const maxXh = computed(() => {
|
|||||||
|
|
||||||
//新增数据
|
//新增数据
|
||||||
const handAdd = () => {
|
const handAdd = () => {
|
||||||
if(formData.value.yq === ''){
|
if (formData.value.yq === '') {
|
||||||
ElMessage.warning('请先选择仪器');
|
ElMessage.warning('请先选择仪器');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -81,14 +88,14 @@ const handAdd = () => {
|
|||||||
|
|
||||||
//删除数据
|
//删除数据
|
||||||
const handDelete = async () => {
|
const handDelete = async () => {
|
||||||
await ElMessageBox.confirm('是否要删除选中的数据?','Warning',
|
await ElMessageBox.confirm('是否要删除选中的数据?', 'Warning',
|
||||||
{
|
{
|
||||||
confirmButtonText: 'OK',
|
confirmButtonText: 'OK',
|
||||||
cancelButtonText: 'Cancel',
|
cancelButtonText: 'Cancel',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
await deleteReportService({yq: selectedRows.value?.yq, xh: selectedRows.value?.xh,bgdh: selectedRows.value?.bgdh});
|
await deleteReportService({ yq: selectedRows.value?.yq, xh: selectedRows.value?.xh, bgdh: selectedRows.value?.bgdh });
|
||||||
ElMessage.success('删除成功');
|
ElMessage.success('删除成功');
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
@ -96,12 +103,12 @@ const handDelete = async () => {
|
|||||||
//保存数据
|
//保存数据
|
||||||
const handSave = async () => {
|
const handSave = async () => {
|
||||||
let updateReports = tableData.value.filter(item => item.type === '1');
|
let updateReports = tableData.value.filter(item => item.type === '1');
|
||||||
if(updateReports.length > 1){
|
if (updateReports.length > 1) {
|
||||||
ElMessage.error('默认的报告单类型不能有两个,请修改后再保存');
|
ElMessage.error('默认的报告单类型不能有两个,请修改后再保存');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
updateReports = tableData.value.filter(item => item.type === '2' && item.condition.trim() === '');
|
updateReports = tableData.value.filter(item => item.type === '2' && item.condition.trim() === '');
|
||||||
if(updateReports.length > 0){
|
if (updateReports.length > 0) {
|
||||||
ElMessage.error('参数类型的使用条件不能为空,请修改后再保存');
|
ElMessage.error('参数类型的使用条件不能为空,请修改后再保存');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -109,7 +116,7 @@ const handSave = async () => {
|
|||||||
let newReports = tableData.value.filter(item => item.status === 'new');
|
let newReports = tableData.value.filter(item => item.status === 'new');
|
||||||
let res = await addReportService(newReports);
|
let res = await addReportService(newReports);
|
||||||
newReports = tableData.value.filter(item => item.status === 'update');
|
newReports = tableData.value.filter(item => item.status === 'update');
|
||||||
console.log('更新的数据',newReports);
|
console.log('更新的数据', newReports);
|
||||||
res = await updateReportService(newReports);
|
res = await updateReportService(newReports);
|
||||||
ElMessage.success('保存成功');
|
ElMessage.success('保存成功');
|
||||||
getList();
|
getList();
|
||||||
@ -123,7 +130,7 @@ const getList = async () => {
|
|||||||
|
|
||||||
//监听数据是否发生改变
|
//监听数据是否发生改变
|
||||||
const handleRowChange = (row: LabReportInstr, index: number) => {
|
const handleRowChange = (row: LabReportInstr, index: number) => {
|
||||||
if(row.status !== 'new') {
|
if (row.status !== 'new') {
|
||||||
tableData.value[index].status = 'update';
|
tableData.value[index].status = 'update';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<!--仪器收费项目对照-->
|
<!--仪器收费项目对照-->
|
||||||
<el-row>
|
<div class="app-container">
|
||||||
|
<el-row>
|
||||||
<el-form ref="form" :model="formData" label-width="80px" inline>
|
<el-form ref="form" :model="formData" label-width="80px" inline>
|
||||||
<el-form-item label="仪器" prop="yq">
|
<el-form-item label="仪器" prop="yq">
|
||||||
<YQSelectTable v-model:data="formData.yq" width="200px" @getDataValue="getList"/>
|
<YQSelectTable v-model:data="formData.yq" width="200px" @getDataValue="getList" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目检索" prop="item">
|
<el-form-item label="项目检索" prop="item">
|
||||||
<el-input placeholder="名称,简拼" v-model="formData.item" @change="getList"></el-input>
|
<el-input placeholder="名称,简拼" v-model="formData.item" @change="getList"></el-input>
|
||||||
@ -15,17 +16,19 @@
|
|||||||
<span>说明:双击左侧列表,能删除对照数据,双击右边列表能新增数据到对照当中</span>
|
<span>说明:双击左侧列表,能删除对照数据,双击右边列表能新增数据到对照当中</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :enable-column-drag="true"
|
||||||
:config="tableConfig" @row-dblclick="onDBClickLeft"/>
|
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-dblclick="onDBClickLeft" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<CustomTable ref="tableRefRight" :data="dataListRight" :columns="columnsRight" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
<CustomTable ref="tableRefRight" :data="dataListRight" :columns="columnsRight" :enable-column-drag="true"
|
||||||
:config="tableConfig" @row-dblclick="onDBClickRight"/>
|
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-dblclick="onDBClickRight" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -33,7 +36,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
||||||
import { queryService,queryXmService,addService,delService } from '@/api/liswork/xtwh/xmFeeinstrApi';
|
import { queryService, queryXmService, addService, delService } from '@/api/liswork/xtwh/xmFeeinstrApi';
|
||||||
import { queryOneService } from '@/api/system/parameter'
|
import { queryOneService } from '@/api/system/parameter'
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
|
|
||||||
@ -64,7 +67,7 @@ const columnsRight = ref([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const dataListLeft = ref([
|
const dataListLeft = ref([
|
||||||
{'sfxmdh':'','yq':''}
|
{ 'sfxmdh': '', 'yq': '' }
|
||||||
])
|
])
|
||||||
const dataListRight = ref([])
|
const dataListRight = ref([])
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -74,37 +77,38 @@ const formData = ref({
|
|||||||
|
|
||||||
//刷新数据
|
//刷新数据
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
if(!formData.value.yq) formData.value.yq = ''
|
if (!formData.value.yq) formData.value.yq = ''
|
||||||
let res = await queryService({yq: formData.value.yq});
|
let res = await queryService({ yq: formData.value.yq });
|
||||||
dataListLeft.value = res.data;
|
dataListLeft.value = res.data;
|
||||||
res = await queryOneService('HISOPT','sp_gyxmyljg')
|
// res = await queryOneService('HISOPT', 'sp_gyxmyljg')
|
||||||
let param = res.data.value
|
// let param = res.data.value
|
||||||
//先写固定值,后面再改
|
//先写固定值,后面再改
|
||||||
if(param && param !== ''){
|
let param = '1'
|
||||||
|
if (param && param !== '') {
|
||||||
param = '1'
|
param = '1'
|
||||||
}else{
|
} else {
|
||||||
param = '1'
|
param = '1'
|
||||||
}
|
}
|
||||||
res = await queryXmService({yljg: param,yq: formData.value.yq,queryValue: formData.value.item});
|
res = await queryXmService({ yljg: param, yq: formData.value.yq, queryValue: formData.value.item });
|
||||||
dataListRight.value = res.data;
|
dataListRight.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDBClickRight = async (row:any)=> {
|
const onDBClickRight = async (row: any) => {
|
||||||
//新增数据
|
//新增数据
|
||||||
await addService({sfxmdh:row.sfxmdh,yq: formData.value.yq})
|
await addService({ sfxmdh: row.sfxmdh, yq: formData.value.yq })
|
||||||
ElMessage.success('新增成功!')
|
ElMessage.success('新增成功!')
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
const onDBClickLeft = async (row:any) => {
|
const onDBClickLeft = async (row: any) => {
|
||||||
//删除数据
|
//删除数据
|
||||||
await delService({yq: formData.value.yq,sfxmdh: row.sfxmdh})
|
await delService({ yq: formData.value.yq, sfxmdh: row.sfxmdh })
|
||||||
ElMessage.success('删除成功!')
|
ElMessage.success('删除成功!')
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
const onQueryClick = () => {
|
const onQueryClick = () => {
|
||||||
if(!formData.value.yq) {
|
if (!formData.value.yq) {
|
||||||
ElMessage.error('请先选择仪器!')
|
ElMessage.error('请先选择仪器!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -116,5 +120,4 @@ const onQueryClick = () => {
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss"></style>
|
||||||
</style>
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user