This commit is contained in:
gaoyuanwei 2022-07-01 11:24:19 +08:00
parent 91c7e6c904
commit 11a2eb5602
7 changed files with 105 additions and 31 deletions

View File

@ -66,21 +66,35 @@
</el-form-item> </el-form-item>
</div> </div>
<div v-if="!shifoushizujian"> <div v-if="!shifoushizujian">
<el-form-item label="组件名称"> <el-form-item label="组件名称" v-if="algorithmShow">
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.name"
:disabled="fieldDisabled" :disabled="fieldDisabled"
placeholder="组件名称" placeholder="组件名称"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="应用描述"> <el-form-item label="算法名称" v-if="nameNotShow">
<el-input
v-model="dataForm.name"
:disabled="fieldDisabled"
placeholder="算法名称"
></el-input>
</el-form-item>
<el-form-item label="应用描述" v-if="algorithmShow">
<el-input <el-input
v-model="dataForm.description" v-model="dataForm.description"
:disabled="fieldDisabled" :disabled="fieldDisabled"
placeholder="应用描述" placeholder="应用描述"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="部门联系人"> <el-form-item label="算法描述" v-if="nameNotShow">
<el-input
v-model="dataForm.description"
:disabled="fieldDisabled"
placeholder="算法描述"
></el-input>
</el-form-item>
<el-form-item label="部门联系人" v-if="algorithmShow">
<el-input <el-input
v-model="dataForm.deptContacts" v-model="dataForm.deptContacts"
:disabled="fieldDisabled" :disabled="fieldDisabled"
@ -94,7 +108,7 @@
placeholder="共享类型" placeholder="共享类型"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="共享方式" v-if="coverageNotShow"> <el-form-item label="共享方式" v-if="coverageNotShow && algorithmShow">
<el-input <el-input
v-model="dataForm.shareMode" v-model="dataForm.shareMode"
:disabled="fieldDisabled" :disabled="fieldDisabled"
@ -180,7 +194,9 @@ export default {
dataForm: [], dataForm: [],
id: '', id: '',
shifoushizujian: true, shifoushizujian: true,
coverageNotShow: true coverageNotShow: true,
nameNotShow: false,
algorithmShow: true
} }
}, },
watch: {}, watch: {},
@ -209,13 +225,16 @@ export default {
} }
this.dataForm = res.data.resourceDTO this.dataForm = res.data.resourceDTO
if (this.dataForm.type != '应用资源') { if (this.dataForm.type != '应用资源') {
this.shifoushizujian = false
this.dataForm.infoList.forEach((val) => { this.dataForm.infoList.forEach((val) => {
if (val.attrValue === '图层服务') { if (val.attrValue === '图层服务') {
this.coverageNotShow = false this.coverageNotShow = false
console.log(this.coverageNotShow, 'wowowo') } else if (val.attrValue === '智能算法') {
this.nameNotShow = true
this.algorithmShow = false
console.log(this.nameNotShow, 'wowowo')
} }
}) })
this.shifoushizujian = false
} else { } else {
this.shifoushizujian = true this.shifoushizujian = true
} }

View File

@ -28,10 +28,16 @@
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->
</div> </div>
<div class="main"> <div class="main">
<a-tooltip placement="top">
<template #title>应用领域{{ applicationArea }}</template>
<div>应用领域{{ applicationArea }}</div> <div>应用领域{{ applicationArea }}</div>
</a-tooltip>
<a-tooltip placement="top">
<template #title>{{ props.dataList.description }}</template>
<div> <div>
{{ props.dataList.description }} {{ props.dataList.description }}
</div> </div>
</a-tooltip>
</div> </div>
<div class="bottom" v-if="props.dataList.id"> <div class="bottom" v-if="props.dataList.id">
<a-button type="primary" @click="toView()"> <a-button type="primary" @click="toView()">

View File

@ -26,10 +26,16 @@
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->
</div> </div>
<div class="main"> <div class="main">
<a-tooltip placement="top">
<template #title>应用领域{{ applicationArea }}</template>
<div>应用领域{{ applicationArea }}</div> <div>应用领域{{ applicationArea }}</div>
</a-tooltip>
<a-tooltip placement="top">
<template #title>{{ props.dataList.description }}</template>
<div> <div>
{{ props.dataList.description }} {{ props.dataList.description }}
</div> </div>
</a-tooltip>
</div> </div>
<div class="bottom" v-if="props.dataList.id"> <div class="bottom" v-if="props.dataList.id">
<!-- <a-button type="primary" @click="toView()"> <!-- <a-button type="primary" @click="toView()">

View File

