Commit fe810ba3 authored by baiyinhao's avatar baiyinhao

修改sql开发页面

parent d4558328
......@@ -241,6 +241,14 @@
<style scoped>
.top-button {
display: flex;
align-items: center;
justify-content: center;
min-width: 100px; /* 设置按钮的最小宽度 */
min-height: 30px; /* 设置按钮的最小高度 */
padding: 0 5px;
overflow: hidden;
text-overflow: ellipsis; /* 截断过长的文本 */
white-space: nowrap;
}
</style>
......@@ -30,8 +30,8 @@
>导出</a-button
>
<a-button class="top-button" type="primary">导入</a-button>
<a-button class="top-button" type="primary">新建文件夹</a-button
><a-button class="top-button" type="primary" @click="handleAtomLabel"
<a-button class="top-button" type="primary">新建文件夹</a-button>
<a-button class="top-button" type="primary" @click="handleAtomLabel"
>批量创建原子指标</a-button
>
<a-button class="top-button" type="primary" @click="handleAddLabel"
......@@ -168,6 +168,7 @@
}
}
const tabTableRef = ref(null);
const tableInstance = tabTableRef.value;
function topButtonDisabled() {
if (tabTableRef.value) {
return tabGetRowSelection().selectedRowKeys <= 0;
......@@ -246,6 +247,7 @@
dataIndex: 'action',
fixed: undefined,
},
tableRef: tabTableRef,
} as BasicTableProps);
onMounted(() => {
nextTick(() => {
......@@ -273,6 +275,14 @@
<style scoped>
.top-button {
display: flex;
align-items: center;
justify-content: center;
min-width: 100px; /* 设置按钮的最小宽度 */
min-height: 30px; /* 设置按钮的最小高度 */
padding: 0 5px;
overflow: hidden;
text-overflow: ellipsis; /* 截断过长的文本 */
white-space: nowrap;
}
</style>
......@@ -16,8 +16,8 @@
<TableAction
:actions="[
{
icon: 'clarity:search-line',
tooltip: '查看详情',
icon: 'clarity:note-edit-line',
tooltip: '审批',
onClick: handleViewtab2.bind(null, record),
},
// {
......@@ -56,11 +56,11 @@
tooltip: '查看详情',
onClick: handleViewtab1.bind(null, record),
},
{
icon: 'clarity:note-edit-line',
tooltip: '审批',
onClick: handleEdit.bind(null, record),
},
// {
// icon: 'clarity:note-edit-line',
// tooltip: '审批',
// onClick: handleEdit.bind(null, record),
// },
]"
/>
</template>
......
......@@ -104,7 +104,7 @@
return treeData !== '' ? treeData : data;
}
const getTitle = computed(() => (!unref(isUpdate) ? '新建shell文件' : '编辑shell文件'));
const getTitle = computed(() => (!unref(isUpdate) ? '新建文件' : '编辑文件'));
async function handleSubmit() {
try {
......
......@@ -31,7 +31,7 @@
import { formSchemaNewFolder } from './template.data';
import TreeTwo from './treeTwo.vue';
import { useMessage } from '@/hooks/web/useMessage';
import { treeDataList } from './mock';
import { TreeDataList } from './mock';
defineOptions({ name: 'AccountModal' });
......@@ -63,12 +63,46 @@
});
}
updateSchema({
field: 'path',
componentProps: { treeData: treeDataList },
});
const treeDataList = handleTree(TreeDataList, 'businessId', undefined, undefined, undefined);
updateSchema([
{
field: 'path',
componentProps: {
treeData: treeDataList,
},
},
]);
});
/**数组对象转成树*/
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id';
parentId = parentId || 'parentId';
children = children || 'children';
rootId =
rootId ||
Math.min.apply(
Math,
data.map((item) => {
return item[parentId];
}),
) ||
0;
// 对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data));
// 循环所有项
const treeData = cloneData.filter((father) => {
const branchArr = cloneData.filter((child) => {
// 返回每一项的子级数组
return father[id] === child[parentId];
});
branchArr.length > 0 ? (father.children = branchArr) : '';
// 返回第一层
return father[parentId] === rootId;
});
return treeData !== '' ? treeData : data;
}
const getTitle = computed(() => (!unref(isUpdate) ? '新建文件夹' : '编辑文件夹'));
async function handleSubmit() {
......
......@@ -75,23 +75,203 @@ export const tableList: any[] = [
},
];
export const treeDataList = [
export const TreeDataList = [
// {
// label: '主体管理',
// businessId: 1,
// children: [
// {
// label: 'admin_个人工作区',
// businessId: 2,
// children: [
// { label: '个人工作区1', businessId: 6 },
// { label: '个人工作区2', businessId: 7 },
// ],
// },
// { label: '共享工作区', businessId: 3 },
// { label: '商城工作区', businessId: 4 },
// { label: '指标工作区', businessId: 5 },
// ],
// },
{
label: '主体管理',
businessId: 1,
children: [
{
label: 'admin_个人工作区',
businessId: 2,
children: [
{ label: '个人工作区1', businessId: 6 },
{ label: '个人工作区2', businessId: 7 },
],
},
{ label: '共享工作区', businessId: 3 },
{ label: '商城工作区', businessId: 4 },
{ label: '指标工作区', businessId: 5 },
],
delFlag: '0',
flag: '1',
businessId: 100,
workSpaceName: 'SHELL文件',
parentId: 0,
code: '001',
ancestors: '0',
orderNum: 0,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'SHELL文件',
anotherName: 'SHELL文件',
location: '/SHELL文件',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 101,
workSpaceName: 'admin-个人工作区',
parentId: 100,
code: '002',
ancestors: '0,100',
orderNum: 1,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'admin-个人工作区',
anotherName: 'admin-个人工作区',
location: '/SHELL文件/admin-个人工作区',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 102,
workSpaceName: '共享工作区',
parentId: 100,
code: '003',
ancestors: '0,100',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '共享工作区',
anotherName: '共享工作区',
location: '/SHELL文件/共享工作区',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '0',
businessId: 103,
workSpaceName: '高级工作区',
parentId: 100,
code: '010',
ancestors: '0,100,107',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '高级工作区',
anotherName: '高级工作区',
location: '/SHELL文件/高级工作区',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 201,
workSpaceName: '文件夹1',
parentId: 101,
code: '002',
ancestors: '0,100',
orderNum: 1,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '文件夹1',
anotherName: '文件夹1',
location: '/SHELL文件/admin-个人工作区/文件夹1',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 202,
workSpaceName: '文件夹2',
parentId: 102,
code: '003',
ancestors: '0,100',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '文件夹2',
anotherName: '文件夹2',
location: '/SHELL文件/共享工作区/文件夹2',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '0',
businessId: 203,
workSpaceName: '文件夹3',
parentId: 103,
code: '010',
ancestors: '0,100,107',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '文件夹3',
anotherName: '文件夹3',
location: '/SHELL文件/高级工作区/文件夹3',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 301,
workSpaceName: 'SQL1',
parentId: 201,
code: '002',
ancestors: '0,100',
orderNum: 1,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'SQL1',
anotherName: 'SQL1',
location: '/SHELL文件/admin-个人工作区/文件夹1/SQL1',
icon: 'ant-design:partition-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 302,
workSpaceName: 'SQL1',
parentId: 202,
code: '003',
ancestors: '0,100',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'SQL1',
anotherName: 'SQL1',
location: '/SHELL文件/共享工作区/文件夹2/SQL1',
icon: 'ant-design:partition-outlined',
},
{
delFlag: '0',
flag: '0',
businessId: 303,
workSpaceName: 'SQL1',
parentId: 203,
code: '010',
ancestors: '0,100,107',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'SQL1',
anotherName: 'SQL1',
location: '/SHELL文件/高级工作区/文件夹3/SQL1',
icon: 'ant-design:partition-outlined',
},
];
export const treeDataListTwo = [
......
......@@ -85,13 +85,12 @@ export const formSchemaNewFolder: any = [
],
componentProps: {
fieldNames: {
label: 'label',
label: 'QualityName',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
},
{
field: 'name',
label: '文件夹名称',
......
......@@ -189,55 +189,183 @@ export const treeDataListTwo = [
export const TreeData: any[] = [
{
delFlag: '0',
flag: '1',
businessId: 100,
QualityName: '质量模版',
anotherName: '质量模版',
workSpaceName: 'SHELL文件',
parentId: 0,
location: '/质量模版',
code: '001',
ancestors: '0',
orderNum: 0,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'SHELL文件',
anotherName: 'SHELL文件',
location: '/SHELL文件',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 101,
QualityName: 'CEA_POC_模版',
anotherName: 'CEA_POC_模版',
workSpaceName: 'admin-个人工作区',
parentId: 100,
code: '002',
ancestors: '0,100',
orderNum: 1,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'admin-个人工作区',
anotherName: 'admin-个人工作区',
location: '/SHELL文件/admin-个人工作区',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 102,
QualityName: '数据中台工作区01',
anotherName: '数据中台工作区01',
workSpaceName: '共享工作区',
parentId: 100,
code: '003',
ancestors: '0,100',
location: '/质量模版/数据中台工作区01',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '共享工作区',
anotherName: '共享工作区',
location: '/SHELL文件/共享工作区',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '0',
businessId: 103,
workSpaceName: '高级工作区',
parentId: 100,
code: '010',
ancestors: '0,100,107',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '高级工作区',
anotherName: '高级工作区',
location: '/SHELL文件/高级工作区',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 201,
QualityName: '值域检查(倍数)',
anotherName: '值域检查(倍数)',
parentId: 102,
ancestors: '0,100,102',
location: '/质量模版/数据中台工作区01/值域检查(倍数)',
icon: 'ant-design:partition-outlined',
workSpaceName: '文件夹1',
parentId: 101,
code: '002',
ancestors: '0,100',
orderNum: 1,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '文件夹1',
anotherName: '文件夹1',
location: '/SHELL文件/admin-个人工作区/文件夹1',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 202,
QualityName: '值域检查(数值大于零)',
anotherName: '值域检查(数值大于零)',
workSpaceName: '文件夹2',
parentId: 102,
ancestors: '0,100,102',
location: '/质量模版/数据中台工作区01/值域检查(数值大于零)',
code: '003',
ancestors: '0,100',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '文件夹2',
anotherName: '文件夹2',
location: '/SHELL文件/共享工作区/文件夹2',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '0',
businessId: 203,
workSpaceName: '文件夹3',
parentId: 103,
code: '010',
ancestors: '0,100,107',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: '文件夹3',
anotherName: '文件夹3',
location: '/SHELL文件/高级工作区/文件夹3',
icon: 'ant-design:folder-open-outlined',
},
{
delFlag: '0',
flag: '1',
businessId: 301,
workSpaceName: 'SQL1',
parentId: 201,
code: '002',
ancestors: '0,100',
orderNum: 1,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'SQL1',
anotherName: 'SQL1',
location: '/SHELL文件/admin-个人工作区/文件夹1/SQL1',
icon: 'ant-design:partition-outlined',
},
{
businessId: 204,
QualityName: '准取检查-数值大于等于n',
anotherName: '准取检查-数值大于等于n',
parentId: 101,
ancestors: '0,100,101',
location: '/质量模版/CEA_POC_模版/准取检查-数值大于等于n',
delFlag: '0',
flag: '1',
businessId: 302,
workSpaceName: 'SQL1',
parentId: 202,
code: '003',
ancestors: '0,100',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'SQL1',
anotherName: 'SQL1',
location: '/SHELL文件/共享工作区/文件夹2/SQL1',
icon: 'ant-design:partition-outlined',
},
{
delFlag: '0',
flag: '0',
businessId: 303,
workSpaceName: 'SQL1',
parentId: 203,
code: '010',
ancestors: '0,100,107',
orderNum: 2,
selectType: null,
createTime: '2024-10-24 10:04:04',
updateTime: '2024-10-24 10:04:04',
createBy: 'admin',
QualityName: 'SQL1',
anotherName: 'SQL1',
location: '/SHELL文件/高级工作区/文件夹3/SQL1',
icon: 'ant-design:partition-outlined',
},
];
......@@ -13,9 +13,6 @@
<a-button>下载模板</a-button>
<a-button type="primary" style="margin-left: 5px">选择文件</a-button>
</div>
<div style="width: 200px; margin-top: 6px; margin-left: 5px"
>数据质量只能导入单个zip文件</div
>
</div>
</template>
</BasicForm>
......@@ -26,8 +23,6 @@
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { importFormSchema } from './tempalte.data';
import { TreeData } from './mock';
import { onMountedOrActivated } from '@vben/hooks';
const emit = defineEmits(['success', 'register']);
const isUpdate = ref(true);
......@@ -50,16 +45,6 @@
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
isMove.value = !!data?.isMove;
const treeList = handleTree(TreeData, 'businessId', undefined, undefined, undefined);
updateSchema([
{
field: 'taskId',
componentProps: {
treeData: treeList,
},
},
]);
console.log('treeList:', treeList);
if (unref(isUpdate)) {
// 获取行数据的id
rowId.value = data.record.businessId;
......@@ -70,6 +55,8 @@
}
});
// onMounted(){}
// const getTitle = computed(() => '新建文件');
const getTitle = '导入文件选择';
......@@ -77,32 +64,4 @@
async function handleSubmit() {
closeModal();
}
/**数组对象转成树*/
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id';
parentId = parentId || 'parentId';
children = children || 'children';
rootId =
rootId ||
Math.min.apply(
Math,
data.map((item) => {
return item[parentId];
}),
) ||
0;
// 对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data));
// 循环所有项
const treeData = cloneData.filter((father) => {
const branchArr = cloneData.filter((child) => {
// 返回每一项的子级数组
return father[id] === child[parentId];
});
branchArr.length > 0 ? (father.children = branchArr) : '';
// 返回第一层
return father[parentId] === rootId;
});
return treeData !== '' ? treeData : data;
}
</script>
import { getAllRoleList } from '@/api/system/role/role';
import { BasicColumn, FormSchema } from '@/components/Table';
export const columns: BasicColumn[] = [
{
title: '名称',
dataIndex: 'name',
width: 120,
slots: { customRender: 'name' },
},
{
title: '数据源',
dataIndex: 'dataSource',
slots: { customRender: 'dataSource' },
width: 150,
},
{
title: '模板编号',
dataIndex: 'templateNumber',
width: 120,
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 150,
},
{
title: '更新时间',
dataIndex: 'updateTime',
width: 150,
},
{
title: '拥有者',
dataIndex: 'owner',
width: 100,
},
{
title: '权属工作组',
dataIndex: 'workgroup',
width: 120,
},
];
export const searchFormSchema: FormSchema[] = [
{
field: 'name',
label: ' ',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '输入关键字搜索',
},
},
];
/**移动*/
export const MoveFormSchema: any[] = [
{
field: 'taskId',
label: '路径',
component: 'TreeSelect',
colProps: { lg: 24, md: 24 },
componentProps: {
// border: 'none',
fieldNames: {
label: 'QualityName',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
required: true,
},
];
export const formSchemaNewFolder: any = [
{
field: 'path',
label: '路径',
component: 'TreeSelect',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
componentProps: {
fieldNames: {
label: 'QualityName',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
},
{
field: 'name',
label: '文件夹名称',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '输入文件夹名称',
},
},
{
field: 'fileType',
label: '权限模式',
component: 'RadioGroup',
defaultValue: '本级定义',
colProps: { span: 8 },
componentProps: {
options: [
{ label: '本级定义', value: '本级定义' },
{ label: '资源自定义', value: '资源自定义' },
],
placeholder: '输入描述',
},
},
{
field: 'group',
label: '权属工作组',
component: 'Select',
defaultValue: '默认工作组',
colProps: { span: 8 },
componentProps: {
placeholder: '输入描述',
options: [{ label: '默认工作组', value: '默认工作组' }],
},
},
];
export const formSchemaTemplate: any = [
{
field: 'path',
label: '路径',
component: 'TreeSelect',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
componentProps: {
fieldNames: {
label: 'QualityName',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
},
{
field: 'name',
label: '文件名称',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '输入文件夹名称',
},
required: true,
},
{
field: 'fileType',
label: '文件类型',
component: 'Input',
defaultValue: '质量模板',
colProps: { span: 8 },
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
},
},
{
field: 'dataSource',
label: '支持数据源',
component: 'Select',
colProps: { span: 8 },
componentProps: {
mode: 'multiple',
options: [
{ label: 'INCEPTOR', value: 'INCEPTOR' },
{ label: 'IMPALA', value: 'IMPALA' },
{ label: 'MYSQL', value: 'MYSQL' },
],
},
required: true,
},
{
field: 'model',
label: '目录权属模式',
component: 'RadioGroup',
defaultValue: '本级定义',
colProps: { span: 8 },
componentProps: {
options: [
{ label: '本级定义', value: '本级定义' },
{ label: '资源自定义', value: '资源自定义' },
],
},
},
{
field: 'group',
label: '权属工作组',
component: 'Select',
defaultValue: '默认工作组',
colProps: { span: 8 },
componentProps: {
placeholder: '输入描述',
options: [{ label: '默认工作组', value: '默认工作组' }],
},
},
];
export const importFormSchema: any[] = [
{
field: 'taskId',
field: 'deptId',
label: '导入至',
component: 'TreeSelect',
colProps: { lg: 24, md: 24 },
componentProps: {
// border: 'none',
fieldNames: {
label: 'QualityName',
label: 'deptName',
value: 'businessId',
},
getPopupContainer: () => document.body,
treeData: [
{
deptName: '个人工作组',
businessId: '1',
children: [
{
deptName: '个人工作区',
businessId: '11',
children: [
{
deptName: '图标验收',
businessId: '111',
},
],
},
{
deptName: '共享工作区',
businessId: '12',
children: [
{
deptName: '学生成绩',
businessId: '122',
},
],
},
],
},
],
},
required: true,
},
......@@ -232,14 +44,14 @@ export const importFormSchema: any[] = [
field: 'fileMethods',
label: '导入文件选择',
slot: 'fileMethods',
colProps: { lg: 24, md: 24, offset: 3 },
colProps: { lg: 24, md: 24 },
},
{
field: 'fileRename',
label: 'shell文件重名',
label: '文件重名',
component: 'RadioGroup',
required: true,
colProps: { lg: 24, md: 24, offset: 3 },
colProps: { lg: 24, md: 24 },
componentProps: {
options: [
{ label: '全部放弃', value: '1' },
......
......@@ -7,19 +7,31 @@
<BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo">
<template #toolbar>
<Tooltip title="复制" placement="top">
<a-button type="primary" @click="handleMove(0, getRowSelection().selectedRowKeys)">
<a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary"
@click="handleMove(0, getRowSelection().selectedRowKeys)"
>
<Icon icon="majesticons:duplicate-line" :size="20" />
</a-button>
</Tooltip>
<Tooltip title="移动" placement="top">
<a-button type="primary" @click="handleMove(1, getRowSelection().selectedRowKeys)">
<a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary"
@click="handleMove(1, getRowSelection().selectedRowKeys)"
>
<Icon icon="majesticons:arrow-right" :size="20" />
</a-button>
</Tooltip>
<Tooltip title="删除" placement="top">
<a-button type="primary" @click="deleteButton">
<a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary"
@click="deleteButton"
>
<Icon icon="majesticons:trash-line" :size="20" />
</a-button>
</Tooltip>
......
......@@ -52,11 +52,11 @@
</Tooltip> -->
<!-- 参数配置-->
<!-- <Tooltip placement="top" title="参数配置">
<Tooltip placement="top" title="参数配置">
<a-button type="primary" style="margin-right: 10px" @click="handleOptions">
<Icon icon="majesticons:link-circle-line" :size="20" />
</a-button>
</Tooltip> -->
</Tooltip>
<!-- 格式化-->
<!-- <Tooltip placement="top" title="格式化">
......@@ -64,13 +64,24 @@
<Icon icon="gg:align-left" :size="20" />
</a-button>
</Tooltip> -->
<!-- 回退至该版本-->
<Tooltip placement="top" title="回退至该版本">
<a-button type="primary" style="margin-right: 10px" @click="handleRollback">
<Icon icon="ant-design:rollback-outlined" :size="20" />
</a-button>
</Tooltip>
<!-- 退出查看-->
<Tooltip placement="top" title="退出查看">
<a-button type="error" style="margin-right: 10px" @click="handleExit">
<Icon icon="majesticons:save-line" :size="20" />
</a-button>
</Tooltip>
<!-- 保存-->
<Tooltip placement="top" title="保存">
<!-- <Tooltip placement="top" title="保存">
<a-button type="primary" style="margin-right: 10px" @click="handleSave">
<Icon icon="majesticons:save-line" :size="20" />
</a-button>
</Tooltip>
</Tooltip> -->
<!-- <Tooltip placement="top" :title="layout === 'single' ? '版本对比' : '结束对比'">
<a-button type="primary" style="margin-right: 10px" @click="toggleLayout">
<Icon
......@@ -114,7 +125,7 @@
</PageWrapper>
</template>
<script lang="ts" setup>
import { Tooltip } from 'ant-design-vue';
import { Modal, Tooltip } from 'ant-design-vue';
import { onMounted, ref, nextTick, watch } from 'vue';
import { PageWrapper } from '@/components/Page';
import GroupTree from '../GroupTree.vue';
......@@ -133,6 +144,7 @@
import SubmitModal from './handleSubmit/submitModal.vue';
import { schema } from '@/views/dataIntegration/taskOM/taskOM.data';
import versionManagementModal from './versionManagementModal.vue';
import { router } from '@/router';
defineOptions({ name: 'AccountManagement' });
......@@ -199,6 +211,22 @@
function handleSave() {
createMessage.success('保存成功');
}
//回退至该版本按钮
function handleRollback() {
createMessage.success('回退成功');
router.push('/scriptDevelopment/shellDevelopment/shellExecute/shellExecute');
}
//退出查看按钮
function handleExit() {
Modal.confirm({
iconType: 'warning',
title: '提示',
content: '是否退出查看?',
onOk() {
router.push('/scriptDevelopment/shellDevelopment/shellExecute/shellExecute');
},
});
}
// 页面左侧点击返回链接时的操作
function goBack() {
......
......@@ -79,6 +79,11 @@
/>
</a-button>
</Tooltip> -->
<Tooltip placement="top" title="退出查看">
<a-button type="error" style="margin-right: 10px" @click="handleExit">
<Icon icon="majesticons:backspace-line" :size="20" />
</a-button>
</Tooltip>
</div>
</template>
</BasicForm>
......@@ -100,7 +105,7 @@
</PageWrapper>
</template>
<script lang="ts" setup>
import { Tooltip } from 'ant-design-vue';
import { Modal, Tooltip } from 'ant-design-vue';
import { onMounted, ref, nextTick, watch } from 'vue';
import { PageWrapper } from '@/components/Page';
import GroupTree from '../GroupTree.vue';
......@@ -119,6 +124,7 @@
import SubmitModal from './handleSubmit/submitModal.vue';
import { schema } from '@/views/dataIntegration/taskOM/taskOM.data';
import versionManagementModal from './versionManagementModal.vue';
import { router } from '@/router';
defineOptions({ name: 'AccountManagement' });
......@@ -186,7 +192,17 @@
function handleSave() {
createMessage.success('保存成功');
}
//退出查看按钮
function handleExit() {
Modal.confirm({
iconType: 'warning',
title: '提示',
content: '是否退出查看?',
onOk() {
router.push('/scriptDevelopment/shellDevelopment/shellExecute/shellExecute');
},
});
}
// 页面左侧点击返回链接时的操作
function goBack() {
// 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
......
......@@ -5,6 +5,9 @@
@register="registerModal"
:title="title"
@ok="handleSubmit"
:showOkBtn="false"
:showCancelBtn="true"
:cancelText="'关闭'"
>
<div style="display: flex">
<div class="w-full">
......
<template>
<div class="m-4 mr-0 overflow-hidden bg-white">
<div class=" m-4 mr-0 overflow-hidden bg-white">
<BasicTree
title=""
ref="treeRef"
......
......@@ -5,7 +5,7 @@
<DataTree @select="handleSelect" style="height: 50%" />
<GroupTree @select="handleGroupSelect" style="height: 50%" />
</div>
<div class="m-4 mr-0 w-3/4 xl:w-4/5" style="background-color: white">
<div class="m-4 mr-0 w-3/4 xl:w-4/5">
<div>
<BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #headerTop>
......@@ -26,12 +26,11 @@
>
</BasicTable>
</div>
<div v-if="showTable === 'true'" style="margin-top: 100px">
<div v-if="showTable === 'true'">
<BasicTable @register="registerDataPreviewTable">
<template #headerTop>
<span style="font-weight: bold; font-size: 16px">数据预览</span>
<Dropdown :trigger="['click']">
<span type="primary" @click.prevent style="margin-left: 1120px"
<span type="primary" @click.prevent style="margin-left: 1180px"
>字段选择<Icon
icon="ant-design:caret-down-filled"
style="font-size: 12px; margin-left: 2px"
......@@ -51,8 +50,8 @@
</template>
</Dropdown>
<Icon
icon="material-symbols-light:download-sharp"
style="margin-left: 10px"
icon="bxs:download"
style="margin-left: 20px"
:size="25"
@click="handleDownload"
/>
......@@ -141,7 +140,7 @@
});
const [registerDataPreviewTable] = useTable({
title: ' ',
title: '数据预览',
api: async () => {
const response = {
pageNu: '1',
......
<template>
<PageWrapper
title="shell文件查看详情"
dense
contentFullHeight
fixedHeight
contentClass="flex"
@back="goBack"
>
<!-- <GroupTree @select="handleSelect" class="w-1/4 xl:w-1/5" /> -->
<div class="w-full xl:w-full" style="padding-top: 20px">
<BasicForm @register="registerForm">
<template #formFooter>
<div style="display: flex; justify-content: space-between; margin-left: 500px">
<!-- 新窗口运行-->
<!-- <Tooltip placement="top" title="新窗口运行">
<a-button
type="primary"
style="margin-right: 10px; margin-left: 500px"
@click="handleExecute"
>
<Icon icon="si:play-forward-duotone" :size="20" />
</a-button>
</Tooltip> -->
<!-- 运行-->
<!-- <Tooltip placement="top" title="运行">
<a-button type="primary" style="margin-right: 10px" @click="handleExecute">
<Icon icon="si:play-line" :size="20" />
</a-button>
</Tooltip> -->
<!-- 执行记录-->
<!-- <Tooltip placement="top" title="执行记录">
<a-button type="primary" style="margin-right: 10px" @click="handleRecord">
<Icon icon="si:clock-alt-line" :size="20" />
</a-button>
</Tooltip> -->
<!-- 提交版本-->
<!-- <Tooltip placement="top" title="提交版本">
<a-button type="primary" style="margin-right: 10px" @click="handleSubmit">
<Icon icon="majesticons:cloud-upload-line" :size="20" />
</a-button>
</Tooltip> -->
<!-- 版本管理-->
<!-- <Tooltip placement="top" title="版本管理">
<a-button type="primary" style="margin-right: 10px" @click="handleVersion">
<Icon icon="majesticons:file-search-line" :size="20" />
</a-button>
</Tooltip> -->
<!-- 参数配置-->
<!-- <Tooltip placement="top" title="参数配置">
<a-button type="primary" style="margin-right: 10px" @click="handleOptions">
<Icon icon="majesticons:link-circle-line" :size="20" />
</a-button>
</Tooltip> -->
<!-- 格式化-->
<!-- <Tooltip placement="top" title="格式化">
<a-button type="primary" style="margin-right: 10px" @click="handleChange">
<Icon icon="gg:align-left" :size="20" />
</a-button>
</Tooltip> -->
<!-- 保存-->
<!-- <Tooltip placement="top" title="保存">
<a-button type="primary" style="margin-right: 10px" @click="handleSave">
<Icon icon="majesticons:save-line" :size="20" />
</a-button>
</Tooltip> -->
<!-- <Tooltip placement="top" :title="layout === 'single' ? '版本对比' : '结束对比'">
<a-button type="primary" style="margin-right: 10px" @click="toggleLayout">
<Icon
:icon="layout === 'single' ? 'majesticons:user-line' : 'majesticons:users-line'"
:size="20"
/>
</a-button>
</Tooltip> -->
<Tooltip placement="top" title="退出查看">
<a-button type="error" style="margin-right: 10px" @click="handleExit">
<Icon icon="majesticons:backspace-line" :size="20" />
</a-button>
</Tooltip>
</div>
</template>
</BasicForm>
<div style="width: 100%; margin-top: 20px">
<div class="editor-container">
<div>
<CodeEditor v-model:value="jsonData" :mode="MODE.JSON" />
</div>
</div>
</div>
</div>
<optionsModal @register="registerModal" />
<resultModal @register="registerResultModal" />
<PreviewModal @register="registerPreviewModal" />
<RecordModal @register="registerRecordModal" />
<SubmitModal @register="registerSubmitModal" />
<versionManagementModal @register="registerVersionManagementModal" />
</PageWrapper>
</template>
<script lang="ts" setup>
import { Modal, Tooltip } from 'ant-design-vue';
import { onMounted, ref, nextTick, watch } from 'vue';
import { PageWrapper } from '@/components/Page';
import GroupTree from '../GroupTree.vue';
import { jsonData } from '../sqlDevelopmentData';
import { CompareFormSchema } from '../data';
import { useGo } from '@/hooks/web/usePage';
import { CodeEditor, MODE } from '@/components/CodeEditor';
import { BasicForm, useForm } from '@/components/Form';
import optionsModal from './optionsModal.vue';
import { useModal } from '@/components/Modal';
import resultModal from './resultModal.vue';
import PreviewModal from './dataPreviewModal.vue';
import { useMessage } from '@/hooks/web/useMessage';
import Icon from '@/components/Icon/Icon.vue';
import RecordModal from './executeRecordModal.vue';
import SubmitModal from './handleSubmit/submitModal.vue';
import { schema } from '@/views/dataIntegration/taskOM/taskOM.data';
import versionManagementModal from './versionManagementModal.vue';
import { router } from '@/router';
defineOptions({ name: 'AccountManagement' });
const { createMessage } = useMessage();
const go = useGo();
const layout = ref('single');
const jsonDataLeft = jsonData;
const jsonDataRight = jsonData;
const editorLeft = ref<HTMLElement | null>(null);
const editorRight = ref<HTMLElement | null>(null);
const toggleLayout = () => {
layout.value = layout.value === 'single' ? 'double' : 'single';
};
const [registerModal, { openModal }] = useModal();
const [registerSubmitModal, { openModal: openSubmitModal }] = useModal();
const [registerResultModal, { openModal: openResultModal }] = useModal();
const [registerPreviewModal, { openModal: openPreviewModal }] = useModal();
const [registerVersionManagementModal, { openModal: openVersionManagementModal }] = useModal();
const [registerRecordModal, { openModal: openRecordModal }] = useModal();
const [registerForm] = useForm({
labelWidth: 100,
baseColProps: { lg: 6, md: 4 },
schemas: CompareFormSchema,
showActionButtonGroup: false,
disabled: true,
});
/** 部门树的select*/
function handleSelect() {
openPreviewModal(true, {
title: '数据预览',
});
}
function handleOptions() {
openModal(true, {
title: '参数配置',
});
}
function handleExecute() {
openResultModal(true, {
title: '执行结果',
});
}
function handleRecord() {
openRecordModal(true, {
title: '执行记录',
});
}
//提交版本按钮
function handleSubmit() {
openSubmitModal(true, {
title: '提交版本',
});
}
//编辑版本
function handleVersion() {
openVersionManagementModal(true, {
title: '版本管理',
});
}
function handleChange() {
createMessage.success('格式化成功');
}
//保存按钮
function handleSave() {
createMessage.success('保存成功');
}
//退出查看按钮
function handleExit() {
Modal.confirm({
iconType: 'warning',
title: '提示',
content: '是否退出查看?',
onOk() {
router.push('/scriptDevelopment/shellDevelopment/shellExecute/shellExecute');
},
});
}
// 页面左侧点击返回链接时的操作
function goBack() {
// 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
go('/scriptDevelopment/shellDevelopment/index');
}
//同步滚动
const handleScroll = () => {
if (editorLeft.value && editorRight.value) {
editorLeft.value.scrollTop = editorRight.value.scrollTop;
editorLeft.value.scrollLeft = editorRight.value.scrollLeft;
}
};
watch([editorLeft, editorRight], ([newEditorLeft, newEditorRight]) => {
if (newEditorLeft && newEditorRight) {
newEditorLeft.addEventListener('scroll', handleScroll);
newEditorRight.addEventListener('scroll', handleScroll);
} else {
if (editorLeft.value) {
editorLeft.value.removeEventListener('scroll', handleScroll);
}
if (editorRight.value) {
editorRight.value.removeEventListener('scroll', handleScroll);
}
}
});
onMounted(async () => {
await nextTick(() => {
if (editorLeft.value && editorRight.value) {
editorLeft.value.addEventListener('scroll', handleScroll);
editorRight.value.addEventListener('scroll', handleScroll);
}
});
});
</script>
<style scoped>
.editor-container {
display: flex;
}
.editor-left {
flex: 1;
height: 100%;
overflow-y: hidden;
}
.editor-right {
flex: 1;
height: 100%;
overflow-y: hidden;
}
.editor-wrapper {
display: flex;
justify-content: space-between;
}
.editor-left,
.editor-right {
flex: 1;
overflow: hidden;
}
</style>
......@@ -10,15 +10,7 @@
<a-button type="primary" @click="handleSubmit">关闭</a-button>
</template>
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'result'">
<template v-if="record.result === '成功'">
<Icon icon="grommet-icons:status-good" color="green" /><span>成功</span>
</template>
<template v-if="record.result === '失败'">
<Icon icon="carbon:error-outline" color="red" /><span>失败</span>
</template>
</template>
<template #bodyCell="{ column }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
......@@ -41,7 +33,6 @@
import { recordColumns } from '../data';
import { recordData } from '../sqlDevelopmentData';
import recordDetailModal from './recordDetailModal.vue';
import Icon from '@/components/Icon/Icon.vue';
defineOptions({ name: 'KnowledgeModal' });
......
......@@ -21,15 +21,9 @@
<div class="charts-container1">
<div class="chart" id="chart"></div>
</div>
<div>
<Icon
icon="material-symbols-light:download-sharp"
style="margin-left: 90px"
:size="25"
@click="handleDownload"
/>
<span style="font-size: 14px" @click="handleDownload">下载图表</span>
</div>
<a-button type="primary" @click="handleDownload" style="margin-left: 100px"
>下载图表</a-button
>
</div>
</div>
</BasicModal>
......@@ -42,7 +36,6 @@
import { resultViewSchema } from '@/views/scriptDevelopment/sqlDevelopment/data';
import * as echarts from 'echarts';
import { chartData } from '@/views/scriptDevelopment/sqlDevelopment/sqlDevelopmentData';
import Icon from '@/components/Icon/Icon.vue';
defineOptions({ name: 'KnowledgeModal' });
......@@ -77,7 +70,6 @@
chartInstance.setOption({
title: {
text: '柱状图',
left: 'center',
},
tooltip: {},
xAxis: {
......@@ -90,8 +82,8 @@
},
legend: {
orient: 'horizontal', // 图例项水平排列
left: '6%', // 图例放置于底部中心位置
top: '5%', // 图例放置于图表的底部
left: 'left', // 图例放置于底部中心位置
top: 'center', // 图例放置于图表的底部
},
yAxis: {
type: 'value',
......
<template>
<PageWrapper title="SQL执行" dense contentFullHeight fixedHeight @back="goBack">
<div style="padding-top: 20px; background-color: white">
<PageWrapper
title="SQL执行"
dense
contentFullHeight
fixedHeight
@back="goBack"
>
<div style="padding-top: 20px">
<BasicForm @register="registerForm">
<template #formFooter>
<div style="display: flex; justify-content: space-between">
......@@ -31,7 +38,7 @@
<!-- 提交版本-->
<Tooltip placement="top" title="提交版本">
<a-button type="primary" style="margin-right: 10px" @click="handleSubmitVersion">
<a-button type="primary" style="margin-right: 10px" @click="handleSubmit">
<Icon icon="majesticons:file-plus-line" :size="20" />
</a-button>
</Tooltip>
......@@ -71,12 +78,11 @@
<resultModal @register="registerResultModal" />
<RecordModal @register="registerRecordModal" />
<versionManagementModal @register="registerVersionManagementModal" />
<SubmitVersionModal @register="registerSubmitVersionModal" />
</PageWrapper>
</template>
<script lang="ts" setup>
import { Tooltip } from 'ant-design-vue';
import { onMounted } from 'vue';
import { ref, nextTick, watch, onMounted } from 'vue';
import { PageWrapper } from '@/components/Page';
import { jsonData } from '../sqlDevelopmentData';
import { formSchema } from '../data';
......@@ -90,7 +96,6 @@
import Icon from '@/components/Icon/Icon.vue';
import RecordModal from './executeRecordModal.vue';
import versionManagementModal from './versionManagementModal.vue';
import SubmitVersionModal from './submitVersionModal.vue';
defineOptions({ name: 'AccountManagement' });
......@@ -99,7 +104,6 @@
const [registerModal, { openModal }] = useModal();
const [registerResultModal, { openModal: openResultModal }] = useModal();
const [registerVersionManagementModal, { openModal: openVersionManagementModal }] = useModal();
const [registerSubmitVersionModal, { openModal: openSubmitVersionModal }] = useModal();
const [registerRecordModal, { openModal: openRecordModal }] = useModal();
const [registerForm] = useForm({
labelWidth: 100,
......@@ -127,11 +131,6 @@
title: '版本管理',
});
}
function handleSubmitVersion() {
openSubmitVersionModal(true, {
title: '提交版本',
});
}
function handleSubmit() {
createMessage.success('保存成功');
}
......
......@@ -30,12 +30,3 @@ export const versionSchema = [
subTitle: 'v22',
},
];
export const submitVersionSchema: FormSchema[] = [
{
field: 'remark',
label: '版本描述',
component: 'InputTextArea',
required: true,
colProps: { lg: 24, md: 24 },
},
];
......@@ -5,6 +5,9 @@
@register="registerModal"
:title="title"
@ok="handleSubmit"
:showOkBtn="false"
:showCancelBtn="true"
:cancelText="'关闭'"
>
<div style="display: flex">
<div class="w-full">
......@@ -20,8 +23,8 @@
onClick: handleDetail,
},
{
icon: 'ant-design:edit-outlined',
tooltip: '编辑',
icon: 'majesticons:file-search-line',
tooltip: '版本对比',
onClick: modEdit,
},
{
......@@ -48,6 +51,7 @@
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { versionColumns, versionSchema } from './version.data';
import { message } from 'ant-design-vue';
import { router } from '@/router';
const title = ref();
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
......@@ -67,11 +71,15 @@
});
function handleDetail() {
console.log('查看详情');
closeModal();
router.push({
path: '/scriptDevelopment/sqlDevelopment/sqlExecute/versionDetail',
});
}
function modEdit() {
console.log('编辑');
closeModal();
console.log('版本对比');
router.push({
path: '/scriptDevelopment/sqlDevelopment/sqlExecute/versionCompare',
});
}
function handleVersionRollback() {
message.success('回退成功');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment