123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template>
- <div>
- <add-sale-class class="normal-margin" @addSuccess="getClassList" v-if="tool.checkAuth($route.name,'add_saleClass')"/>
- <tableLayout v-if="saleClassList" :layout="tablecols" :data="saleClassList" :custom="false" height="calc(100vh - 495px)" fixedName="operation">
- <template v-slot:opreation="scope">
- <Del v-if="tool.checkAuth($route.name,'delete')" :id="scope.data.sys_enterprise_saleclassid" @onSuccess="getClassList"/>
- </template>
- </tableLayout>
- </div>
- </template>
- <script>
- import addSaleClass from './modules/addSaleClass'
- import Del from './modules/del'
- export default {
- name: '',
- data() {
- return {
- saleClassList:'',
- tablecols:[]
- };
- },
- components:{addSaleClass,Del},
- computed:{
- },
- watch:{
- },
- created() {
- this.getClassList()
- this.tablecols = this.tool.tabelCol(this.$route.name)['saleClassTable'].tablecols
- },
- methods: {
- /* 获取类别数据 */
- async getClassList() {
- let res = await this.$api.requested({
- "id": 20220924134502,
- "content": {
- "pageNumber": 1,
- "pageSize": 20,
- "where": {
- "condition": ""
- }
- },
- })
- console.log(res);
- this.saleClassList = res.data
- }
- },
- };
- </script>
- <style scoped>
- </style>
|