dafaf23e by xukangle

update:数据产品上架

1 parent 52a24a57
......@@ -73,6 +73,9 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service
#新门户接口
VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service
# 附件模板
VITE_APP_ATTACHMENT_TEMPLATE = ms-daop-personel-service
#人员服务
VITE_APP_PERSONAL_URL = 'ms-daop-personel-service'
......
......@@ -97,6 +97,9 @@ VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
#新门户接口
VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service
# 附件模板
VITE_APP_ATTACHMENT_TEMPLATE = ms-daop-personel-service
#人员服务
VITE_APP_PERSONAL_URL = 'ms-daop-personel-service'
#数据资产接口地址
......
import { ElMessage } from 'element-plus'
import { getDownloadUrl, download } from "@/utils/common";
import { getImageContent } from "@/api/modules/queryService";
import { getDownFileSignByUrl, obsDownloadRequest, parseAndDecodeUrl } from './obsService';
export const onUploadFilePreview = (file) => {
let url = file.url;
getImageContent(url).then((res: any) => {
// export const onUploadFilePreview = (file) => {
// let url = file.url;
// getImageContent(url).then((res: any) => {
// if (res && !res.msg) {
// let name = file.name;
// var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : '';
// if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览
// let fileUrl = <string>getDownloadUrl(res, name, fileSuffix);
// let win = window.open(fileUrl, name);
// win && (win.document.title = name);
// } else {
// download(res, name, fileSuffix);
// }
// } else {
// res?.msg && ElMessage.error(res?.msg);
// }
// })
// }
// export const onUploadFileDownload = (file) => {
// let url = file.url;
// getImageContent(url).then((res: any) => {
// if (res && !res.msg) {
// let name = file.name;
// var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
// download(res, name, fileSuffix);
// } else {
// res?.msg && ElMessage.error(res?.msg);
// }
// })
// }
export const onUploadFileDownload = async (params) => {
const {name, url} = params;
const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
}
obsDownloadRequest(refSignInfo?.data).then((res: any) => {
if (res && !res.msg) {
let name = file.name;
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : '';
if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览
let fileUrl = <string>getDownloadUrl(res, name, fileSuffix);
let win = window.open(fileUrl, name);
win && (win.document.title = name);
} else {
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
download(res, name, fileSuffix);
}
} else {
res?.msg && ElMessage.error(res?.msg);
}
})
}
export const onUploadFileDownload = (file) => {
let url = file.url;
getImageContent(url).then((res: any) => {
export const onUploadFilePreview = async (params) => {
console.log(params, 'params');
const {name, url} = params;
// let f = formInline.value[item.field].find(i => i.name == file.name);
// let url = f.url;
let fileName: string = parseAndDecodeUrl(url).fileName;
const refSignInfo: any = await getDownFileSignByUrl(fileName);
if (!refSignInfo?.data) {
refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
return;
}
obsDownloadRequest(refSignInfo?.data).then((res: any) => {
if (res && !res.msg) {
let name = file.name;
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : '';
if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览
let fileUrl = <string>getDownloadUrl(res, name, fileSuffix);
let win = window.open(fileUrl, name);
win && (win.document.title = name);
} else {
download(res, name, fileSuffix);
}
} else {
res?.msg && ElMessage.error(res?.msg);
}
})
});
}
......
......@@ -186,6 +186,12 @@ export const getProductTypeList = () => request({
method: 'post',
data: { paramCode: "PRODUCT_TYPE" }
})
/**获取模板附件 */
export const getTemplateFile = (params) => request({
url: `${import.meta.env.VITE_APP_ATTACHMENT_TEMPLATE}/attachment-template/list-attachment?tenantGuid=${params.tenantGuid}`,
method: 'get',
})
// 数据要素乘
export const dataElements = [{
......@@ -239,6 +245,9 @@ export const filterVal = (val, type) => {
case 'Y':
approval = '已通过';
break;
case 'N':
approval = '草稿中';
break;
case 'F':
approval = '通过并结束';
break;
......@@ -252,3 +261,4 @@ export const filterVal = (val, type) => {
return approval;
}
}
......
......@@ -9,6 +9,8 @@ import {
} from "@/api/modules/dataAsset";
import { pinyin } from 'pinyin-pro';
import useUserStore from "@/store/modules/user";
import { getDictionaryTree } from '@/api/modules/dataInventory';
import { pa } from 'element-plus/es/locale';
const emits = defineEmits([
"cancelImport",
......@@ -92,16 +94,36 @@ const getFieldTypeList = () => {
}
const getParamsListData = () => {
getParamsList({
dictType: "业务归属"
}).then((res: any) => {
const params = {
paramCode: '数据字典类型'
}
getDictionaryTree(params).then((res: any) => {
paramsList.value = [];
if (res.code == proxy.$passCode) {
paramsList.value = res.data || [];
res.data.forEach((item: any) => {
if (item.children) {
item.children.forEach((child: any) => {
paramsList.value.push({
label: child.name,
value: child.guid
})
})
}
})
} else {
proxy.$ElMessage.error(res.msg);
}
})
// getParamsList({
// dictType: "业务归属"
// }).then((res: any) => {
// paramsList.value = [];
// if (res.code == proxy.$passCode) {
// paramsList.value = res.data || [];
// } else {
// proxy.$ElMessage.error(res.msg);
// }
// })
}
const changeStep = (val) => {
......
......@@ -129,7 +129,7 @@ const baseInfoFormItems = ref([
visible: true
},
{
label: '权主体',
label: '权主体',
type: 'input',
placeholder: '请输入',
field: 'rightMain',
......@@ -296,6 +296,7 @@ const baseInfoFormRules = ref({
propertyDescription: [required('请填写资源描述')],
sceneDescription: [required('请填写应用场景描述')],
sceneLimit: [required('请填写应用场景限制')],
rightMain: [required('请填写权利主体')],
});
const getTableFieldPromise: any = ref({});
......
......@@ -317,7 +317,7 @@ const handleCreate = () => {
<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 class="type">{{ item.foundMode ? (item.foundMode === '1' ? '自建' : '加工交付') : '--' }}</div>
</div>
<div class="desc">{{ item.propertyDescription }}</div>
<el-popover v-model="cardBtnVisible" placement="bottom" width="96" trigger="click"
......
......@@ -31,7 +31,8 @@ import {
exportDictionaryFileds,
checkDeleteDictionary,
checkDeleteDictionaryScheme,
checkDictionaryData
checkDictionaryData,
getNewDataTypeList
} from '@/api/modules/dataInventory';
const { proxy } = getCurrentInstance() as any;
......@@ -353,6 +354,10 @@ const editTableInfo = ref({
field: 'fieldType',
default: '',
options: [],
props: {
label: 'label',
value: 'value'
},
clearable: true,
required: true
},
......@@ -603,21 +608,14 @@ const setFormItems = (row: any = null) => {
}
// 获取数据类型列表
const getDataType = (type) => {
const getDataType = () => {
let params = {
paramCode: type
dictType: "字段类型"
}
getParamsList(params).then((res: any) => {
getNewDataTypeList(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data
if (type == 'DATA_TYPE') {
data.map(item => {
item.label = item.paramName
item.value = item.paramValue
})
dataTypeList.value = data
editTableInfo.value['fieldType'].options = data
}
} else {
ElMessage({
type: 'error',
......@@ -1751,7 +1749,7 @@ onActivated(() => {
})
onBeforeMount(() => {
getDataType('DATA_TYPE')
getDataType()
getTreeData()
})
......
......@@ -83,8 +83,8 @@ const tableInfo = ref({
}
},
{
label: '上架状态', field: 'listingStatus', type: 'switch', activeValue: 'Y', inactiveValue: 'N', switchWidth: 28, width: 100, align: 'center', isDisabled: (scope) => {
return scope.row.approveState != 'Y';
label: '上架状态', field: 'listingStatus', width: 100, getName: (scope) => {
return scope.row.listingStatus == 'Y' ? '已上架' : '未上架';
}
},
{ label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
......@@ -263,11 +263,26 @@ const tableBtnClick = (scope, btn) => {
name: 'productListingDetail',
query: {
guid: row.guid,
type: 'detail'
type: 'detail',
name: row.damName,
exchangeGuid: row.exchangeGuid ? row.exchangeGuid : ''
}
});
}
if (type == "edit" || type == "redit") {
if (row.exchangeGuid) {
router.push({
name: 'productListingDetail',
query: {
guid: row.guid,
exchangeName: row.exchangeName,
type: type == 'edit' ? 'edit' : 'redit',
case: '1',
name: row.damName,
exchangeGuid: row.exchangeGuid
}
})
} else {
router.push({
name: 'productListingDetail',
query: {
......@@ -278,6 +293,7 @@ const tableBtnClick = (scope, btn) => {
}
});
}
}
if (type == 'del') {
ElMessageBox.confirm(`数据删除后不可恢复,确定是否删除?`, "提示", {
confirmButtonText: "确定",
......@@ -496,21 +512,27 @@ 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 = (item) => {
console.log(item)
if (item.exchangeGuid) {
router.push({
name: "productListingDetail",
query: {
exchangeGuid: item.exchangeGuid,
exchangeName: item.exchangeName,
type: 'add',
groundingPick: '登记得数交所',
},
});
} else {
router.push({
name: "productListingDetail",
query: {
type: 'add',
case: '2',
},
});
}
}
......@@ -520,10 +542,10 @@ const btnClick = (item) => {
<div class="container_wrap">
<div class="table_tool_wrap">
<TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" />
<div class="tools_btns">
<!-- <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>
<div class="list-content">
<div class="card-content" v-for="item in demandListData" :key="item.guid">
......@@ -544,9 +566,9 @@ const btnClick = (item) => {
</div>
</div>
</div>
<div class="operator-btn">
<div class="operator-btn" @click="btnClick(item)">
<!-- <div class="left-btn borderRight" @click="btnClick(item)">更新模板</div> -->
<div class="left-btn" @click="btnClick(item)">资产登记</div>
<div class="left-btn">资产登记</div>
</div>
</div>
</div>
......@@ -571,7 +593,7 @@ const btnClick = (item) => {
<style scoped lang="scss">
.table_tool_wrap {
width: 100%;
height: 84px !important;
height: 50px !important;
padding: 0 8px;
.tools_btns {
......@@ -644,6 +666,8 @@ const btnClick = (item) => {
width: 100%;
height: 40px;
line-height: 40px;
background: #4fa1a4;
color: #fff;
cursor: pointer;
// &::after {
// content: '';
......@@ -662,9 +686,9 @@ const btnClick = (item) => {
// text-align: center;
// cursor: pointer;
&:hover {
color: #4fa1a4;
}
// &:hover {
// color: #4fa1a4;
// }
// }
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!