后台-上架联动字段修改

This commit is contained in:
gaoyuanwei 2022-07-15 18:30:59 +08:00
parent ed5576a604
commit c59a3d48bd
2 changed files with 61 additions and 5 deletions

View File

@ -19,7 +19,7 @@ js:
<a-input v-if="type == 'input'" v-model:value="data.note1" :placeholder="'请输入' + name" />
<!-- 下拉框 -->
<el-select
v-else-if="(type === 'select' && name !== '归属部门') || type == 'radio'"
v-else-if="(type === 'select' && name !== '归属部门' && name !== '使用方式') || type == 'radio'"
style="width: 240px"
v-model:value="data.note1"
:placeholder="'请选择' + name">
@ -45,6 +45,20 @@ js:
{{ itemSelect.name }}
</el-option>
</el-select>
<el-select
v-else-if="(type === 'select' && name === '使用方式')"
style="width: 240px"
v-model:value="data.note1"
:placeholder="'请选择' + name"
@change="showTypeClick"
>
<el-option
:value="itemSelect.dictLabel"
v-for="(itemSelect, indexSelect) in options"
:key="indexSelect">
{{ itemSelect.dictLabel }}
</el-option>
</el-select>
<!-- 多选 -->
<div
v-else-if="type === 'checkBox'"
@ -89,7 +103,8 @@ export default {
valueCheckBox: [],
//
regionSelect: '',
showKey: 0
showKey: 0,
showType: ''
}
},
methods: {
@ -157,6 +172,11 @@ export default {
}
})
this.data.note1 = str
},
showTypeClick (e) {
this.showType = e
console.log(e)
this.$emit('show-type', this.showType)
}
},
created () {
@ -172,6 +192,7 @@ export default {
},
mounted () {
this.selectOptions()
this.showTypeClick('调用接口')
}
}
</script>

View File

@ -11,7 +11,16 @@
<div v-for='child in parent.children' :key='child.id'>
<template v-if='judgmentType.filter(item => item.name==child.name).length === 0'>
<div class="top">{{child.name}}</div>
<div v-for="item in child.children" :key="item.id" class='item' v-show="item.name != '来源应用' && item.name != '关联组件信息' && item.name != '技术文档'">
<div v-for="item in child.children" :key="item.id" class='item' v-show="(item.name != '来源应用' && item.name != '关联组件信息' && item.name != '技术文档') && !(
(showTypeName == '调用接口' && item.name == '平台地址') ||
(showTypeName == '调用接口' && item.name == 'SDK安装包') ||
(showTypeName == '平台对接' && item.name == 'SDK安装包') ||
(showTypeName == '平台对接' && item.name == '接口请求方式') ||
(showTypeName == '平台对接' && item.name == '服务接口') ||
(showTypeName == 'SDK' && item.name == '平台地址') ||
(showTypeName == 'SDK' && item.name == '接口请求方式') ||
(showTypeName == 'SDK' && item.name == '服务接口')
)">
<span >{{ item.name }}</span>
<!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
tip="支持图片类型大小不超过100M"></upload> -->
@ -23,10 +32,12 @@
tip="支持文件类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.mp4' :list="item" v-else-if="item.type == 'video'" type="视频" btnName="上传视频" :maxCount="1" :dataList="item"
tip="支持视频类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.zip' :list="item" v-else-if="item.type == 'package'" type="安装包" btnName="上传安装包" :maxCount="1" :dataList="item"
tip="支持.zip类型大小不超过100M"></upload>
<input-select-checkbox :list="[]" v-else-if="item.type == 'AbilityType'" type="disabled" :data="item" :name="item.name" :value="typeInput"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'ComponentType'" type="disabled" :data="item" :name="item.name" :value="type"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'input'" type="input" :data="item" :name="item.name"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'select'" type="select" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'select'" type="select" :data="item" :name="item.name" :options="item.options" @show-type="showType"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'checkBox'" type="checkBox" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'radio'" type="radio" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'textArea'" type="textArea" :data="item" :name="item.name"></input-select-checkbox>
@ -163,15 +174,39 @@ export default {
}
]
}
]
],
showTypeName: ''
}
},
mounted () {
this.defaultContent()
},
methods: {
changeInfoList (obj) {
this.$emit('changeInfoList', obj)
},
goToRichText () {
},
// --
defaultContent () {
this.putOnTheShelfList.forEach((item) => {
if (item.name === '部署与使用') {
item.children.forEach((itemChild) => {
if (itemChild.name === '使用方式') {
itemChild.children.forEach((itemChilds) => {
if (itemChilds.name === '使用方式') {
itemChilds.note1 = '调用接口'
}
})
}
})
}
})
},
showType (data) {
this.showTypeName = data
console.log(data, this.showTypeName, '传过来的showType')
}
}
}