You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.2 KiB

<template>
<div class="container">
<!-- 查询配置 -->
<div>
<div ref="lxHeader">
<LxHeader icon="md-apps" text="自定义表单" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
<Button type="primary" style="margin-left: 10px" @click="$refs['xyTable'].getTableData()"></Button>
<Button type="primary" style="margin-left: 10px" @click="$refs['addForm'].type = 'add',$refs['addForm'].show()">新增</Button>
</div>
</slot>
</LxHeader>
</div>
</div>
<xy-table
ref="xyTable"
:auths="auths_auth_mixin"
:action="index"
:destroy-action="destroy"
:border="true"
:table-item="table"
@editor="row => {
$refs['addForm'].setType('editor');
$refs['addForm'].setId(row.id);
$refs['addForm'].show();
}">
<template #setting="scope">
<Button type="primary"
size="small"
@click="$refs['formFields'].setId(scope.row.id),$refs['formFields'].show()"></Button>
</template>
</xy-table>
<addForm ref="addForm" @refresh="$refs['xyTable'].getTableData()"></addForm>
<formFields ref="formFields"></formFields>
</div>
</template>
<script>
import { index,destroy } from '@/api/system/customForm'
import { authMixin } from "@/mixin/authMixin";
import LxHeader from "@/components/LxHeader/index.vue";
import addForm from "./components/addForm.vue";
import formFields from "./components/formFields.vue";
export default {
components:{
LxHeader,addForm,formFields
},
mixins: [authMixin],
data() {
return {
select:{
page:1,
page_size:10
},
list:[],
table:[
{
type: 'index',
label:'编号',
width:100
},
{
prop:'table_name',
label:'表名',
width:180,
sortable:'custom',
},
{
prop:'name',
label:'名称',
width:200,
sortable:'custom',
},
]
}
},
methods: {
index,destroy,
},
computed: {},
mounted() {
}
}
</script>
<style scoped lang="scss">
</style>