| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <ele-modal
- :title="title"
- :visible.sync="visible"
- :close-on-click-modal="false"
- @close="handleClose"
- resizable
- maxable
- width="60%"
- >
- <div>
- <ele-pro-table
- ref="table"
- row-key="id"
- :columns="columns"
- :datasource="list"
- >
- <template v-slot:expand="{ row }">
- <el-table :data="row.values" border style="width: 100%">
- <el-table-column type="index" width="50" label="序号">
- </el-table-column>
- <el-table-column prop="name" label="选项"> </el-table-column>
- </el-table>
- </template>
- </ele-pro-table>
- </div>
- <template v-slot:footer>
- <el-button type="primary" @click="handleClose">确 定</el-button>
- </template>
- </ele-modal>
- </template>
- <script>
- import dictMixins from '@/mixins/dictMixins';
- export default {
- mixins: [dictMixins],
- data() {
- return {
- visible: false,
- title: '详情',
- list: []
- };
- },
- computed: {
- columns() {
- return [
- {
- width: 50,
- type: 'expand',
- columnKey: 'expand',
- align: 'center',
- slot: 'expand'
- },
- {
- width: 50,
- type: 'index',
- columnKey: 'index',
- align: 'center',
- label: '序号'
- },
- {
- prop: 'columnComment',
- label: '条件名称',
- align: 'center',
- minWidth: 150,
- showOverflowTooltip: true
- }
- ];
- }
- },
- methods: {
- // 外部调用,打开弹窗
- open(list) {
- this.list = list;
- console.log('this.list', this.list);
- this.visible = true;
- },
- // 关闭时清理表单
- handleClose() {
- this.visible = false;
- },
- // 提交
- submit() {}
- }
- };
- </script>
- <style scoped lang="scss"></style>
|