| | |
| | | </script>
|
| | |
|
| | | <template>
|
| | | <div style="display: flex;">
|
| | | <a-card :title="formatMessage('db.man_loc_area_type.type_id', '库区类型')" style="flex: 3;margin-right: 30px;">
|
| | | <a-input v-model:value="searchLocAreaType" @change="handleLocAreaTypeDept" :placeholder="formatMessage('page.input', '请输入')"
|
| | | style="margin-bottom: 8px" />
|
| | | <a-tree v-model:expandedKeys="locAreaTypeExpandedKeys" @select="handleLocAreaTypeSelected" :tree-data="locAreaTypeData" blockNode>
|
| | | <template #title="{ name }">
|
| | | <span>{{ name }}</span>
|
| | | </template>
|
| | | </a-tree>
|
| | | </a-card>
|
| | |
|
| | | <a-card style="flex: 10;">
|
| | | <EditView ref="editChild" @tableReload="handleTableReload" />
|
| | | <div class="table-header">
|
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')"
|
| | | style="width: 200px;" @search="onSearch" />
|
| | | <div class="table-header-right">
|
| | | <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '添加') }}</a-button>
|
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button>
|
| | | </div>
|
| | | </div>
|
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
|
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id"
|
| | | :pagination="{ total: tableData.total, onChange: onPageChange }"
|
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" :loading="state.loading">
|
| | | <template #bodyCell="{ column, text, record }">
|
| | | <template v-if="column.dataIndex === 'oper'">
|
| | | <div style="display: flex;justify-content: space-evenly;">
|
| | | <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑')
|
| | | }}</a-button>
|
| | | <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除')
|
| | | }}</a-button>
|
| | | </div>
|
| | | </template>
|
| | | </template>
|
| | | </a-table>
|
| | | </a-card>
|
| | | </div>
|
| | | <a-row>
|
| | | <a-col :span="5">
|
| | | <a-card :title="formatMessage('db.man_loc_area_type.type_id', '库区类型')" style="flex: 3;margin-right: 30px;">
|
| | | <a-input v-model:value="searchLocAreaType" @change="handleLocAreaTypeDept" :placeholder="formatMessage('page.input', '请输入')"
|
| | | style="margin-bottom: 8px" />
|
| | | <a-tree v-model:expandedKeys="locAreaTypeExpandedKeys" @select="handleLocAreaTypeSelected" :tree-data="locAreaTypeData" blockNode>
|
| | | <template #title="{ name }">
|
| | | <span>{{ name }}</span>
|
| | | </template>
|
| | | </a-tree>
|
| | | </a-card>
|
| | | </a-col>
|
| | | <a-col :span="19">
|
| | | <a-card style="flex: 10;">
|
| | | <EditView ref="editChild" @tableReload="handleTableReload" />
|
| | | <div class="table-header">
|
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')"
|
| | | style="width: 200px;" @search="onSearch" />
|
| | | <div class="table-header-right">
|
| | | <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '添加') }}</a-button>
|
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button>
|
| | | </div>
|
| | | </div>
|
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
|
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id"
|
| | | :pagination="{ total: tableData.total, onChange: onPageChange }"
|
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" :loading="state.loading">
|
| | | <template #bodyCell="{ column, text, record }">
|
| | | <template v-if="column.dataIndex === 'oper'">
|
| | | <div style="display: flex;justify-content: space-evenly;">
|
| | | <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑')
|
| | | }}</a-button>
|
| | | <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除')
|
| | | }}</a-button>
|
| | | </div>
|
| | | </template>
|
| | | </template>
|
| | | </a-table>
|
| | | </a-card>
|
| | | </a-col>
|
| | | </a-row>
|
| | | </template>
|
| | |
|
| | | <style></style>
|