Commit 4bca22f6 authored by 张伯涛's avatar 张伯涛

命名字典模块

parent 43057012
...@@ -68,14 +68,14 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> { ...@@ -68,14 +68,14 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
icon: 'ant-design:snippets-outlined', icon: 'ant-design:snippets-outlined',
}, },
{ {
label: '新建文档分类', label: '新建名词分类',
handler: () => { handler: () => {
handleAddDocumentClassification(node) handleAddDocumentClassification(node)
}, },
icon: 'bi:plus', icon: 'bi:plus',
}, },
{ {
label: '新建文档管理', label: '新建名词',
handler: () => { handler: () => {
handleAddDocumentManage(node) handleAddDocumentManage(node)
}, },
...@@ -95,7 +95,13 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> { ...@@ -95,7 +95,13 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
}, },
icon: 'ant-design:rest-outlined', icon: 'ant-design:rest-outlined',
}, },
{
label: '移动',
handler: () => {
handleMove(node)
},
icon: 'ant-design:rest-outlined',
},
]; ];
return new Promise((resolve) => { return new Promise((resolve) => {
resolve(menu); resolve(menu);
...@@ -125,6 +131,9 @@ function handleCopy(data) { ...@@ -125,6 +131,9 @@ function handleCopy(data) {
} }
function handleDelete(data) { function handleDelete(data) {
}
function handleMove(data) {
} }
const treeData = ref<TreeItem[]>([]); const treeData = ref<TreeItem[]>([]);
......
...@@ -94,7 +94,7 @@ import {detailSchema1,} from './referenceDocument.data.ts'; ...@@ -94,7 +94,7 @@ import {detailSchema1,} from './referenceDocument.data.ts';
import {tableListTwo} from "./mock"; import {tableListTwo} from "./mock";
import {onMounted, ref} from "vue"; import {onMounted, ref} from "vue";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import VersionModal from './VersionModal.vue' import VersionModal from '@/views/dataStandards/basicStandards/VersionModal.vue'
import {useModal} from "@/components/Modal"; import {useModal} from "@/components/Modal";
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { columnsTwo } from './referenceDocument.data'; import { columnsTwo } from './referenceDocument.data';
...@@ -153,7 +153,7 @@ const options = ref<any>([ ...@@ -153,7 +153,7 @@ const options = ref<any>([
/**编辑标准*/ /**编辑标准*/
function editButton(record) { function editButton(record) {
router.push({ router.push({
path: '/dataStandards/referenceDocument/edit', path: '/dataStandards/namingDictionary/edit',
}); });
} }
function handleImport() { function handleImport() {
......
...@@ -72,10 +72,10 @@ import {router} from "@/router"; ...@@ -72,10 +72,10 @@ import {router} from "@/router";
import { BasicTable, useTable, TableAction } from '@/components/Table'; import { BasicTable, useTable, TableAction } from '@/components/Table';
import { BasicForm, useForm } from '@/components/Form'; import { BasicForm, useForm } from '@/components/Form';
import {detailSchema2,} from './referenceDocument.data.ts'; import {detailSchema2,} from './referenceDocument.data.ts';
import {tableListTwo} from "./mock"; import {tableListTwo} from "./mock"
import {onMounted, ref} from "vue"; import {onMounted, ref} from "vue";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import VersionModal from './VersionModal.vue' import VersionModal from '@/views/dataStandards/basicStandards/VersionModal.vue'
import {useModal} from "@/components/Modal"; import {useModal} from "@/components/Modal";
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { columnsTwo } from './referenceDocument.data'; import { columnsTwo } from './referenceDocument.data';
...@@ -132,7 +132,7 @@ const options = ref<any>([ ...@@ -132,7 +132,7 @@ const options = ref<any>([
/**编辑标准*/ /**编辑标准*/
function editButton(record) { function editButton(record) {
router.push({ router.push({
path: '/dataStandards/referenceDocument/details', path: '/dataStandards/namingDictionary/details',
}); });
} }
function handleDelete() {} function handleDelete() {}
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
<a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" >复制到</a-button> <a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" >复制到</a-button>
<a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" @click="handleDeleteIds" >删除</a-button> <a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" @click="handleDeleteIds" >删除</a-button>
<a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" >移动</a-button> <a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" >移动</a-button>
<a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" >导出</a-button> <a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" >导出命名字典</a-button>
<a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" >批量发布</a-button> <a-button :disabled="getRowSelection().selectedRowKeys <=0" type="primary" >批量发布</a-button>
<a-button type="primary" @click="handleAddDocumentClassification" >新增文档分类</a-button> <a-button type="primary" @click="handleAddDocumentClassification" >新增名词分类</a-button>
<a-button :disabled="getRowSelection().selectedRowKeys <=0" @click="handleAddManage" type="primary" >新增文档管理</a-button> <a-button :disabled="getRowSelection().selectedRowKeys <=0" @click="handleAddManage" type="primary" >新增名词</a-button>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
...@@ -102,7 +102,7 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,get ...@@ -102,7 +102,7 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,get
return info; return info;
}, },
actionColumn: { actionColumn: {
width: 200, width: 230,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
// slots: { customRender: 'action' }, // slots: { customRender: 'action' },
...@@ -145,7 +145,7 @@ async function handleExport() { ...@@ -145,7 +145,7 @@ async function handleExport() {
} }
function handleView(record: Recordable) { function handleView(record: Recordable) {
router.push({ router.push({
path: '/dataStandards/referenceDocument/details', path: '/dataStandards/namingDictionary/details',
}); });
} }
/**关联关系*/ /**关联关系*/
......
<template> <template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit"> <BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
<div class="modalRow">
<div>可见范围</div>
<div class="right">
<div class="clearAll">
清空
</div>
<div>
<a-button type="primary">添加工作组</a-button>
</div>
</div>
</div>
<div class="addDialogBG">
<TreeTwo class="w-1/4 xl:w-1/5" @select="handleSelect" />
</div>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
......
export const tableList: any[] = [ export const tableList: any[] = [
{ {
businessId: 1, businessId: 1,
name: '目录示例', name: '一般用户',
num: '111', englishName: '--',
flag: '已发布', abbreviation: '--',
group: '默认工作组', flag: '--',
group: '共享工作组',
}, },
{ {
businessId: 2, businessId: 2,
name: '目录示例', name: '一般用户',
num: '222', englishName: '--',
flag: '已发布', abbreviation: '--',
group: '默认工作组', flag: '--',
group: '共享工作组',
}, },
{ {
businessId: 3, businessId: 3,
name: '目录示例', name: '一般用户',
num: '333', englishName: '--',
flag: '已发布', abbreviation: '--',
group: '默认工作组', flag: '--',
group: '共享工作组',
}, },
{ {
businessId: 4, businessId: 4,
name: '目录示例', name: '一般用户',
num: '444', englishName: '--',
flag: '已发布', abbreviation: '--',
group: '默认工作组', flag: '--',
group: '共享工作组',
}, },
{ {
businessId: 5, businessId: 5,
name: '目录示例', name: '一般用户',
num: '555', englishName: '--',
flag: '已发布', abbreviation: '--',
group: '默认工作组', flag: '--',
group: '共享工作组',
}, },
] ]
export const treeDataList = [ export const treeDataList = [
{ {
label: '引用文档管理', label: '命名字典',
value: 1, value: 1,
icon: 'home|svg', icon: 'home|svg',
children: [ children: [
{ label: '共享工作区', value: 2 }, {
{ label: '商城工作区', value: 3 }, label: 'admin_个人工作区',
{ label: '数据中台工作区02', value: 4 }, value: 2,
{ label: '数据中台工作区03', value: 5 }, icon: 'home|svg',
children: [
{ label: '企业',
value: 3,
icon: 'home|svg',
children: [
{ label: '企业号',
value: 4,
},
],
},
],
},
], ],
}, },
] ]
......
...@@ -22,13 +22,18 @@ export const columnsTwo: BasicColumn[] = [ ...@@ -22,13 +22,18 @@ export const columnsTwo: BasicColumn[] = [
] ]
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '文档名称', title: '文件中文名',
dataIndex: 'name', dataIndex: 'name',
width: 120, width: 120,
}, },
{ {
title: '文档编号', title: '文件英文全称',
dataIndex: 'num', dataIndex: 'englishName',
width: 120,
},
{
title: '名词英文简称',
dataIndex: 'abbreviation',
width: 120, width: 120,
}, },
{ {
...@@ -41,26 +46,34 @@ export const columns: BasicColumn[] = [ ...@@ -41,26 +46,34 @@ export const columns: BasicColumn[] = [
dataIndex: 'group', dataIndex: 'group',
width: 120, width: 120,
}, },
]; ];
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'name', field: 'name',
label: '文档名称', label: '名词中文名',
component: 'Input', component: 'Input',
colProps: { span: 8 }, colProps: { span: 6 },
componentProps: { componentProps: {
placeholder: '输入文档名称', placeholder: '输入名词中文名',
}, },
}, },
{ {
field: 'num', field: 'english',
label: '文档编号', label: '名词英文名',
component: 'Input', component: 'Input',
colProps: { span: 8 }, colProps: { span: 6 },
componentProps: {
placeholder: '输入名词英文名',
},
},
{
field: 'abbreviation',
label: '名词英文简称',
component: 'Input',
colProps: { span: 6 },
componentProps: { componentProps: {
placeholder: '输入文档编号', placeholder: '输入名词英文简称',
}, },
}, },
]; ];
...@@ -89,12 +102,12 @@ export const formSchema: FormSchema[] = [ ...@@ -89,12 +102,12 @@ export const formSchema: FormSchema[] = [
}, },
{ {
field: 'name', field: 'name',
label: '文档分类名称', label: '名词分类名称',
component: 'Input', component: 'Input',
rules: [ rules: [
{ {
required: true, required: true,
message: '请输入文档分类名称', message: '请输入名词分类名称',
}, },
], ],
}, },
...@@ -128,29 +141,6 @@ export const formSchema: FormSchema[] = [ ...@@ -128,29 +141,6 @@ export const formSchema: FormSchema[] = [
}, },
}, },
}, },
{
field: 'flag',
label: '权限模式',
component: 'RadioGroup',
colProps: { lg: 24, md: 24 },
componentProps: {
options: [
{ label: '本级定义', value: '1' },
{ label: '资源自定义', value: '0' },
],
},
},
{
field: 'group',
label: '权属工作组',
component: 'Select',
componentProps: {
options: [
{ label: '默认工作组', value: '1' },
{ label: '默认工作组2', value: '0' },
],
},
},
] ]
export const formSchemaManage: FormSchema[] = [ export const formSchemaManage: FormSchema[] = [
...@@ -175,12 +165,12 @@ export const formSchemaManage: FormSchema[] = [ ...@@ -175,12 +165,12 @@ export const formSchemaManage: FormSchema[] = [
}, },
{ {
field: 'name', field: 'name',
label: '文档名称', label: '名词中文名',
component: 'Input', component: 'Input',
rules: [ rules: [
{ {
required: true, required: true,
message: '请输入文档分类名称', message: '请输入名词中文名',
}, },
], ],
}, },
...@@ -188,7 +178,7 @@ export const formSchemaManage: FormSchema[] = [ ...@@ -188,7 +178,7 @@ export const formSchemaManage: FormSchema[] = [
field: 'type', field: 'type',
label: '标准类型', label: '标准类型',
component: 'Input', component: 'Input',
defaultValue:'引用文档管理', defaultValue:'命名字典',
componentProps: { componentProps: {
readonly: true, readonly: true,
disabled: true, disabled: true,
......
<template> <template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit"> <BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
<div class="modalRow">
<div>可见范围</div>
<div class="right">
<div class="clearAll">
清空
</div>
<div>
<a-button type="primary">添加工作组</a-button>
</div>
</div>
</div>
<div class="addDialogBG">
<TreeTwo class="w-1/4 xl:w-1/5" @select="handleSelect" />
</div>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
......
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