@ -28,11 +28,16 @@
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->
</div> </div>
<div class="main"> <div class="main">
<div>应用领域{{ businessArea }}</div> <a-tooltip placement="top">
<!-- 应用描述 --> <template #title>应用领域{{ applicationArea }}</template>
<div>应用领域{{ applicationArea }}</div>
</a-tooltip>
<a-tooltip placement="top">
<template #title>{{ props.dataList.description }}</template>
<div> <div>
{{ props.dataList.description }} {{ props.dataList.description }}
</div> </div>
</a-tooltip>
</div> </div>
<div class="bottom" v-if="props.dataList.id"> <div class="bottom" v-if="props.dataList.id">
<!-- <a-button type="primary" @click="toView()"> <!-- <a-button type="primary" @click="toView()">

View File

@ -28,10 +28,16 @@
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->
</div> </div>
<div class="main"> <div class="main">
<a-tooltip placement="top">
<template #title>应用领域{{ applicationArea }}</template>
<div>应用领域{{ applicationArea }}</div> <div>应用领域{{ applicationArea }}</div>
</a-tooltip>
<a-tooltip placement="top">
<template #title>{{ props.dataList.description }}</template>
<div> <div>
{{ props.dataList.description }} {{ props.dataList.description }}
</div> </div>
</a-tooltip>
</div> </div>
<div class="bottom" v-if="props.dataList.id"> <div class="bottom" v-if="props.dataList.id">
<a-button type="primary" @click="toView()"> <a-button type="primary" @click="toView()">

View File

@ -28,11 +28,16 @@
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->
</div> </div>
<div class="main"> <div class="main">
<div>应用领域{{ businessArea }}</div> <a-tooltip placement="top">
<!-- 应用描述 --> <template #title>应用领域{{ applicationArea }}</template>
<div>应用领域{{ applicationArea }}</div>
</a-tooltip>
<a-tooltip placement="top">
<template #title>{{ props.dataList.description }}</template>
<div> <div>
{{ props.dataList.description }} {{ props.dataList.description }}
</div> </div>
</a-tooltip>
</div> </div>
<div class="bottom" v-if="props.dataList.id"> <div class="bottom" v-if="props.dataList.id">
<a-button type="primary" @click="toView()"> <a-button type="primary" @click="toView()">

View File

@ -367,20 +367,34 @@
</a-form-item> </a-form-item>
</div> </div>
<div v-if="!shifoushizujian"> <div v-if="!shifoushizujian">
<a-form-item label="组件名称"> <a-form-item label="组件名称" v-if="algorithmShow">
<a-input <a-input
v-model:value="dataForm.data.name" v-model:value="dataForm.data.name"
disabled="true" disabled="true"
placeholder="组件名称" placeholder="组件名称"
></a-input> ></a-input>
</a-form-item> </a-form-item>
<a-form-item label="应用描述"> <a-form-item label="算法名称" v-if="nameNotShow">
<a-input
v-model:value="dataForm.data.name"
disabled="true"
placeholder="算法名称"
></a-input>
</a-form-item>
<a-form-item label="应用描述" v-if="algorithmShow">
<a-input <a-input
v-model:value="dataForm.data.description" v-model:value="dataForm.data.description"
disabled="true" disabled="true"
placeholder="应用描述" placeholder="应用描述"
></a-input> ></a-input>
</a-form-item> </a-form-item>
<a-form-item label="算法描述" v-if="nameNotShow">
<a-input
v-model:value="dataForm.data.description"
disabled="true"
placeholder="算法描述"
></a-input>
</a-form-item>
<a-form-item label="部门联系人"> <a-form-item label="部门联系人">
<a-input <a-input
v-model:value="dataForm.data.deptContacts" v-model:value="dataForm.data.deptContacts"
@ -551,6 +565,8 @@
id: '', id: '',
}) })
let shifoushizujian = ref('') let shifoushizujian = ref('')
let nameNotShow = ref('')
let algorithmShow = ref('')
const dataForm = reactive({ data: {} }) const dataForm = reactive({ data: {} })
// //
const dataSource = reactive({ data: [] }) const dataSource = reactive({ data: [] })
@ -637,6 +653,17 @@
shifoushizujian.value = true shifoushizujian.value = true
} else { } else {
shifoushizujian.value = false shifoushizujian.value = false
console.log(res.data.data.resourceDTO)
debugger
res.data.data.resourceDTO.infoList.forEach((val) => {
console.log(val, '111111111111111111111111')
if (val.attrValue === '智能算法') {
nameNotShow.value = true
algorithmShow.value = false
console.log(nameNotShow.value, algorithmShow.value, 'wowowo')
debugger
}
})
} }
console.log('222222222222', dataForm.data) console.log('222222222222', dataForm.data)
}) })