8d73b563 by lxs

数据资产登记更新

1 parent 0eaaaefc
......@@ -5,6 +5,7 @@ VITE_APP_TITLE = 数据资产管理系统
# VITE_API_BASEURL = https://swzl-test.csbr.cn/api
# VITE_API_BASEURL = http://localhost:9000
VITE_API_BASEURL = http://192.168.6.20:28052/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server
......@@ -13,21 +14,31 @@ VITE_APP_AUTH_URL = 'ms-daop-auth-service'
# 系统管理 接口地址
VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# #配置服务
# VITE_APP_CONFIG_URL = 'ms-daop-configure-service'
# 文件上传请求地址
VITE_APP_ADD_FILE = ms-daop-import-data-service
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
# 是否开启代理
VITE_OPEN_PROXY = true
# vite serve base
VITE_SERVE_BASE = /
# 流程设计访问地址
VITE_BPMN_URL = https://workflow-swzl-test.csbr.cn
#流程服务
VITE_APP_WORK_FLOW_URL = 'ms-daop-workflow-service'
# 数据标准、元数据、数据目录 接口地址
VITE_APP_PLAN_BASEURL = ms-daop-zcgl-data-plan-service
#数据质量接口地址
VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
......@@ -44,20 +55,26 @@ VITE_APP_CONFIG_URL = 'ms-daop-configure-service'
# 文件上传下载接口地址
VITE_APP_COMMON_URL = 'ms-daop-common-service'
#camunda服务
VITE_APP_CAMUNDA_URL = 'ms-daop-camunda-server'
#门户接口
VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
#数据资产接口地址
VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
#数据同步接口地址
VITE_API_DATA_SYNC = ms-swzl-data-sync-service
#消息接口
VITE_API_MESSAGE = ms-swzl-message-notification-service
#新门户接口
VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service
#企业信息接口
VITE_API_PERSONEL_SERVICE = ms-daop-personel-service
# 是否在打包时生成 sourcemap
VITE_BUILD_SOURCEMAP = false
......
......@@ -3,22 +3,31 @@ VITE_APP_TITLE = 数据资产管理系统
# 接口域名
VITE_API_BASEURL = http://192.168.6.20:28052/
# VITE_API_BASEURL = http://49.4.26.201:31709/
# # 平台用户 接口请地址
# VITE_APP_USER_API_BASEURL = gateway-server
# # 系统管理 接口地址
# VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# # 文件上传请求地址
# VITE_APP_ADD_FILE = ms-daop-import-data-service
# # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
# VITE_APP_DEBUG_TOOL =
# # 是否开启代理
# VITE_OPEN_PROXY = true
# # vite serve base
# VITE_SERVE_BASE = /
# # 流程设计访问地址
# VITE_BPMN_URL = https://workflow.zgsjzc.com
# # 数据标准、元数据、数据目录 接口地址
# VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
# #数据质量接口地址
# VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
......@@ -27,10 +36,13 @@ VITE_APP_TITLE = 数据资产管理系统
# #数据资产接口地址
# VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
# #数据同步接口地址
# VITE_API_DATA_SYNC = ms-swzl-data-sync-service
# #消息接口
# VITE_API_MESSAGE = ms-swzl-message-notification-service
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server
......@@ -42,16 +54,25 @@ VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# 文件上传请求地址
VITE_APP_ADD_FILE = ms-daop-import-data-service
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
# 是否开启代理
VITE_OPEN_PROXY = true
# vite serve base
VITE_SERVE_BASE = /
# 流程设计访问地址
VITE_BPMN_URL = https://workflow-swzl-test.csbr.cn
#流程服务
VITE_APP_WORK_FLOW_URL = 'ms-daop-workflow-service'
# 数据标准、元数据、数据目录 接口地址
VITE_APP_PLAN_BASEURL = ms-daop-zcgl-data-plan-service
#数据质量接口地址
VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
......@@ -68,15 +89,24 @@ VITE_APP_DATA_SOURCE_URL = ms-daop-data-source-service
# 文件上传下载接口地址
VITE_APP_COMMON_URL = 'ms-daop-common-service'
#camunda服务
VITE_APP_CAMUNDA_URL = 'ms-daop-camunda-server'
#门户接口
VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
#数据资产接口地址
VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
#数据同步接口地址
VITE_API_DATA_SYNC = ms-swzl-data-sync-service
#消息接口
VITE_API_MESSAGE = ms-swzl-message-notification-service
#企业信息接口
VITE_API_PERSONEL_SERVICE = ms-daop-personel-service
# 是否在打包时生成 sourcemap
VITE_BUILD_SOURCEMAP = false
# 是否在打包时开启压缩,支持 gzip 和 brotli
......
......@@ -9,6 +9,7 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
ApprovalProcess: typeof import('./src/components/ApprovalProcess/src/ApprovalProcess.vue')['default']
Auth: typeof import('./src/components/Auth/index.vue')['default']
AuthAll: typeof import('./src/components/AuthAll/index.vue')['default']
ContentWrap: typeof import('./src/components/ContentWrap/src/ContentWrap.vue')['default']
......@@ -31,6 +32,7 @@ declare module '@vue/runtime-core' {
ImageUpload: typeof import('./src/components/ImageUpload/index.vue')['default']
LineageGraph: typeof import('./src/components/LineageGraph/index.vue')['default']
ListPanel: typeof import('./src/components/ListPanel/index.vue')['default']
LookBpmn: typeof import('./src/components/ApprovalProcess/src/components/LookBpmn.vue')['default']
Month: typeof import('./src/components/Schedule/component/month.vue')['default']
NotAllowed: typeof import('./src/components/NotAllowed/index.vue')['default']
PageHeader: typeof import('./src/components/PageHeader/index.vue')['default']
......
......@@ -22,7 +22,11 @@
"@vueuse/integrations": "^10.1.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"ant-design-vue": "^3.2.20",
"axios": "^1.4.0",
"bpmn-js": "^8.10.0",
"bpmn-js-token-simulation": "^0.10.0",
"camunda-bpmn-moddle": "^4.4.0",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.7",
"echarts": "^5.4.3",
......@@ -32,6 +36,7 @@
"hotkeys-js": "^3.10.2",
"html2canvas": "^1.4.1",
"insert-css": "^2.0.0",
"jquery": "^3.7.1",
"lodash-es": "^4.17.21",
"md5": "^2.3.0",
"mitt": "^3.0.0",
......
This diff could not be displayed because it is too large.
......@@ -2,201 +2,201 @@ import request from "@/utils/request";
/** 获取登记列表。 */
export const getRegisterList = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/page-list`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/page-list`,
method: 'post',
data: params
})
/** 获取登记详情 */
export const getRegiaterDetail = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/detail`,
method: 'get',
params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/detail`,
method: 'get',
params
})
/** 提交登记信息。 */
export const registerSave = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/save`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/save`,
method: 'post',
data: params
});
/** 更新登记信息 */
export const registerUpdate = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/update`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/update`,
method: 'post',
data: params
});
/** 删除登记信息 */
export const registerDelete = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/delete`,
method: 'delete',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/delete`,
method: 'delete',
data: params
});
/** 获取当前会员审批流程信息 */
export const getTenantApprove = (params={}) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/get-node`,
method: 'get',
params
export const getTenantApprove = (params = {}) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/get-node`,
method: 'get',
params
});
/** 获取资产登记,审批列表。 */
export const getApproveList = (bizGuid) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/biz-arppove-list?biz_guid=${bizGuid}`,
method: 'get'
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/biz-arppove-list?biz_guid=${bizGuid}`,
method: 'get'
});
/** 撤销审批流程 */
export const registerApproveCancel = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/canal`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/canal`,
method: 'post',
data: params
});
/** 重新提交审批流程 */
export const registerApproveReSubmit = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/resubmit`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/resubmit`,
method: 'post',
data: params
});
/** 通过资产登记流程 */
export const registerApproveAllow = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/allow`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/allow`,
method: 'post',
data: params
});
/** 驳回资产登记流程 */
export const registerApproveBackup = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/backup`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-approve/backup`,
method: 'post',
data: params
});
/** 获取企业名称列表,用于搜索 */
export const getRegisterTenant = () => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/get-tenant-list`,
method: 'get'
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/get-tenant-list`,
method: 'get'
});
/** 资产质量评价相关接口 */
/** 获取资产质量评价列表。 */
export const getQualityEvaList = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/page-list`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/page-list`,
method: 'post',
data: params
})
/** 发起数据质量评价 */
export const saveQuality = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/save`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/save`,
method: 'post',
data: params
})
/** 再次提交数据质量评价 */
export const updatQuality = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/update`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/update`,
method: 'post',
data: params
})
/** 获取可以发起资产质量评价的选项列表。 */
/** type: 1 质量评价;2 资产评估 */
export const getRegisteredList = (type) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/get-valid-list?type=${type}`,
method: 'get'
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/get-valid-list?type=${type}`,
method: 'get'
})
/** 质量评价审批通过 */
export const qualityAllow = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/allow`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/allow`,
method: 'post',
data: params
});
/** 删除质量评价 */
export const deleteQuality = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/delete`,
method: 'delete',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/delete`,
method: 'delete',
data: params
});
/** 获取资产质量评价详情 */
export const getEvaDetail = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/detail`,
method: 'get',
params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/detail`,
method: 'get',
params
})
/** 资产价值评估相关接口 */
/** 获取资产价值评估分页列表。 */
export const getCostAssessList = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/page-list`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/page-list`,
method: 'post',
data: params
})
/** 发起数据价值评估 */
export const saveCostAssess = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/save`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/save`,
method: 'post',
data: params
})
/** 再次提交数据价值评估 */
export const updateCostAssess = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/update`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/update`,
method: 'post',
data: params
})
/** 删除数据价值评估 */
export const deleteCostAssess = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/delete`,
method: 'delete',
data: params
export const deleteCostAssess = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/delete`,
method: 'delete',
data: params
});
/** 通过价值评估审批 */
export const costAssessAllow = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/allow`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/allow`,
method: 'post',
data: params
});
/** 获取价值评估详情 */
export const getCostAssessDetail = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/detail`,
method: 'get',
params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/detail`,
method: 'get',
params
})
/** ------- 证件管理--------- */
/** 获取证件管理分页列表数据 */
export const getRegistDocumentList = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-document/page-list`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-document/page-list`,
method: 'post',
data: params
})
/** 获取证件详情 */
export const getCertificateDetail = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-document/detail`,
method: 'get',
params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-document/detail`,
method: 'get',
params
})
/** 发证确认 */
export const updateCertificate = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-document/update-state`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-document/update-state`,
method: 'post',
data: params
})
/** 获取当前会员分配的交易所 */
......@@ -208,30 +208,30 @@ export const getServiceDetail = (params) => request({
/** 获取可使用的资产目录列表 */
export const getRegisterCatalogList = () => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/dam-list?isRegister=${'Y'}`,
method: 'get'
})
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/dam-list?isRegister=${'Y'}`,
method: 'get'
})
/*** -------------------- 资产目录管理 ------------------------ */
/** 数据来源列表 */
export const dataSourcesList = [
{
value: 1,
label: '授权数据',
},
{
value: 2,
label: '自有数据',
},
{
value: 3,
label: '购买数据',
},
{
value: 4,
label: '其他来源',
}
{
value: 1,
label: '授权数据',
},
{
value: 2,
label: '自有数据',
},
{
value: 3,
label: '购买数据',
},
{
value: 4,
label: '其他来源',
}
]
//获取参数字典列表。 这个是主系统的所有字典
......@@ -241,8 +241,9 @@ export const dataSourcesList = [
// data
// })
export const getParamsList = (params) => request({
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${params.dictType}`,
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType`,
method: 'get',
params
})
/** 获取参数类型列表 */
......@@ -251,10 +252,11 @@ export const getParamsList = (params) => request({
// method: 'post',
// data: { paramCode: "DAM-TYPE" }
// })
export const getDamTypesList = (params) => request({
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${params.dictType}`,
method: 'get',
})
// export const getDamTypesList = (params) => request({
// url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType`,
// method: 'get',
// params
// })
/** 获取所属主题的四级参数类型列表 */
// export const getSubjectDoaminList = () => request({
......@@ -262,10 +264,11 @@ export const getDamTypesList = (params) => request({
// method: 'post',
// data: { paramCode: "SUBJECT-DOMAIN" }
// })
export const getSubjectDoaminList = (params) => request({
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${params.dictType}`,
method: 'get',
})
// export const getSubjectDoaminList = (params) => request({
// url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType`,
// method: 'get',
// params
// })
// 获取数据类型的接口
// export const getDataTypeList = () => request({
......@@ -273,109 +276,116 @@ export const getSubjectDoaminList = (params) => request({
// method: 'post',
// data: { paramCode: "DATA_TYPE" }
// })
// 新获取数据类型的接口
export const getDataTypeList = (params) => request({
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${params.dictType}`,
method: 'get',
})
// // 新获取数据类型的接口
// export const getDataTypeList = (params) => request({
// url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType`,
// method: 'get',
// params
// })
export const getDamCatalogTable = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/page-list`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/page-list`,
method: 'post',
data: params
})
/** 删除数据资产目录 */
export const registerCatalogDelete = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/delete`,
method: 'delete',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/delete`,
method: 'delete',
data: params
});
/** 保存数据资产目录 */
export const registerCatalogSave = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/save`,
method: 'post',
data: params
export const registerCatalogSave = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/save`,
method: 'post',
data: params
});
/** 验证资产名称是否存在 */
export const existDamName = (params) => request({
url:`${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/exists?damName=${params}`,
method: 'get'
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/exists?damName=${params}`,
method: 'get'
});
/** 获取资产目录基本信息的详情 */
export const getRegisterCatalogDetail = (guid) => request({
url:`${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/detail?guid=${guid}`,
method: 'get'
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/detail?guid=${guid}`,
method: 'get'
});
/** 获取资产目录表的详情 */
export const getRegisterCatalogTableDetail = (subjectGuid) => request({
url:`${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-table-detail?subjectGuid=${subjectGuid}`,
method: 'get'
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-table-detail?subjectGuid=${subjectGuid}`,
method: 'get'
});
/** 编辑资产目录基本信息 */
export const registerCatalogUpdate = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/update`,
method: 'post',
data: params
export const registerCatalogUpdate = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/update`,
method: 'post',
data: params
});
/** 新增资产目录表 */
export const registerCatalogTableSave = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/add-table`,
method: 'post',
data: params
export const registerCatalogTableSave = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/add-table`,
method: 'post',
data: params
});
/** 编辑资产目录表 */
export const registerCatalogTableUpdate = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/update-table`,
method: 'post',
data: params
export const registerCatalogTableUpdate = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/update-table`,
method: 'post',
data: params
});
/** 删除资产目录表 */
export const registerCatalogTableDelete = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/remove-table?damGuid=${params.damGuid}&subjectGuid=${params.subjectGuid}`,
method: 'post'
export const registerCatalogTableDelete = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/remove-table?damGuid=${params.damGuid}&subjectGuid=${params.subjectGuid}`,
method: 'post'
});
/** 获取资产目录表 */
export const getRegisterCatalogTableList = (damGuid) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-table-list?damGuid=${damGuid}`,
method: 'get'
export const getRegisterCatalogTableList = (damGuid) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-table-list?damGuid=${damGuid}`,
method: 'get'
});
/** 查看资产表数据 */
export const queryData = (subjectGuid) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/preview-data/${subjectGuid}`,
method: 'get'
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/preview-data/${subjectGuid}`,
method: 'get'
});
/** 验证新增和编辑资产表 */
export const checkDamTableChange = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/check-table-change`,
method: 'post',
data: params
export const checkDamTableChange = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/check-table-change`,
method: 'post',
data: params
});
/** ------------------ 公示异议处理 -------------------------------- */
/** 获取异议列表数据 */
export const getDissentList = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-dissent-handle/page-list`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-dissent-handle/page-list`,
method: 'post',
data: params
})
/** 更新异议处理 */
export const updateDissentState = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-dissent-handle/update-state`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-dissent-handle/update-state`,
method: 'post',
data: params
})
// 获取数交所数据
export const getExchangeList = () => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/register-num`,
method: 'post'
})
......
......@@ -268,3 +268,17 @@ export const getAllFlowData = (params) => request({
method: 'get',
params
})
// 获取资产/价值评估机构数据
export const getSingleList = (params) => request({
url: `${import.meta.env.VITE_API_PERSONEL_SERVICE}/tenant/singlePage`,
method: 'post',
data: params
})
// 获取当前登录人信息
export const getCurrentUserInfo = (params) => {
return request({
url: `${import.meta.env.VITE_API_PERSONEL_SERVICE}/staff/data/get-current-staff`,
method: "post",
params
});
};
......
import request from "@/utils/request";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore()
const userData = JSON.parse(userStore.userData)
// 获取流程详情。
export const getProcessFlowDetail = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/detail/?approvalGuid=${params}`,
method: 'post',
})
// 审批通过
export const passFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/allow-flow`,
method: 'post',
data: params
})
// 审批驳回
export const rejectFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/backup-flow`,
method: 'post',
data: params
})
// 审批撤销
export const revokeFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/canal-flow`,
method: 'post',
data: params
})
// 删除流程
export const deleteFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/del`,
method: 'post',
params
})
export const getFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/page-list`,
method: 'post',
data: params
})
export const getCamundaDeploymentId = (flowType) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/get-camunda-deployment-id`,
method: 'post',
data: {
tenantGuid: userData.tenantGuid,
flowType:flowType,
staffGuid: userData.staffGuid,
}
})
export const getDetailDataPromise = (deploymentId)=> request({
url: `${import.meta.env.VITE_APP_CAMUNDA_URL}/process-definition/get-detail?deploymentId=${deploymentId}`,
method: 'get',
})
export const getProcessNodesPromise = (params)=>request({
url: `${import.meta.env.VITE_APP_CAMUNDA_URL}/process-definition/get-process-nodes`,
method: 'post',
data: params
})
import ApprovalProcess from './src/ApprovalProcess.vue'
export { ApprovalProcess }
<script setup lang="tsx">
import LookBpmn from "./components/LookBpmn.vue";
import useProcessStore from '@/store/modules/process'
import { cloneDeep } from 'lodash-es';
import { getProcessNodesPromise } from "@/api/modules/workFlowService"
const processStore = useProcessStore()
const props = defineProps({
deploymentId: {
type: String,
default: ''
},
processInstanceId: {
type: String,
default: ''
},
});
const tableData = ref<any>([])
const lookBpmnRef = ref()
// const contentRef = ref();
// const { height: contentHeight } = useElementSize(contentRef);
const renderProcessNodes = () => {
let param = {
deploymentId: props.deploymentId || null,
processInstanceId: props.processInstanceId || null,
};
getProcessNodesPromise(param).then((res:any) => {
if (res.code === "00000") {
let data = res.data;
if (data) {
data.forEach((i, index) => {
i.id = i.activityId;
i.staffName = "";
if (i.staffVOS && i.staffVOS.length > 1) {
i.staffVOS.forEach((j) => {
j.id = j.staffGuid;
j.processName = i.processName;
if (j.approvalState) {
i.approvalState = j.approvalState;
i.approvalSuggest = j.approvalSuggest;
i.approvalTime = j.approvalTime;
i.staffName = j.staffName;
}
});
i.children = i.staffVOS;
} else {
if (i.staffVOS) {
i.approvalState = i.staffVOS[i.staffVOS.length - 1].approvalState;
i.approvalSuggest =
i.staffVOS[i.staffVOS.length - 1].approvalSuggest;
i.approvalTime = i.staffVOS[i.staffVOS.length - 1].approvalTime;
i.staffName = i.staffVOS[i.staffVOS.length - 1].staffName;
} else {
if (i.organisationVOS) {
i.approvalState = "";
i.approvalSuggest = "";
i.approvalTime = "";
if (i.organisationVOS.length > 1) {
i.staffName =
i.organisationVOS[0].organisationName +
"等" +
i.organisationVOS.length +
"个部门";
} else {
i.staffName = i.organisationVOS[0].organisationName;
}
} else if (i.positionVOS != null && i.positionVOS.length > 0) {
i.approvalState = "";
i.approvalSuggest = "";
i.approvalTime = "";
if (i.positionVOS.length > 1) {
if (i.staffName) {
i.staffName =
i.staffName +
"," +
i.positionVOS[0].positionName +
"等" +
i.positionVOS.length +
"个岗位";
} else {
i.staffName = i.positionVOS[0].positionName;
}
} else {
if (i.staffName) {
i.staffName =
i.staffName + "," + i.positionVOS[0].positionName;
} else {
i.staffName = i.positionVOS[0].positionName;
}
}
} else if (i.candidateUsers != null && i.candidateUsers != "") {
i.approvalState = "";
i.approvalSuggest = "";
i.approvalTime = "";
if (i.candidateUsers.length > 1) {
i.staffName =
i.candidateUsers[0].staffName +
"等" +
i.candidateUsers.length +
"个人员";
if (i.candidateUsers) {
i.candidateUsers.forEach((j) => {
j.id = j.staffGuid;
j.processName = i.processName;
});
}
i.children = i.candidateUsers;
} else {
i.staffName = i.candidateUsers[0].staffName;
}
}
}
}
});
}
tableData.value = data
processStore.processNodes = cloneDeep(tableData.value)
localStorage.setItem('processTableData',JSON.stringify(tableData.value));
nextTick(()=>{
setTimeout(()=>{
getSpecialEventUserTaskList()
})
})
}
});
};
const getApprovalState = (val: string) => {
if (!val) {
return "-";
} else {
if (val == "W") {
return (val = "待提交");
} else if (val == "N") {
return (val = "初始");
} else if (val == "A") {
return (val = "审批中");
} else if (val == "Y") {
return (val = "已通过");
} else if (val == "F") {
return (val = "已完成");
} else if (val == "R") {
return (val = "已驳回");
} else if (val == "C") {
return (val = "已撤销");
} else {
return (val = "");
}
}
}
const getSpecialEventUserTaskList = () => {
lookBpmnRef.value.getDetailData(props.deploymentId)
};
onBeforeRouteLeave((to, from) =>{
processStore.clearStore()
})
onMounted(() => {
renderProcessNodes()
});
defineExpose({
renderProcessNodes
})
</script>
<template>
<div>
<!-- <Table :columns="columns" :data="tableData" :border="false"></Table> -->
<el-table tooltip-effect="light" :data="tableData" :border="false" >
<el-table-column type="index" label="节点" :width="140" align="left" >
<template #default="scope">
{{ scope.row.processName ||'-' }}
</template>
</el-table-column>
<el-table-column type="index" label="处理对象" :width="140" align="left" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.staffName ||'-' }}
</template>
</el-table-column>
<el-table-column type="index" label="操作时间" :width="180" align="left" show-overflow-tooltip >
<template #default="scope">
{{ scope.row.approvalTime||'-'}}
</template>
</el-table-column>
<!-- <el-table-column type="index" label="申请人" :width="100" align="left" >
<template #default="scope">
{{ scope.row.applyName||'-'}}
</template>
</el-table-column>
<el-table-column label="申请时间" :width="180" align="left" >
<template #default="scope">
{{ scope.row.time||'-'}}
</template>
</el-table-column> -->
<el-table-column label="审批状态" :width="140" align="left" show-overflow-tooltip>
<template #default="scope">
<div v-if="scope.row.approvalState === 'A'" class='state-sty'>{{ getApprovalState(scope.row.approvalState) }}</div>
<div v-else-if="scope.row.approvalState === 'Y'" class='state-sty1'>{{getApprovalState(scope.row.approvalState) }}</div>
<div v-else-if="scope.row.approvalState === 'R'" class='state-sty2'>{{ getApprovalState(scope.row.approvalState) }}</div>
<div v-else>{{getApprovalState(scope.row.approvalState)}}</div>
</template>
</el-table-column>
<el-table-column label="审批原因" align="left" >
<template #default="scope">
{{ scope.row.approvalSuggest||'-'}}
</template>
</el-table-column>
</el-table>
<div class="bpmn-sty pt-20px" style="margin-top: 20px">
<span style="font-size:16px;color:#666">{{ '审批流程' }}</span>
<el-divider style="margin-bottom:10px!important;margin-top:10px!important" />
<LookBpmn ref="lookBpmnRef"></LookBpmn>
</div>
</div>
</template>
<style lang="scss" scoped>
.iframe-sty {
width: 100%;
border: none;
// height: 600px;
}
:deep(.el-table) {
.state-sty {
width: 52px;
height: 21px;
text-align: center;
line-height: 21px;
background: #FFEEE3;
border-radius: 3px;
color: #FF8623;
}
.state-sty1 {
width: 52px;
height: 21px;
text-align: center;
line-height: 21px;
background: #E3F0F0;
border-radius: 3px;
color: #4FA1A4;
}
.state-sty2 {
width: 52px;
height: 21px;
text-align: center;
line-height: 21px;
background: #FFE4E2;
border-radius: 3px;
color: #FE4638;
}
.state-sty3 {
width: 52px;
height: 21px;
text-align: center;
line-height: 21px;
background: #E3E3E3;
border-radius: 3px;
color: #323233;
}
}
</style>
<script setup lang="ts">
import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda';
import BpmnViewer from 'bpmn-js/lib/Viewer'; //查看 .bpmn 文件
import { append as svgAppend, attr as svgAttr, create as svgCreate } from 'tiny-svg'
import { query as domQuery } from 'min-dom'
import $ from 'jquery'
import { getDetailDataPromise } from "@/api/modules/workFlowService"
const canvasRef = ref()
let bpmnViewer = reactive<any>({})
const processScript = ref('')
const tenantGuid = ref('')
const elementRegistry = ref<any>([])
const form = reactive({
processName: '',
description: ''
})
const nodeList = ref<any[]>([])
const startList = ref<any[]>([])
const endList = ref<any[]>([])
const createNewDiagram = () => {
bpmnViewer.importXML(processScript.value, (err) => {
if (err) {
console.error(err)
} else {
//改变箭头颜色
const marker = svgCreate('marker')
svgAttr(marker, {
id: 'sequenceflow-arrow-normal',
viewBox: '0 0 20 20',
refX: '11',
refY: '10',
markerWidth: '10',
markerHeight: '10',
orient: 'auto'
})
const path = svgCreate('path')
svgAttr(path, {
d: 'M 1 5 L 11 10 L 1 15 Z',
style: ' stroke-width: 1px; stroke-linecap: round; stroke-dasharray: 10000, 1;stroke: #A8A8A8;fill:#A8A8A8; '
})
const defs: any = domQuery('defs');
svgAppend(marker, path);
svgAppend(defs, marker);
elementRegistry.value = bpmnViewer.get('elementRegistry');
nodeList.value = elementRegistry.value.filter(
(item) => item.type === 'bpmn:UserTask' || item.type === 'bpmn:ServiceTask'
);
startList.value = elementRegistry.value.filter(
(item) => item.type === 'bpmn:StartEvent'
);
endList.value = elementRegistry.value.filter(
(item) => item.type === 'bpmn:EndEvent'
);
if (localStorage.getItem("processTableData")) {
let processTableData = JSON.parse(localStorage.getItem("processTableData"));
if (nodeList) {
nodeList.value.forEach((i) => {
if (processTableData) {
processTableData.forEach((j) => {
if (i.id == j.id) {
i.approvalState = j.approvalState;
i.staffName = j.staffName;
}
})
}
})
}
changeColor();
}
}
})
}
const changeColor = () => {
if (startList) {
let overlaysStart = bpmnViewer.get('overlays');
let shapeStart = elementRegistry.value.get(startList.value[0].id);
if (shapeStart) {
const $overlayHtmlS = $('<div class="highlight-overlay-start-sty" style="">').css({
width: 48,
height: 48,
color: '#000000'
});
overlaysStart.add(startList.value[0].id, {
position: { top: -6, left: -6 },
html: $overlayHtmlS
});
}
}
if (endList) {
let overlaysEnd = bpmnViewer.get('overlays');
endList.value.forEach((e) => {
let shapeEnd = elementRegistry.value.get(e.id);
if (shapeEnd) {
const $overlayHtmlE = $('<div class="highlight-overlay-end-sty" style="">').css({
width: 48,
height: 48,
color: '#000000'
});
overlaysEnd.add(e.id, {
position: { top: -6, left: -6 },
html: $overlayHtmlE
});
}
})
}
nodeList.value.forEach(i => {
let overlays = bpmnViewer.get('overlays');
let shape = elementRegistry.value.get(i.id);
if (shape) {
let appointorNames = i.businessObject.$attrs['camunda:nodeName'];
let type = i.approvalState;
let $overlayHtml: JQuery<HTMLElement>;
if (type == 'Y') {
$overlayHtml = $('<div class="highlight-overlay" style="border: 0px solid;border-color:#f1f1f1;border-radius: 4px;"><div class="highlight-overlay-name">' + i.businessObject.name + '</div><div class="highlight-overlay-down">' + appointorNames + '</div><div class="highlight-overlay-down1">已通过</div>').css({
width: shape.width + 3,
height: shape.height + 3
});
} else if (type == 'A') {
$overlayHtml = $('<div class="highlight-overlay1" style="border: 0px solid;border-color:#f1f1f1;border-radius: 4px;"><div class="highlight-overlay-name">' + i.businessObject.name + '</div><div class="highlight-overlay-down">' + appointorNames + '</div><div class="highlight-overlay-down2">审批中</div>').css({
width: shape.width + 3,
height: shape.height + 3
});
} else if (type == 'R') {
$overlayHtml = $('<div class="highlight-overlay2" style="border: 0px solid;border-color:#f1f1f1;border-radius: 4px;"><div class="highlight-overlay-name">' + i.businessObject.name + '</div><div class="highlight-overlay-down">' + appointorNames + '</div><div class="highlight-overlay-down3">已驳回</div>').css({
width: shape.width + 3,
height: shape.height + 3
});
} else {
if (i.businessObject.name == '发起人') {
$overlayHtml = $('<div class="highlight-overlay" style="border: 0px solid;border-color:#f1f1f1;border-radius: 4px;"><div class="highlight-overlay-name">' + i.businessObject.name + '</div><div class="highlight-overlay-down">' + appointorNames + '</div><div class="highlight-overlay-down3"></div>').css({
width: shape.width + 3,
height: shape.height + 3
});
} else {
$overlayHtml = $('<div class="highlight-overlay3" style="border: 0px solid;border-color:#f1f1f1;border-radius: 4px;"><div class="highlight-overlay-name">' + i.businessObject.name + '</div><div class="highlight-overlay-down">' + appointorNames + '</div><div class="highlight-overlay-down4"></div>').css({
width: shape.width + 3,
height: shape.height + 3
});
}
}
overlays.add(i.id, {
position: { top: -1.5, left: -1.5 },
html: $overlayHtml
});
}
});
}
const getDetailData = (deploymentId) => {
if (!deploymentId) {
return
}
getDetailDataPromise(deploymentId).then((res:any) => {
if (res.code == '00000') {
// console.log('调用查看组件', res.data.data);
if (res.data) {
let data = res.data;
processScript.value = data.processScript;
tenantGuid.value = data.tenantGuid;
form.processName = data.processName;
form.description = data.description;
} else {
tenantGuid.value = '';
form.processName = '';
form.description = '';
processScript.value = `
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
id="sample-diagram"
targetNamespace="http://bpmn.io/schema/bpmn"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="process1567044459787" name="流程1567044459787" isExecutable="true">
<bpmn2:documentation>描述</bpmn2:documentation>
<bpmn2:startEvent id="StartEvent_01ydzqe" name="开始">
<bpmn2:outgoing>SequenceFlow_1qw929z</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:sequenceFlow id="SequenceFlow_1qw929z" sourceRef="StartEvent_01ydzqe" targetRef="Task_1piqdk6" />
<bpmn2:userTask id="Task_1piqdk6" name="请假申请">
<bpmn2:incoming>SequenceFlow_1qw929z</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0axt6j6</bpmn2:outgoing>
</bpmn2:userTask>
<bpmn2:endEvent id="EndEvent_0pnmjd3">
<bpmn2:incoming>SequenceFlow_0axt6j6</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="SequenceFlow_0axt6j6" sourceRef="Task_1piqdk6" targetRef="EndEvent_0pnmjd3" />
</bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="process1567044459787">
<bpmndi:BPMNShape id="StartEvent_01ydzqe_di" bpmnElement="StartEvent_01ydzqe">
<dc:Bounds x="532" y="72" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="539" y="53" width="22" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1qw929z_di" bpmnElement="SequenceFlow_1qw929z">
<di:waypoint x="550" y="108" />
<di:waypoint x="550" y="150" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="UserTask_1qxjy46_di" bpmnElement="Task_1piqdk6">
<dc:Bounds x="500" y="150" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0pnmjd3_di" bpmnElement="EndEvent_0pnmjd3">
<dc:Bounds x="532" y="338" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0axt6j6_di" bpmnElement="SequenceFlow_0axt6j6">
<di:waypoint x="550" y="230" />
<di:waypoint x="550" y="338" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
`
}
// 新增流程定义
createNewDiagram()
}
})
}
defineExpose({
getDetailData
})
onMounted(() => {
bpmnViewer = new BpmnViewer({
container: canvasRef.value,
moddleExtensions: {
camunda: camundaModdleDescriptor
}
})
})
</script>
<template>
<div class="containers">
<div class="canvas" ref="canvasRef"></div>
</div>
</template>
<style lang="scss" scoped>
.containers {
// position: absolute;
background: #E9EEF3;
width: 100%;
height: 300px;
overflow: auto;
// overflow-y: scroll;
.canvas {
width: 100%;
height: 300px
}
:deep(.bjs-powered-by) {
display: none;
}
:deep(.djs-palette .two-column .open) {
display: none;
}
:deep(.highlight-overlay) {
background: url(@/assets/images/approvalProcess/users.jpg) no-repeat;
background-size: 103px 83px;
font-size: 12px !important;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
:deep(.highlight-overlay1) {
background: url(@/assets/images/approvalProcess/users2.jpg) no-repeat;
background-size: 103px 83px;
font-size: 12px !important;
}
:deep(.highlight-overlay2) {
background: url(@/assets/images/approvalProcess/users1.jpg) no-repeat;
background-size: 103px 83px;
font-size: 12px !important;
}
:deep(.highlight-overlay3 ){
background: url(@/assets/images/approvalProcess/users3.jpg) no-repeat;
background-size: 103px 83px;
font-size: 12px !important;
}
:deep(.highlight-overlay-name) {
width: 100px;
height: 30px;
text-align: left;
padding-left: 22px;
line-height: 34px;
color: #ffffff;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
:deep(.highlight-overlay-down) {
width: 100px;
text-align: left;
height: 28px;
line-height: 28px;
padding-left: 9px;
overflow: hidden;
// padding: 10px 5px;
}
:deep(.highlight-overlay-down1) {
width: 100px;
text-align: left;
height: 20px;
line-height: 20px;
padding-left: 9px;
color: #4FA1A4;
// padding: 10px 5px;
}
:deep(.highlight-overlay-down2) {
width: 100px;
text-align: left;
height: 20px;
line-height: 20px;
padding-left: 9px;
color: #FF8623;
// padding: 10px 5px;
}
:deep(.highlight-overlay-down3) {
width: 100px;
text-align: left;
height: 20px;
line-height: 20px;
padding-left: 9px;
color: #FE4638;
// padding: 10px 5px;
}
:deep(.highlight-overlay-down4) {
width: 100px;
text-align: left;
height: 20px;
line-height: 20px;
padding-left: 9px;
color: #9A9A9A;
// padding: 10px 5px;
}
:deep(.highlight-overlay-start-sty) {
background: url(@/assets/images/approvalProcess/start.png) no-repeat;
background-size: 48px 48px;
font-size: 12px !important;
}
:deep(.highlight-overlay-end-sty) {
background: url(@/assets/images/approvalProcess/end.png) no-repeat;
background-size: 48px 48px;
font-size: 12px !important;
}
:deep(.djs-connection) {
path {
stroke: #A8A8A8 !important;
marker-end: url(#sequenceflow-arrow-normal) !important;
}
}
}
</style>
\ No newline at end of file
......@@ -3,7 +3,7 @@ function Layout() {
return import('@/layouts/index.vue')
}
const routes: RouteRecordRaw[] = [
{
{
path: '/data-asset-register/register-managemant',
component: Layout,
meta: {
......@@ -35,14 +35,8 @@ const routes: RouteRecordRaw[] = [
reuse: true
},
beforeEnter: (to, from) => {
if (to.query.type) {
to.meta.title = `详情-`;
return;
}
if (to.query.guid) {
to.meta.title = `编辑-`;
to.meta.editPage = true;
}
to.meta.title = to.query.type == 'edit' ? `编辑-${to.query.name}` : '新建资产登记';
to.meta.editPage = true;
}
},
{
......@@ -55,11 +49,14 @@ const routes: RouteRecordRaw[] = [
breadcrumb: false,
cache: true,
reuse: true
},
beforeEnter: (to, from) => {
to.meta.title = `详情-${to.query.name}`;
}
}
],
},
{
{
path: '/data-asset-register/quality-evaluate',
component: Layout,
meta: {
......@@ -92,7 +89,7 @@ const routes: RouteRecordRaw[] = [
}
],
},
{
{
path: '/data-asset-register/value-evaluate',
component: Layout,
meta: {
......
const useProcessStore = defineStore(
// 唯一ID
'process',
() => {
const processNodes = ref([])
const staffVOS = computed(() => { // 最后审批node
return processNodes.value.find((item:any) => item.approvalState)
})
const clearStore = () => {
processNodes.value = []
}
return {
processNodes,
staffVOS,
clearStore
}
},
{
persist:{
storage: sessionStorage,
paths: ['processNodes','staffVOS']
}
}
)
export default useProcessStore
\ No newline at end of file
......@@ -4,7 +4,7 @@ import router from '@/router'
import { ElMessage } from 'element-plus'
import apiUser from '@/api/modules/user'
import { getCurrentTime } from '@/utils/common'
import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface } from '@/api/modules/queryService'
import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface, getCurrentUserInfo } from '@/api/modules/queryService'
const useUserStore = defineStore(
// 唯一ID
......@@ -29,47 +29,49 @@ const useUserStore = defineStore(
/* idass的登录页面url,退出登录需要跳转到登录页。*/
const idassLoginUrl = 'https://idaas-test.csbr.cn/login';
const timer: any = ref(null);
//获取token.
//获取token.
function getToken(data, state) {
data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
data.userType = 2;
data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/';
return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
getTokenPromise.value = null;
console.log(res);
if (res.code == '00000') {
console.log(res.data);
isLogin.value = true;
localStorage.setItem('code', `${data.code}`);
localStorage.setItem('state', state);
localStorage.setItem('token', res.data.token || "");
token.value = res.data.access_token;
localStorage.setItem('refresh_token', res.data.refreshToken || "");
const expiresIn = (Date.now() + 1700000) + "";
localStorage.setItem('expiresIn', expiresIn);
refreshUserToken();
//获取用户信息
account.value = res.data.logonUser
userId.value = res.data.userId
userName.value = res.data.userName
// userData.value = JSON.stringify(res.data.data);
currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : '';
localStorage.setItem('currentTenantGuid', currentTenantGuid.value);
let currentTenant = res.data.tenantInfoList?.[0];
return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => {
if (info.code == '00000') {
localStorage.setItem('userName', currentTenant?.name)
localStorage.setItem('userInfoData', JSON.stringify(info.data));
userInfoData.value = info.data;
} else {
ElMessage.error(info.msg)
}
})
} else {
isLogin.value = false;
// ElMessage.error(res.msg);//授权码被重复使用,不抛出异常。
}
});
data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
data.userType = 2;
data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/';
return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
getTokenPromise.value = null;
console.log(res);
if (res.code == '00000') {
console.log(res.data);
isLogin.value = true;
localStorage.setItem('code', `${data.code}`);
localStorage.setItem('state', state);
localStorage.setItem('token', res.data.token || "");
token.value = res.data.access_token;
localStorage.setItem('refresh_token', res.data.refreshToken || "");
const expiresIn = (Date.now() + 1700000) + "";
localStorage.setItem('expiresIn', expiresIn);
refreshUserToken();
//获取用户信息
account.value = res.data.logonUser
userId.value = res.data.userId
userName.value = res.data.userName
currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : '';
localStorage.setItem('currentTenantGuid', currentTenantGuid.value);
let currentTenant = res.data.tenantInfoList?.[0];
return getCurrentUserInfo({ tenantGuid: currentTenantGuid.value }).then((result: any) => {
return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => {
if (info.code == '00000') {
localStorage.setItem('userName', currentTenant?.name)
localStorage.setItem('userInfoData', JSON.stringify(info.data));
userInfoData.value = info.data;
localStorage.setItem('userData', JSON.stringify(result.data));
} else {
ElMessage.error(info.msg)
}
})
})
} else {
isLogin.value = false;
// ElMessage.error(res.msg);//授权码被重复使用,不抛出异常。
}
});
}
function refreshUserToken() {
......@@ -80,11 +82,11 @@ const useUserStore = defineStore(
const process = async () => {
if (parseInt(expiresIn) - Date.now() < 600000) {
const refreshing = localStorage.getItem('refreshing');
let now = new Date();
let now = new Date();
if (!refreshing || new Date(refreshing) < now) {//确保多个页面只刷新一次。
localStorage.setItem('refreshing', now.toISOString());
await refresh();
localStorage.removeItem('refreshing');
localStorage.setItem('refreshing', now.toISOString());
await refresh();
localStorage.removeItem('refreshing');
}
}
}
......@@ -100,14 +102,14 @@ const useUserStore = defineStore(
refreshToken: localStorage.getItem('refresh_token')
}).then((resInfo: any) => {
getTokenPromise.value = null;
if (resInfo.code == '00000'){
localStorage.setItem('token',resInfo.data.accessToken);
if (resInfo.code == '00000') {
localStorage.setItem('token', resInfo.data.accessToken);
token.value = resInfo.data.accessToken;
localStorage.setItem('refresh_token',resInfo.data.refreshToken);
localStorage.setItem('refresh_token', resInfo.data.refreshToken);
const expiresIn = (Date.now() + 1700000) + "";
localStorage.setItem('expiresIn', expiresIn);
} else {
//会出现同步刷新token就退出登录的问题,去掉这个代码。
//会出现同步刷新token就退出登录的问题,去掉这个代码。
//logout(true)
}
}).catch(() => {
......@@ -151,23 +153,23 @@ const useUserStore = defineStore(
// 登出
async function logout(isErrorReturn = false, redirect = router.currentRoute.value.fullPath) {
if (!isErrorReturn && localStorage.getItem('code')) {
isLoginOut.value = true;
loginOut().then(() => {
localStorage.clear()
account.value = ''
userId.value = ''
userName.value = ''
userData.value = ''
token.value = '';
timer.value && clearInterval(timer.value);
isLogin.value = false;
userInfoData.value = [];
routeStore.removeRoutes()
menuStore.setActived(0)
tabbar.value = []
tabbarMap.value = {}
window.location.href = idassLoginUrl + '?logout=1';
});
isLoginOut.value = true;
loginOut().then(() => {
localStorage.clear()
account.value = ''
userId.value = ''
userName.value = ''
userData.value = ''
token.value = '';
timer.value && clearInterval(timer.value);
isLogin.value = false;
userInfoData.value = [];
routeStore.removeRoutes()
menuStore.setActived(0)
tabbar.value = []
tabbarMap.value = {}
window.location.href = idassLoginUrl + '?logout=1';
});
} else {
let hasCode = localStorage.getItem('code');
isLoginOut.value = true;
......@@ -228,7 +230,7 @@ const useUserStore = defineStore(
mark = 'data-sync'
} else if (item.meta.title == '数据质量') {
mark = 'data-quality'
} else if (item.meta.title == '数据盘点') {
} else if (item.meta.title == '数据盘点') {
mark = 'data-inventory'
} else if (item.meta.title == '首页') {
mark = 'data-asset-index'
......
......@@ -9,6 +9,7 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
ApprovalProcess: typeof import('./../components/ApprovalProcess/src/ApprovalProcess.vue')['default']
Auth: typeof import('./../components/Auth/index.vue')['default']
AuthAll: typeof import('./../components/AuthAll/index.vue')['default']
ContentWrap: typeof import('./../components/ContentWrap/src/ContentWrap.vue')['default']
......@@ -31,6 +32,7 @@ declare module '@vue/runtime-core' {
ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']
LineageGraph: typeof import('./../components/LineageGraph/index.vue')['default']
ListPanel: typeof import('./../components/ListPanel/index.vue')['default']
LookBpmn: typeof import('./../components/ApprovalProcess/src/components/LookBpmn.vue')['default']
Month: typeof import('./../components/Schedule/component/month.vue')['default']
NotAllowed: typeof import('./../components/NotAllowed/index.vue')['default']
PageHeader: typeof import('./../components/PageHeader/index.vue')['default']
......
......@@ -5,7 +5,6 @@
<script lang="ts" setup name="importTableField">
import { ref } from 'vue';
import {
getDataTypeList,
getParamsList
} from "@/api/modules/dataAsset";
import { pinyin } from 'pinyin-pro';
......@@ -80,7 +79,7 @@ const handleFileDataChange = (fileFields, files, sheetName, data) => {
}
const getFieldTypeList = () => {
getDataTypeList({
getParamsList({
dictType: "字段类型"
}).then((res: any) => {
fieldTypes.value = [];
......
......@@ -10,8 +10,7 @@ import {
getAreaData
} from "@/api/modules/queryService";
import {
getDamTypesList,
getSubjectDoaminList,
getParamsList,
dataSourcesList,
registerCatalogSave,
existDamName,
......@@ -570,7 +569,7 @@ onBeforeMount(() => {
}
return data;
}
getDamTypesList({
getParamsList({
dictType: "资产类型",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
......@@ -582,7 +581,7 @@ onBeforeMount(() => {
proxy.$ElMessage.error(res.msg);
}
})
getSubjectDoaminList({
getParamsList({
dictType: "数据资产目录主题名称",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
......
......@@ -9,8 +9,7 @@ import { ElMessageBox } from "element-plus";
import { useRouter, useRoute } from "vue-router";
import { MoreFilled } from "@element-plus/icons-vue";
import {
getSubjectDoaminList,
getDamTypesList,
getParamsList,
getDamCatalogTable,
registerCatalogDelete
} from "@/api/modules/dataAsset";
......@@ -217,7 +216,7 @@ onActivated(() => {
});
onBeforeMount(() => {
getDamTypesList({
getParamsList({
dictType: "资产类型",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
......@@ -229,7 +228,7 @@ onBeforeMount(() => {
proxy.$ElMessage.error(res.msg);
}
})
getSubjectDoaminList({
getParamsList({
dictType: "数据资产目录主题名称",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
......
......@@ -258,13 +258,14 @@ const getDetailInfo = () => {
const data = res.data || {};
detailInfo.value = data;
assetDetailInfo.value = data;
if (fullPath === route.fullPath) {
document.title = `详情-${data.daName}`;
}
let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
if (tab) {
tab.meta.title = `详情-${data.daName}`;
}
deploymentId.value = data.camundaDeploymentId;
// if (fullPath === route.fullPath) {
// document.title = `详情-${data.daName}`;
// }
// let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
// if (tab) {
// tab.meta.title = `详情-${data.daName}`;
// }
isTextTruncated();
} else {
ElMessage.error(res.msg);
......@@ -293,11 +294,11 @@ onBeforeMount(() => {
});
onActivated(() => {
if (assetDetailInfo.value?.daName) {
if (fullPath === route.fullPath) {
document.title = `详情-${assetDetailInfo.value?.daName}`;
}
}
// if (assetDetailInfo.value?.daName) {
// if (fullPath === route.fullPath) {
// document.title = `详情-${assetDetailInfo.value?.daName}`;
// }
// }
});
onMounted(() => {
......@@ -399,7 +400,7 @@ const approveTableInfo: any = ref({
show: false
}
});
const deploymentId = ref('');
const tenantDetail: any = ref({});
/** 获取当前登录会员,服务商,企业等详情。 */
......@@ -490,7 +491,7 @@ const btnClick = (btn) => {
qualityEvaluateFormItems.value[1].disabled = true;
} else {
qualityEvaluateFormItems.value[1].default = null;
qualityEvaluateFormItems.value[1].disabled = false;
qualityEvaluateFormItems.value[1].disabled = false;
}
} else if (type == 'reject') {
rejectDialogInfo.value.visible = true;
......@@ -1593,7 +1594,9 @@ const handleClickDamCatalogDetail = () => {
</ContentWrap>
<ContentWrap id="id-approveInfo" title="审批信息" expandSwicth style="margin-top: 15px"
:isExpand="approveInfoExpand" @expand="(v) => approveInfoExpand = v">
<Table :tableInfo="approveTableInfo" />
<!-- <Table :tableInfo="approveTableInfo" /> -->
<ApprovalProcess v-if="deploymentId" :deploymentId="deploymentId" :definitionId="''">
</ApprovalProcess>
</ContentWrap>
<ContentWrap id="id-certificate" v-if="tabsInfo.tabs.find(t => t.name == 'certificate')" title="证件信息"
expandSwicth style="margin-top: 15px" :isExpand="certificateExpand" @expand="(v) => certificateExpand = v">
......@@ -2065,4 +2068,4 @@ const handleClickDamCatalogDetail = () => {
}
}
}
</style>
\ No newline at end of file
</style>
......
......@@ -20,7 +20,8 @@ import {
registerApproveReSubmit,
registerApproveAllow,
registerApproveBackup,
getRegisterTenant
getRegisterTenant,
getExchangeList
} from "@/api/modules/dataAsset";
import useDataAssetStore from "@/store/modules/dataAsset";
import useUserStore from "@/store/modules/user";
......@@ -37,11 +38,8 @@ const path = route.path;
const loading = ref(false);
const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href
const demandListData: any = ref([
{ companyName: '北数所', listedNum: 16, processNum: 1235 },
{ companyName: '深数所', listedNum: 16, processNum: 1235 },
{ companyName: '苏数所', listedNum: 16, processNum: 1235 },
]);
const exchangeList: any = ref([]);
const exchangGuid = ref('');
const searchItemList = ref([
{
type: "input",
......@@ -51,21 +49,21 @@ const searchItemList = ref([
placeholder: "资产名称",
clearable: true,
},
{
type: "select",
label: "",
field: "tenantGuid",
default: "",
placeholder: "企业名称",
clearable: true,
filterable: true,
options: [],
props: {
value: 'guid',
label: 'tenantName'
},
visible: false,
},
// {
// type: "select",
// label: "",
// field: "tenantGuid",
// default: "",
// placeholder: "企业名称",
// clearable: true,
// filterable: true,
// options: [],
// props: {
// value: 'guid',
// label: 'tenantName'
// },
// visible: false,
// },
{
type: 'select',
label: '',
......@@ -118,7 +116,7 @@ const isCompanyPlatform = ref(userData.tenantType == 1);
const listDataLoading = ref(false);
const activeListType = ref('card');
const activeListType = ref('list');
const listData: any = ref([]);
......@@ -144,9 +142,11 @@ const tableInfo = ref({
});
const getTableBtns = (row, includeDetail = true) => {
console.log(userData)
let btnsArr: any[] = [];
if (row.approveState == 'N') {//只有草稿中的详情是可以编辑的
includeDetail && btnsArr.push({ label: "详情", value: "path_detail" })
includeDetail && btnsArr.push({ label: "编辑", value: "edit" })
if (row.tenantGuid == userData.tenantGuid) {
btnsArr.push({ label: "删除", value: "delete" });
}
......@@ -162,7 +162,7 @@ const getTableBtns = (row, includeDetail = true) => {
} else if (row.approveState == 'Y') {//已通过的不能删除。
includeDetail && btnsArr.push({ label: "详情", value: "path_detail" })
} else if (row.approveState == 'R' || row.approveState == 'C') {//已驳回或已撤销
includeDetail && btnsArr.push({ label: "详情", value: "path_detail" });
includeDetail && btnsArr.push({ label: "编辑", value: "edit" });
if (row.tenantGuid == userData.tenantGuid) {
btnsArr.push({ label: "重新提交", value: "edit", disabled: false })
}
......@@ -176,6 +176,18 @@ const getTableBtns = (row, includeDetail = true) => {
const currTableData: any = ref({});
const btnClick = (btn) => {
const type = btn.value;
if (type == 'create') {
router.push({
name: 'registerStart',
query: { exchangeGuid: btn.exchangeGuid, type }
});
} else if (type == 'search') {
exchangGuid.value = btn.exchangeGuid;
pageInfo.value.curr = 1;
pageInfo.value.limit = 50;
getTableData();
}
}
const tableBtnClick = (scope, btn) => {
......@@ -185,7 +197,7 @@ const tableBtnClick = (scope, btn) => {
if (type === "edit") { //草稿中\已驳回\已撤销\已通过 状态,才可以编辑。
router.push({
name: 'registerStart',
query: { guid: row.guid }
query: { guid: row.guid, damGuid: row.damGuid, name: row.daName, type }
});
} else if (type == "delete") {
delTableOpen("此操作将永久删除该资产登记,是否继续?", "warning");
......@@ -220,17 +232,21 @@ const tableBtnClick = (scope, btn) => {
});
});
} else if (type === 'path_detail') { // 详情, 若是草稿中,详情就是编辑,
if (row.approveState === 'N') {
router.push({
name: 'registerStart',
query: { guid: row.guid }
});
} else {
router.push({
name: 'registerInfoDetail',
query: { guid: row.guid, type: 'asset', daTenantGuid: row.tenantGuid }
});
}
// if (row.approveState === 'N') {
// router.push({
// name: 'registerStart',
// query: { guid: row.guid, name: row.daName, type: 'detail' }
// });
// } else {
// router.push({
// name: 'registerInfoDetail',
// query: { guid: row.guid, type: 'asset', daTenantGuid: row.tenantGuid }
// });
// }
router.push({
name: 'registerInfoDetail',
query: { guid: row.guid, name: row.daName, type: 'asset' }
});
} else if (type === 'pass') {
passDialogInfo.value.visible = true;
} else if (type == 'backup') {
......@@ -291,7 +307,8 @@ const getTableData = () => {
pageIndex: pageInfo.value.curr,
daName: pageInfo.value.daName,
approveState: pageInfo.value.approveState,
tenantGuid: pageInfo.value.tenantGuid
tenantGuid: pageInfo.value.tenantGuid,
exchangGuid: exchangGuid.value
}).then((res: any) => {
listDataLoading.value = false;
tableInfo.value.loading = false;
......@@ -307,13 +324,24 @@ const getTableData = () => {
})
}
const getExchangeData = () => {
getExchangeList().then((res: any) => {
if (res.code == proxy.$passCode) {
exchangeList.value = res.data || [];
} else {
ElMessage.error(res.msg);
}
})
}
const toSearch = (val: any, clear: boolean = false) => {
pageInfo.value.curr = 1;
if (clear) {
searchItemList.value.map((item) => (item.default = ""));
searchItemList.value.map((item) => item.default = "");
pageInfo.value.daName = '';
pageInfo.value.approveState = "";
pageInfo.value.tenantGuid = "";
val && (exchangGuid.value = '');
} else {
pageInfo.value.daName = val.daName;
pageInfo.value.approveState = val.approveState;
......@@ -332,34 +360,30 @@ onActivated(() => {
if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
pageInfo.value.curr = 1;
getTableData();
getExchangeData();
assetStore.set(false);
}
})
onBeforeMount(() => {
if (isCompanyPlatform.value) {
tableInfo.value.fields = tableFields.value;
searchItemList.value[1].visible = false;
} else {
tableFields.value.splice(2, 0, { label: "企业名称", field: "tenantName", width: 240, align: "left" });
tableInfo.value.fields = tableFields.value;
searchItemList.value[1].visible = true;
getRegisterTenant().then((res: any) => {
if (res.code == proxy.$passCode) {
searchItemList.value[1].options = res.data || [];
} else {
ElMessage.error(res.msg);
}
});
}
// if (isCompanyPlatform.value) {
// tableInfo.value.fields = tableFields.value;
// searchItemList.value[1].visible = false;
// } else {
// tableFields.value.splice(2, 0, { label: "企业名称", field: "tenantName", width: 240, align: "left" });
// tableInfo.value.fields = tableFields.value;
// searchItemList.value[1].visible = true;
// getRegisterTenant().then((res: any) => {
// if (res.code == proxy.$passCode) {
// searchItemList.value[1].options = res.data || [];
// } else {
// ElMessage.error(res.msg);
// }
// });
// }
getExchangeData();
})
const handleCreate = () => {
router.push({
name: 'registerStart'
});
}
const passDialogInfo = ref({
visible: false,
size: 460,
......@@ -498,50 +522,35 @@ const createBtnVisible = computed(() => {
<template>
<div class="container_wrap" v-loading="loading">
<div class="list-content">
<div class="card-content" v-for="item in demandListData" :key="item.guid">
<div class="header">
<img class="left-img" :src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo"
alt="" />
<div class="right-main">
<div class="title">{{ item.companyName ?? '--' }}</div>
<div class="count-group">
<div class="count-item">
<div class="item-label">已上架产品数</div>
<div class="item-num">{{ changeNum(item.listedNum) }}</div>
</div>
<div class="count-item">
<div class="item-label">审批中产品数</div>
<div class="item-num">{{ changeNum(item.processNum) }}</div>
</div>
</div>
</div>
</div>
<div class="operator-btn">
<div class="left-btn borderRight" @click="btnClick(item)">更新模板</div>
<div class="left-btn" @click="btnClick(item)">资产登记</div>
</div>
</div>
<div class="table_tool_wrap">
<TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" />
</div>
<div class="content_main_wrap">
<div class="table_tool_wrap">
<TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" />
<div class="tools_btns">
<el-button type="primary" @click="handleCreate" v-if="createBtnVisible" v-preReClick>新建</el-button>
<div class="view-change">
<div class="list-btn" :class="[activeListType === 'list' ? 'active' : '']" @click="activeListType = 'list'">
<el-icon style="width: 12px;height: 12px;">
<svg-icon style="width: 12px;height: 12px;"
:name="activeListType === 'list' ? 'btn-list-white' : 'btn-list'" />
</el-icon>
</div>
<div class="card-btn" :class="[activeListType === 'card' ? 'active' : '']" @click="activeListType = 'card'">
<el-icon style="width: 12px;height: 12px;">
<svg-icon style="width: 12px;height: 12px;"
:name="activeListType === 'card' ? 'btn-card-white' : 'btn-card'" />
</el-icon>
<div class="list-content">
<div class="card-content" :class="{ active: exchangGuid == item.exchangeGuid }" v-for="item in exchangeList"
:key="item.exchangeGuid">
<div class="header">
<img class="left-img" :src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo"
alt="" />
<div class="right-main">
<div class="title" :class="{ active: exchangGuid == item.exchangeGuid }"
@click="btnClick({ value: 'search', ...item })" v-preReClick>{{ item.exchangeName ?? '--' }}</div>
<div class="count-group">
<div class="count-item">
<div class="item-label">已上架产品数</div>
<div class="item-num">{{ changeNum(item.listingNum || 0) }}</div>
</div>
<div class="count-item">
<div class="item-label">审批中产品数</div>
<div class="item-num">{{ changeNum(item.underReviewNum || 0) }}</div>
</div>
</div>
</div>
</div>
<div class="operator-btn">
<!-- <div class="left-btn borderRight" @click="btnClick(item)">更新模板</div> -->
<div class="left-btn is_block" @click="btnClick({ value: 'create', ...item })">资产登记</div>
</div>
</div>
</div>
<div class="table_panel_wrap" :style="{ height: createBtnVisible ? 'calc(100% - 89px)' : 'calc(100% - 40px)' }">
......@@ -554,7 +563,7 @@ const createBtnVisible = computed(() => {
</div>
<el-tag :type="(tagType(item, 'approveState') as any)">{{
tagMethod(item, 'approveState')
}}</el-tag>
}}</el-tag>
</div>
<div v-if="!isCompanyPlatform" class="desc">{{ item.tenantName ?? '深圳传世般若有限公司' }}</div>
<div class="desc">{{ item.updateTime }}</div>
......@@ -599,13 +608,23 @@ const createBtnVisible = computed(() => {
<style scoped lang="scss">
.container_wrap {
padding: 16px 16px 0;
display: flex;
flex-direction: column;
padding: 0 16px;
.table_tool_wrap {
height: 44px;
margin-bottom: 4px;
}
.table_panel_wrap {
flex: 1;
}
}
.content_main_wrap {
flex: 1;
display: flex;
flex-direction: column;
height: calc(100% - 48px);
}
.table_panel {
......@@ -752,6 +771,10 @@ const createBtnVisible = computed(() => {
padding: 16px;
box-shadow: 0 0 0 1px #d9d9d9;
&.active {
box-shadow: 0 0 0 1px var(--el-color-primary);
}
.header {
display: flex;
margin-bottom: 16px;
......@@ -766,6 +789,12 @@ const createBtnVisible = computed(() => {
color: #212121;
font-weight: 600;
margin-bottom: 8px;
cursor: pointer;
&:hover,
&.active {
color: var(--el-color-primary);
}
}
.right-main {
......@@ -792,29 +821,35 @@ const createBtnVisible = computed(() => {
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 0 0 1px #d9d9d9;
box-shadow: 0 0 0 1px #4fa1a4;
position: relative;
&::after {
content: '';
width: 0;
height: 100%;
border-left: 1px solid #d9d9d9;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
// &::after {
// content: '';
// width: 0;
// height: 100%;
// border-left: 1px solid #d9d9d9;
// position: absolute;
// left: 50%;
// transform: translateX(-50%);
// }
>.left-btn {
width: 50%;
height: 40px;
line-height: 40px;
text-align: center;
background: #4fa1a4;
color: #fff;
cursor: pointer;
&:hover {
color: #4fa1a4;
&.is_block {
width: 100%;
}
// &:hover {
// color: #4fa1a4;
// }
}
}
}
......
......@@ -13,12 +13,12 @@ import {
getAreaData,
getTenantDetailInfo,
getServiceTenants,
getTenantAttach
getTenantAttach,
getSingleList
} from "@/api/modules/queryService";
import { ElMessage, ElMessageBox } from "element-plus";
import {
getSubjectDoaminList,
getDamTypesList,
getParamsList,
registerSave,
registerUpdate,
getRegiaterDetail,
......@@ -27,6 +27,7 @@ import {
getServiceDetail,
getRegisterCatalogList
} from '@/api/modules/dataAsset';
import { getCamundaDeploymentId } from "@/api/modules/workFlowService"
import useDataAssetStore from "@/store/modules/dataAsset";
import { useValidator } from '@/hooks/useValidator';
......@@ -50,6 +51,8 @@ const editType = route.query.type;
const registerCatalogList: any = ref([]);
const damTypes: any = ref([]);
const subjectDomainListData: any = ref([]);
const qualityEvaluationData: any = ref([]);
const costAssessmentData: any = ref([]);
const getParentAreaPromise: any = ref(null);
const getAreaDataPromise: any = ref({});
......@@ -154,8 +157,22 @@ const getArea = (node, resolve) => {
}
}
const serviceTenants: any = ref([]);
const currTenantChanged: any = ref([]);
const serviceTenants: any = ref([
{
"exchangeGuid": "07c11603a8bc4d8f8bee2e3a34ab4d8a",
"exchangeName": "测试数交所",
"listingNum": 0,
"underReviewNum": 0
}
]);
const currTenantChanged: any = ref([
{
"exchangeGuid": "07c11603a8bc4d8f8bee2e3a34ab4d8a",
"exchangeName": "测试数交所",
"listingNum": 0,
"underReviewNum": 0
}
]);
const tenantDetail: any = ref({});
......@@ -193,8 +210,7 @@ const setBaseFormItemsValue = (info) => {
item.default = info.coverageArea;
item.children[0].default = info.coverageAreas;
item.children[0].visible = info.coverageArea != 'all';
}
else if (item.field == 'dataSensitivityLevel') {
} else if (item.field == 'dataSensitivityLevel') {
item.default = info[item.field] || [];
item.inputOptions.default = info['dataSensitivityLevelOther'];
if (info['dataSensitivityLevel']?.includes(5)) {
......@@ -250,14 +266,34 @@ const setBaseFormItemsValue = (info) => {
} else {
item.children[1].visible = false;
}
} else if (item.field == 'isEvaluationAssessment') {
}
// else if (item.field == 'isEvaluationAssessment') {
// item.default = info[item.field];
// if (info['isEvaluationAssessment'] === 'Y') {
// uploadFormItems.value[2].visible = true;
// uploadFormItems.value[3].visible = true
// } else {
// uploadFormItems.value[2].visible = false;
// uploadFormItems.value[3].visible = false
// }
// }
else if (item.field == 'isQualityAssessment') {
item.default = info[item.field];
if (info['isEvaluationAssessment'] === 'Y') {
if (info['isQualityAssessment'] === 'Y') {
uploadFormItems.value[2].visible = true;
uploadFormItems.value[3].visible = true
uploadFormItems.value[3].visible = true;
} else {
uploadFormItems.value[2].visible = false;
uploadFormItems.value[3].visible = false
uploadFormItems.value[3].visible = false;
}
} else if (item.field == 'isCostAssessment') {
item.default = info[item.field];
if (info['isCostAssessment'] === 'Y') {
uploadFormItems.value[4].visible = true;
uploadFormItems.value[5].visible = true;
} else {
uploadFormItems.value[4].visible = false;
uploadFormItems.value[5].visible = false;
}
} else {
item.default = info[item.field];
......@@ -271,8 +307,7 @@ const setUploadFormItemsValue = (info) => {
if (item.field == 'registerLetter') {
item.default = attach.registerLetter || [];
item.templateUrl = attachDataInfo.value.register_letter;
}
else if (item.field == 'qualityEvaluationFile') {
} else if (item.field == 'qualityEvaluationFile') {
item.default = attach.qualityEvaluationFile || [];
item.templateUrl = attachDataInfo.value.quality_evaluation_file;
} else if (item.field == 'costAssessmentFile') {
......@@ -281,6 +316,10 @@ const setUploadFormItemsValue = (info) => {
} else if (item.field === 'commitmentLetter') {
item.default = attach.commitmentLetter || [];
item.templateUrl = attachDataInfo.value['commitment-letter'];
} else if (item.field === 'costAssessmentInstitution') {
item.default = attach.costAssessmentInstitution || '';
} else if (item.field === 'qualityEvaluationInstitution') {
item.default = attach.qualityEvaluationInstitution || '';
}
});
}
......@@ -324,18 +363,18 @@ const getRegisterCatalogListData = () => {
if (res.code == proxy.$passCode) {
baseFormItems.value[0].options = registerCatalogList.value = res.data || []
let dataScaleItem = baseFormItems.value.find(item => item.field == 'dataScale');
if (draftDetailInfo.value.damGuid) {
let da = registerCatalogList.value.find(r => r.guid == draftDetailInfo.value.damGuid);
if (da && da.dataCount != null) {
dataScaleItem.disabled = true;
if ( draftDetailInfo.value.dataScale == null) {
draftDetailInfo.value.dataScale = da.dataCount;
setBaseFormItemsValue(draftDetailInfo.value);
}
} else {
dataScaleItem.disabled = false;
if (draftDetailInfo.value.damGuid) {
let da = registerCatalogList.value.find(r => r.guid == draftDetailInfo.value.damGuid);
if (da && da.dataCount != null) {
dataScaleItem.disabled = true;
if (draftDetailInfo.value.dataScale == null) {
draftDetailInfo.value.dataScale = da.dataCount;
setBaseFormItemsValue(draftDetailInfo.value);
}
} else {
dataScaleItem.disabled = false;
}
}
} else {
ElMessage.error(res.msg);
}
......@@ -348,12 +387,15 @@ onActivated(() => {
onBeforeMount(() => {
if (guid) {
baseFormItems.value[7].default = guid;
fullscreenLoading.value = true;
getRegiaterDetail({ guid: guid }).then((res: any) => {
fullscreenLoading.value = false;
if (res.code == proxy.$passCode) {
const data = res.data || {}
draftDetailInfo.value = data;
deploymentId.value = data.camundaDeploymentId;
processInstanceId.value = data.camundaInstanceId
let coverageArea = '';
let coverageAreas = [];
let damTypeItem = baseFormItems.value.find(item => item.field == 'damType');
......@@ -401,17 +443,18 @@ onBeforeMount(() => {
});
}
if (data.exchangeGuid) {
getTenantAttach(data.exchangeGuid).then((res: any) => {
if (res?.code == proxy.$passCode) {
Object.assign(attachDataInfo.value, res.data || {});
uploadFormItems.value[0].templateUrl = attachDataInfo.value.register_letter;
uploadFormItems.value[1].templateUrl = attachDataInfo.value['commitment-letter'];
setUploadFormItemsValue(draftDetailInfo.value);
} else {
ElMessage.error(res.msg);
setUploadFormItemsValue(draftDetailInfo.value);
}
})
// getTenantAttach(data.exchangeGuid).then((res: any) => {
// if (res?.code == proxy.$passCode) {
// Object.assign(attachDataInfo.value, res.data || {});
// uploadFormItems.value[0].templateUrl = attachDataInfo.value.register_letter;
// uploadFormItems.value[1].templateUrl = attachDataInfo.value['commitment-letter'];
// setUploadFormItemsValue(draftDetailInfo.value);
// } else {
// ElMessage.error(res.msg);
// setUploadFormItemsValue(draftDetailInfo.value);
// }
// })
setUploadFormItemsValue(draftDetailInfo.value);
} else {
setUploadFormItemsValue(draftDetailInfo.value);
}
......@@ -435,13 +478,13 @@ onBeforeMount(() => {
} else {
setPropertyFormItemsValue(draftDetailInfo.value);
}
if (fullPath === route.fullPath) {
document.title = editType ? `详情-${data.daName}` : `编辑-${data.daName}`;
}
let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
if (tab) {
tab.meta.title = editType ? `详情-${data.daName}` : `编辑-${data.daName}`;
}
// if (fullPath === route.fullPath) {
// document.title = editType ? `详情-${data.daName}` : `编辑-${data.daName}`;
// }
// let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
// if (tab) {
// tab.meta.title = editType ? `详情-${data.daName}` : `编辑-${data.daName}`;
// }
if (data.approveGuid != null) {
approveTableInfo.value.loading = true;
getApproveList(guid).then((res: any) => {
......@@ -473,59 +516,68 @@ onBeforeMount(() => {
}
});
} else {
//新建无guid的时候显示这个审批信息,有guid调用另一个接口。
getTenantApprove().then((res: any) => {
getCamundaDeploymentId('10017').then((res: any) => {
if (res.code == proxy.$passCode) {
approveTableInfo.value.data = res.data?.map(d => {
return {
tenantType: d.substring(4)
}
}) || [];
deploymentId.value = res.data;
} else {
ElMessage.error(res.msg);
}
});
})
// //新建无guid的时候显示这个审批信息,有guid调用另一个接口。
// getTenantApprove().then((res: any) => {
// if (res.code == proxy.$passCode) {
// approveTableInfo.value.data = res.data?.map(d => {
// return {
// tenantType: d.substring(4)
// }
// }) || [];
// } else {
// ElMessage.error(res.msg);
// }
// });
}
getTenantDetail();
getServiceTenants({
tenantType: 3
}).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data ?? {};
serviceTenants.value = data['3'] || [];
let item2 = baseFormItems.value.find(f => f.field === 'rules');
item2.children[1].options = serviceTenants.value;
} else {
ElMessage.error(res.msg);
}
});
getServiceDetail(userData.tenantGuid).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data ?? {};
currTenantChanged.value = data.filter(d => d.serviceType == 4);
let formItem = baseFormItems.value.find(f => f.field === 'exchangeGuid');
formItem.options = currTenantChanged.value;
} else {
ElMessage.error(res.msg);
}
});
let exchangeItem = baseFormItems.value.find(f => f.field === 'exchangeGuid');
exchangeItem.default = route.query.exchangeGuid;
// getTenantDetail();
// getServiceTenants({
// tenantType: 3
// }).then((res: any) => {
// if (res.code == proxy.$passCode) {
// const data = res.data ?? {};
// serviceTenants.value = data['3'] || [];
// let item2 = baseFormItems.value.find(f => f.field === 'rules');
// item2.children[1].options = serviceTenants.value;
// } else {
// ElMessage.error(res.msg);
// }
// });
// getServiceDetail(userData.tenantGuid).then((res: any) => {
// if (res.code == proxy.$passCode) {
// const data = res.data ?? {};
// currTenantChanged.value = data.filter(d => d.serviceType == 4);
// let formItem = baseFormItems.value.find(f => f.field === 'exchangeGuid');
// formItem.options = currTenantChanged.value;
// } else {
// ElMessage.error(res.msg);
// }
// });
getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => {
if (res?.code == proxy.$passCode) {
parentAreaData.value = res.data ?? [];
return parentAreaData.value;
}
})
getTenantAttach(userData.tenantGuid).then((res: any) => {
if (res?.code == proxy.$passCode) {
console.log(res.data);
Object.assign(attachDataInfo.value, res.data || {});
uploadFormItems.value[2].templateUrl = attachDataInfo.value.quality_evaluation_file;
uploadFormItems.value[3].templateUrl = attachDataInfo.value.cost_assessment_file;
} else {
ElMessage.error(res.msg);
}
})
getDamTypesList().then((res: any) => {
// getTenantAttach(userData.tenantGuid).then((res: any) => {
// if (res?.code == proxy.$passCode) {
// console.log(res.data);
// Object.assign(attachDataInfo.value, res.data || {});
// uploadFormItems.value[2].templateUrl = attachDataInfo.value.quality_evaluation_file;
// uploadFormItems.value[3].templateUrl = attachDataInfo.value.cost_assessment_file;
// } else {
// ElMessage.error(res.msg);
// }
// })
getParamsList({ dictType: '资产类型' }).then((res: any) => {
if (res.code == proxy.$passCode) {
damTypes.value = res.data || [];
let item = baseFormItems.value.find(item => item.field == 'damType');
......@@ -542,7 +594,7 @@ onBeforeMount(() => {
proxy.$ElMessage.error(res.msg);
}
})
getSubjectDoaminList().then((res: any) => {
getParamsList({ dictType: '数据资产目录主题名称' }).then((res: any) => {
if (res.code == proxy.$passCode) {
subjectDomainListData.value = res.data || [];
let item = baseFormItems.value.find(item => item.field == 'subjectDomain');
......@@ -551,6 +603,26 @@ onBeforeMount(() => {
proxy.$ElMessage.error(res.msg);
}
})
// 获取质量评估机构
getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
if (res.code == proxy.$passCode) {
qualityEvaluationData.value = res.data.records || [];
let item = uploadFormItems.value.find(item => item.field == 'qualityEvaluationInstitution');
item && (item.options = qualityEvaluationData.value);
} else {
proxy.$ElMessage.error(res.msg);
}
})
// 获取价值评估机构
getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12504" }).then((res: any) => {
if (res.code == proxy.$passCode) {
costAssessmentData.value = res.data.records || [];
let item = uploadFormItems.value.find(item => item.field == 'costAssessmentInstitution');
item && (item.options = costAssessmentData.value);
} else {
proxy.$ElMessage.error(res.msg);
}
})
});
const tabsInfo = ref({
......@@ -618,8 +690,8 @@ const baseFormItems: any = ref([
default: '',
options: damTypes.value,
props: {
value: 'paramValue',
label: 'paramName'
// value: 'paramValue',
// label: 'paramName'
},
required: true,
visible: true
......@@ -633,8 +705,9 @@ const baseFormItems: any = ref([
checkStrictly: false,//只能选择叶子节点。
lazy: false,
props: {
label: "paramName",
value: "paramValue",
label: "label",
value: "value",
children: 'childDictList'
},
filterable: true,
clearable: true,
......@@ -649,14 +722,14 @@ const baseFormItems: any = ref([
regexp: /\D/g,
default: '',
required: true
}, {
label: "数据时间范围",
type: "date-picker",
field: "dateRange",
default: null,
placeholder: "开始时间~结束时间",
clearable: true,
required: true,
}, {
label: "数据时间范围",
type: "date-picker",
field: "dateRange",
default: null,
placeholder: "开始时间~结束时间",
clearable: true,
required: true,
}, {
label: '病例总数(例)',
type: 'input',
......@@ -666,7 +739,7 @@ const baseFormItems: any = ref([
regexp: /\D/g,
default: '',
required: false
}, {
}, {
label: '数据覆盖地域',
type: 'checkbox-select',
placeholder: '全国',
......@@ -709,13 +782,16 @@ const baseFormItems: any = ref([
placeholder: '请选择',
field: 'exchangeGuid',
default: '',
// col: 'mr8',
// col: 'mr8',
options: currTenantChanged.value,
props: {
value: 'serviceTenantGuid',
label: 'serviceTenantName'
// value: 'serviceTenantGuid',
// label: 'serviceTenantName'
value: "exchangeGuid",
label: "exchangeName",
},
required: true,
disabled: true,
visible: true
},
{
......@@ -751,8 +827,10 @@ const baseFormItems: any = ref([
default: [],
// index: 0,
props: {
value: "guid",
label: "tenantName",
// value: "guid",
// label: "tenantName",
value: "exchangeGuid",
label: "exchangeName",
},
options: serviceTenants.value,
multiple: true,
......@@ -786,24 +864,42 @@ const baseFormItems: any = ref([
required: true,
},
{
label: "是否质量及价值评估",
label: "是否完成质量评估",
type: "radio-group",
placeholder: "",
field: "isEvaluationAssessment",
field: "isQualityAssessment",
default: 'N',
col: 'no-margin-r',
options: [
{
label: "是",
value: "Y",
value: 'Y',
},
{
label: "否",
value: "N",
}
value: 'N',
},
],
required: true,
}, {
},
{
label: "是否完成价值评估",
type: "radio-group",
placeholder: "",
field: "isCostAssessment",
default: 'N',
options: [
{
label: "是",
value: 'Y',
},
{
label: "否",
value: 'N',
},
],
required: true,
},
{
label: "数据分类",
type: "radio-group",
placeholder: "",
......@@ -906,7 +1002,7 @@ const baseFormItems: any = ref([
block: true,
field: "dataSensitivityLevel",
col: 'other-group-flex',
default: [],
default: [1],
children: [
{
label: "公开数据",
......@@ -992,7 +1088,7 @@ const baseFormItems: any = ref([
type: "checkbox-group-row",
placeholder: "",
field: "dataGetWay",
default: [],
default: [1],
col: 'other-group-flex',
block: true,
children: [
......@@ -1044,7 +1140,7 @@ const baseFormItems: any = ref([
type: "checkbox-group-row",
placeholder: "",
field: "updateFrequency",
default: [],
default: [3],
block: true,
col: 'other-group-flex',
children: [
......@@ -1094,7 +1190,7 @@ const baseFormItems: any = ref([
placeholder: "",
col: 'other-group-flex',
field: "ownIndustry",
default: [],
default: [2],
children: [
{
label: "能源",
......@@ -1132,7 +1228,7 @@ const baseFormItems: any = ref([
placeholder: "",
col: 'other-group-flex',
field: "bizOwn",
default: [],
default: [1],
children: [
{
label: "生产类业务数据",
......@@ -1349,7 +1445,7 @@ const propertyFormItems: any = ref([
type: "checkbox-group-row",
placeholder: "",
field: "propertyType",
default: [],
default: [3],
children: [
{
label: "数据资源持有权",
......@@ -1372,7 +1468,7 @@ const propertyFormItems: any = ref([
placeholder: "",
field: "rightsContent",
col: 'col2',
default: [],
default: [5],
children: [
{
label: "可转让",
......@@ -1670,53 +1766,109 @@ const propertyRadioGroupChange = (val, row, item) => {
const uploadFormRef = ref();
/** 资产内容 */
const uploadFormItems: any = ref([{
label: '数据登记承诺及收集函',
tip: '支持扩展名:xls .xlsx .doc .docx .rar .zip',
type: 'upload-file',
accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
required: true,
default: [],
field: 'registerLetter',
visible: true,
},
{
label: '承诺函附件',
tip: '支持扩展名:doc .docx .pdf .jpg .png',
type: 'upload-file',
accept: '.doc, .docx, .pdf, .jpg, .png',
required: false,
default: [],
field: 'commitmentLetter',
},
// {
// label: '文件hash值',
// type: 'input',
// placeholder: '请输入',
// field: 'fileHash',
// default: '',
// visible: true,
// required: true
// },
{
label: '数据质量评价收集',
tip: '支持扩展名:xls .xlsx .doc .docx .rar .zip',
type: 'upload-file',
accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
required: true,
default: [],
field: 'qualityEvaluationFile',
visible: false,
}, {
label: '数据价值评估',
tip: '支持扩展名:xls .xlsx .doc .docx .rar .zip',
type: 'upload-file',
accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
required: true,
visible: false,
default: [],
field: 'costAssessmentFile',
}]);
const uploadFormItems: any = ref([
{
label: '数据登记承诺及收集函',
tip: '支持扩展名:xls .xlsx .doc .docx .rar .zip',
type: 'upload-file',
accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
required: true,
default: [],
field: 'registerLetter',
visible: true,
col: 'col2',
},
{
label: '承诺函附件',
tip: '支持扩展名:doc .docx .pdf .jpg .png',
type: 'upload-file',
accept: '.doc, .docx, .pdf, .jpg, .png',
required: false,
default: [],
field: 'commitmentLetter',
col: 'col2',
},
// {
// label: '文件hash值',
// type: 'input',
// placeholder: '请输入',
// field: 'fileHash',
// default: '',
// visible: true,
// required: true
// },
// {
// label: '数据质量评价收集',
// tip: '支持扩展名:xls .xlsx .doc .docx .rar .zip',
// type: 'upload-file',
// accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
// required: true,
// default: [],
// field: 'qualityEvaluationFile',
// visible: false,
// }, {
// label: '数据价值评估',
// tip: '支持扩展名:xls .xlsx .doc .docx .rar .zip',
// type: 'upload-file',
// accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
// required: true,
// visible: false,
// default: [],
// field: 'costAssessmentFile',
// },
{
label: '上传质量评估报告',
tip: '支持扩展名:.png, .pdf,单个文件不得大于5M',
type: 'upload-file',
accept: '.png, .pdf',
required: true,
default: [],
col: 'mr8',
field: 'qualityEvaluationFile',
visible: false,
},
{
label: '质量评估机构',
type: 'select',
placeholder: '请选择',
field: 'qualityEvaluationInstitution',
default: '',
options: [],
required: true,
filterable: true,
allowCreate: true,
style: {
width: 'calc(33.33% - 6px)!important'
},
visible: false,
},
{
label: '上传价值评估报告',
tip: '支持扩展名:.png, .pdf,单个文件不得大于5M',
type: 'upload-file',
accept: '.png, .pdf',
required: true,
default: [],
col: 'mr8',
field: 'costAssessmentFile',
visible: false,
},
{
label: '价值评估机构',
type: 'select',
placeholder: '请选择',
field: 'costAssessmentInstitution',
default: '',
options: [],
required: true,
filterable: true,
allowCreate: true,
style: {
width: 'calc(33.33% - 6px)!important'
},
visible: false,
},
]);
const uploadFormRules = ref({
registerLetter: [{
......@@ -1731,10 +1883,13 @@ const uploadFormRules = ref({
// fileHash: [
// { required: true, trigger: 'blur', message: "请填写文件hash值" }
// ],
qualityEvaluationInstitution: [
{ required: true, trigger: 'change', message: "请选择质量评估机构" }
],
qualityEvaluationFile: [{
validator: (rule: any, value: any, callback: any) => {
if (!value?.length) {
callback(new Error('请上传数据质量评价收集'))
callback(new Error('请上传质量评估报告'))
} else {
callback();
}
......@@ -1743,7 +1898,7 @@ const uploadFormRules = ref({
costAssessmentFile: [{
validator: (rule: any, value: any, callback: any) => {
if (!value?.length) {
callback(new Error('请上传数据价值评估'))
callback(new Error('请上传价值评估报告'))
} else {
callback();
}
......@@ -1795,14 +1950,17 @@ const saveDraft = () => {
let propertyFormLine = porpertyInfoFormRef.value.formInline;
Object.assign(params, propertyFormLine);
let uploadFormInline = uploadFormRef.value.formInline;
const registerAttachment = {
// fileHash: uploadFormInline.fileHash,
registerLetter: uploadFormInline['registerLetter']?.map(u => u.url) || [],
qualityEvaluationFile: uploadFormInline['qualityEvaluationFile']?.map(u => u.url) || [],
costAssessmentFile: uploadFormInline['costAssessmentFile']?.map(u => u.url) || [],
commitmentLetter: uploadFormInline['commitmentLetter']?.map(u => u.url) || [],
qualityEvaluationInstitution: uploadFormInline.qualityEvaluationInstitution || '',
costAssessmentInstitution: uploadFormInline.costAssessmentInstitution || '',
}
Object.assign(params, {
registerAttachment: {
// fileHash: uploadFormInline.fileHash,
registerLetter: uploadFormInline['registerLetter']?.map(u => u.url) || [],
qualityEvaluationFile: uploadFormInline['qualityEvaluationFile']?.map(u => u.url) || [],
costAssessmentFile: uploadFormInline['costAssessmentFile']?.map(u => u.url) || [],
commitmentLetter: uploadFormInline['commitmentLetter']?.map(u => u.url) || [],
},
registerAttachment: registerAttachment,
isSubmit: false,
});
if (params.dateRange?.length) {
......@@ -1824,6 +1982,9 @@ const saveDraft = () => {
} else {
ElMessage.error(res.msg);
}
}).catch((xhr) => {
ElMessage.error(xhr.response.data.msg);
fullscreenLoading.value = false;
});
} else {
registerSave(params).then((res: any) => {
......@@ -1838,6 +1999,9 @@ const saveDraft = () => {
} else {
ElMessage.error(res.msg);
}
}).catch((xhr) => {
ElMessage.error(xhr.response.data.msg);
fullscreenLoading.value = false;
});
}
}
......@@ -1874,6 +2038,7 @@ const save = () => {
costAssessmentFile: uploadFormInline['costAssessmentFile']?.map(u => u.url) || [],
commitmentLetter: uploadFormInline['commitmentLetter']?.map(u => u.url) || [],
},
immediateApprove: true,
isSubmit: true,
});
if (params.dateRange?.length) {
......@@ -1951,6 +2116,8 @@ onMounted(() => {
// }
// }, 100));
})
const deploymentId = ref('');
const processInstanceId = ref('');
const approveTableInfo: any = ref({
id: 'approve-table',
rowKey: 'guid',
......@@ -1994,8 +2161,8 @@ const approveTableInfo: any = ref({
</ContentWrap>
<ContentWrap id="id-assetContent" title="附件信息" description="" :isExpand="assetContentExpand" expandSwicth
style="margin-top: 15px" @expand="(v) => assetContentExpand = v">
<Form class='uploadForm' :style="{ width: '90%' }" ref="uploadFormRef" :itemList="uploadFormItems"
formId="upload-form" :rules="uploadFormRules" />
<Form class='uploadForm' ref="uploadFormRef" :itemList="uploadFormItems" formId="upload-form"
:rules="uploadFormRules" col="col3" />
</ContentWrap>
<ContentWrap id="id-propertyInfo" title="权利信息" description="申报数据资产的权利信息" expandSwicth
:isExpand="propertyInfoExpand" style="margin-top: 15px" @expand="(v) => propertyInfoExpand = v">
......@@ -2005,7 +2172,8 @@ const approveTableInfo: any = ref({
</ContentWrap>
<ContentWrap id="id-approveInfo" title="审批信息" :isExpand="approveInfoExpand" expandSwicth
style="margin-top: 15px" @expand="(v) => approveInfoExpand = v">
<Table :tableInfo="approveTableInfo" />
<ApprovalProcess v-if="deploymentId" :deploymentId="deploymentId" :definitionId="''">
</ApprovalProcess>
</ContentWrap>
</div>
</div>
......
......@@ -23,7 +23,6 @@ import {
exportDictionary,
showDictionary,
getDataBaseList,
getDataTypeList,
getCoderuleList,
saveDictionaryData,
getDictionaryFileds,
......@@ -608,7 +607,7 @@ const getDataType = (type) => {
let params = {
paramCode: type
}
getDataTypeList(params).then((res: any) => {
getParamsList(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data
if (type == 'DATA_TYPE') {
......
......@@ -12,7 +12,7 @@ import Dialog from "@/components/Dialog/index.vue";
import useUserStore from "@/store/modules/user";
import useDataAssetStore from "@/store/modules/dataAsset";
import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common';
import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getSubjectDoaminList } from "@/api/modules/dataAsset";
import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList } from "@/api/modules/dataAsset";
import { getDemandDetail, demandSave, competitionSave, marketSave, demandUpdate, competitionUpdate, marketUpdate, checkDemandName, getParamsDataList, getProductTypeList } from "@/api/modules/dataProduct";
import { getMatchDetail } from "@/api/modules/dataFinance";
import { useValidator } from '@/hooks/useValidator';
......@@ -353,7 +353,7 @@ const algorithmFormItem = ref([
block: true,
clearable: true,
required: true,
},
},
// {
// label: '赛事图片',
// tip: '支持扩展名:.jpg .png .jpeg',
......@@ -431,7 +431,7 @@ const elementFormItems = ref([
clearable: true,
required: true,
},
{
{
label: '产品类别',
type: 'tree-select',
placeholder: '请选择',
......@@ -464,7 +464,7 @@ const elementFormItems = ref([
clearable: true,
disabled: false,
required: true,
},
},
{
label: '产品预算',
type: 'checkbox-input-item',
......@@ -860,7 +860,7 @@ const submitForm = (btn, formEl, tosub = false) => {
ElMessage.error(res.msg);
}
})
}
}
}
} else {
nextTick(() => {
......@@ -1112,7 +1112,7 @@ const initMethodByInterfaceType = ref({
proxy.$ElMessage.error(res.msg);
}
})
getSubjectDoaminList().then((res: any) => {
getParamsList({dictType: 'SUBJECT-DOMAIN'}).then((res: any) => {
if (res.code == proxy.$passCode) {
subjectDomainListData.value = res.data || [];
let item = demandFormItems.value.find(item => item.field == 'subjectDomain');
......
......@@ -15,7 +15,7 @@ import { TableColumnWidth } from '@/utils/enum';
import TableTools from "@/components/Tools/table_tools.vue";
import Table from "@/components/Table/index.vue";
import Dialog from "@/components/Dialog/index.vue";
import { getDamTypesList } from "@/api/modules/dataAsset";
import { getParamsList } from "@/api/modules/dataAsset";
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
......@@ -284,7 +284,7 @@ onBeforeMount(() => {
// proxy.$ElMessage.error(res.msg);
// }
// })
getDamTypesList({
getParamsList({
dictType: "资产类型",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
......
......@@ -14,7 +14,7 @@ import useDataAssetStore from "@/store/modules/dataAsset";
import { changeNum } from '@/utils/common';
import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common';
import { getAreaData, getServiceTenants } from "@/api/modules/queryService";
import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getSubjectDoaminList, getServiceDetail } from "@/api/modules/dataAsset";
import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList, getServiceDetail } from "@/api/modules/dataAsset";
import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, getParamsDataList } from "@/api/modules/dataProduct";
import { getMatchDetail } from "@/api/modules/dataFinance";
import { useValidator } from '@/hooks/useValidator';
......@@ -1062,7 +1062,7 @@ onBeforeMount(() => {
// ElMessage.error(res.msg);
// }
// });
getSubjectDoaminList({
getParamsList({
dictType: "数据资产目录主题名称",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!