Commit 210f5a3e authored by 罗林杰's avatar 罗林杰

Merge remote-tracking branch 'origin/master'

parents 416ffca3 dd96c911
...@@ -906,6 +906,26 @@ export const shellExecuteRoute: AppRouteRecordRaw = { ...@@ -906,6 +906,26 @@ export const shellExecuteRoute: AppRouteRecordRaw = {
icon: '', icon: '',
}, },
}, },
{
path: 'versionCompare',
name: 'VersionCompare',
component: () =>
import('@/views/scriptDevelopment/shellDevelopment/shellExecute/VersionCompare.vue'),
meta: {
title: '版本比较',
icon: '',
},
},
{
path: 'versionDetail',
name: 'versionDetail',
component: () =>
import('@/views/scriptDevelopment/shellDevelopment/shellExecute/VersionDetail.vue'),
meta: {
title: '查看详情',
icon: '',
},
},
], ],
}; };
...@@ -1027,7 +1047,7 @@ export const serviceDevelopmentRoute: AppRouteRecordRaw = { ...@@ -1027,7 +1047,7 @@ export const serviceDevelopmentRoute: AppRouteRecordRaw = {
{ {
path: 'serviceManage/onlineManage/productionData', path: 'serviceManage/onlineManage/productionData',
name: 'productionData', name: 'productionData',
component: () => import('@/views/dataService/serviceManage/onlineManage/productionData.vue'), component: () => import('@/views/dataService/serviceManage/onlineManage/productionDrawer.vue'),
meta: { meta: {
title: '上线设置', title: '上线设置',
icon: '', icon: '',
...@@ -1036,7 +1056,7 @@ export const serviceDevelopmentRoute: AppRouteRecordRaw = { ...@@ -1036,7 +1056,7 @@ export const serviceDevelopmentRoute: AppRouteRecordRaw = {
{ {
path: 'serviceManage/onlineManage/productionTest', path: 'serviceManage/onlineManage/productionTest',
name: 'productionTest', name: 'productionTest',
component: () => import('@/views/dataService/serviceManage/onlineManage/productionTest.vue'), component: () => import('@/views/dataService/serviceManage/onlineManage/productionTestModal.vue'),
meta: { meta: {
title: '上线测试', title: '上线测试',
icon: '', icon: '',
......
<template> <template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
<DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect" /> <DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect"/>
<BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo"> <BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo">
<template #toolbar> <template #toolbar>
<a-scrollbar> <a-scrollbar>
<a-button <a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary" type="primary"
@click="handleDeleteIds" @click="handleQualityTaskOnline"
style="margin-right: 10px" v-if="isOnline"
>删除</a-button :disabled="getRowSelection().selectedRowKeys <= 0"
> style="margin-right: 10px">批量上线
</a-button>
<a-button
type="error"
@click="handleQualityTaskOffline"
v-if="isOffline"
style="margin-right: 10px">批量下线
</a-button>
<a-button type="primary" @click="handleBusinessLabel" style="margin-right: 10px">设置业务标签
</a-button>
<a-button type="primary" @click="handleCopyTo" style="margin-right: 10px">复制到
</a-button>
<a-button <a-button
:disabled="getRowSelection().selectedRowKeys <= 0" :disabled="getRowSelection().selectedRowKeys <= 0"
type="primary" type="primary"
style="margin-right: 10px" @click="handleDeleteIds"
>导出</a-button style="margin-right: 10px">删除
> </a-button>
<a-button type="primary" @click="handleImport" style="margin-right: 10px">导入</a-button> <a-button type="primary" @click="handleImport" style="margin-right: 10px">导入</a-button>
<a-button type="primary" @click="handleAdd" style="margin-right: 10px"
>新增文件夹</a-button
>
<a-button type="primary" @click="handleAddMainBody" style="margin-right: 10px"
>新增质量任务文件</a-button
>
<a-button <a-button
type="primary"
@click="handleQualityTaskSetting"
:disabled="getRowSelection().selectedRowKeys <= 0" :disabled="getRowSelection().selectedRowKeys <= 0"
style="margin-right: 10px"
>配置质量任务文件</a-button
>
<a-button type="primary" @click="handleAddQualityRule" style="margin-right: 10px"
>新增质量规则</a-button
>
<a-button
type="primary" type="primary"
@click="handleAlarmSetting" style="margin-right: 10px">导出
:disabled="getRowSelection().selectedRowKeys <= 0" </a-button>
style="margin-right: 10px" <a-button type="primary" @click="handleAdd" style="margin-right: 10px">新增文件夹
>配置通知告警</a-button </a-button>
> <a-button type="primary" @click="handleAddMainBody" style="margin-right: 10px">新增质量任务
</a-button>
<!-- <a-button-->
<!-- type="primary"-->
<!-- @click="handleQualityTaskSetting"-->
<!-- :disabled="getRowSelection().selectedRowKeys <= 0"-->
<!-- style="margin-right: 10px">配置质量任务文件-->
<!-- </a-button>-->
<!-- <a-button type="primary" @click="handleAddQualityRule" style="margin-right: 10px">新增质量规则-->
<!-- </a-button>-->
<!-- <a-button-->
<!-- type="primary"-->
<!-- @click="handleAlarmSetting"-->
<!-- :disabled="getRowSelection().selectedRowKeys <= 0"-->
<!-- style="margin-right: 10px">配置通知告警-->
<!-- </a-button>-->
<!-- <a-button--> <!-- <a-button-->
<!-- type="primary"--> <!-- type="primary"-->
<!-- @click="handleQualityTaskRunSetting"--> <!-- @click="handleQualityTaskRunSetting"-->
...@@ -60,9 +69,9 @@ ...@@ -60,9 +69,9 @@
<!-- :disabled="getRowSelection().selectedRowKeys <= 0"--> <!-- :disabled="getRowSelection().selectedRowKeys <= 0"-->
<!-- >查看报告</a-button--> <!-- >查看报告</a-button-->
<!-- >--> <!-- >-->
<a-button type="primary" @click="handleAddCheckRangePlus" style="margin-right: 10px" <!-- <a-button type="primary" @click="handleAddCheckRangePlus" style="margin-right: 10px">-->
>添加检查范围-增量添加</a-button <!-- 添加检查范围-增量添加-->
> <!-- </a-button>-->
<!-- <a-button type="primary" @click="handleAddCheckRangeAll">添加检查范围-全量添加</a-button> --> <!-- <a-button type="primary" @click="handleAddCheckRangeAll">添加检查范围-全量添加</a-button> -->
<!-- <a-button--> <!-- <a-button-->
<!-- type="primary"--> <!-- type="primary"-->
...@@ -71,28 +80,13 @@ ...@@ -71,28 +80,13 @@
<!-- :disabled="getRowSelection().selectedRowKeys <= 0"--> <!-- :disabled="getRowSelection().selectedRowKeys <= 0"-->
<!-- >上线</a-button--> <!-- >上线</a-button-->
<!-- >--> <!-- >-->
<a-button <!-- <a-button-->
type="primary" <!-- type="warning"-->
@click="handleQualityTaskOnline" <!-- @click="handleQualityTaskOffline"-->
v-if="isOnline" <!-- v-if="isOffline"-->
:disabled="getRowSelection().selectedRowKeys <= 0" <!-- style="margin-right: 10px"-->
style="margin-right: 10px" <!-- >下线</a-button-->
>批量上线</a-button <!-- >-->
>
<!-- <a-button-->
<!-- type="warning"-->
<!-- @click="handleQualityTaskOffline"-->
<!-- v-if="isOffline"-->
<!-- style="margin-right: 10px"-->
<!-- >下线</a-button-->
<!-- >-->
<a-button
type="error"
@click="handleQualityTaskOffline"
v-if="isOffline"
style="margin-right: 10px"
>批量下线</a-button
>
<!-- <a-button--> <!-- <a-button-->
<!-- type="primary"--> <!-- type="primary"-->
<!-- @click="handleQualityTaskService"--> <!-- @click="handleQualityTaskService"-->
...@@ -130,258 +124,286 @@ ...@@ -130,258 +124,286 @@
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
<importModal @register="registerImport" @success="handleImportSuccess" /> <importModal @register="registerImport" @success="handleImportSuccess"/>
<AddFolder @register="register" /> <AddFolder @register="register"/>
<remove-modal @register="registerRemove" /> <remove-modal @register="registerRemove"/>
<main-body-modal @register="registerMain" /> <main-body-modal @register="registerMain"/>
<quality-Run-setting-modal @register="registerRunSetting" /> <quality-Run-setting-modal @register="registerRunSetting"/>
<quality-setting-modal @register="registerSettingModal" /> <quality-setting-modal @register="registerSettingModal"/>
<new-rule-modal @register="registerNewRule" /> <new-rule-modal @register="registerNewRule"/>
<alarm-setting-modal @register="registerAlarmSettingModal" /> <alarm-setting-modal @register="registerAlarmSettingModal"/>
<quality-check-range-plus-modal @register="registerCheckRangePlusModal" /> <quality-check-range-plus-modal @register="registerCheckRangePlusModal"/>
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, 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 {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 {useRoute, onBeforeRouteLeave} from 'vue-router';
import { useRoute, onBeforeRouteLeave } from 'vue-router'; import {useFilterStore} from '@/store/modules/filterData';
import { useFilterStore } from '@/store/modules/filterData'; 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'; import MainBodyModal from '@/views/dataQuality/dataSheet/task/mainBodyModal.vue';
import MainBodyModal from '@/views/dataQuality/dataSheet/task/mainBodyModal.vue'; import QualitySettingModal from './QualityTaskSetting.vue';
import QualityRunSettingModal from './QualityTaskRunSetting.vue'; import NewRuleModal from './QualityTaskNewRule.vue';
import QualitySettingModal from './QualityTaskSetting.vue'; import AlarmSettingModal from './QualityTaskAlarmSetting.vue';
import NewRuleModal from './QualityTaskNewRule.vue'; import QualityCheckRangePlusModal from '@/views/dataQuality/dataSheet/task/checkRange/index.vue';
import AlarmSettingModal from './QualityTaskAlarmSetting.vue'; import {Modal} from 'ant-design-vue';
import QualityCheckRangePlusModal from '@/views/dataQuality/dataSheet/task/checkRange/index.vue';
import { Modal } from 'ant-design-vue';
defineOptions({ name: 'AccountManagement' });
const { createMessage, createConfirm } = useMessage();
const filterStore = useFilterStore();
const route = useRoute();
const go = useGo();
const isWhite = ref(false);
const isOnline = ref(true);
const isOffline = ref(false);
// const isRunning = ref(false);
const [register, { openModal }] = useModal();
const [registerImport, { openModal: openImportModal }] = useModal();
const [registerRemove, { openModal: openRemoveModal }] = useModal();
const [registerMain, { openModal: openMainModal }] = useModal();
const [registerNewRule, { openModal: openNewRuleModal }] = useModal();
const [registerRunSetting, { openModal: openRunSettingModal }] = useModal();
const [registerSettingModal, { openModal: openSettingModal }] = useModal();
const [registerAlarmSettingModal, { openModal: openAlarmSettingModal }] = useModal();
const [registerCheckRangePlusModal, { openModal: openCheckRangePlusModal }] = useModal();
const searchInfo = reactive<Recordable>({});
const [
registerTable,
{ reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection },
] = useTable({
title: '质量任务列表',
api: async (params) => {
console.log('tableList', tableList);
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: tableList.length,
code: '',
message: '',
data: tableList,
};
return { ...response }; defineOptions({name: 'AccountManagement'});
const {createMessage, createConfirm} = useMessage();
const filterStore = useFilterStore();
const route = useRoute();
const go = useGo();
const isWhite = ref(false);
const isOnline = ref(true);
const isOffline = ref(false);
const [register, {openModal}] = useModal();
const [registerImport, {openModal: openImportModal}] = useModal();
const [registerRemove, {openModal: openRemoveModal}] = useModal();
const [registerMain, {openModal: openMainModal}] = useModal();
const [registerNewRule, {openModal: openNewRuleModal}] = useModal();
const [registerRunSetting, {openModal: openRunSettingModal}] = useModal();
const [registerSettingModal, {openModal: openSettingModal}] = useModal();
const [registerAlarmSettingModal, {openModal: openAlarmSettingModal}] = useModal();
const [registerCheckRangePlusModal, {openModal: openCheckRangePlusModal}] = useModal();
const searchInfo = reactive<Recordable>({});
const [
registerTable,
{reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection},
] = useTable({
title: '质量任务列表',
api: async (params) => {
console.log('tableList', tableList);
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: tableList.length,
code: '',
message: '',
data: tableList,
};
return {...response};
},
rowKey: 'businessId',
rowSelection: true,
columns,
formConfig: {
labelWidth: 10,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
resetFunc: () => {
searchInfo.deptId = '';
}, },
rowKey: 'businessId', },
rowSelection: true, useSearchForm: true,
columns, showTableSetting: false,
formConfig: { bordered: true,
labelWidth: 10, handleSearchInfoFn(info) {
schemas: searchFormSchema, console.log('handleSearchInfoFn', info);
autoSubmitOnEnter: true, return info;
resetFunc: () => { },
searchInfo.deptId = ''; actionColumn: {
}, width: 170,
}, title: '操作',
useSearchForm: true, dataIndex: 'action',
showTableSetting: false, // slots: { customRender: 'action' },
bordered: true, },
handleSearchInfoFn(info) { });
console.log('handleSearchInfoFn', info);
return info; function showDetails(record) {
router.push({
path: '/mainBody/details',
});
}
/** 导入按钮*/
function handleImport() {
openImportModal(true, {});
}
/** 新建文件夹*/
function handleAdd() {
openModal(true, {});
}
function handleRemove() {
openRemoveModal(true, {});
}
/** 新建质量任务文件*/
function handleAddMainBody() {
openMainModal(true, {
isUpdate: false,
});
}
/** 新增质量规则*/
function handleAddQualityRule() {
go('/dataQuality/dataSheet/rule');
}
/** 配置通知告警*/
function handleAlarmSetting() {
openAlarmSettingModal(true, {
isUpdate: false,
});
}
/** 配置质量任务 未完成 应为弹窗 */
function handleQualityTaskSetting() {
openSettingModal(true, {});
}
/** 配置运行 正在做 应为弹窗*/
function handleQualityTaskRunSetting() {
openRunSettingModal(true, {
isRunning: false,
});
}
/** 任务运行*/
function handleQualityTaskRun() {
Modal.confirm({
title: '确认运行',
content: '是否运行选中的任务?',
onOk: () => {
createMessage.success('运行成功!');
}, },
actionColumn: { });
width: 170, }
title: '操作',
dataIndex: 'action', /** 查看报告 正在做 应为跳转到报告页面*/
// slots: { customRender: 'action' }, function handleQualityTaskRunLog() {
go('/dataQuality/dataSheet/task/viewTaskOperation', false);
}
/** 添加检查范围*/
function handleAddCheckRangePlus() {
openCheckRangePlusModal(true, {});
}
/** 上线 未完成 应为弹窗*/
function handleQualityTaskOnline() {
go('/dataQuality/dataSheet/task');
isOnline.value = false;
isOffline.value = true;
}
/** 下线 未完成 应为弹窗*/
function handleQualityTaskOffline() {
go('/dataQuality/dataSheet/task');
isOnline.value = true;
isOffline.value = false;
}
/** 设置业务标签 */
function handleBusinessLabel() {
}
/** 复制到 */
function handleCopyTo() {
}
/** 跳转运维 未完成 应为跳转到运维界面*/
function handleQualityTaskService() {
go('/dataQuality/dataSheet/task/taskOperation');
}
/** 编辑按钮*/
function handleEdit(record: Recordable) {
openMainModal(true, {
record,
isUpdate: true,
});
}
function handleDeleteIds() {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '确认批量删除选中数据吗?',
onOk() {
createMessage.success('批量删除成功!');
}, },
}); });
}
function showDetails(record) { /** 重置密码弹窗确定按钮*/
router.push({ /** 删除按钮*/
path: '/mainBody/details', function handleDelete(record: Recordable) {
}); createMessage.success('删除成功!');
} reload();
/** 导入按钮*/ }
function handleImport() {
openImportModal(true, {});
}
/** 新建文件夹*/
function handleAdd() {
openModal(true, {});
}
function handleRemove() {
openRemoveModal(true, {});
}
/** 新建质量任务文件*/
function handleAddMainBody() {
openMainModal(true, {
isUpdate: false,
});
}
/** 新增质量规则*/
function handleAddQualityRule() {
go('/dataQuality/dataSheet/rule');
}
/** 配置通知告警*/
function handleAlarmSetting() {
openAlarmSettingModal(true, {
isUpdate: false,
});
}
/** 配置质量任务 未完成 应为弹窗 */
function handleQualityTaskSetting() {
openSettingModal(true, {});
}
/** 配置运行 正在做 应为弹窗*/
function handleQualityTaskRunSetting() {
openRunSettingModal(true, {
isRunning: false,
});
}
/** 任务运行*/
function handleQualityTaskRun() {
Modal.confirm({
title: '确认运行',
content: '是否运行选中的任务?',
onOk: () => {
createMessage.success('运行成功!');
},
});
}
/** 查看报告 正在做 应为跳转到报告页面*/
function handleQualityTaskRunLog() {
go('/dataQuality/dataSheet/task/viewTaskOperation', false);
}
/** 添加检查范围*/
function handleAddCheckRangePlus() {
openCheckRangePlusModal(true, {});
}
/** 上线 未完成 应为弹窗*/
function handleQualityTaskOnline() {
go('/dataQuality/dataSheet/task');
isOnline.value = false;
isOffline.value = true;
}
/** 下线 未完成 应为弹窗*/
function handleQualityTaskOffline() {
go('/dataQuality/dataSheet/task');
isOnline.value = true;
isOffline.value = false;
}
/** 跳转运维 未完成 应为跳转到运维界面*/
function handleQualityTaskService() {
go('/dataQuality/dataSheet/task/taskOperation');
}
/** 编辑按钮*/ /** 导出按钮*/
function handleEdit(record: Recordable) { async function handleExport() {
openMainModal(true, { }
record,
isUpdate: true, /** 导入成功*/
}); function handleImportSuccess() {
} reload();
function handleDeleteIds() { }
createConfirm({
iconType: 'warning', /** 新增/编辑成功*/
title: '确认删除', function handleSuccess({isUpdate, values}) {
content: '确认批量删除选中数据吗?', if (isUpdate) {
onOk() { // 演示不刷新表格直接更新内部数据。
createMessage.success('批量删除成功!'); // 注意:updateTableDataRecord要求表格的rowKey属性为string并且存在于每一行的record的keys中
}, const result = updateTableDataRecord(values.id, values);
}); console.log(result);
}
/** 重置密码弹窗确定按钮*/
/** 删除按钮*/
function handleDelete(record: Recordable) {
createMessage.success('删除成功!');
reload();
}
/** 导出按钮*/
async function handleExport() {}
/** 导入成功*/
function handleImportSuccess() {
reload(); reload();
} } else {
/** 新增/编辑成功*/
function handleSuccess({ isUpdate, values }) {
if (isUpdate) {
// 演示不刷新表格直接更新内部数据。
// 注意:updateTableDataRecord要求表格的rowKey属性为string并且存在于每一行的record的keys中
const result = updateTableDataRecord(values.id, values);
console.log(result);
reload();
} else {
reload();
}
}
/** 部门树的select*/
function handleSelect(deptId = '') {
searchInfo.deptId = deptId;
reload(); reload();
} }
}
function handleView(record: Recordable) { /** 部门树的select*/
go('/system/account_detail/' + record.id); function handleSelect(deptId = '') {
} searchInfo.deptId = deptId;
onMounted(() => { reload();
const path = route.path; }
if (filterStore.getSearchParams[path]) {
if (JSON.parse(filterStore.getSearchParams[path] !== {})) { function handleView(record: Recordable) {
const params = JSON.parse(filterStore.getSearchParams[path]); go('/system/account_detail/' + record.id);
console.log('11111111111111111111111111111', params); }
getForm().setFieldsValue({
page: params.page, onMounted(() => {
pageSize: params.pageSize, const path = route.path;
username: params.username, if (filterStore.getSearchParams[path]) {
flag: params.flag, if (JSON.parse(filterStore.getSearchParams[path] !== {})) {
}); const params = JSON.parse(filterStore.getSearchParams[path]);
searchInfo.deptId = params.deptId; console.log('11111111111111111111111111111', params);
} getForm().setFieldsValue({
page: params.page,
pageSize: params.pageSize,
username: params.username,
flag: params.flag,
});
searchInfo.deptId = params.deptId;
} }
}
});
onBeforeRouteLeave((to, from, next) => {
const params = Object.assign({}, getSearchInfo(), getForm().getFieldsValue());
console.log('path', from.path);
console.log('params', params);
filterStore.setSearchParams({
path: from.path,
param: {
...params,
},
}); });
onBeforeRouteLeave((to, from, next) => { next(); // 允许导航
const params = Object.assign({}, getSearchInfo(), getForm().getFieldsValue()); });
console.log('path', from.path);
console.log('params', params);
filterStore.setSearchParams({
path: from.path,
param: {
...params,
},
});
next(); // 允许导航
});
</script> </script>
...@@ -29,13 +29,7 @@ export const deptMap = (() => { ...@@ -29,13 +29,7 @@ export const deptMap = (() => {
}, {}); }, {});
})(); })();
export const columns: BasicColumn[] = [ export const columns: BasicColumn[any] = [
// {
// title: '质量规则',
// dataIndex: 'name',
// width: 120,
// slots: { customRender: 'name' },
// },
{ {
title: '质量规则', title: '质量规则',
dataIndex: 'qualityRule', dataIndex: 'qualityRule',
...@@ -228,11 +222,78 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -228,11 +222,78 @@ export const searchFormSchema: FormSchema[] = [
field: 'name', field: 'name',
label: ' ', label: ' ',
component: 'Input', component: 'Input',
colProps: { span: 8 }, colProps: { span: 4 },
componentProps: { componentProps: {
placeholder: '输入关键字搜索', placeholder: '输入关键字搜索',
}, },
}, },
{
field: 'testMode',
label: ' ',
component: 'Select',
componentProps: {
placeholder: '检查方式',
options: [
{ label: '全量', value: '1' },
{ label: '增量', value: '2' },
],
},
colProps: { span: 3 },
},
{
field: 'ruleGroup',
label: ' ',
component: 'Select',
componentProps: {
placeholder: '规则组',
options: [
{ label: 'admin_个人工作区', value: '1' },
{ label: '共享工作区', value: '2' },
{ label: '商城工作区', value: '3' },
{ label: '指标工作区', value: '4' },
],
},
colProps: { span: 3 },
},
{
field: 'releaseStatus',
label: ' ',
component: 'Select',
componentProps: {
placeholder: '发布状态',
options: [
{ label: '已上线', value: '1' },
{ label: '未上线', value: '2' },
],
},
colProps: { span: 3 },
},
{
field: 'dateRange',
label: ' ',
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD', // 显示的日期格式
valueFormat: 'YYYY-MM-DD', // 提交的日期格式
placeholder: ['开始时间', '结束时间'], // 占位符
style: { width: '100%' }, // 控制宽度
},
colProps: { span: 5 },
},
{
field: 'businessLabel',
label: ' ',
component: 'Select',
componentProps: {
placeholder: '业务标签',
options: [
{ label: '生产', value: '1' },
{ label: '质量', value: '2' },
{ label: '人力', value: '3' },
],
},
colProps: { span: 3 },
},
// { // {
// field: 'flag', // field: 'flag',
// label: ' ', // label: ' ',
......
<template> <template>
<PageWrapper :title="title" :class="prefixCls" dense contentBackground @back="goBack"> <PageWrapper dense contentBackground @back="goBack">
<template #headerContent> <template #title>
<span>API/共享工作区/tuomin_demo</span> <div style="display: flex; justify-content: space-between">
<div class="flex">
<Icon icon="ant-design:api-outlined" :size="30" style="color:#0960BD;"/>
<div style="margin-left: 10px">
<span>tuomin_demo</span>
<h5 style="color: #BFBFBF">API/共享工作区/tuomin_demo</h5>
</div>
</div>
</div>
</template> </template>
<div :class="`${prefixCls}__container`"> <div style="width: 100%; display: flex;border-top: 2px solid #EBEFF6;">
<div :class="`${prefixCls}__left`"> <div style="width: 20%;padding: 0 20px 0 40px;border-right: 2px solid #EBEFF6;">
<div :class="`${prefixCls}__left-one`"> <div class="left-one">
<Icon :class="`${prefixCls}__left-icon`" icon="ant-design:down-outlined" :size="16"/> <Icon class="left-icon" icon="ant-design:down-outlined" :size="16"/>
<p :class="`${prefixCls}__left-title`"> <p class="left-title">
血缘对象</p> 血缘对象</p>
</div> </div>
<BasicForm <BasicForm
...@@ -15,25 +23,30 @@ ...@@ -15,25 +23,30 @@
:schemas="modelFormSchema" :schemas="modelFormSchema"
:showActionButtonGroup="false" :showActionButtonGroup="false"
/> />
<div> <div style="width: 100%;margin: -10px 0;">
<List :class="`${prefixCls}__List`"> <List style="height: auto">
<template v-for="item in modelData" :key="item.id"> <template v-for="item in modelData" :key="item.id">
<List.Item> <List.Item
<Card :class="`${prefixCls}__List-Card`"> style="cursor: pointer"
<div style="display: flex;"> :class="selectId === item.id ? 'selectionClass' : null"
<Icon @click="selectItem(item)"
v-if="item.id" >
:size="22" <List.Item.Meta>
:icon="item.icon" <template #title>
:color="item.color" <div style="width: 100%;display: flex;align-items: center">
/> <Icon
<div :class="`${prefixCls}__List-memberContainer`"> v-if="item.id"
<h3>{{ item.member }}</h3> :size="24"
<h5 :class="`${prefixCls}__List-memberContainer-smallT`"> :icon="item.icon"
API/共享工作区/tuomin_demo</h5> :color="item.color"
/>
<div style="margin-left:15px">
<span>{{ item.member }}</span>
<h6 style="color: #BFBFBF;width: 100%">inceptor1/cemo/employee</h6>
</div>
</div> </div>
</div> </template>
</Card> </List.Item.Meta>
</List.Item> </List.Item>
</template> </template>
</List> </List>
...@@ -45,68 +58,87 @@ ...@@ -45,68 +58,87 @@
</template> </template>
</BasicTable>--> </BasicTable>-->
</div> </div>
<div :class="`${prefixCls}__right`"> <div style="width: 80%">
<div style="display: flex;"> <div style="display: flex;">
<div style="width: 50%;margin-top: 15px;"> <div style="width: 50%;margin-left: 15px">
<Card style=" height: 80px; background-color: #F5F8FC;"> <div style=" height: 80px; background-color: #F5F8FC;margin:15px 5px 0 0;padding: 20px">
<div style="display: flex;"> <div style="display: flex;">
<Icon icon="ant-design:api-filled" :size="24" style="color:#5A70FB;"/> <div class="flex">
<div :class="`${prefixCls}__List-memberContainer`"> <Icon icon="ant-design:api-outlined" :size="28" style="color:#5A70FB;"/>
<h3>tuomin_demo</h3> <div style="margin-left: 10px">
<h5 :class="`${prefixCls}__List-memberContainer-smallT`"> <h3>tuomin_demo</h3>
API/共享工作区/tuomin_demo</h5> <h5 style="color: #BFBFBF">API/共享工作区/tuomin_demo</h5>
</div>
</div> </div>
</div> </div>
</Card> </div>
<BasicTable @register="registerTable1" style="margin-top: 15px"/> <BasicTable @register="registerTable1" style="margin-top: 10px">
<template #name="{ text, record }">
<Icon icon="ant-design:insert-row-above-outlined" :size="18" style="color:#0883D8;"/>
<a style="color: black">{{ text }}</a>
</template>
</BasicTable>
</div> </div>
<div style="width: 50%;margin-top: 15px"> <div style="width: 50%;">
<Card style=" height: 80px; background-color: #FEEBEB;"> <div style=" height: 80px; background-color: #FEEBEB;margin:15px 5px 0 0;padding: 20px">
<div style="display: flex;"> <div style="display: flex;">
<Icon icon="ant-design:insert-row-above-outlined" :size="24" <div class="flex">
style="color:#5A70FB;"/> <Icon icon="ant-design:insert-row-above-outlined" :size="28" style="color:#5A70FB"/>
<div :class="`${prefixCls}__List-memberContainer`"> <div style="margin-left: 10px">
<h3>employee</h3> <h3>{{ member }}</h3>
<h5 :class="`${prefixCls}__List-memberContainer-smallT`"> <h5 style="color: #BFBFBF">inceptor1/cemo/employee</h5>
API/共享工作区/tuomin_demo</h5> </div>
</div> </div>
</div> </div>
</Card> </div>
<BasicTable @register="registerTable2" style="margin-top: 15px"/> <BasicTable @register="registerTable2" style="margin-top: 10px">
<template #name="{ text, record }">
<Icon icon="ant-design:insert-row-above-outlined" :size="18" style="color:#0883D8;"/>
<a style="color: black">{{ text }}</a>
</template>
</BasicTable>
</div> </div>
</div> </div>
<Divider/> <Divider/>
<div> <div style="margin-left: 35px">
<div> <div>
<div :class="`${prefixCls}__List-Card`"> <div style="display: flex; justify-content: space-between">
<div style="display: flex;"> <div class="flex">
<Icon icon="ant-design:api-filled" style="color: #5A70FB;" :size="22"/> <Icon icon="ant-design:api-outlined" :size="30" style="color:#5A70FB;"/>
<div :class="`${prefixCls}__List-memberContainer`"style="margin-left: 20px"> <div style="margin-left: 10px">
<h3>tuomin_demo</h3> <h3>tuomin_demo</h3>
<h5 :class="`${prefixCls}__List-memberContainer-smallT`"> <h5 style="color: #BFBFBF">API/共享工作区/tuomin_demo</h5>
API/共享工作区/tuomin_demo</h5> </div>
</div>
</div> </div>
</div> </div>
<div> <div style="margin-top: 15px">
<Description <Description
size="small" size="small"
:bordered="false" :bordered="false"
:column="2" :column="2"
:data="apiDetailData" :data="apiDetailData"
:schema="apiDetailSchema" :schema="apiDetailSchema"
/> :labelStyle="{
width:'120px',
}"
:contentStyle="{
marginLeft:'20px',
fontSize:'16px',}"
/>
</div> </div>
</div> </div>
<Divider/> <Divider/>
<h3>请求参数</h3> <div>
<BasicTable @register="registerTable3"/> <h3>请求参数</h3>
<h3>分页参数</h3> <BasicTable @register="registerTable3"/>
<BasicTable @register="registerTable4"/> </div>
<div>
<h3>分页参数</h3>
<BasicTable @register="registerTable4"/>
</div>
</div> </div>
</div> </div>
</div> </div>
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -144,10 +176,13 @@ import { ...@@ -144,10 +176,13 @@ import {
import {Description} from "@/components/Description"; import {Description} from "@/components/Description";
import {Card, Divider, List, Tag} from "ant-design-vue"; import {Card, Divider, List, Tag} from "ant-design-vue";
import {BasicForm} from "@/components/Form"; import {BasicForm} from "@/components/Form";
import {BranchesOutlined} from "@ant-design/icons-vue";
import {workAreaList} from "@/views/parameterConfiguration/configData";
const title = ref(); const title = ref();
const selectId = ref(1);
const route = useRoute(); const route = useRoute();
const prefixCls = 'list-search'; const member = ref(modelData[0].member);
let tableData = ref(tableList); let tableData = ref(tableList);
const [registerTable, { const [registerTable, {
reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection
...@@ -226,6 +261,16 @@ function goBack() { ...@@ -226,6 +261,16 @@ function goBack() {
router.back(); router.back();
} }
function selectItem(item) {
selectId.value = item.id;
member.value = item.member;
}
function handleChange(item) {
selectId.value = item.id;
member.value = item.member;
}
//初始化表单 //初始化表单
/*const [registerForm, {resetFields }] = useForm({ /*const [registerForm, {resetFields }] = useForm({
labelWidth: 100, labelWidth: 100,
...@@ -248,68 +293,51 @@ onMounted(() => { ...@@ -248,68 +293,51 @@ onMounted(() => {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.selectionClass {
background-color: #FEEBEB;
border: 1px solid #9E2927;
border-radius: 10px;
}
.list-search { //左侧样式
margin: -16px;
&__container {
display: flex;
width: 100%;
border-top: 1px solid #EBEFF6; /* 只给顶部设置边框 */
}
//左侧样式
&__left {
width: 20%;
padding: 0 20px;
border-right: 2px solid #EBEFF6; /* 只给右边设置边框 */
&-one { .left-one {
display: flex; display: flex;
margin-bottom: 15px margin-bottom: 15px
} }
&-icon { .left-icon {
margin: 15px 0 0 0 margin: 15px 0 0 0
} }
&-title { .left-title {
font-size: 15px; font-size: 15px;
margin: 15px 0 0 0; margin: 15px 0 0 0;
font-weight: 550 font-weight: 550
} }
}
//左侧列表下划线去除 //左侧列表下划线去除
:where(.css-dev-only-do-not-override-7oeufo).ant-list-split .ant-list-item { :where(.css-dev-only-do-not-override-7oeufo).ant-list-split .ant-list-item {
border-block-end: none; border-block-end: none;
} }
&__List {
margin-top: -20px;
margin: 0 -24px;
&-Card { .List-memberContainer {
width: 100%; width: 100%;
height: 80px; margin-left: 10px;
} margin-top: -15px;
}
&-memberContainer { .List-smallT {
width: 100%; color: #889097;
margin-left: 10px; width: 100%;
margin-top: -15px; }
&-smallT {
color: #889097;
width: 100%;
}
}
}
//右侧样式 //右侧样式
&__right { .right {
width: 80%; width: 80%;
padding: 0 0 0 20px; padding: 0 0 0 20px;
}
} }
</style> </style>
<template> <template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
<!-- <template #headerContent>
<dicv style="display:flex;">
<Icon icon="ant-design:folder-open-outlined" :size="24" :color="'#1091FE'"/>
<h2 style="margin-left: 15px">API</h2>
</dicv>
<div type="primary" class="save-button" >
<Icon icon="ant-design:bug-outlined" :size="24" :color="'#1091FE'"/>
<p>测试</p>
</div>
<div type="primary" class="save-button1">
<Icon icon="ant-design:inbox-outlined" :size="24" :color="'#1091FE'"/>
<p>保存</p>
</div>
</template>-->
<BasicTable @register="registerTable" :rowSelection="rowSelection" :searchInfo="searchInfo"> <BasicTable @register="registerTable" :rowSelection="rowSelection" :searchInfo="searchInfo">
<template #toolbar> <template #toolbar>
<a-button type="primary" <a-button type="primary"
...@@ -43,9 +28,9 @@ ...@@ -43,9 +28,9 @@
}, },
{ {
icon:'ant-design:fund-projection-screen-outlined', icon:'ant-design:fund-projection-screen-outlined',
tooltip:'', tooltip:'服务监控',
/*label: '详情',*/ /*label: '详情',*/
onClick: other.bind(null, record), onClick: monitorInfo.bind(null, record),
ifShow: () => { ifShow: () => {
return record.flag !== '开发中'; return record.flag !== '开发中';
}, },
...@@ -137,6 +122,7 @@ ...@@ -137,6 +122,7 @@
</template> </template>
</BasicTable> </BasicTable>
<!-- <sensitiveTypeModal @register="registerModal" @success="handleSuccess"/>--> <!-- <sensitiveTypeModal @register="registerModal" @success="handleSuccess"/>-->
<ProductionDrawer @register="productionDrawer" />
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -150,11 +136,15 @@ import {tableList} from "./mock"; ...@@ -150,11 +136,15 @@ import {tableList} from "./mock";
import {useRoute, onBeforeRouteLeave} from 'vue-router'; import {useRoute, onBeforeRouteLeave} from 'vue-router';
import {router} from '@/router'; import {router} from '@/router';
import Icon from "@/components/Icon/Icon.vue"; import Icon from "@/components/Icon/Icon.vue";
import ProductionDrawer from "./productionDrawer.vue";
import {useDrawer} from "@/components/Drawer";
defineOptions({name: 'safetyLevelManage'}); defineOptions({name: 'safetyLevelManage'});
const {createMessage, createConfirm} = useMessage(); const {createMessage, createConfirm} = useMessage();
const route = useRoute(); const route = useRoute();
const searchInfo = reactive<Recordable>({}); const searchInfo = reactive<Recordable>({});
const [productionDrawer, { openDrawer: openProductionDrawer }] = useDrawer({
});
const [registerTable, { const [registerTable, {
reload, reload,
updateTableDataRecord, updateTableDataRecord,
...@@ -178,6 +168,7 @@ const [registerTable, { ...@@ -178,6 +168,7 @@ const [registerTable, {
}, },
rowKey: 'businessId', rowKey: 'businessId',
rowSelection: true, rowSelection: true,
showIndexColumn:false,
columns, columns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
...@@ -253,8 +244,13 @@ function Settings() { ...@@ -253,8 +244,13 @@ function Settings() {
} }
/**按钮*/ /**按钮*/
function other() { function monitorInfo(record) {
router.push({
path: '/dataService/serviceMonitor/monitorInfo',
query: {
id: record.businessId,
},
});
} }
/**api详情按钮*/ /**api详情按钮*/
function apiDetail() { function apiDetail() {
...@@ -267,10 +263,9 @@ function handleOffline(record) { ...@@ -267,10 +263,9 @@ function handleOffline(record) {
} }
/**上线按钮*/ /**上线按钮*/
function handleOnline() { function handleOnline() {
router.push({ openProductionDrawer(true, {
path: '/dataService/serviceManage/onlineManage/productionData', data: 'content',
query: { info: 'Info',
},
}); });
} }
/**创建商城API按钮*/ /**创建商城API按钮*/
......
...@@ -35,7 +35,7 @@ export const tableList: any[] = [ ...@@ -35,7 +35,7 @@ export const tableList: any[] = [
owner: 'admin', owner: 'admin',
path: 'API/共享工作区/tuomin_demo', path: 'API/共享工作区/tuomin_demo',
}, },
{ /* {
businessId: 4, businessId: 4,
name: 'tuo_api', name: 'tuo_api',
flag: '开发中', flag: '开发中',
...@@ -58,7 +58,7 @@ export const tableList: any[] = [ ...@@ -58,7 +58,7 @@ export const tableList: any[] = [
updateDate: '', updateDate: '',
owner: '', owner: '',
path: 'API/共享工作区/tuomin_demo', path: 'API/共享工作区/tuomin_demo',
}, },*/
]; ];
/**上线设置-复合框数据*/ /**上线设置-复合框数据*/
export const routeList:any[] =[ export const routeList:any[] =[
......
/*import { getAllRoleList } from '@/api/system/role/role';*/ /*import { getAllRoleList } from '@/api/system/role/role';*/
import { BasicColumn, FormSchema } from '@/components/Table'; import { BasicColumn, FormSchema } from '@/components/Table';
import {DescItem} from "@/components/Description"; import {DescItem} from "@/components/Description";
import {InputProps} from "ant-design-vue";
// 引入开关组件 // 引入开关组件
/*type CheckedType = boolean | string | number;*/ /*type CheckedType = boolean | string | number;*/
...@@ -88,6 +89,7 @@ export const Table1Schema: BasicColumn[] = [ ...@@ -88,6 +89,7 @@ export const Table1Schema: BasicColumn[] = [
title: '字段名称', title: '字段名称',
width: 150, width: 150,
dataIndex: 'name', dataIndex: 'name',
slots: { customRender: 'name' },
}, },
{ {
title: '敏感状态', title: '敏感状态',
...@@ -110,6 +112,7 @@ export const Table2Schema: BasicColumn[] = [ ...@@ -110,6 +112,7 @@ export const Table2Schema: BasicColumn[] = [
title: '字段名称', title: '字段名称',
width: 150, width: 150,
dataIndex: 'name', dataIndex: 'name',
slots: { customRender: 'name' },
}, },
{ {
title: '敏感状态', title: '敏感状态',
...@@ -221,7 +224,10 @@ export const schemas: FormSchema[] = [ ...@@ -221,7 +224,10 @@ export const schemas: FormSchema[] = [
component: 'BasicTitle', component: 'BasicTitle',
label: '路由转发配置', label: '路由转发配置',
componentProps: { componentProps: {
// line: true, style: {
fontsize: 16,
fontWeight: 'bold',
},
span: true, span: true,
}, },
colProps: { colProps: {
...@@ -339,6 +345,7 @@ export const schemas: FormSchema[] = [ ...@@ -339,6 +345,7 @@ export const schemas: FormSchema[] = [
field: 'accessMethod', field: 'accessMethod',
component: 'RadioGroup', component: 'RadioGroup',
label: '访问方式', label: '访问方式',
defaultValue:'2',
colProps: { colProps: {
span: 20, span: 20,
}, },
...@@ -359,12 +366,12 @@ export const schemas: FormSchema[] = [ ...@@ -359,12 +366,12 @@ export const schemas: FormSchema[] = [
{ {
field: 'dynamicRouting', field: 'dynamicRouting',
fields: ['dynamic'], fields: ['dynamic'],
component: 'Input',
label: '动态路由', label: '动态路由',
colProps: { colProps: {
span: 20, span: 20,
}, },
colSlot: 'dynamicRouting' slot: 'dynamicRouting',
required: true,
}, },
{ {
field: 'businessGrouping', field: 'businessGrouping',
...@@ -403,7 +410,10 @@ export const schemas: FormSchema[] = [ ...@@ -403,7 +410,10 @@ export const schemas: FormSchema[] = [
component: 'BasicTitle', component: 'BasicTitle',
label: '安全配置', label: '安全配置',
componentProps: { componentProps: {
// line: true, style: {
fontsize: 16,
fontWeight: 'bold',
},
span: true, span: true,
}, },
colProps: { colProps: {
...@@ -414,6 +424,7 @@ export const schemas: FormSchema[] = [ ...@@ -414,6 +424,7 @@ export const schemas: FormSchema[] = [
field: 'enableAllLogs', field: 'enableAllLogs',
component: 'RadioGroup', component: 'RadioGroup',
label: '开启所有日志', label: '开启所有日志',
defaultValue:'2',
colProps: { colProps: {
span: 20, span: 20,
}, },
...@@ -456,6 +467,9 @@ export const schemas: FormSchema[] = [ ...@@ -456,6 +467,9 @@ export const schemas: FormSchema[] = [
field: 'cronExpression', field: 'cronExpression',
component: 'Input', component: 'Input',
label: 'Cron表达式', label: 'Cron表达式',
componentProps: {
placeholder: '0 0 0 ? * * *',
} as InputProps,
colProps: { colProps: {
span: 20, span: 20,
}, },
...@@ -560,6 +574,7 @@ export const schemas: FormSchema[] = [ ...@@ -560,6 +574,7 @@ export const schemas: FormSchema[] = [
field: 'associatedList', field: 'associatedList',
component: 'RadioGroup', component: 'RadioGroup',
label: '关联名单', label: '关联名单',
defaultValue:'2',
colProps: { colProps: {
span: 23, span: 23,
}, },
......
<template> <template>
<PageWrapper :title="title" contentBackground @back="goBack" dense fixedHeight <BasicDrawer v-bind="$attrs" @register="register" :showDetailBack="false" width="50%">
contentClass="flex"> <template #title>
<template #headerContent> <div style="display: flex; justify-content: space-between">
<span>API / 验收 / SQL API</span> <div class="flex">
<div type="primary" class="save-button" @click="handleTest"> <Icon icon="ant-design:setting-outlined" :size="30" style="color:#0960BD;"/>
<Icon icon="ant-design:bug-outlined" :size="24" :color="'#1091FE'"/> <div style="margin-left: 10px">
<p>测试</p> <span>上线设置</span>
</div> <h4 style="color: #BFBFBF">API / 验收 / SAL API</h4>
<div type="primary" class="save-button1" @click="handleSave"> </div>
<Icon icon="ant-design:inbox-outlined" :size="24" :color="'#1091FE'"/> </div>
<p>保存</p> <div class="flex" style="gap: 15px">
<a-button type="link" @click="handleTest">
<Icon icon="ant-design:bug-outlined" :size="24"/>
<p style="color: black">调试</p>
</a-button>
<a-button type="link" @click="handleSave">
<Icon icon="ant-design:inbox-outlined" :size="24"/>
<p style="color: black">保存</p>
</a-button>
</div>
</div> </div>
</template> </template>
<div> <div>
<BasicForm @register="register" @submit="handleSubmit" style="padding:15px 0 0 40px"> <BasicForm @register="registerForm" style="padding:0 0 0 40px">
<template #dynamicRouting="{ field,model, }"> <template #dynamicRouting="{ field,model, }">
<FormItem :name="field" label="动态路由" <div>
:rules="[{ required: true, message: '请选择动态路由',type: 'string' }]" <Select style="width: 30%" placeholder="请选择"
style="margin-left: 45px"> v-model:value="model['dynamic']" :options="routeList"/>
<Input.Group> <Input style="width: 70%"
<FormItemRest> v-model:value="model[field]" placeholder="请输入"/>
<Select style="width: 380px" placeholder="请选择" </div>
v-model:value="model['dynamic']" :options="routeList"/>
</FormItemRest>
<FormItemRest>
<Input style="width: calc(100% - 380px); margin-left: -1px;"
v-model:value="model[field]" placeholder="请输入"/>
</FormItemRest>
</Input.Group>
</FormItem>
</template> </template>
<template #expirationDuration="{ field,model, }"> <template #expirationDuration="{ field,model, }">
<FormItem :name="field" label="有效期持续时间" <FormItem :name="field" label="有效期持续时间"
...@@ -62,7 +63,8 @@ ...@@ -62,7 +63,8 @@
</template> </template>
</BasicForm> </BasicForm>
</div> </div>
</PageWrapper> </BasicDrawer>
<ProductionTestModal @register="productionTestModal" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
/**上线设置页面*/ /**上线设置页面*/
...@@ -77,53 +79,45 @@ import {BasicForm, FormSchema, useForm} from "@/components/Form"; ...@@ -77,53 +79,45 @@ import {BasicForm, FormSchema, useForm} from "@/components/Form";
import {useMessage} from "@/hooks/web/useMessage"; import {useMessage} from "@/hooks/web/useMessage";
import {FormItem, FormItemRest} from "ant-design-vue"; import {FormItem, FormItemRest} from "ant-design-vue";
import {Select, Input} from "ant-design-vue"; import {Select, Input} from "ant-design-vue";
import {BasicDrawer, useDrawerInner} from "@/components/Drawer";
import ProductionTestModal from "./productionTestModal.vue";
import {useModal} from "@/components/Modal";
const [productionTestModal, { openModal: openProductionTestModal }] = useModal();
const title = ref(); const title = ref();
const route = useRoute(); const route = useRoute();
/**上线设置表单配置*/ /**上线设置表单配置*/
const {createMessage} = useMessage(); const {createMessage} = useMessage();
const [register, {getFieldsValue, resetFields, setFieldsValue}] = const [registerForm, {getFieldsValue, resetFields, setFieldsValue}] =
useForm({ useForm({
labelWidth: 120, labelWidth: 120,
schemas, schemas,
showActionButtonGroup: false,
actionColOptions: { actionColOptions: {
span: 24, span: 24,
}, },
}); });
const [register,{closeDrawer}] = useDrawerInner((data) => {
/**返回上一级*/ // 方式1
function goBack() { setFieldsValue({
router.back(); field2: data.data,
} field1: data.info,
});
});
/**测试按钮*/ /**测试按钮*/
function handleTest() { function handleTest() {
router.push({ openProductionTestModal(true, {
path: '/dataService/serviceManage/onlineManage/productionTest', isUpdate: false,
query: {},
}); });
} }
/**保存按钮*/ /**保存按钮*/
function handleSave() { function handleSave() {
router.back(); closeDrawer();
} createMessage.success('保存成功!!');
/**表单按钮*/
function handleSubmit(values: any) {
createMessage.success('click search,values:' + JSON.stringify(values));
} }
/**接入数据*/
onMounted(() => {
/* const data = tableList.filter((item) => item.businessId === route.query.id);*/
// formParams.value = data[0];
/*console.log('数据:', data)*/
title.value = '上线设置';
/* Object.assign(formParams, data[0]); // 使用 Object.assign 赋值*/
/* resetFields();*/
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.modal_top { .modal_top {
......
<template> <template>
<PageWrapper :title="title" contentBackground @back="goBack" dense fixedHeight > <BasicModal
<template #headerContent> width="60%"
<span>API / 验收 / SQL API</span> v-bind="$attrs"
@register="registerModal"
@ok="handleSubmit"
>
<template #title>
<div style="display: flex; justify-content: space-between">
<div class="flex">
<Icon icon="ant-design:bug-outlined" :size="30" style="color:#0960BD;"/>
<div style="margin-left: 10px">
<span>测试</span>
<h4 style="color: #BFBFBF">API / 验收 / SAL API</h4>
</div>
</div>
</div>
</template> </template>
<BasicTable @register="registerTable" title="请求参数"/> <BasicTable @register="registerTable" title="请求参数"/>
<div style="padding: 15px"> <div style="padding: 15px">
<a-button type="primary" @click="testButton"><Icon icon="ant-design:play-circle-outlined"></Icon>测试</a-button> <a-button type="primary" @click="testButton"><Icon icon="ant-design:play-circle-outlined"></Icon>测试</a-button>
<div style="margin: 15px 0;font-weight: bold;font-size: 16px">请求报文</div> <div style="margin: 15px 0;font-weight: bold;font-size: 16px">请求报文</div>
<CodeEditor v-model:value="value1" :mode="modeValue" style="margin-bottom: 20px"/> <CodeEditor v-model:value="value1" :mode="modeValue" style="margin-bottom: 20px"/>
<div style="margin-bottom: 15px;font-weight: bold;font-size: 16px">返回结果源码</div> <div style="margin-bottom: 15px;font-weight: bold;font-size: 16px">返回结果源码</div>
<CodeEditor v-model:value="value2" :mode="modeValue" /> <CodeEditor v-model:value="value2" :mode="modeValue" />
</div> </div>
</BasicModal>
</PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
/**上线设置页面*/ /**上线设置页面*/
...@@ -29,9 +41,17 @@ import BasicTable from "@/components/Table/src/BasicTable.vue"; ...@@ -29,9 +41,17 @@ import BasicTable from "@/components/Table/src/BasicTable.vue";
import {testTableSchema} from "@/views/dataService/serviceManage/onlineManage/onlineManage.data"; import {testTableSchema} from "@/views/dataService/serviceManage/onlineManage/onlineManage.data";
import {useTable} from "@/components/Table"; import {useTable} from "@/components/Table";
import {CodeEditor, MODE} from "@/components/CodeEditor"; import {CodeEditor, MODE} from "@/components/CodeEditor";
import {BasicModal, useModal, useModalInner} from '@/components/Modal';
const title = ref(); const title = ref();
const route = useRoute(); const route = useRoute();
//初始化弹框
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
setModalProps({
confirmLoading: false,
});
});
/**右-表(右上)*/ /**右-表(右上)*/
const [registerTable] = useTable({ const [registerTable] = useTable({
dataSource: testTableData, dataSource: testTableData,
...@@ -82,15 +102,10 @@ function testButton() { ...@@ -82,15 +102,10 @@ function testButton() {
function handleSave() { function handleSave() {
router.back(); router.back();
} }
/**接入数据*/ /**确定按钮*/
onMounted(() => { async function handleSubmit() {
const data = tableList.filter((item) => item.businessId === route.query.id); closeModal();
// formParams.value = data[0]; }
console.log('数据:', data)
title.value = '测试';
/* Object.assign(formParams, data[0]); // 使用 Object.assign 赋值*/
/* resetFields();*/
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
import { FormSchema } from '@/components/Form'; import { FormSchema } from '@/components/Form';
import {BasicColumn} from "@/components/Table"; import { BasicColumn } from '@/components/Table';
export const detailFormSchema: FormSchema[] = [ export const detailFormSchema: FormSchema[] = [
{ {
...@@ -47,9 +47,10 @@ export const detailFormSchema: FormSchema[] = [ ...@@ -47,9 +47,10 @@ export const detailFormSchema: FormSchema[] = [
colProps: { lg: 18 }, colProps: { lg: 18 },
}, },
{ {
field: 'type', field: 'selectType',
label: '规则选择方式', label: '规则选择方式',
slot: 'type', defaultValue: '数据标准',
slot: 'selectType',
componentProps: { componentProps: {
options: [ options: [
{ {
...@@ -282,35 +283,35 @@ export const dataStandardColumns: BasicColumn[any] = [ ...@@ -282,35 +283,35 @@ export const dataStandardColumns: BasicColumn[any] = [
dataIndex: 'workGroup', dataIndex: 'workGroup',
width: 150, width: 150,
}, },
] ];
// 添加数据标准 弹窗列表数据 // 添加数据标准 弹窗列表数据
export const dataStandardListData: any[] = [ export const dataStandardListData: any[] = [
{ {
"id": 1, id: 1,
"standardName": "对外投资出资方式", standardName: '对外投资出资方式',
"standardNumber": "BAS000004", standardNumber: 'BAS000004',
"businessDefinition": "对外投资出资方式", businessDefinition: '对外投资出资方式',
"workGroup": "个人工作区", workGroup: '个人工作区',
}, },
{ {
"id": 2, id: 2,
"standardName": "对外投资控股标志", standardName: '对外投资控股标志',
"standardNumber": "BAS000005", standardNumber: 'BAS000005',
"businessDefinition": "对外投资控股标志", businessDefinition: '对外投资控股标志',
"workGroup": "个人工作区", workGroup: '个人工作区',
}, },
{ {
"id": 3, id: 3,
"standardName": "对外投资企业证明", standardName: '对外投资企业证明',
"standardNumber": "BAS000006", standardNumber: 'BAS000006',
"businessDefinition": "对外投资企业证明", businessDefinition: '对外投资企业证明',
"workGroup": "个人工作区", workGroup: '个人工作区',
}, },
{ {
"id": 4, id: 4,
"standardName": "zy_basic_standard", standardName: 'zy_basic_standard',
"standardNumber": "BAS000007", standardNumber: 'BAS000007',
"businessDefinition": "zy_basic_standard", businessDefinition: 'zy_basic_standard',
"workGroup": "共享工作区", workGroup: '共享工作区',
}, },
]; ];
...@@ -4,7 +4,7 @@ export const detailFormData = { ...@@ -4,7 +4,7 @@ export const detailFormData = {
describe: '', describe: '',
updateTime: '', updateTime: '',
cycle: '', cycle: '',
selectType: '', selectType: '数据标准',
}; };
export const detailCycleOptions = [ export const detailCycleOptions = [
{ {
......
<template> <template>
<PageWrapper :title="modelName" contentBackground headerSticky> <PageWrapper contentBackground headerSticky>
<template #extra> <template #headerContent>
<a-button type="primary" @click="handleOperation">跳转运维</a-button> <div class="flex" style="gap: 10px">
<a-button type="primary">查看报告</a-button> <div class="flex-1 flex" style="gap: 10px">
<a-button type="primary" :disabled="disabled">保存</a-button> <LeftOutlined style="font-size: 25px; cursor: pointer" @click="handleBack" />
<a-button type="primary" @click="handleOnline">{{ isOnline ? '下线' : '上线' }}</a-button> <SearchOutlined style="font-size: 30px; color: #14b43e" />
<a-button type="primary">运行</a-button> <div>
<div style="font-weight: bolder; font-size: 16px">
{{ modelName }}
</div>
<div style="color: #b5b9c5">
{{ path }}
</div>
</div>
</div>
<a-button type="primary" @click="handleOperation">跳转运维</a-button>
<a-button type="primary">查看报告</a-button>
<a-button type="primary" :disabled="disabled" @click="handleSave">保存</a-button>
<a-button type="primary" @click="handleOnline">{{ isOnline ? '下线' : '上线' }}</a-button>
<a-button type="primary" @click="handleRun">运行</a-button>
</div>
</template> </template>
<template #footer> <template #footer>
<BasicForm :disabled="disabled" @register="registerForm"> <BasicForm :disabled="disabled" @register="registerForm">
...@@ -23,9 +37,8 @@ ...@@ -23,9 +37,8 @@
</template> </template>
<template #formula="{ model, field }"> <template #formula="{ model, field }">
<a-input style="width: 200px" v-model:value="model[field]" /> <a-input style="width: 200px" v-model:value="model[field]" />
<a-button :disabled="disabled" type="link">Cron表达式</a-button>
</template> </template>
<template #type="{ model, field }"> <template #selectType="{ model, field }">
<RadioGroup v-model:value="model[field]" @change="changeTableType(model[field])"> <RadioGroup v-model:value="model[field]" @change="changeTableType(model[field])">
<Radio :value="item" v-for="item in ['数据标准', '元数据']" :key="item">{{ <Radio :value="item" v-for="item in ['数据标准', '元数据']" :key="item">{{
item item
...@@ -39,19 +52,30 @@ ...@@ -39,19 +52,30 @@
@register="registerTable" @register="registerTable"
:searchInfo="searchInfo" :searchInfo="searchInfo"
> >
<template #toolbar> <template #headerTop>
<span>是否运行质量检查</span> <div class="flex">
<QuestionCircleOutlined /> <div class="flex-1 flex" style="gap: 10px">
<RadioGroup :disabled="disabled" v-model:value="checkType"> <Input style="width: 200px" v-model:value="searchBasic" placeholder="搜索标准" />
<Radio :value="item" v-for="item in ['是', '否']" :key="item">{{ item }}</Radio> <Input style="width: 200px" v-model:value="searchPath" placeholder="搜索路径" />
</RadioGroup> </div>
<a-button <div class="flex" style="gap: 10px">
:disabled="disabled || getRowSelection().selectedRowKeys <= 0" <span>是否运行质量检查</span>
@click="handleDelete" <QuestionCircleOutlined />
><DeleteOutlined <RadioGroup :disabled="disabled" v-model:value="checkType">
/></a-button> <Radio :value="item" v-for="item in ['是', '否']" :key="item">{{ item }}</Radio>
<a-button :disabled="disabled" type="primary" @click="addDataStandard()">添加数据标准</a-button> </RadioGroup>
<a-button
:disabled="disabled || getRowSelection().selectedRowKeys <= 0"
@click="handleDelete"
><DeleteOutlined
/></a-button>
<a-button :disabled="disabled" type="primary" @click="addDataStandard()"
>添加数据标准</a-button
>
</div>
</div>
</template> </template>
<template #toolbar> </template>
<template #standard="{ text, record }"> <template #standard="{ text, record }">
<a @click="handleTableName">{{ text }}</a> <a @click="handleTableName">{{ text }}</a>
</template> </template>
...@@ -61,28 +85,36 @@ ...@@ -61,28 +85,36 @@
</template> </template>
</BasicTable> </BasicTable>
<BasicTable v-if="tableType === '元数据'" @register="metadataTable" :searchInfo="searchInfo"> <BasicTable v-if="tableType === '元数据'" @register="metadataTable" :searchInfo="searchInfo">
<template #toolbar> <template #headerTop>
<span>是否运行质量检查</span> <div class="flex">
<QuestionCircleOutlined /> <div class="flex-1 flex" style="gap: 10px">
<RadioGroup :disabled="disabled" v-model:value="checkType"> <Input style="width: 200px" v-model:value="searchBasic" placeholder="搜索标准" />
<QuestionCircleOutlined style="z-index: 2" /> <Input style="width: 200px" v-model:value="searchPath" placeholder="搜索路径" />
<Radio :value="item" v-for="item in ['是', '否']" :key="item">{{ item }}</Radio> </div>
</RadioGroup> <div class="flex" style="gap: 10px">
<a-button <div>是否运行质量检查<QuestionCircleOutlined style="margin-left: 10px" /></div>
:disabled="disabled || getMetadataRowSelection().selectedRowKeys <= 0" <RadioGroup :disabled="disabled" v-model:value="checkType">
@click="handleDelete" <QuestionCircleOutlined style="z-index: 2" />
><DeleteOutlined <Radio :value="item" v-for="item in ['是', '否']" :key="item">{{ item }}</Radio>
/></a-button> </RadioGroup>
<Dropdown :disabled="disabled"> <a-button
<a-button type="primary">添加元数据</a-button> :disabled="disabled || getMetadataRowSelection().selectedRowKeys <= 0"
<template #overlay> @click="handleDelete"
<Menu> ><DeleteOutlined
<MenuItem @click="handleExcel"> Excel导入 </MenuItem> /></a-button>
<MenuItem @click="handleAdd"> 手动添加 </MenuItem> <Dropdown :disabled="disabled">
</Menu> <a-button type="primary">添加元数据</a-button>
</template> <template #overlay>
</Dropdown> <Menu>
<MenuItem @click="handleExcel"> Excel导入 </MenuItem>
<MenuItem @click="handleAdd"> 手动添加 </MenuItem>
</Menu>
</template>
</Dropdown>
</div>
</div>
</template> </template>
<template #toolbar> </template>
<template #name="{ text, record }"> <template #name="{ text, record }">
<div>{{ text }}</div> <div>{{ text }}</div>
<div style="color: #9195a4">{{ record.nameTxt }}</div> <div style="color: #9195a4">{{ record.nameTxt }}</div>
...@@ -99,9 +131,14 @@ ...@@ -99,9 +131,14 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Radio, Select, Switch, Dropdown, Menu, MenuItem } from 'ant-design-vue'; import { Radio, Select, Switch, Dropdown, Menu, MenuItem, Input } from 'ant-design-vue';
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import { DeleteOutlined, QuestionCircleOutlined } from '@ant-design/icons-vue'; import {
DeleteOutlined,
QuestionCircleOutlined,
LeftOutlined,
SearchOutlined,
} from '@ant-design/icons-vue';
import { BasicTable, useTable } from '@/components/Table'; import { BasicTable, useTable } from '@/components/Table';
import BasicForm from '../../../../components/Form/src/BasicForm.vue'; import BasicForm from '../../../../components/Form/src/BasicForm.vue';
import { useForm } from '@/components/Form'; import { useForm } from '@/components/Form';
...@@ -130,12 +167,15 @@ ...@@ -130,12 +167,15 @@
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
const route = useRoute(); const route = useRoute();
const modelName = ref(route.query.name); const modelName = route.query.name;
const path = '落标检查 / admin-个人工作区 / ' + modelName;
const searchInfo = reactive<Recordable>({}); const searchInfo = reactive<Recordable>({});
const infoData = route.query; const infoData = route.query;
const isOnline = ref(false); const isOnline = ref(false);
const disabled = computed(() => isOnline.value); const disabled = computed(() => isOnline.value);
const checkType = ref('否'); const checkType = ref('否');
const searchBasic = ref();
const searchPath = ref();
let tableType = ref('数据标准'); let tableType = ref('数据标准');
function handleTableName() {} function handleTableName() {}
function changeTableType(type) { function changeTableType(type) {
...@@ -210,12 +250,7 @@ ...@@ -210,12 +250,7 @@
rowSelection: {}, rowSelection: {},
striped: false, striped: false,
// 搜索 // 搜索
formConfig: { useSearchForm: false,
labelWidth: 120,
schemas: detailDataFormSchema,
autoSubmitOnEnter: true,
},
useSearchForm: true,
showTableSetting: false, showTableSetting: false,
bordered: true, bordered: true,
}); });
...@@ -230,15 +265,19 @@ ...@@ -230,15 +265,19 @@
rowSelection: {}, rowSelection: {},
striped: false, striped: false,
// 搜索 // 搜索
formConfig: { useSearchForm: false,
labelWidth: 120,
schemas: metadataFormSchema,
autoSubmitOnEnter: true,
},
useSearchForm: true,
showTableSetting: false, showTableSetting: false,
bordered: true, bordered: true,
}); });
function handleBack() {
router.go(-1);
}
function handleSave() {
createMessage.success('保存成功!');
}
function handleRun() {
createMessage.success('运行成功!');
}
onMounted(() => { onMounted(() => {
setFieldsValue({ ...detailFormData, ...infoData }); setFieldsValue({ ...detailFormData, ...infoData });
}); });
......
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