3026be5d by xukangle

fix

1 parent 0bc96dcb
......@@ -40,6 +40,13 @@ export const getListingCount = () => request({
method: 'post',
})
// 驳回流程数据
export const productRejectFlowData = (data) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/submit-flow`,
method: 'post',
data
})
/** 获取数据产品上架详情 */
export const getListingDetail = (params) => request({
......
......@@ -26,7 +26,7 @@ const routes: RouteRecordRaw[] = [
path: '/data-asset/register-catalog',
component: Layout,
meta: {
title: '数据资产目录',
title: '数据产品目录',
icon: 'sidebar-videos',
},
children: [
......@@ -35,7 +35,7 @@ const routes: RouteRecordRaw[] = [
name: 'registerCatalogManagement',
component: () => import('@/views/data_asset/registerCatalogManagement.vue'),
meta: {
title: '数据资产目录',
title: '数据产品目录',
sidebar: false,
breadcrumb: false,
cache: true
......@@ -46,7 +46,7 @@ const routes: RouteRecordRaw[] = [
name: 'registerCatalogCreate',
component: () => import('@/views/data_asset/registerCatalogCreate.vue'),
meta: {
title: '新建资产目录',
title: '新建产品目录',
sidebar: false,
breadcrumb: false,
cache: true,
......
......@@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user";
import { ElMessage, ElMessageBox } from "element-plus";
import useDataAssetStore from "@/store/modules/dataAsset";
import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList, getListingCount } from "@/api/modules/dataProduct";
import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList, getListingCount, productRejectFlowData } from "@/api/modules/dataProduct";
import { TableColumnWidth } from '@/utils/enum';
import TableTools from "@/components/Tools/table_tools.vue";
......@@ -194,7 +194,7 @@ const toSearch = (val: any, clear: boolean = false) => {
// 获取产品上架数量
const getListingCountData = () => {
getListingCount({}).then((res: any) => {
getListingCount().then((res: any) => {
if (res.code == proxy.$passCode) {
demandListData.value = res.data || [];
} else {
......@@ -335,65 +335,156 @@ const tableBtnClick = (scope, btn) => {
}
if (type == 'pass') {
approveSuggest.value = '';
if (listingFormRef.value) {
clearFormValues(listingFormRef.value.formInline);
listingFormRef.value.ruleFormRef.clearValidate(formInfo.value.items.map(item => item.field))
listingFormRef.value.ruleFormRef.resetFields(formInfo.value.items.map(item => item.field))
}
approveType.value = 'pass';
dialogTitle.value = '通过流程'
dialogVisible.value = true;
}
if (type == 'reject') {
approveSuggest.value = '';
if (listingFormRef.value) {
clearFormValues(listingFormRef.value.formInline);
listingFormRef.value.ruleFormRef.clearValidate(formInfo.value.items.map(item => item.field))
listingFormRef.value.ruleFormRef.resetFields(formInfo.value.items.map(item => item.field))
}
approveType.value = 'reject';
dialogTitle.value = '驳回流程'
dialogVisible.value = true;
}
if (type == 'up') {
tableSwitchChange('Y', scope, 'listingStatus')
// tableSwitchChange('Y', scope, 'listingStatus')
console.log('上架', scope)
}
if (type == 'down') {
tableSwitchChange('N', scope, 'listingStatus')
// 需要二次确认
ElMessageBox.confirm(
`确定下架该产品吗?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
).then(() => {
tableSwitchChange('N', scope, 'listingStatus')
}).catch(() => {
ElMessage({
type: 'info',
message: '已取消'
});
})
}
}
const clearFormValues = (formInline) => {
Object.keys(formInline).forEach(key => {
formInline[key] = '';
});
};
const fullscreenLoading = ref(false);
const passSubmit = () => {
let row = currTableData.value
console.log(row)
dialogVisible.value = false;
fullscreenLoading.value = true;
passFlowData({
guid: row.approveVO.approveGuid,
flowType: row.approveVO.flowType,
approveSuggest: approveSuggest.value,
approveStaffGuid: userData.staffGuid,
}).then((res: any) => {
fullscreenLoading.value = false;
if (res.code == '00000') {
ElMessage.success('审批通过!')
getTableData();
} else {
ElMessage.error(res.msg)
listingFormRef.value.ruleFormRef.validate().then((valid) => {
if (valid) {
let complianceInfoMap = {}
formInfo.value.items.forEach((item) => {
assetsSafeInfo.value.forEach((item1) => {
if (item.label == item1.label) {
complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field]
}
})
})
productRejectFlowData({
guid: row.approveVO.approveGuid,
flowType: row.approveVO.flowType,
approveSuggest: approveSuggest.value,
approveStaffGuid: userData.staffGuid,
complianceInfoMap: complianceInfoMap
}).then((res: any) => {
if (res.code == '00000') {
fullscreenLoading.value = false;
ElMessage.success('审批通过!')
dialogVisible.value = false;
getTableData();
} else {
ElMessage.error(res.msg)
}
})
}
})
// passFlowData({
// guid: row.approveVO.approveGuid,
// flowType: row.approveVO.flowType,
// approveSuggest: approveSuggest.value,
// approveStaffGuid: userData.staffGuid,
// }).then((res: any) => {
// fullscreenLoading.value = false;
// if (res.code == '00000') {
// ElMessage.success('审批通过!')
// getTableData();
// } else {
// ElMessage.error(res.msg)
// }
// })
}
const rejectSubmit = () => {
const listingFormRef = ref<any>();
const rejectSubmit = async () => {
if (!approveSuggest.value) return ElMessage.error('请填写驳回理由!')
let row = currTableData.value
dialogVisible.value = false;
fullscreenLoading.value = true;
rejectFlowData({
guid: row.approveVO.approveGuid,
flowType: row.approveVO.flowType,
approveSuggest: approveSuggest.value,
approveStaffGuid: userData.staffGuid,
}).then((res: any) => {
if (res.code == '00000') {
fullscreenLoading.value = false;
ElMessage.success('驳回成功!')
getTableData();
} else {
ElMessage.error(res.msg)
listingFormRef.value.ruleFormRef.validate().then((valid) => {
if (valid) {
console.log(listingFormRef.value.formInline, '-------------------')
let complianceInfoMap = {}
formInfo.value.items.forEach((item) => {
console.log(item, '-------------------')
assetsSafeInfo.value.forEach((item1) => {
if (item.label == item1.label) {
console.log(item1.value, item.default, '-------------------')
complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field]
}
})
})
productRejectFlowData({
guid: row.approveVO.approveGuid,
flowType: row.approveVO.flowType,
approveSuggest: approveSuggest.value,
approveStaffGuid: userData.staffGuid,
complianceInfoMap: complianceInfoMap
}).then((res: any) => {
if (res.code == '00000') {
fullscreenLoading.value = false;
ElMessage.success('驳回成功!')
dialogVisible.value = false;
getTableData();
} else {
ElMessage.error(res.msg)
}
})
}
})
// rejectFlowData({
// guid: row.approveVO.approveGuid,
// flowType: row.approveVO.flowType,
// approveSuggest: approveSuggest.value,
// approveStaffGuid: userData.staffGuid,
// }).then((res: any) => {
// if (res.code == '00000') {
// fullscreenLoading.value = false;
// ElMessage.success('驳回成功!')
// getTableData();
// } else {
// ElMessage.error(res.msg)
// }
// })
}
// const tableBtnClick = (scope, btn) => {
// const type = btn.value;
......@@ -508,8 +599,18 @@ onBeforeMount(() => {
proxy.$ElMessage.error(res.msg);
}
})
getParamsList({
dictType: "数据产品上架审批合规信息",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
assetsSafeInfo.value = res.data || [];
} else {
proxy.$ElMessage.error(res.msg);
}
})
})
const assetsSafeInfo = ref<any>()
const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href
const demandListData: any = ref([
]);
......@@ -535,7 +636,118 @@ const btnClick = (item) => {
}
}
const formInfo = ref<any>({
id: 'check-form',
col: 'col2',
items: [
// radio 单选框
{
type: 'radio-group',
label: '是否遵守隐私法律和数据保护法规',
field: 'isPublicData1',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
// radio 单选框
{
type: 'radio-group',
label: '不存在侵犯他人版权的信息',
field: 'isPublicData2',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
// 是否符合研究伦理
{
type: 'radio-group',
label: '是否符合研究伦理',
field: 'isPublicData3',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//是否遵守道德标准
{
type: 'radio-group',
label: '是否遵守道德标准',
field: 'isPublicData4',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//数据来源是否合规
{
type: 'radio-group',
label: '数据来源是否合规',
field: 'isPublicData5',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//相关文档审查是否合规
{
type: 'radio-group',
label: '相关文档审查是否合规',
field: 'isPublicData6',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//是否符合国家标准及要求
{
type: 'radio-group',
label: '是否符合国家标准及要求',
field: 'isPublicData7',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
//数据内容是否合规
{
type: 'radio-group',
label: '数据内容是否合规',
field: 'isPublicData8',
default: '',
required: true,
options: [
{ label: '是', value: 'Y' },
{ label: '否', value: 'N' },
],
},
],
rules: {
isPublicData1: [{ required: true, message: '请选择是否遵守隐私法律和数据保护法规', trigger: 'change' }],
isPublicData2: [{ required: true, message: '请选择是否存在侵犯他人版权的信息', trigger: 'change' }],
isPublicData3: [{ required: true, message: '请选择是否符合研究伦理', trigger: 'change' }],
isPublicData4: [{ required: true, message: '请选择是否遵守道德标准', trigger: 'change' }],
isPublicData5: [{ required: true, message: '请选择数据来源是否合规', trigger: 'change' }],
isPublicData6: [{ required: true, message: '请选择相关文档审查是否合规', trigger: 'change' }],
isPublicData7: [{ required: true, message: '请选择是否符合国家标准及要求', trigger: 'change' }],
isPublicData8: [{ required: true, message: '请选择数据内容是否合规', trigger: 'change' }],
}
})
</script>
<template>
......@@ -576,9 +788,10 @@ const btnClick = (item) => {
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange"
@tableSwitchBeforeChange="tableSwitchBeforeChange" />
</div>
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="40%">
<el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none">
</el-input>
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="60%">
<Form ref="listingFormRef" :itemList="formInfo.items" :rules="formInfo.rules" />
<el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none"
placeholder="请输入审批意见" />
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
......
......@@ -365,7 +365,7 @@ const formInfo = ref<any>({
field: 'productImg',
default: [],
limit: 1,
block: true,
block: false,
required: false,
// col: 'mr8',
// style: {
......@@ -1422,7 +1422,9 @@ onBeforeMount(() => {
} else {
getProducts();
}
getTemplateInfo();
if (route.query.exchangeGuid) {
getTemplateInfo();
}
})
// 获取模板信息
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!