6326d5ed by lxs

全景地图地址修改

2 parents b0d49d5c 3625e1e3
Showing 53 changed files with 2450 additions and 56 deletions
......@@ -83,6 +83,9 @@ VITE_APP_ATTACHMENT_TEMPLATE = ms-daop-personel-service
#人员服务
VITE_APP_PERSONAL_URL = 'ms-daop-personel-service'
#元数据标准
VITE_APP_STANDARD_URL = 'ms-daop-meta-standard-service'
#流通平台地址
VITE_APP_CIRCULATION = https://daop-lt-test.zgsjzc.com/
# 测试环境访问地址
......@@ -91,7 +94,6 @@ VITE_APP_CIRCULATION = https://daop-lt-test.zgsjzc.com/
#数据加工交付
VITE_APP_DATA_DELIVERY = https://daop-jgjf-test.zgsjzc.com/
# 本地访问地址
# VITE_API_CIRCULATION_URL = http://localhost:9000/circulation
......
......@@ -110,6 +110,9 @@ VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
#数据同步接口地址
VITE_API_DATA_SYNC = ms-swzl-data-sync-service
#元数据标准
VITE_APP_STANDARD_URL = 'ms-daop-meta-standard-service'
#消息接口
VITE_API_MESSAGE = ms-daop-message-service
......
......@@ -27,6 +27,7 @@ declare module '@vue/runtime-core' {
FileUpload: typeof import('./src/components/FileUpload/index.vue')['default']
FixedActionBar: typeof import('./src/components/FixedActionBar/index.vue')['default']
Form: typeof import('./src/components/Form/index.vue')['default']
GraphTopbar: typeof import('./src/components/RelationNetwork/graphTopbar.vue')['default']
Hour: typeof import('./src/components/Schedule/component/hour.vue')['default']
ImagePreview: typeof import('./src/components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./src/components/ImagesUpload/index.vue')['default']
......@@ -41,6 +42,7 @@ declare module '@vue/runtime-core' {
PageNav: typeof import('./src/components/PageNav/index.vue')['default']
PcasCascader: typeof import('./src/components/PcasCascader/index.vue')['default']
Popover: typeof import('./src/components/Popover/index.vue')['default']
RelationNetwork: typeof import('./src/components/RelationNetwork/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Schedule: typeof import('./src/components/Schedule/index.vue')['default']
......
......@@ -551,4 +551,9 @@ export const getContractDetail = (params) => request({
url: `https://zcgl.zgsjzc.com/circulation/api/ms-data-circulation-tx-mgr-service/data-contract/detail`,
method: 'get',
params
})
// 获取所有字典
export const getDictAllList = () => request({
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-all`
})
\ No newline at end of file
......
......@@ -248,4 +248,298 @@ export const syncChangeDetail = (guid) => request({
export const delMetaDataSource = (databaseGuid) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/del-by-database-guid?databaseGuid=${databaseGuid}`,
method: 'delete',
})
/** 元数据-标准代码分页查询 */
export const getStandardCodeList = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/page-list`,
method: 'post',
data: params
})
/** 元数据-标准代码新增 */
export const saveStandardCode = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/save`,
method: 'post',
data: params
})
/** 元数据-标准代码修改 */
export const updateStandardCode = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/update`,
method: 'put',
data: params
})
/** 元数据-标准代码详情 */
export const getStandardCodeDetail = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/detail?guid=${guid}`,
method: 'get',
})
/** 元数据-标准代码删除 */
export const deleteStandardCode = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/delete`,
method: 'delete',
data: params
})
/** 元数据-查询标准列表 */
export const getStandardCodeStandard = (standardTypeCode) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/get-standard?standardTypeCode=${standardTypeCode}`,
method: 'get'
})
/** 元数据-查询代码列表 */
export const getStandardCodeDataList = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/data/get-data`,
method: 'post',
data: params
})
/** 元数据-查询代码字段数据 */
export const getStandardCodeFields = (standardGuid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/get-field?standardGuid=${standardGuid}`,
method: 'get'
})
/** 元数据-保存标准代码数据 */
export const saveStandardCodeFieldsData = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/data/save-data`,
method: 'post',
data: params
})
/** 元数据-删除标准代码数据 */
export const deleteStandardCodeFieldsData = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/data/remove-data`,
method: 'post',
data: params
})
/** 元数据-导出 */
export const exportStandardCodeData = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/data/data-export`,
method: 'post',
data: params,
responseType: 'blob'
})
/** 元数据标准-树形列表 */
export const getMetaStandardTree = () => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/list-tree`,
method: 'get'
})
/** 元数据标准-新增 */
export const saveMetaStandard = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/save`,
method: 'post',
data: params
})
/** 元数据标准-修改 */
export const updateMetaStandard = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/update`,
method: 'put',
data: params
})
/** 元数据标准-删除 */
export const deleteMetaStandard = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/delete`,
method: 'delete',
data: params
})
/** 元数据标准-详情 */
export const getMetaStandardDetail = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/detail?guid=${guid}`,
method: 'get'
})
/** 元数据标准-标准数据 */
export const getMetaStandardDataList = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/page-list`,
method: 'post',
data: params
})
/** 元数据标准-标准字段 */
export const getMetaStandardDataFields = (metaStandardGuid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/get-standard-field?metaStandardGuid=${metaStandardGuid}`,
method: 'get'
})
/** 元数据标准-标准字段保存 */
export const saveMetaStandardDataFields = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/save-or-update`,
method: 'post',
data: params
})
/** 元数据标准-标准字段删除 */
export const deleteMetaStandardDataFields = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/del`,
method: 'delete',
data: params
})
/** 元数据标准-导出 */
export const exportMetaStandardData = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/data-export`,
method: 'post',
data: params,
responseType: 'blob'
})
/** 标准代码-树形表 */
export const getStandardCodeTree = () => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/code-tree`,
method: 'get'
})
/** 元数据标准树形列表查询 */
export const getMetaStandardTreeList = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/list-tree?metaStandardGuid=${guid}`,
method: 'get'
})
/** 元数据标准guid查询只展示的字段 */
export const getMetaStandardField = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/list-by-meta-standard-guid?metaStandardGuid=${guid}`,
method: 'get'
})
/** 元数据标准字段详情 */
export const getMetaStandardFieldsDetail = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/detail?guid=${guid}`,
method: 'get'
})
/** 根据元数据标准展示字段去获取未展示的详情信息 */
export const getMetaStandardFieldDetail = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/convert-detail?guid=${guid}`,
method: 'get'
})
/** 获取桑基图数据 */
export const getSankeyData = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/sankey-data?metaStandardGuid=${guid}`,
method: 'get'
})
/** 数仓目录树列表查询 */
export const getDataWareCatalogList = (params) => request({
// url: `${import.meta.env.VITE_APP_DATA_DELIVERY}delivery/ms-daop-data-plan-service/data-catalog-directory/tree-list`,
url: `${import.meta.env.VITE_API_BASEURL}delivery/api/ms-daop-data-plan-service/data-catalog-directory/tree-list`,
method: 'post',
data: params
})
export const getAllFlowData = (dictType) => request({
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${dictType}`,
method: 'get',
})
/** 元数据标准guid查询新建数据集字段 */
export const getMetaStandardDsField = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/get-standard?metaStandardGuid=${guid}`,
method: 'get'
})
/** 表分类类型 */
export const tableCategoryList = [
{
value: 1,
label: "明细表",
},
{
value: 2,
label: "汇总表",
},
{
value: 3,
label: "应用表",
},
{
value: 6,
label: "业务表",
},
// {
// value: 4,
// label: "维度表",
// },
// {
// value: 5,
// label: "缓慢变化维",
// }
];
/** 同步策略 */
export const syncPolicys = [
{
value: 1,
label: "实时",
},
{
value: 2,
label: "增量",
},
{
value: 3,
label: "全量",
},
{
value: 4,
label: "增量加更新",
},
];
/** 维表类型 */
export const dimTypeList = [{
label: "列表",
value: 1,
},
{
label: "层级",
value: 2,
},
{
label: "螺旋",
value: 3,
},
{
label: "通用",
value: 4,
}];
/** 表模型分类 */
export const tableModels = [
{
label: "主键模型",
value: 1,
},
{
label: "聚合模型",
value: 2,
},
{
label: "明细模型",
value: 3,
}
];
/** 聚合方式 */
export const aggMethodList = [{
value: 'SUM',
}, {
value: 'MAX'
}, {
value: 'MIN'
}, {
value: 'REPLACE'
}, {
value: 'REPLACE_IF_NOT_NULL'
}, {
value: 'HLL_UNION'
}, {
value: 'BITMAP_UNION'
}];
/** 保存主题表设置,直接入库 */
export const saveSubjectTable = (params) => request({
url: `${import.meta.env.VITE_API_BASEURL}delivery/api/ms-daop-data-plan-service/data-catalog-subject/add`,
method: 'post',
data: params
})
/** 获取字典列表 */
export const getDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/list-all?state=1`,
method: 'post'
})
/** 获取维度列表 */
export const getDimList = () => request({
url: `${import.meta.env.VITE_API_BASEURL}delivery/api/ms-daop-data-plan-service/data-catalog-subject/get-dim-list`,
method: 'get'
})
\ No newline at end of file
......
import request from "@/utils/request";
//获取需求表树形列表
export const getDemandTreeList = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-menu/page-list`,
method: "post",
data: params,
});
};
//获取所有需求表列表
export const getDemandAll = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-menu/get-list-data`,
method: "get",
params
});
};
//新增需求列表
export const saveDemandTree = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-menu/save`,
method: "post",
data: params,
});
};
//修改需求列表
export const updateDemandTree = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-menu/update`,
method: "post",
data: params,
});
};
// 删除需求列表
export const deleteDemandTree = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-menu/delete`,
method: "delete",
data: params,
});
};
//获取需求表
export const getDemandList = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-table/page-list`,
method: "post",
data: params,
});
};
//获取需求表详情
export const getDemandDetail = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-table/detail`,
method: "get",
params,
});
};
//新增需求表
export const saveDemand = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-table/save`,
method: "post",
data: params,
});
};
//修改需求表
export const updateDemand = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-table/update`,
method: "post",
data: params,
});
};
// 删除需求表
export const deleteDemand = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-demand-table/delete`,
method: "delete",
data: params,
});
};
// 获取疾病列表
export const getDiseaseList = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/disease-manage/page-list`,
method: "post",
data: params,
});
};
//获取所有疾病列表
export const getDiseaseAll = () => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/disease-manage/get-list-data`,
method: "post"
});
};
// 获取疾病详情
export const getDiseaseDetail = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/disease-manage/detail`,
method: "get",
params,
});
};
// 新增疾病
export const saveDisease = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/disease-manage/save`,
method: "post",
data: params,
});
};
// 修改疾病
export const updateDisease = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/disease-manage/update`,
method: "post",
data: params,
});
};
// 删除疾病
export const deleteDisease = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/disease-manage/delete`,
method: "delete",
data: params,
});
};
// 获取定价配置
export const getConfigureList = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-configure/page-list`,
method: "post",
data: params,
});
};
// 获取配置详情
export const getConfigureDetail = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-configure/detail`,
method: "get",
params,
});
};
// 新增配置
export const saveConfigure = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-configure/save`,
method: "post",
data: params,
});
};
// 修改配置
export const updateConfigure = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-configure/update`,
method: "post",
data: params,
});
};
// 删除配置
export const deleteConfigure = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-configure/delete`,
method: "delete",
data: params,
});
};
// 复制配置
export const addCopyConfigure = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-configure/copy`,
method: "post",
data: params,
});
};
// 获取数据定价
export const getPriceList = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-data/page-list`,
method: "post",
data: params,
});
};
// 获取数据定价详情
export const getPriceDetail = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-data/detail`,
method: "get",
params,
});
};
// 新增数据定价
export const savePrice = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-data/save`,
method: "post",
data: params,
});
};
// 修改数据定价
export const updatePrice = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-data/update`,
method: "post",
data: params,
});
};
// 获取数据定价结果
export const getPriceResult = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-data/pricing-price`,
method: "post",
data: params,
});
};
// 删除数据定价
export const deletePrice = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-data/delete`,
method: "delete",
data: params,
});
};
// 获取数据资源目录
export const getDamCatalogList = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-table-select-new`,
method: "get",
params,
});
};
// 获取模型相关需求表
export const getModelDemand = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-data/pricing-model`,
method: "get",
params,
});
};
// 获取质量模型评分
export const getModelScore = (params) => {
return request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/get-quality-score-by-dam-guid-v2`,
method: "get",
params,
});
};
export const exportModelScore = (params) => {
return request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/pricing-data/download-template`,
method: "post",
data: params,
responseType: 'blob'
});
};
......@@ -303,3 +303,10 @@ export const getCurrentUserInfo = (params) => {
params
});
};
/** 下载文件模板 */
export const exportTemplate = (params) => request({
url: `${import.meta.env.VITE_APP_ADD_FILE}/import-config/export-template?bizGuid=${params.bizGuid}&importType=${params.importType}`,
method: 'post',
responseType: 'blob'
});
......
......@@ -1182,3 +1182,12 @@
max-width: 100%;
}
}
.el-drawer__title {
font-size: 18px;
color: #212121;
}
.el-form-item--default .el-form-item__label {
height: 26px;
line-height: 26px;
}
\ No newline at end of file
......
......@@ -44,6 +44,7 @@ const emits = defineEmits([
"uploadBtnClick",
"beforeUPload",
"uploadFile",
'deleteFile',
"onUpload",
"scheduleChange",
"cascaderChange",
......@@ -668,7 +669,7 @@ defineExpose({
<template v-else-if="con.type.indexOf('upload') > -1">
<UploadFiles ref="formUploadRef" :upload-info="con.uploadInfo" @onUpload="onUpload"
@beforeUPload="beforeUPload" @uploadFile="uploadFile" @uploadBtnClick="uploadBtnClick"
@cascaderChange="cascaderChange" @selectChange="uploadSelectChange" />
@cascaderChange="cascaderChange" @selectChange="uploadSelectChange" @deleteFile="() => emits('deleteFile')"/>
</template>
<template v-else>
<div v-if="con.formInfo.tools">
......
......@@ -458,3 +458,7 @@ const drawerClose = () => {
}
}
</style>
<style lang="scss">
</style>
......
......@@ -70,7 +70,15 @@ const onMouseOver = (str) => {
</script>
<template>
<el-tooltip class="item" placement="top" effect="light" :popper-class="popperClass ?? 'table_tooltip'" :disabled="isShowTooltip" :open-delay="400" :content="content">
<el-tooltip
class="item"
placement="top"
effect="light"
:popper-class="popperClass ?? 'table_tooltip'"
:disabled="isShowTooltip"
:open-delay="400"
:content="content"
>
<p class="over-flow" :class="className" @mouseover="onMouseOver(refName)">
<span :ref="(el) => setRefMap(el, refName)" v-html="content || '-'"></span>
</p>
......@@ -91,4 +99,10 @@ const onMouseOver = (str) => {
p {
margin: 0;
}
</style>
<style lang="scss">
.el-popper.tree-popper {
max-width: 280px!important;
}
</style>
\ No newline at end of file
......
......@@ -741,6 +741,7 @@ onMounted(() => {
toolRef.value.isFull = true
}
}, 500)
return;
}
const container: any = containerRef.value;
const width = container.clientWidth;
......
<script lang="ts" setup name="topbar">
import { ref, watch } from 'vue';
const props = defineProps({
isGraphDisplay: {
type: Boolean,
default: true
},
});
const isGraph = ref(false);
watch(() => props.isGraphDisplay, (val) => {
isGraph.value = val;
}, {
immediate: true
})
const emits = defineEmits(["displaySwitchChange"]);
const switchChange = (val) => {
isGraph.value = val
emits('displaySwitchChange', val);
}
</script>
<template>
<div className='g6-component-topbar-content'>
<div :class="isGraph ? 'selected g6-component-topbar-item' : 'g6-component-topbar-item'" @click="switchChange(true)">
关系网
</div>
<div :class="!isGraph ? 'selected g6-component-topbar-item' : 'g6-component-topbar-item'" @click="switchChange(false)">
桑基图
</div>
</div>
</template>
<style scoped lang="scss">
.g6-component-topbar-content {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background: #fff;
border: 1px solid var(--el-color-primary);
border-radius: 32px;
padding: 4px;
width: 138px;
height: 32px;
}
.g6-component-topbar-item {
width: 50%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #999999;
cursor: pointer;
&.selected {
background: #4FA1A4;
border-radius: 32px;
color: #fff;
}
}
</style>
\ No newline at end of file
......@@ -248,6 +248,7 @@ onMounted(() => {
:show-header="props.tableInfo.showHeader ?? true" stripe :border="props.tableInfo.border
?? true" :height="props.tableInfo.height === null ? null : (props.tableInfo.height ?? '100%')"
:max-height="maxHeight" :row-key="rowKey" :current-row-key="currentRowKey" :row-class-name="rowClassName"
:tree-props="props.tableInfo.treeProps" :default-expand-all="props.tableInfo.expandAll ?? false"
:expand-row-keys="props.tableInfo.expandedKey" v-loading="tableDataLoading" @row-click="rowClick"
@row-dblclick="rowDblClick" @selection-change="selectionChange" @select="tableCheckboxSelectChange"
@select-all="tableCheckboxAllSelectChange" style="width: 100%; display: inline-block"
......@@ -375,7 +376,7 @@ onMounted(() => {
<template #default="scope" v-else-if="item.type == 'approveTag'">
<el-tag v-if="scope.row[item.field]" :type="tagType(scope.row.approveVO, 'approveState')">{{
tagMethod(scope.row.approveVO, 'approveState')
}}</el-tag>
}}</el-tag>
<span v-else>{{ '--' }}</span>
</template>
<template #default="scope" v-else-if="item.type == 'tooltip'">
......@@ -480,7 +481,7 @@ onMounted(() => {
</template>
<template #default="scope" v-else-if="item.type == 'stepsBar'">
<div :class="item.className" v-if="item.stepsInfo(scope)">
<StepBar :steps-info="item.stepsInfo(scope)" />
<StepBar :steps-info="item.stepsInfo(scope)" />
</div>
<span v-else>--</span>
</template>
......
......@@ -42,20 +42,20 @@ const checkKeys = computed(() => {
return props.treeInfo.checkedKey ?? []
});
const currentNodeKey = computed(() => {
// if (props.treeInfo.currentNodeKey) {
// nextTick(() => {
// let domItems = treeRef.value?.$el.getElementsByClassName('el-tree-node');
// let clientHeight = treeRef.value?.$el.clientHeight;
// for (const item of domItems) {
// if (item.getAttribute('data-key') == props.treeInfo.currentNodeKey) {
// if (item.offsetTop > clientHeight) {
// item.scrollIntoView({ block: "end", inline: "nearest" });
// }
// break;
// }
// }
// })
// }
if (props.treeInfo.currentNodeKey) {
nextTick(() => {
let domItems = treeRef.value?.$el.getElementsByClassName('el-tree-node');
let clientHeight = treeRef.value?.$el.clientHeight;
for (const item of domItems) {
if (item.getAttribute('data-key') == props.treeInfo.currentNodeKey) {
if (item.offsetTop > clientHeight) {
item.scrollIntoView({ block: "end", inline: "nearest" });
}
break;
}
}
})
}
return props.treeInfo.currentNodeKey ?? ''
});
const customInfo = computed(() => {
......@@ -70,6 +70,9 @@ const editTreeItem = computed(() => {
const expendAll = computed(() => {
return props.treeInfo.expendAll ?? false
})
const ellipsis = computed(() => {
return props.treeInfo.ellipsis ?? true
})
interface Tree {
[key: string]: any;
......@@ -182,6 +185,21 @@ const appendChildren = (key, data) => {
const visibleNodes = ref({}); //解决点击树item,下拉菜单不消失的问题,原因是树的点击事件阻止冒泡了。
function formatNodeLabel (node) {
let sliceLength = 8
switch (node.level) {
case 2:
sliceLength = 9
break
case 3:
sliceLength = 6
break
case 4:
sliceLength = 6
break
}
return node.label.slice(0, sliceLength)
}
defineExpose({
getCheckedNodes,
getCheckedKeys,
......@@ -225,8 +243,14 @@ defineExpose({
</span>
<template v-else-if="editTreeItem && data.showEdit !== false">
<span class="list-item-text">
<ellipsis-tooltip v-if="!customInfo" :content="node.label" class-name="w100f"
<template v-if="!ellipsis">
<span>{{ formatNodeLabel(node) }}</span>
</template>
<template v-else>
<ellipsis-tooltip v-if="!customInfo" :content="node.label" class-name="w100f" popper-class="tree-popper"
:refName="'tooltipOver' + node.id"></ellipsis-tooltip>
</template>
</span>
<div class="tags-list-right" :class="visibleNodes[node.data.guid] ? 'active' : ''">
<el-popover v-model:visible="visibleNodes[node.data.guid]" placement="bottom" width="96" trigger="click"
......
......@@ -4,7 +4,7 @@ import { ElMessage, genFileId } from "element-plus";
import { Plus, Download, Upload, } from "@element-plus/icons-vue";
import type { UploadRawFile } from 'element-plus'
const emits = defineEmits(["onUpload", "beforeUPload", "uploadFile", "uploadBtnClick", "cascaderChange", "selectChange"]);
const emits = defineEmits(["onUpload", "beforeUPload", "uploadFile", "uploadBtnClick", "cascaderChange", "selectChange", 'deleteFile']);
const props = defineProps({
uploadInfo: {
type: Object,
......@@ -75,6 +75,7 @@ const btnClick = (file, type) => {
if (type == 'remove') {
const fileUpload = fileUploadRef.value[0] || fileUploadRef.value
fileUpload?.handleRemove(file)
emits('deleteFile')
} else if (type == 'upload') {
file.show = false
emits('uploadFile', file)
......@@ -111,13 +112,16 @@ defineExpose({
<p class="item_title">{{ item.title }}</p>
<div class="form_item" v-if="item.type == 'select'">
<span class="item_label" :class="{ required_mark: item.selectInfo.required }">{{ item.selectInfo.label
}}:</span>
}}:</span>
<el-select v-model="extraParams[item.selectInfo.field]" :placeholder="item.selectInfo.placeholder"
:disabled="item.selectInfo.disabled" @change="selectChange">
<el-option v-for="opts in item.selectInfo.options" :label="opts.label" :value="opts.value" />
:disabled="item.selectInfo.disabled" @change="selectChange" :filterable="item.selectInfo.filterable" :style="item.selectInfo.style">
<el-option v-for="opts in item.selectInfo.options"
:label="item.selectInfo.props?.label ? opts[item.selectInfo.props.label] : opts.label"
:value="item.selectInfo.props?.value ? opts[item.selectInfo.props.value] : opts.value"
:disabled="opts.disabled" />
</el-select>
</div>
<div class="form_item" v-if="item.type == 'tree-select'">
<div class="form_item" v-else-if="item.type == 'tree-select'">
<span class="item_label" :class="{ required_mark: item.selectInfo.required }">{{ item.selectInfo.label
}}:</span>
<el-tree-select
......@@ -176,7 +180,7 @@ defineExpose({
</el-button>
</div>
<el-upload v-else ref="fileUploadRef" class="upload_panel" :class="[props.uploadInfo.col]"
v-model:file-list="fileList" :action="item.uploadInfo.action" :auto-upload="item.uploadInfo.auto ?? ''"
v-model:file-list="fileList" :action="item.uploadInfo.action ?? ''" :auto-upload="item.uploadInfo.auto ?? ''"
:drag="item.uploadInfo.drag ?? false" :accept="item.uploadInfo.accept" :limit="item.uploadInfo.limit ?? 1"
:on-change="onUpload" :on-exceed="val => exceedFile(val, item.uploadInfo.cover ?? false)"
:on-error="handleError" :on-success="handleSuccess" :before-upload="beforeUPload"
......
......@@ -4,6 +4,7 @@ import { useRouter } from "vue-router";
import useUserStore from "@/store/modules/user";
import useKeepAliveStore from '@/store/modules/keepAlive'
import { ElMessageBox, ElMessage } from "element-plus";
import { isEqual } from "lodash-es";
const router = useRouter();
const route = useRoute();
......@@ -26,7 +27,7 @@ watch(
if (tab.fullPath.includes(jionPath)) {
pathIndex.value = index
}
return tab.fullPath === newRouter.fullPath;
return tab.fullPath === newRouter.fullPath || (tab.path == newRouter.path && isEqual(tab.query, newRouter.query));
});
if (isExist.length == 0) {
if (pathIndex.value != -1 && routerLength > 3) {
......@@ -45,11 +46,8 @@ watch(
}
}
list.map(item => {
item.fullPath = item.fullPath;
})
tabbarList.value = list;
tabbarActive.value = newRouter.fullPath;
tabbarActive.value = isExist[0]?.fullPath || newRouter.fullPath;
userStore.setTabbar(tabbarList.value);
userStore.setActiveTabbar(combPath, newRouter.fullPath);
},
......@@ -58,7 +56,7 @@ watch(
const changeTab = (pane: any, ev: any) => {
const tabIndex = Number(pane.index);
const paneData: any = tabbarList.value[tabIndex];
if (paneData.name == 'budgetDataIndex' || paneData.name == 'iframePage') {
if (paneData.name == 'budgetDataIndex' || paneData.name == 'iframePage' || paneData.name == 'portraitMap' || paneData.name == 'portraitMaps') {
router.push(paneData.fullPath);
} else {
router.push({
......
......@@ -144,7 +144,7 @@ const routes: RouteRecordRaw[] = [
{
path: 'budgetDataIndex',
name: 'budgetDataIndex',
component: () => import('@/views/data_catalog/budgetDataIndex.vue'),
component: () => import('@/views/data_meta/budgetDataIndex.vue'),
meta: {
title: '',
// sidebar: false,
......@@ -155,7 +155,7 @@ const routes: RouteRecordRaw[] = [
}
]
},
{
{
path: '/data-meta/reports',
component: Layout,
meta: {
......@@ -166,7 +166,7 @@ const routes: RouteRecordRaw[] = [
{
path: 'iframePage',
name: 'iframePage',
component: () => import('@/views/data_catalog/budgetDataIndex.vue'),
component: () => import('@/views/data_meta/budgetDataIndex.vue'),
meta: {
title: '',
sidebar: true,
......@@ -175,6 +175,19 @@ const routes: RouteRecordRaw[] = [
reuse: true,
activeMenu: '/data-meta/reports/iframePage',
},
},
{
path: 'portraitMaps',
name: 'portraitMaps',
component: () => import('@/views/data_meta/portraitMap.vue'),
meta: {
title: '全景地图',
sidebar: true,
breadcrumb: false,
cache: true,
reuse: true,
activeMenu: '/data-meta/reports/portraitMaps',
},
}
]
},
......@@ -199,6 +212,119 @@ const routes: RouteRecordRaw[] = [
},
}
]
},
{
path: '/data-meta/metadata-standard',
component: Layout,
meta: { title: '元数据标准', icon: 'ep:grid' },
children: [
{
path: '',
name: 'metadataStandard',
component: () => import('@/views/data_meta/standard.vue'),
meta: {
title: '元数据标准管理',
breadcrumb: false,
cache: true
}
},
{
path: 'standard-query',
name: 'metadataStandardQuery',
component: () => import('@/views/data_meta/standard-query.vue'),
meta: {
title: '元数据标准查询',
breadcrumb: false,
cache: true
}
},
{
path: 'standard-query-view',
name: 'metadataStandardQueryView',
component: () => import('@/views/data_meta/standard-query-view.vue'),
meta: {
title: '元数据标准查看',
breadcrumb: false,
cache: true,
activeMenu: '/data-meta/metadata-standard'
},
beforeEnter: (to, from) => {
if (to.query.name) {
to.meta.title = `元数据标准查看-${to.query.name}`;
}
}
},
{
path: 'table-create-manual',
name: 'tableCreateManual',
component: () => import('@/views/data_meta/tableCreateManual.vue'),
meta: {
title: '新建表',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
activeMenu: '/data-meta/metadata-standard/standard-query'
},
beforeEnter: (to, from) => {
if (to.query.domainName) {
to.meta.title = `新建表(${to.query.domainName})-${to.query.standardName}`;
to.meta.editPage = true;
}
}
},
{
path: 'dim-table-create-manual',
name: 'dimTableCreateManual',
component: () => import('@/views/data_meta/dimTableCreateManual.vue'),
meta: {
title: '新建表',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
activeMenu: '/data-meta/metadata-standard/standard-query'
},
beforeEnter: (to, from) => {
if (to.query.domainName) {
to.meta.title = `新建表(${to.query.domainName})-${to.query.standardName}`;
to.meta.editPage = true;
}
}
},
{
path: 'standard-codetable',
name: 'metadataStandardCodetable',
component: () => import('@/views/data_meta/standard-codetable.vue'),
meta: {
title: '标准代码表',
breadcrumb: false,
cache: true
}
},
{
path: 'standard-import',
name: 'metadataStandardImport',
component: () => import('@/views/data_meta/standard-import.vue'),
meta: {
title: '标准代码导入',
breadcrumb: false,
cache: true,
activeMenu: '/data-meta/metadata-standard/standard-codetable'
}
},
{
path: 'standard-meta-import',
name: 'standardMetaImport',
component: () => import('@/views/data_meta/standard-meta-import.vue'),
meta: {
title: '元数据标准导入',
breadcrumb: false,
cache: true,
activeMenu: '/data-meta/metadata-standard'
}
}
]
}
]
......
import type { RouteRecordRaw } from 'vue-router'
function Layout() {
return import('@/layouts/index.vue')
}
const routes: RouteRecordRaw[] = [
{
path: '/data-pricing/pricing-manage',
component: Layout,
meta: {
title: '定价管理',
icon: 'ep:grid',
},
children: [
{
path: 'demand-manage',
name: 'demandManage',
component: () => import('@/views/data_pricing/demandManage.vue'),
meta: {
title: '需求表管理',
breadcrumb: false,
cache: true
},
},
{
path: 'import-file-demand-manage',
name: 'importFileDemandManage',
component: () => import('@/views/importFile.vue'),
meta: {
title: '导入数据-需求表管理',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
activeMenu: '/data-pricing/pricing-manage/demand-manage'
}
},
{
path: 'disease-manage',
name: 'diseaseManage',
component: () => import('@/views/data_pricing/diseaseManage.vue'),
meta: {
title: '疾病管理',
breadcrumb: false,
cache: true
},
},
{
path: 'import-file-disease',
name: 'importFileDisease',
component: () => import('@/views/importFile.vue'),
meta: {
title: '导入数据-疾病管理',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
activeMenu: '/data-pricing/pricing-manage/disease-manage'
}
},
{
path: 'price-config',
name: 'priceConfig',
component: () => import('@/views/data_pricing/priceConfig.vue'),
meta: {
title: '定价配置',
breadcrumb: false,
cache: true
},
},
{
path: 'price-model',
name: 'priceModel',
component: () => import('@/views/data_pricing/priceModel.vue'),
meta: {
title: '新增配置',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-pricing/pricing-manage/price-config'
},
beforeEnter: (to, from) => {
if (to.query.guid) {
to.meta.title = `编辑-${to.query.name}`;
} else {
to.meta.title = `新增配置`;
}
}
},
{
path: 'price-calculate',
name: 'priceCalculate',
component: () => import('@/views/data_pricing/priceCalculate.vue'),
meta: {
title: '数据定价',
breadcrumb: false,
cache: true
}
},
{
path: 'calculate-config',
name: 'calculateConfig',
component: () => import('@/views/data_pricing/calculateConfig.vue'),
meta: {
title: '新增数据定价',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-pricing/pricing-manage/price-calculate'
},
beforeEnter: (to, from) => {
if (to.query.guid) {
to.meta.title = `编辑-${to.query.name}`;
} else {
to.meta.title = `新增数据定价`;
}
}
},
],
},
]
export default routes
......@@ -10,6 +10,7 @@ import DataTrustedSpace from './modules/dataTrustedSpace';
import DataAssetRegistry from './modules/dataAssetRegistry';
import DataEntry from './modules/dataEntry';
import SecurityMenu from './modules/securityMenu';
import DataPricing from './modules/dataPricing';
import useSettingsStore from '@/store/modules/settings'
......@@ -110,9 +111,10 @@ const asyncRoutes: RouteRecordRaw[] = [
...DataEntry,
...SecurityMenu,
...DataMeta,
...DataQuality,
...DataQuality,
...DataInventory,
...DataTrustedSpace
...DataTrustedSpace,
...DataPricing
]
const constantRoutesByFilesystem = generatedRoutes.filter((item) => {
......
......@@ -174,7 +174,10 @@ const useMenuStore = defineStore(
else {
// 如果是 string 类型,则认为是路由,需要查找对应的主导航索引
const findIndex = allMenus.value.findIndex(item => item.children.some(r => {
if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
if ((data== "/data-meta/reports/iframePage" || data == '/data-meta/reports/portraitMaps' || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
return true;
}
if (data== "/data-meta/portraitMap" && r.path?.includes('/data-meta/portraitMap')) {
return true;
}
if (data== "/data-meta/portraitMap" && r.path?.includes('/data-meta/portraitMap')) {
......
......@@ -157,7 +157,7 @@ const useRouteStore = defineStore(
};
}
r = routes.find((route: any) => {
return route.path === path || route.path === m.path || `/${route.path}` === m.path || ((path.includes('budgetDataIndex') && path.includes('/data-meta/report') && route.path.includes('/data-meta/report')) || (path.includes('iframePage') && path.includes('/data-meta/report')) || (path.includes('/data-meta/portraitMap') && route.path.includes('/data-meta/portraitMap')));
return route.path === path || route.path === m.path || `/${route.path}` === m.path || ((path.includes('budgetDataIndex') && path.includes('/data-meta/report') && route.path.includes('/data-meta/report')) || (path.includes('iframePage') && path.includes('/data-meta/report')) || (path.includes('portraitMaps') && path.includes('/data-meta/report')) || (path.includes('/data-meta/portraitMap') && route.path.includes('/data-meta/portraitMap')));
});
if (r && (path.includes('budgetDataIndex') || path.includes('iframePage')) || path.includes('portraitMap')) {
r.path = path;
......
......@@ -27,6 +27,7 @@ declare module '@vue/runtime-core' {
FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
FixedActionBar: typeof import('./../components/FixedActionBar/index.vue')['default']
Form: typeof import('./../components/Form/index.vue')['default']
GraphTopbar: typeof import('./../components/RelationNetwork/graphTopbar.vue')['default']
Hour: typeof import('./../components/Schedule/component/hour.vue')['default']
ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./../components/ImagesUpload/index.vue')['default']
......@@ -41,6 +42,7 @@ declare module '@vue/runtime-core' {
PageNav: typeof import('./../components/PageNav/index.vue')['default']
PcasCascader: typeof import('./../components/PcasCascader/index.vue')['default']
Popover: typeof import('./../components/Popover/index.vue')['default']
RelationNetwork: typeof import('./../components/RelationNetwork/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Schedule: typeof import('./../components/Schedule/index.vue')['default']
......
......@@ -120,6 +120,9 @@ export const filterCascaderData = (data, field, val, type = 'disabled') => {
}
// 数字千分位 保留两位小数
export const changeNum = (num, fixed = 0, round = false) => {
if(num === '' || num === null || num === undefined){
return '';
}
num = parseFloat(num);
if (round) {
let parts = num.toFixed(fixed).split(".")
......
......@@ -884,7 +884,7 @@ const matchEnValue = ref({
<div class="data-label">
<div class="container_wrap full flex">
<div class="aside_wrap">
<div class="aside_title">分类分级目录</div>
<div class="aside_title">分类分级模板</div>
<Tree :treeInfo="treeInfo" @nodeClick="nodeClick" @itemMenuClick="handleTreeItemMenuClick" />
</div>
<div class="main_wrap">
......
......@@ -1293,6 +1293,7 @@ const loadDrawer = async () => {
drawerInfo.value.footer.btns.at(-2).visible = false
drawerInfo.value.footer.btns.at(-3).visible = false
drawerInfo.value.visible = true
console.log('table', formTable.value)
};
const batching = (type) => {
......
<template>
<div ref="containerRef" class='canvas-wrapper'>
</div>
</template>
<script lang="ts" setup name="topbar">
import { ref, watch } from 'vue';
import * as echarts from "echarts";
const props = defineProps({
treeData: {
type: Array<any>,
default: [
{
source: 'a',
target: 'a1',
value: 5
},
{
source: 'a',
target: 'a2',
value: 3
},
{
source: 'b',
target: 'b1',
value: 8
},
{
source: 'a',
target: 'b1',
value: 3
},
{
source: 'b1',
target: 'a1',
value: 1
},
{
source: 'b1',
target: 'c',
value: 2
}
]
},
names: {
type: Array<any>,
default: [
{
name: 'a'
},
{
name: 'b'
},
{
name: 'a1'
},
{
name: 'a2'
},
{
name: 'b1'
},
{
name: 'c'
}
]
}
})
watch(() => props.treeData, (val) => {
setChartsOption();
})
const sankeyInstance: any = ref();
const containerRef = ref();
const setChartsOption = () => {
let option = {
tooltip: {
trigger: 'item',
formatter: (params) => {
if (params.data.name) {
return null;
}
return params.data.source + ' > ' + params.data.target
}
},
color: ["#3DBCBE", "#6b67d1", "#7BBCE0", "#2B8EF3", "#51dca2", "#E19D46"],
series: [
{
type: 'sankey',
top: 60,
bottom: 20,
draggable: false,
left: 50,
emphasis: {
focus: 'trajectory'
},
labelLayout: {
hideOverlap: true,
},
right: 100,
label: {
fontSize: 10,
},
data: props.names?.map(n => {
if (n.isLast) {
return {
...n,
label: {
width: 97,
overflow: 'breakAll'
}
}
}
return n;
}),
links: props.treeData,
lineStyle: {
color: 'source',
curveness: 0.5
},
}
]
}
sankeyInstance.value.setOption(option);
sankeyInstance.value.resize();
}
const resizeObserver = ref();
const observeResize = () => {
window.addEventListener('resize', (e) => {
sankeyInstance.value?.resize();
});
}
onMounted(() => {
nextTick(() => {
sankeyInstance.value = echarts.init(containerRef.value);
setChartsOption();
observeResize();
})
})
</script>
<style lang="scss" scoped>
.canvas-wrapper {
width: 100%;
height: 100%;
position: relative;
}
</style>
\ No newline at end of file
<template>
<el-drawer
v-model="visible"
:title="title"
size="520px"
class="standard-meta-modal"
:close-on-click-modal="false"
>
<el-form
:model="form"
:rules="formRules"
ref="formEl"
style="min-height: 200px;"
require-asterisk-position="right"
v-loading="loading"
>
<el-row>
<el-col v-for="item,index in fields" :key="index" :span="12" style="padding-right:10px;">
<el-form-item :label="item.fileNameCodeName" :prop="item.fileNameCode">
<el-input
v-if="item.inputTypeCode == '1' || item.inputTypeCode == '3'"
v-model="form[item.fileNameCode]"
placeholder="请输入"
/>
<el-select
v-else-if="item.inputTypeCode == '2'"
v-model="form[item.fileNameCode]"
filterable
clearable
placeholder="请选择"
>
<el-option v-for="op in formOptions[item.fileNameCode]" :label="op.label" :value="op.value" :key="op.value"></el-option>
</el-select>
<el-tree-select
v-else-if="item.inputTypeCode == '4'"
v-model="form[item.fileNameCode]"
:data="standardCodeTree"
:props="treeSelectProps"
placeholder="请选择"
filterable
clearable
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div style="text-align:right">
<el-button @click="visible = false" :disabled="confirmLoading">取消</el-button>
<el-button type="primary" @click="confirm" :loading="confirmLoading">确认</el-button>
</div>
</template>
</el-drawer>
</template>
<script setup lang="ts">
import { watch } from 'vue'
import { ElMessage } from "element-plus";
import { getParamsList } from '@/api/modules/dataAsset'
import { saveMetaStandardDataFields, getMetaStandardFieldsDetail, getStandardCodeTree } from '@/api/modules/dataMetaService'
const { proxy } = getCurrentInstance() as any;
const props = defineProps({
modelValue: Boolean,
fields: {
type: Array,
default: () => ([])
},
metaStandardGuid: {
type: String,
default: ''
},
type: {
type: String,
default: 'add'
},
data: {
type: Object,
default: () => ({})
}
})
const emit = defineEmits(['update:modelValue', 'success', 'confirm'])
const visible = computed({
get() {
return props.modelValue;
},
set(val) {
emit('update:modelValue', val);
}
})
const title = computed(() => {
return props.type === 'add' ? '新增字段标准' : '编辑字段标准'
})
const formEl = ref()
const form = ref({})
const formRules = ref({})
const formOptions = ref({})
const detail = ref({})
async function initForm () {
const { fields, type, data } = props
console.log(data)
if (!fields) return
let formData = {}
let formRuleData = {}
let formOptionData = {}
let detailData:any = {}
if (type === 'edit') {
detailData = await getDetail()
detail.value = detailData
}
fields.forEach(async (item:any) => {
formData[item.fileNameCode] = type === 'add' ? '' : detailData.metaStandardValue[item.fileNameCode]
formRuleData[item.fileNameCode] = {
required: item.isNotnull === 'Y' ? true : false,
message: `缺少${item.fileNameCodeName}`
}
// formOptionData[item.fileNameCode] = await getOptions(item.dataTypeCode)
if (item.inputTypeCode == '2') {
formOptions.value[item.fileNameCode] = await getOptions(item.dataTypeCode)
}
})
// formOptions.value = formOptionData
form.value = formData
formRules.value = formRuleData
nextTick(() => formEl.value.clearValidate())
setTimeout(() => {
formEl.value.clearValidate()
}, 100)
}
function getOptions (dictType) {
return new Promise((resolve, reject) => {
getParamsList({ dictType }).then((res:any) => {
if (res.code === proxy.$passCode) {
resolve(res.data)
}
})
})
}
const loading = ref(false)
function getDetail () {
return new Promise((resolve) => {
loading.value = true
getMetaStandardFieldsDetail(props.data.guid).then((res:any) => {
if (res.code === proxy.$passCode) {
resolve(res.data)
}
}).finally(() => loading.value = false)
})
}
const confirmLoading = ref(false)
function confirm () {
console.log(form.value)
formEl.value.validate(valid => {
if (!valid) return
let body = {
metaStandardGuid: props.type === 'edit' ? detail.value.metaStandardGuid : props.metaStandardGuid,
metaStandardValue: { ...form.value }
}
if (props.type === 'edit') {
body.guid = props.data.guid
}
confirmLoading.value = true
saveMetaStandardDataFields(body).then((res:any) => {
if (res.code === proxy.$passCode) {
ElMessage.success('操作成功')
emit('success')
visible.value = false
} else {
ElMessage.error(res.msg)
}
}).finally(() => confirmLoading.value = false)
})
}
const standardCodeTree = ref([])
const treeSelectProps = {
label: 'name',
value: 'guid',
isLeaf: 'isCode'
}
function getStandardCodeTreeList () {
getStandardCodeTree().then((res:any) => {
if (res.code === proxy.$passCode) {
const data = res.data
data.forEach(item => {
if (item.children) {
item.children.forEach(subItem => {
// 二级的标准名字作为key
subItem.guid = subItem.name
// subItem.value = subItem.name
})
}
})
standardCodeTree.value = data
}
})
}
watch(
() => visible.value,
(v) => {
if (!v) return
initForm()
}
)
onBeforeMount(() => {
getStandardCodeTreeList()
})
</script>
<style lang="scss">
.standard-meta-modal {
.el-form-item {
flex-direction: column;
.el-form-item__label {
justify-content: flex-start;
}
}
.el-drawer__footer {
padding: 10px;
justify-content: flex-end;
}
.table-form-wrapper {
display: flex;
margin-bottom: 5px;
.table-form-item {
padding-right: 10px;
}
.table-form-operation {
flex: 0 0 70px;
padding-left: 6px;
}
}
}
</style>
\ No newline at end of file
<template>
<el-select v-if="!readonly && isEdit && isSelectType(dbType, scope)" v-model="scope.row['defaultValue']" placeholder="请选择" collapse-tags-tooltip
filterable allow-create default-first-option :reserve-keyword="false">
<el-option v-for="opt in optionsConfig[dataType]" :key="opt['value']" :label="opt['label']" :value="opt['value']" />
</el-select>
<el-date-picker v-else-if="!readonly && isEdit && dataType === 'date'" v-model="scope.row['defaultValue']" type="date"
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择" />
<el-date-picker v-else-if="!readonly && isEdit && dbType === 'mysql' && dataType === 'datetime'"
v-model="scope.row['defaultValue']" placeholder="请选择" type="datetime" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" />
<el-input v-else-if="!readonly && isEdit" v-model.trim="scope.row['defaultValue']" placeholder="请填写"
@input="(val) => inputChange(val, scope.row.dataType, scope)" />
<span v-else>{{ scope.row["defaultValue"] == null ? '-' : (isSelectType(dbType, scope) ?
(optionsConfig[dataType].find(s => s.value == scope.row["defaultValue"])?.label ??
scope.row["defaultValue"]) : scope.row["defaultValue"]) }}</span>
</template>
<script lang="ts" setup name="tableDefaultValue">
import { ref } from "vue";
import { useDefault } from "@/hooks/useDefault";
const { optionsConfig, inputChange, isSelectType } = useDefault()
const props = defineProps({
dbType: {
type: String,
default: ''
},
scope: {
type: Object,
default: {}
},
readonly: {
type: Boolean,
default: false
}
})
const isEdit = computed(() => {
return props.scope.row['isEdit'];
});
const dataType = computed(() => {
return props.scope.row['dataType'];
});
</script>
\ No newline at end of file
......@@ -26,8 +26,8 @@ function encrypt(txt) {
}
const userStore = useUserStore()
const userInfoData = JSON.parse(localStorage.userData)
// const url: any = 'https://scm.cs4pl.com/portraitBMap?fUrl=portraitMap';
const url: any = 'http://localhost:8086/portraitBMap?fUrl=portraitMap';
const url: any = 'https://scm-operation-test.csbr.cn/portraitBMap?fUrl=portraitMap&tUrl=portraitBMap';
// const url: any = 'http://localhost:8086/portraitBMap?fUrl=portraitMap&tUrl=portraitBMap';
const link = ref('')
const loading = ref(true);
......
<route lang="yaml">
name: metadataStandardQueryView
</route>
<template>
<div class="main_wrap" v-loading="graphDataLoading">
<div className='g6-component-topbar'>
<graphTopbar ref="topBarRef" @displaySwitchChange="displaySwitchChange" :isGraphDisplay="isGraphDisplay" />
</div>
<RelationNetwork v-show="graphTreeData?.guid && isGraphDisplay" ref="relationNetworkRef" :tree-data="graphTreeData"
:noContextMenu="true" @nodeItemClick="handleNodeItemClick" @contextMenu="handleContextMenu">
</RelationNetwork>
<Sankey v-show="!isGraphDisplay && (sankeyNames?.length || sankeyDataLoading)" v-loading="sankeyDataLoading"
:tree-data="sankeyData" :names="sankeyNames">
</Sankey>
<div v-show="(isGraphDisplay ? !graphTreeData?.guid : (!sankeyDataLoading && !sankeyNames?.length))"
class="main-placeholder">
<img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
<div class="empty-text">暂无数据</div>
</div>
</div>
</template>
<script lang="ts" setup name="metadataStandardQueryView">
import {
getMetaStandardField,
getSankeyData,
getMetaStandardTreeList
} from '@/api/modules/dataMetaService';
import Sankey from './components/Sankey.vue';
import { ElMessage } from 'element-plus';
const router = useRouter();
const route = useRoute()
const metaGuid = ref(route.query.guid);
const { proxy } = getCurrentInstance() as any;
const relationNetworkRef = ref();
const graphDataLoading = ref(false);
/** 关系网树形数据 */
const graphTreeData: any = ref({});
onBeforeUnmount(() => {
relationNetworkRef.value.destroy();
})
const sankeyDataLoading = ref(false);
const sankeyData: any = ref([]);
const sankeyNames: any = ref([]);
const isGraphDisplay = ref(true);
const displaySwitchChange = (val) => {
if (val == isGraphDisplay.value) {
return;
}
isGraphDisplay.value = val;
if (!val) {
getSankeyDataList();
}
}
const getSankeyDataList = () => {
sankeyDataLoading.value = true;
getSankeyData(metaGuid.value).then((res: any) => {
sankeyDataLoading.value = false;
if (res?.code == proxy.$passCode) {
sankeyData.value = res.data?.links || [];
sankeyNames.value = res.data?.data || [];
} else {
ElMessage.error(res.msg);
}
})
}
const handleNodeItemClick = (graph, nodeItem) => {
const nodeId = nodeItem.get('id');
let parentData = graph.findDataById(nodeId);
if (!parentData.children) {
parentData.children = [];
}
if (parentData.isHaveData == 'N') {
ElMessage.warning('没有可展开的下级字段');
return;
}
// graph.updateConfig({ animate: false });
// graph.refresh();
nodeItem.getModel().collapsed = false;
parentData.collapsed = false;
graphDataLoading.value = true;
getMetaStandardField(nodeId).then((res: any) => {
graphDataLoading.value = false;
if (res?.code == proxy.$passCode) {
parentData = graph.findDataById(nodeId);
const data = res.data || [];
parentData.children = [];
if (!data?.length) {
parentData.isHaveData = 'N';
ElMessage.warning('没有可展开的下级字段');
return;
}
data.forEach(d => {
parentData.children.push(d);
})
parentData.isLoading = false;
nodeItem.getModel().collapsed = false;
parentData.collapsed = false;
graph.updateItem(nodeItem, {
...nodeItem.getModel(),
collapsed: false
});
graph.layout();
setTimeout(() => {
// graph.updateConfig({ animate: true });
// graph.refresh();
graph.updateItem(nodeItem, {
...nodeItem.getModel(),
collapsed: false
});
graph.setMinZoom(1);
graph.setMaxZoom(1);
graph.layout();
graph.setMinZoom(0.5);
graph.setMaxZoom(5);
graph.focusItem(nodeItem, true, {
duration: 400 // 动画时长为500ms
});
}, 500);
} else {
parentData.isLoading = false;
ElMessage.error(res.msg);
}
})
}
const handleContextMenu = (model) => {
router.push({
name: 'metadataStandard',
query: {
standardGuid: model.guid,
name: model.standardName
}
});
}
onBeforeMount(() => {
graphDataLoading.value = true
getMetaStandardTreeList(metaGuid.value).then((res: any) => {
graphDataLoading.value = false;
if (res?.code == proxy.$passCode) {
const data = res.data || [];
let resultData = data?.[0] || {};
if (!resultData?.children?.length && resultData.isHaveData == 'Y') {
graphDataLoading.value = true;
getMetaStandardField(resultData.guid).then((res: any) => {
graphDataLoading.value = false;
if (res?.code == proxy.$passCode) {
resultData.children = res.data || [];
graphTreeData.value = resultData;
} else {
graphTreeData.value = resultData;
ElMessage.error(res.msg);
}
});
} else {
graphTreeData.value = resultData;
}
} else {
ElMessage.error(res.msg);
}
})
})
</script>
<style lang="scss" scoped>
.main_wrap {
height: 100%;
width: 100%;
position: relative;
:deep(.canvas-wrapper) {
background-color: #f7f7f9;
}
.main-placeholder {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.empty-text {
font-size: 14px;
color: #b2b2b2;
}
}
}
.g6-component-topbar {
position: absolute;
left: 24px;
bottom: unset;
top: 14px;
padding: 0;
text-align: center;
z-index: 999;
}
</style>
\ No newline at end of file
<route lang="yaml">
name: priceCalculate
</route>
<script lang="ts" setup name="priceCalculate">
import { ref } from 'vue';
import TableTools from '@/components/Tools/table_tools.vue';
import { TableColumnWidth, commonPageConfig } from '@/utils/enum';
import { ElMessage, ElMessageBox } from "element-plus";
import { CirclePlus } from "@element-plus/icons-vue";
import { useRouter, useRoute } from "vue-router";
import useUserStore from "@/store/modules/user";
import useDataAssetStore from "@/store/modules/dataAsset";
import { getAllFlowData } from '@/api/modules/queryService';
import { changeNum } from "@/utils/common";
import {
getDiseaseAll,
getPriceList,
deletePrice,
} from '@/api/modules/dataPricing';
const router = useRouter();
const userStore = useUserStore()
const assetStore = useDataAssetStore();
const userData = JSON.parse(userStore.userData)
const { proxy } = getCurrentInstance() as any;
const searchItemList = ref([
{
type: "input",
label: "",
field: "dataResourceName",
default: "",
placeholder: "数据资源名称",
clearable: true,
},
{
type: "cascader",
label: "",
field: "diseaseName",
placeholder: "疾病名称",
default: "",
options: [],
showAllLevels: false,
props: {
checkStrictly: true,
label: "diseaseName",
value: "guid",
children: 'childList',
emitPath: false
},
filterable: true,
clearable: true,
}
]);
const typeMap: any = ref({});
const selectRowData: any = ref([])
const currTableData: any = ref({});
const page: any = ref({
...commonPageConfig,
dataResourceName: '',
diseaseName: ''
});
const tableField: any = ref([
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "定价模型名称", field: "modelName", width: 200 },
{ label: "数据资源名称", field: "dataResourceName", width: 200 },
{ label: "疾病名称", field: "diseaseName", width: 200 },
{
label: "交易价格(元)", field: "dataTransactionPrice", width: 120, align: 'right', getName: (scope) => {
return scope.row.dataTransactionPrice ? changeNum(parseFloat(scope.row.dataTransactionPrice), 2) : '-';
}
},
{ label: "创建人", field: "createUserName", width: 120 },
{ label: "创建时间", field: "createTime", width: TableColumnWidth.DATETIME },
]);
const tableInfo = ref({
id: 'api-data-table',
rowKey: 'guid',
loading: false,
fields: tableField.value,
data: [],
page: {
type: "normal",
rows: 0,
...page.value,
},
actionInfo: {
label: "操作",
type: "btn",
isMore: false,
width: 120,
btns: [
{ label: "编辑", value: "edit" },
{ label: "删除", value: "del" }
]
}
});
const setTableField = () => {
tableField.value.splice(4, 0, {
label: "交易用途", field: "dataUsage", width: 120, getName: (scope) => {
return typeMap.value['dataUsage'].find((item) => item.value == scope.row['dataUsage'])?.label || '-';
}
});
tableInfo.value.fields = tableField.value;
}
// 获取所有疾病数据
const getDiseaseData = () => {
getDiseaseAll().then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || [];
searchItemList.value[1].options = data;
}
})
}
// 获取数据字典
const getDataType = (dictType, fieldName) => {
getAllFlowData({ dictType }).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || [];
typeMap.value[fieldName] = JSON.parse(JSON.stringify(data));
setTableField()
} else {
proxy.$ElMessage.error(res.msg);
}
})
}
const toSearch = (val: any, clear: boolean = false) => {
page.value.curr = 1;
if (clear) {
searchItemList.value.map((item) => (item.default = ""));
page.value.dataResourceName = ''
page.value.diseaseName = '';
} else {
page.value.dataResourceName = val.dataResourceName || '';
page.value.diseaseName = val.diseaseName || '';
}
getTableData();
};
const getTableData = () => {
tableInfo.value.loading = true;
getPriceList({
pageSize: page.value.limit,
pageIndex: page.value.curr,
dataResourceName: page.value.dataResourceName,
diseaseName: page.value.diseaseName,
}).then((res: any) => {
tableInfo.value.loading = false;
if (res.code == proxy.$passCode) {
const data = res.data || {};
tableInfo.value.data = data.records || [];
tableInfo.value.page.limit = data.pageSize
tableInfo.value.page.curr = data.pageIndex
tableInfo.value.page.rows = data.totalRows
} else {
proxy.$ElMessage.error(res.msg);
}
})
}
const tablePageChange = (info) => {
page.value.curr = Number(info.curr);
page.value.limit = Number(info.limit);
tableInfo.value.page.limit = page.value.limit;
tableInfo.value.page.curr = page.value.curr;
getTableData();
};
const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
currTableData.value = row;
if (type === 'edit') { // 编辑
router.push(
{
name: 'calculateConfig',
query: {
guid: row.guid,
name: row.modelName,
type: 'edit'
}
}
);
} else if (type === 'del') { // 删除
open('确定要删除该条数据吗?', 'warning');
}
};
const open = (msg, type, isBatch = false) => {
ElMessageBox.confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: type,
}).then(() => {
let guids = [currTableData.value.guid]
if (isBatch) {
guids = selectRowData.value
}
deletePrice(guids).then((res: any) => {
if (res.code == proxy.$passCode) {
getTableData();
ElMessage({
type: "success",
message: "删除成功",
});
} else {
proxy.$ElMessage.error(res.msg);
}
});
});
};
const addDisease = () => {
router.push(
{
name: 'calculateConfig',
query: {
type: 'create'
}
}
);
}
onBeforeMount(() => {
getDiseaseData();
getDataType('数据用途', 'dataUsage')
});
onActivated(() => {
if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
toSearch(null, true);
assetStore.set(false);
}
})
</script>
<template>
<div class="container_wrap">
<div class="table_tool_wrap">
<TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" />
<div class="tools_btns">
<el-button type="primary" @click="addDisease" v-preReClick>新增</el-button>
</div>
</div>
<div class="table_panel_wrap">
<Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" @tableBtnClick="tableBtnClick" />
</div>
</div>
</template>
<style lang="scss" scoped>
.table_tool_wrap {
width: 100%;
height: 84px !important;
padding: 0 8px;
.tools_btns {
padding: 0px 0 0;
}
}
.table_panel_wrap {
width: 100%;
height: calc(100% - 84px);
padding: 0px 8px 0;
}
</style>
<route lang="yaml">
name: priceConfig
</route>
<script lang="ts" setup name="priceConfig">
import { ref } from 'vue';
import TableTools from '@/components/Tools/table_tools.vue';
import { TableColumnWidth, commonPageConfig } from '@/utils/enum';
import { ElMessage, ElMessageBox } from "element-plus";
import { CirclePlus } from "@element-plus/icons-vue";
import { useRouter, useRoute } from "vue-router";
import useUserStore from "@/store/modules/user";
import useDataAssetStore from "@/store/modules/dataAsset";
import { getAllFlowData } from '@/api/modules/queryService';
import {
getConfigureList,
deleteConfigure,
getConfigureDetail,
addCopyConfigure
} from '@/api/modules/dataPricing';
const router = useRouter();
const userStore = useUserStore()
const assetStore = useDataAssetStore();
const userData = JSON.parse(userStore.userData)
const { proxy } = getCurrentInstance() as any;
const searchItemList = ref([
{
type: "input",
label: "",
field: "modelName",
default: "",
placeholder: "定价模型名称",
clearable: true,
},
{
type: "select",
label: "",
field: "institutionType",
placeholder: "机构类型",
default: "",
options: [],
clearable: true,
}
]);
const typeMap = ref({});
const tableData: any = ref([]);
const selectRowData: any = ref([])
const currTableData: any = ref({});
const page: any = ref({
...commonPageConfig,
modelName: '',
institutionType: ''
});
const tableInfo = ref({
id: 'api-data-table',
rowKey: 'guid',
loading: false,
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "定价模型名称", field: "modelName", width: 200 },
{
label: "机构类型", field: "institutionType", width: 120, getName: (scope) => {
return filterVal(scope.row.institutionType, 'institutionType')
}
},
{
label: "启用状态", field: "bizState", type: 'tag', width: 120, align: 'center', getName: (scope) => {
return scope.row.bizState == 'Y' ? '启用' : '停用';
}, tagType: (scope) => {
return scope.row.bizState == 'Y' ? 'success' : 'info';
}
},
{ label: "创建人", field: "createUserName", width: 120 },
{ label: "创建时间", field: "createTime", width: TableColumnWidth.DATETIME },
],
data: tableData.value,
page: {
type: "normal",
rows: 0,
...page.value,
},
actionInfo: {
label: "操作",
type: "btn",
isMore: false,
width: 160,
btns: [
{ label: "编辑", value: "edit" },
{ label: "复制", value: "copy" },
{ label: "删除", value: "del" }
]
}
});
// 过滤
const filterVal = (val, name) => {
if (typeMap.value[name]) {
const data = typeMap.value[name].find(item => item.value == val);
return data?.label || '--';
}
};
// 获取需求类型
const getDataType = (dictType, fieldName) => {
getAllFlowData({ dictType }).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || [];
typeMap.value[fieldName] = JSON.parse(JSON.stringify(data));
let item = searchItemList.value.find(item => item.field == fieldName);
item && (item.options = data);
} else {
proxy.$ElMessage.error(res.msg);
}
})
}
const toSearch = (val: any, clear: boolean = false) => {
page.value.curr = 1;
if (clear) {
searchItemList.value.map((item) => (item.default = ""));
page.value.modelName = '';
page.value.institutionType = '';
} else {
page.value.modelName = val.modelName || '';
page.value.institutionType = val.institutionType || '';
}
getTableData();
};
const getTableData = () => {
tableInfo.value.loading = true;
getConfigureList({
pageSize: page.value.limit,
pageIndex: page.value.curr,
modelName: page.value.modelName,
institutionType: page.value.institutionType,
}).then((res: any) => {
tableInfo.value.loading = false;
if (res.code == proxy.$passCode) {
const data = res.data || {};
tableInfo.value.data = data.records || []
tableInfo.value.page.limit = data.pageSize
tableInfo.value.page.curr = data.pageIndex
tableInfo.value.page.rows = data.totalRows
} else {
proxy.$ElMessage.error(res.msg);
}
})
}
const tablePageChange = (info) => {
page.value.curr = Number(info.curr);
page.value.limit = Number(info.limit);
tableInfo.value.page.limit = page.value.limit;
tableInfo.value.page.curr = page.value.curr;
getTableData();
};
const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
currTableData.value = row;
if (type === 'edit') { // 编辑
router.push(
{
name: 'priceModel',
query: {
guid: row.guid,
name: row.modelName,
type
}
}
);
} else if (type == 'copy') { //复制
ElMessageBox.confirm('是否确定复制该模型?', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: 'warning',
}).then(() => {
getConfigureDetail({ guid: row.guid }).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || {};
let params = { ...data };
delete params.createTime;
delete params.createUserName;
delete params.pricingDimensionalityRSVOS;
const pricingDimensionalityRSVOS = data.pricingDimensionalityRSVOS || [];
pricingDimensionalityRSVOS.map(p => {
p.pricingTargetRQVOS = p.pricingTargetRSVOS || [];
delete p.pricingTargetRSVOS;
});
params.pricingDimensionalityRQVOS = pricingDimensionalityRSVOS;
addCopyConfigure(params).then((res: any) => {
if (res.code == proxy.$passCode) {
ElMessage({
type: "success",
message: "复制定价配置成功",
});
getTableData();
} else {
proxy.$ElMessage.error(res.msg);
}
}).catch(() => {
});
}
}).catch(() => {
})
});
} else if (type === 'del') { // 删除
open('确定要删除该条数据吗?', 'warning');
}
};
const open = (msg, type, isBatch = false) => {
ElMessageBox.confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: type,
}).then(() => {
let guids = [currTableData.value.guid]
if (isBatch) {
guids = selectRowData.value
}
deleteConfigure(guids).then((res: any) => {
if (res.code == proxy.$passCode) {
getTableData();
ElMessage({
type: "success",
message: "删除成功",
});
} else {
proxy.$ElMessage.error(res.msg);
}
});
});
};
const addDisease = () => {
router.push(
{
name: 'priceModel',
query: {
type: 'create'
}
}
);
}
onBeforeMount(() => {
getDataType('机构类型', 'institutionType')
});
onActivated(() => {
if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
toSearch(null, true);
assetStore.set(false);
}
})
</script>
<template>
<div class="container_wrap">
<div class="table_tool_wrap">
<TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" />
<div class="tools_btns">
<el-button type="primary" @click="addDisease" v-preReClick>新增</el-button>
</div>
</div>
<div class="table_panel_wrap">
<Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" @tableBtnClick="tableBtnClick" />
</div>
</div>
</template>
<style lang="scss" scoped>
.table_tool_wrap {
width: 100%;
height: 84px !important;
padding: 0 8px;
.tools_btns {
padding: 0px 0 0;
}
}
.table_panel_wrap {
width: 100%;
height: calc(100% - 84px);
padding: 0px 8px 0;
}
</style>
......@@ -25,12 +25,13 @@ import {
getDatabase,
getRuleTypeList
} from '@/api/modules/dataQuality';
import { getDamCatalogList } from '@/api/modules/dataPricing';
import useDataQualityStore from "@/store/modules/dataQuality";
import { useValidator } from '@/hooks/useValidator';
import { TableColumnWidth } from '@/utils/enum';
const dataQualityStore = useDataQualityStore();
const userData = JSON.parse(localStorage.userData);
const { proxy } = getCurrentInstance() as any;
const { orderNum, description } = useValidator();
......@@ -39,6 +40,8 @@ const cacheStore = useCatchStore();
/** 可选择的质量规则列表。 */
const ruleTypeList: any = ref([]);
const productList: any = ref([]);
/** 质量规则集表对象。 */
const qualityModelTreeRef = ref();
/** 树选中不同层级的,代表的类型, model, group, table */
......@@ -281,7 +284,22 @@ const formItems: any = ref([
default: '',
maxlength: 6,
required: true
}, {
},
{
label: '数据产品',
type: 'select',
field: 'damGuid',
default: '',
placeholder: '请选择',
options: productList.value,
props: {
value: 'guid',
label: 'damName'
},
clearable: true,
filterable: true
},
{
label: '描述',
type: 'textarea',
placeholder: '请输入',
......@@ -929,6 +947,17 @@ onActivated(async () => {
}
})
// 获取数据产品列表
const getProducts = () => {
getDamCatalogList({ dataType: userData.superTubeFlag == 'Y' ? "P" : "D", sceneType: "Z" }).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || [];
productList.value = data;
formItems.value.at(-2).options = data;
}
})
}
onBeforeMount(() => {
getQualityGroupTreeData();
getGroupTableData();
......@@ -945,6 +974,7 @@ onBeforeMount(() => {
ElMessage.error(res.msg);
}
})
getProducts();
})
</script>
......
......@@ -18,7 +18,7 @@ import {
getImportData,
exportDictionary,
exportCollectTask,
// getImageContent
exportTemplate
} from '@/api/modules/queryService';
import {
parseAndDecodeUrl,
......@@ -29,6 +29,7 @@ import {
getDictionaryTree
} from '@/api/modules/dataInventory';
import { commonPageConfig } from '@/utils/enum';
import { getDemandTreeList, getDiseaseAll } from '@/api/modules/dataPricing';
const { proxy } = getCurrentInstance() as any;
......@@ -156,6 +157,29 @@ const getDictList = () => {
})
}
// 获取需求表树形数据
const getTreeData = () => {
if (isfileImport == '7') {
getDemandTreeList({ pageIndex: 1, pageSize: 100000, isCatalog: 'N' }).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data?.records || [];
dictionaryList.value = data;
} else {
proxy.$ElMessage.error(res.msg);
}
})
} else {
getDiseaseAll().then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || [];
dictionaryList.value = data;
} else {
proxy.$ElMessage.error(res.msg);
}
})
}
}
const tabsChange = (name) => {
tabsActiveName.value = name
let info: any = {
......@@ -283,11 +307,16 @@ const batching = (type) => {
}
open("此操作将永久删除, 是否继续?", "warning", true);
} else if (type === 'importFile') {
if (isfileImport == '2' || isfileImport == '4') {
if (isfileImport == '2' || isfileImport == '4' || isfileImport == '7' || isfileImport == '8') {
dialogInfo.value.header.title = '导入数据'
dialogInfo.value.type = 'upload'
dialogInfo.value.size = isfileImport == '4' ? 600 : 500;
uploadFiles.value = []
if (isfileImport == '7') {
uploadSteps.value[0].selectInfo.options = dictionaryList.value;
} else if (isfileImport == '8') {
uploadSteps.value[0].cascaderInfo.options = dictionaryList.value;
}
uploadInfo.value.uploadInfo.steps = uploadSteps.value
const content: any = [uploadInfo.value]
dialogInfo.value.contents = content
......@@ -377,6 +406,20 @@ const exportData = (ids: any = null) => {
res?.msg && ElMessage.error(res?.msg);
}
});
} else if (tabsActiveName.value == 'importFile' && isfileImport == '7') {
exportTemplate({
bizGuid: '',
importType: "0046"
}).then((res: any) => {
download(res, '需求表管理导入模板.xlsx', 'excel')
});
} else if (tabsActiveName.value == 'importFile' && isfileImport == '8') {
exportTemplate({
bizGuid: '',
importType: "0047"
}).then((res: any) => {
download(res, '疾病管理导入模板.xlsx', 'excel')
});
}
}
......@@ -390,11 +433,11 @@ const importData = (info) => {
// dialogInfo.value.footer.btns.map((item: any) => delete item.disabled)
return
}
uploadFiles.value.forEach((item: any, index: number) => {
params.append("file", item.raw);
});
let paramUrl = '';
if (isfileImport == '2') {
uploadFiles.value.forEach((item: any, index: number) => {
params.append("file", item.raw);
});
paramUrl = `ms-daop-zcgl-asset-dam-service/dam-catalog-table/excel-by-subject-guid?staffGuid=${userData.staffGuid}&subjectGuid=${route.query.bizGuid}`
} else if (isfileImport == '4') {
if (!info.databaseNameZh) {
......@@ -411,14 +454,17 @@ const importData = (info) => {
})
return;
}
uploadFiles.value.forEach((item: any, index: number) => {
params.append("uploadFile", item.raw);
});
paramUrl = `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/meta-collect-import?staffGuid=${userData.staffGuid}&databaseNameZh=${info.databaseNameZh}&databaseNameEn=${info.databaseNameEn}&isCover=${info.isCover}`
} else if (isfileImport == '7') {
info.bizGuid = '0046';
paramUrl = `${import.meta.env.VITE_APP_ADD_FILE}/import-data/import-common?importType=${importType.value}&staffGuid=${userData.staffGuid}&tenantGuid=${userData.tenantGuid}`
paramUrl += `&extendFields=${encodeURIComponent(JSON.stringify(info))}`
} else if (isfileImport == '8') {
info.bizGuid = '0047';
paramUrl = `${import.meta.env.VITE_APP_ADD_FILE}/import-data/import-common?importType=${importType.value}&staffGuid=${userData.staffGuid}&tenantGuid=${userData.tenantGuid}`
paramUrl += `&extendFields=${encodeURIComponent(JSON.stringify(info))}`
} else {
uploadFiles.value.forEach((item: any, index: number) => {
params.append("file", item.raw);
});
paramUrl = `${import.meta.env.VITE_APP_ADD_FILE}/import-data/import-common?importType=${importType.value}&staffGuid=${userData.staffGuid}&tenantGuid=${userData.tenantGuid}&dataType=2`
if (info && Object.keys(info).length) {
paramUrl += `&extendFields=${encodeURIComponent(JSON.stringify(info))}`
......@@ -452,6 +498,10 @@ const dialogBtnClick = (btn, info) => {
if (dialogInfo.value.type == 'upload') {
if (tabsActiveName.value == 'dictionary') {
importData({ bizGuid: dictionaryGuid.value })
} else if (tabsActiveName.value == 'importFile' && isfileImport == '7') {
importData(info)
} else if (tabsActiveName.value == 'importFile' && isfileImport == '8') {
importData(info)
} else {
importData(info)
}
......@@ -478,6 +528,10 @@ const setUploadInfo = () => {
importType.value = '0034';
} else if (isfileImport == '4') {
importType.value = '0042';
} else if (isfileImport == '7') {
importType.value = '0046';
} else if (isfileImport == '8') {
importType.value = '0047';
} else {
importType.value = '0033';
}
......@@ -641,6 +695,94 @@ const setUploadInfo = () => {
}
]
uploadInfo.value.uploadInfo.extraParams = { isCover: 'Y' }
} else if (tabsActiveName.value == 'importFile' && isfileImport == '7') {
uploadSteps.value = [
{
title: '1、导入前请先录入以下内容',
type: 'select',
selectInfo: {
label: '需求表名称',
placeholder: '请选择',
field: 'menuGuid',
default: '',
options: [],
props: {
label: "menuName",
value: "guid",
},
filterable: true,
clearable: true,
required: true,
style: {
width: '191px',
}
}
},
{
title: '2、请下载最新的模板,并按照模板格式准备需要导入的数据',
type: 'btn_down'
},
{
title: '3、选择准备好的文件导入',
type: 'btn_upload',
uploadInfo: {
action: '',
auto: false,
cover: true,
fileList: [],
accept: '.xlsx, .xls',
tips: '当前支持xls、xlsx文件,默认使用第一个sheet'
}
}
]
dictionaryGuid.value = uploadSetting.value?.dictionaryGuid || ''
uploadInfo.value.uploadInfo.extraParams = {
menuGuid: dictionaryGuid.value
}
} else if (tabsActiveName.value == 'importFile' && isfileImport == '8') {
uploadSteps.value = [
{
title: '1、导入前请先录入以下内容',
type: 'cascader',
cascaderInfo: {
label: '疾病名称',
placeholder: '',
field: 'parentGuid',
options: [],
default: '',
showAllLevels: false,
props: {
checkStrictly: true,
label: "diseaseName",
value: "guid",
children: 'childList',
emitPath: false
},
filterable: true,
clearable: true,
}
},
{
title: '2、请下载最新的模板,并按照模板格式准备需要导入的数据',
type: 'btn_down'
},
{
title: '3、选择准备好的文件导入',
type: 'btn_upload',
uploadInfo: {
action: '',
auto: false,
cover: true,
fileList: [],
accept: '.xlsx, .xls',
tips: '当前支持xls、xlsx文件,默认使用第一个sheet'
}
}
]
dictionaryGuid.value = uploadSetting.value?.dictionaryGuid || ''
uploadInfo.value.uploadInfo.extraParams = {
parentGuid: dictionaryGuid.value
}
} else {
uploadSteps.value = [
{
......@@ -674,7 +816,8 @@ onActivated(() => {
if (tabsActiveName.value == 'dictionary') {
getDictList();
}
setUploadInfo()
setUploadInfo();
(isfileImport == '7' || isfileImport == '8') && getTreeData();
})
</script>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!