3e3c2dab by xukangle

Merge branch 'dev_20241202_xukangle' into develop

2 parents b30375b8 210b5eb5
...@@ -3,7 +3,7 @@ VITE_APP_TITLE = 数据资产管理系统 ...@@ -3,7 +3,7 @@ VITE_APP_TITLE = 数据资产管理系统
3 # 接口域名 3 # 接口域名
4 # VITE_API_BASEURL = https://www.zgsjzc.com/api 4 # VITE_API_BASEURL = https://www.zgsjzc.com/api
5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api 5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api
6 # VITE_API_BASEURL = http://10.4.82.30:8052/ 6 # VITE_API_BASEURL = http://localhost:9000
7 VITE_API_BASEURL = http://10.4.82.1:28052/ 7 VITE_API_BASEURL = http://10.4.82.1:28052/
8 # 平台用户 接口请地址 8 # 平台用户 接口请地址
9 VITE_APP_USER_API_BASEURL = gateway-server/user 9 VITE_APP_USER_API_BASEURL = gateway-server/user
...@@ -24,10 +24,10 @@ VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service ...@@ -24,10 +24,10 @@ VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
24 #数据质量接口地址 24 #数据质量接口地址
25 VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service 25 VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
26 26
27 #数据盘点接口地址 27 #数据盘点接口地址ms-daop-zcgl-data-inventory
28 # VITE_APP_CHECK_BASEURL = /mock
28 VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory 29 VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory
29 30
30
31 #门户接口 31 #门户接口
32 VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal 32 VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
33 33
......
...@@ -54,7 +54,6 @@ declare module '@vue/runtime-core' { ...@@ -54,7 +54,6 @@ declare module '@vue/runtime-core' {
54 Table_tools: typeof import('./src/components/Tools/table_tools.vue')['default'] 54 Table_tools: typeof import('./src/components/Tools/table_tools.vue')['default']
55 Table_v2: typeof import('./src/components/Table/table_v2.vue')['default'] 55 Table_v2: typeof import('./src/components/Table/table_v2.vue')['default']
56 Tabs: typeof import('./src/components/Tabs/index.vue')['default'] 56 Tabs: typeof import('./src/components/Tabs/index.vue')['default']
57 TemplateItem: typeof import('./src/components/TemplateItem/index.vue')['default']
58 Toolbar: typeof import('./src/components/LineageGraph/toolbar.vue')['default'] 57 Toolbar: typeof import('./src/components/LineageGraph/toolbar.vue')['default']
59 Topbar: typeof import('./src/components/LineageGraph/topbar.vue')['default'] 58 Topbar: typeof import('./src/components/LineageGraph/topbar.vue')['default']
60 Transfer: typeof import('./src/components/Transfer/index.vue')['default'] 59 Transfer: typeof import('./src/components/Transfer/index.vue')['default']
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
35 "lodash-es": "^4.17.21", 35 "lodash-es": "^4.17.21",
36 "md5": "^2.3.0", 36 "md5": "^2.3.0",
37 "mitt": "^3.0.0", 37 "mitt": "^3.0.0",
38 "mockjs": "^1.1.0",
39 "moment": "^2.29.4", 38 "moment": "^2.29.4",
40 "nprogress": "^0.2.0", 39 "nprogress": "^0.2.0",
41 "path-browserify": "^1.0.1", 40 "path-browserify": "^1.0.1",
...@@ -67,6 +66,7 @@ ...@@ -67,6 +66,7 @@
67 "fs-extra": "^11.1.1", 66 "fs-extra": "^11.1.1",
68 "http-server": "^14.1.1", 67 "http-server": "^14.1.1",
69 "lint-staged": "^13.2.2", 68 "lint-staged": "^13.2.2",
69 "mockjs": "^1.1.0",
70 "npm-run-all": "^4.1.5", 70 "npm-run-all": "^4.1.5",
71 "plop": "^3.1.2", 71 "plop": "^3.1.2",
72 "postcss-html": "^1.5.0", 72 "postcss-html": "^1.5.0",
......
...@@ -129,3 +129,100 @@ export const getGradeTreeList = () => request({ ...@@ -129,3 +129,100 @@ export const getGradeTreeList = () => request({
129 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/grade/tree-list`, 129 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/grade/tree-list`,
130 method: 'post', 130 method: 'post',
131 }) 131 })
132
133 /**
134 * 分类树形列表
135 * @param {Object}
136 * @path /classify/tree-list
137 * */
138 export const getClassifyTreeList = (data) => request({
139 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/tree-list`,
140 method: 'post',
141 data
142 })
143
144 /**
145 * 分类新增
146 * @param {Object}
147 * @path /classify/save
148 * */
149
150 export const saveClassify = (data) => request({
151 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/save`,
152 method: 'post',
153 data
154 })
155
156 /**
157 * 分类更新
158 * @param {Object}
159 * @path /classify/update
160 */
161
162 export const updateClassify = (data) => request({
163 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/update`,
164 method: 'post',
165 data
166 })
167
168 /**删除分类
169 * @param {Object}
170 * @path /classify/delete
171 */
172 export const deleteClassify = (data) => request({
173 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/delete?guid=${data.guid}`,
174 method: 'delete',
175 })
176
177
178 /** ---------------分类分级模板------------------------ */
179
180 /**
181 * 分类分级模板新增
182 * @param {Object}
183 * @path /cg-template/save
184 */
185
186 export const saveCgTemplate = (data) => request({
187 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-template/save`,
188 method: 'post',
189 data
190 })
191
192 /**
193 * 分类分级模板左侧树形列表
194 * @param {Object}
195 * @path /cg-template-classify/tree-list
196 */
197 export const getCgTemplateClassifyTreeList = (data) => request({
198 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-template-classify/tree-list`,
199 method: 'post',
200 data
201 })
202
203
204 /**-------------------------分类分级目录--------------------------------- */
205
206 /**
207 * 分类分级目录树形列表
208 * @param {Object}
209 * @path /cg-dir/tree-list
210 */
211
212 export const getCgDirTreeList = (data) => request({
213 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/tree-list`,
214 method: 'post',
215 data
216 })
217
218 /**
219 * 分类分级目录-分页
220 * @param {Object}
221 * @path /cg-dir/field/page-list
222 */
223
224 export const getCgDirFieldPageList = (data) => request({
225 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/field/page-list`,
226 method: 'post',
227 data
228 })
......
1 import request from "@/utils/request";
2
3 /**
4 * 远程获取标签
5 * @param {Object}
6 * @path /cg-label/label-serach
7 * @method get
8 * @des query查询 label
9 */
10
11 export const getLabelList = (data) => request({
12 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/label-serach?label=${data.label}`,
13 method: 'get',
14 })
15
16
17 /**
18 * 分类分级树形目录
19 * @param {no params}
20 * @path /classify-grade/tree-list
21 * @method post
22 */
23
24 export const getClassifyGradeTreeList = () => request({
25 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify-grade/tree-list`,
26 method: 'post',
27 })
28
29 /**
30 * @des 新增标签规则
31 * @param {Object}
32 * @path /cg-label/save
33 */
34
35 export const saveLabel = (data) => request({
36 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/save`,
37 method: 'post',
38 data
39 })
40
41
42 /**
43 * @des 获取标签页规则列表
44 * @param {Object}
45 * @path /cg-label/page-list
46 */
47
48 export const getLabelPageList = (data) => request({
49 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`,
50 method: 'post',
51 data
52 })
53
54 /**
55 * @des 删除标签规则
56 * @param {Array}
57 * @path /cg-label/delete
58 */
59
60 export const deleteLabel = (data) => request({
61 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/delete`,
62 method: 'delete',
63 data
64 })
65
66 /**
67 * @des 标签规则修改
68 * @param {Object}
69 * @path /cg-label/update
70 */
71
72 export const updateLabel = (data) => request({
73 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/update`,
74 method: 'post',
75 data
76 })
...@@ -14,6 +14,8 @@ const props = defineProps({ ...@@ -14,6 +14,8 @@ const props = defineProps({
14 }, 14 },
15 }); 15 });
16 16
17 const dialogRef = ref();
18
17 const dialogInfo = computed(() => { 19 const dialogInfo = computed(() => {
18 return { 20 return {
19 visible: props.dialogConfigInfo.visible, 21 visible: props.dialogConfigInfo.visible,
...@@ -49,10 +51,16 @@ const formDialogRadioGroupChange = (val, row, item) => { ...@@ -49,10 +51,16 @@ const formDialogRadioGroupChange = (val, row, item) => {
49 const formDialogSelectChange = (val, item, row) => { 51 const formDialogSelectChange = (val, item, row) => {
50 emits('formDialogSelectChange', val, row, item); 52 emits('formDialogSelectChange', val, row, item);
51 } 53 }
54 defineExpose({
55 dialogRef,
56 });
52 57
53 </script> 58 </script>
54 59
55 <template> 60 <template>
56 <Dialog :dialogInfo="dialogInfo" @btnClick="formDialogBtnClick" @radioGroupChange="formDialogRadioGroupChange" 61 <Dialog ref="dialogRef" :dialogInfo="dialogInfo" @btnClick="formDialogBtnClick"
57 @select-change="formDialogSelectChange" /> 62 @radioGroupChange="formDialogRadioGroupChange" @select-change="formDialogSelectChange">
63 <!-- 默认插槽内容 -->
64 <slot></slot>
65 </Dialog>
58 </template> 66 </template>
......
...@@ -99,7 +99,7 @@ const onClickOutside = (e: any) => { ...@@ -99,7 +99,7 @@ const onClickOutside = (e: any) => {
99 }; 99 };
100 100
101 const getDrawerConRef = (refName) => { 101 const getDrawerConRef = (refName) => {
102 if(refName == 'drawerTableRef'){ 102 if (refName == 'drawerTableRef') {
103 const dtf = drawerTableRef.value[0] || drawerTableRef.value 103 const dtf = drawerTableRef.value[0] || drawerTableRef.value
104 return dtf?.tableRef 104 return dtf?.tableRef
105 } 105 }
...@@ -228,90 +228,45 @@ const drawerClose = () => { ...@@ -228,90 +228,45 @@ const drawerClose = () => {
228 </script> 228 </script>
229 229
230 <template> 230 <template>
231 <el-drawer 231 <el-drawer v-model="drawerVisible" :direction="drawerDirection" :size="drawerSize" :modal="drawerModal"
232 v-model="drawerVisible" 232 :close-on-click-modal="modalClose" :close-on-press-escape="modalClose" :modal-class="drawerModalClass"
233 :direction="drawerDirection" 233 destroy-on-close :z-index="props.drawerInfo.zIndex ?? null" @close="drawerClose">
234 :size="drawerSize"
235 :modal="drawerModal"
236 :close-on-click-modal="modalClose"
237 :close-on-press-escape="modalClose"
238 :modal-class="drawerModalClass"
239 destroy-on-close
240 :z-index="props.drawerInfo.zIndex ?? null"
241 @close="drawerClose"
242 >
243 <template #header> 234 <template #header>
244 <span class="title">{{ drawerTitle }}</span> 235 <span class="title">{{ drawerTitle }}</span>
245 </template> 236 </template>
246 <template #default> 237 <template #default>
247 <div class="drawer-body-loading" v-if="drawerInfo.loading ?? false" v-loading="drawerInfo.loading ?? false"></div> 238 <div class="drawer-body-loading" v-if="drawerInfo.loading ?? false" v-loading="drawerInfo.loading ?? false"></div>
248 <div 239 <div v-else class="drawer_panel" :class="[con.col]" :style="con.style" v-for="con in contents">
249 v-else
250 class="drawer_panel"
251 :class="[con.col]"
252 :style="con.style"
253 v-for="con in contents"
254 >
255 <div class="panel_title" v-if="con.title">{{ con.title }}</div> 240 <div class="panel_title" v-if="con.title">{{ con.title }}</div>
256 <template v-if="con.type && con.type.indexOf('table') > -1"> 241 <template v-if="con.type && con.type.indexOf('table') > -1">
257 <div 242 <div class="table_tool" :class="[con.tableTool.col]" v-if="con.tableTool && (con.tableTool.visible ?? true)">
258 class="table_tool"
259 :class="[con.tableTool.col]"
260 v-if="con.tableTool && (con.tableTool.visible ?? true)"
261 >
262 <template v-for="bar in con.tableTool.btns"> 243 <template v-for="bar in con.tableTool.btns">
263 <el-popover 244 <el-popover v-if="bar.popover" :visible="bar.popover.visible" :title="bar.popover.title"
264 v-if="bar.popover" 245 :popper-class="bar.popover.class ?? ''" placement="bottom-start" :width="bar.popover.width ?? 200"
265 :visible="bar.popover.visible" 246 trigger="click">
266 :title="bar.popover.title"
267 :popper-class="bar.popover.class ?? ''"
268 placement="bottom-start"
269 :width="bar.popover.width ?? 200"
270 trigger="click"
271 >
272 <template #reference> 247 <template #reference>
273 <el-button 248 <el-button :type="bar.type" @click="toolBtnClick(bar, con.type)" v-click-outside="onClickOutside"
274 :type="bar.type" 249 v-preReClick>{{ bar.label }}</el-button>
275 @click="toolBtnClick(bar, con.type)"
276 v-click-outside="onClickOutside"
277 v-preReClick
278 >{{ bar.label }}</el-button
279 >
280 </template> 250 </template>
281 <template #default> 251 <template #default>
282 <span v-html="bar.popover.content"></span> 252 <span v-html="bar.popover.content"></span>
283 </template> 253 </template>
284 </el-popover> 254 </el-popover>
285 <el-button 255 <el-button :type="bar.type" :plain="bar.plain" v-else @click="toolBtnClick(bar, 'table')" v-preReClick>{{
286 :type="bar.type" 256 bar.label
287 :plain="bar.plain" 257 }}</el-button>
288 v-else
289 @click="toolBtnClick(bar, 'table')"
290 v-preReClick
291 >{{ bar.label }}</el-button
292 >
293 </template> 258 </template>
294 </div> 259 </div>
295 <div class="table_panel_wrap" :style="con.tableInfo.style"> 260 <div class="table_panel_wrap" :style="con.tableInfo.style">
296 <Table 261 <Table ref="drawerTableRef" :class="[con.tableInfo.col]" :tableInfo="con.tableInfo"
297 ref="drawerTableRef" 262 @tableSelectChange="tableSelectChange" @tableBtnClick="tableBtnClick"
298 :class="[con.tableInfo.col]" 263 @tableSelectionChange="tableSelectionChange" @tableInputChange="tableInputChange"
299 :tableInfo="con.tableInfo" 264 @tablePageChange="tablePageChange" />
300 @tableSelectChange="tableSelectChange"
301 @tableBtnClick="tableBtnClick"
302 @tableSelectionChange="tableSelectionChange"
303 @tableInputChange="tableInputChange"
304 @tablePageChange="tablePageChange"
305 />
306 </div> 265 </div>
307 </template> 266 </template>
308 <template v-else-if="con.type && con.type.indexOf('tree') > -1"> 267 <template v-else-if="con.type && con.type.indexOf('tree') > -1">
309 <div class="list_tree" v-if="con.type.indexOf('list') > -1"> 268 <div class="list_tree" v-if="con.type.indexOf('list') > -1">
310 <ListPanel 269 <ListPanel ref="formListRef" :listInfo="con.listInfo" @itemClick="listItemClick" />
311 ref="formListRef"
312 :listInfo="con.listInfo"
313 @itemClick="listItemClick"
314 />
315 <Tree ref="formTreeRef" :treeInfo="con.treeInfo" /> 270 <Tree ref="formTreeRef" :treeInfo="con.treeInfo" />
316 </div> 271 </div>
317 <Tree ref="formTreeRef" :treeInfo="con.treeInfo" v-else /> 272 <Tree ref="formTreeRef" :treeInfo="con.treeInfo" v-else />
...@@ -329,23 +284,12 @@ const drawerClose = () => { ...@@ -329,23 +284,12 @@ const drawerClose = () => {
329 </template> 284 </template>
330 <template v-else-if="con.type && con.type.indexOf('upload') > -1"> 285 <template v-else-if="con.type && con.type.indexOf('upload') > -1">
331 <div class="upload_tool"> 286 <div class="upload_tool">
332 <UploadFiles 287 <UploadFiles ref="uploadRef" :upload-info="con.uploadInfo" @onUpload="onUpload" @beforeUPload="beforeUPload"
333 ref="uploadRef" 288 @uploadFile="uploadFile" @uploadBtnClick="uploadBtnClick" />
334 :upload-info="con.uploadInfo"
335 @onUpload="onUpload"
336 @beforeUPload="beforeUPload"
337 @uploadFile="uploadFile"
338 @uploadBtnClick="uploadBtnClick"
339 />
340 <div class="tool_btns" v-if="con.tools && con.tools.visible"> 289 <div class="tool_btns" v-if="con.tools && con.tools.visible">
341 <template v-for="btn in con.tools.btns"> 290 <template v-for="btn in con.tools.btns">
342 <el-button 291 <el-button v-if="btn.visible ?? true" :type="btn.type" :plain="btn.plain"
343 v-if="btn.visible ?? true" 292 @click="toolBtnClick(btn, 'table')" v-preReClick>
344 :type="btn.type"
345 :plain="btn.plain"
346 @click="toolBtnClick(btn, 'table')"
347 v-preReClick
348 >
349 <el-icon v-if="btn.icon && btn.icon == 'Upload'"> 293 <el-icon v-if="btn.icon && btn.icon == 'Upload'">
350 <Upload /> 294 <Upload />
351 </el-icon> 295 </el-icon>
...@@ -357,49 +301,28 @@ const drawerClose = () => { ...@@ -357,49 +301,28 @@ const drawerClose = () => {
357 </template> 301 </template>
358 </div> 302 </div>
359 </div> 303 </div>
360 <div 304 <div class="upload_table_panel_wrap" v-if="con.tableInfo && Object.keys(con.tableInfo).length">
361 class="upload_table_panel_wrap" 305 <Table ref="drawerTableRef" :class="[con.tableInfo.col]" :tableInfo="con.tableInfo"
362 v-if="con.tableInfo && Object.keys(con.tableInfo).length" 306 @tableSelectChange="tableSelectChange" @tableBtnClick="tableBtnClick"
363 > 307 @tableSelectionChange="tableSelectionChange" @tableInputChange="tableInputChange"
364 <Table 308 @tablePageChange="tablePageChange" />
365 ref="drawerTableRef"
366 :class="[con.tableInfo.col]"
367 :tableInfo="con.tableInfo"
368 @tableSelectChange="tableSelectChange"
369 @tableBtnClick="tableBtnClick"
370 @tableSelectionChange="tableSelectionChange"
371 @tableInputChange="tableInputChange"
372 @tablePageChange="tablePageChange"
373 />
374 </div> 309 </div>
375 </template> 310 </template>
376 <template v-else> 311 <template v-else>
377 <Form 312 <Form ref="drawerFormRef" :itemList="con.formInfo.items" :formId="con.formInfo.id" :rules="con.formInfo.rules"
378 ref="drawerFormRef" 313 :col="con.formInfo.col" :readonly="con.formInfo.readonly" @radioGroupChange="radioGroupChange"
379 :itemList="con.formInfo.items" 314 @selectChange="formSelectChange" @btnClick="formBtnClick">
380 :formId="con.formInfo.id" 315 </Form>
381 :rules="con.formInfo.rules" 316 <!-- 插槽内容 -->
382 :col="con.formInfo.col" 317 <slot></slot>
383 :readonly="con.formInfo.readonly"
384 @radioGroupChange="radioGroupChange"
385 @selectChange="formSelectChange"
386 @btnClick="formBtnClick"
387 />
388 </template> 318 </template>
389 </div> 319 </div>
390 </template> 320 </template>
391 <template #footer v-if="footer.visible ?? true"> 321 <template #footer v-if="footer.visible ?? true">
392 <div style="flex: auto"> 322 <div style="flex: auto">
393 <template v-for="btn in footer.btns"> 323 <template v-for="btn in footer.btns">
394 <el-button 324 <el-button v-if="btn.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false"
395 v-if="btn.visible ?? true" 325 @click="btnClick(btn, null)" v-preReClick :loading="btn.loading ?? false">{{ btn.label }}</el-button>
396 :type="btn.type"
397 :disabled="btn.disabled ?? false"
398 @click="btnClick(btn, null)"
399 v-preReClick
400 :loading="btn.loading ?? false"
401 >{{ btn.label }}</el-button
402 >
403 </template> 326 </template>
404 </div> 327 </div>
405 </template> 328 </template>
......
This diff could not be displayed because it is too large.
1 import type { MockMethod } from 'vite-plugin-mock'
2 import Mock from 'mockjs'
3
4
5 export const confirmDelivery = {
6 url: '/mock/youthBoost/admin/shipment',
7 method: 'post',
8 response: ({body}:{body:any}) => {
9
10 return {
11 code: 200,
12 message: '成功',
13 data: []
14 }
15 }
16 }
17
18
19 export default [confirmDelivery] as MockMethod[]
1 // import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
2
3 // const mocks: any[] = []
4 // const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
5 // Object.keys(mockContext).forEach((v) => {
6 // mocks.push(...(mockContext[v] as any).default)
7 // })
8
9 // export function setupProdMockServer() {
10 // createProdMockServer(mocks)
11 // }
12
1 import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer' 13 import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
14 import dataInventory from './mock/data_inventory'
2 15
3 const mocks: any[] = []
4 const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
5 Object.keys(mockContext).forEach((v) => {
6 mocks.push(...(mockContext[v] as any).default)
7 })
8 16
9 export function setupProdMockServer() { 17 export function setupProdMockServer() {
10 createProdMockServer(mocks) 18 createProdMockServer([...dataInventory,])
11 } 19 }
......
...@@ -89,7 +89,17 @@ const routes: RouteRecordRaw[] = [ ...@@ -89,7 +89,17 @@ const routes: RouteRecordRaw[] = [
89 name: 'templateConfig', 89 name: 'templateConfig',
90 component: () => import('@/views/data_inventory/templateConfig.vue'), 90 component: () => import('@/views/data_inventory/templateConfig.vue'),
91 meta: { 91 meta: {
92 title: '分类分级模板', 92 title: '分类分级标准',
93 breadcrumb: false,
94 cache: true
95 },
96 },
97 {
98 path: 'data-label',
99 name: 'dataLabel',
100 component: () => import('@/views/data_inventory/dataLabel.vue'),
101 meta: {
102 title: '标签管理',
93 breadcrumb: false, 103 breadcrumb: false,
94 cache: true 104 cache: true
95 }, 105 },
...@@ -109,7 +119,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -109,7 +119,7 @@ const routes: RouteRecordRaw[] = [
109 }, 119 },
110 beforeEnter: (to, from) => { 120 beforeEnter: (to, from) => {
111 if (to.query.classStandardName) { 121 if (to.query.classStandardName) {
112 to.meta.title = `编辑-${to.query.classStandardName}`; 122 to.meta.title = `编辑-${to.query.classStandardName}`;
113 } 123 }
114 } 124 }
115 }, 125 },
...@@ -165,6 +175,47 @@ const routes: RouteRecordRaw[] = [ ...@@ -165,6 +175,47 @@ const routes: RouteRecordRaw[] = [
165 } 175 }
166 } 176 }
167 }, 177 },
178 {
179 path: 'classificationTemplate-edit',
180 name: 'classificationTemplateEdit',
181 component: () => import('@/views/data_inventory/classificationTemplateEdit.vue'),
182 meta: {
183 title: '编辑-',
184 sidebar: false,
185 breadcrumb: false,
186 cache: true,
187 reuse: true,
188 editPage: true,
189 activeMenu: '/data-inventory/classify-grade-manage/template-config'
190 },
191 beforeEnter: (to, from) => {
192 if (to.query.classClassifyGradName) {
193 to.meta.title = `编辑-${to.query.classClassifyGradName}`;
194 }
195 }
196 },
197
198 ],
199 },
200 {
201 path: '/data-inventory/classify-grade-catalogue',
202 component: Layout,
203 meta: {
204 title: '分类分级目录',
205 icon: 'sidebar-videos',
206 },
207 children: [
208 {
209 path: '',
210 name: 'classifyGradeCatalogue',
211 component: () => import('@/views/data_inventory/classifyGradeCatalogue.vue'),
212 meta: {
213 title: '分类分级目录',
214 sidebar: false,
215 breadcrumb: false,
216 cache: true
217 },
218 },
168 ], 219 ],
169 } 220 }
170 ] 221 ]
......
...@@ -484,7 +484,7 @@ export const tagType = (row, type) => { ...@@ -484,7 +484,7 @@ export const tagType = (row, type) => {
484 } 484 }
485 } else if (type == 'state') { 485 } else if (type == 'state') {
486 switch (row[type]) { 486 switch (row[type]) {
487 case 'N': 487 case 'N':
488 state = 'warning'; 488 state = 'warning';
489 break; 489 break;
490 case "Y": 490 case "Y":
...@@ -552,6 +552,18 @@ export const tagType = (row, type) => { ...@@ -552,6 +552,18 @@ export const tagType = (row, type) => {
552 state = 'danger'//发布中 552 state = 'danger'//发布中
553 break; 553 break;
554 } 554 }
555 }else if (type == 'status'){
556 switch (row[type]) {
557 case 'Y':
558 state = 'success';
559 break;
560 case 'S':
561 state = 'info';
562 break;
563 default:
564 state = 'info';
565 break;
566 }
555 } 567 }
556 return state; 568 return state;
557 } 569 }
......
...@@ -237,7 +237,7 @@ const newCreateGradeFormItems = ref([{ ...@@ -237,7 +237,7 @@ const newCreateGradeFormItems = ref([{
237 { 237 {
238 label: '分级描述', 238 label: '分级描述',
239 type: 'textarea', 239 type: 'textarea',
240 maxlength: 50, 240 maxlength: 500,
241 placeholder: '分类分级的描述说明', 241 placeholder: '分类分级的描述说明',
242 field: 'gradeDesc', 242 field: 'gradeDesc',
243 default: '', 243 default: '',
......
...@@ -6,20 +6,54 @@ ...@@ -6,20 +6,54 @@
6 import router from "@/router"; 6 import router from "@/router";
7 import { getMetaDataBase } from '@/api/modules/dataMetaService'; 7 import { getMetaDataBase } from '@/api/modules/dataMetaService';
8 import { ref } from "vue"; 8 import { ref } from "vue";
9 9 import { getClassifyGradList, saveCgTemplate } from "@/api/modules/dataInventory";
10 10
11 onMounted(async () => { 11 onMounted(async () => {
12 const params = { 12 const params = {
13 pageIndex: 1, 13 pageIndex: 1,
14 pageSize: -1, 14 pageSize: -1,
15 } 15 }
16 const res = await getMetaDataBase(params) 16 const res = await getMetaDataBase(params);
17 console.log(res); 17 tableInfo.value.data = res.data.records;
18 getGradListData();
19 getClassifyDataList();
20 });
21
22 const { proxy } = getCurrentInstance() as any;
23 const refGradePageParams = ref({
24 pageIndex: 1,
25 pageSize: -1,
26 type: "G"
27 });
28 const refClassifyPageParams = ref({
29 pageIndex: 1,
30 pageSize: -1,
31 type: "C"
18 }); 32 });
19 33
34 const gradListData = ref([]);
35 const classifyDataList = ref([]);
36 // 获取分级列表
37 const getGradListData = async () => {
38 const res: any = await getClassifyGradList(refGradePageParams.value);
39 gradListData.value = res.data.records;
40 newCreateTemplateFormItems.value[2].options = gradListData.value;
41 };
42
43 // 获取分类列表
44 const getClassifyDataList = async () => {
45 const res: any = await getClassifyGradList(refClassifyPageParams.value);
46 classifyDataList.value = res.data.records;
47 newCreateTemplateFormItems.value[1].options = classifyDataList.value;
48 };
49
50
51
20 // 表单引用 52 // 表单引用
21 const formRef = ref(); 53 const formRef = ref();
22 const tableRef = ref(); 54 const tableRef = ref();
55 // 元数据metaGuids
56 const metaGuids = ref<any>([]);
23 const fullscreenLoading = ref(false); 57 const fullscreenLoading = ref(false);
24 const isExpand = ref(true); 58 const isExpand = ref(true);
25 const newCreateTemplateFormItems = ref([{ 59 const newCreateTemplateFormItems = ref([{
...@@ -27,7 +61,7 @@ const newCreateTemplateFormItems = ref([{ ...@@ -27,7 +61,7 @@ const newCreateTemplateFormItems = ref([{
27 type: 'input', 61 type: 'input',
28 maxlength: 50, 62 maxlength: 50,
29 placeholder: '请输入', 63 placeholder: '请输入',
30 field: 'templeteName', 64 field: 'templateName',
31 default: '', 65 default: '',
32 clearable: true, 66 clearable: true,
33 required: true 67 required: true
...@@ -35,9 +69,13 @@ const newCreateTemplateFormItems = ref([{ ...@@ -35,9 +69,13 @@ const newCreateTemplateFormItems = ref([{
35 label: '行业分类', 69 label: '行业分类',
36 type: 'select', 70 type: 'select',
37 placeholder: '请选择', 71 placeholder: '请选择',
38 field: ' industryCategory', 72 field: 'classifyGuid',
39 default: '', 73 default: '',
40 options: [], //TODO 74 options: [], //TODO
75 props: {
76 label: 'name',
77 value: 'guid'
78 },
41 required: true, 79 required: true,
42 filterable: true, 80 filterable: true,
43 clearable: true, 81 clearable: true,
...@@ -46,9 +84,13 @@ const newCreateTemplateFormItems = ref([{ ...@@ -46,9 +84,13 @@ const newCreateTemplateFormItems = ref([{
46 label: '分级标准', 84 label: '分级标准',
47 type: 'select', 85 type: 'select',
48 placeholder: '请选择', 86 placeholder: '请选择',
49 field: ' gradingStandard', 87 field: 'gradeGuid',
50 default: '', 88 default: '',
51 options: [], //TODO 89 options: [], //TODO
90 props: {
91 label: 'name',
92 value: 'guid'
93 },
52 required: true, 94 required: true,
53 filterable: true, 95 filterable: true,
54 clearable: true, 96 clearable: true,
...@@ -82,63 +124,14 @@ const tableInfo = ref({ ...@@ -82,63 +124,14 @@ const tableInfo = ref({
82 actionInfo: { 124 actionInfo: {
83 show: false, 125 show: false,
84 }, 126 },
85 data: [ 127 data: [],
86 {
87 index: 1,
88 databaseNameZh: "数据库名称",
89 databaseName: "数据库名",
90 tableCount: 0,
91 storageCapacities: 0,
92 columns: 0,
93 },
94 {
95 index: 2,
96 databaseNameZh: "数据库名称",
97 databaseName: "数据库名",
98 tableCount: 0,
99 storageCapacities: 0,
100 columns: 0,
101 },
102 {
103 index: 3,
104 databaseNameZh: "数据库名称",
105 databaseName: "数据库名",
106 tableCount: 0,
107 storageCapacities: 0,
108 columns: 0,
109 },
110 {
111 index: 4,
112 databaseNameZh: "数据库名称",
113 databaseName: "数据库名",
114 tableCount: 0,
115 storageCapacities: 0,
116 columns: 0,
117 },
118 {
119 index: 5,
120 databaseNameZh: "数据库名称",
121 databaseName: "数据库名",
122 tableCount: 0,
123 storageCapacities: 0,
124 columns: 0,
125 },
126 {
127 index: 6,
128 databaseNameZh: "数据库名称",
129 databaseName: "数据库名",
130 tableCount: 0,
131 storageCapacities: 0,
132 columns: 0,
133 },
134
135 ],
136 showPage: false, 128 showPage: false,
137 loading: false, 129 loading: false,
138 }); 130 });
139 131
140 const onTableSelectChange = (selection: any[]) => { 132 const onTableSelectChange = (selection: any[]) => {
141 console.log(selection); 133 // 遍历选中的元数据guid,然后存入metaGuids数组中
134 metaGuids.value = selection.map((item: any) => item.guid);
142 }; 135 };
143 136
144 const cancel = () => { 137 const cancel = () => {
...@@ -149,11 +142,24 @@ const cancel = () => { ...@@ -149,11 +142,24 @@ const cancel = () => {
149 const save = async () => { 142 const save = async () => {
150 console.log('save'); 143 console.log('save');
151 // 校验表单 144 // 校验表单
152 const res = formRef.value; 145 const formRes = formRef.value;
153 res.ruleFormRef.validate((valid: any) => { 146 formRes.ruleFormRef.validate(async (valid: any) => {
154 if (valid) { 147 if (valid) {
155 // 表单校验通过 148 // 表单校验通过
156 console.log('表单校验通过'); 149 const formData = formRes.formInline;
150 const params = {
151 ...formData,
152 metaGuids: metaGuids.value,
153 version: 0
154 };
155 const res: any = await saveCgTemplate(params);
156 if (res.code == proxy.$passCode) {
157 // 保存成功
158 proxy.$ElMessage.success(res.msg);
159 } else {
160 // 保存失败
161 proxy.$ElMessage.error(res.msg);
162 }
157 } else { 163 } else {
158 console.log('表单校验不通过'); 164 console.log('表单校验不通过');
159 return false; 165 return false;
......
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
21 <span>模板确认时间: {{ item.content.modelConfirmTime }}</span> 21 <span>模板确认时间: {{ item.content.modelConfirmTime }}</span>
22 </div> 22 </div>
23 <div class="botton-btn"> 23 <div class="botton-btn">
24 <el-button type="primary" class="off-line-btn">下线</el-button> 24 <el-button type="primary" plain class="off-line-btn">下线</el-button>
25 <el-button type="primary" class="templete-btn">模板训练</el-button> 25 <el-button>模板训练</el-button>
26 <el-button type="primary" class="delete-btn">删除</el-button> 26 <el-button>模板确认</el-button>
27 <el-button>删除</el-button>
27 </div> 28 </div>
28 </div> 29 </div>
29 </div> 30 </div>
...@@ -146,6 +147,7 @@ const getItemStyle = (status: string) => { ...@@ -146,6 +147,7 @@ const getItemStyle = (status: string) => {
146 borderTop: `4px solid ${borderColor}`, 147 borderTop: `4px solid ${borderColor}`,
147 }; 148 };
148 }; 149 };
150
149 </script> 151 </script>
150 152
151 <style scoped lang="scss"> 153 <style scoped lang="scss">
...@@ -259,22 +261,6 @@ const getItemStyle = (status: string) => { ...@@ -259,22 +261,6 @@ const getItemStyle = (status: string) => {
259 261
260 .botton-btn { 262 .botton-btn {
261 margin-top: 13px; 263 margin-top: 13px;
262
263 .off-line-btn {
264 background-color: #fff;
265 font-size: 14px;
266 color: #4FA1A4;
267
268 }
269
270 .templete-btn,
271 .delete-btn {
272
273 background: #FFFFFF;
274 border: 1px solid rgba(217, 217, 217, 1);
275 font-size: 14px;
276 color: #212121;
277 }
278 } 264 }
279 } 265 }
280 } 266 }
......
...@@ -15,6 +15,7 @@ import createBanner from './banner' ...@@ -15,6 +15,7 @@ import createBanner from './banner'
15 import AutoImport from 'unplugin-auto-import/vite'; 15 import AutoImport from 'unplugin-auto-import/vite';
16 import Components from 'unplugin-vue-components/vite'; 16 import Components from 'unplugin-vue-components/vite';
17 import { VantResolver } from '@vant/auto-import-resolver'; 17 import { VantResolver } from '@vant/auto-import-resolver';
18 import createMock from './mock'
18 19
19 export default function createVitePlugins(viteEnv, isBuild = false) { 20 export default function createVitePlugins(viteEnv, isBuild = false) {
20 const vitePlugins: (PluginOption | PluginOption[])[] = [ 21 const vitePlugins: (PluginOption | PluginOption[])[] = [
...@@ -37,5 +38,6 @@ export default function createVitePlugins(viteEnv, isBuild = false) { ...@@ -37,5 +38,6 @@ export default function createVitePlugins(viteEnv, isBuild = false) {
37 isBuild && vitePlugins.push(...createCompression(viteEnv)) 38 isBuild && vitePlugins.push(...createCompression(viteEnv))
38 vitePlugins.push(...createSpritesmith(isBuild)) 39 vitePlugins.push(...createSpritesmith(isBuild))
39 vitePlugins.push(createBanner()) 40 vitePlugins.push(createBanner())
41 vitePlugins.push(createMock(viteEnv.VITE_APP_CHECK_BASEURL, isBuild))
40 return vitePlugins 42 return vitePlugins
41 } 43 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!