ec743969 by xukangle

fix : 修改分类分级

1 parent 3f73d0f0
......@@ -4,7 +4,7 @@ import router from '@/router'
import { ElMessage } from 'element-plus'
import apiUser from '@/api/modules/user'
import { getCurrentTime } from '@/utils/common'
import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface } from '@/api/modules/queryService'
import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface, getCurrentUserInfo } from '@/api/modules/queryService'
const useUserStore = defineStore(
// 唯一ID
......@@ -56,6 +56,14 @@ const useUserStore = defineStore(
currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : '';
localStorage.setItem('currentTenantGuid', currentTenantGuid.value);
let currentTenant = res.data.tenantInfoList?.[0];
getCurrentUserInfo(currentTenantGuid.value).then((res: any) => {
console.log(res, 'getCurrentUserInfo');
if (res.code == '00000') {
localStorage.setItem('userData', JSON.stringify(res.data));
} else {
ElMessage.error(res.msg)
}
})
return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => {
if (info.code == '00000') {
localStorage.setItem('userName', currentTenant?.name)
......
......@@ -492,18 +492,17 @@ const importTableEditIndex: any = ref(null);
const addAssetTable = () => {
importTableFieldVisible.value = true;
}
const stuffInfo = ref<any>({});
onBeforeMount(() => {
const currentTenantGuid = localStorage.getItem('currentTenantGuid');
getCurrentUserInfo(currentTenantGuid).then((res: any) => {
console.log(res, 'getCurrentUserInfo');
if (res.code == '00000') {
localStorage.setItem('userData', JSON.stringify(res.data));
stuffInfo.value = res.data;
} else {
ElMessage.error(res.msg)
}
})
// const currentTenantGuid = localStorage.getItem('currentTenantGuid');
// getCurrentUserInfo(currentTenantGuid).then((res: any) => {
// console.log(res, 'getCurrentUserInfo');
// if (res.code == '00000') {
// localStorage.setItem('userData', JSON.stringify(res.data));
// } else {
// ElMessage.error(res.msg)
// }
// })
getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => {
if (res?.code == proxy.$passCode) {
parentAreaData.value = res.data ?? [];
......@@ -662,10 +661,6 @@ const save = () => {
});
} else {
params.damCatalogTableInfo = assetDataTableInfo.value.data;
params.damCatalogTableInfo = {
...assetDataTableInfo.value.data,
stuffGuid: stuffInfo.value.staffGuid
};
fullscreenLoading.value = true;
registerCatalogSave(params).then((res: any) => {
fullscreenLoading.value = false;
......
......@@ -26,7 +26,13 @@ const assetStore = useDataAssetStore();
const router = useRouter();
const { proxy } = getCurrentInstance() as any;
const damTypes: any = ref([]);
const dataSources: any = ref([]);
const subjectDomainListData: any = ref([])
// 登记状态 Y 已登记 N 未登记
const isRegisterOptions = ref<any>([
{ label: "已登记", value: "Y" },
{ label: "未登记", value: "N" },
])
const searchItemList = ref([
{
type: "input",
......@@ -73,23 +79,37 @@ const searchItemList = ref([
showCheckbox: true
},
{
type: "input",
type: "select",
label: "",
field: "damName",
field: "dataSources",
default: "",
placeholder: "来源",
placeholder: "数据来源",
clearable: true,
filterable: true,
options: dataSources.value,
props: {
value: 'value',
label: 'label'
}
},
{
type: "input",
type: "select",
label: "",
field: "damName",
field: "isRegister",
default: "",
placeholder: "登记状态",
clearable: true,
filterable: true,
options: isRegisterOptions.value,
props: {
value: 'value',
label: 'label'
}
},
]);
const pageInfo = ref({
...commonPageConfig,
rows: 0,
......@@ -218,6 +238,18 @@ onActivated(() => {
onBeforeMount(() => {
getDamTypesList({
dictType: "数据来源",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
dataSources.value = res.data || [];
let item = searchItemList.value.find(item => item.field == 'dataSources');
item && (item.options = dataSources.value);
} else {
proxy.$ElMessage.error(res.msg);
}
})
getDamTypesList({
dictType: "资产类型",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
......@@ -284,6 +316,8 @@ const handleCreate = () => {
<div class="type-btn">
<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 == '1' ? '自建' : '加工交付' }}</div>
</div>
<div class="desc">{{ item.propertyDescription }}</div>
<el-popover v-model="cardBtnVisible" placement="bottom" width="96" trigger="click"
......
......@@ -146,7 +146,7 @@ const orginItems = [
{
label: '字典中文名',
type: 'input',
maxlength: 50,
maxlength: 20,
placeholder: '请输入',
field: 'chName',
clearable: true,
......@@ -155,7 +155,7 @@ const orginItems = [
}, {
label: '字典英文名',
type: 'input',
maxlength: 50,
maxlength: 20,
placeholder: '请输入',
field: 'enName',
clearable: true,
......
......@@ -7,7 +7,7 @@ import Moment from 'moment';
import {
getDsTableByDs,
getDsData,
getDsTableStructure,
getDsTableStructures,
} from "@/api/modules/dataInventory";
......@@ -199,14 +199,14 @@ const getTableStructure = () => {
console.log('tableName');
currDsTableStructureLoading.value = true;
currDsTableStructure.value = [];
getDsTableStructure({
getDsTableStructures([{
// tableName: tableName,
// dataSourceGuid: databaseInfo.value.guid,
// database: databaseInfo.value.databaseNameEn,
// databaseType: databaseInfo.value.databaseType,
tableGuid: currDatasourceSelect.value.tableGuid,
execGuid: props.execGuid
}).then((res: any) => {
}]).then((res: any) => {
currDsTableStructureLoading.value = false;
if (res.code == proxy.$passCode) {
currDsTableStructure.value = res.data || [];
......@@ -438,6 +438,21 @@ const getTextAlign = (field) => {
<el-table-column prop="fieldName" label="字段英文名" width="150px" align="left" header-align="left"
show-overflow-tooltip>
</el-table-column>
<!-- 分类 -->
<el-table-column prop="classifyDetailNameRoutes" label="分类" width="150px" align="left" header-align="left"
show-overflow-tooltip>
<template #default="scope">
{{ scope.row['classifyDetailNameRoutes'] ? scope.row['classifyDetailNameRoutes'].join('/') : '--' }}
</template>
</el-table-column>
<el-table-column prop="gradeDetailName" label="分级" width="80px" align="left" header-align="left"
show-overflow-tooltip>
<template #default="scope">
<span>{{ scope.row['gradeDetailName'] ?? '--' }}</span>
</template>
</el-table-column>
<el-table-column prop="fieldChName" label="字段名" width="150px" align="left" header-align="left"
show-overflow-tooltip>
<template #default="scope">
......@@ -472,9 +487,9 @@ const getTextAlign = (field) => {
<span>{{ scope.row['isPrimary'] ?? '--' }}</span>
</template>
</el-table-column>
<el-table-column prop="isNotNull" label="是否必填" width="100px" align="left" header-align="left"
<el-table-column prop="notNull" label="是否必填" width="100px" align="left" header-align="left"
show-overflow-tooltip>
<template #default="scope">{{ scope.row['isNotNull'] === 'Y' ? 'N' : 'Y' }}</template>
<template #default="scope">{{ scope.row['notNull'] ?? '--' }}</template>
</el-table-column>
<el-table-column prop="isFk" label="是否外键" width="100px" align="left" header-align="left"
show-overflow-tooltip>
......
......@@ -1459,7 +1459,7 @@ const saveTable = async () => {
gradeDetailName: item.gradeDetailName,
guid: item.guid,
isFk: item.isFk,
notNull: item.isNotNull,
notNull: item.notNull,
isPrimary: item.isPrimary,
sortValue: item.sortValue,
tableChName: addInfo.chName,
......@@ -1584,7 +1584,7 @@ const saveDraftTable = async () => {
gradeDetailName: item.gradeDetailName,
guid: item.guid,
isFk: item.isFk,
isNotNull: item.isNotNull,
isNotNull: item.notNull,
isPrimary: item.isPrimary,
sortValue: item.sortValue,
tableChName: addInfo.chName,
......
......@@ -16,6 +16,9 @@ import TableTools from "@/components/Tools/table_tools.vue";
import Table from "@/components/Table/index.vue";
import Dialog from "@/components/Dialog/index.vue";
import { getDamTypesList } from "@/api/modules/dataAsset";
import {
changeNum,
} from "@/utils/common";
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
......@@ -226,6 +229,17 @@ const toPatn = (type) => {
});
}
}
const toPatn1 = (type, type1) => {
if (type == 'add') {
router.push({
name: "productListingDetail",
query: {
type,
type1
},
});
}
}
const tablePageChange = (info) => {
page.value.curr = Number(info.curr);
......@@ -298,6 +312,16 @@ onBeforeMount(() => {
})
})
const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href
const demandListData: any = ref([
{ companyName: '北数所', listedNum: 16, processNum: 1235 },
{ companyName: '深数所', listedNum: 16, processNum: 1235 },
{ companyName: '苏数所', listedNum: 16, processNum: 1235 },
]);
const btnClick = (btn) => {
}
</script>
<template>
......@@ -306,6 +330,32 @@ onBeforeMount(() => {
<TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" />
<div class="tools_btns">
<el-button type="primary" @click="toPatn('add')" v-preReClick>新建</el-button>
<el-button type="primary" @click="toPatn1('add', 'add1')" v-preReClick>新建</el-button>
</div>
</div>
<div class="list-content">
<div class="card-content" v-for="item in demandListData" :key="item.guid">
<div class="header">
<img class="left-img" :src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo"
alt="" />
<div class="right-main">
<div class="title">{{ item.companyName ?? '--' }}</div>
<div class="count-group">
<div class="count-item">
<div class="item-label">已上架产品数</div>
<div class="item-num">{{ changeNum(item.listedNum) }}</div>
</div>
<div class="count-item">
<div class="item-label">审批中产品数</div>
<div class="item-num">{{ changeNum(item.processNum) }}</div>
</div>
</div>
</div>
</div>
<div class="operator-btn">
<div class="left-btn borderRight" @click="btnClick(item)">更新模板</div>
<div class="left-btn" @click="btnClick(item)">资产登记</div>
</div>
</div>
</div>
<div class="table_panel_wrap">
......@@ -328,7 +378,87 @@ onBeforeMount(() => {
.table_panel_wrap {
width: 100%;
height: calc(100% - 84px);
height: calc(100% - 270px);
padding: 0px 8px 0;
}
.list-content {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
margin-bottom: 8px;
padding: 0 8px;
.card-content {
width: calc(33.33% - 10px);
padding: 16px;
box-shadow: 0 0 0 1px #d9d9d9;
.header {
display: flex;
margin-bottom: 16px;
img {
width: 80px;
margin-right: 16px;
}
.title {
font-size: 16px;
color: #212121;
font-weight: 600;
margin-bottom: 8px;
}
.right-main {
width: calc(100% - 96px);
display: flex;
flex-direction: column;
justify-content: space-between;
.count-group {
display: flex;
justify-content: space-between;
.item-num {
font-size: 20px;
font-weight: 600;
color: #212121;
margin-top: 8px;
}
}
}
}
.operator-btn {
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 0 0 1px #d9d9d9;
position: relative;
&::after {
content: '';
width: 0;
height: 100%;
border-left: 1px solid #d9d9d9;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
>.left-btn {
width: 50%;
height: 40px;
line-height: 40px;
text-align: center;
cursor: pointer;
&:hover {
color: #4fa1a4;
}
}
}
}
}
</style>
......
......@@ -167,6 +167,17 @@ const formInfo = ref({
required: true,
},
{
label: '证书编号',
type: 'input',
maxlength: 50,
placeholder: '请输入',
field: 'damCode',
default: '',
disabled: true,
required: true,
visible: true
},
{
label: "数据时间范围",
type: "date-picker",
field: "dateRange",
......@@ -194,16 +205,7 @@ const formInfo = ref({
// default: '',
// required: true
// },
// {
// label: '证书编号',
// type: 'input',
// maxlength: 50,
// placeholder: '请输入',
// field: 'damCode',
// default: '',
// disabled: true,
// required: true,
// },
{
label: '数据规模(条)',
type: 'input',
......@@ -360,25 +362,26 @@ const formInfo = ref({
// clearable: false,
// required: true,
// },
// {
// label: "上架交易所",
// type: "select",
// placeholder: "请选择",
// field: "exchangeGuids",
// default: [],
// options: exchangeList.value,
// props: {
// value: "guid",
// label: "tenantName",
// },
// filterable: true,
// clearable: true,
// multiple: true,
// tagsTooltip: true,
// collapse: true,
// disabled: false,
// required: true,
// },
{
label: "上架交易所",
type: "select",
placeholder: "请选择",
field: "exchangeGuids",
default: [],
options: exchangeList.value,
props: {
value: "guid",
label: "tenantName",
},
filterable: true,
clearable: true,
multiple: true,
tagsTooltip: true,
collapse: true,
disabled: false,
required: true,
visible: true
},
{
label: '产品描述',
type: 'textarea-rich',
......@@ -411,9 +414,125 @@ const formInfo = ref({
field: 'productImg',
default: [],
limit: 1,
block: true,
block: false,
required: false,
}, {
},
{
label: '登记证',
tip: '支持扩展名:.jpg .png .jpeg',
accept: '.jpg, .png, .jpeg ',
type: 'upload-file',
placeholder: '请选择',
field: 'registerImg',
default: [],
limit: 1,
block: false,
required: false,
visible: true
},
{
label: '质量评估报告',
tip: '支持扩展名:.png .pdf',
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'qualityReport',
default: [],
limit: 1,
block: false,
required: false,
visible: true
},
{
label: "质量评估机构",
type: "select",
placeholder: "请选择",
field: "qualityOrg",
default: '',
options: [],
props: {
value: 'value',
label: 'label'
},
filterable: true,
clearable: true,
disabled: false,
required: true,
visible: true
},
{
label: '价值评估报告',
tip: '支持扩展名:.png .pdf',
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'valueReport',
default: [],
limit: 1,
block: false,
required: false,
visible: true
},
{
label: "价值评估机构",
type: "select",
placeholder: "请选择",
field: "valueOrg",
default: '',
options: [],
props: {
value: 'value',
label: 'label'
},
filterable: true,
clearable: true,
disabled: false,
required: true,
visible: true
},
{
label: '承诺函',
tip: '支持扩展名:.png .pdf',
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'commitment',
templateUrl: 'http://www.baidu.com',
default: [],
limit: 1,
block: true,
required: true,
visible: true
},
{
label: '授权文件',
tip: '支持扩展名:.png .pdf',
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'authorization',
templateUrl: 'http://www.baidu.com',
default: [],
limit: 1,
block: true,
required: true,
visible: true
},
{
label: '商品详细介绍(签章版)',
tip: '支持扩展名:.png .pdf',
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'productDetail',
templateUrl: 'http://www.baidu.com',
default: [],
limit: 1,
block: true,
required: true,
visible: true
},
{
label: "",
type: "input",
placeholder: "请输入",
......@@ -996,6 +1115,14 @@ onActivated(() => {
};
})
onBeforeMount(() => {
if (route.query.type == 'add' && !route.query.type1) {
formInfo.value.items.forEach(item => {
if (item.field == 'damCode' || item.field == 'exchangeGuids' || item.field == 'registerImg' || item.field == 'qualityReport' || item.field == 'qualityOrg' || item.field == 'valueReport' || item.field == 'valueOrg' || item.field == 'commitment' || item.field == 'authorization' || item.field == 'productDetail') {
item.visible = false;
}
})
}
getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => {
if (res?.code == proxy.$passCode) {
parentAreaData.value = res.data ?? [];
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!