| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <template>
- <ele-modal
- width="80%"
- :visible.sync="visible"
- :close-on-click-modal="false"
- custom-class="ele-dialog-form"
- append-to-body
- :maxable="true"
- :resizable="true"
- >
- <div class="ele-body" style="height:60vh;overflow: auto;">
- <el-card shadow="never" v-loading="loading">
- <ele-split-layout
- width="210px"
- allow-collapse
- :right-style="{ overflow: 'hidden' }"
- >
- <div class="ele-border-lighter sys-organization-list">
- <el-tree
- ref="tree"
- :data="data"
- highlight-current
- :draggable="true"
- node-key="id"
- :expand-on-click-node="false"
- :default-expand-all="true"
- @node-click="onNodeClick"
- >
- </el-tree>
- </div>
- <template v-slot:content>
- <ele-pro-table
- ref="table"
- :columns="columns"
- :datasource="datasource"
- tool-class="ele-toolbar-form"
- :needPage="false"
- row-key="id"
- :selection.sync="selection"
- :toolbar="false"
- >
- </ele-pro-table>
- </template>
- </ele-split-layout>
- </el-card>
- </div>
- <template v-slot:footer>
- <el-button @click="fileShow = false">取消</el-button>
- <el-button type="primary" @click="addTemplate"> 确认 </el-button>
- </template>
- </ele-modal>
- </template>
- <script>
- export default {
- data() {
- return {
- loading: false,
- visible: false,
- datasource:[],
- columns:[
- {
- width: 45,
- type: 'selection',
- columnKey: 'selection',
- align: 'center'
- },
- {
- columnKey: 'index',
- type: 'index',
- width: 50,
- align: 'center',
- label: '序号',
- showOverflowTooltip: true,
- fixed: 'left'
- },
- {
- prop: 'categoryCode',
- label: '物品编码',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- slot: 'categoryName',
- prop: 'categoryName',
- label: '物品名称',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 200
- },
- {
- prop: 'brandNum',
- label: '牌号',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'categoryModel',
- label: '型号',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'specification',
- label: '规格',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'measureQuantity',
- label: '计量数量',
- sortable: 'custom',
- showOverflowTooltip: true,
- width: 130,
- align: 'center'
- },
- {
- prop: 'measureUnit',
- label: '计量单位',
- align: 'center'
- },
- {
- prop: 'weight',
- label: '重量',
- showOverflowTooltip: true
- },
- {
- prop: 'weightUnit',
- label: '重量单位',
- showOverflowTooltip: true
- },
- ],
- data: [],
- }
- },
- methods: {
- open(val, type, sList) {
- debugger;
- this.visible = true;
- this.type = type;
- this.sList = sList;
- },
- onNodeClick() {
- }
- },
- }
- </script>
|