| | |
| | | <template> |
| | | <p>属性池</p> |
| | | <el-container> |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="userCrud" |
| | | :data="tableData" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="tableLoading" |
| | | @on-load="getTableList" |
| | | @refresh-change="handleRefresh" |
| | | @search-change="handleSearch" |
| | | @search-reset="handleReset" |
| | | @selection-change="selectChange" |
| | | @row-click="rowClickHandler" |
| | | @size-change="sizeChange" |
| | | @current-change="currentChange" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="rowSaveHandlerClick">创建</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">删除</el-button> |
| | | <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">查看使用范围</el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">编辑 |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | <el-aside width="30%"> |
| | | <basic-container> |
| | | <div style="height: 85vh; overflow-y: auto"> |
| | | <el-descriptions :column="1" border size="medium" title="属性项"> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 名称 |
| | | </template> |
| | | 名称 |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 标签 |
| | | </template> |
| | | 标签 |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 描述 |
| | | </template> |
| | | 描述 |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 操作类型 |
| | | </template> |
| | | 操作类型 |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <el-descriptions :column="1" border class="margin-top" size="medium" title="VTString"> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 允许为空 |
| | | </template> |
| | | <el-tag type="success">是</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 精度 |
| | | </template> |
| | | 精度 |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 长度 |
| | | </template> |
| | | 长度 |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 默认值 |
| | | </template> |
| | | 默认值 |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <el-descriptions :column="1" border class="margin-top" size="medium" title="值域"> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 当前类型 |
| | | </template> |
| | | 业务类型 |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 当前类型值 |
| | | </template> |
| | | |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 当前版本次 |
| | | </template> |
| | | |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 使用枚举 |
| | | </template> |
| | | <el-tag type="success">是</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 枚举类型 |
| | | </template> |
| | | 枚举类型 |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 枚举值 |
| | | </template> |
| | | |
| | | </el-descriptions-item> |
| | | |
| | | </el-descriptions> |
| | | |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {gridAttribute} from "@/api/modeling/attributePool/api"; |
| | | import basicOption from '@/util/basic-option'; |
| | | import {column} from "./option" |
| | | |
| | | export default { |
| | | name: "index" |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | option: { |
| | | ...basicOption, |
| | | searchMenuSpan: 8, |
| | | calcHeight: -60, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | column |
| | | }, |
| | | tableLoading: false, |
| | | page: { |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | pageSizes: [10, 30, 50, 100], |
| | | }, |
| | | searchParams: {}, |
| | | selectList: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | //表格查询请求 |
| | | getTableList() { |
| | | this.tableLoading = true; |
| | | gridAttribute(this.page.currentPage, this.page.pageSize, this.searchParams).then(res => { |
| | | const data = res.data.data; |
| | | this.tableData = data; |
| | | this.page.total = res.data.total; |
| | | this.tableLoading = false; |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | }); |
| | | }, |
| | | |
| | | // 表格头部刷新 |
| | | handleRefresh() { |
| | | this.getTableList(); |
| | | }, |
| | | |
| | | // 搜索 |
| | | handleSearch() { |
| | | |
| | | }, |
| | | |
| | | // 重置搜索条件 |
| | | handleReset() { |
| | | |
| | | }, |
| | | |
| | | // 选择框 |
| | | selectChange(row) { |
| | | this.selectList = row; |
| | | }, |
| | | |
| | | // 点击行 |
| | | rowClickHandler(row) { |
| | | this.$refs.userCrud.toggleRowSelection(row); |
| | | }, |
| | | |
| | | // 条数 |
| | | sizeChange(val) { |
| | | this.page.pageSize = val; |
| | | }, |
| | | |
| | | // 页码 |
| | | currentChange(val) { |
| | | this.page.currentPage = val; |
| | | }, |
| | | |
| | | rowSaveHandlerClick() { |
| | | }, |
| | | |
| | | allDelHandler() { |
| | | |
| | | }, |
| | | |
| | | chekView() { |
| | | |
| | | }, |
| | | |
| | | editBtnClick() { |
| | | |
| | | }, |
| | | |
| | | rowDeleteHandler() { |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | <style lang="scss" scoped> |
| | | .margin-top{ |
| | | margin-top: 25px; |
| | | } |
| | | </style> |