bcddc19d by xukangle

fix

1 parent a764f068
......@@ -83,6 +83,13 @@ VITE_APP_PERSONAL_URL = 'ms-daop-personel-service'
VITE_APP_CIRCULATION = http://192.168.6.20:18052/
# 测试环境访问地址
VITE_API_CIRCULATION_URL = http://192.168.6.22:29900/circulation
#数据加工交付
VITE_APP_DATA_DELIVERY = http://192.168.6.20:38052/
# 测试环境访问地址
VITE_API_DATA_DELIVERY_URL = http://192.168.6.22:29900/delivery
# 本地访问地址
# VITE_API_CIRCULATION_URL = http://localhost:9000/circulation
......
......@@ -116,7 +116,8 @@ VITE_APP_PERSONAL_URL = ms-daop-personel-service
#流通平台接口地址
VITE_APP_CIRCULATION = http://192.168.6.20:18052/
#数据加工交付
VITE_APP_DATA_DELIVERY = http://192.168.6.20:38052/
# 是否在打包时生成 sourcemap
VITE_BUILD_SOURCEMAP = false
......
......@@ -63,6 +63,23 @@ server {
rewrite ^/circulation/(.*)$ /$1 break;
proxy_pass http://192.168.6.20:18052;
}
location /delivery {
# 设置允许跨域的域名,可以使用通配符 '*' 允许所有域访问
add_header 'Access-Control-Allow-Origin' * always;
# 设置允许的 HTTP 方法
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
# 设置允许的请求头
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Accept, Origin, X-Requested-With';
# 如果需要支持 cookie,可以设置以下 header
add_header 'Access-Control-Allow-Credentials' 'true';
# 缓存设置
add_header Cache-Control no-cache;
add_header Cache-Control private;
# 使用 rewrite 将 /circulation 替换为 /new-api
rewrite ^/delivery/(.*)$ /$1 break;
proxy_pass http://192.168.6.20:38052;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
......
......@@ -402,3 +402,30 @@ export const getExchangeList = () => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/register-num`,
method: 'post'
})
// API详情
/** 查询域名和文根 */
/** api类型,有表单类型,自定义sql. */
export const apiTypes: any = [{
value: 1,
label: '单表API'
}, {
value: 2,
label: '自定义sql'
}, {
value: 3,
label: '注册API'
}];
/** 获取api详情信息 */
export const getApiDetail = (params) => request({
// url:`${import.meta.env.VITE_APP_SERVICE_BASEURL}/api-base-info/detail`,
// url: `http://localhost:9000/circulation/ms-data-circulation-portal-service/enterprise/detail-by-name`,
// url: `http://localhost:9000/delivery/api-base-info/detail`,
url: `http://192.168.6.20:38052/delivery/api-base-info/detail`,
method: 'get',
params
})
......
......@@ -81,6 +81,20 @@ const routes: RouteRecordRaw[] = [
}
}
},
{
// path: 'processDetail',
// name: 'APIProcessDetail',
path: 'api-detail',
name: 'apiDetail',
component: () => import('@/views/data_asset/detail_serviceApi.vue'),
meta: {
title: '流程详情',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true
}
},
// {
// path: 'import-table-field',
// name: 'importTableField',
......
......@@ -134,7 +134,7 @@ const baseInfoFormItems = ref([
placeholder: '请输入',
field: 'rightMain',
maxlength: 20,
default: userStore.userName,
default: JSON.parse(userStore.userData).tenantName,
required: true,
disabled: true
},
......@@ -329,6 +329,7 @@ const assetDataTableInfo = ref({
let btns = [{
label: "编辑", value: "edit", click: (scope) => {
//分为未建表的编辑,和已建表的编辑。
console.log(scope, 'scope');
let row = scope.row;
importTableEditIndex.value = scope.$index;
if (row.guid) {//已建表的
......@@ -504,6 +505,13 @@ onBeforeMount(() => {
// ElMessage.error(res.msg)
// }
// })
// if (route.query.guid && route.query.foundMode == '2') {
// baseInfoFormItems.value[0].disabled = true;
// baseInfoFormItems.value[1].disabled = true;
// baseInfoFormItems.value[2].disabled = true;
// baseInfoFormItems.value[5].disabled = true;
// }
getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => {
if (res?.code == proxy.$passCode) {
parentAreaData.value = res.data ?? [];
......@@ -517,7 +525,7 @@ onBeforeMount(() => {
if (res.code == proxy.$passCode) {
detailInfo.value = res.data || {};
baseInfoFormItems.value.forEach((item: any) => {
item.default = detailInfo.value[item.field];
item.default = detailInfo.value[item.field] || '';
if (item.field == 'subjectDomain') {
let tree = detailInfo.value.subjectDomainTree?.[0];
if (tree) {
......@@ -529,6 +537,7 @@ onBeforeMount(() => {
}
}
else if (item.field == 'coverageArea') {
if (detailInfo.value.coverageArea && Array.isArray(detailInfo.value.coverageArea) && detailInfo.value.coverageArea.length > 0) {
if (detailInfo.value.coverageArea[0][0] == 'all') {
item.default = 'all';
if (item.children?.length) {
......@@ -541,7 +550,7 @@ onBeforeMount(() => {
item.children[0].visible = true;
item.children[0].default = [detailInfo.value.coverageArea[0]] as any;
let p: any = [];
detailInfo.value.coverageArea.forEach(area => {
detailInfo.value.coverageArea?.forEach(area => {
if (p.includes(area[0])) {
return;
}
......@@ -558,7 +567,20 @@ onBeforeMount(() => {
}
}
}
} else if (item.field == 'rightMain') {
item.default = detailInfo.value.rightMainName;
}
});
if (route.query.guid && route.query.foundMode == '2') {
baseInfoFormItems.value[0].disabled = true;
baseInfoFormItems.value[1].disabled = true;
baseInfoFormItems.value[2].disabled = true;
if (detailInfo.value.databaseType == null && route.query.foundMode == '2') {
baseInfoFormItems.value[5].visible = false;
} else if (detailInfo.value.databaseType != null && route.query.foundMode == '2') {
baseInfoFormItems.value[5].disabled = true;
}
}
checkedInfo.value = {};
nextTick(() => {
baseInfoFormRules.value.damName[1] = checkExistName(checkedInfo.value, existDamName, detailInfo.value, 'damName');
......@@ -622,7 +644,7 @@ const save = () => {
if (valid) {
let params = { ...baseInfoFormRef.value.formInline };
/** 只有数据集和api类型时,目录表必填。 */
if (params.damType == '1' || params.damType == '2') {
if ((params.damType == '1' || params.damType == '2') && route.query.foundMode != '2') {
if (!params.databaseType) {
proxy.$ElMessage.error('资源类型为数据集或API时,数据库类型必填');
baseInfoExpand.value = true;
......@@ -646,6 +668,8 @@ const save = () => {
}
if (damGuid.value) {
params.guid = damGuid.value;
params.foundMode = route.query.foundMode;
params.rightMain = detailInfo.value.rightMain;
fullscreenLoading.value = true;
registerCatalogUpdate(params).then((res: any) => {
fullscreenLoading.value = false;
......@@ -663,6 +687,8 @@ const save = () => {
} else {
params.damCatalogTableInfo = assetDataTableInfo.value.data;
fullscreenLoading.value = true;
console.log(params, 'params');
params.rightMain = JSON.parse(userStore.userData).tenantGuid;
registerCatalogSave(params).then((res: any) => {
fullscreenLoading.value = false;
if (res.code == proxy.$passCode) {
......
......@@ -223,9 +223,17 @@ const btnClick = (btn) => {
const type = btn.value;
if (type == 'cancel') {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
console.log('detailType', detailType.value);
if (detailType.value == 'asset') {
router.push({
name: 'registerCatalogManagement',
query: {}
});
} else {
router.push({
name: detailType.value == 'qualityEvaluate' ? 'qualityEvaluate' : (detailType.value == 'costAssess' ? 'valueEvaluate' : (detailType.value == 'certificate' ? 'certificateManagement' : 'registerManagemant'))
});
}
} else if (type == 'pass') {
passDialogInfo.value.visible = true;
assessFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
......@@ -768,6 +776,21 @@ const formattedAmount = computed(() => {
maximumFractionDigits: 2
}).format(costAssessDetail.value?.assessmentMoney);
});
const handleClick = () => {
// 跳转到 apiDetail 页面
if (detailInfo.value.foundMode == '2') {
router.push({
name: 'apiDetail',
query: {
guid: detailInfo.value.guid,
type: 'detaile',
}
});
}
};
</script>
<template>
......@@ -779,7 +802,8 @@ const formattedAmount = computed(() => {
<div class="right-main">
<div class="asset-title">
<div style="display: flex;align-items: center;">
<div class="title1">{{ detailInfo.damName ?? '--' }}</div>
<div @click="handleClick" :class="{ 'foundMode': detailInfo.foundMode == '2', 'title1': true }">{{
detailInfo.damName ?? '--' }}</div>
<div class="dataLabel">{{ detailInfo.damTypeName }}</div>
<div class="dataLabel">{{ detailInfo.subjectDomainName || detailInfo.subjectDomain }}</div>
<div class="dataLabel dataLabel1" v-if="detailInfo.databaseType">{{ detailInfo.databaseType }}</div>
......@@ -892,8 +916,8 @@ const formattedAmount = computed(() => {
</el-table-column>
</el-table>
</ContentWrap>
<ContentWrap v-if="route.query.type == 'qualityEvaluate' || 'costAssess'" id="id-assetContent" title="附件信息"
description="" style="margin: 16px 16px 16px">
<ContentWrap v-if="route.query.type == 'qualityEvaluate' || route.query.type == 'costAssess'" id="id-assetContent"
title="附件信息" description="" style="margin: 16px 16px 16px">
<div class="list_panel mt4">
<div class="list_item isFile" v-if="evaDetailInfo?.qualityEvaluationFile?.length" :style="{ width: '40%' }">
<span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据质量评价收集</span>
......@@ -1035,14 +1059,14 @@ const formattedAmount = computed(() => {
</div>
</ContentWrap>
<ContentWrap v-if="route.query.type == 'qualityEvaluate' || 'costAssess'" id="id-approveInfo" title="审批信息"
description="" style="margin: 16px 16px 16px">
<ContentWrap v-if="route.query.type == 'qualityEvaluate' || route.query.type == 'costAssess'" id="id-approveInfo"
title="审批信息" description="" style="margin: 16px 16px 16px">
<ApprovalProcess v-if="deploymentId" :deploymentId="deploymentId" :processInstanceId="processInstanceId">
</ApprovalProcess>
</ContentWrap>
</div>
<div class="tool_btns"
v-if="toolBtns.length && (route.query.type == 'qualityEvaluate' || route.query.type == 'costAssess')">
v-if="toolBtns.length && (route.query.type == 'qualityEvaluate' || route.query.type == 'costAssess' || route.query.type == 'asset')">
<div class="btns">
<el-button v-for="btn in toolBtns" :type="btn.type" :plain="btn.plain" @click="btnClick(btn)">{{ btn.label
}}</el-button>
......@@ -1208,6 +1232,10 @@ const formattedAmount = computed(() => {
align-items: center;
justify-content: space-between;
.foundMode {
color: #1BA854;
}
.title1 {
font-size: 20px;
color: #212121;
......
......@@ -313,17 +313,32 @@ const tableBtnClick = (scope, btn) => {
console.log('row', row);
currTableData.value = row;
if (type == "redit") {
if (!row.registerGuid) {
formItems.value[2].visible = true;
formItems.value[3].visible = true;
formItems.value[4].visible = true;
formItems.value[5].visible = true;
formItems.value[0].visible = false;
formItems.value[0].default = row.damGuid;
formItems.value[1].default = row.costAssessmentFile || [];
dialogInfo.value.type = 'reSubmit';
dialogInfo.value.visible = true;
} else {
// if (!row.registerGuid) {
// formItems.value[2].visible = true;
// formItems.value[3].visible = true;
// formItems.value[4].visible = true;
// formItems.value[5].visible = true;
// formItems.value[0].visible = false;
// formItems.value[0].default = row.damGuid;
// formItems.value[1].default = row.costAssessmentFile || [];
// dialogInfo.value.type = 'reSubmit';
// dialogInfo.value.visible = true;
// } else {
// formItems.value[2].visible = false;
// formItems.value[3].visible = false;
// formItems.value[4].visible = false;
// formItems.value[5].visible = false;
// formItems.value[0].visible = false;
// formItems.value[0].default = row.damGuid;
// formItems.value[1].default = row.costAssessmentFile || [];
// formItems.value[2].default = row.qualityScore;
// formItems.value[3].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
// formItems.value[4].default = row.evaluationNote;
// formItems.value[5].default = row.evaluationFile || [];
// dialogInfo.value.type = 'reSubmit';
// dialogInfo.value.visible = true;
// }
if (row.qualityScore || (!row.qualityScore && !row.qualityEvaluationGuid)) {
formItems.value[2].visible = false;
formItems.value[3].visible = false;
formItems.value[4].visible = false;
......@@ -338,6 +353,18 @@ const tableBtnClick = (scope, btn) => {
dialogInfo.value.type = 'reSubmit';
dialogInfo.value.visible = true;
}
if (!row.qualityScore && row.qualityEvaluationGuid) {
formItems.value[2].visible = true;
formItems.value[3].visible = true;
formItems.value[4].visible = true;
formItems.value[5].visible = true;
formItems.value[0].visible = false;
formItems.value[0].default = row.damGuid;
formItems.value[1].default = row.costAssessmentFile || [];
dialogInfo.value.type = 'reSubmit';
dialogInfo.value.visible = true;
}
} else if (type == "delete") {
delTableOpen("此操作将永久删除该资产价值评估,是否继续?", "warning");
} else if (type === 'backup') {
......
......@@ -874,7 +874,7 @@ const formInfo = ref<any>({
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange"
@tableSwitchBeforeChange="tableSwitchBeforeChange" />
</div>
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="60%">
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="30%">
<Form ref="listingFormRef" :itemList="formInfo.items" :rules="formInfo.rules" />
<el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none"
placeholder="请输入审批意见" />
......
......@@ -45,6 +45,11 @@ export default ({ mode, command }) => {
changeOrigin: env.VITE_OPEN_PROXY === 'true',
rewrite: path => path.replace(/\/circulation/, ''),
},
'/delivery':{
target: env.VITE_APP_DATA_DELIVERY,
changeOrigin: env.VITE_OPEN_PROXY === 'true',
rewrite: path => path.replace(/\/delivery/, ''),
},
'/obs': {
target: '//csbr-daop.obs.cn-north-1.myhuaweicloud.com:443',
changeOrigin: env.VITE_OPEN_PROXY === 'true',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!