index.vue
2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<template>
<a-card title :bordered="false">
<section class="flex-table">
<a-skeleton :loading="loading" avatar active title="搜索">
<a-form-model ref="searchForm" :model="searchForm" :rules="searchRule" layout="inline">
<a-row :gutter="24">
<a-col :span="6">
<a-form-model-item label="商品名称" prop="productName">
<a-input placeholder="请输入" allow-clear v-model.trim="searchForm.productName" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="商品编码" prop="productCode">
<a-input placeholder="请输入" allow-clear v-model.trim="searchForm.productCode" />
</a-form-model-item>
</a-col>
<a-col :span="12" class="right">
<a-form-model-item label class="submit">
<a-button type="primary" @click="searchHandle('searchForm')">查询</a-button>
<a-button class="buttonLeft5" @click="specialResetQuery('searchForm')">重置</a-button>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</a-skeleton>
</section>
<section ref="table">
<a-table rowKey="id" :columns="columns" :data-source="tableData" :pagination="pagination" @change="pageChangeHandle" :scroll="scroll" :loading="loading">
<span slot="productName" slot-scope="text, record" :title="record.productName">
<a @click="jumpDetail(record)">{{record.productName}}</a>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleLook(record)">查看</a>
</span>
</a-table>
</section>
</a-card>
</template>
<script>
import tableMixin from '@/components/mixins/tableMixin'
import columns from './column'
export default {
name: 'CarouseManage',
mixins: [tableMixin],
data() {
return {
searchForm: {},
searchRule: {},
selectedRowKeys: [],
selectIds: [],
columns,
tableUrl: ''
}
},
methods: {
// 表格界面初始化渲染
init() {
this.tableListHandle();
},
handleLook(record) {
console.log(record)
}
}
}
</script>