Commit e66eb8f0 authored by 罗林杰's avatar 罗林杰

修改sql开发

parent 80f1d54d
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<DataTree @select="handleSelect" style="height: 50%" /> <DataTree @select="handleSelect" style="height: 50%" />
<GroupTree @select="handleGroupSelect" style="height: 50%" /> <GroupTree @select="handleGroupSelect" style="height: 50%" />
</div> </div>
<div class="m-4 mr-0 w-3/4 xl:w-4/5"> <div class="m-4 mr-0 w-3/4 xl:w-4/5" style="background-color: white">
<div> <div>
<BasicTable @register="registerTable" :searchInfo="searchInfo"> <BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #headerTop> <template #headerTop>
...@@ -26,12 +26,13 @@ ...@@ -26,12 +26,13 @@
> >
</BasicTable> </BasicTable>
</div> </div>
<div v-if="showTable === 'true'"> <div v-if="showTable === 'true'" style="margin-top: 100px">
<BasicTable @register="registerDataPreviewTable"> <BasicTable @register="registerDataPreviewTable">
<template #headerTop> <template #headerTop>
<span style="font-weight: bold; font-size: 16px">数据预览</span>
<Dropdown :trigger="['click']"> <Dropdown :trigger="['click']">
<span type="primary" @click.prevent style="margin-left: 1180px" <span type="primary" @click.prevent style="margin-left: 1120px"
>字段选择<Icon >字段选择<Icon
icon="ant-design:caret-down-filled" icon="ant-design:caret-down-filled"
style="font-size: 12px; margin-left: 2px" style="font-size: 12px; margin-left: 2px"
/></span> /></span>
...@@ -50,8 +51,8 @@ ...@@ -50,8 +51,8 @@
</template> </template>
</Dropdown> </Dropdown>
<Icon <Icon
icon="bxs:download" icon="material-symbols-light:download-sharp"
style="margin-left: 20px" style="margin-left: 10px"
:size="25" :size="25"
@click="handleDownload" @click="handleDownload"
/> />
...@@ -140,7 +141,7 @@ ...@@ -140,7 +141,7 @@
}); });
const [registerDataPreviewTable] = useTable({ const [registerDataPreviewTable] = useTable({
title: '数据预览', title: ' ',
api: async () => { api: async () => {
const response = { const response = {
pageNu: '1', pageNu: '1',
......
...@@ -10,7 +10,15 @@ ...@@ -10,7 +10,15 @@
<a-button type="primary" @click="handleSubmit">关闭</a-button> <a-button type="primary" @click="handleSubmit">关闭</a-button>
</template> </template>
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #bodyCell="{ column }"> <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 v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<TableAction <TableAction
:actions="[ :actions="[
......
...@@ -21,9 +21,15 @@ ...@@ -21,9 +21,15 @@
<div class="charts-container1"> <div class="charts-container1">
<div class="chart" id="chart"></div> <div class="chart" id="chart"></div>
</div> </div>
<a-button type="primary" @click="handleDownload" style="margin-left: 100px" <div>
>下载图表</a-button <Icon
> icon="material-symbols-light:download-sharp"
style="margin-left: 90px"
:size="25"
@click="handleDownload"
/>
<span style="font-size: 14px" @click="handleDownload">下载图表</span>
</div>
</div> </div>
</div> </div>
</BasicModal> </BasicModal>
...@@ -82,8 +88,8 @@ ...@@ -82,8 +88,8 @@
}, },
legend: { legend: {
orient: 'horizontal', // 图例项水平排列 orient: 'horizontal', // 图例项水平排列
left: 'left', // 图例放置于底部中心位置 left: '6%', // 图例放置于底部中心位置
top: 'center', // 图例放置于图表的底部 top: '5%', // 图例放置于图表的底部
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
......
<template> <template>
<PageWrapper <PageWrapper title="SQL执行" dense contentFullHeight fixedHeight @back="goBack">
title="SQL执行" <div style="padding-top: 20px; background-color: white">
dense
contentFullHeight
fixedHeight
@back="goBack"
>
<div style="padding-top: 20px">
<BasicForm @register="registerForm"> <BasicForm @register="registerForm">
<template #formFooter> <template #formFooter>
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
...@@ -38,7 +31,7 @@ ...@@ -38,7 +31,7 @@
<!-- 提交版本--> <!-- 提交版本-->
<Tooltip placement="top" title="提交版本"> <Tooltip placement="top" title="提交版本">
<a-button type="primary" style="margin-right: 10px" @click="handleSubmit"> <a-button type="primary" style="margin-right: 10px" @click="handleSubmitVersion">
<Icon icon="majesticons:file-plus-line" :size="20" /> <Icon icon="majesticons:file-plus-line" :size="20" />
</a-button> </a-button>
</Tooltip> </Tooltip>
...@@ -78,6 +71,7 @@ ...@@ -78,6 +71,7 @@
<resultModal @register="registerResultModal" /> <resultModal @register="registerResultModal" />
<RecordModal @register="registerRecordModal" /> <RecordModal @register="registerRecordModal" />
<versionManagementModal @register="registerVersionManagementModal" /> <versionManagementModal @register="registerVersionManagementModal" />
<SubmitVersionModal @register="registerSubmitVersionModal" />
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -96,6 +90,7 @@ ...@@ -96,6 +90,7 @@
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import RecordModal from './executeRecordModal.vue'; import RecordModal from './executeRecordModal.vue';
import versionManagementModal from './versionManagementModal.vue'; import versionManagementModal from './versionManagementModal.vue';
import SubmitVersionModal from './submitVersionModal.vue';
defineOptions({ name: 'AccountManagement' }); defineOptions({ name: 'AccountManagement' });
...@@ -105,6 +100,7 @@ ...@@ -105,6 +100,7 @@
const [registerResultModal, { openModal: openResultModal }] = useModal(); const [registerResultModal, { openModal: openResultModal }] = useModal();
const [registerVersionManagementModal, { openModal: openVersionManagementModal }] = useModal(); const [registerVersionManagementModal, { openModal: openVersionManagementModal }] = useModal();
const [registerRecordModal, { openModal: openRecordModal }] = useModal(); const [registerRecordModal, { openModal: openRecordModal }] = useModal();
const [registerSubmitVersionModal, { openModal: openSubmitVersionModal }] = useModal();
const [registerForm] = useForm({ const [registerForm] = useForm({
labelWidth: 100, labelWidth: 100,
baseColProps: { lg: 6, md: 4 }, baseColProps: { lg: 6, md: 4 },
...@@ -131,8 +127,10 @@ ...@@ -131,8 +127,10 @@
title: '版本管理', title: '版本管理',
}); });
} }
function handleSubmit() { function handleSubmitVersion() {
createMessage.success('保存成功'); openSubmitVersionModal(true, {
title: '提交版本',
});
} }
function handleChange() { function handleChange() {
createMessage.success('格式化成功'); createMessage.success('格式化成功');
......
<template>
<BasicModal
width="30%"
v-bind="$attrs"
@register="registerModal"
:title="title"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicForm, useForm } from '@/components/Form';
import { submitVersionSchema } from '@/views/scriptDevelopment/sqlDevelopment/sqlExecute/version.data';
defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const title = ref();
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { resetFields }] = useForm({
labelWidth: 100,
labelAlign: 'left',
schemas: submitVersionSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
async function handleSubmit() {
closeModal();
createMessage.success('提交成功');
resetFields();
}
onMounted(() => {});
</script>
...@@ -30,3 +30,12 @@ export const versionSchema = [ ...@@ -30,3 +30,12 @@ export const versionSchema = [
subTitle: 'v22', subTitle: 'v22',
}, },
]; ];
export const submitVersionSchema: FormSchema[] = [
{
field: 'remark',
label: '版本描述',
component: 'InputTextArea',
required: true,
colProps: { lg: 24, md: 24 },
},
];
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