双击终端会话 tab 复制.

This commit is contained in:
lijiahang
2024-03-08 19:36:13 +08:00
parent 54ae18987c
commit f4c5517f9f
11 changed files with 94 additions and 40 deletions

View File

@@ -35,6 +35,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
#end
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
@@ -154,6 +155,7 @@ public class ${table.serviceImplName} implements ${table.serviceName} {
// 转换
return list.stream()
.map(${type}Convert.MAPPER::to)
.sorted(Comparator.comparing(${type}VO::getId).reversed())
.collect(Collectors.toList());
}
@@ -276,7 +278,8 @@ public class ${table.serviceImplName} implements ${table.serviceName} {
#foreach($field in ${table.fields})
.eq(${type}DO::get${field.capitalName}, searchValue)#if($foreach.hasNext).or()#end
#end
);
)
.orderByDesc(${type}DO::getId);
}
}

View File

@@ -134,8 +134,6 @@
const emits = defineEmits(['openAdd', 'openUpdate']);
const list = ref<${vue.featureEntity}QueryResponse[]>([]);
const cardColLayout = useColLayout();
const pagination = usePagination();
const { loading, setLoading } = useLoading();
@@ -143,6 +141,7 @@
const { toOptions, getDictValue } = useDictStore();
#end
const list = ref<${vue.featureEntity}QueryResponse[]>([]);
const formRef = ref();
const formModel = reactive<${vue.featureEntity}QueryRequest>({
searchValue: undefined,

View File

@@ -70,6 +70,8 @@
import { useDictStore } from '@/store';
#end
const emits = defineEmits(['added', 'updated']);
const { visible, setVisible } = useVisible();
const { loading, setLoading } = useLoading();
#if($dictMap.entrySet().size() > 0)
@@ -78,6 +80,8 @@
const title = ref<string>();
const isAddHandle = ref<boolean>(true);
const formRef = ref<any>();
const formModel = ref<${vue.featureEntity}UpdateRequest>({});
const defaultForm = (): ${vue.featureEntity}UpdateRequest => {
return {
@@ -87,11 +91,6 @@
};
};
const formRef = ref<any>();
const formModel = ref<${vue.featureEntity}UpdateRequest>({});
const emits = defineEmits(['added', 'updated']);
// 打开新增
const openAdd = () => {
title.value = '添加${table.comment}';

View File

@@ -74,6 +74,8 @@
import { useDictStore } from '@/store';
#end
const emits = defineEmits(['added', 'updated']);
const { visible, setVisible } = useVisible();
const { loading, setLoading } = useLoading();
#if($dictMap.entrySet().size() > 0)
@@ -82,6 +84,8 @@
const title = ref<string>();
const isAddHandle = ref<boolean>(true);
const formRef = ref<any>();
const formModel = ref<${vue.featureEntity}UpdateRequest>({});
const defaultForm = (): ${vue.featureEntity}UpdateRequest => {
return {
@@ -91,11 +95,6 @@
};
};
const formRef = ref<any>();
const formModel = ref<${vue.featureEntity}UpdateRequest>({});
const emits = defineEmits(['added', 'updated']);
// 打开新增
const openAdd = () => {
title.value = '添加${table.comment}';

View File

@@ -157,11 +157,6 @@
const emits = defineEmits(['openAdd', 'openUpdate']);
#if($vue.enableRowSelection)
const selectedKeys = ref<number[]>([]);
#end
const tableRenderData = ref<${vue.featureEntity}QueryResponse[]>([]);
const pagination = usePagination();
#if($vue.enableRowSelection)
const rowSelection = useRowSelection();
@@ -171,6 +166,10 @@
const { toOptions, getDictValue } = useDictStore();
#end
#if($vue.enableRowSelection)
const selectedKeys = ref<number[]>([]);
#end
const tableRenderData = ref<${vue.featureEntity}QueryResponse[]>([]);
const formModel = reactive<${vue.featureEntity}QueryRequest>({
#foreach($field in ${table.fields})
${field.propertyName}: undefined,

View File

@@ -62,6 +62,13 @@
#else
import ${vue.featureEntity}FormModal from './components/${vue.feature}-form-modal.vue';
#end
#if($vue.enableCardView)
const appStore = useAppStore();
// FIXME 这里需要修改一下字段名称 并且在 appStore 定义该字段
const renderTable = computed(() => appStore.${vue.featureEntityFirstLower}View === 'table');
#end
const render = ref(false);
const table = ref();
@@ -73,12 +80,6 @@
#else
const modal = ref();
#end
#if($vue.enableCardView)
const appStore = useAppStore();
// FIXME 这里需要修改一下字段名称 并且在 appStore 定义该字段
const renderTable = computed(() => appStore.${vue.featureEntityFirstLower}View === 'table');
#end
// 添加回调
const modalAddCallback = () => {