From 61ef4c71bcb083f6169b1247b4f636b2a6f39f6a Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期六, 14 一月 2023 00:57:31 +0800 Subject: [PATCH] remove 删除 主子表相关代码 --- ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm | 116 ---------------------------------------------------------- 1 files changed, 0 insertions(+), 116 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm index a93922e..9ddcbc3 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm @@ -265,70 +265,6 @@ #end #end #end -#if($table.sub) - <el-divider content-position="center">${subTable.functionName}淇℃伅</el-divider> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button type="primary" icon="Plus" @click="handleAdd${subClassName}">娣诲姞</el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="danger" icon="Delete" @click="handleDelete${subClassName}">鍒犻櫎</el-button> - </el-col> - </el-row> - <el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}"> - <el-table-column type="selection" width="50" align="center" /> - <el-table-column label="搴忓彿" align="center" prop="index" width="50"/> -#foreach($column in $subTable.columns) -#set($javaField=$column.javaField) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.pk || $javaField == ${subTableFkclassName}) -#elseif($column.list && $column.htmlType == "input") - <el-table-column label="$comment" prop="${javaField}" width="150"> - <template #default="scope"> - <el-input v-model="scope.row.$javaField" placeholder="璇疯緭鍏�$comment" /> - </template> - </el-table-column> -#elseif($column.list && $column.htmlType == "datetime") - <el-table-column label="$comment" prop="${javaField}" width="240"> - <template #default="scope"> - <el-date-picker clearable - v-model="scope.row.$javaField" - type="date" - value-format="YYYY-MM-DD" - placeholder="璇烽�夋嫨$comment"> - </el-date-picker> - </template> - </el-table-column> -#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType) - <el-table-column label="$comment" prop="${javaField}" width="150"> - <template #default="scope"> - <el-select v-model="scope.row.$javaField" placeholder="璇烽�夋嫨$comment"> - <el-option - v-for="dict in $column.dictType" - :key="dict.value" - :label="dict.label" - :value="dict.value" - ></el-option> - </el-select> - </template> - </el-table-column> -#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType) - <el-table-column label="$comment" prop="${javaField}" width="150"> - <template #default="scope"> - <el-select v-model="scope.row.$javaField" placeholder="璇烽�夋嫨$comment"> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </template> - </el-table-column> -#end -#end - </el-table> -#end </el-form> <template #footer> <div class="dialog-footer"> @@ -350,17 +286,11 @@ #end const ${businessName}List = ref([]); -#if($table.sub) -const ${subclassName}List = ref([]); -#end const open = ref(false); const buttonLoading = ref(false); const loading = ref(true); const showSearch = ref(true); const ids = ref([]); -#if($table.sub) -const checked${subClassName} = ref([]); -#end const single = ref(true); const multiple = ref(true); const total = ref(0); @@ -444,9 +374,6 @@ #end #end }; -#if($table.sub) - ${subclassName}List.value = []; -#end proxy.resetForm("${businessName}Ref"); } @@ -495,9 +422,6 @@ form.value.$column.javaField = form.value.${column.javaField}.split(","); #end #end -#if($table.sub) - ${subclassName}List.value = response.data.${subclassName}List; -#end open.value = true; title.value = "淇敼${functionName}"; }); @@ -512,9 +436,6 @@ #if($column.htmlType == "checkbox") form.value.$column.javaField = form.value.${column.javaField}.join(","); #end -#end -#if($table.sub) - form.value.${subclassName}List = ${subclassName}List.value; #end if (form.value.${pkColumn.javaField} != null) { update${BusinessName}(form.value).then(response => { @@ -553,43 +474,6 @@ }); } -#if($table.sub) -/** ${subTable.functionName}搴忓彿 */ -function row${subClassName}Index({ row, rowIndex }) { - row.index = rowIndex + 1; -} - -/** ${subTable.functionName}娣诲姞鎸夐挳鎿嶄綔 */ -function handleAdd${subClassName}() { - let obj = {}; -#foreach($column in $subTable.columns) -#if($column.pk || $column.javaField == ${subTableFkclassName}) -#elseif($column.list && "" != $javaField) - obj.$column.javaField = ""; -#end -#end - ${subclassName}List.value.push(obj); -} - -/** ${subTable.functionName}鍒犻櫎鎸夐挳鎿嶄綔 */ -function handleDelete${subClassName}() { - if (checked${subClassName}.value.length == 0) { - proxy.#[[$modal]]#.msgError("璇峰厛閫夋嫨瑕佸垹闄ょ殑${subTable.functionName}鏁版嵁"); - } else { - const ${subclassName}s = ${subclassName}List.value; - const checked${subClassName}s = checked${subClassName}.value; - ${subclassName}List.value = ${subclassName}s.filter(function(item) { - return checked${subClassName}s.indexOf(item.index) == -1 - }); - } -} - -/** 澶嶉�夋閫変腑鏁版嵁 */ -function handle${subClassName}SelectionChange(selection) { - checked${subClassName}.value = selection.map(item => item.index) -} - -#end /** 瀵煎嚭鎸夐挳鎿嶄綔 */ function handleExport() { proxy.download('${moduleName}/${businessName}/export', { -- Gitblit v1.9.3