枚举类型点击行展示枚举信息和枚举项&&构建属性池页面
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // å表æ¥è¯¢ |
| | | export function gridAttribute(page,limit,params) { |
| | | return request({ |
| | | url: "/api/attributeController/gridAttribute", |
| | | method: "get", |
| | | params:{ |
| | | page, |
| | | limit, |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const column = [ |
| | | { |
| | | label: '屿§å', |
| | | prop: 'id', |
| | | search:true, |
| | | sortable:true, |
| | | }, |
| | | { |
| | | label: 'ç±»å', |
| | | prop: 'attributeDataTypeText', |
| | | sortable:true, |
| | | }, |
| | | { |
| | | label: 'é»è®¤å¼', |
| | | prop: 'defaultValue', |
| | | sortable:true, |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'description', |
| | | }, |
| | | ]; |
| | |
| | | <template> |
| | | <el-container> |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="userCrud" |
| | |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥" |
| | | @updata="getTableList"></upload-file> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | <el-aside width="30%"> |
| | | <basic-container> |
| | | <el-descriptions :column="1" border size="medium" style="margin-bottom: 20px" title="æä¸¾ä¿¡æ¯"> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | åç§° |
| | | </template> |
| | | {{ this.lastItem.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | æ ç¾ |
| | | </template> |
| | | {{ this.lastItem.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | ç±»å |
| | | </template> |
| | | {{ this.lastItem.enumValueDataType || 'String' }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | é¿åº¦ |
| | | </template> |
| | | <el-tag> {{ this.lastItem.length || 50 }}</el-tag> |
| | | </el-descriptions-item> |
| | | |
| | | </el-descriptions> |
| | | |
| | | <p style="font-weight: bold">æä¸¾é¡¹</p> |
| | | <avue-crud |
| | | :data="asideData" |
| | | :option="asideOption" |
| | | > |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-aside> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | asideOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | menu: false, |
| | | refreshBtn: false, |
| | | selection: false, |
| | | index: false, |
| | | column: [ |
| | | { |
| | | label: 'æä¸¾é¡¹åç§°', |
| | | prop: 'name', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æä¸¾å¼', |
| | | prop: 'value', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'description', |
| | | }, |
| | | ] |
| | | }, |
| | | tipList: [ |
| | | "导å
¥æ¨¡æ¿ä¸æ æçº¢è²åä½ç为å¿
è¾é¡¹", |
| | | "*注æ*:第äºè¡å¼å§çæ°æ®ä¸ºç¤ºä¾æ°æ®ï¼å¯¼å
¥å请å°å
¶å é¤ï¼å½å¯¼å
¥çæä¸¾ä¸å
·å¤å¤ä¸ªæä¸¾é¡¹æ¶ï¼åºæç
§ç¤ºä¾enum2çåæ³", |
| | |
| | | searchParams: {} |
| | | } |
| | | }, |
| | | computed: { |
| | | lastItem() { |
| | | return this.selectList.length > 0 ? this.selectList[this.selectList.length - 1] : {}; |
| | | }, |
| | | asideData() { |
| | | return this.selectList.length > 0 ? this.selectList[this.selectList.length - 1].items : []; |
| | | } |
| | | }, |
| | | methods: { |
| | | //è¡¨æ ¼æ¥è¯¢è¯·æ± |
| | | getTableList() { |
| | |
| | | |
| | | // éæ©æ¡ |
| | | selectChange(row) { |
| | | console.log(row) |
| | | this.selectList = row; |
| | | }, |
| | | |
| | |
| | | } |
| | | done(); |
| | | }, |
| | | |
| | | // è¡¨æ ¼è¯·æ± |
| | | getTableList() { |
| | | this.tableLoading = true; |