修复全国不能选择的问题
Showing
5 changed files
with
76 additions
and
31 deletions
| ... | @@ -246,7 +246,7 @@ export const getServiceDetail = (params) => request({ | ... | @@ -246,7 +246,7 @@ export const getServiceDetail = (params) => request({ |
| 246 | 246 | ||
| 247 | /** 获取可使用的资产目录列表 */ | 247 | /** 获取可使用的资产目录列表 */ |
| 248 | export const getRegisterCatalogList = () => request({ | 248 | export const getRegisterCatalogList = () => request({ |
| 249 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/dam-list?isRegister=${'Y'}`, | 249 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/dam-list?isRegister=${'Y'}&foundMode=4`, |
| 250 | method: 'get' | 250 | method: 'get' |
| 251 | }) | 251 | }) |
| 252 | 252 | ... | ... |
| ... | @@ -1324,8 +1324,8 @@ const passCommonDialogBtnClick = (btn, info) => { | ... | @@ -1324,8 +1324,8 @@ const passCommonDialogBtnClick = (btn, info) => { |
| 1324 | </div> | 1324 | </div> |
| 1325 | </div> | 1325 | </div> |
| 1326 | </div> | 1326 | </div> |
| 1327 | <div class="label-main" v-if="assetDetailInfo.productKeywords"> | 1327 | <div class="label-main" v-if="assetDetailInfo.productKeywords?.length"> |
| 1328 | <div class="key-label" v-for="(item, index) in assetDetailInfo.productKeywords?.split(',') || []" :style="{ 'margin-left': index > 0 ? '4px' : '0px' }">{{ item }}</div> | 1328 | <div class="key-label" v-for="(item, index) in assetDetailInfo.productKeywords || []" :style="{ 'margin-left': index > 0 ? '4px' : '0px' }">{{ item }}</div> |
| 1329 | </div> | 1329 | </div> |
| 1330 | <div class="applicationScenarios" | 1330 | <div class="applicationScenarios" |
| 1331 | :style="{ 'margin-right': (isTruncated && !isExpanded) ? '30px' : '0px', WebkitLineClamp: (!isTruncated ? 'inherit' : (isExpanded ? 'inherit' : 2)), WebkitBoxOrient: 'vertical' }"> | 1331 | :style="{ 'margin-right': (isTruncated && !isExpanded) ? '30px' : '0px', WebkitLineClamp: (!isTruncated ? 'inherit' : (isExpanded ? 'inherit' : 2)), WebkitBoxOrient: 'vertical' }"> | ... | ... |
| ... | @@ -227,17 +227,10 @@ const currTableData: any = ref({}); | ... | @@ -227,17 +227,10 @@ const currTableData: any = ref({}); |
| 227 | const btnClick = (btn) => { | 227 | const btnClick = (btn) => { |
| 228 | const type = btn.value; | 228 | const type = btn.value; |
| 229 | if (type == 'create') { | 229 | if (type == 'create') { |
| 230 | if (btn.exchangeName.includes('数交所(勿删)') || btn.exchangeName.includes('江苏省数据交易所')) { | ||
| 231 | router.push({ | 230 | router.push({ |
| 232 | name: 'registerStartJS', | 231 | name: 'registerStartJS', |
| 233 | query: { exchangeGuid: btn.exchangeGuid, type } | 232 | query: { exchangeGuid: btn.exchangeGuid, type } |
| 234 | }); | 233 | }); |
| 235 | } else { | ||
| 236 | router.push({ | ||
| 237 | name: 'registerStart', | ||
| 238 | query: { exchangeGuid: btn.exchangeGuid, type } | ||
| 239 | }); | ||
| 240 | } | ||
| 241 | } else if (type == 'search') { | 234 | } else if (type == 'search') { |
| 242 | exchangGuid.value = btn.exchangeGuid; | 235 | exchangGuid.value = btn.exchangeGuid; |
| 243 | pageInfo.value.curr = 1; | 236 | pageInfo.value.curr = 1; | ... | ... |
| ... | @@ -379,18 +379,6 @@ const getRegisterCatalogListData = (dam: any = {}) => { | ... | @@ -379,18 +379,6 @@ const getRegisterCatalogListData = (dam: any = {}) => { |
| 379 | dataScaleItem.disabled = false; | 379 | dataScaleItem.disabled = false; |
| 380 | } | 380 | } |
| 381 | } | 381 | } |
| 382 | if (draftDetailInfo.value.damGuid) { | ||
| 383 | let da = registerCatalogList.value.find(r => r.guid == draftDetailInfo.value.damGuid); | ||
| 384 | if (da && da.dataCount != null) { | ||
| 385 | dataScaleItem.disabled = true; | ||
| 386 | if (draftDetailInfo.value.dataScale == null) { | ||
| 387 | draftDetailInfo.value.dataScale = da.dataCount; | ||
| 388 | setBaseFormItemsValue(draftDetailInfo.value); | ||
| 389 | } | ||
| 390 | } else { | ||
| 391 | dataScaleItem.disabled = false; | ||
| 392 | } | ||
| 393 | } | ||
| 394 | } else { | 382 | } else { |
| 395 | ElMessage.error(res.msg); | 383 | ElMessage.error(res.msg); |
| 396 | } | 384 | } | ... | ... |
| ... | @@ -20,6 +20,9 @@ import { | ... | @@ -20,6 +20,9 @@ import { |
| 20 | registerUpdate, | 20 | registerUpdate, |
| 21 | getRegiaterDetail | 21 | getRegiaterDetail |
| 22 | } from '@/api/modules/dataAssetZq' | 22 | } from '@/api/modules/dataAssetZq' |
| 23 | import { | ||
| 24 | getRegisterCatalogList | ||
| 25 | } from '@/api/modules/dataAsset' | ||
| 23 | import useUserStore from "@/store/modules/user"; | 26 | import useUserStore from "@/store/modules/user"; |
| 24 | import { getCamundaDeploymentId } from "@/api/modules/workFlowService" | 27 | import { getCamundaDeploymentId } from "@/api/modules/workFlowService" |
| 25 | import useDataAssetStore from "@/store/modules/dataAsset"; | 28 | import useDataAssetStore from "@/store/modules/dataAsset"; |
| ... | @@ -45,8 +48,8 @@ const dictListMap = ref({}); | ... | @@ -45,8 +48,8 @@ const dictListMap = ref({}); |
| 45 | /** 所属疾病的下拉列表 */ | 48 | /** 所属疾病的下拉列表 */ |
| 46 | const diseaseListData: any = ref([]); | 49 | const diseaseListData: any = ref([]); |
| 47 | 50 | ||
| 48 | /** 产品应用方向字典列表 */ | 51 | /** 可下拉选择的资产名称 */ |
| 49 | const productDirectionListData: any = ref([]); | 52 | const registerCatalogList: any = ref([]); |
| 50 | 53 | ||
| 51 | const formRef = ref(); | 54 | const formRef = ref(); |
| 52 | 55 | ||
| ... | @@ -60,7 +63,25 @@ const productBaseInfoItems = ref([{ | ... | @@ -60,7 +63,25 @@ const productBaseInfoItems = ref([{ |
| 60 | placeholder: "请输入", | 63 | placeholder: "请输入", |
| 61 | required: true, | 64 | required: true, |
| 62 | clearable: true | 65 | clearable: true |
| 63 | }, { | 66 | }, |
| 67 | // { | ||
| 68 | // label: '数据资产名称', | ||
| 69 | // type: 'select', | ||
| 70 | // placeholder: '请选择', | ||
| 71 | // options: [], | ||
| 72 | // field: 'productName', | ||
| 73 | // maxlength: 50, | ||
| 74 | // allowCreate: true, | ||
| 75 | // default: '', | ||
| 76 | // filterable: true, | ||
| 77 | // props: { | ||
| 78 | // value: 'guid', | ||
| 79 | // label: 'damName' | ||
| 80 | // }, | ||
| 81 | // clearable: true, | ||
| 82 | // required: true | ||
| 83 | // }, | ||
| 84 | { | ||
| 64 | label: '产品编码', | 85 | label: '产品编码', |
| 65 | type: 'input', | 86 | type: 'input', |
| 66 | placeholder: '自动生成', | 87 | placeholder: '自动生成', |
| ... | @@ -276,7 +297,7 @@ const productBaseInfoItems = ref([{ | ... | @@ -276,7 +297,7 @@ const productBaseInfoItems = ref([{ |
| 276 | type: 'select', | 297 | type: 'select', |
| 277 | placeholder: '请选择', | 298 | placeholder: '请选择', |
| 278 | field: 'productDirection', | 299 | field: 'productDirection', |
| 279 | options: productDirectionListData.value, | 300 | options: dictListMap.value['productDirection'], |
| 280 | props: { | 301 | props: { |
| 281 | value: 'value', | 302 | value: 'value', |
| 282 | label: 'label' | 303 | label: 'label' |
| ... | @@ -300,7 +321,7 @@ const productBaseInfoItems = ref([{ | ... | @@ -300,7 +321,7 @@ const productBaseInfoItems = ref([{ |
| 300 | label: "产品关键词", | 321 | label: "产品关键词", |
| 301 | field: 'productKeywords', | 322 | field: 'productKeywords', |
| 302 | default: [], | 323 | default: [], |
| 303 | maxlength: 200, | 324 | maxlength: 50, |
| 304 | placeholder: "请输入关键词,按回车键确认", | 325 | placeholder: "请输入关键词,按回车键确认", |
| 305 | required: true, | 326 | required: true, |
| 306 | clearable: true, | 327 | clearable: true, |
| ... | @@ -334,7 +355,9 @@ const productBaseInfoFormRules = ref({ | ... | @@ -334,7 +355,9 @@ const productBaseInfoFormRules = ref({ |
| 334 | dataCoverage: [required('请选择数据覆盖范围')], | 355 | dataCoverage: [required('请选择数据覆盖范围')], |
| 335 | productDirection: [required('请选择产品应用方向')], | 356 | productDirection: [required('请选择产品应用方向')], |
| 336 | versionName: [required('请输入版本名称')], | 357 | versionName: [required('请输入版本名称')], |
| 337 | productKeywords: [required('请输入产品关键词')], | 358 | productKeywords: [{ |
| 359 | type: 'array', required: true, message: '请输入产品关键词', trigger: 'change', | ||
| 360 | }], | ||
| 338 | productDesc: [required('请输入产品描述')] | 361 | productDesc: [required('请输入产品描述')] |
| 339 | }); | 362 | }); |
| 340 | 363 | ||
| ... | @@ -361,6 +384,8 @@ const handleProductBaseFormSelectChange = (val, row, info) => { | ... | @@ -361,6 +384,8 @@ const handleProductBaseFormSelectChange = (val, row, info) => { |
| 361 | if (row.field == 'domain') { | 384 | if (row.field == 'domain') { |
| 362 | info.scenario = ''; //清空下应用场景 | 385 | info.scenario = ''; //清空下应用场景 |
| 363 | setProductBaseFormItems(info); | 386 | setProductBaseFormItems(info); |
| 387 | } else if (row.field == 'productName') { | ||
| 388 | // TODO, 带出资产登记的所有信息。 | ||
| 364 | } | 389 | } |
| 365 | } | 390 | } |
| 366 | 391 | ||
| ... | @@ -1391,6 +1416,7 @@ const setRegisterFormItems = (formValue, isEdit = false) => { | ... | @@ -1391,6 +1416,7 @@ const setRegisterFormItems = (formValue, isEdit = false) => { |
| 1391 | item.options = !formValue['industry'] ? [] : (dictListMap.value['industry'].find(v => v.value == formValue['industry']).childDictList || []); | 1416 | item.options = !formValue['industry'] ? [] : (dictListMap.value['industry'].find(v => v.value == formValue['industry']).childDictList || []); |
| 1392 | } else if (item.field == 'coverageArea') { | 1417 | } else if (item.field == 'coverageArea') { |
| 1393 | item && item.children?.length && (item.children[0].visible = formValue['coverageArea'] != 'all'); | 1418 | item && item.children?.length && (item.children[0].visible = formValue['coverageArea'] != 'all'); |
| 1419 | if (isEdit) { | ||
| 1394 | let coverageArea = formValue.coverageArea; | 1420 | let coverageArea = formValue.coverageArea; |
| 1395 | if (coverageArea && Array.isArray(coverageArea) && coverageArea.length > 0) { | 1421 | if (coverageArea && Array.isArray(coverageArea) && coverageArea.length > 0) { |
| 1396 | if (coverageArea[0][0] == 'all') { | 1422 | if (coverageArea[0][0] == 'all') { |
| ... | @@ -1424,6 +1450,7 @@ const setRegisterFormItems = (formValue, isEdit = false) => { | ... | @@ -1424,6 +1450,7 @@ const setRegisterFormItems = (formValue, isEdit = false) => { |
| 1424 | } else { | 1450 | } else { |
| 1425 | item.default = ''; | 1451 | item.default = ''; |
| 1426 | } | 1452 | } |
| 1453 | } | ||
| 1427 | } else if (item.field == 'sensitiveInformation') { | 1454 | } else if (item.field == 'sensitiveInformation') { |
| 1428 | item.inputOptions && (item.inputOptions.default = formValue[item.inputOptions.field]); | 1455 | item.inputOptions && (item.inputOptions.default = formValue[item.inputOptions.field]); |
| 1429 | item.inputOptions && (item.inputOptions.visible = item.default == 'Y'); | 1456 | item.inputOptions && (item.inputOptions.visible = item.default == 'Y'); |
| ... | @@ -1867,8 +1894,9 @@ onBeforeMount(async () => { | ... | @@ -1867,8 +1894,9 @@ onBeforeMount(async () => { |
| 1867 | fullscreenLoading.value = false; | 1894 | fullscreenLoading.value = false; |
| 1868 | if (res?.code == proxy.$passCode) { | 1895 | if (res?.code == proxy.$passCode) { |
| 1869 | detailInfo.value = res.data || {}; | 1896 | detailInfo.value = res.data || {}; |
| 1897 | getRegisterCatalogListData(); | ||
| 1870 | detailInfo.value.dataSources = (detailInfo.value.dataSources || '') + ''; | 1898 | detailInfo.value.dataSources = (detailInfo.value.dataSources || '') + ''; |
| 1871 | detailInfo.value.productKeywords = !detailInfo.value.productKeywords ? [] : detailInfo.value.productKeywords.split(','); | 1899 | detailInfo.value.productKeywords = detailInfo.value.productKeywords || []; |
| 1872 | let dataCoverage = detailInfo.value.dataCoverage; | 1900 | let dataCoverage = detailInfo.value.dataCoverage; |
| 1873 | if (dataCoverage.length == 1 && dataCoverage[0] == '1') { | 1901 | if (dataCoverage.length == 1 && dataCoverage[0] == '1') { |
| 1874 | detailInfo.value.dataCoverages = '1'; | 1902 | detailInfo.value.dataCoverages = '1'; |
| ... | @@ -1949,9 +1977,39 @@ onBeforeMount(async () => { | ... | @@ -1949,9 +1977,39 @@ onBeforeMount(async () => { |
| 1949 | }).catch(() => { | 1977 | }).catch(() => { |
| 1950 | fullscreenLoading.value = false; | 1978 | fullscreenLoading.value = false; |
| 1951 | }) | 1979 | }) |
| 1980 | } else { | ||
| 1981 | getRegisterCatalogListData(); | ||
| 1952 | } | 1982 | } |
| 1953 | }) | 1983 | }) |
| 1954 | 1984 | ||
| 1985 | const getRegisterCatalogListData = () => { | ||
| 1986 | getRegisterCatalogList().then((res: any) => { | ||
| 1987 | if (res.code == proxy.$passCode) { | ||
| 1988 | const data = res.data || []; | ||
| 1989 | productBaseInfoItems.value[0].options = registerCatalogList.value = data; | ||
| 1990 | if (guid) { | ||
| 1991 | const opt = detailInfo.value.damGuid && data.find(item => item.guid == detailInfo.value.damGuid); | ||
| 1992 | productBaseInfoItems.value[0].default = opt ? opt.guid : detailInfo.value.productName; | ||
| 1993 | } | ||
| 1994 | // let dataScaleItem = baseFormItems.value.find(item => item.field == 'dataScale'); | ||
| 1995 | // if (draftDetailInfo.value.damGuid) { | ||
| 1996 | // let da = registerCatalogList.value.find(r => r.guid == draftDetailInfo.value.damGuid); | ||
| 1997 | // if (da && da.dataCount != null) { | ||
| 1998 | // dataScaleItem.disabled = true; | ||
| 1999 | // if (draftDetailInfo.value.dataScale == null) { | ||
| 2000 | // draftDetailInfo.value.dataScale = da.dataCount; | ||
| 2001 | // setBaseFormItemsValue(draftDetailInfo.value); | ||
| 2002 | // } | ||
| 2003 | // } else { | ||
| 2004 | // dataScaleItem.disabled = false; | ||
| 2005 | // } | ||
| 2006 | // } | ||
| 2007 | } else { | ||
| 2008 | proxy.$ElMessage.error(res.msg); | ||
| 2009 | } | ||
| 2010 | }); | ||
| 2011 | } | ||
| 2012 | |||
| 1955 | const cancel = () => { | 2013 | const cancel = () => { |
| 1956 | proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => { | 2014 | proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => { |
| 1957 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 2015 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| ... | @@ -1990,7 +2048,7 @@ const saveDraft = () => { | ... | @@ -1990,7 +2048,7 @@ const saveDraft = () => { |
| 1990 | Object.assign(params, { | 2048 | Object.assign(params, { |
| 1991 | ...baseInfoValue, | 2049 | ...baseInfoValue, |
| 1992 | dataCoverage: baseInfoValue.dataCoverages == '1' ? ['1'] : baseInfoValue.dataCoverage, | 2050 | dataCoverage: baseInfoValue.dataCoverages == '1' ? ['1'] : baseInfoValue.dataCoverage, |
| 1993 | productKeywords: baseInfoValue.productKeywords.join(',') | 2051 | productKeywords: baseInfoValue.productKeywords || [] |
| 1994 | }, { | 2052 | }, { |
| 1995 | reqParamListRQVOS: inputParamsData.value, | 2053 | reqParamListRQVOS: inputParamsData.value, |
| 1996 | respParamListRQVOS: respParamsData.value, | 2054 | respParamListRQVOS: respParamsData.value, |
| ... | @@ -2014,6 +2072,12 @@ const saveDraft = () => { | ... | @@ -2014,6 +2072,12 @@ const saveDraft = () => { |
| 2014 | } else if (!registerInfoValue.coverageArea) { | 2072 | } else if (!registerInfoValue.coverageArea) { |
| 2015 | params.registerRQVO.coverageArea = [registerInfoValue.coverageAreas]; | 2073 | params.registerRQVO.coverageArea = [registerInfoValue.coverageAreas]; |
| 2016 | } | 2074 | } |
| 2075 | // let productName = params.productName; | ||
| 2076 | // let da = registerCatalogList.value.find(r => r.guid == productName); | ||
| 2077 | // if (da) { | ||
| 2078 | // params.damGuid = da.guid; | ||
| 2079 | // params.productName = da.damName; | ||
| 2080 | // } | ||
| 2017 | fullscreenLoading.value = true; | 2081 | fullscreenLoading.value = true; |
| 2018 | if (guid) { | 2082 | if (guid) { |
| 2019 | params.guid = guid; | 2083 | params.guid = guid; |
| ... | @@ -2184,7 +2248,7 @@ const save = () => { | ... | @@ -2184,7 +2248,7 @@ const save = () => { |
| 2184 | Object.assign(params, { | 2248 | Object.assign(params, { |
| 2185 | ...baseInfoValue, | 2249 | ...baseInfoValue, |
| 2186 | dataCoverage: baseInfoValue.dataCoverages == '1' ? ['1'] : baseInfoValue.dataCoverage, | 2250 | dataCoverage: baseInfoValue.dataCoverages == '1' ? ['1'] : baseInfoValue.dataCoverage, |
| 2187 | productKeywords: baseInfoValue.productKeywords.join(',') | 2251 | productKeywords: baseInfoValue.productKeywords || [] |
| 2188 | }, { | 2252 | }, { |
| 2189 | reqParamListRQVOS: inputParamsData.value, | 2253 | reqParamListRQVOS: inputParamsData.value, |
| 2190 | respParamListRQVOS: respParamsData.value, | 2254 | respParamListRQVOS: respParamsData.value, | ... | ... |
-
Please register or sign in to post a comment