Merge branch 'hi-ucs-dev' of http://124.222.94.39:3001/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
guoyue 2022-07-13 15:04:20 +08:00
commit 84ecc46c69
6 changed files with 226 additions and 177 deletions

View File

@ -0,0 +1,22 @@
<template>
<div class="wrapper">22222222222222</div>
</template>
<script>
export default {
components: {},
props: {},
data () {
return {}
},
watch: {},
computed: {},
methods: {},
created () {},
mounted () {}
}
</script>
<style lang="scss" scoped>
.wrapper {
}
</style>

View File

@ -0,0 +1,165 @@
<template>
<div class="wrapper">
<el-form :model="dataView">
<div v-for="(item, index) in dataView.children" :key="item">
<div class="dataTitle">{{ item.name }}</div>
<el-form-item
v-for="itemson in item.children[0].children"
:key="itemson.name"
:label="itemson.name"
>
<el-input v-model="itemson.note1"></el-input>
</el-form-item>
</div>
</el-form>
</div>
</template>
<script>
export default {
components: {},
props: {
dataForm: {
type: Object
},
insertList: {
type: Array
}
},
data () {
return {
dataList: [],
dataView: []
}
},
watch: {
dataList (item) {
if (item) {
this.dataList = item
}
},
insertList (val) {
if (val) {
if (this.dataForm.type === '应用资源') {
this.dataView = val.filter(
(item) => item.name === this.dataForm.type + '一'
)[0]
} else {
const componentType = this.dataForm.infoList.filter(
(item) => item.attrType === '组件类型'
)
this.dataView = val.filter(
(item) => item.name === this.dataForm.type + '一'
)[0]
this.dataView = this.dataView.children.filter(
(item) => item.name === componentType[0].attrValue
)[0]
this.dataForm.infoList.map((item, index) => {
this.dataView.children.map((itemView, indexView) => {
console.log('itemView', itemView)
itemView.children.map((itemViewSon, indexViewSon) => {
console.log('itemViewSon', itemViewSon)
itemViewSon.children.map((itemSon, indexSon) => {
console.log('itemSon', itemSon)
if (itemSon.name.indexOf('描述') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.description
} else if (itemSon.name.indexOf('名称') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.name
} else if (itemSon.name.indexOf('共享条件') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.shareCondition
} else if (itemSon.name.indexOf('共享方式') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.shareMode
} else if (itemSon.name.indexOf('共享类型') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.shareType
} else if (itemSon.name.indexOf('部门联系人') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.deptContacts
} else if (itemSon.name.indexOf('属部门') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.deptId
} else if (itemSon.name.indexOf('部门联系人电话') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.deptPhone
} else if (itemSon.name === item.attrType) {
this.dataView.children[indexView].children[
indexViewSon
].children[indexSon].note1 = item.attrValue
}
})
})
// .children.map((itemSon, indexSon) => {
// // if (itemSon.name.indexOf('') != -1) {
// // debugger
// // this.dataView.children[indexView].children[0].children[
// // itemSon.name.indexOf('')
// // ].note1 = this.dataForm.description
// // // } else if (itemSon.name.indexOf('')) {
// // // this.dataView.children[indexView].children[0].children[
// // // indexSon
// // // ].note1 = this.dataForm.name
// // // } else if (itemSon.name.indexOf('')) {
// // // this.dataView.children[indexView].children[0].children[
// // // indexSon
// // // ].note1 = this.dataForm.shareCondition
// // // } else if (itemSon.name.indexOf('')) {
// // // this.dataView.children[indexView].children[0].children[
// // // indexSon
// // // ].note1 = this.dataForm.shareMode
// // // } else if (itemSon.name.indexOf('')) {
// // // this.dataView.children[indexView].children[0].children[
// // // indexSon
// // // ].note1 = this.dataForm.shareType
// // // } else if (itemSon.name.indexOf('')) {
// // // this.dataView.children[indexView].children[0].children[
// // // indexSon
// // // ].note1 = this.dataForm.deptContacts
// // // } else if (itemSon.name.indexOf('')) {
// // // this.dataView.children[indexView].children[0].children[
// // // indexSon
// // // ].note1 = this.dataForm.deptId
// // // } else if (itemSon.name.indexOf('')) {
// // // this.dataView.children[indexView].children[0].children[
// // // indexSon
// // // ].note1 = this.dataForm.deptPhone
// // // } else {
// // // this.dataView.children[indexView].children[0].children[
// // // indexSon
// // // ].note1 = item.attrValue
// // // }
// // } else if (itemSon.name === item.attrType) {
// // }
// })
})
})
console.log(
'valvalvalvalvalvalvalvalvalvalval',
this.dataForm,
this.dataView
)
}
}
}
},
computed: {},
methods: {},
created () {},
mounted () {}
}
</script>
<style lang="scss" scoped>
.wrapper {
}
</style>

