⚡优化代码生成模板
This commit is contained in:
parent
3337b9abb3
commit
8867c7ba45
@ -44,7 +44,7 @@ $else
|
|||||||
[ExcelIgnore]
|
[ExcelIgnore]
|
||||||
$end
|
$end
|
||||||
$end
|
$end
|
||||||
$if(item.CsharpType == "long")
|
$if(item.CsharpType == "long" && replaceDto.useSnowflakeId == true && item.IsPk)
|
||||||
[JsonConverter(typeof(ValueToStringConverter))]
|
[JsonConverter(typeof(ValueToStringConverter))]
|
||||||
$end
|
$end
|
||||||
public $item.CsharpType$item.RequiredStr $item.CsharpField { get; set; }
|
public $item.CsharpType$item.RequiredStr $item.CsharpField { get; set; }
|
||||||
|
|||||||
@ -677,6 +677,37 @@ $if(sub)
|
|||||||
$end
|
$end
|
||||||
proxy.resetForm("formRef")
|
proxy.resetForm("formRef")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$if(replaceDto.ShowBtnView)
|
||||||
|
/**
|
||||||
|
* 查看
|
||||||
|
* @param {*} row
|
||||||
|
*/
|
||||||
|
function handlePreview(row) {
|
||||||
|
reset()
|
||||||
|
const id = row.${replaceDto.FistLowerPk}
|
||||||
|
get${genTable.BusinessName}(id).then((res) => {
|
||||||
|
const { code, data } = res
|
||||||
|
if (code == 200) {
|
||||||
|
open.value = true
|
||||||
|
title.value = '查看'
|
||||||
|
opertype.value = 3
|
||||||
|
form.value = {
|
||||||
|
...data,
|
||||||
|
$foreach(item in genTable.Columns)
|
||||||
|
$if(item.HtmlType == "checkbox" || item.HtmlType == "selectMulti")
|
||||||
|
${item.CsharpFieldFl}Checked: data.${item.CsharpFieldFl} ? data.${item.CsharpFieldFl}.split(',') : [],
|
||||||
|
$end
|
||||||
|
$end
|
||||||
|
}
|
||||||
|
$if(sub)
|
||||||
|
${tool.FirstLowerCase(genTable.SubTable.ClassName)}List.value = res.data.${tool.FirstLowerCase(genTable.SubTable.ClassName)}Nav
|
||||||
|
$end
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
$end
|
||||||
|
|
||||||
$if(replaceDto.ShowBtnAdd)
|
$if(replaceDto.ShowBtnAdd)
|
||||||
// 添加按钮操作
|
// 添加按钮操作
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
@ -784,20 +815,6 @@ function handleClear() {
|
|||||||
}
|
}
|
||||||
$end
|
$end
|
||||||
|
|
||||||
$if(replaceDto.ShowBtnView)
|
|
||||||
/**
|
|
||||||
* 查看
|
|
||||||
* @param {*} row
|
|
||||||
*/
|
|
||||||
function handlePreview(row) {
|
|
||||||
reset()
|
|
||||||
open.value = true
|
|
||||||
title.value = '查看'
|
|
||||||
opertype.value = 3
|
|
||||||
form.value = { ...row }
|
|
||||||
}
|
|
||||||
$end
|
|
||||||
|
|
||||||
$if(replaceDto.ShowBtnImport)
|
$if(replaceDto.ShowBtnImport)
|
||||||
// 导入数据成功处理
|
// 导入数据成功处理
|
||||||
const handleFileSuccess = (response) => {
|
const handleFileSuccess = (response) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user