|
|
@ -173,11 +173,13 @@
|
|
|
|
#set($dictType=$column.dictType)
|
|
|
|
#set($dictType=$column.dictType)
|
|
|
|
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
|
|
|
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
|
|
|
<el-form-item label="${comment}" prop="${treeParentCode}">
|
|
|
|
<el-form-item label="${comment}" prop="${treeParentCode}">
|
|
|
|
<tree-select
|
|
|
|
<el-tree-select
|
|
|
|
v-model:value="form.${treeParentCode}"
|
|
|
|
v-model="form.${treeParentCode}"
|
|
|
|
:options="${businessName}Options"
|
|
|
|
:data="${businessName}Options"
|
|
|
|
:objMap="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
|
|
|
|
:props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
|
|
|
|
|
|
|
|
value-key="${treeCode}"
|
|
|
|
placeholder="请选择${comment}"
|
|
|
|
placeholder="请选择${comment}"
|
|
|
|
|
|
|
|
check-strictly
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
#elseif($column.htmlType == "input")
|
|
|
|
#elseif($column.htmlType == "input")
|
|
|
@ -353,8 +355,8 @@ function getList() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询${functionName}下拉树结构 */
|
|
|
|
/** 查询${functionName}下拉树结构 */
|
|
|
|
async function getTreeselect() {
|
|
|
|
function getTreeselect() {
|
|
|
|
await list${BusinessName}().then(response => {
|
|
|
|
list${BusinessName}().then(response => {
|
|
|
|
${businessName}Options.value = [];
|
|
|
|
${businessName}Options.value = [];
|
|
|
|
const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] };
|
|
|
|
const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] };
|
|
|
|
data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
|
|
|
|
data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
|
|
|
@ -403,9 +405,9 @@ function resetQuery() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
async function handleAdd(row) {
|
|
|
|
function handleAdd(row) {
|
|
|
|
reset();
|
|
|
|
reset();
|
|
|
|
await getTreeselect();
|
|
|
|
getTreeselect();
|
|
|
|
if (row != null && row.${treeCode}) {
|
|
|
|
if (row != null && row.${treeCode}) {
|
|
|
|
form.value.${treeParentCode} = row.${treeCode};
|
|
|
|
form.value.${treeParentCode} = row.${treeCode};
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|