master
parent
99f9bc710f
commit
d49d6bfc9b
|
|
@ -0,0 +1,60 @@
|
||||||
|
<%
|
||||||
|
var ulc = isBlank(prefix) ? table.name : subAfter(table.name, prefix);
|
||||||
|
var lcc = toCamelCase(ulc);
|
||||||
|
var ucc = upperFirst(lcc);
|
||||||
|
var dc = toDashCase(lcc);
|
||||||
|
|
||||||
|
var pageVueName = ucc + ".vue";
|
||||||
|
var formVueName = ucc + "Form.vue";
|
||||||
|
var detailVueName = ucc + "Detail.vue";
|
||||||
|
var pageTsName = "page.ts";
|
||||||
|
var apiTsName = dc + "-api.ts";
|
||||||
|
var dTsName = dc + ".d.ts";
|
||||||
|
%>
|
||||||
|
<template>
|
||||||
|
<ElDialog v-model="showDialog"
|
||||||
|
destroy-on-close
|
||||||
|
width="fit-content"
|
||||||
|
@close="dialogCloseHandler">
|
||||||
|
<ElDescriptions title="${table.comment}" border>
|
||||||
|
<%
|
||||||
|
for(column in table.columns) {
|
||||||
|
var map = tsType(column.dataType);
|
||||||
|
%>
|
||||||
|
<ElDescriptionsItem label="${column.comment}" prop="${toCamelCase(column.name)}">
|
||||||
|
{{ detailData.${toCamelCase(column.name)} }}
|
||||||
|
</ElDescriptionsItem>
|
||||||
|
<%}%>
|
||||||
|
</ElDescriptions>
|
||||||
|
<template #footer>
|
||||||
|
<ElButton @click="showDialog = false" type="primary">关闭</ElButton>
|
||||||
|
</template>
|
||||||
|
</ElDialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import ${ucc}Api from '@/pages/${moduleName}<%if(subModuleName != null){%>/${subModuleName}<%}%>/${apiTsName}'
|
||||||
|
import Utils from '@/common/utils'
|
||||||
|
|
||||||
|
const showDialog = ref(false)
|
||||||
|
|
||||||
|
const detailData = Utils.resetAble(reactive<${ucc}Types.Search${ucc}Result>({}))
|
||||||
|
|
||||||
|
function dialogCloseHandler() {
|
||||||
|
detailData.$reset()
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open(data: ${ucc}Types.Search${ucc}Result) {
|
||||||
|
showDialog.value = true
|
||||||
|
${ucc}Api.detail(data.id!)
|
||||||
|
.then(res => {
|
||||||
|
detailData.$reset(res.data)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -42411,7 +42411,7 @@
|
||||||
"readonly": false,
|
"readonly": false,
|
||||||
"allowWs": false
|
"allowWs": false
|
||||||
},
|
},
|
||||||
"updateTime": 1766456606022,
|
"updateTime": 1766460940350,
|
||||||
"signature": "47b637eb5a56075835ec85decf8c0e31",
|
"signature": "47b637eb5a56075835ec85decf8c0e31",
|
||||||
"branchId": "1111"
|
"branchId": "1111"
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue