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.
66 lines
2.7 KiB
66 lines
2.7 KiB
<template>
|
|
<IvzBasicView #if(${cfg.moduleName})name="$!{cfg.moduleName}"#end #if(${cfg.rowKey})rowKey="$!{cfg.rowKey}"#end auth>
|
|
<IvzViewSearch>
|
|
#foreach($vue in ${cfg.searchFields})
|
|
#if(${vue.component})
|
|
${vue.component}
|
|
#end
|
|
#end
|
|
<template #func>
|
|
<IvzFuncBtn func="query" url="/${package.ModuleName}/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end/view">搜索</IvzFuncBtn>
|
|
<IvzFuncBtn func="add" url="/${package.ModuleName}/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end/add">新增</IvzFuncBtn>
|
|
<IvzFuncBtn func="reset">重置</IvzFuncBtn>
|
|
</template>
|
|
</IvzViewSearch>
|
|
<IvzViewModal width="860" layout="vertical" :rules="rules">
|
|
<template #default="{model}">
|
|
<IvzRow :gutter="16" span="24">
|
|
#foreach($vue in ${cfg.formFields})
|
|
#if(${vue.component})
|
|
${vue.component}
|
|
#end
|
|
#end
|
|
</IvzRow>
|
|
</template>
|
|
<template #title="{model}">
|
|
{{model.id ? '修改${cfg.moduleName}' : '新增${cfg.moduleName}'}}
|
|
</template>
|
|
<template #footer="{model}">
|
|
<IvzFuncBtn func="cancel">取消</IvzFuncBtn>
|
|
<IvzFuncBtn func="submit" :url="model.id ? '/${package.ModuleName}/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end/edit' : '/${package.ModuleName}/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end/add'">提交</IvzFuncBtn>
|
|
<IvzFuncBtn func="reset">重置</IvzFuncBtn>
|
|
</template>
|
|
</IvzViewModal>
|
|
<IvzViewTable :columns="columns" :bordered="true" size="small">
|
|
<template #c_action="{record}">
|
|
<IvzFuncTag func="edit" :data="record" url="/${package.ModuleName}/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end/edit">修改</IvzFuncTag>
|
|
<IvzFuncTag func="del" :data="record" url="/${package.ModuleName}/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end/del">删除</IvzFuncTag>
|
|
</template>
|
|
</IvzViewTable>
|
|
</IvzBasicView>
|
|
</template>
|
|
<!-- ${cfg.moduleName}功能 -->
|
|
<script>
|
|
import {ref, reactive} from "vue";
|
|
export default {
|
|
name: "$entity",
|
|
setup() {
|
|
let columns = ref([
|
|
#foreach($field in ${cfg.tableFields})
|
|
${field.component}
|
|
#end
|
|
]);
|
|
|
|
let rules = reactive({
|
|
#foreach($field in ${cfg.vueFields})
|
|
#if(${field.required})
|
|
${field.field}: {required: true, message: '${field.label}必填'},
|
|
#end
|
|
#end
|
|
})
|
|
|
|
return {columns, rules}
|
|
},
|
|
}
|
|
</script>
|
|
<style scoped> </style>
|