我的待办,上架
This commit is contained in:
parent
cbe9efa5ea
commit
22f1091532
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="wrapper"></div>
|
||||
<div class="wrapper">22222222222222</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -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>
|
|
@ -10,7 +10,12 @@
|
|||
<div v-if="shifoushizujian">
|
||||
<Applicationresources></Applicationresources>
|
||||
</div>
|
||||
<div v-if="!shifoushizujian">22222</div>
|
||||
<div v-if="flagShow">
|
||||
<ResourcesAndServices
|
||||
:dataForm="dataForm"
|
||||
:insertList="insertList"
|
||||
></ResourcesAndServices>
|
||||
</div>
|
||||
<el-form-item
|
||||
v-if="dataForm.enclosure"
|
||||
label="申请附件"
|
||||
|
@ -36,11 +41,13 @@
|
|||
<script>
|
||||
import processModule from '@/mixins/process-module'
|
||||
import Applicationresources from './Application-resources.vue'
|
||||
import ResourcesAndServices from './ResourcesAndServices.vue'
|
||||
export default {
|
||||
// 注入公共方法
|
||||
mixins: [processModule],
|
||||
components: {
|
||||
Applicationresources
|
||||
Applicationresources,
|
||||
ResourcesAndServices
|
||||
},
|
||||
props: {
|
||||
// fromList: {
|
||||
|
@ -52,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 () {
|
||||
|
@ -123,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">
|
||||
|
|
Loading…
Reference in New Issue