Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop
Showing
4 changed files
with
243 additions
and
21 deletions
| ... | @@ -40,6 +40,13 @@ export const getListingCount = () => request({ | ... | @@ -40,6 +40,13 @@ export const getListingCount = () => request({ |
| 40 | method: 'post', | 40 | method: 'post', |
| 41 | }) | 41 | }) |
| 42 | 42 | ||
| 43 | // 驳回流程数据 | ||
| 44 | export const productRejectFlowData = (data) => request({ | ||
| 45 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/submit-flow`, | ||
| 46 | method: 'post', | ||
| 47 | data | ||
| 48 | }) | ||
| 49 | |||
| 43 | 50 | ||
| 44 | /** 获取数据产品上架详情 */ | 51 | /** 获取数据产品上架详情 */ |
| 45 | export const getListingDetail = (params) => request({ | 52 | export const getListingDetail = (params) => request({ | ... | ... |
| ... | @@ -26,7 +26,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -26,7 +26,7 @@ const routes: RouteRecordRaw[] = [ |
| 26 | path: '/data-asset/register-catalog', | 26 | path: '/data-asset/register-catalog', |
| 27 | component: Layout, | 27 | component: Layout, |
| 28 | meta: { | 28 | meta: { |
| 29 | title: '数据资产目录', | 29 | title: '数据产品目录', |
| 30 | icon: 'sidebar-videos', | 30 | icon: 'sidebar-videos', |
| 31 | }, | 31 | }, |
| 32 | children: [ | 32 | children: [ |
| ... | @@ -35,7 +35,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -35,7 +35,7 @@ const routes: RouteRecordRaw[] = [ |
| 35 | name: 'registerCatalogManagement', | 35 | name: 'registerCatalogManagement', |
| 36 | component: () => import('@/views/data_asset/registerCatalogManagement.vue'), | 36 | component: () => import('@/views/data_asset/registerCatalogManagement.vue'), |
| 37 | meta: { | 37 | meta: { |
| 38 | title: '数据资产目录', | 38 | title: '数据产品目录', |
| 39 | sidebar: false, | 39 | sidebar: false, |
| 40 | breadcrumb: false, | 40 | breadcrumb: false, |
| 41 | cache: true | 41 | cache: true |
| ... | @@ -46,7 +46,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -46,7 +46,7 @@ const routes: RouteRecordRaw[] = [ |
| 46 | name: 'registerCatalogCreate', | 46 | name: 'registerCatalogCreate', |
| 47 | component: () => import('@/views/data_asset/registerCatalogCreate.vue'), | 47 | component: () => import('@/views/data_asset/registerCatalogCreate.vue'), |
| 48 | meta: { | 48 | meta: { |
| 49 | title: '新建资产目录', | 49 | title: '新建产品目录', |
| 50 | sidebar: false, | 50 | sidebar: false, |
| 51 | breadcrumb: false, | 51 | breadcrumb: false, |
| 52 | cache: true, | 52 | cache: true, | ... | ... |
| ... | @@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user"; | ... | @@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user"; |
| 9 | import { ElMessage, ElMessageBox } from "element-plus"; | 9 | import { ElMessage, ElMessageBox } from "element-plus"; |
| 10 | 10 | ||
| 11 | import useDataAssetStore from "@/store/modules/dataAsset"; | 11 | import useDataAssetStore from "@/store/modules/dataAsset"; |
| 12 | import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList, getListingCount } from "@/api/modules/dataProduct"; | 12 | import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList, getListingCount, productRejectFlowData } from "@/api/modules/dataProduct"; |
| 13 | import { TableColumnWidth } from '@/utils/enum'; | 13 | import { TableColumnWidth } from '@/utils/enum'; |
| 14 | 14 | ||
| 15 | import TableTools from "@/components/Tools/table_tools.vue"; | 15 | import TableTools from "@/components/Tools/table_tools.vue"; |
| ... | @@ -194,7 +194,7 @@ const toSearch = (val: any, clear: boolean = false) => { | ... | @@ -194,7 +194,7 @@ const toSearch = (val: any, clear: boolean = false) => { |
| 194 | 194 | ||
| 195 | // 获取产品上架数量 | 195 | // 获取产品上架数量 |
| 196 | const getListingCountData = () => { | 196 | const getListingCountData = () => { |
| 197 | getListingCount({}).then((res: any) => { | 197 | getListingCount().then((res: any) => { |
| 198 | if (res.code == proxy.$passCode) { | 198 | if (res.code == proxy.$passCode) { |
| 199 | demandListData.value = res.data || []; | 199 | demandListData.value = res.data || []; |
| 200 | } else { | 200 | } else { |
| ... | @@ -335,65 +335,156 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -335,65 +335,156 @@ const tableBtnClick = (scope, btn) => { |
| 335 | } | 335 | } |
| 336 | if (type == 'pass') { | 336 | if (type == 'pass') { |
| 337 | approveSuggest.value = ''; | 337 | approveSuggest.value = ''; |
| 338 | if (listingFormRef.value) { | ||
| 339 | clearFormValues(listingFormRef.value.formInline); | ||
| 340 | listingFormRef.value.ruleFormRef.clearValidate(formInfo.value.items.map(item => item.field)) | ||
| 341 | listingFormRef.value.ruleFormRef.resetFields(formInfo.value.items.map(item => item.field)) | ||
| 342 | } | ||
| 343 | |||
| 338 | approveType.value = 'pass'; | 344 | approveType.value = 'pass'; |
| 339 | dialogTitle.value = '通过流程' | 345 | dialogTitle.value = '通过流程' |
| 340 | dialogVisible.value = true; | 346 | dialogVisible.value = true; |
| 341 | } | 347 | } |
| 342 | if (type == 'reject') { | 348 | if (type == 'reject') { |
| 343 | approveSuggest.value = ''; | 349 | approveSuggest.value = ''; |
| 350 | if (listingFormRef.value) { | ||
| 351 | clearFormValues(listingFormRef.value.formInline); | ||
| 352 | listingFormRef.value.ruleFormRef.clearValidate(formInfo.value.items.map(item => item.field)) | ||
| 353 | listingFormRef.value.ruleFormRef.resetFields(formInfo.value.items.map(item => item.field)) | ||
| 354 | } | ||
| 344 | approveType.value = 'reject'; | 355 | approveType.value = 'reject'; |
| 345 | dialogTitle.value = '驳回流程' | 356 | dialogTitle.value = '驳回流程' |
| 346 | dialogVisible.value = true; | 357 | dialogVisible.value = true; |
| 347 | } | 358 | } |
| 348 | if (type == 'up') { | 359 | if (type == 'up') { |
| 349 | tableSwitchChange('Y', scope, 'listingStatus') | 360 | // tableSwitchChange('Y', scope, 'listingStatus') |
| 361 | console.log('上架', scope) | ||
| 350 | } | 362 | } |
| 351 | if (type == 'down') { | 363 | if (type == 'down') { |
| 364 | // 需要二次确认 | ||
| 365 | ElMessageBox.confirm( | ||
| 366 | `确定下架该产品吗?`, | ||
| 367 | '提示', | ||
| 368 | { | ||
| 369 | confirmButtonText: '确定', | ||
| 370 | cancelButtonText: '取消', | ||
| 371 | type: 'warning', | ||
| 372 | } | ||
| 373 | ).then(() => { | ||
| 352 | tableSwitchChange('N', scope, 'listingStatus') | 374 | tableSwitchChange('N', scope, 'listingStatus') |
| 375 | }).catch(() => { | ||
| 376 | ElMessage({ | ||
| 377 | type: 'info', | ||
| 378 | message: '已取消' | ||
| 379 | }); | ||
| 380 | }) | ||
| 353 | } | 381 | } |
| 354 | } | 382 | } |
| 355 | 383 | const clearFormValues = (formInline) => { | |
| 384 | Object.keys(formInline).forEach(key => { | ||
| 385 | formInline[key] = ''; | ||
| 386 | }); | ||
| 387 | }; | ||
| 356 | const fullscreenLoading = ref(false); | 388 | const fullscreenLoading = ref(false); |
| 357 | const passSubmit = () => { | 389 | const passSubmit = () => { |
| 358 | let row = currTableData.value | 390 | let row = currTableData.value |
| 359 | console.log(row) | 391 | |
| 360 | dialogVisible.value = false; | 392 | listingFormRef.value.ruleFormRef.validate().then((valid) => { |
| 361 | fullscreenLoading.value = true; | 393 | if (valid) { |
| 362 | passFlowData({ | 394 | let complianceInfoMap = {} |
| 395 | formInfo.value.items.forEach((item) => { | ||
| 396 | assetsSafeInfo.value.forEach((item1) => { | ||
| 397 | if (item.label == item1.label) { | ||
| 398 | complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field] | ||
| 399 | } | ||
| 400 | }) | ||
| 401 | }) | ||
| 402 | productRejectFlowData({ | ||
| 363 | guid: row.approveVO.approveGuid, | 403 | guid: row.approveVO.approveGuid, |
| 364 | flowType: row.approveVO.flowType, | 404 | flowType: row.approveVO.flowType, |
| 365 | approveSuggest: approveSuggest.value, | 405 | approveSuggest: approveSuggest.value, |
| 366 | approveStaffGuid: userData.staffGuid, | 406 | approveStaffGuid: userData.staffGuid, |
| 407 | complianceInfoMap: complianceInfoMap | ||
| 367 | }).then((res: any) => { | 408 | }).then((res: any) => { |
| 368 | fullscreenLoading.value = false; | ||
| 369 | if (res.code == '00000') { | 409 | if (res.code == '00000') { |
| 410 | fullscreenLoading.value = false; | ||
| 370 | ElMessage.success('审批通过!') | 411 | ElMessage.success('审批通过!') |
| 412 | dialogVisible.value = false; | ||
| 371 | getTableData(); | 413 | getTableData(); |
| 372 | } else { | 414 | } else { |
| 373 | ElMessage.error(res.msg) | 415 | ElMessage.error(res.msg) |
| 374 | } | 416 | } |
| 375 | }) | 417 | }) |
| 418 | } | ||
| 419 | }) | ||
| 420 | // passFlowData({ | ||
| 421 | // guid: row.approveVO.approveGuid, | ||
| 422 | // flowType: row.approveVO.flowType, | ||
| 423 | // approveSuggest: approveSuggest.value, | ||
| 424 | // approveStaffGuid: userData.staffGuid, | ||
| 425 | // }).then((res: any) => { | ||
| 426 | // fullscreenLoading.value = false; | ||
| 427 | // if (res.code == '00000') { | ||
| 428 | // ElMessage.success('审批通过!') | ||
| 429 | // getTableData(); | ||
| 430 | // } else { | ||
| 431 | // ElMessage.error(res.msg) | ||
| 432 | // } | ||
| 433 | // }) | ||
| 376 | 434 | ||
| 377 | } | 435 | } |
| 378 | const rejectSubmit = () => { | 436 | const listingFormRef = ref<any>(); |
| 437 | const rejectSubmit = async () => { | ||
| 379 | if (!approveSuggest.value) return ElMessage.error('请填写驳回理由!') | 438 | if (!approveSuggest.value) return ElMessage.error('请填写驳回理由!') |
| 380 | let row = currTableData.value | 439 | let row = currTableData.value |
| 381 | dialogVisible.value = false; | 440 | |
| 382 | fullscreenLoading.value = true; | 441 | listingFormRef.value.ruleFormRef.validate().then((valid) => { |
| 383 | rejectFlowData({ | 442 | if (valid) { |
| 443 | console.log(listingFormRef.value.formInline, '-------------------') | ||
| 444 | let complianceInfoMap = {} | ||
| 445 | formInfo.value.items.forEach((item) => { | ||
| 446 | console.log(item, '-------------------') | ||
| 447 | assetsSafeInfo.value.forEach((item1) => { | ||
| 448 | if (item.label == item1.label) { | ||
| 449 | console.log(item1.value, item.default, '-------------------') | ||
| 450 | complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field] | ||
| 451 | } | ||
| 452 | }) | ||
| 453 | }) | ||
| 454 | productRejectFlowData({ | ||
| 384 | guid: row.approveVO.approveGuid, | 455 | guid: row.approveVO.approveGuid, |
| 385 | flowType: row.approveVO.flowType, | 456 | flowType: row.approveVO.flowType, |
| 386 | approveSuggest: approveSuggest.value, | 457 | approveSuggest: approveSuggest.value, |
| 387 | approveStaffGuid: userData.staffGuid, | 458 | approveStaffGuid: userData.staffGuid, |
| 459 | complianceInfoMap: complianceInfoMap | ||
| 388 | }).then((res: any) => { | 460 | }).then((res: any) => { |
| 389 | if (res.code == '00000') { | 461 | if (res.code == '00000') { |
| 390 | fullscreenLoading.value = false; | 462 | fullscreenLoading.value = false; |
| 391 | ElMessage.success('驳回成功!') | 463 | ElMessage.success('驳回成功!') |
| 464 | dialogVisible.value = false; | ||
| 392 | getTableData(); | 465 | getTableData(); |
| 393 | } else { | 466 | } else { |
| 394 | ElMessage.error(res.msg) | 467 | ElMessage.error(res.msg) |
| 395 | } | 468 | } |
| 396 | }) | 469 | }) |
| 470 | } | ||
| 471 | }) | ||
| 472 | |||
| 473 | |||
| 474 | // rejectFlowData({ | ||
| 475 | // guid: row.approveVO.approveGuid, | ||
| 476 | // flowType: row.approveVO.flowType, | ||
| 477 | // approveSuggest: approveSuggest.value, | ||
| 478 | // approveStaffGuid: userData.staffGuid, | ||
| 479 | // }).then((res: any) => { | ||
| 480 | // if (res.code == '00000') { | ||
| 481 | // fullscreenLoading.value = false; | ||
| 482 | // ElMessage.success('驳回成功!') | ||
| 483 | // getTableData(); | ||
| 484 | // } else { | ||
| 485 | // ElMessage.error(res.msg) | ||
| 486 | // } | ||
| 487 | // }) | ||
| 397 | } | 488 | } |
| 398 | // const tableBtnClick = (scope, btn) => { | 489 | // const tableBtnClick = (scope, btn) => { |
| 399 | // const type = btn.value; | 490 | // const type = btn.value; |
| ... | @@ -508,8 +599,18 @@ onBeforeMount(() => { | ... | @@ -508,8 +599,18 @@ onBeforeMount(() => { |
| 508 | proxy.$ElMessage.error(res.msg); | 599 | proxy.$ElMessage.error(res.msg); |
| 509 | } | 600 | } |
| 510 | }) | 601 | }) |
| 602 | getParamsList({ | ||
| 603 | dictType: "数据产品上架审批合规信息", | ||
| 604 | }).then((res: any) => { | ||
| 605 | if (res.code == proxy.$passCode) { | ||
| 606 | assetsSafeInfo.value = res.data || []; | ||
| 607 | } else { | ||
| 608 | proxy.$ElMessage.error(res.msg); | ||
| 609 | } | ||
| 610 | }) | ||
| 511 | }) | 611 | }) |
| 512 | 612 | ||
| 613 | const assetsSafeInfo = ref<any>() | ||
| 513 | const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href | 614 | const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href |
| 514 | const demandListData: any = ref([ | 615 | const demandListData: any = ref([ |
| 515 | ]); | 616 | ]); |
| ... | @@ -535,7 +636,118 @@ const btnClick = (item) => { | ... | @@ -535,7 +636,118 @@ const btnClick = (item) => { |
| 535 | } | 636 | } |
| 536 | } | 637 | } |
| 537 | 638 | ||
| 538 | 639 | const formInfo = ref<any>({ | |
| 640 | id: 'check-form', | ||
| 641 | col: 'col2', | ||
| 642 | items: [ | ||
| 643 | // radio 单选框 | ||
| 644 | { | ||
| 645 | type: 'radio-group', | ||
| 646 | label: '是否遵守隐私法律和数据保护法规', | ||
| 647 | field: 'isPublicData1', | ||
| 648 | default: '', | ||
| 649 | required: true, | ||
| 650 | options: [ | ||
| 651 | { label: '是', value: 'Y' }, | ||
| 652 | { label: '否', value: 'N' }, | ||
| 653 | ], | ||
| 654 | }, | ||
| 655 | // radio 单选框 | ||
| 656 | { | ||
| 657 | type: 'radio-group', | ||
| 658 | label: '不存在侵犯他人版权的信息', | ||
| 659 | field: 'isPublicData2', | ||
| 660 | default: '', | ||
| 661 | required: true, | ||
| 662 | options: [ | ||
| 663 | { label: '是', value: 'Y' }, | ||
| 664 | { label: '否', value: 'N' }, | ||
| 665 | ], | ||
| 666 | }, | ||
| 667 | // 是否符合研究伦理 | ||
| 668 | { | ||
| 669 | type: 'radio-group', | ||
| 670 | label: '是否符合研究伦理', | ||
| 671 | field: 'isPublicData3', | ||
| 672 | default: '', | ||
| 673 | required: true, | ||
| 674 | options: [ | ||
| 675 | { label: '是', value: 'Y' }, | ||
| 676 | { label: '否', value: 'N' }, | ||
| 677 | ], | ||
| 678 | }, | ||
| 679 | //是否遵守道德标准 | ||
| 680 | { | ||
| 681 | type: 'radio-group', | ||
| 682 | label: '是否遵守道德标准', | ||
| 683 | field: 'isPublicData4', | ||
| 684 | default: '', | ||
| 685 | required: true, | ||
| 686 | options: [ | ||
| 687 | { label: '是', value: 'Y' }, | ||
| 688 | { label: '否', value: 'N' }, | ||
| 689 | ], | ||
| 690 | }, | ||
| 691 | //数据来源是否合规 | ||
| 692 | { | ||
| 693 | type: 'radio-group', | ||
| 694 | label: '数据来源是否合规', | ||
| 695 | field: 'isPublicData5', | ||
| 696 | default: '', | ||
| 697 | required: true, | ||
| 698 | options: [ | ||
| 699 | { label: '是', value: 'Y' }, | ||
| 700 | { label: '否', value: 'N' }, | ||
| 701 | ], | ||
| 702 | }, | ||
| 703 | //相关文档审查是否合规 | ||
| 704 | { | ||
| 705 | type: 'radio-group', | ||
| 706 | label: '相关文档审查是否合规', | ||
| 707 | field: 'isPublicData6', | ||
| 708 | default: '', | ||
| 709 | required: true, | ||
| 710 | options: [ | ||
| 711 | { label: '是', value: 'Y' }, | ||
| 712 | { label: '否', value: 'N' }, | ||
| 713 | ], | ||
| 714 | }, | ||
| 715 | //是否符合国家标准及要求 | ||
| 716 | { | ||
| 717 | type: 'radio-group', | ||
| 718 | label: '是否符合国家标准及要求', | ||
| 719 | field: 'isPublicData7', | ||
| 720 | default: '', | ||
| 721 | required: true, | ||
| 722 | options: [ | ||
| 723 | { label: '是', value: 'Y' }, | ||
| 724 | { label: '否', value: 'N' }, | ||
| 725 | ], | ||
| 726 | }, | ||
| 727 | //数据内容是否合规 | ||
| 728 | { | ||
| 729 | type: 'radio-group', | ||
| 730 | label: '数据内容是否合规', | ||
| 731 | field: 'isPublicData8', | ||
| 732 | default: '', | ||
| 733 | required: true, | ||
| 734 | options: [ | ||
| 735 | { label: '是', value: 'Y' }, | ||
| 736 | { label: '否', value: 'N' }, | ||
| 737 | ], | ||
| 738 | }, | ||
| 739 | ], | ||
| 740 | rules: { | ||
| 741 | isPublicData1: [{ required: true, message: '请选择是否遵守隐私法律和数据保护法规', trigger: 'change' }], | ||
| 742 | isPublicData2: [{ required: true, message: '请选择是否存在侵犯他人版权的信息', trigger: 'change' }], | ||
| 743 | isPublicData3: [{ required: true, message: '请选择是否符合研究伦理', trigger: 'change' }], | ||
| 744 | isPublicData4: [{ required: true, message: '请选择是否遵守道德标准', trigger: 'change' }], | ||
| 745 | isPublicData5: [{ required: true, message: '请选择数据来源是否合规', trigger: 'change' }], | ||
| 746 | isPublicData6: [{ required: true, message: '请选择相关文档审查是否合规', trigger: 'change' }], | ||
| 747 | isPublicData7: [{ required: true, message: '请选择是否符合国家标准及要求', trigger: 'change' }], | ||
| 748 | isPublicData8: [{ required: true, message: '请选择数据内容是否合规', trigger: 'change' }], | ||
| 749 | } | ||
| 750 | }) | ||
| 539 | </script> | 751 | </script> |
| 540 | 752 | ||
| 541 | <template> | 753 | <template> |
| ... | @@ -576,9 +788,10 @@ const btnClick = (item) => { | ... | @@ -576,9 +788,10 @@ const btnClick = (item) => { |
| 576 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" | 788 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" |
| 577 | @tableSwitchBeforeChange="tableSwitchBeforeChange" /> | 789 | @tableSwitchBeforeChange="tableSwitchBeforeChange" /> |
| 578 | </div> | 790 | </div> |
| 579 | <el-dialog v-model="dialogVisible" :title="dialogTitle" width="40%"> | 791 | <el-dialog v-model="dialogVisible" :title="dialogTitle" width="60%"> |
| 580 | <el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none"> | 792 | <Form ref="listingFormRef" :itemList="formInfo.items" :rules="formInfo.rules" /> |
| 581 | </el-input> | 793 | <el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none" |
| 794 | placeholder="请输入审批意见" /> | ||
| 582 | <template #footer> | 795 | <template #footer> |
| 583 | <div class="dialog-footer"> | 796 | <div class="dialog-footer"> |
| 584 | <el-button @click="dialogVisible = false">取消</el-button> | 797 | <el-button @click="dialogVisible = false">取消</el-button> | ... | ... |
| ... | @@ -365,7 +365,7 @@ const formInfo = ref<any>({ | ... | @@ -365,7 +365,7 @@ const formInfo = ref<any>({ |
| 365 | field: 'productImg', | 365 | field: 'productImg', |
| 366 | default: [], | 366 | default: [], |
| 367 | limit: 1, | 367 | limit: 1, |
| 368 | block: true, | 368 | block: false, |
| 369 | required: false, | 369 | required: false, |
| 370 | // col: 'mr8', | 370 | // col: 'mr8', |
| 371 | // style: { | 371 | // style: { |
| ... | @@ -1422,7 +1422,9 @@ onBeforeMount(() => { | ... | @@ -1422,7 +1422,9 @@ onBeforeMount(() => { |
| 1422 | } else { | 1422 | } else { |
| 1423 | getProducts(); | 1423 | getProducts(); |
| 1424 | } | 1424 | } |
| 1425 | if (route.query.exchangeGuid) { | ||
| 1425 | getTemplateInfo(); | 1426 | getTemplateInfo(); |
| 1427 | } | ||
| 1426 | }) | 1428 | }) |
| 1427 | 1429 | ||
| 1428 | // 获取模板信息 | 1430 | // 获取模板信息 | ... | ... |
-
Please register or sign in to post a comment