View File

@ -8,150 +8,14 @@
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'"
>
<div v-if="shifoushizujian">
<el-form-item label="应用名称">
<el-input
v-model="dataForm.name"
:disabled="fieldDisabled"
placeholder="应用名称"
></el-input>
</el-form-item>
<el-form-item label="应用描述">
<el-tooltip
effect="dark"
:content="dataForm.description"
placement="top"
popper-class="kuandukuandukuandu"
>
<el-input
v-model="dataForm.description"
:disabled="fieldDisabled"
placeholder="应用描述"
></el-input>
</el-tooltip>
</el-form-item>
<el-form-item label="部门联系人">
<el-input
v-model="dataForm.deptContacts"
:disabled="fieldDisabled"
placeholder="部门联系人"
></el-input>
</el-form-item>
<el-form-item label="共享类型">
<el-input
v-model="dataForm.shareType"
:disabled="fieldDisabled"
placeholder="共享类型"
></el-input>
</el-form-item>
<el-form-item label="共享方式">
<el-input
v-model="dataForm.shareMode"
:disabled="fieldDisabled"
placeholder="共享方式"
></el-input>
</el-form-item>
<el-form-item label="共享条件">
<el-input
v-model="dataForm.shareCondition"
:disabled="fieldDisabled"
placeholder="共享方条件"
></el-input>
</el-form-item>
<el-form-item label="访问地址">
<el-input
v-model="dataForm.link"
:disabled="fieldDisabled"
placeholder="访问地址"
></el-input>
</el-form-item>
<Applicationresources></Applicationresources>
</div>
<div v-if="!shifoushizujian">
<el-form-item label="组件名称" v-if="algorithmShow">
<el-input
v-model="dataForm.name"
:disabled="fieldDisabled"
placeholder="组件名称"
></el-input>
</el-form-item>
<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
v-model="dataForm.description"
:disabled="fieldDisabled"
placeholder="应用描述"
></el-input>
</el-form-item>
<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
v-model="dataForm.deptContacts"
:disabled="fieldDisabled"
placeholder="部门联系人"
></el-input>
</el-form-item>
<el-form-item label="共享类型">
<el-input
v-model="dataForm.shareType"
:disabled="fieldDisabled"
placeholder="共享类型"
></el-input>
</el-form-item>
<el-form-item
label="共享方式"
v-if="coverageNotShow && algorithmShow"
>
<el-input
v-model="dataForm.shareMode"
:disabled="fieldDisabled"
placeholder="共享方式"
></el-input>
</el-form-item>
<el-form-item label="共享条件">
<el-input
v-model="dataForm.shareCondition"
:disabled="fieldDisabled"
placeholder="共享方条件"
></el-input>
</el-form-item>
<el-form-item label="服务接口" v-if="coverageNotShow">
<el-input
v-model="dataForm.apiUrl"
:disabled="fieldDisabled"
placeholder="服务接口"
></el-input>
</el-form-item>
<el-form-item label="接口请求方式" v-if="coverageNotShow">
<el-input
v-model="dataForm.apiMethodType"
:disabled="fieldDisabled"
placeholder="接口请求方式"
></el-input>
</el-form-item>
<div v-if="flagShow">
<ResourcesAndServices
:dataForm="dataForm"
:insertList="insertList"
></ResourcesAndServices>
</div>
<el-form-item
v-for="item in dataForm.infoList"
:key="item.index"
:label="item.attrType"
:disabled="fieldDisabled"
>
<el-input
v-model="item.attrValue"
:placeholder="item.attrType"
:disabled="fieldDisabled"
></el-input>
</el-form-item>
<el-form-item
v-if="dataForm.enclosure"
label="申请附件"
@ -176,10 +40,15 @@
<script>
import processModule from '@/mixins/process-module'
import Applicationresources from './Application-resources.vue'
import ResourcesAndServices from './ResourcesAndServices.vue'
export default {
//
mixins: [processModule],
components: {},
components: {
Applicationresources,
ResourcesAndServices
},
props: {
// fromList: {
// // type: Array,
@ -190,59 +59,48 @@ export default {
},
data () {
return {
flagShow: false,
// processVisible: true,
visible: false,
//
fieldDisabled: false,
dataForm: [],
dataForm: {},
id: '',
shifoushizujian: true,
coverageNotShow: true,
nameNotShow: false,
algorithmShow: true
algorithmShow: true,
insertList: []
}
},
watch: {},
computed: {},
methods: {
getInfo (id) {
this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
this.dataForm = res.data.resourceDTO
if (this.dataForm) {
console.log('this.dataForm', this.dataForm)
this.flagShow = true
}
})
},
methodsThree () {
this.$http.get('/category/getCategoryTree').then((res) => {
this.insertList = res.data.data
})
},
init () {
this.visible = true
// this.getInfo(this.$router.currentRoute.params.params.params.resourceDTO.id)
// this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO
// this.id=this.$router.currentRoute
this.$nextTick(() => {
this.$refs.dataForm.resetFields()
// if (this.dataForm.id) {
// KEY
this.fieldDisabled = true
// this.id = this.$router.currentRoute.businessKey
this.getInfo(this.$router.currentRoute.params.businessKey)
console.log('id', this.$router.currentRoute.params.businessKey)
// }
})
},
getInfo (id) {
this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = res.data.resourceDTO
if (this.dataForm.type != '应用资源') {
this.shifoushizujian = false
this.dataForm.infoList.forEach((val) => {
if (val.attrValue === '图层服务') {
this.coverageNotShow = false
} else if (val.attrValue === '智能算法') {
this.nameNotShow = true
this.algorithmShow = false
console.log(this.nameNotShow, 'wowowo')
}
})
} else {
this.shifoushizujian = true
}
console.log('this.dataForm', this.dataForm)
})
}
},
created () {
@ -261,7 +119,11 @@ export default {
//
this.initProcessMultiple(callbacks)
},
mounted () {}
mounted () {
const businessKey = this.$router.currentRoute.params.businessKey
this.getInfo(businessKey)
this.methodsThree()
}
}
</script>
<style lang="scss">

View File

@ -11,8 +11,8 @@
<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'>
<span v-if="item.name != '来源应用' && item.name != '关联组件信息'">{{ item.name }}</span>
<div v-for="item in child.children" :key="item.id" class='item' v-show="item.name != '来源应用' && item.name != '关联组件信息' && item.name != '技术文档'">
<span >{{ item.name }}</span>
<!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
tip="支持图片类型大小不超过100M"></upload> -->
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.jpg,.jpeg,.png' :list="item" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -298,7 +298,7 @@
}
init()
mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '使用手册' && obj.attrValue != null) {
if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter(
@ -310,7 +310,7 @@
dataFrom.value.infoList.push(obj)
if (shiyongshouce.value.attrValue) {
dataFrom.value.infoList.map((syscitem, syscindex) => {
if (syscitem.attrType == '使用手册') {
if (syscitem.attrType == '技术文档') {
dataFrom.value.infoList[syscindex] = shiyongshouce.value
}
})