Commit 73e25368 authored by liwei's avatar liwei

新增了发布以及批量发布页面

parent ff545333
......@@ -379,6 +379,15 @@ export const DataStandardRoute: AppRouteRecordRaw = {
icon: '',
},
},
{
path: 'basicStandards/applyPublication',
name: 'applyPublication1',
component: () => import('@/views/dataStandards/basicStandards/applyPublication.vue'),
meta: {
title: '申请发布',
icon: '',
},
},
{
path: 'IndicatorStandards/detailStandard',
name: 'detailStandard1',
......@@ -416,6 +425,15 @@ export const DataStandardRoute: AppRouteRecordRaw = {
icon: '',
},
},
{
path: 'IndicatorStandards/applyPublication',
name: 'applyPublication2',
component: () => import('@/views/dataStandards/IndicatorStandards/applyPublication.vue'),
meta: {
title: '申请发布',
icon: '',
},
},
{
path: 'labelDropInspection/labelDetail',
name: 'labelDropDetail',
......@@ -461,6 +479,15 @@ export const DataStandardRoute: AppRouteRecordRaw = {
icon: '',
},
},
{
path: 'publicCode/applyPublication',
name: 'applyPublication3',
component: () => import('@/views/dataStandards/publicCode/applyPublication.vue'),
meta: {
title: '申请发布',
icon: '',
},
},
],
};
......
<template>
<div class="m-4 mr-0 overflow-hidden bg-white">
<BasicTree
title="命名字典"
ref="treeRef"
toolbar
search
treeWrapperClassName="h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand="true"
:checkable="true"
:defaultExpandAll="true"
:treeData="treeData"
:fieldNames="{ key: 'businessId', title: 'basicStandardName' }"
@select="handleSelect"
/>
</div>
</template>
<script lang="ts" setup>
import {nextTick, onMounted, ref, unref} from 'vue';
import {BasicTree, TreeActionType, TreeItem} from '@/components/Tree';
import {Nullable} from "@vben/types";
import {chooseDictoryTreeData} from "./indicatorStandardsData";
defineOptions({ name: 'DeptTree' });
const emit = defineEmits(['select']);
const treeData = ref<TreeItem[]>([]);
const treeRef = ref<Nullable<TreeActionType>>(null);
async function fetch() {
treeData.value = handleTree(chooseDictoryTreeData, 'businessId',undefined,undefined,undefined)
await nextTick(() => {
getTree().expandAll(true)
})
}
function getTree() {
const tree = unref(treeRef);
if (!tree) {
throw new Error('tree is null!');
}
return tree;
}
function handleSelect(keys) {
emit('select', keys[0]);
}
onMounted(() => {
fetch();
});
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>
<style lang="scss" scoped>
.bg-white{
width: 97%;
}
::v-deep(.vben-tree){
background-color: #E8ECF7!important;
}
</style>
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<div class="addDialogBG">
<div style="float: right">
<Icon icon="ant-design:delete-outlined" :size="25" :color="'#ED6F6F'" />
</div>
<ChooseDictonaryTree class="w-1/4 xl:w-1/5" @select="handleSelect" />
</div>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { moveFormSchema } from './indicatorStandards.data';
import { useMessage } from '@/hooks/web/useMessage';
import {TreeData} from "./indicatorStandardsData";
import ChooseDictonaryTree from './ChooseDictonaryTree.vue'
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const rowId = ref('');
const getTitle = computed(() => ('选择命名字典'));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: moveFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
setFieldsValue({
...data.record,
})
const treeList = handleTree(TreeData, 'businessId',undefined,undefined,undefined)
updateSchema([
{
field: 'treeId',
componentProps: {
treeData: treeList
},
},
]);
});
/**确定按钮*/
async function handleSubmit() {
createMessage.success('移动成功');
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>
<style lang="scss" scoped>
.modalRow{
padding: 0 20px;
display: flex;
align-items: center;
justify-content: space-between;
.clearAll{
padding-right: 10px;
font-size: 16px;
}
.right{
display: flex;
align-items: center;
justify-content: space-between;
}
}
.addDialogBG{
margin: 10px;
border-radius: 10px;
padding: 20px;
background-color: #E8ECF7;
width: 98%;
height: 400px;
}
</style>
<template>
<div class="applyPublication_module">
<div class="top_title">
<div class="title">
申请发布<日期类>等2个域
</div>
<div>
<a-button type="primary" @click="handleGoBack">取消</a-button>
<a-button style="margin-left: 20px" type="primary">提交申请</a-button>
</div>
</div>
<BasicForm @register="registerForm" />
<BasicForm @register="registerForm1" />
<Tabs v-model:activeKey="activeKey" tab-position="left" animated>
<TabPane key="1" tab="日期类">
<BasicForm @register="registerForm2" />
<div class="contrastTitle">版本对比</div>
<div class="table-container">
<div class="table-row">
<div class="table-cell label">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>日期类</span>
<div>共享工作区/日期类</div>
</div>
</div>
<div class="table-cell value">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>日期类</span>
<div>共享工作区/日期类</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-cell label">版本:2</div>
<div class="table-cell value">版本:下个版本</div>
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
日期类
</Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
日期类
</Col>
</Row>
</div>
</div>
</div>
</TabPane>
<TabPane key="2" tab="短编号">
<BasicForm @register="registerForm3" />
<div class="contrastTitle">版本对比</div>
<div class="table-container">
<div class="table-row">
<div class="table-cell label">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
<div class="table-cell value">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-cell label">版本:1</div>
<div class="table-cell value">版本:下个版本</div>
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
</div>
</div>
</TabPane>
</Tabs>
</div>
</template>
<script lang="ts" setup>
import { BasicForm, useForm } from '@/components/Form';
import StepHeader from "@/components/stepHeader.vue";
import {onMounted, ref} from "vue";
import { Tabs,Col, Row, } from 'ant-design-vue';
import {applySchemas,applySchemas1,applySchemas2,applySchemas3} from "./indicatorStandards.data";
import moment from 'moment'
import {router} from "@/router";
const activeKey = ref('1');
const TabPane = Tabs.TabPane;
const [registerForm, { setFieldsValue }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: applySchemas,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerForm1, { }] = useForm({
labelWidth: 10,
baseColProps: { lg: 3, md: 24 },
schemas: applySchemas1,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerForm2, { }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: applySchemas2,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerForm3, { }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: applySchemas3,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
function handleGoBack() {
router.go(-1);
}
onMounted(() => {
setFieldsValue({
time: moment(new Date()).format( 'YYYY-MM-DD HH:mm:ss')
});
});
</script>
<style scoped lang="scss">
.applyPublication_module{
background-color: white;
padding: 20px;
.top_title{
display: flex;
justify-content: space-between;
.title{
font-weight: bold;
font-size: 17px;
}
}
.contrastTitle{
padding-left: 23px;
padding-bottom: 20px;
font-weight: bold;
font-size: 17px;
}
.table-container {
display: grid;
grid-template-columns: 2fr 2fr; /* Define two columns with 1:2 ratio */
gap: 0; /* Space between cells, to create border effect */
border: 1px solid #ddd; /* Border around the entire table */
max-width: 600px;
margin: 10px 10px 0;
.table-row {
display: contents;
.table-cell {
padding: 3%;
border: 1px solid #ddd;
}
}
}
::v-deep .ant-tabs-tab{
padding: 8px 300px 8px 0;
}
}
</style>
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<div>当前选中标准共 2条,其中1条已在其他审批流程中,本次申请不再二次提交,示例如下:</div>
<BasicTable @register="registerTable" ></BasicTable>
<template #footer>
<a-button @click="handleCancel"> 取消发布</a-button>
<a-button type="primary" @click="handleSubmitApplication"> 继续发布</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '@/components/Table';
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { batchColumns } from './indicatorStandards.data';
import { useMessage } from '@/hooks/web/useMessage';
import {router} from "@/router";
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false,showCancelBtn:false,showOkBtn:false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
}
});
const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,getRowSelection }] = useTable({
title: '',
api: async (params) => {
const response = {
pageNu: "1",
pageSize: "10",
pages: "1",
total: 0,
code:'',
message:'',
data: [],
};
return { ...response};
},
columns:batchColumns,
showTableSetting: false,
bordered: true,
});
const getTitle = computed(() => ('批量发布'));
function handleCancel() {
closeModal();
}
function handleSubmitApplication() {
closeModal();
router.push({
path: '/dataStandards/IndicatorStandards/applyPublication',
});
}
async function handleSubmit() {
try {
setModalProps({ confirmLoading: true });
// TODO custom api
closeModal();
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>
......@@ -13,17 +13,13 @@
</div>
<Divider />
<BasicForm @register="registerForm1" />
<!-- <div style="margin-left: 10px">-->
<!-- 命名字典映射<a-button style="margin-left: 10px;border-color: #4aabfe" @click="chooseButton">选择</a-button>-->
<!-- </div>-->
<Divider />
<BasicForm @register="registerForm2" />
<Divider />
<BasicForm @register="registerForm3" />
<Divider />
<!-- 选择命名字典 弹窗-->
<!-- <ChooseNamingDictionaryModal @register="registerChooseNamingDictionaryModal" @success="handleSuccess" />-->
<!-- 发布 弹窗-->
<PublishModal @register="registerModalPublish"/>
</div>
</template>
<script lang="ts" setup>
......@@ -36,19 +32,20 @@ import { BasicForm, useForm } from '@/components/Form';
import {
editStandardsDetailFormSchema1,
editStandardsDetailFormSchema2,
editStandardsDetailFormSchema3
editStandardsDetailFormSchema3,
} from './indicatorStandards.data';
import {onMounted, ref} from "vue";
import {useRoute} from "vue-router";
import ChooseNamingDictionaryModal from './ChooseNamingDictionaryModal.vue'
import {useModal} from "@/components/Modal";
import { useMessage } from '@/hooks/web/useMessage';
import PublishModal from './publishModal.vue'
const route = useRoute()
const title = ref('')
const formData = ref({})
const businessId = ref('')
const { createMessage, createConfirm } = useMessage();
const [registerModalPublish, { openModal:openModalPublish }] = useModal();
const [registerChooseNamingDictionaryModal, { openModal: openChooseNamingDictonaryModal }] = useModal();
const [registerForm1, { setFieldsValue: setFieldsValue1,updateSchema:updateSchema1 }] = useForm({
labelWidth: 100,
......@@ -103,13 +100,9 @@ function saveButton(record) {
/**发布*/
function publishButton(record) {
createMessage.success('发布成功!')
router.push({
path: '/dataStandards/IndicatorStandards/detailStandard',
query: {
businessId:businessId.value,
},
});
openModalPublish(true,{
})
}
......
......@@ -74,6 +74,8 @@
<CopyModal @register="registerCopyModal" @success="handleSuccess" />
<!-- 重命名 弹窗-->
<ResetNameModal @register="registerResetNameModal" @success="handleSuccess" />
<!-- 批量发布 弹窗-->
<BatchPublish @register="registerModalBatch"/>
</PageWrapper>
</template>
<script lang="ts" setup>
......@@ -96,10 +98,13 @@
import {exportUserList} from "@/api/system/user/user";
import {downloadByData} from "@/utils/file/download";
import ImportDataStandardsModal from './ImportDataStandardsModal.vue';
import BatchPublish from './batchPublish.vue';
defineOptions({ name: 'AccountManagement' });
const { createMessage, createConfirm } = useMessage();
const route = useRoute();
const go = useGo();
const [registerModalBatch, { openModal:openModalBatch }] = useModal();
const [registerDataStandardsModal, { openModal: openDataStandardsModal }] = useModal();
const [registerCreateIndicatorStandardsModal, { openModal: openCreateIndicatorStandardsModal }] = useModal();
const [registerCreateStandardsTypeModal, { openModal: openCreateStandardsTypeModal }] = useModal();
......@@ -198,7 +203,7 @@
/**批量发布*/
function batchPublishButton() {
createMessage.success('发布成功!')
openModalBatch(true,{})
}
/**删除按钮*/
......
......@@ -2264,3 +2264,356 @@ export const importDataStandardsFormSchema: FormSchema[] = [
},
},
];
/**发布 1*/
export const formSchemaPublish: any = [
{
field: 'title',
label: '申请标题',
component: 'Input',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
colProps: { span: 24 },
componentProps: {
placeholder: '',
},
},
{
field: 'reason',
label: '申请理由',
component: 'Input',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
colProps: { span: 24 },
componentProps: {
placeholder: '',
},
},
{
field: 'user',
label: '申请人',
component: 'Input',
defaultValue:'admin',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'organization',
label: '申请人组织',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
/**发布 2*/
export const formSchemaPublishTwo: any = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'valueOne',
label: '数据标准路径',
component: 'Input',
defaultValue:'域/共享工作区/短编号',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
export const formSchemaImport: any = [
{
field: 'path',
label: '选择文件地址',
component: 'TreeSelect',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
componentProps: {
fieldNames: {
label: 'label',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
},
{
field: 'name',
label: '文件名',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '输入文件名',
},
},
]
export const batchColumns: BasicColumn[] = [
{
title: '日期类',
dataIndex: 'name',
width: 120,
},
{
title: '共享工作区/日期类',
dataIndex: 'type',
width: 120,
},
]
export const applySchemas: FormSchema[] = [
{
field: '',
label: '申请信息',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: '资源名称',
component: 'Input',
defaultValue:'申请发布<日期类>等2个域',
componentProps: {
}
},
{
field: 'reason',
label: '申请理由',
component: 'Input',
defaultValue:'',
componentProps: {
}
},
{
field: 'user',
label: '申请人',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'org',
label: '所属机构',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'time',
label: '申请时间',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
export const applySchemas1: FormSchema[] = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: ' ',
component: 'Input',
componentProps: {
placeholder: '搜索资源名称',
}
}
]
export const applySchemas2: FormSchema[] = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: '资源名称',
component: 'Input',
defaultValue:'日期类',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'path',
label: '标准路径',
component: 'Input',
defaultValue:'共享工作区/日期类',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'type',
label: '标准类型',
component: 'Input',
defaultValue:'域',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
export const applySchemas3: FormSchema[] = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: '资源名称',
component: 'Input',
defaultValue:'短编号',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'path',
label: '标准路径',
component: 'Input',
defaultValue:'共享工作区/短编号',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'type',
label: '标准类型',
component: 'Input',
defaultValue:'域',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<BasicForm @register="registerForm" />
<Divider/>
<BasicForm @register="registerFormTwo" />
<div class="table-container">
<div class="table-row">
<div class="table-cell label">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
<div class="table-cell value">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-cell label">版本:1</div>
<div class="table-cell value">版本:下个版本</div>
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
</div>
</div>
<template #footer>
<a-button @click="handleCancel"> 取消</a-button>
<a-button type="primary" @click="handleSubmitApplication"> 提交申请</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import Icon from '@/components/Icon/Icon.vue';
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import {formSchemaPublish, formSchemaPublishTwo} from './indicatorStandards.data';
import { Divider,Form,Col, Row, } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage';
defineOptions({ name: 'AccountModal' });
import stepHeader from '../../../components/stepHeader.vue'
import StepHeader from "@/components/stepHeader.vue";
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublish,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerFormTwo] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublishTwo,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false,showOkBtn:false,showCancelBtn:false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
}
updateSchema({
});
});
const getTitle = computed(() => ('发布申请'));
function handleCancel() {
closeModal();
}
function handleSubmitApplication() {
createMessage.success('发布成功');
closeModal();
}
async function handleSubmit() {
try {
const values = await validate();
setModalProps({ confirmLoading: true });
// TODO custom api
closeModal();
emit('success', { isUpdate: unref(isUpdate), values: { ...values, id: rowId.value } });
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>
<style lang="scss" scoped>
.info_title{
font-size: 15px;
font-weight: bold;
}
.table-container {
display: grid;
grid-template-columns: 2fr 2fr; /* Define two columns with 1:2 ratio */
gap: 0; /* Space between cells, to create border effect */
border: 1px solid #ddd; /* Border around the entire table */
max-width: 600px;
margin: 10px 10px 0;
.table-row {
display: contents;
.table-cell {
padding: 3%;
border: 1px solid #ddd;
}
}
}
</style>
<template>
<div class="applyPublication_module">
<div class="top_title">
<div class="title">
申请发布<日期类>等2个域
</div>
<div>
<a-button type="primary" @click="handleGoBack">取消</a-button>
<a-button style="margin-left: 20px" type="primary">提交申请</a-button>
</div>
</div>
<BasicForm @register="registerForm" />
<BasicForm @register="registerForm1" />
<Tabs v-model:activeKey="activeKey" tab-position="left" animated>
<TabPane key="1" tab="日期类">
<BasicForm @register="registerForm2" />
<div class="contrastTitle">版本对比</div>
<div class="table-container">
<div class="table-row">
<div class="table-cell label">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>日期类</span>
<div>共享工作区/日期类</div>
</div>
</div>
<div class="table-cell value">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>日期类</span>
<div>共享工作区/日期类</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-cell label">版本:2</div>
<div class="table-cell value">版本:下个版本</div>
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
日期类
</Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
日期类
</Col>
</Row>
</div>
</div>
</div>
</TabPane>
<TabPane key="2" tab="短编号">
<BasicForm @register="registerForm3" />
<div class="contrastTitle">版本对比</div>
<div class="table-container">
<div class="table-row">
<div class="table-cell label">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
<div class="table-cell value">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-cell label">版本:1</div>
<div class="table-cell value">版本:下个版本</div>
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
</div>
</div>
</TabPane>
</Tabs>
</div>
</template>
<script lang="ts" setup>
import { BasicForm, useForm } from '@/components/Form';
import StepHeader from "@/components/stepHeader.vue";
import {onMounted, ref} from "vue";
import { Tabs,Col, Row, } from 'ant-design-vue';
import {applySchemas,applySchemas1,applySchemas2,applySchemas3} from "./basicStandards.data";
import moment from 'moment'
import {router} from "@/router";
const activeKey = ref('1');
const TabPane = Tabs.TabPane;
const [registerForm, { setFieldsValue }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: applySchemas,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerForm1, { }] = useForm({
labelWidth: 10,
baseColProps: { lg: 3, md: 24 },
schemas: applySchemas1,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerForm2, { }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: applySchemas2,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerForm3, { }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: applySchemas3,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
function handleGoBack() {
router.go(-1);
}
onMounted(() => {
setFieldsValue({
time: moment(new Date()).format( 'YYYY-MM-DD HH:mm:ss')
});
});
</script>
<style scoped lang="scss">
.applyPublication_module{
background-color: white;
padding: 20px;
.top_title{
display: flex;
justify-content: space-between;
.title{
font-weight: bold;
font-size: 17px;
}
}
.contrastTitle{
padding-left: 23px;
padding-bottom: 20px;
font-weight: bold;
font-size: 17px;
}
.table-container {
display: grid;
grid-template-columns: 2fr 2fr; /* Define two columns with 1:2 ratio */
gap: 0; /* Space between cells, to create border effect */
border: 1px solid #ddd; /* Border around the entire table */
max-width: 600px;
margin: 10px 10px 0;
.table-row {
display: contents;
.table-cell {
padding: 3%;
border: 1px solid #ddd;
}
}
}
::v-deep .ant-tabs-tab{
padding: 8px 300px 8px 0;
}
}
</style>
......@@ -3019,3 +3019,358 @@ export const recommendedMetadataTipsSchema: FormSchema[] = [
colProps: { lg: 12, md: 12 },
},
];
/**发布 1*/
export const formSchemaPublish: any = [
{
field: 'title',
label: '申请标题',
component: 'Input',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
colProps: { span: 24 },
componentProps: {
placeholder: '',
},
},
{
field: 'reason',
label: '申请理由',
component: 'Input',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
colProps: { span: 24 },
componentProps: {
placeholder: '',
},
},
{
field: 'user',
label: '申请人',
component: 'Input',
defaultValue:'admin',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'organization',
label: '申请人组织',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
/**发布 2*/
export const formSchemaPublishTwo: any = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'valueOne',
label: '数据标准路径',
component: 'Input',
defaultValue:'域/共享工作区/短编号',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
export const formSchemaImport: any = [
{
field: 'path',
label: '选择文件地址',
component: 'TreeSelect',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
componentProps: {
fieldNames: {
label: 'label',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
},
{
field: 'name',
label: '文件名',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '输入文件名',
},
},
]
export const batchColumns: BasicColumn[] = [
{
title: '日期类',
dataIndex: 'name',
width: 120,
},
{
title: '共享工作区/日期类',
dataIndex: 'type',
width: 120,
},
]
export const applySchemas: FormSchema[] = [
{
field: '',
label: '申请信息',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: '资源名称',
component: 'Input',
defaultValue:'申请发布<日期类>等2个域',
componentProps: {
}
},
{
field: 'reason',
label: '申请理由',
component: 'Input',
defaultValue:'',
componentProps: {
}
},
{
field: 'user',
label: '申请人',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'org',
label: '所属机构',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'time',
label: '申请时间',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
export const applySchemas1: FormSchema[] = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: ' ',
component: 'Input',
componentProps: {
placeholder: '搜索资源名称',
}
}
]
export const applySchemas2: FormSchema[] = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: '资源名称',
component: 'Input',
defaultValue:'日期类',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'path',
label: '标准路径',
component: 'Input',
defaultValue:'共享工作区/日期类',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'type',
label: '标准类型',
component: 'Input',
defaultValue:'域',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
export const applySchemas3: FormSchema[] = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: '资源名称',
component: 'Input',
defaultValue:'短编号',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'path',
label: '标准路径',
component: 'Input',
defaultValue:'共享工作区/短编号',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'type',
label: '标准类型',
component: 'Input',
defaultValue:'域',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<div>当前选中标准共 2条,其中1条已在其他审批流程中,本次申请不再二次提交,示例如下:</div>
<BasicTable @register="registerTable" ></BasicTable>
<template #footer>
<a-button @click="handleCancel"> 取消发布</a-button>
<a-button type="primary" @click="handleSubmitApplication"> 继续发布</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '@/components/Table';
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { batchColumns } from './basicStandards.data';
import { useMessage } from '@/hooks/web/useMessage';
import {router} from "@/router";
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false,showCancelBtn:false,showOkBtn:false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
}
});
const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,getRowSelection }] = useTable({
title: '',
api: async (params) => {
const response = {
pageNu: "1",
pageSize: "10",
pages: "1",
total: 0,
code:'',
message:'',
data: [],
};
return { ...response};
},
columns:batchColumns,
showTableSetting: false,
bordered: true,
});
const getTitle = computed(() => ('批量发布'));
function handleCancel() {
closeModal();
}
function handleSubmitApplication() {
closeModal();
router.push({
path: '/dataStandards/basicStandards/applyPublication',
});
}
async function handleSubmit() {
try {
setModalProps({ confirmLoading: true });
// TODO custom api
closeModal();
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>
......@@ -21,7 +21,8 @@
<Divider />
<BasicForm @register="registerForm3" />
<Divider />
<!-- 发布 弹窗-->
<PublishModal @register="registerModalPublish"/>
<!-- 选择命名字典 弹窗-->
<ChooseNamingDictionaryModal @register="registerChooseNamingDictionaryModal" @success="handleSuccess" />
</div>
......@@ -41,6 +42,7 @@ import {
import {onMounted, ref} from "vue";
import {useRoute} from "vue-router";
import ChooseNamingDictionaryModal from './ChooseNamingDictionaryModal.vue'
import PublishModal from './publishModal.vue'
import {useModal} from "@/components/Modal";
import { useMessage } from '@/hooks/web/useMessage';
......@@ -49,6 +51,7 @@ const title = ref('')
const formData = ref({})
const businessId = ref('')
const { createMessage, createConfirm } = useMessage();
const [registerModalPublish, { openModal:openModalPublish }] = useModal();
const [registerChooseNamingDictionaryModal, { openModal: openChooseNamingDictonaryModal }] = useModal();
const [registerForm1, { setFieldsValue: setFieldsValue1 }] = useForm({
labelWidth: 100,
......@@ -103,13 +106,9 @@ function saveButton(record) {
/**发布*/
function publishButton(record) {
createMessage.success('发布成功!')
router.push({
path: '/dataStandards/basicStandards/detailStandard',
query: {
businessId:businessId.value,
},
});
openModalPublish(true,{
})
}
......
......@@ -77,6 +77,8 @@
<CopyModal @register="registerCopyModal" @success="handleSuccess" />
<!-- 重命名 弹窗-->
<ResetNameModal @register="registerResetNameModal" @success="handleSuccess" />
<!-- 批量发布 弹窗-->
<BatchPublish @register="registerModalBatch"/>
</PageWrapper>
</template>
<script lang="ts" setup>
......@@ -100,11 +102,13 @@
import { router } from '@/router';
import {exportUserList} from "@/api/system/user/user";
import {downloadByData} from "@/utils/file/download";
import BatchPublish from "./batchPublish.vue";
defineOptions({ name: 'AccountManagement' });
const { createMessage, createConfirm } = useMessage();
const route = useRoute();
const go = useGo();
const [registerModalBatch, { openModal:openModalBatch }] = useModal();
const [registerCreateBasicStandardsModal, { openModal: openCreateBasicStandardsModal }] = useModal();
const [registerCreateStandardsTypeModal, { openModal: openCreateStandardsTypeModal }] = useModal();
const [registerImportRelativeModal, { openModal: openImportRelativeModal }] = useModal();
......@@ -204,7 +208,7 @@
/**批量发布*/
function batchPublishButton() {
createMessage.success('发布成功!')
openModalBatch(true,{})
}
/**删除按钮*/
......
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<BasicForm @register="registerForm" />
<Divider/>
<BasicForm @register="registerFormTwo" />
<div class="table-container">
<div class="table-row">
<div class="table-cell label">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
<div class="table-cell value">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-cell label">版本:1</div>
<div class="table-cell value">版本:下个版本</div>
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
</div>
</div>
<template #footer>
<a-button @click="handleCancel"> 取消</a-button>
<a-button type="primary" @click="handleSubmitApplication"> 提交申请</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import Icon from '@/components/Icon/Icon.vue';
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import {formSchemaPublish, formSchemaPublishTwo} from './basicStandards.data';
import { Divider,Form,Col, Row, } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage';
defineOptions({ name: 'AccountModal' });
import stepHeader from '../../../components/stepHeader.vue'
import StepHeader from "@/components/stepHeader.vue";
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublish,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerFormTwo] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublishTwo,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false,showOkBtn:false,showCancelBtn:false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
}
updateSchema({
});
});
const getTitle = computed(() => ('发布申请'));
function handleCancel() {
closeModal();
}
function handleSubmitApplication() {
createMessage.success('发布成功');
closeModal();
}
async function handleSubmit() {
try {
const values = await validate();
setModalProps({ confirmLoading: true });
// TODO custom api
closeModal();
emit('success', { isUpdate: unref(isUpdate), values: { ...values, id: rowId.value } });
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>
<style lang="scss" scoped>
.info_title{
font-size: 15px;
font-weight: bold;
}
.table-container {
display: grid;
grid-template-columns: 2fr 2fr; /* Define two columns with 1:2 ratio */
gap: 0; /* Space between cells, to create border effect */
border: 1px solid #ddd; /* Border around the entire table */
max-width: 600px;
margin: 10px 10px 0;
.table-row {
display: contents;
.table-cell {
padding: 3%;
border: 1px solid #ddd;
}
}
}
</style>
<template>
<div class="applyPublication_module">
<div class="top_title">
<div class="title">
申请发布<日期类>等2个域
</div>
<div>
<a-button type="primary" @click="handleGoBack">取消</a-button>
<a-button style="margin-left: 20px" type="primary">提交申请</a-button>
</div>
</div>
<BasicForm @register="registerForm" />
<BasicForm @register="registerForm1" />
<Tabs v-model:activeKey="activeKey" tab-position="left" animated>
<TabPane key="1" tab="日期类">
<BasicForm @register="registerForm2" />
<div class="contrastTitle">版本对比</div>
<div class="table-container">
<div class="table-row">
<div class="table-cell label">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>日期类</span>
<div>共享工作区/日期类</div>
</div>
</div>
<div class="table-cell value">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>日期类</span>
<div>共享工作区/日期类</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-cell label">版本:2</div>
<div class="table-cell value">版本:下个版本</div>
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
日期类
</Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
日期类
</Col>
</Row>
</div>
</div>
</div>
</TabPane>
<TabPane key="2" tab="短编号">
<BasicForm @register="registerForm3" />
<div class="contrastTitle">版本对比</div>
<div class="table-container">
<div class="table-row">
<div class="table-cell label">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
<div class="table-cell value">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-cell label">版本:1</div>
<div class="table-cell value">版本:下个版本</div>
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
</div>
</div>
</TabPane>
</Tabs>
</div>
</template>
<script lang="ts" setup>
import { BasicForm, useForm } from '@/components/Form';
import StepHeader from "@/components/stepHeader.vue";
import {onMounted, ref} from "vue";
import { Tabs,Col, Row, } from 'ant-design-vue';
import {applySchemas,applySchemas1,applySchemas2,applySchemas3} from "./publicCode.data";
import moment from 'moment'
import {router} from "@/router";
const activeKey = ref('1');
const TabPane = Tabs.TabPane;
const [registerForm, { setFieldsValue }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: applySchemas,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerForm1, { }] = useForm({
labelWidth: 10,
baseColProps: { lg: 3, md: 24 },
schemas: applySchemas1,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerForm2, { }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: applySchemas2,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerForm3, { }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: applySchemas3,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
function handleGoBack() {
router.go(-1);
}
onMounted(() => {
setFieldsValue({
time: moment(new Date()).format( 'YYYY-MM-DD HH:mm:ss')
});
});
</script>
<style scoped lang="scss">
.applyPublication_module{
background-color: white;
padding: 20px;
.top_title{
display: flex;
justify-content: space-between;
.title{
font-weight: bold;
font-size: 17px;
}
}
.contrastTitle{
padding-left: 23px;
padding-bottom: 20px;
font-weight: bold;
font-size: 17px;
}
.table-container {
display: grid;
grid-template-columns: 2fr 2fr; /* Define two columns with 1:2 ratio */
gap: 0; /* Space between cells, to create border effect */
border: 1px solid #ddd; /* Border around the entire table */
max-width: 600px;
margin: 10px 10px 0;
.table-row {
display: contents;
.table-cell {
padding: 3%;
border: 1px solid #ddd;
}
}
}
::v-deep .ant-tabs-tab{
padding: 8px 300px 8px 0;
}
}
</style>
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<div>当前选中标准共 2条,其中1条已在其他审批流程中,本次申请不再二次提交,示例如下:</div>
<BasicTable @register="registerTable" ></BasicTable>
<template #footer>
<a-button @click="handleCancel"> 取消发布</a-button>
<a-button type="primary" @click="handleSubmitApplication"> 继续发布</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '@/components/Table';
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { batchColumns } from './publicCode.data';
import { useMessage } from '@/hooks/web/useMessage';
import {router} from "@/router";
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false,showCancelBtn:false,showOkBtn:false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
}
});
const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,getRowSelection }] = useTable({
title: '',
api: async (params) => {
const response = {
pageNu: "1",
pageSize: "10",
pages: "1",
total: 0,
code:'',
message:'',
data: [],
};
return { ...response};
},
columns:batchColumns,
showTableSetting: false,
bordered: true,
});
const getTitle = computed(() => ('批量发布'));
function handleCancel() {
closeModal();
}
function handleSubmitApplication() {
closeModal();
router.push({
path: '/dataStandards/publicCode/applyPublication',
});
}
async function handleSubmit() {
try {
setModalProps({ confirmLoading: true });
// TODO custom api
closeModal();
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>
......@@ -47,6 +47,8 @@
</span>
</template>
</BasicTable>
<!-- 发布 弹窗-->
<PublishModal @register="registerModalPublish"/>
<AddCodeValueModal @register="registerModal" @success="handleSuccess" />
<EditPublicCodeModal @register="registerEditPublicCodeModal" @success="handleSuccess" />
</div>
......@@ -69,12 +71,14 @@ import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import AddCodeValueModal from './AddCodeValueModal.vue';
import EditPublicCodeModal from './editPublicCodeModal.vue';
import PublishModal from './publishModal.vue'
const route = useRoute()
const title = ref('')
const formData = ref({})
const businessId = ref('')
const { createMessage, createConfirm } = useMessage();
const [registerModalPublish, { openModal:openModalPublish }] = useModal();
const [registerModal, { openModal: openModal }] = useModal();
const [registerEditPublicCodeModal, { openModal: openEditPublicCodeModal }] = useModal();
const [registerForm1, { setFieldsValue: setFieldsValue1,updateSchema }] = useForm({
......@@ -165,13 +169,9 @@ function deleteButton(record) {
/**发布*/
function publishButton(record) {
createMessage.success('发布成功!')
router.push({
path: '/dataStandards/publicCode/detailPublicCode',
query: {
businessId:businessId.value,
},
});
openModalPublish(true,{
})
}
......
......@@ -75,6 +75,8 @@
<CopyModal @register="registerCopyModal" @success="handleSuccess" />
<!-- 重命名 弹窗-->
<ResetNameModal @register="registerResetNameModal" @success="handleSuccess" />
<!-- 批量发布 弹窗-->
<BatchPublish @register="registerModalBatch"/>
</PageWrapper>
</template>
<script lang="ts" setup>
......@@ -97,10 +99,12 @@
import {exportUserList} from "@/api/system/user/user";
import {downloadByData} from "@/utils/file/download";
import ImportDataStandardsModal from './ImportDataStandardsModal.vue';
import BatchPublish from './batchPublish.vue';
defineOptions({ name: 'AccountManagement' });
const { createMessage, createConfirm } = useMessage();
const route = useRoute();
const go = useGo();
const [registerModalBatch, { openModal:openModalBatch }] = useModal();
const [registerDataStandardsModal, { openModal: openDataStandardsModal }] = useModal();
const [registerCreatePublicCodeModal, { openModal: openCreatePublicCodeModal }] = useModal();
const [registerCreateStandardsTypeModal, { openModal: openCreateStandardsTypeModal }] = useModal();
......@@ -199,7 +203,7 @@
/**批量发布*/
function batchPublishButton() {
createMessage.success('发布成功!')
openModalBatch(true,{})
}
/**删除按钮*/
......
......@@ -1297,4 +1297,355 @@ export const relatedBasicStandardsSchema: any[] = [
colProps: { lg: 24, md: 24 },
},
]
/**发布 1*/
export const formSchemaPublish: any = [
{
field: 'title',
label: '申请标题',
component: 'Input',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
colProps: { span: 24 },
componentProps: {
placeholder: '',
},
},
{
field: 'reason',
label: '申请理由',
component: 'Input',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
colProps: { span: 24 },
componentProps: {
placeholder: '',
},
},
{
field: 'user',
label: '申请人',
component: 'Input',
defaultValue:'admin',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'organization',
label: '申请人组织',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
/**发布 2*/
export const formSchemaPublishTwo: any = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'valueOne',
label: '数据标准路径',
component: 'Input',
defaultValue:'域/共享工作区/短编号',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
export const formSchemaImport: any = [
{
field: 'path',
label: '选择文件地址',
component: 'TreeSelect',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
componentProps: {
fieldNames: {
label: 'label',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
},
{
field: 'name',
label: '文件名',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '输入文件名',
},
},
]
export const batchColumns: BasicColumn[] = [
{
title: '日期类',
dataIndex: 'name',
width: 120,
},
{
title: '共享工作区/日期类',
dataIndex: 'type',
width: 120,
},
]
export const applySchemas: FormSchema[] = [
{
field: '',
label: '申请信息',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: '资源名称',
component: 'Input',
defaultValue:'申请发布<日期类>等2个域',
componentProps: {
}
},
{
field: 'reason',
label: '申请理由',
component: 'Input',
defaultValue:'',
componentProps: {
}
},
{
field: 'user',
label: '申请人',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'org',
label: '所属机构',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'time',
label: '申请时间',
component: 'Input',
defaultValue:'-',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
export const applySchemas1: FormSchema[] = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: ' ',
component: 'Input',
componentProps: {
placeholder: '搜索资源名称',
}
}
]
export const applySchemas2: FormSchema[] = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: '资源名称',
component: 'Input',
defaultValue:'日期类',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'path',
label: '标准路径',
component: 'Input',
defaultValue:'共享工作区/日期类',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'type',
label: '标准类型',
component: 'Input',
defaultValue:'域',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
export const applySchemas3: FormSchema[] = [
{
field: '',
label: '数据标准详情',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
colProps: { lg: 24, md: 24 },
},
{
field: 'name',
label: '资源名称',
component: 'Input',
defaultValue:'短编号',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'path',
label: '标准路径',
component: 'Input',
defaultValue:'共享工作区/短编号',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
{
field: 'type',
label: '标准类型',
component: 'Input',
defaultValue:'域',
componentProps: {
readonly: true,
disabled: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
}
},
]
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<BasicForm @register="registerForm" />
<Divider/>
<BasicForm @register="registerFormTwo" />
<div class="table-container">
<div class="table-row">
<div class="table-cell label">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
<div class="table-cell value">
<div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span>
<div>域/共享工作区/短编号</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-cell label">版本:1</div>
<div class="table-cell value">版本:下个版本</div>
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div>
</div>
</div>
<template #footer>
<a-button @click="handleCancel"> 取消</a-button>
<a-button type="primary" @click="handleSubmitApplication"> 提交申请</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import Icon from '@/components/Icon/Icon.vue';
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import {formSchemaPublish, formSchemaPublishTwo} from './publicCode.data';
import { Divider,Form,Col, Row, } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage';
defineOptions({ name: 'AccountModal' });
import stepHeader from '../../../components/stepHeader.vue'
import StepHeader from "@/components/stepHeader.vue";
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublish,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [registerFormTwo] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublishTwo,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false,showOkBtn:false,showCancelBtn:false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
}
updateSchema({
});
});
const getTitle = computed(() => ('发布申请'));
function handleCancel() {
closeModal();
}
function handleSubmitApplication() {
createMessage.success('发布成功');
closeModal();
}
async function handleSubmit() {
try {
const values = await validate();
setModalProps({ confirmLoading: true });
// TODO custom api
closeModal();
emit('success', { isUpdate: unref(isUpdate), values: { ...values, id: rowId.value } });
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>
<style lang="scss" scoped>
.info_title{
font-size: 15px;
font-weight: bold;
}
.table-container {
display: grid;
grid-template-columns: 2fr 2fr; /* Define two columns with 1:2 ratio */
gap: 0; /* Space between cells, to create border effect */
border: 1px solid #ddd; /* Border around the entire table */
max-width: 600px;
margin: 10px 10px 0;
.table-row {
display: contents;
.table-cell {
padding: 3%;
border: 1px solid #ddd;
}
}
}
</style>
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