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',
......
<script lang="ts" setup name="detail_serviceApi">
import { ref } from "vue";
import { TableColumnWidth } from '@/utils/enum';
import { getCamundaDeploymentId } from "@/api/modules/workFlowService"
import {
getApiDetail,
apiTypes,
} from "@/api/modules/dataAsset";
const route = useRoute();
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const props = defineProps({
apiGuid: {
type: String,
default: ''
}
});
const detailLoading = ref(false);
const baseInfoExpand = ref(true);
const deploymentId = ref('');
const processInstanceId = ref('');
const pageDetail = ref({});
const bizApproveVO = ref();
const process = ref();
const flowExpand = ref(true);
const detailInfo: any = ref({});
const apiType = ref('1');// 单表API.
const sql = ref('');
const processDTOSValue = ref([]);
onBeforeMount(() => {
if (route.query.guid) {
getDetail();
} else {
getCamundaDeploymentId('10023').then((res: any) => {
if (res.code == proxy.$passCode) {
deploymentId.value = res.data;
} else {
proxy.$ElMessage.error(res.msg);
}
})
}
});
onActivated(() => {
// if (route.query.guid) {
// getDetail();
// } else {
// getCamundaDeploymentId('10023').then((res: any) => {
// if (res.code == proxy.$passCode) {
// deploymentId.value = res.data;
// } else {
// proxy.$ElMessage.error(res.msg);
// }
// })
// }
})
const getDetail = () => {
detailLoading.value = true;
// getApiDetail
return getApiDetail(route.query.guid).then((res: any) => {
detailLoading.value = false;
console.log('getApiDetail', res);
if (res?.code == proxy.$passCode) {
let data = res.data;
let { approveVO } = data
pageDetail.value = res.data;
bizApproveVO.value = data.approveVO;
deploymentId.value = approveVO.camundaDeploymentId
processInstanceId.value = approveVO.camundaInstanceId
process.value?.renderProcessNodes();
detailInfo.value = data;
apiType.value = data.apiType;
let apiConfigAccessRSVOS = data.configChangeRecordRSVOS || [];
let inputParamData: any[] = [];
let requestData: any[] = [];
let responseData: any[] = [];
let registRequestData: any[] = [];
let constData: any[] = [];
let sortData: any[] = [];
apiConfigAccessRSVOS.forEach(vo => {
if (vo.paramType == 'DEFIN') {
inputParamData.push(vo);
} else if (vo.paramType == 'REQ') {
if (apiType.value == '3') {
registRequestData.push(vo);
} else if (apiType.value == '2') {
inputParamData.push(vo);
} else {
requestData.push(vo);
}
} else if (vo.paramType == 'RESP') {
responseData.push(vo);
} else if (vo.paramType == 'ORDER') {
sortData.push({ ...vo, index: sortData.length + 1 });
} else if (vo.paramType == 'SQL') {
sql.value = vo.selectSqlStatement;
// sqlFormItems.value.forEach(item => {
// item.default = vo.selectSqlStatement;
// });
} else if (vo.paramType == 'CONSTANT') {
constData.push(vo);
}
});
if (data.processDTOS && data.processDTOS.length > 0) {
let processDTOS = data.processDTOS || [];
if (processDTOS?.length > 0) {
processDTOS.forEach(obj => {
obj.noName = obj.processOrderNo + '' + obj.requirementOrderName
})
}
processDTOSValue.value = processDTOS || [];
}
inputParamsTableInfo.value.data = inputParamData;
inputParamsTableInfo.value.height = inputParamData.length > 10 ? '390px' : 'auto';
requestParamsTableInfo.value.data = requestData;
requestParamsTableInfo.value.height = requestData.length > 10 ? '390px' : 'auto';
responseParamsTableInfo.value.data = responseData;
responseParamsTableInfo.value.height = responseData.length > 10 ? '390px' : 'auto';
sortParamsTableInfo.value.data = sortData;
sortParamsTableInfo.value.height = sortData.length > 10 ? '390px' : 'auto';
registRequestParamsTableInfo.value.data = registRequestData;
registRequestParamsTableInfo.value.height = registRequestData.length > 10 ? '390px' : 'auto';
constParamsTableInfo.value.data = constData;
constParamsTableInfo.value.height = constData.length > 10 ? '390px' : 'auto';
} else {
proxy.$ElMessage.error(res?.msg);
}
});
}
const seeDetail = (row) => {
router.push({
name: 'processSheetDetail',
query: {
guid: row.guid,
}
});
}
/** 基本信息的入参定义表格配置 */
const inputParamsTableInfo = ref({
id: "input-params-table",
height: 'auto',
minHeight: '50px',
minPanelHeight: '50px',
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "参数名", field: "paramName", width: 160 },
{ label: "参数位置", field: "paramPositionName", width: 100 },
{ label: "参数类型", field: "dataTypeName", width: 120 },
{
label: "是否必填", field: "isRequired", width: 100, getName: (scope) => {
return scope.row.isRequired == 'Y' ? '是' : '否'
}
},
{
label: "是否多值", field: "isManyValue", width: 100, getName: (scope) => {
return scope.row.isManyValue == 'Y' ? '是' : '否'
}
},
{ label: "默认值", field: "defaultValue", width: 200 },
{ label: "描述", field: "description", width: 160 }
],
data: <Array<Object>>[],
showPage: false,
actionInfo: {
show: false,
},
loading: false
});
const requestParamsTableInfo = ref({
id: "request-params-table",
height: 'auto',
minHeight: '50px',
minPanelHeight: '50px',
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "绑定参数", field: "paramName", width: 160 },
{ label: "绑定字段", field: "boundField", width: 160 },
{ label: "操作符", field: "operatorName", width: 100 },
],
data: <Array<Object>>[],
showPage: false,
actionInfo: {
show: false,
},
loading: false
});
/** 注册API的请求参数 */
const registRequestParamsTableInfo = ref({
id: "request-params-table",
height: 'auto',
minHeight: '50px',
minPanelHeight: '50px',
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "参数名", field: "paramName", width: 160 },
{ label: "参数位置", field: "paramPositionName", width: 100 },
{ label: "参数类型", field: "dataTypeName", width: 120 },
{
label: "是否必填", field: "isRequired", width: 100, getName: (scope) => {
return scope.row.isRequired == 'Y' ? '是' : '否'
}
},
{
label: "是否多值", field: "isManyValue", width: 100, getName: (scope) => {
return scope.row.isManyValue == 'Y' ? '是' : '否'
}
},
{ label: "默认值", field: "defaultValue", width: 200 },
{ label: "描述", field: "description", width: 160 }
],
data: <Array<Object>>[],
showPage: false,
actionInfo: {
show: false,
},
loading: false
});
/** 注册API的常量参数 */
const constParamsTableInfo = ref({
id: "const-params-table",
height: 'auto',
minHeight: '50px',
minPanelHeight: '50px',
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "参数名", field: "paramName", width: 160 },
{ label: "参数位置", field: "paramPositionName", width: 100 },
{ label: "参数类型", field: "dataTypeName", width: 120 },
{
label: "是否必填", field: "isRequired", width: 100, getName: (scope) => {
return scope.row.isRequired == 'Y' ? '是' : '否'
}
},
{ label: "常量值", field: "defaultValue", width: 200 },
{ label: "描述", field: "description", width: 160 }
],
data: <Array<Object>>[],
showPage: false,
actionInfo: {
show: false,
},
loading: false
});
const responseParamsTableInfo = ref({
id: "response-params-table",
height: 'auto',
minHeight: '50px',
minPanelHeight: '50px',
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "参数名", field: "paramName", width: 160 },
{ label: "绑定字段", field: "boundField", width: 140 },
{ label: "参数类型", field: "dataTypeName", width: 120 },
{ label: "示例值", field: "exampleValue", width: 160 },
{ label: "描述", field: "description", width: 160 },
],
data: <Array<Object>>[],
showPage: false,
actionInfo: {
show: false,
},
loading: false
});
/** 排序参数配置 */
const sortParamsTableInfo = ref({
id: "sort-params-table",
height: 'auto',
minHeight: '100px',
minPanelHeight: '100px',
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "参数名", field: "paramName", width: 160 },
{ label: "绑定字段", field: "boundField", width: 140 },
{
label: "排序方式", field: "sortMode", width: 100, getName: (scope) => {
return scope.row.sortMode == 'ASC' ? '升序' : '降序';
}
},
{ label: "描述", field: "description", width: 160 },
],
data: <Array<Object>>[],
showPage: false,
actionInfo: {
show: false,
},
loading: false
});
</script>
<template>
<div class="content_main" v-loading="detailLoading">
<ContentWrap title="基础信息" description="" :isExpand="baseInfoExpand" :expand-swicth="true" class="mb16"
@expand="(v) => baseInfoExpand = v">
<div class="list_panel">
<div class="list_item">
<span class="item_label">API类型:</span>
<span class="item_value">{{ apiTypes.find(a => a.value == apiType)?.label || '-' }}</span>
</div>
<div class="list_item">
<span class="item_label">数据产品名称:</span>
<span class="item_value">{{ detailInfo.apiName || '-' }}</span>
</div>
<div class="list_item">
<span class="item_label">场景名称:</span>
<span class="item_value">{{ detailInfo.sceneName || '-' }}</span>
</div>
<div class="list_item">
<span class="item_label">加工单号:</span>
<span v-for="(obj, idx) in processDTOSValue" @click="seeDetail(obj)" class="item_value cursor"
style="color:#4fa1a4;padding-right:8px">{{ obj.noName }}{{ idx < processDTOSValue.length - 1 ? '、' : ''
}}</span>
<!-- <span class="item_value">{{ detailInfo.sceneName || '-' }}</span> -->
</div>
<div class="list_item">
<span class="item_label">返回类型:</span>
<span class="item_value">{{ detailInfo.responseType || '-' }}</span>
</div>
<div class="list_item">
<span class="item_label">请求方式:</span>
<span class="item_value">{{ detailInfo.requestMode == 'G' ? 'get' : 'post' }}</span>
</div>
<div class="list_item">
<span class="item_label">安全认证:</span>
<span class="item_value">{{ detailInfo.authenticationType == 'T' ? 'token认证' : '无认证' }}</span>
</div>
<div class="list_item" v-if="detailInfo.authenticationType == 'N'">
<span class="item_label">IP白名单:</span>
<span class="item_value">
<ellipsis-tooltip :content="detailInfo.whiteIPAddrs?.length ? detailInfo.whiteIPAddrs.join(',') : '-'"
class-name="w100f mr8-i" :refName="'tooltipOver' + 'WhiteIPs'"></ellipsis-tooltip>
</span>
</div>
<!-- 空白占位符 -->
<!-- <div class="list_item" v-if="apiType == '1'">
<span class="item_label"></span>
<span class="item_value"></span>
</div> -->
<div class="list_item" v-if="apiType == '1'">
<span class="item_label">数据类型:</span>
<span class="item_value">{{ detailInfo.dataSourceType == 1 ? '数据源' : '数据目录' }}</span>
</div>
<div class="list_item" v-if="apiType != '3'">
<span class="item_label">数据源:</span>
<span class="item_value">{{ detailInfo.dataSourceName || '-' }}</span>
</div>
<div class="list_item" v-if="apiType == '1'">
<span class="item_label">数据表:</span>
<span class="item_value">{{ detailInfo.tableName || '-' }}</span>
</div>
<div class="list_item" v-if="apiType == '1'">
<span class="item_label">数据表中文名:</span>
<span class="item_value">{{ detailInfo.tableNameCh || '-' }}</span>
</div>
<div class="list_item is_block">
<span class="item_label">请求路径:</span>
<span class="item_value">
<ellipsis-tooltip :content="detailInfo.requestUrl || '-'" class-name="w100f mr8-i"
:refName="'tooltipOver' + 'requestUrl'"></ellipsis-tooltip></span>
</div>
<div class="list_item is_block">
<span class="item_label">API描述:</span>
<span class="item_value">
<ellipsis-tooltip :content="detailInfo.apiDescription || '-'" class-name="w100f mr8-i"
:refName="'tooltipOver' + route.query.guid"></ellipsis-tooltip></span>
</div>
<template v-if="apiType == '3'">
<div class="list_item">
<span class="item_label">后台服务HOST:</span>
<span class="item_value">{{ `${detailInfo.backstageAgreement}://${detailInfo.backstageHost}` }}</span>
</div>
<div class="list_item">
<span class="item_label">请求方式:</span>
<span class="item_value">{{ detailInfo.backstageRequestMode == 'G' ? 'get' : 'post' }}</span>
</div>
<div class="list_item">
<span class="item_label">后端超时:</span>
<span class="item_value">{{ detailInfo.backstageOvertime == null ? '-' : (detailInfo.backstageOvertime +
'ms') }}</span>
</div>
<div class="list_item is_block">
<span class="item_label">后台服务PATH:</span>
<span class="item_value">
<ellipsis-tooltip :content="detailInfo.backstagePath || '-'" class-name="w100f mr8-i"
:refName="'tooltipOver' + 'path'"></ellipsis-tooltip></span>
</div>
</template>
</div>
</ContentWrap>
<template v-if="inputParamsTableInfo.data.length">
<div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">{{ apiType == '3'
? '请求参数' : '入参定义' }}</div>
<Table :tableInfo="inputParamsTableInfo" />
</template>
<template v-if="requestParamsTableInfo.data.length">
<div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">请求参数</div>
<Table :tableInfo="requestParamsTableInfo" />
</template>
<template v-if="responseParamsTableInfo.data.length">
<div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">返回参数</div>
<Table :tableInfo="responseParamsTableInfo" />
</template>
<template v-if="sortParamsTableInfo.data.length">
<div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">排序参数</div>
<Table :tableInfo="sortParamsTableInfo" />
</template>
<template v-if="apiType == '3'">
<template v-if="registRequestParamsTableInfo.data.length">
<div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">请求参数</div>
<Table :tableInfo="registRequestParamsTableInfo" />
</template>
<template v-if="constParamsTableInfo.data.length">
<div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">常量参数</div>
<Table :tableInfo="constParamsTableInfo" />
</template>
</template>
<template v-if="apiType == '2'">
<div class="list_item" style="font-weight: 500;color: var(--el-color-regular);margin: 8px 0px;">查询sql</div>
<el-input v-model.trim="sql" :rows="10" type="textarea" :readonly="true" />
</template>
<ContentWrap title="流程审批" description="" :isExpand="flowExpand" :expand-swicth="true" class="mb16"
@expand="(v) => flowExpand = v">
<ApprovalProcess ref="process" v-if="deploymentId" :deploymentId="deploymentId"
:processInstanceId="processInstanceId">
</ApprovalProcess>
</ContentWrap>
<FlowBtnGroup pageType="detail" :approveVO="bizApproveVO" @refreshPage="getDetail"></FlowBtnGroup>
</div>
</template>
<style scoped lang="scss">
.content_main {
height: calc(100% - 40px);
padding: 16px;
overflow: hidden auto;
position: sticky;
.list_panel {
display: flex;
flex-wrap: wrap;
.list_item {
width: 33.33%;
line-height: 21px;
margin-bottom: 12px;
font-size: 14px;
color: var(--el-text-color-regular);
display: flex;
justify-content: space-between;
min-width: 120px;
.item_label {
width: 100px;
text-align: right;
}
.item_value {
color: var(--el-color-regular);
padding: 0 8px;
flex: 1;
text-align: justify;
max-width: calc(100% - 100px);
}
&.is_block {
width: 100%;
}
.file-operate {
display: flex;
align-items: center;
position: relative;
.file-img {
width: 24px;
height: 24px;
}
&:hover {
background-color: #f5f5f5;
}
.file-name {
color: var(--el-color-regular);
margin-left: 4px;
}
.file-preview {
position: absolute;
cursor: pointer;
color: var(--el-color-primary);
margin-right: 8px;
}
}
}
}
.table_panel {
height: 200px;
min-height: 200px;
}
}
</style>
......@@ -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,36 +537,50 @@ onBeforeMount(() => {
}
}
else if (item.field == 'coverageArea') {
if (detailInfo.value.coverageArea[0][0] == 'all') {
item.default = 'all';
if (item.children?.length) {
item.children[0].visible = false;
item.children[0].default = [];
}
} else {
item.default = '';
if (item.children?.length) {
item.children[0].visible = true;
item.children[0].default = [detailInfo.value.coverageArea[0]] as any;
let p: any = [];
detailInfo.value.coverageArea.forEach(area => {
if (p.includes(area[0])) {
return;
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) {
item.children[0].visible = false;
item.children[0].default = [];
}
} else {
item.default = '';
if (item.children?.length) {
item.children[0].visible = true;
item.children[0].default = [detailInfo.value.coverageArea[0]] as any;
let p: any = [];
detailInfo.value.coverageArea?.forEach(area => {
if (p.includes(area[0])) {
return;
}
p.push(area[0]);
getArea({ value: area[0], level: 1 }, () => { })
});
let ps: any = []
for (const key in getAreaDataPromise.value) {
ps.push(getAreaDataPromise.value[key])
}
p.push(area[0]);
getArea({ value: area[0], level: 1 }, () => { })
});
let ps: any = []
for (const key in getAreaDataPromise.value) {
ps.push(getAreaDataPromise.value[key])
Promise.all(ps).then(() => {
item.children[0].default = detailInfo.value.coverageArea;
});
}
Promise.all(ps).then(() => {
item.children[0].default = detailInfo.value.coverageArea;
});
}
}
} 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));
router.push({
name: detailType.value == 'qualityEvaluate' ? 'qualityEvaluate' : (detailType.value == 'costAssess' ? 'valueEvaluate' : (detailType.value == 'certificate' ? 'certificateManagement' : 'registerManagemant'))
});
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;
......
......@@ -130,7 +130,7 @@ const listData: any = ref([]);
const cardBtnVisible: any = ref(false);
const getTableBtns = (row) => {
if (row.isRegister != 'N') {
if (row.isRegister == 'Y' || row.foundMode == 2) {
return [];
}
let btnsArr: any[] = [];
......@@ -142,13 +142,14 @@ const getTableBtns = (row) => {
const currTableData: any = ref({});
const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
console.log(scope, btn);
const type = btn;
const row = scope;
currTableData.value = row;
if (type === "edit") {
router.push({
name: "registerCatalogCreate",
query: { guid: row.guid, damName: row.damName },
query: { guid: row.guid, damName: row.damName, foundMode: row.foundMode },
});
} else if (type == "delete") {
proxy.$openMessageBox('此操作将永久删除该资源,是否继续', () => {
......@@ -173,7 +174,7 @@ const handleDataClick = (item) => {
if (item.isRegister == "N") {
router.push({
name: "registerCatalogCreate",
query: { guid: item.guid, damName: item.damName },
query: { guid: item.guid, damName: item.damName, foundMode: item.foundMode },
});
} else {
router.push({
......@@ -307,7 +308,7 @@ const tableToolsHeight = ref<any>(0);
const getTableToolsHeight = () => {
const tableToolsElement: any = tableToolsRef.value;
if (tableToolsElement) {
tableToolsHeight.value = tableToolsElement.offsetHeight - 40;
tableToolsHeight.value = tableToolsElement.offsetHeight;
}
};
// 在组件挂载后获取初始高度
......@@ -339,15 +340,21 @@ const handleWindowResize = () => {
<div class="container_wrap">
<div class="table_tool_wrap" ref="tableToolsRef">
<TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" />
<div class="tools_btns">
<!-- <div class="tools_btns">
<el-button type="primary" @click="handleCreate" v-preReClick>新建</el-button>
</div>
</div> -->
</div>
<div class="table_panel_wrap" :style="{ height: 'calc(100% - 89px)' }">
<div class="table_panel_wrap" :style="{ height: `calc(100% - ${tableToolsHeight + 60}px)` }">
<div class="data-content" v-loading="listDataLoading" :style="{ height: `calc(100% - ${tableToolsHeight}px)` }">
<div class="card-content" v-if="listData.length" v-for="item in listData" :key="item.guid"
@click="handleDataClick(item)">
<div class="top-dam-img"></div>
<div class="v-add" @click.stop="handleCreate">
<div class="add-img"></div>
<div class="add-titile">
新增数据产品
</div>
</div>
<div v-if="listData.length" v-for="(item, index) in listData" :key="item.guid" @click="handleDataClick(item)"
:class="{ 'v-border-top': item.isRegister == 'Y', 'card-content': true, 'v-border-no-pass': item.isRegister == 'N' }">
<!-- <div class="top-dam-img"></div>
<div class="dam-catalog-content">
<div class="title-row">
<div class="title">
......@@ -356,10 +363,11 @@ const handleWindowResize = () => {
</div>
</div>
<div class="type-btn">
<div class="type">{{ item.subjectDomainName || item.subjectDomain }}</div>
<div class="type">{{ item.subjectDomainName || item.subjectDomain || '--' }}</div>
<div class="type">{{ item.damTypeName || '--' }}</div>
<div class="type">{{ item.isRegister == 'Y' ? '已登记' : '未登记' }}</div>
<div class="type">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : '加工交付') : '--' }}</div>
<div class="type" v-if="item.foundMode">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : '加工交付') : '--'
}}</div>
</div>
<div class="desc">{{ item.propertyDescription }}</div>
<el-popover v-model="cardBtnVisible" placement="bottom" width="96" trigger="click"
......@@ -370,22 +378,67 @@ const handleWindowResize = () => {
<MoreFilled />
</el-icon>
</template>
<div class="levitation-ul">
<span class="levitation-li" v-for="btn in getTableBtns(item)"
@click="tableBtnClick({ row: item }, btn)">{{
btn.label }}</span>
<div class="levitation-ul">
<span class="levitation-li" v-for="btn in getTableBtns(item)" @click="tableBtnClick({ row: item }, btn)">{{
btn.label }}</span>
</div>
</el-popover>
</div> --><!-- 新增框放在列表的第一个 -->
<div>
<div class="v-top">
<div class="top-tip">
<div class="top-img" v-if="item.isRegister == 'Y'"></div>
<div class="top-default" v-else></div>
<div :class="{ 'word': item.isRegister == 'Y', 'word-default': item.isRegister != 'Y' }">{{
item.isRegister
== 'Y' ?
'已登记' : '未登记' }}</div>
</div>
<div class="top-titile">
<ellipsis-tooltip :content="item.damName" class-name="w100f"
:refName="'tooltipOver' + item.guid"></ellipsis-tooltip>
</div>
<div class="top-des">
<el-tooltip class="item" :content="item.propertyDescription" effect="dark">
<div class="top-des1">
{{ item.propertyDescription }}
</div>
</el-tooltip>
</div>
</div>
<div class="v-middle">
<div class="mid-content">
<div class="left">资产类型</div>
<div class="right">{{ item.damTypeName || '--' }}</div>
</div>
<div class="mid-content">
<div class="left">数据来源</div>
<div class="right">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : '加工交付') : '--'
}}</div>
</div>
</el-popover>
<div class="mid-content">
<div class="left">所属主题</div>
<div class="right">{{ item.subjectDomainName || item.subjectDomain || '--' }}</div>
</div>
</div>
<div class="v-bottom">
<el-button plain v-if="!(item.isRegister == 'Y' || item.foundMode == 2)"
@click.stop="tableBtnClick(item, 'delete')">删除</el-button>
<el-button plain v-if="!(item.isRegister == 'Y')" @click.stop="handleDataClick(item)">编辑</el-button>
<el-button plain @click.stop="handleDataClick(item)" v-if="(item.isRegister == 'Y')">详情</el-button>
</div>
</div>
</div>
<div v-if="!listData.length" class="card-noData">
<img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
<span>暂无数据资源目录</span>
</div>
</div>
<PageNav :class="[pageInfo.type]" :pageInfo="pageInfo" @pageChange="pageChange" />
<div v-if="!listData.length" class="card-noData">
<img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
<span>暂无数据资源目录</span>
</div>
</div>
<PageNav :class="[pageInfo.type]" :pageInfo="pageInfo" @pageChange="pageChange" />
</div>
</template>
<style scoped lang="scss">
......@@ -408,6 +461,10 @@ const handleWindowResize = () => {
}
}
.table_panel_wrap {
margin-top: 16px;
}
.data-content {
// height: calc(100% - 44px);
display: flex;
......@@ -428,15 +485,185 @@ const handleWindowResize = () => {
font-size: 14px;
}
.v-add {
width: 294px;
height: 268px;
// height: auto;
background: #FAFAFA;
border: 1px solid rgba(229, 229, 229, 1);
border-radius: 4px;
cursor: pointer;
transition: box-shadow 0.3s ease;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
&:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
/* 影阴效果 */
}
.add-img {
width: 26px;
height: 26px;
background: url("../../assets/images/add.png");
background-size: 100% 100%;
background-position: center right;
background-repeat: no-repeat;
}
.add-titile {
margin-top: 11px;
font-size: 16px;
color: #666666;
text-align: center;
line-height: 24px;
font-weight: 500;
}
}
.card-content {
width: 22%;
min-width: 220px;
height: auto;
border: 1px solid var(--el-border-color-regular);
width: 294px;
height: 268px;
// height: auto;
background: #FAFAFA;
border: 1px solid rgba(229, 229, 229, 1);
border-radius: 4px;
cursor: pointer;
transition: box-shadow 0.3s ease;
position: relative;
&:hover {
border: 1px solid var(--el-color-primary);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
/* 影阴效果 */
}
// .v-add {
// width: 100%;
// height: 100%;
// position: absolute;
// display: flex;
// flex-direction: column;
// justify-content: center;
// align-items: center;
// top: 50%;
// left: 50%;
// transform: translate(-50%, -50%);
// .add-img {
// width: 26px;
// height: 26px;
// background: url("../../assets/images/add.png");
// background-size: 100% 100%;
// background-position: center right;
// background-repeat: no-repeat;
// }
// .add-titile {
// margin-top: 11px;
// font-size: 16px;
// color: #666666;
// text-align: center;
// line-height: 24px;
// font-weight: 500;
// }
// }
.v-top {
display: flex;
flex-direction: column;
background: #FFFFFF;
padding: 16px 11px;
.top-tip {
display: flex;
align-items: center;
.top-img {
width: 18px;
height: 18px;
background: url("../../assets/images/passed.png");
background-size: 100% 100%;
background-repeat: no-repeat;
margin-right: 8px;
}
.top-default {
width: 18px;
height: 18px;
background: url("../../assets/images/doing.png");
background-size: 100% 100%;
background-repeat: no-repeat;
margin-right: 8px;
}
}
.top-titile {
font-size: 16px;
color: #212121;
line-height: 24px;
font-weight: 600;
margin-top: 9px;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.top-des1 {
font-size: 14px;
color: #999999;
margin-top: 4px;
line-height: 21px;
font-weight: 400;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.word {
color: rgba(27, 168, 84, 1);
}
.word-default {
color: rgba(255, 153, 28, 1);
}
}
.v-middle {
padding: 0 11px;
.mid-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
.left {
font-size: 14px;
color: #999999;
line-height: 21px;
}
.right {
font-size: 14px;
color: #212121;
line-height: 21px;
font-weight: 400;
}
}
}
.v-bottom {
display: flex;
justify-content: end;
padding: 0 11px;
}
.top-dam-img {
......@@ -503,6 +730,17 @@ const handleWindowResize = () => {
text-align: center;
margin-right: 4px;
}
.registered {
color: green;
/* 已登记 - 绿色 */
}
.not-registered {
color: red;
/* 未登记 - 红色 */
}
}
.list-more {
......@@ -511,5 +749,13 @@ const handleWindowResize = () => {
bottom: 12px;
}
}
.v-border-top {
border-top: 4px solid #1BA854;
}
.v-border-no-pass {
border-top: 4px solid #FFA500;
}
}
</style>
......
......@@ -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!