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