c7acd525 by lihua

数据盘点分类标准

1 parent 8e6500f7
1 <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M32 64h342.304a32 32 0 0 1 17.76 5.376L576 192h416a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32z" fill="#ffb44a" p-id="1930"></path></svg>
...\ No newline at end of file ...\ No newline at end of file
...@@ -268,6 +268,7 @@ onMounted(() => { ...@@ -268,6 +268,7 @@ onMounted(() => {
268 :min-width="item.minWidth" 268 :min-width="item.minWidth"
269 :fixed="item.fixed" 269 :fixed="item.fixed"
270 :align="item.align" 270 :align="item.align"
271 :type="item.type == 'index' ? '' : undefined"
271 :sortable="item.sortable ?? false" 272 :sortable="item.sortable ?? false"
272 :prop="item.field" 273 :prop="item.field"
273 :class-name="item.columClass" 274 :class-name="item.columClass"
......
1 import type { RouteRecordRaw } from 'vue-router'
2
3 function Layout() {
4 return import('@/layouts/index.vue')
5 }
6
7 const routes: RouteRecordRaw[] = [
8 {
9 path: '/data-inventory/classify-grade-manage',
10 component: Layout,
11 meta: {
12 title: '分类分级管理',
13 icon: 'sidebar-videos',
14 },
15 children: [
16 {
17 path: 'task-config',
18 name: 'taskConfig',
19 component: () => import('@/views/data_inventory/taskConfig.vue'),
20 meta: {
21 title: '分类分级任务',
22 breadcrumb: false,
23 cache: true
24 },
25 },
26 {
27 path: 'template-config',
28 name: 'templateConfig',
29 component: () => import('@/views/data_inventory/templateConfig.vue'),
30 meta: {
31 title: '分类分级模板',
32 breadcrumb: false,
33 cache: true
34 },
35 },
36 {
37 path: 'classStandard-edit',
38 name: 'classStandardEdit',
39 component: () => import('@/views/data_inventory/classStandardEdit.vue'),
40 meta: {
41 title: '编辑-',
42 sidebar: false,
43 breadcrumb: false,
44 cache: true,
45 reuse: true,
46 editPage: true,
47 activeMenu: '/data-inventory/classify-grade-manage/template-config'
48 },
49 beforeEnter: (to, from) => {
50 if (to.query.classStandardName) {
51 to.meta.title = `编辑-${to.query.classStandardName}`;
52 }
53 }
54 },
55 ],
56 }
57 ]
58
59 export default routes
...@@ -4,6 +4,7 @@ import type { RouteRecordRaw } from 'vue-router' ...@@ -4,6 +4,7 @@ import type { RouteRecordRaw } from 'vue-router'
4 import DataAssess from './modules/dataAsset'; 4 import DataAssess from './modules/dataAsset';
5 import DataMeta from './modules/dataMeta'; 5 import DataMeta from './modules/dataMeta';
6 import DataQuality from './modules/dataQuality'; 6 import DataQuality from './modules/dataQuality';
7 import DataInventory from './modules/dataInventory';
7 8
8 import type { Route } from '#/global' 9 import type { Route } from '#/global'
9 import useSettingsStore from '@/store/modules/settings' 10 import useSettingsStore from '@/store/modules/settings'
...@@ -122,7 +123,14 @@ const asyncRoutes: Route.recordMainRaw[] = [ ...@@ -122,7 +123,14 @@ const asyncRoutes: Route.recordMainRaw[] = [
122 children: [ 123 children: [
123 ...DataQuality, 124 ...DataQuality,
124 ], 125 ],
125 } 126 }, {
127 meta: {
128 title: '数据盘点',
129 },
130 children: [
131 ...DataInventory,
132 ],
133 },
126 ] 134 ]
127 135
128 const constantRoutesByFilesystem = generatedRoutes.filter((item) => { 136 const constantRoutesByFilesystem = generatedRoutes.filter((item) => {
......
...@@ -227,6 +227,8 @@ const useUserStore = defineStore( ...@@ -227,6 +227,8 @@ const useUserStore = defineStore(
227 mark = 'data-sync' 227 mark = 'data-sync'
228 } else if (item.meta.title == '数据质量') { 228 } else if (item.meta.title == '数据质量') {
229 mark = 'data-quality' 229 mark = 'data-quality'
230 } else if (item.meta.title == '数据盘点') {
231 mark = 'data-inventory'
230 } else if (item.meta.title == '首页') { 232 } else if (item.meta.title == '首页') {
231 mark = 'data-asset-index' 233 mark = 'data-asset-index'
232 } else if (item.meta.title == '数据服务') { 234 } else if (item.meta.title == '数据服务') {
......
1 <route lang="yaml">
2 name: taskConfig //分类分级任务
3 </route>
4
5 <script lang="ts" setup name="taskConfig">
6 import { ref ,onMounted} from "vue";
7
8 </script>
9
10 <template>
11 <div>分类分级任务</div>
12 </template>
13
14 <style lang="scss" scoped>
15
16 </style>
...\ No newline at end of file ...\ No newline at end of file
1 <route lang="yaml">
2 name: taskConfig //分类分级模板
3 </route>
4
5 <script lang="ts" setup name="templateConfig">
6
7 import { ref, onMounted } from "vue";
8 import TableTools from '@/components/Tools/table_tools.vue';
9 import { MoreFilled } from "@element-plus/icons-vue";
10 import { commonPageConfig } from '@/components/PageNav/index';
11 import { useValidator } from '@/hooks/useValidator';
12
13 const router = useRouter();
14 const { required } = useValidator();
15 const { proxy } = getCurrentInstance() as any;
16
17 const tabsInfo = ref({
18 activeName: 'classStandard',
19 tabs: [
20 { label: '分类分级模板', name: 'classTemplate' },
21 { label: '分类标准', name: 'classStandard' },
22 { label: '分级标准', name: 'gradeStandard' }
23 ]
24 });
25
26 const tabChange = (val) => {
27 tabsInfo.value.activeName = val;
28 }
29
30 /** 模板的搜索配置 */
31 const searchItemList = ref([
32 {
33 type: 'input',
34 label: '',
35 field: 'templateName',
36 default: '',
37 maxlength: 50,
38 placeholder: '模板名称',
39 clearable: true,
40 visible: true
41 }
42 ]);
43
44 /** 搜索查询分类分级模板。 */
45 const searchTemplate = (val: any, clear: boolean = false) => {
46 // page.value.curr = 1;
47 // if (clear) {
48 // searchItemList.value.map(item => item.default = '')
49 // page.value.planName = '';
50 // page.value.state = null;
51 // getTableData();
52 // return;
53 // }
54 // page.value.planName = val.planName;
55 // page.value.state = val.state;
56 // getTableData();
57 };
58
59 /** ------------------------------- 分类标准相关 ------------------------------------- */
60
61 /** 分类标准的搜索配置 */
62 const classSearchItemList = ref([
63 {
64 type: 'input',
65 label: '',
66 field: 'classStandardName',
67 default: '',
68 maxlength: 50,
69 placeholder: '分类标准名称',
70 clearable: true,
71 visible: true
72 }
73 ]);
74
75 const classPage: any = ref({
76 ...commonPageConfig,
77 classStandardName: ''
78 });
79
80 const classListDataLoading = ref(false);
81
82 const classListData: any = ref([{
83 guid: '1',
84 name: '工业数据分类',
85 updateTime: '2020-12-12 10:10:10'
86 }, {
87 guid: '2'
88 }, {
89 guid: '3'
90 }, {
91 guid: '4'
92 }, {
93 guid: '5'
94 }, {
95 guid: '6'
96 }, {
97 guid: '7'
98 }]);
99
100 /** 记录点击省略号弹出菜单的visible */
101 const cardBtnVisible: any = ref(false);
102
103 /** 搜索查询分类标准 */
104 const searchClass = (val: any, clear: boolean = false) => {
105 classPage.value.curr = 1;
106 if (clear) {
107 classSearchItemList.value.map(item => item.default = '')
108 // classPage.value.planName = '';
109 getClassListData();
110 return;
111 }
112 // classPage.value.planName = '';
113 getClassListData();
114 };
115
116 const newCreateClass = () => {
117 newCreateClassStandardDialogInfo.value.visible = true;
118 classStandardFormItems.value.forEach(item => item.default = '');
119 }
120
121 const getClassListData = () => {
122 // classListDataLoading.value = true;
123 // getPlanList({
124 // pageIndex: classPage.value.curr,
125 // pageSize: classPage.value.limit,
126 // //TODO
127 // }).then((res: any) => {
128 // classListDataLoading.value = false;
129 // if (res === undefined) {
130 // return;
131 // }
132 // if (res.code == proxy.$passCode) {
133 // const data = res.data || {}
134 // classListData.value.data = data.records || [];
135 // } else {
136 // proxy.$ElMessage.error(res.msg);
137 // }
138 // })
139 }
140
141 /** 编辑分类 */
142 const handleClassDataEdit = (item) => {
143
144 }
145
146 const handleClassDataClick = (item) => {
147 router.push({
148 name: 'classStandardEdit',
149 query: {
150 guid: item.guid,
151 classStandardName: '工业分类'
152 }
153 });
154 }
155
156 const handleClassDataDel = (item) => {
157
158 }
159
160 const classStandardFormItems = ref([{
161 label: '分类名称',
162 type: 'input',
163 maxlength: 50,
164 placeholder: '请输入',
165 field: 'classStandardName',
166 default: '',
167 block: true,
168 clearable: true,
169 required: true
170 }, {
171 label: '分级标准',
172 type: 'select',
173 placeholder: '请选择',
174 field: 'gradeStandard',
175 default: 1,
176 options: [], //TODO
177 required: true,
178 filterable: true,
179 clearable: true,
180 visible: true,
181 block: true,
182 }]);
183
184 const classStandardFormRules = ref({
185 classStandardName: [required('请填写分类名称')],
186 gradeStandard: [required('请选择分级标准')]
187 });
188
189 const newCreateClassStandardDialogInfo = ref({
190 visible: false,
191 size: 460,
192 title: "新增分类",
193 type: "",
194 formInfo: {
195 id: "class-standard-form",
196 items: classStandardFormItems.value,
197 rules: classStandardFormRules.value,
198 },
199 submitBtnLoading: false,
200 btns: {
201 cancel: () => {
202 newCreateClassStandardDialogInfo.value.visible = false;
203 },
204 submit: (btn, info) => {
205 newCreateClassStandardDialogInfo.value.visible = false;
206 classPage.value.curr = 1;
207 getClassListData();
208 //跳转到编辑页面
209 router.push({
210 name: 'classStandardEdit',
211 query: {
212 guid: '1',
213 classStandardName: '工业分类'
214 }
215 });
216 }
217 }
218 })
219
220 const newCreateTemplate = () => {
221
222 }
223
224 const newCreateGrade = () => {
225
226 }
227
228 onBeforeMount(() => {
229 getClassListData();
230 })
231
232 </script>
233
234 <template>
235 <div class="container">
236 <Tabs :tabs-info="tabsInfo" @tab-change="tabChange" />
237 <div class="panel" v-show="tabsInfo.activeName == 'classTemplate'">
238 <div class="table_tool_wrap">
239 <TableTools :searchItems="searchItemList" :searchId="'template-manage-search'" @search="searchTemplate" />
240 <div class="tools_btns">
241 <el-button type="primary" @click="newCreateTemplate">新增模板</el-button>
242 </div>
243 </div>
244 </div>
245 <div class="panel" v-show="tabsInfo.activeName == 'classStandard'">
246 <div class="table_tool_wrap">
247 <TableTools :searchItems="classSearchItemList" :searchId="'template-manage-search'" @search="searchClass" />
248 <div class="tools_btns">
249 <el-button type="primary" @click="newCreateClass">新增分类</el-button>
250 </div>
251 </div>
252 <div class="data-content" v-loading="classListDataLoading">
253 <div class="card-content" v-for="item in classListData" :key="item.guid" @click="handleClassDataClick(item)">
254 <div class="type-btn">
255 <el-popover v-model="cardBtnVisible" placement="bottom" width="96" trigger="click"
256 popper-class="tree-item-edit-menu" :show-arrow="false" :hide-after="0">
257 <template #reference>
258 <el-icon color="#666" @click.stop="cardBtnVisible = true">
259 <MoreFilled />
260 </el-icon>
261 </template>
262 <div class="levitation-ul">
263 <span class="levitation-li" @click="handleClassDataClick(item)">配置</span>
264 <span class="levitation-li" @click="handleClassDataEdit(item)">编辑</span>
265 <span class="levitation-li" @click="handleClassDataDel(item)">删除</span>
266 </div>
267 </el-popover>
268 </div>
269 <el-icon class="title-icon">
270 <svg-icon name="folder" />
271 </el-icon>
272 <div class="title">{{ item.name }}</div>
273 <div class="desc-row">
274 <div class="desc">{{ '分级标准' }}</div>
275 <div class="desc">{{ item.updateTime }}</div>
276 </div>
277 </div>
278 <div v-if="!classListData.length" class="card-noData">
279 <img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
280 <span>暂无分类标准</span>
281 </div>
282 </div>
283 </div>
284 <div class="panel" v-show="tabsInfo.activeName == 'gradeStandard'">
285 <el-button type="primary" @click="newCreateGrade">新增分级</el-button>
286 </div>
287 <Dialog_form :dialogConfigInfo="newCreateClassStandardDialogInfo" />
288 </div>
289 </template>
290
291 <style lang="scss" scoped>
292 .container {
293 height: 100%;
294 padding: 12px 16px 20px 16px;
295
296 .panel {
297 height: calc(100% - 51px);
298 }
299 }
300
301 :deep(.table-tools) {
302 .tools_search {
303 padding: 0px;
304 }
305 }
306
307 .tools_btns {
308 padding: 8px 0px 16px;
309 }
310
311 .data-content {
312 height: calc(100% - 92px);
313 display: flex;
314 flex-wrap: wrap;
315 gap: 24px;
316 align-content: flex-start;
317 overflow-y: auto;
318
319 .card-noData {
320 height: 100%;
321 width: 100%;
322 background: #fafafa;
323 display: flex;
324 flex-direction: column;
325 justify-content: center;
326 align-items: center;
327 color: #909399;
328 font-size: 14px;
329 }
330
331 .card-content {
332 width: 18%;
333 max-width: 240px;
334 min-width: 220px;
335 height: 160px;
336 padding: 12px;
337 border: 1px solid var(--el-border-color-regular);
338 cursor: pointer;
339 display: flex;
340 flex-direction: column;
341 align-items: center;
342 position: relative;
343
344 &:hover {
345 border: 1px solid var(--el-color-primary);
346 }
347
348 :deep(.title-icon.el-icon) {
349 width: 40px;
350 height: 40px;
351 margin-top: 28px;
352 margin-bottom: 16px;
353
354 svg {
355 width: 40px;
356 height: 40px;
357 }
358 }
359
360 .title {
361 font-size: 14px;
362 color: #212121;
363 text-align: center;
364 line-height: 21px;
365 font-weight: 600;
366 margin-bottom: 12px;
367 }
368
369 .desc-row {
370 width: 100%;
371 display: flex;
372 justify-content: space-between;
373
374 .desc {
375 font-size: 12px;
376 color: #999999;
377 line-height: 18px;
378 }
379 }
380
381 .type-btn {
382 position: absolute;
383 right: 12px;
384 }
385 }
386 }
387 </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!