BUG修改

This commit is contained in:
a0049873 2022-07-04 11:56:45 +08:00
parent 1846356272
commit 5ffeb562da
4 changed files with 169 additions and 122 deletions

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 14:54:01
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-30 17:09:40
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-04 10:08:10
* @Description: 算法详情页导航
-->
<template>
@ -65,6 +65,7 @@
])
const list = ref([])
// id
if (keyId) {
queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length > 0) {
@ -78,6 +79,7 @@
console.log('navList', navList)
}
})
}
const props = defineProps({
selectNow: { type: String, default: '' },
dataList: { type: Object, default: null },

View File

@ -1,6 +1,10 @@
<template>
<div class="ability-to-apply-for">
<div class="title">申请能力</div>
<div class="ability-to-apply-for" :class="{ all: falg }">
<div class="title">
<span>申请能力</span>
<span class="btn" @click="falg = !falg" v-show="!falg">展开</span>
<span class="btn" @click="falg = !falg" v-show="falg">收起</span>
</div>
<div
v-for="(item, index) in dataForm"
:key="index"
@ -12,6 +16,23 @@
</div>
<template v-for="val in item.arr" :key="val.resourceId">
<div class="item">
<div
class="tx"
:class="
val.type == '基础设施'
? 'sxt'
: val.componentType == '智能算法'
? 'znsf'
: val.componentType == '图层服务'
? 'tcfw'
: val.componentType == '开发组件'
? 'kfzj'
: val.componentType == '业务组件'
? 'ywzj'
: ''
"
></div>
<div class="text">
<div class="name">
<span>{{ val.resourceName }}</span>
<span>{{ val.type }}</span>
@ -27,6 +48,7 @@
'--'
}}
</div>
</div>
<div class="remove" @click="removeFunction(val)"></div>
</div>
</template>
@ -35,27 +57,29 @@
</template>
<script setup>
import { useRouter } from 'vue-router'
// import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue'
import { ref, defineProps } from 'vue'
import mybus from '@/myplugins/mybus'
// import mybus from '@/myplugins/mybus'
const props = defineProps({
dataList: { type: Array, default: null },
})
const falg = ref(false)
let dataForm = ref([])
// eslint-disable-next-line vue/no-setup-props-destructure
dataForm.value = props.dataList
const router = useRouter()
const arr =
router.currentRoute.value.query.name instanceof Array
? router.currentRoute.value.query.name
: [router.currentRoute.value.query.name]
const dataResourceId = router.currentRoute.value.query.resourceId
console.log(dataForm.value)
// const router = useRouter()
// const arr =
// router.currentRoute.value.query.name instanceof Array
// ? router.currentRoute.value.query.name
// : [router.currentRoute.value.query.name]
// const dataResourceId = router.currentRoute.value.query.resourceId
const depList = ref({
Name: [],
depID: [],
})
// const depList = ref({
// Name: [],
// depID: [],
// })
//
const removeFunction = (data) => {
dataForm.value.map((val) => {
@ -71,25 +95,26 @@
<style scoped lang="less">
.ability-to-apply-for {
height: 290px;
overflow: hidden;
.title {
font-size: 0.16rem;
color: #212121;
border-bottom: 0.01rem #dddee1 solid;
padding-bottom: 0.1rem;
margin-bottom: 0.2rem;
display: flex;
justify-content: space-between;
}
.ability-to-apply-for-content {
// margin-bottom: 0.3rem;
// border-bottom: 0.01rem #dddee1 solid;
// padding-bottom: 0.3rem;
padding-right: 0.5rem;
position: relative;
.dep-name {
color: #0558e1;
font-size: 0.18rem;
font-size: 0.22rem;
display: flex;
align-items: center;
line-height: 0.18rem;
line-height: 0.22rem;
margin-bottom: 0.2rem;
span {
display: inline-block;
@ -104,14 +129,19 @@
padding-bottom: 0.1rem;
margin-bottom: 0.1rem;
border-bottom: 1px solid #dddee1;
position: relative;
display: flex;
align-items: center;
.text {
margin-left: 0.2rem;
width: 8.8rem;
}
}
.name {
margin-bottom: 0.2rem;
span:first-child {
display: inline-block;
margin-right: 0.08rem;
font-size: 0.2rem;
font-size: 0.18rem;
color: #000000;
}
span:last-child {
@ -122,16 +152,13 @@
}
}
.description {
width: 10rem;
width: 8.8rem;
color: rgba(0, 0, 0, 0.45);
}
.remove {
margin-left: 0.1rem;
width: 0.32rem;
height: 0.32rem;
position: absolute;
right: 0;
top: 50%;
margin-top: -0.16rem;
background: url('~@/assets/home/remove.png') no-repeat;
background-size: cover;
cursor: pointer;
@ -142,4 +169,36 @@
}
}
}
.all {
height: unset;
}
.btn {
cursor: pointer;
}
.tx {
display: inline-block;
width: 0.8rem;
height: 0.8rem;
margin-left: 0.1rem;
}
.sxt {
background: url('~@/assets/home/sxt_square.png') no-repeat;
background-size: 100%;
}
.znsf {
background: url('~@/assets/home/znsf_square.png') no-repeat;
background-size: 100%;
}
.tcfw {
background: url('~@/assets/home/tcfw_square.png') no-repeat;
background-size: 100%;
}
.kfzj {
background: url('~@/assets/home/kfzj_square.png') no-repeat;
background-size: 100%;
}
.ywzj {
background: url('~@/assets/home/ywzj_square.png') no-repeat;
background-size: 100%;
}
</style>

View File

@ -118,9 +118,10 @@
name="applicationBackground"
:rules="[{ required: true, message: '请输入应用背景' }]"
>
<a-input
<a-textarea
placeholder="请输入应用背景"
v-model:value="formName.applicationBackground"
:rows="4"
/>
</a-form-item>
</div>
@ -130,9 +131,10 @@
name="effectWish"
:rules="[{ required: true, message: '请输入期望效果' }]"
>
<a-input
<a-textarea
placeholder="请输入期望效果"
v-model:value="formName.effectWish"
:rows="4"
/>
</a-form-item>
</div>
@ -173,7 +175,7 @@
</a-upload>
</a-form-item>
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
<div class="bottom-btn">
<a-button
style="
width: 80px;
@ -211,7 +213,7 @@
>
提交申请
</a-button>
</a-form-item>
</div>
</a-form>
</div>
<div class="success" v-else>
@ -504,6 +506,7 @@
},
])
const systemOptions = ref([])
const systemOptions2 = ref([])
const handleChange = (info) => {
if (info.file.status !== 'uploading') {
@ -536,49 +539,22 @@
return isPNG || Upload.LIST_IGNORE
}
const fileList = ref([])
//arr
// mybus.on('reomveOldData', (item) => {
// debugger
// arr = []
// formName.system = []
// record.value = record.value + '1'
// arr = item.Name
// // dataResourceId = item.depID
// if (arr && arr.length !== 0) {
// disabled.value = true
// let str = ''
// arr.forEach((val, index) => {
// str += val
// if (index < arr.length - 1) {
// str += ''
// }
// })
// formName.formNameSystem = str
// }
// arr.forEach((val, index) => {
// formName.system.push({
// resourceName: val,
// // resourceId: dataResourceId[index],
// })
// })
// })
//
const flag = ref(true)
const systemHandleChange = (value) => {
console.log(`selected ${value}`)
}
const systemHandleSearch = (value) => {
console.log(`search ${value}`)
text.value = value
systemOptions.value = []
window.setTimeout(() => {
if (flag.value && text.value == value && text.value !== '') {
console.log('1秒未输入~~~~~~~~~~~~~~~~~~~~~~~~~~')
systemOptions.value = systemOptions2.value.filter(
(item) => item.label.search(text.value) > -1
)
}
pageWithAttrs({
pageNum: 99999,
pageSize: 5,
pageNum: 1,
pageSize: 99999,
type: '应用资源',
name: text.value,
name: '',
infoList: [],
}).then((res) => {
if (res.data.code == 0) {
@ -586,33 +562,27 @@
message.warning('该关键词,暂无应用资源!')
} else {
res.data.data.records.map((val) => {
systemOptions.value.push({
systemOptions2.value.push({
value: val.name,
label: val.name,
})
})
console.log(
'第一次获取===================>',
systemOptions.value
)
// console.log('===================>', systemOptions2.value)
}
} else {
message.error('获取数据失败!')
message.error('应用系统获取数据失败!')
}
})
}
}, 2000)
}
const handleBlur = () => {
console.log('blur')
flag.value = false
}
const handleFocus = () => {
console.log('focus')
flag.value = true
systemOptions.value = []
// console.log(formName.applicationSystem)
// formName.applicationSystem = []
systemOptions.value = systemOptions2.value
// systemOptions.value = []
}
// const filterOption = (input, option) => {
@ -727,4 +697,17 @@
flex-wrap: nowrap;
}
}
textarea {
resize: none;
font-size: 14px;
}
.bottom-btn {
display: flex;
justify-content: center;
// position: fixed;
}
:deep(.ant-form-item-control-input-content) {
display: flex;
justify-content: space-around;
}
</style>

View File

@ -437,6 +437,9 @@
resourceName: item.name,
time: item.createDate,
type: item.type,
componentType: item.infoList.filter(
(val) => val.attrType == '组件类型'
)[0].attrValue,
},
],
deptId: item.deptId,