b727874e by fanguang

元数据

1 parent 7e3b567e
...@@ -155,6 +155,43 @@ const routes: RouteRecordRaw[] = [ ...@@ -155,6 +155,43 @@ const routes: RouteRecordRaw[] = [
155 }, 155 },
156 } 156 }
157 ] 157 ]
158 },
159 {
160 path: '/data-meta/metadata-standard',
161 component: Layout,
162 meta: { title: '元数据标准', icon: 'ep:grid' },
163 children: [
164 {
165 path: '',
166 name: 'metadataStandard',
167 component: () => import('@/views/data_meta/standard.vue'),
168 meta: {
169 title: '元数据标准管理',
170 breadcrumb: false,
171 cache: true
172 }
173 },
174 {
175 path: 'standard-query',
176 name: 'metadataStandardQuery',
177 component: () => import('@/views/data_meta/standard-query.vue'),
178 meta: {
179 title: '元数据标准查询',
180 breadcrumb: false,
181 cache: true
182 }
183 },
184 {
185 path: 'standard-codetable',
186 name: 'metadataStandardCodetable',
187 component: () => import('@/views/data_meta/standard-codetable.vue'),
188 meta: {
189 title: '标准代码表',
190 breadcrumb: false,
191 cache: true
192 }
193 }
194 ]
158 } 195 }
159 ] 196 ]
160 197
......
...@@ -1293,6 +1293,7 @@ const loadDrawer = async () => { ...@@ -1293,6 +1293,7 @@ const loadDrawer = async () => {
1293 drawerInfo.value.footer.btns.at(-2).visible = false 1293 drawerInfo.value.footer.btns.at(-2).visible = false
1294 drawerInfo.value.footer.btns.at(-3).visible = false 1294 drawerInfo.value.footer.btns.at(-3).visible = false
1295 drawerInfo.value.visible = true 1295 drawerInfo.value.visible = true
1296 console.log('table', formTable.value)
1296 }; 1297 };
1297 1298
1298 const batching = (type) => { 1299 const batching = (type) => {
......
1 <route lang="yaml">
2 name: metadataStandardCodetable
3 </route>
4
5 <script lang="ts" setup name="metadataStandardCodetable">
6 import { ref } from 'vue';
7 import { ElMessage } from "element-plus";
8 import Tree from '@/components/Tree/index.vue';
9 import TableTools from '@/components/Tools/table_tools.vue';
10 import { Search } from '@element-plus/icons-vue'
11 import { useRouter, useRoute } from "vue-router";
12 import { TableColumnWidth } from '@/utils/enum';
13 import { commonPageConfig } from '@/components/PageNav/index';
14
15 const { proxy } = getCurrentInstance() as any;
16 const router = useRouter();
17
18 const treeInfo:any = ref({
19 id: "data-pickup-tree",
20 filter: true,
21 queryValue: "",
22 queryPlaceholder: "请输入关键字搜索",
23 props: {
24 label: "name",
25 value: "guid",
26 },
27 nodeKey: 'guid',
28 expandedKey: [],
29 currentNodeKey: '',
30 expandOnNodeClick: false,
31 data: [],
32 loading: false
33 });
34 function nodeClick (data) {
35
36 }
37
38 /** 分页及搜索传参信息配置。 */
39 const tableSearchInput = ref('')
40 function getFirstPageData () {
41 page.value.curr = 1
42 toSearch({})
43 }
44 function toSearch (val: any, clear: boolean = false) {
45 let params: any = Object.keys(val).length ? { ...val } : {}
46 params.pageIndex = page.value.curr;
47 params.pageSize = page.value.limit;
48 params.name = tableSearchInput.value
49 getTableData(params);
50 }
51 const page = ref({
52 ...commonPageConfig,
53 collectTaskName: '',
54 dataSourceGuid: '',
55 taskState: null
56 });
57 const tableInfo = ref({
58 id: 'data-source-table',
59 fields: [
60 { label: '序号', type: 'index', width: TableColumnWidth.INDEX, align: 'center' },
61 { label: '代码名称', field: '1', width: 140 },
62 { label: '标准号', field: '2', width: 140 },
63 { label: '标准名称', field: '3', width: 140 },
64 { label: '启用状态', field: '4', width: 140 },
65 { label: '创建时间', field: '5', width: 140 }
66 ],
67 data: [],
68 page: {
69 type: 'normal',
70 rows: 0,
71 ...page.value
72 },
73 actionInfo: {
74 label: '操作',
75 type: 'btn',
76 width: 160,
77 btns: scope => {
78 let row = scope.row
79 return [
80 { label: '编辑', value: 'edit' },
81 { label: '删除', value: 'delete' },
82 ]
83 }
84 },
85 loading: false
86 })
87 function tableBtnClick (scope, btn) {
88
89 }
90 function tablePageChange (info) {
91 page.value.curr = Number(info.curr);
92 page.value.limit = Number(info.limit);
93 // getTableData();
94 }
95 function getTableData (params) {
96
97 }
98 function handleCreate () {
99 drawerInfo.value.visible = true;
100 drawerInfo.value.type = 'add';
101 drawerInfo.value.header.title = '新增标准代码';
102 drawerInfo.value.footer.visible = true;
103 }
104
105 // drawer form
106 const formRef = ref()
107 const formItems: any = ref([
108 {
109 label: '标准类型',
110 type: 'select',
111 placeholder: '请选择',
112 field: '1',
113 default: '1',
114 options: [],
115 clearable: true,
116 required: true
117 },
118 {
119 label: '代码名称',
120 type: 'input',
121 placeholder: '请输入',
122 field: '2',
123 default: '',
124 maxlength: 50,
125 clearable: true,
126 required: true
127 },
128 {
129 label: '标准号',
130 type: 'input',
131 placeholder: '请输入',
132 field: '3',
133 default: '',
134 maxlength: 50,
135 clearable: true,
136 required: true
137 },
138 {
139 label: '标准名称',
140 type: 'input',
141 placeholder: '请输入',
142 field: '4',
143 default: '',
144 maxlength: 50,
145 clearable: true,
146 required: true
147 },
148 {
149 label: '发布单位',
150 type: 'input',
151 placeholder: '请输入',
152 field: '5',
153 default: '',
154 maxlength: 50,
155 clearable: true,
156 required: true
157 },
158 {
159 label: '排序',
160 type: 'inputNumber',
161 placeholder: '请输入',
162 field: '6',
163 default: '',
164 maxlength: 50,
165 clearable: true,
166 required: true
167 },
168 {
169 label: '启用状态',
170 type: 'switch',
171 field: 'status',
172 default: false
173 },
174 {
175 label: '代码类型',
176 type: 'select',
177 placeholder: '请选择',
178 field: '7',
179 default: '1',
180 options: [],
181 clearable: true,
182 required: true
183 },
184 {
185 label: '编码字段',
186 type: 'select',
187 placeholder: '请选择',
188 field: '8',
189 default: '1',
190 options: [],
191 clearable: true,
192 required: true
193 },
194 {
195 label: '编码名称',
196 type: 'select',
197 placeholder: '请选择',
198 field: '9',
199 default: '1',
200 options: [],
201 clearable: true,
202 required: true
203 },
204 {
205 label: '层级结构',
206 type: 'input',
207 placeholder: '请输入',
208 field: '10',
209 default: '1',
210 options: [],
211 clearable: true,
212 required: true
213 }
214 ])
215 const formRules = ref({
216
217 })
218 const formInfo = ref({
219 type: 'form',
220 title: '',
221 col: 'span',
222 formInfo: {
223 id: 'add-dict-form',
224 col: 'col2',
225 items: formItems.value,
226 formRules: formRules.value
227 }
228 })
229 const formTable = ref({
230 type: "table",
231 title: "定义表结构",
232 col: 'no-margin',
233 style: {
234 height: 'calc(100% - 234px)'
235 },
236 tableInfo: {
237 id: "role-authority-table",
238 multiple: true,
239 minHeight: 'unset',
240 maxHeight: '100%',
241 fields: [
242 { label: '序号', type: 'index', width: 56, align: 'center' },
243 { label: '字段名称', field: 'name', width: 140, type: 'edit', customClass: 'edit-colum'}
244 ],
245 data: [],
246 showPage: false,
247 actionInfo: {
248 show: true,
249 label: "操作",
250 type: "btn",
251 width: 60,
252 fixed: 'right',
253 btns: [{ label: "删除", value: "remove" }]
254 },
255 editInfo: {},
256 readonly: false,
257 col: 'auto-height',
258 style: { height: 'calc(100% - 40px)'},
259 loading: false
260 },
261 tableTool: {
262 col: 'float-right',
263 visible: true,
264 btns: [
265 { label: "新增行", value: "add-row", type: 'primary', plain: true },
266 { label: "批量删除", value: "remove_batch" },
267 ]
268 },
269 })
270 // 新增drawer
271 const drawerInfo = ref({
272 visible: false,
273 direction: 'rtl',
274 size: 550,
275 header: {
276 title: '新增标准代码',
277 },
278 type: '',
279 container: {
280 contents: [formInfo.value, formTable.value],
281 },
282 footer: {
283 visible: true,
284 btns: [
285 { type: 'default', label: '取消', value: 'cancel' },
286 { type: 'primary', label: '保存', value: 'save' },
287 { type: 'primary', label: '保存并添加数据', value: 'saveAndAdd', visible: true }
288 ]
289 }
290 })
291 async function drawerBtnClick (btn, info) {
292
293 }
294 </script>
295
296 <template>
297 <div class="container_wrap full flex">
298 <div class="aside_wrap">
299 <div class="aside_title">标准代码列表</div>
300 <Tree :treeInfo="treeInfo" @nodeClick="nodeClick" />
301 </div>
302 <div class="main_wrap">
303 <div class="table_tool_wrap">
304 <div class="tools_btns">
305 <el-button type="primary" @click="handleCreate">新建</el-button>
306 <el-button>批量删除</el-button>
307 <el-button>批量导入</el-button>
308 </div>
309 <el-input class="table_search_input" v-model.trim="tableSearchInput" placeholder="代码名称搜索"
310 :suffix-icon="Search" clearable @change="val => getFirstPageData()" />
311 </div>
312 <div class="table_panel_wrap">
313 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange"
314 />
315 </div>
316 </div>
317 <Drawer
318 :drawerInfo="drawerInfo"
319 @drawerBtnClick="drawerBtnClick"
320 ref="drawerRef"
321 >
322 <!-- <Form ref="formRef"
323 :itemList="formItems"
324 formId="basic-info-form"
325 :rules="formRules"
326 /> -->
327 </Drawer>
328 </div>
329 </template>
330
331 <style scoped lang="scss">
332 .container_wrap {
333
334 .aside_wrap {
335 width: 200px;
336 }
337
338 .main_wrap {
339 padding: 10px 20px;
340
341
342 :deep(.el-tabs) {
343 height: 100%;
344
345 .el-tabs__header {
346 margin-bottom: 0;
347 }
348
349 .el-tabs__item {
350 height: 32px;
351 padding: 0px;
352 width: 144px;
353
354 &:last-child {
355 width: 130px;
356 }
357 }
358
359 .el-tabs__content {
360 height: calc(100% - 32px);
361 }
362
363 .el-tab-pane {
364 padding: 0px 16px;
365 height: 100%;
366 }
367 }
368 }
369
370 }
371
372 .tree_panel {
373 height: calc(100% - 36px);
374 padding-top: 0;
375
376 :deep(.el-tree) {
377 margin: 0;
378 overflow: hidden auto;
379 }
380 }
381
382 .table_tool_wrap {
383 display: flex;
384 flex-direction: column;
385
386 .el-input {
387 width: 230px;
388 height: 32px;
389 }
390
391 :deep(.el-input) {
392 .el-input__suffix-inner {
393 flex-direction: row-reverse;
394 -webkit-flex-direction: row-reverse;
395 display: flex;
396 }
397 }
398 }
399
400 .table_panel_wrap {
401 height: calc(100% - 44px);
402 }
403 </style>
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div>元数据标准查询</div>
3 </template>
4
5 <script>
6 export default {
7 }
8 </script>
9
10 <style>
11 </style>
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div>元数据标准</div>
3 </template>
4
5 <script>
6 export default {
7 }
8 </script>
9
10 <style>
11 </style>
...\ No newline at end of file ...\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!