2025-11-04 10:13:02 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="root">
|
|
|
|
|
<div class="left-tree">
|
|
|
|
|
<div class="fillter-box">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="script.filterText.value"
|
|
|
|
|
placeholder="请输入搜索内容"
|
|
|
|
|
clearable
|
|
|
|
|
></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tree-box">
|
|
|
|
|
<el-tree
|
|
|
|
|
ref="treeRef"
|
|
|
|
|
:data="script.treeData.value"
|
|
|
|
|
:props="script.treeProps"
|
|
|
|
|
@node-click="script.handleNodeClick"
|
|
|
|
|
accordion
|
|
|
|
|
:filter-node-method="script.filterNode"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="right-form">
|
|
|
|
|
<div class="select-box">
|
|
|
|
|
<div class="inline-flex">
|
|
|
|
|
<label>物资名称:</label>
|
|
|
|
|
<el-input v-model="script.filterData.wzmc"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-box">
|
|
|
|
|
<div class="event-box">
|
2025-11-13 16:22:30 +08:00
|
|
|
<el-button v-if="script.yhzid.value" type="primary" size="large" @click="script.openAddModel"
|
2025-11-04 10:13:02 +08:00
|
|
|
>新增物资</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="info" size="large" @click="script.handelExport"
|
|
|
|
|
>导出</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-content">
|
|
|
|
|
<DynamicTable
|
|
|
|
|
:dataSource="script.tableData.value"
|
|
|
|
|
:columns="script.columns"
|
|
|
|
|
:autoHeight="true"
|
|
|
|
|
:pagination="script.pagination"
|
|
|
|
|
></DynamicTable>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="model-box">
|
|
|
|
|
<MyDialog
|
|
|
|
|
v-model="script.modelVisible.value"
|
|
|
|
|
:title="script.model?.title"
|
|
|
|
|
:dynamicComponent="script.model?.content"
|
|
|
|
|
:component-props="script.model?.props"
|
|
|
|
|
:onConfirm="script.model?.onConfirm"
|
|
|
|
|
:onCancel="script.model?.onCancel"
|
|
|
|
|
ref="dialogRef"
|
2025-11-04 14:51:49 +08:00
|
|
|
width="60%"
|
2025-11-04 10:13:02 +08:00
|
|
|
>
|
|
|
|
|
</MyDialog>
|
2025-11-13 16:22:30 +08:00
|
|
|
<MyDrawer
|
|
|
|
|
v-model="script.drawerVisible.value"
|
|
|
|
|
:title="script.drawer?.title"
|
|
|
|
|
:dynamicComponent="script.drawer?.content"
|
|
|
|
|
:component-props="script.drawer?.props"
|
|
|
|
|
:onConfirm="script.drawer?.onConfirm"
|
|
|
|
|
:onCancel="script.drawer?.onCancel"
|
|
|
|
|
ref="drawerRef"
|
|
|
|
|
:direction="script.drawer?.direction"
|
|
|
|
|
:size="script.drawer?.size"
|
|
|
|
|
></MyDrawer>
|
2025-11-04 10:13:02 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import scriptFn from "./index.js";
|
|
|
|
|
import DynamicTable from "../../component/DynamicTable";
|
|
|
|
|
import MyDialog from "../../component/MyDialog";
|
2025-11-13 16:22:30 +08:00
|
|
|
import MyDrawer from "../../component/MyDrawer/index.js";
|
2025-11-04 10:13:02 +08:00
|
|
|
|
|
|
|
|
const script = scriptFn();
|
2025-11-13 16:22:30 +08:00
|
|
|
const { treeRef, dialogRef, drawerRef } = script;
|
2025-11-04 10:13:02 +08:00
|
|
|
</script>
|
2025-11-06 11:17:05 +08:00
|
|
|
<style scoped>
|
2025-11-04 10:13:02 +08:00
|
|
|
.root {
|
|
|
|
|
height: 100%;
|
2025-11-07 17:27:41 +08:00
|
|
|
width: 100%;
|
2025-11-04 10:13:02 +08:00
|
|
|
display: flex;
|
|
|
|
|
gap: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 左侧树形结构区域 */
|
|
|
|
|
.left-tree {
|
2025-11-07 17:27:41 +08:00
|
|
|
width: 20%;
|
2025-11-04 10:13:02 +08:00
|
|
|
height: 100%;
|
2025-11-05 18:08:03 +08:00
|
|
|
padding: 25px 25px 0 25px;
|
2025-11-04 10:13:02 +08:00
|
|
|
display: flex;
|
|
|
|
|
gap: 20px;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
.fillter-box {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 60px;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
.tree-box {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: calc(100% - 60px);
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 右侧表单区域 */
|
|
|
|
|
.right-form {
|
2025-11-07 17:27:41 +08:00
|
|
|
width: 80%;
|
2025-11-04 10:13:02 +08:00
|
|
|
height: 100%;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 20px;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
.select-box {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 60px;
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 20px;
|
|
|
|
|
}
|
|
|
|
|
.inline-flex {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
.inline-flex label {
|
|
|
|
|
white-space: nowrap; /* 禁止换行 */
|
|
|
|
|
}
|
|
|
|
|
.form-box {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: calc(100% - 60px);
|
|
|
|
|
overflow: auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
.event-box {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 60px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
}
|
|
|
|
|
.form-content {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: calc(100% - 60px);
|
|
|
|
|
}
|
|
|
|
|
.model-box {
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
</style>
|