参数模板设置
This commit is contained in:
parent
26af0d1034
commit
c3b89a01ab
@ -124,7 +124,7 @@ aside {
|
|||||||
//main-container全局样式
|
//main-container全局样式
|
||||||
.app-container {
|
.app-container {
|
||||||
padding: 10px 10px 0 10px;
|
padding: 10px 10px 0 10px;
|
||||||
min-height: calc(100vh - 5.25rem);
|
height: calc(100vh - 5.25rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.components-container {
|
.components-container {
|
||||||
@ -133,7 +133,7 @@ aside {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pagination-container {
|
.pagination-container {
|
||||||
margin-top: 30px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-center {
|
.text-center {
|
||||||
|
|||||||
@ -4,18 +4,10 @@
|
|||||||
<template v-if="values.includes(item.value)">
|
<template v-if="values.includes(item.value)">
|
||||||
<span
|
<span
|
||||||
v-if="(item.elTagType == 'default' || item.elTagType == '') && (item.elTagClass == '' || item.elTagClass == null)"
|
v-if="(item.elTagType == 'default' || item.elTagType == '') && (item.elTagClass == '' || item.elTagClass == null)"
|
||||||
:key="item.value"
|
:key="item.value" :index="index" :class="item.elTagClass">{{ item.label + " " }}</span>
|
||||||
:index="index"
|
<el-tag v-else :disable-transitions="true" :key="item.value + ''" :index="index"
|
||||||
:class="item.elTagClass"
|
:type="item.elTagType === 'primary' ? 'primary' : item.elTagType" :class="item.elTagClass">{{ item.label + " "
|
||||||
>{{ item.label + " " }}</span>
|
}}</el-tag>
|
||||||
<el-tag
|
|
||||||
v-else
|
|
||||||
:disable-transitions="true"
|
|
||||||
:key="item.value + ''"
|
|
||||||
:index="index"
|
|
||||||
:type="item.elTagType === 'primary' ? '' : item.elTagType"
|
|
||||||
:class="item.elTagClass"
|
|
||||||
>{{ item.label + " " }}</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="unmatch && showValue">
|
<template v-if="unmatch && showValue">
|
||||||
@ -76,7 +68,7 @@ function handleArray(array) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-tag + .el-tag {
|
.el-tag+.el-tag {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -11,14 +11,10 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" @click="delItem">删除</el-button>
|
<el-button type="danger" plain icon="Delete" @click="delItem">删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="danger" plain icon="Delete" @click="allClear">清除所有项目接口号</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="10" class="table-row">
|
<div class="table-row">
|
||||||
<el-col :span="12" class="table-box">
|
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
|
||||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig"
|
|
||||||
@row-click="handleRowClick">
|
@row-click="handleRowClick">
|
||||||
<template #tdh="{ row }">
|
<template #tdh="{ row }">
|
||||||
<el-input v-model="row.tdh" placeholder="请输入通道号" class="full-width-input" />
|
<el-input v-model="row.tdh" placeholder="请输入通道号" class="full-width-input" />
|
||||||
@ -27,16 +23,8 @@
|
|||||||
<SelectTable v-model:data="row.xmdh" :tableData="xmList" class="full-width-input" />
|
<SelectTable v-model:data="row.xmdh" :tableData="xmList" class="full-width-input" />
|
||||||
</template>
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="tips">
|
|
||||||
说明:
|
|
||||||
“通道号”又称“接口代号”,是指仪器向电脑传送结果时项目的
|
|
||||||
标识符
|
|
||||||
接口代号对于一个仪器不可重复。
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -45,13 +33,14 @@ import { queryXmInfo, } from '@/api/liswork/work/LisWork';
|
|||||||
import { getitemtdh, saveitemtdh, delitemtdh } from '@/api/liswork/xtwh/ComOpt';
|
import { getitemtdh, saveitemtdh, delitemtdh } from '@/api/liswork/xtwh/ComOpt';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
const yq = defineModel<string>();
|
const yq = defineModel<string>();
|
||||||
|
const loading = ref(false);
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const tableData = ref<Array<{ tdh: string, xmdh: string }>>([]);
|
const tableData = ref<Array<{ tdh: string, xmdh: string }>>([]);
|
||||||
const columns = [
|
const columns = [
|
||||||
{ label: '序号', type: 'index', visible: true, width: 50, align: 'center' },
|
{ label: '序号', type: 'index', visible: true, width: 50, align: 'center' },
|
||||||
{ label: '通道号', prop: 'tdh', visible: true, align: 'center', slot: 'tdh' },
|
{ label: '通道号', prop: 'tdh', visible: true, align: 'center', slot: 'tdh' },
|
||||||
{ label: '项目代号', prop: 'xmdh', visible: true, align: 'center' },
|
{ label: '项目代号', prop: 'xmdh', visible: true, align: 'center' },
|
||||||
{ label: '项目', prop: 'xmmc', visible: true, align: 'center', slot: 'xmmc', showOverflowTooltip: false },
|
{ label: '项目', prop: 'xmmc', visible: true, align: 'center', slot: 'xmmc', showOverflowTooltip: false, width: 250 },
|
||||||
{ label: '项目id', prop: 'xmid', visible: true, align: 'center' },
|
{ label: '项目id', prop: 'xmid', visible: true, align: 'center' },
|
||||||
];
|
];
|
||||||
const tableConfig = {
|
const tableConfig = {
|
||||||
@ -108,7 +97,9 @@ const allClear = () => {
|
|||||||
}
|
}
|
||||||
const xmList = ref<Array<{ xmmc: string, xmdh: string }>>([]);
|
const xmList = ref<Array<{ xmmc: string, xmdh: string }>>([]);
|
||||||
const getXmList = () => {
|
const getXmList = () => {
|
||||||
|
loading.value = true;
|
||||||
queryXmInfo({ yq: yq.value }).then((res: any) => {
|
queryXmInfo({ yq: yq.value }).then((res: any) => {
|
||||||
|
loading.value = false;
|
||||||
xmList.value = res.data.map((item: any) => {
|
xmList.value = res.data.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
label: item.xmmc,
|
label: item.xmmc,
|
||||||
|
|||||||
@ -112,7 +112,7 @@ const tabList = [
|
|||||||
{ key: 'SysSort', label: '项目排序', component: SysSort },
|
{ key: 'SysSort', label: '项目排序', component: SysSort },
|
||||||
{ key: 'SysReport', label: '报告单设置', component: SysReport },
|
{ key: 'SysReport', label: '报告单设置', component: SysReport },
|
||||||
]
|
]
|
||||||
const activeName = ref('SysParameter')
|
const activeName = ref('SysGlobal')
|
||||||
|
|
||||||
// 计算当前要渲染的组件
|
// 计算当前要渲染的组件
|
||||||
const currentComponent = computed(() => {
|
const currentComponent = computed(() => {
|
||||||
|
|||||||
@ -2,47 +2,22 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
<el-form-item :label="menuname + '类别'" prop="configType">
|
<el-form-item :label="menuname + '类别'" prop="configType">
|
||||||
<el-select
|
<el-select v-model="queryParams.configType" :placeholder="`请选择${menuname}类别`" clearable style="width: 200px"
|
||||||
v-model="queryParams.configType"
|
@change="handleQuery">
|
||||||
:placeholder="`请选择${menuname}类别`"
|
<el-option v-for="item in configTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
@change="handleQuery"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in configTypeOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="menuname + '编码'" prop="configCode">
|
<el-form-item :label="menuname + '编码'" prop="configCode">
|
||||||
<el-input
|
<el-input v-model="queryParams.configCode" :placeholder="`请输入${menuname}编码`" clearable style="width: 200px"
|
||||||
v-model="queryParams.configCode"
|
@keyup.enter="handleQuery" />
|
||||||
:placeholder="`请输入${menuname}编码`"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="`${menuname}名称`" prop="configName">
|
<el-form-item :label="`${menuname}名称`" prop="configName">
|
||||||
<el-input
|
<el-input v-model="queryParams.configName" :placeholder="`请输入${menuname}名称`" clearable style="width: 200px"
|
||||||
v-model="queryParams.configName"
|
@keyup.enter="handleQuery" />
|
||||||
:placeholder="`请输入${menuname}名称`"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="状态" clearable style="width: 200px">
|
<el-select v-model="queryParams.status" placeholder="状态" clearable style="width: 200px">
|
||||||
<el-option
|
<el-option v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
v-for="dict in sys_normal_disable"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -53,75 +28,53 @@
|
|||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Plus"
|
|
||||||
@click="handleAdd"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate">修改</el-button>
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="Edit"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete">删除</el-button>
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
@click="handleExport"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="5" class="table-container">
|
<div class="table-container">
|
||||||
<el-table v-loading="loading" :data="regdictList" @selection-change="handleSelectionChange" class="config-table" height="100%">
|
<el-table v-loading="loading" :data="regdictList" @selection-change="handleSelectionChange" class="config-table"
|
||||||
|
height="100%">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column :label="`${menuname}编号`" align="center" prop="configId" v-if="false"/>
|
<el-table-column :label="`${menuname}编号`" align="center" prop="configId" v-if="false" />
|
||||||
<el-table-column :label="`${menuname}类别`" align="center" prop="configType" width="100" show-overflow-tooltip>
|
<el-table-column :label="`${menuname}类别`" align="center" prop="configType" width="100" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span class="config-type-cell" :style="{
|
||||||
class="config-type-cell"
|
|
||||||
:style="{
|
|
||||||
backgroundColor: getConfigTypeColor(scope.row.configType),
|
backgroundColor: getConfigTypeColor(scope.row.configType),
|
||||||
color: '#fff' // 文字白色,保证对比
|
color: '#fff' // 文字白色,保证对比
|
||||||
}"
|
}">
|
||||||
>
|
{{configTypeOptions.find(item => item.value === scope.row.configType)?.label || scope.row.configType}}
|
||||||
{{ configTypeOptions.find(item => item.value === scope.row.configType)?.label || scope.row.configType }}
|
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="`${menuname}编码`" align="center" prop="configCode" width="150" show-overflow-tooltip />
|
<el-table-column :label="`${menuname}编码`" align="center" prop="configCode" width="150" show-overflow-tooltip />
|
||||||
<el-table-column :label="`${menuname}名称`" align="left" prop="configName" show-overflow-tooltip />
|
<el-table-column :label="`${menuname}名称`" align="left" prop="configName" show-overflow-tooltip />
|
||||||
<el-table-column label="选项类型" align="center" prop="configOptiontype"width="100">
|
<el-table-column label="选项类型" align="center" prop="configOptiontype" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span class="config-type-cell" :style="{
|
||||||
class="config-type-cell"
|
|
||||||
:style="{
|
|
||||||
backgroundColor: getconfigOptionTypeColor(scope.row.configOptiontype),
|
backgroundColor: getconfigOptionTypeColor(scope.row.configOptiontype),
|
||||||
color: '#fff' // 文字白色,保证对比
|
color: '#fff' // 文字白色,保证对比
|
||||||
}"
|
}">
|
||||||
>
|
{{configOptiontypeOptions.find(item => item.value === scope.row.configOptiontype)?.label ||
|
||||||
{{ configOptiontypeOptions.find(item => item.value === scope.row.configOptiontype)?.label || scope.row.configOptiontype }}
|
scope.row.configOptiontype}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="默认值" align="center" prop="configDefvalue" show-overflow-tooltip />
|
<el-table-column label="默认值" align="center" prop="configDefvalue" width="200" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<DynamicInput :type="scope.row.configOptiontype" v-model="scope.row.configDefvalue"
|
||||||
|
:dict-data="scope.row.remark" :placeholder="`请输入${scope.row.configName}值`" class="edit-input" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="值域规则" align="left" prop="remark" show-overflow-tooltip />
|
<el-table-column label="值域规则" align="left" prop="remark" show-overflow-tooltip />
|
||||||
<el-table-column label="排序" align="center" prop="configSort" width="80" />
|
<el-table-column label="排序" align="center" prop="configSort" width="80" />
|
||||||
<el-table-column label="状态" align="center" prop="status" width="80">
|
<el-table-column label="状态" align="center" prop="status" width="80">
|
||||||
@ -136,28 +89,20 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" >修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" >删除</el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</div>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||||
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
<!-- 添加或修改字典对话框 -->
|
<!-- 添加或修改字典对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
<el-dialog :title="title" v-model="open" width="500px">
|
||||||
|
|
||||||
<el-form ref="configdictRef" :model="form" :rules="rules" label-width="150px">
|
<el-form ref="configdictRef" :model="form" :rules="rules" label-width="150px">
|
||||||
<el-form-item :label="`${menuname}类别`" prop="configType">
|
<el-form-item :label="`${menuname}类别`" prop="configType">
|
||||||
<el-select
|
<el-select v-model="form.configType" :placeholder="`请选择${menuname}类别`" style="width: 100%">
|
||||||
v-model="form.configType"
|
<el-option v-for="item in configTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
:placeholder="`请选择${menuname}类别`"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in configTypeOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="`${menuname}编码`" prop="configCode">
|
<el-form-item :label="`${menuname}编码`" prop="configCode">
|
||||||
@ -167,17 +112,9 @@
|
|||||||
<el-input v-model="form.configName" :placeholder="`请输入${menuname}名称`" />
|
<el-input v-model="form.configName" :placeholder="`请输入${menuname}名称`" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="`${menuname}选项类型`" prop="configOptiontype">
|
<el-form-item :label="`${menuname}选项类型`" prop="configOptiontype">
|
||||||
<el-select
|
<el-select v-model="form.configOptiontype" :placeholder="`请选择${menuname}选项类型`" style="width: 100%">
|
||||||
v-model="form.configOptiontype"
|
<el-option v-for="item in configOptiontypeOptions" :key="item.value" :label="item.label"
|
||||||
:placeholder="`请选择${menuname}选项类型`"
|
:value="item.value" />
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in configOptiontypeOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="`${menuname}默认值`" prop="configDefvalue">
|
<el-form-item :label="`${menuname}默认值`" prop="configDefvalue">
|
||||||
@ -189,11 +126,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio
|
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
|
||||||
v-for="dict in sys_normal_disable"
|
}}</el-radio>
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.value"
|
|
||||||
>{{ dict.label }}</el-radio>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="值域参数JSON" prop="remark">
|
<el-form-item label="值域参数JSON" prop="remark">
|
||||||
@ -217,11 +151,12 @@ import {
|
|||||||
listconfigdict,
|
listconfigdict,
|
||||||
updateconfigdict
|
updateconfigdict
|
||||||
} from "@/api/liswork/xtwh/configdictApi.ts";
|
} from "@/api/liswork/xtwh/configdictApi.ts";
|
||||||
|
import DynamicInput from "@/views/liswork/xtwh/localconfig/components/DynamicInput.vue"
|
||||||
// 1. 定义类别下拉选项(根据实际业务调整)
|
// 1. 定义类别下拉选项(根据实际业务调整)
|
||||||
const configTypeOptions = ref([
|
const configTypeOptions = ref([
|
||||||
{ label: "仪器全局设置", value: "SYSTEM",color: "#E6A23C" },
|
{ label: "仪器全局设置", value: "SYSTEM", color: "#E6A23C" },
|
||||||
{ label: "仪器界面设置", value: "INPUT", color: "#67C23A" },
|
{ label: "仪器界面设置", value: "INPUT", color: "#67C23A" },
|
||||||
{ label: "本地选项设置", value: "LOCAL" , color: "#409EFF" },
|
{ label: "本地选项设置", value: "LOCAL", color: "#409EFF" },
|
||||||
{ label: "本院特殊设置", value: "HISOPT", color: "#909399" },
|
{ label: "本院特殊设置", value: "HISOPT", color: "#909399" },
|
||||||
{ label: "门诊采血设置", value: "_MZCX_", color: "#C74127" }
|
{ label: "门诊采血设置", value: "_MZCX_", color: "#C74127" }
|
||||||
]);
|
]);
|
||||||
@ -233,15 +168,15 @@ function getConfigTypeColor(type) {
|
|||||||
}
|
}
|
||||||
// 2. 定义参数类别下拉选项(根据实际业务调整)
|
// 2. 定义参数类别下拉选项(根据实际业务调整)
|
||||||
const configOptiontypeOptions = ref([
|
const configOptiontypeOptions = ref([
|
||||||
{ label: "单选框", value: "0",color: "#56BBBD" },
|
{ label: "单选框", value: "0", color: "#56BBBD" },
|
||||||
{ label: "下拉框", value: "1",color: "#67C23A" },
|
{ label: "下拉框", value: "1", color: "#67C23A" },
|
||||||
{ label: "字典单选", value: "2",color: "#FF443F" },
|
{ label: "字典单选", value: "2", color: "#FF443F" },
|
||||||
{ label: "字典多选", value: "3",color: "#F08784" },
|
{ label: "字典多选", value: "3", color: "#F08784" },
|
||||||
{ label: "特殊", value: "4",color: "#909399" },
|
{ label: "特殊", value: "4", color: "#909399" },
|
||||||
{ label: "文本框", value: "5",color: "#3282F6" },
|
{ label: "文本框", value: "5", color: "#3282F6" },
|
||||||
{ label: "数字框", value: "6",color: "#507F80" },
|
{ label: "数字框", value: "6", color: "#507F80" },
|
||||||
{ label: "日期框", value: "7",color: "#7E84F7" },
|
{ label: "日期框", value: "7", color: "#7E84F7" },
|
||||||
{ label: "时间框", value: "8",color: "#377D22" },
|
{ label: "时间框", value: "8", color: "#377D22" },
|
||||||
]);
|
]);
|
||||||
function getconfigOptionTypeColor(type) {
|
function getconfigOptionTypeColor(type) {
|
||||||
// 匹配对应类别的颜色,无匹配时用默认色
|
// 匹配对应类别的颜色,无匹配时用默认色
|
||||||
@ -265,26 +200,26 @@ const data = reactive({
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
configCode: undefined,
|
configCode: undefined,
|
||||||
configName: undefined,
|
configName: undefined,
|
||||||
configType:undefined,
|
configType: undefined,
|
||||||
status: undefined
|
status: undefined,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 30
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
configType: [{ required: true, message: menuname.value+"类别不能为空", trigger: "blur" }],
|
configType: [{ required: true, message: menuname.value + "类别不能为空", trigger: "blur" }],
|
||||||
configName: [{ required: true, message: menuname.value+"名称不能为空", trigger: "blur" }],
|
configName: [{ required: true, message: menuname.value + "名称不能为空", trigger: "blur" }],
|
||||||
configCode: [{ required: true, message: menuname.value+"编码不能为空", trigger: "blur" }],
|
configCode: [{ required: true, message: menuname.value + "编码不能为空", trigger: "blur" }],
|
||||||
configSort: [{ required: true, message: menuname.value+"顺序不能为空", trigger: "blur" }],
|
configSort: [{ required: true, message: menuname.value + "顺序不能为空", trigger: "blur" }],
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
/** 查询字典列表 */
|
/** 查询字典列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
listconfigdict(queryParams.value).then(response => {
|
listconfigdict(queryParams.value).then(response => {
|
||||||
console.log('response:', response);
|
regdictList.value = response.rows;
|
||||||
regdictList.value = response.data;
|
total.value = response.total;
|
||||||
total.value = response.data.length;
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -301,7 +236,7 @@ function reset() {
|
|||||||
configName: undefined,
|
configName: undefined,
|
||||||
configType: configTypeOptions.value[0]?.value || "",
|
configType: configTypeOptions.value[0]?.value || "",
|
||||||
configOptiontype: configOptiontypeOptions.value[0]?.value || "",
|
configOptiontype: configOptiontypeOptions.value[0]?.value || "",
|
||||||
configDefvalue:undefined,
|
configDefvalue: undefined,
|
||||||
configSort: 0,
|
configSort: 0,
|
||||||
status: "0",
|
status: "0",
|
||||||
remark: undefined
|
remark: undefined
|
||||||
@ -328,7 +263,7 @@ function handleSelectionChange(selection) {
|
|||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
reset();
|
reset();
|
||||||
open.value = true;
|
open.value = true;
|
||||||
title.value = "添加"+menuname.value;
|
title.value = "添加" + menuname.value;
|
||||||
}
|
}
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
function handleUpdate(row) {
|
function handleUpdate(row) {
|
||||||
@ -337,25 +272,28 @@ function handleUpdate(row) {
|
|||||||
getconfigdict(configId).then(response => {
|
getconfigdict(configId).then(response => {
|
||||||
form.value = response.data;
|
form.value = response.data;
|
||||||
open.value = true;
|
open.value = true;
|
||||||
title.value = "修改"+menuname.value;
|
title.value = "修改" + menuname.value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs["configdictRef"].validate(valid => {
|
proxy.$refs["configdictRef"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
||||||
if (form.value.configId != undefined) {
|
if (form.value.configId != undefined) {
|
||||||
updateconfigdict(form.value).then(response => {
|
updateconfigdict(form.value).then(response => {
|
||||||
|
if (response.code == 0) {
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
open.value = false;
|
open.value = false;
|
||||||
getList();
|
getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addconfigdict(form.value).then(response => {
|
addconfigdict(form.value).then(response => {
|
||||||
|
if (response.code == 0) {
|
||||||
proxy.$modal.msgSuccess("新增成功");
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
open.value = false;
|
open.value = false;
|
||||||
getList();
|
getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -364,13 +302,12 @@ function submitForm() {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
const configIds = row.configId || ids.value;
|
const configIds = row.configId || ids.value;
|
||||||
proxy.$modal.confirm('是否确认删除"' + menuname.value + '"编号为"' + configIds + '"的数据项?').then(function() {
|
proxy.$modal.confirm('是否确认删除"' + menuname.value + '"编号为"' + configIds + '"的数据项?').then(function () {
|
||||||
|
|
||||||
return delconfigdict(configIds);
|
return delconfigdict(configIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getList();
|
getList();
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
@ -381,42 +318,40 @@ function handleExport() {
|
|||||||
getList();
|
getList();
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.app-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 90vh;
|
|
||||||
/* 容器高度等于窗口高度 */
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.mb8 {
|
.mb8 {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
/* 固定高度 */
|
/* 固定高度 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container {
|
.table-container {
|
||||||
flex: 1;
|
height: calc(100% - 150px);
|
||||||
/* 占满剩余高度 */
|
|
||||||
overflow: hidden;
|
|
||||||
/* 避免表格超出容器 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 1. 减小表格行高(核心) */
|
/* 1. 减小表格行高(核心) */
|
||||||
:deep(.config-table .el-table__row) {
|
:deep(.config-table .el-table__row) {
|
||||||
height: 30px !important; /* 原默认行高约40px,按需调整(建议28-35px) */
|
height: 30px !important;
|
||||||
line-height: 30px !important; /* 行高与height一致,保证垂直居中 */
|
/* 原默认行高约40px,按需调整(建议28-35px) */
|
||||||
|
line-height: 30px !important;
|
||||||
|
/* 行高与height一致,保证垂直居中 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 2. 减小单元格内边距(配合行高优化) */
|
/* 2. 减小单元格内边距(配合行高优化) */
|
||||||
:deep(.config-table .el-table__cell) {
|
:deep(.config-table .el-table__cell) {
|
||||||
padding: 2px 4px !important;
|
padding: 2px 4px !important;
|
||||||
height: 30px !important; /* 单元格高度与行高一致 */
|
height: 30px !important;
|
||||||
line-height: 1.2 !important; /* 文字行高适配矮行 */
|
/* 单元格高度与行高一致 */
|
||||||
vertical-align: middle !important; /* 强制垂直居中 */
|
line-height: 1.2 !important;
|
||||||
|
/* 文字行高适配矮行 */
|
||||||
|
vertical-align: middle !important;
|
||||||
|
/* 强制垂直居中 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 3. 类别单元格适配矮行高 */
|
/* 3. 类别单元格适配矮行高 */
|
||||||
.config-type-cell {
|
.config-type-cell {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 26px; /* 适配30px行高,略小一点 */
|
min-height: 26px;
|
||||||
|
/* 适配30px行高,略小一点 */
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@ -1,16 +1,18 @@
|
|||||||
<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="xmdh">
|
<el-form-item label="项目代号" prop="xmdh">
|
||||||
<el-input placeholder="项目代号" v-model="formData.xmdh"></el-input>
|
<el-input placeholder="项目代号" v-model="formData.xmdh"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目名称" prop="xmmc">
|
<el-form-item label="项目名称" prop="xmmc">
|
||||||
<el-input placeholder="项目名称" v-model="formData.xmmc"></el-input>
|
<el-input placeholder="项目名称" v-model="formData.xmmc"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<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"
|
||||||
:config="tableConfig"/>
|
@column-drag-end="handleColumnDragEnd" :config="tableConfig" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -40,5 +42,4 @@ const handleColumnDragEnd = (data: any) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss"></style>
|
||||||
</style>
|
|
||||||
|
|||||||
11
src/views/liswork/xtwh/reportdict/index.vue
Normal file
11
src/views/liswork/xtwh/reportdict/index.vue
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
reportdict
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
|
<!--仪器收费项目对照-->
|
||||||
<template>
|
<template>
|
||||||
<!--仪器收费项目对照-->
|
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form ref="form" :model="formData" label-width="80px" inline>
|
<el-form ref="form" :model="formData" label-width="80px" inline>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
<!-- 收费项目,报告项目对照 -->
|
||||||
<template>
|
<template>
|
||||||
<!-- 收费项目,报告项目对照 -->
|
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<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">
|
||||||
@ -9,7 +9,7 @@
|
|||||||
<el-input placeholder="请输入项目名称" v-model="formData.xmdh" style="width: 200px;"></el-input>
|
<el-input placeholder="请输入项目名称" v-model="formData.xmdh" style="width: 200px;"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-checkbox v-model="checked" label="只看仪器对照收费项目" :value="xmValue"></el-checkbox>
|
<el-checkbox v-model="formData.sl" label="只看仪器对照收费项目" true-value="1" false-value="" @change="getList" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -19,16 +19,17 @@
|
|||||||
<el-button type="primary" icon="Edit" @click="onClickSave">保存</el-button>
|
<el-button type="primary" icon="Edit" @click="onClickSave">保存</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row :gutter="20" class="table-row">
|
||||||
<el-col :span="6">
|
<el-col :span="8" class="table-col">
|
||||||
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :enable-column-drag="true"
|
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :config="tableConfig"
|
||||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-click="rowClickLeft" />
|
@row-click="rowClickLeft" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18">
|
<el-col :span="16" class="table-col">
|
||||||
<CustomTable ref="tableRefRight" :data="dataListRight" :columns="columnsRight" :enable-column-drag="true"
|
<CustomTable ref="tableRefRight" :data="dataListRight" :columns="columnsRight" :enable-column-drag="true"
|
||||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig">
|
@column-drag-end="handleColumnDragEnd" :config="tableConfig">
|
||||||
<template #xmdh="{ row }">
|
<template #xmdh="{ row }">
|
||||||
{{ row.xmdh }} {{ row.xmmc }}
|
{{ row.xmdh }} {{ row.xmmc }}
|
||||||
|
<!-- <SelectTable v-model:data="row.xmdh" :tableData="dataListLeft" class="full-width-input" /> -->
|
||||||
</template>
|
</template>
|
||||||
<template #tdh="{ row }">
|
<template #tdh="{ row }">
|
||||||
<el-input placeholder="" v-model="row.tdh" class="full-width-input"></el-input>
|
<el-input placeholder="" v-model="row.tdh" class="full-width-input"></el-input>
|
||||||
@ -52,46 +53,43 @@ import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
|||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
yq: '',
|
yq: '46',
|
||||||
xmdh: ''
|
xmdh: '',
|
||||||
|
sl: ''
|
||||||
})
|
})
|
||||||
const dataListLeft = ref([])
|
const dataListLeft = ref([])
|
||||||
const dataListRight = ref([])
|
const dataListRight = ref([])
|
||||||
const checked = ref(false);
|
|
||||||
const xmValue = '1';
|
|
||||||
|
|
||||||
|
|
||||||
//退拽属性
|
//退拽属性
|
||||||
const handleColumnDragEnd = (data: any) => {
|
const handleColumnDragEnd = (data: any) => {
|
||||||
// 更新列配置
|
// 更新列配置
|
||||||
columnsLeft.value = data.columns;
|
|
||||||
columnsRight.value = data.columns;
|
columnsRight.value = data.columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
border: true, // 边框
|
border: true, // 边框
|
||||||
height: '76vh', // 高度
|
height: '100%', // 高度
|
||||||
highlightCurrentRow: true, // 高亮当前行
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
// cellStyle: cellStyleHd
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const columnsLeft = ref([
|
const columnsLeft = ref([
|
||||||
{ prop: 'sqxmmc', label: '申请/收费项目名称', visible: true, align: 'center', width: 200 },
|
{ prop: 'sqxmmc', label: '申请/收费项目名称', visible: true, align: 'center', },
|
||||||
{ prop: 'sqxmdh', label: '申请/收费项目代号', visible: true, align: 'center', width: 130 },
|
{ prop: 'sqxmdh', label: '申请/收费项目代号', visible: true, align: 'center', },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const columnsRight = ref([
|
const columnsRight = ref([
|
||||||
{ prop: 'xmdh', label: '报告项目', visible: true, align: 'center', width: 300, slot: 'xmdh' },
|
{ prop: 'xmdh', label: '报告项目', visible: true, align: 'center', width: 250, slot: 'xmdh', showOverflowTooltip: false },
|
||||||
{ prop: 'tdh', label: '双工代号', visible: true, align: 'center', width: 100, slot: 'tdh' },
|
{ prop: 'tdh', label: '双工代号', visible: true, align: 'center', slot: 'tdh' },
|
||||||
{ prop: 'mrz', label: '默认值', visible: true, align: 'center', width: 100, slot: 'mrz' },
|
{ prop: 'mrz', label: '默认值', visible: true, align: 'center', slot: 'mrz' },
|
||||||
{ prop: 'seq', label: '序号', visible: true, align: 'center', width: 100 },
|
{ prop: 'seq', label: '序号', visible: true, align: 'center', },
|
||||||
{ prop: 'def', label: '非必做', visible: true, align: 'center', width: 100, slot: 'def' },
|
{ prop: 'def', label: '非必做', visible: true, align: 'center', slot: 'def' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
const res = await queryListService({ yq: formData.value.yq })
|
const res = await queryListService(formData.value)
|
||||||
dataListLeft.value = res.data
|
dataListLeft.value = res.data
|
||||||
|
rowClickLeft(dataListLeft.value[0] || { sqxmdh: '', sqxmmc: '' })
|
||||||
}
|
}
|
||||||
|
|
||||||
const onClickAdd = () => {
|
const onClickAdd = () => {
|
||||||
@ -111,6 +109,16 @@ const rowClickLeft = async (row: any) => {
|
|||||||
const res = await queryDetailService({ sqxmdh: row.sqxmdh, sqxmmc: row.sqxmmc, yq: formData.value.yq })
|
const res = await queryDetailService({ sqxmdh: row.sqxmdh, sqxmmc: row.sqxmmc, yq: formData.value.yq })
|
||||||
dataListRight.value = res.rows
|
dataListRight.value = res.rows
|
||||||
}
|
}
|
||||||
|
getList()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss">
|
||||||
|
.table-row {
|
||||||
|
height: calc(100% - 90px);
|
||||||
|
padding-top: 10px;
|
||||||
|
|
||||||
|
.table-col {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user