Commit 6f8b636f authored by 罗林杰's avatar 罗林杰

修改bug

parent 91f33568
...@@ -6,118 +6,73 @@ ...@@ -6,118 +6,73 @@
:title="getTitle" :title="getTitle"
@ok="handleSubmit" @ok="handleSubmit"
> >
<!-- <div style="display: flex; justify-content: flex-end; padding-bottom: 10px">
<a-button style="margin-right: 5px" type="primary" @click="deleteAll">批量删除</a-button>
<a-button style="margin-right: 5px" type="primary" @click="handleImport">规则设置</a-button>
</div> -->
<template #footer> <template #footer>
<a-button type="primary" @click="handleSubmit">关闭</a-button> <a-button type="primary" @click="handleSubmit">关闭</a-button>
</template> </template>
<!-- <BasicTable @register="registerTable"> <a-button
<template #bodyCell="{ column, record }"> type="primary"
<template v-if="column.key === 'status'"> @click="handleQualityTaskService"
<Tag color="error" v-if="record.status === '0'">失败</Tag> style="margin-bottom: 20px; margin-right: 10px; margin-left: 600px"
</template> >跳转运维</a-button
<template v-if="column.key === 'status'"> >
<Tag color="success" v-if="record.status === '1'">成功</Tag> <a-button
</template> type="primary"
<template v-if="column.key === 'action'"> @click="handleQualityTaskRunLog"
<TableAction style="margin-bottom: 20px; margin-right: 10px"
:actions="[ >查看报告</a-button
{ >
//配置详情 <a-button type="primary" style="margin-bottom: 20px; margin-right: 10px" @click="handleSave"
icon: 'clarity:note-edit-line', >保存</a-button
label: '', >
onClick: handleEdit.bind(null), <a-button
}, type="primary"
{ @click="handleQualityTaskOnline"
icon: 'ant-design:delete-outlined', style="margin-bottom: 20px; margin-right: 10px"
color: 'error', >上线</a-button
label: '', >
popConfirm: { <a-button
title: '是否确认删除', type="primary"
placement: 'left', @click="handleQualityTaskRunSetting"
confirm: handleDelete.bind(null), style="margin-bottom: 20px; margin-right: 10px"
}, >配置运行</a-button
}, >
{ <a-button
//失败日志 type="primary"
icon: 'clarity:contract-line', style="margin-bottom: 20px; margin-right: 10px"
label: '', @click="handleQualityTaskRun"
ifShow: record.status === '0', >运行</a-button
onClick: handleDetail.bind(null), >
},
]"
/>
</template>
</template>
</BasicTable> -->
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
<quality-Run-setting-modal @register="registerRunSetting" />
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, unref, reactive, onMounted } from 'vue'; import { ref, computed, unref, onMounted } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal'; import { BasicModal, useModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, TableAction, useTable } from '@/components/Table';
import { BasicForm, useForm } from '@/components/Form'; import { BasicForm, useForm } from '@/components/Form';
import { import {
storageManagementColumns,
storageManagementFormSchema,
storageManagementData, storageManagementData,
storageManagementBasicFormSchema, storageManagementBasicFormSchema,
} from './QualityTaskSetting.data'; } from './QualityTaskSetting.data';
// import { storageManagementData } from './analysisData'; import { Modal } from 'ant-design-vue';
import { Tag } from 'ant-design-vue'; import { useGo } from '@/hooks/web/usePage';
import QualityRunSettingModal from '@/views/dataQuality/dataSheet/task/QualityTaskRunSetting.vue';
defineOptions({ name: 'KnowledgeModal' }); defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();
const title = ref(); const title = ref();
const go = useGo();
const isRunning = ref(false); const isRunning = ref(false);
const getTitle = computed(() => (!unref(isRunning) ? '配置质量文件' : '配置质量文件')); const getTitle = computed(() => (!unref(isRunning) ? '配置质量文件' : '配置质量文件'));
const tableData = ref([]); const tableData = ref([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单 const [registerRunSetting, { openModal: openRunSettingModal }] = useModal();
const [registerTable, { reload }] = useTable({
api: async () => {
const response = {
pageNum: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
var data = [];
data = tableData.value;
return { ...response, data: data };
},
pagination: false,
columns: storageManagementColumns,
// useSearchForm: true,
showTableSetting: false,
formConfig: {
labelWidth: 120,
schemas: storageManagementFormSchema,
autoSubmitOnEnter: true,
},
rowKey: 'id',
// rowSelection: true,
bordered: true,
showIndexColumn: false,
// actionColumn: {
// width: 150,
// title: '操作',
// dataIndex: 'action',
// },
});
//初始化弹框 //初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await reload();
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
title.value = data.title; title.value = data.title;
}); });
...@@ -133,27 +88,41 @@ ...@@ -133,27 +88,41 @@
async function handleSubmit() { async function handleSubmit() {
closeModal(); closeModal();
} }
function handleDetail() {
createMessage.success('提交成功'); /** 跳转运维 未完成 应为跳转到运维界面*/
function handleQualityTaskService() {
go('/dataQuality/dataSheet/task/taskOperation');
} }
function handleEdit() {
createMessage.success('提交成功'); /** 查看报告 正在做 应为跳转到报告页面*/
function handleQualityTaskRunLog() {
go('/dataQuality/dataSheet/task/viewTaskOperation', false);
}
/** 上线 未完成 应为弹窗*/
function handleQualityTaskOnline() {
go('/dataQuality/dataSheet/task');
} }
function handleDelete() {
createMessage.success('删除成功'); /** 配置运行 正在做 应为弹窗*/
function handleQualityTaskRunSetting() {
openRunSettingModal(true, {
isRunning: false,
});
} }
function deleteAll() {
createConfirm({ /** 任务运行*/
iconType: 'warning', function handleQualityTaskRun() {
title: '确认删除', Modal.confirm({
content: '确认批量删除选中数据吗?', title: '确认运行',
onOk() { content: '是否运行选中的任务?',
createMessage.success('批量删除成功!'); onOk: () => {
createMessage.success('运行成功!');
}, },
}); });
} }
function handleImport() { function handleSave() {
createMessage.success('导出完成'); createMessage.success('保存成功!');
} }
onMounted(() => { onMounted(() => {
tableData.value = storageManagementData; tableData.value = storageManagementData;
......
...@@ -8,74 +8,97 @@ ...@@ -8,74 +8,97 @@
:disabled="getRowSelection().selectedRowKeys <= 0" :disabled="getRowSelection().selectedRowKeys <= 0"
type="primary" type="primary"
@click="handleDeleteIds" @click="handleDeleteIds"
style="margin-right: 10px"
>删除</a-button >删除</a-button
> >
<a-button :disabled="getRowSelection().selectedRowKeys <= 0" type="primary" <a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary"
style="margin-right: 10px"
>导出</a-button >导出</a-button
> >
<a-button type="primary" @click="handleImport">导入</a-button> <a-button type="primary" @click="handleImport" style="margin-right: 10px">导入</a-button>
<a-button type="primary" @click="handleAdd">新增文件夹</a-button> <a-button type="primary" @click="handleAdd" style="margin-right: 10px"
<a-button type="primary" @click="handleAddMainBody">新增质量任务文件</a-button> >新增文件夹</a-button
>
<a-button type="primary" @click="handleAddMainBody" style="margin-right: 10px"
>新增质量任务文件</a-button
>
<a-button <a-button
type="primary" type="primary"
@click="handleQualityTaskSetting" @click="handleQualityTaskSetting"
:disabled="getRowSelection().selectedRowKeys <= 0" :disabled="getRowSelection().selectedRowKeys <= 0"
style="margin-right: 10px"
>配置质量任务文件</a-button >配置质量任务文件</a-button
> >
<a-button type="primary" @click="handleAddQualityRule">新增质量规则</a-button> <a-button type="primary" @click="handleAddQualityRule" style="margin-right: 10px"
>新增质量规则</a-button
>
<a-button <a-button
type="primary" type="primary"
@click="handleAlarmSetting" @click="handleAlarmSetting"
:disabled="getRowSelection().selectedRowKeys <= 0" :disabled="getRowSelection().selectedRowKeys <= 0"
style="margin-right: 10px"
>配置通知告警</a-button >配置通知告警</a-button
> >
<a-button <!-- <a-button-->
type="primary" <!-- type="primary"-->
@click="handleQualityTaskRunSetting" <!-- @click="handleQualityTaskRunSetting"-->
:disabled="getRowSelection().selectedRowKeys <= 0" <!-- :disabled="getRowSelection().selectedRowKeys <= 0"-->
>配置运行</a-button <!-- >配置运行</a-button-->
<!-- >-->
<!-- <a-button-->
<!-- type="primary"-->
<!-- @click="handleQualityTaskRun"-->
<!-- :disabled="getRowSelection().selectedRowKeys <= 0"-->
<!-- >运行</a-button-->
<!-- >-->
<!-- <a-button-->
<!-- type="primary"-->
<!-- @click="handleQualityTaskRunLog"-->
<!-- :disabled="getRowSelection().selectedRowKeys <= 0"-->
<!-- >查看报告</a-button-->
<!-- >-->
<a-button type="primary" @click="handleAddCheckRangePlus" style="margin-right: 10px"
>添加检查范围-增量添加</a-button
> >
<a-button
type="primary"
@click="handleQualityTaskRun"
:disabled="getRowSelection().selectedRowKeys <= 0"
>运行</a-button
>
<a-button
type="primary"
@click="handleQualityTaskRunLog"
:disabled="getRowSelection().selectedRowKeys <= 0"
>查看报告</a-button
>
<a-button type="primary" @click="handleAddCheckRangePlus">添加检查范围-增量添加</a-button>
<!-- <a-button type="primary" @click="handleAddCheckRangeAll">添加检查范围-全量添加</a-button> --> <!-- <a-button type="primary" @click="handleAddCheckRangeAll">添加检查范围-全量添加</a-button> -->
<!-- <a-button-->
<!-- type="primary"-->
<!-- @click="handleQualityTaskOnline"-->
<!-- v-if="isOnline"-->
<!-- :disabled="getRowSelection().selectedRowKeys <= 0"-->
<!-- >上线</a-button-->
<!-- >-->
<a-button <a-button
type="primary" type="primary"
@click="handleQualityTaskOnline" @click="handleQualityTaskOnline"
v-if="isOnline" v-if="isOnline"
:disabled="getRowSelection().selectedRowKeys <= 0" :disabled="getRowSelection().selectedRowKeys <= 0"
>上线</a-button style="margin-right: 10px"
>
<a-button
type="primary"
@click="handleQualityTaskOnline"
v-if="isOnline"
:disabled="getRowSelection().selectedRowKeys <= 0"
>批量上线</a-button >批量上线</a-button
> >
<a-button type="warning" @click="handleQualityTaskOffline" v-if="isOffline" <a-button
type="warning"
@click="handleQualityTaskOffline"
v-if="isOffline"
style="margin-right: 10px"
>下线</a-button >下线</a-button
> >
<a-button type="warning" @click="handleQualityTaskOffline" v-if="isOffline"
>批量下线</a-button
>
<a-button <a-button
type="primary" type="warning"
@click="handleQualityTaskService" @click="handleQualityTaskOffline"
:disabled="getRowSelection().selectedRowKeys <= 0" v-if="isOffline"
>跳转运维</a-button style="margin-right: 10px"
>批量下线</a-button
> >
<!-- <a-button-->
<!-- type="primary"-->
<!-- @click="handleQualityTaskService"-->
<!-- :disabled="getRowSelection().selectedRowKeys <= 0"-->
<!-- >跳转运维</a-button-->
<!-- >-->
</a-scrollbar> </a-scrollbar>
</template> </template>
<template #name="{ text, record }"> <template #name="{ text, record }">
...@@ -119,20 +142,18 @@ ...@@ -119,20 +142,18 @@
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, unref, onDeactivated, onMounted, ref } from 'vue'; import { reactive, onMounted, ref } from 'vue';
import { BasicTable, useTable, TableAction } from '@/components/Table'; import { BasicTable, useTable, TableAction } from '@/components/Table';
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import DeptTree from './DeptTree.vue'; import DeptTree from './DeptTree.vue';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import ImportModal from './importModal.vue'; import importModal from './importModal.vue';
import { tableList } from './mock'; import { tableList } from './mock';
import { columns, searchFormSchema } from './mainBody.data'; import { columns, searchFormSchema } from './mainBody.data';
import { useGo } from '@/hooks/web/usePage'; import { useGo } from '@/hooks/web/usePage';
import { downloadByData } from '@/utils/file/download';
import { useRoute, onBeforeRouteLeave } from 'vue-router'; import { useRoute, onBeforeRouteLeave } from 'vue-router';
import { useFilterStore } from '@/store/modules/filterData'; import { useFilterStore } from '@/store/modules/filterData';
import { useUserStore } from '@/store/modules/user';
import { router } from '@/router'; import { router } from '@/router';
import AddFolder from '@/views/dataQuality/dataSheet/task/addFolder.vue'; import AddFolder from '@/views/dataQuality/dataSheet/task/addFolder.vue';
import RemoveModal from '@/views/dataQuality/dataSheet/task/removeModal.vue'; import RemoveModal from '@/views/dataQuality/dataSheet/task/removeModal.vue';
......
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
</template> </template>
</BasicTable> </BasicTable>
</div> </div>
</PageWrapper>
<detail-modal @register="registerDetailModal" /> <detail-modal @register="registerDetailModal" />
</PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, reactive, ref } from 'vue'; import { onMounted, reactive, ref } from 'vue';
......
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