Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

# Conflicts:
#	front/src/views/home/DetailsPageconetent.vue
This commit is contained in:
851673013@qq.com 2022-07-25 19:33:44 +08:00
commit 32997c5f73
12 changed files with 852 additions and 537 deletions

View File

@ -2,7 +2,7 @@ import Cookies from 'js-cookie'
import qs from 'qs' import qs from 'qs'
import { deepClone } from '@/utils/form-generator/index' import { deepClone } from '@/utils/form-generator/index'
export default { export default {
data() { data () {
/* eslint-disable */ /* eslint-disable */
return { return {
// 设置属性 // 设置属性
@ -38,19 +38,19 @@ export default {
} }
/* eslint-enable */ /* eslint-enable */
}, },
created() { created () {
if (this.mixinViewModuleOptions.createdIsNeed) { if (this.mixinViewModuleOptions.createdIsNeed) {
this.query() this.query()
} }
}, },
activated() { activated () {
if (this.mixinViewModuleOptions.activatedIsNeed) { if (this.mixinViewModuleOptions.activatedIsNeed) {
this.query() this.query()
} }
}, },
methods: { methods: {
// 获取数据列表 // 获取数据列表
query() { query () {
this.dataListLoading = true this.dataListLoading = true
this.$http.get( this.$http.get(
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({ this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
@ -109,11 +109,15 @@ export default {
} }
console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL) console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL)
// if (this.dataList[0].type === '组件服务') { if (this.dataList[0].type === '组件服务') {
// this.dataList.map(val => { this.dataList.map(val => {
// val.infoList = val.infoList.filter(item => item.attrType === '部署位置' || item.attrType === '组件类型' || item.attrType === '应用领域') val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域' || item.attrType === '组件类型')
// }) })
// } } else if (this.dataList[0].type === '应用资源') {
this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域')
})
}
if (this.mixinViewModuleOptions.requestCallback) { if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data) this.mixinViewModuleOptions.requestCallback(res.data)
} }
@ -123,11 +127,11 @@ export default {
}) })
}, },
// 多选 // 多选
dataListSelectionChangeHandle(val) { dataListSelectionChangeHandle (val) {
this.dataListSelections = val this.dataListSelections = val
}, },
// 排序 // 排序
dataListSortChangeHandle(data) { dataListSortChangeHandle (data) {
if (!data.order || !data.prop) { if (!data.order || !data.prop) {
this.order = '' this.order = ''
this.orderField = '' this.orderField = ''
@ -138,13 +142,13 @@ export default {
this.query() this.query()
}, },
// 分页, 每页条数 // 分页, 每页条数
pageSizeChangeHandle(val) { pageSizeChangeHandle (val) {
this.page = 1 this.page = 1
this.limit = val this.limit = val
this.query() this.query()
}, },
// 分页, 当前页 // 分页, 当前页
pageCurrentChangeHandle(val) { pageCurrentChangeHandle (val) {
this.page = val this.page = val
this.query() this.query()
}, },
@ -153,7 +157,7 @@ export default {
this.query() this.query()
}, },
// 新增 // 新增
addOrUpdateHandle(id) { addOrUpdateHandle (id) {
this.addOrUpdateVisible = true this.addOrUpdateVisible = true
this.disabled = false this.disabled = false
this.$nextTick(() => { this.$nextTick(() => {
@ -164,7 +168,7 @@ export default {
}, },
// 组件服务新增 // 组件服务新增
addOrUpdateHandleAI(id) { addOrUpdateHandleAI (id) {
// const infoList = [] // const infoList = []
let showList = [] let showList = []
this.$http.get('category/getCategoryTree').then(({ data: res }) => { this.$http.get('category/getCategoryTree').then(({ data: res }) => {
@ -222,7 +226,7 @@ export default {
}, 100) }, 100)
}, },
// 应用资源新增 // 应用资源新增
addOrUpdateHandleServe(id) { addOrUpdateHandleServe (id) {
// const infoList = [] // const infoList = []
let showList = [] let showList = []
this.$http.get('category/getCategoryTree').then(({ data: res }) => { this.$http.get('category/getCategoryTree').then(({ data: res }) => {
@ -280,7 +284,7 @@ export default {
}, 100) }, 100)
}, },
// 修改 // 修改
UpdateHandle(val) { UpdateHandle (val) {
this.addOrUpdateVisible = true this.addOrUpdateVisible = true
this.disabled = false this.disabled = false
const cloneVal = deepClone(val) const cloneVal = deepClone(val)
@ -305,7 +309,7 @@ export default {
}) })
}, },
// 关闭当前窗口 // 关闭当前窗口
closeCurrentTab(data) { closeCurrentTab (data) {
var tabName = this.$store.state.contentTabsActiveName var tabName = this.$store.state.contentTabsActiveName
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName) this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName)
if (this.$store.state.contentTabs.length <= 0) { if (this.$store.state.contentTabs.length <= 0) {
@ -317,7 +321,7 @@ export default {
} }
}, },
// 删除 // 删除
deleteHandle(id) { deleteHandle (id) {
if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) { if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) {
return this.$message({ return this.$message({
message: this.$t('prompt.deleteBatch'), message: this.$t('prompt.deleteBatch'),
@ -351,7 +355,7 @@ export default {
}).catch(() => { }) }).catch(() => { })
}, },
deleteHandle2(id) { deleteHandle2 (id) {
console.log('删除========================》', id, this.dataListSelections) console.log('删除========================》', id, this.dataListSelections)
const ids = [] const ids = []
if (id) { if (id) {
@ -369,7 +373,7 @@ export default {
}) })
}, },
// 导出 // 导出
exportHandle() { exportHandle () {
var params = qs.stringify({ var params = qs.stringify({
token: Cookies.get('ucsToken'), token: Cookies.get('ucsToken'),
...this.dataForm ...this.dataForm

View File

@ -66,6 +66,38 @@
header-align="center" header-align="center"
align="center" align="center"
></af-table-column> ></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="description"
label="组件描述"
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="deptName"
label="归属部门"
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="deptContacts"
label="部门联系人"
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="deptPhone"
label="部门联系人电话"
header-align="center"
align="center"
></af-table-column>
<af-table-column <af-table-column
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
width="280" width="280"
@ -74,18 +106,18 @@
header-align="center" header-align="center"
align="center" align="center"
></af-table-column> ></af-table-column>
<template v-if="dataList[0] && dataList[0].infoList"> <template v-if="dataList[0] && dataList[0].infoList2">
<af-table-column <af-table-column
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
width="300" width="280"
v-for="(item, index) in dataList[0].infoList" v-for="(item, index) in dataList[0].infoList2"
:key="index" :key="index"
:label="item.attrType" :label="item.attrType"
header-align="center" header-align="center"
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ findValue(scope.row.infoList, item.attrType) }} {{ findValue(scope.row.infoList2, item.attrType) }}
</template> </template>
</af-table-column> </af-table-column>
</template> </template>
@ -94,7 +126,7 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="150" width="300"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button <!-- <el-button
@ -187,10 +219,14 @@
width="50%" width="50%"
> >
<putOnTheShelf <putOnTheShelf
ref="putOnTheShelf"
:putOnTheShelfList="putOnTheShelfList" :putOnTheShelfList="putOnTheShelfList"
@changeInfoList="changeInfoList" @changeInfoList="changeInfoList"
:type="radio" :type="radio"
:typeInput="typeInput" :typeInput="typeInput"
:required="required"
:notFilled="notFilled"
@submitData="submitData"
></putOnTheShelf> ></putOnTheShelf>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="clear"> </el-button> <el-button @click="clear"> </el-button>
@ -211,6 +247,8 @@ export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data () { data () {
return { return {
required: ['归属部门', '部门联系人', '部门联系人电话', '应用领域', '共享条件', '算法名称', '算法描述', '图层名称', '图层描述', '组件名称', '组件描述', '组件地址', '服务地址', '服务接口', '接口请求方式', '算法类别'],
notFilled: [],
insertList: [], insertList: [],
putOnTheShelfList: [], putOnTheShelfList: [],
radio: '', radio: '',
@ -300,19 +338,18 @@ export default {
this.dataList = this.mixinViewModuleOptions.getDataListIsPage this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list ? res.data.list
: res.data : res.data
// this.dataList.map((item, index) => { this.dataList.map((item, index) => {
// const dataListSinforList = [] const dataListSinforList = []
// item.infoList.map((itemson, indexson) => { item.infoList.map((itemson, indexson) => {
// if ( if (
// itemson.attrType === '' || itemson.attrType === '应用领域' ||
// itemson.attrType === '' || itemson.attrType === '组件类型'
// itemson.attrType === '' ) {
// ) { dataListSinforList.push(itemson)
// dataListSinforList.push(itemson) }
// } })
// }) this.dataList[index].infoList2 = dataListSinforList
// this.dataList[index].infoList = dataListSinforList })
// })
console.log('this.dataList', this.dataList) console.log('this.dataList', this.dataList)
this.total = this.mixinViewModuleOptions.getDataListIsPage this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total ? res.data.total
@ -387,19 +424,18 @@ export default {
this.mixinViewModuleOptions.requestCallback(res.data) this.mixinViewModuleOptions.requestCallback(res.data)
} }
this.dataListLoading = false this.dataListLoading = false
// this.dataList.map((item, index) => { this.dataList.map((item, index) => {
// const dataListSinforList = [] const dataListSinforList = []
// item.infoList.map((itemson, indexson) => { item.infoList.map((itemson, indexson) => {
// if ( if (
// itemson.attrType === '' || itemson.attrType === '应用领域' ||
// itemson.attrType === '' || itemson.attrType === '组件类型'
// itemson.attrType === '' ) {
// ) { dataListSinforList.push(itemson)
// dataListSinforList.push(itemson) }
// } })
// }) this.dataList[index].infoList2 = dataListSinforList
// this.dataList[index].infoList = dataListSinforList })
// })
} else { } else {
this.$message.error('未查询到相关信息') this.$message.error('未查询到相关信息')
this.reset() this.reset()
@ -448,6 +484,7 @@ export default {
// //
clear () { clear () {
console.log('清空----------------------------------------') console.log('清空----------------------------------------')
this.notFilled = []
this.showPutOnTheShelfFlag = false this.showPutOnTheShelfFlag = false
this.showPutOnTheShelfFlag2 = false this.showPutOnTheShelfFlag2 = false
this.insertList = [] this.insertList = []
@ -490,8 +527,24 @@ export default {
) )
this.submitFrom.infoList.push(obj) this.submitFrom.infoList.push(obj)
}, },
changeAdd () {
const arr = []
switch (this.radio) {
case '智能算法':
arr.push('算法优势')
arr.push('计费标准信息')
break
case '开发组件':
case '业务组件':
arr.push('功能介绍')
break
}
arr.push('应用场景')
arr.push('常见问题')
this.$refs.putOnTheShelf.submit(arr)
},
submitData () { submitData () {
console.log('提交11111111111===============>', this.putOnTheShelfList) console.log('提交11111111111===============>', this.putOnTheShelfList, this.submitFrom)
const arr = [] const arr = []
this.putOnTheShelfList.map((item) => { this.putOnTheShelfList.map((item) => {
item.children.map((child) => { item.children.map((child) => {
@ -527,7 +580,7 @@ export default {
(item) => item.attrType !== val.name (item) => item.attrType !== val.name
) )
} }
if (val.note1) { if (val.note1 == '' || val.note1) {
switch (val.name) { switch (val.name) {
case '算法名称': case '算法名称':
case '应用名称': case '应用名称':
@ -603,51 +656,94 @@ export default {
this.submitFrom.infoList = this.submitFrom.infoList.sort( this.submitFrom.infoList = this.submitFrom.infoList.sort(
(a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType) (a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
) )
if (this.submitFrom.id) { this.notFilled = []
// if (!this.submitFrom.name) {
this.submitFrom.infoList.map((val) => { this.notFilled.push('算法名称')
if (val.attrType === '组件类型') { this.notFilled.push('图层名称')
val.attrValue = this.radio this.notFilled.push('组件名称')
} }
if (!this.submitFrom.description) {
this.notFilled.push('算法描述')
this.notFilled.push('图层描述')
this.notFilled.push('组件描述')
}
if (!this.submitFrom.shareCondition) {
this.notFilled.push('共享条件')
}
if (!this.submitFrom.deptContacts) {
this.notFilled.push('部门联系人')
}
if (!this.submitFrom.deptPhone) {
this.notFilled.push('部门联系人电话')
}
if (this.radio === '智能算法' && !this.submitFrom.apiUrl) {
this.notFilled.push('服务接口')
}
if (this.radio === '智能算法' && !this.submitFrom.apiMethodType) {
this.notFilled.push('接口请求方式')
}
if (this.radio === '智能算法' && (!this.submitFrom.infoList.filter(val => val.attrType === '算法类别')[0] || !this.submitFrom.infoList.filter(val => val.attrType === '算法类别')[0].attrValue)) {
this.notFilled.push('算法类别')
}
if (!this.submitFrom.infoList.filter(val => val.attrType === '应用领域')[0] || !this.submitFrom.infoList.filter(val => val.attrType === '应用领域')[0].attrValue) {
this.notFilled.push('应用领域')
}
if (this.radio === '图层服务' && (!this.submitFrom.infoList.filter(val => val.attrType === '服务地址')[0] || !this.submitFrom.infoList.filter(val => val.attrType === '服务地址')[0].attrValue)) {
this.notFilled.push('服务地址')
}
if ((this.radio === '业务组件' || this.radio === '开发组件') && (!this.submitFrom.infoList.filter(val => val.attrType === '组件地址')[0] || !this.submitFrom.infoList.filter(val => val.attrType === '组件地址')[0].attrValue)) {
this.notFilled.push('组件地址')
}
console.log(this.submitFrom, this.notFilled, '表单验证')
if (this.notFilled.length > 0) {
this.$message({
message: '请填写必填字段!',
type: 'warning'
}) })
console.log('编辑===============>', this.submitFrom)
console.log(this.submitFrom.infoList, '===============abc')
//
const newArr = this.submitFrom.infoList.filter(
(element, index, self) => {
return (
self.findIndex((x) => x.attrType === element.attrType) === index
)
}
)
this.submitFrom.infoList = newArr
console.log(
this.submitFrom.infoList,
'====================================wpwpwp'
)
this.$http
.put('/resource/update', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('修改失败!')
} else {
this.$message.success('修改成功!')
this.clear()
}
})
.catch(() => {})
} else { } else {
this.$http if (this.submitFrom.id) {
.post('/resource/insert?source= b', this.submitFrom) //
.then(({ data: res }) => { this.submitFrom.infoList.map((val) => {
if (res.code !== 0) { if (val.attrType === '组件类型') {
this.$message.error('上架失败!') val.attrValue = this.radio
} else {
this.$message.success('上架成功!')
this.clear()
} }
}) })
.catch(() => {}) console.log('编辑===============>', this.submitFrom)
console.log(this.submitFrom.infoList, '===============abc')
//
const newArr = this.submitFrom.infoList.filter(
(element, index, self) => {
return (
self.findIndex((x) => x.attrType === element.attrType) === index
)
}
)
this.submitFrom.infoList = newArr
this.$http
.put('/resource/update', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('修改失败!')
} else {
this.$message.success('修改成功!')
this.clear()
}
})
.catch(() => {})
} else {
console.log('提交11111111111===============>', this.putOnTheShelfList, this.submitFrom)
this.$http
.post('/resource/insert?source= b', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('上架失败!')
} else {
this.$message.success('上架成功!')
this.clear()
}
})
.catch(() => {})
}
} }
}, },
// //

View File

@ -61,22 +61,65 @@
width="50" width="50"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
:show-overflow-tooltip="true"
width="280"
prop="name" prop="name"
label="应用名称" label="应用名称"
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> ></el-table-column>
<template v-if="dataList[0] && dataList[0].infoList"> <af-table-column
:show-overflow-tooltip="true"
width="280"
prop="description"
label="应用描述"
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="deptName"
label="归属部门"
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="deptContacts"
label="部门联系人"
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="deptPhone"
label="部门联系人电话"
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="shareCondition"
label="共享条件"
header-align="center"
align="center"
></af-table-column>
<template v-if="dataList[0] && dataList[0].infoList2">
<el-table-column <el-table-column
v-for="(item, index) in dataList[0].infoList" v-for="(item, index) in dataList[0].infoList2"
:key="index" :key="index"
:label="item.attrType" :label="item.attrType"
header-align="center" header-align="center"
align="center" align="center"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
width="280"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ findValue(scope.row.infoList, item.attrType) }} {{ findValue(scope.row.infoList2, item.attrType) }}
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
@ -85,8 +128,7 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="94" width="300"
right="0"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -169,7 +211,7 @@
:destroy-on-close='true' :destroy-on-close='true'
:before-close='clear' :before-close='clear'
width="50%"> width="50%">
<putOnTheShelf :putOnTheShelfList='putOnTheShelfList' @changeInfoList='changeInfoList' :type='radio' :typeInput='typeInput'></putOnTheShelf> <putOnTheShelf :required="required" :notFilled="notFilled":putOnTheShelfList='putOnTheShelfList' @changeInfoList='changeInfoList' :type='radio' :typeInput='typeInput'></putOnTheShelf>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="clear"> </el-button> <el-button @click="clear"> </el-button>
<el-button type="primary" @click="submitData"> </el-button> <el-button type="primary" @click="submitData"> </el-button>
@ -191,6 +233,8 @@ export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data () { data () {
return { return {
required: ['归属部门', '部门联系人', '部门联系人电话', '应用领域', '共享条件', '应用名称', '应用描述', '应用状态', '应用类型'],
notFilled: [],
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: '/resource/page', getDataListURL: '/resource/page',
getDataListIsPage: true, getDataListIsPage: true,
@ -282,6 +326,17 @@ export default {
this.mixinViewModuleOptions.requestCallback(res.data) this.mixinViewModuleOptions.requestCallback(res.data)
} }
this.dataListLoading = false this.dataListLoading = false
this.dataList.map((item, index) => {
const dataListSinforList = []
item.infoList.map((itemson, indexson) => {
if (
itemson.attrType === '应用领域'
) {
dataListSinforList.push(itemson)
}
})
this.dataList[index].infoList2 = dataListSinforList
})
}) })
.catch(() => { .catch(() => {
this.dataListLoading = false this.dataListLoading = false
@ -347,6 +402,17 @@ export default {
this.mixinViewModuleOptions.requestCallback(res.data) this.mixinViewModuleOptions.requestCallback(res.data)
} }
this.dataListLoading = false this.dataListLoading = false
this.dataList.map((item, index) => {
const dataListSinforList = []
item.infoList.map((itemson, indexson) => {
if (
itemson.attrType === '应用领域'
) {
dataListSinforList.push(itemson)
}
})
this.dataList[index].infoList2 = dataListSinforList
})
} else { } else {
this.$message.error('未查询到相关信息') this.$message.error('未查询到相关信息')
this.reset() this.reset()
@ -485,6 +551,7 @@ export default {
}, },
// //
clear () { clear () {
this.notFilled = []
this.showPutOnTheShelfFlag2 = false this.showPutOnTheShelfFlag2 = false
this.insertList = [] this.insertList = []
this.putOnTheShelfList = [] this.putOnTheShelfList = []
@ -517,7 +584,6 @@ export default {
this.submitFrom.infoList.push(obj) this.submitFrom.infoList.push(obj)
}, },
submitData () { submitData () {
this.showPutOnTheShelfFlag2 = false
const arr = [] const arr = []
this.putOnTheShelfList.map(item => { this.putOnTheShelfList.map(item => {
item.children.map(child => { item.children.map(child => {
@ -537,7 +603,7 @@ export default {
if (val.type === 'input' || val.type === 'textArea' || val.type === 'select' || val.type === 'checkBox' || val.type === 'radio') { if (val.type === 'input' || val.type === 'textArea' || val.type === 'select' || val.type === 'checkBox' || val.type === 'radio') {
this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== val.name) this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== val.name)
} }
if (val.note1) { if (val.note1 || val.note1) {
switch (val.name) { switch (val.name) {
case '算法名称': case '算法名称':
case '应用名称': case '应用名称':
@ -603,37 +669,74 @@ export default {
}) })
}) })
this.submitFrom.infoList = this.submitFrom.infoList.sort((a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType)) this.submitFrom.infoList = this.submitFrom.infoList.sort((a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType))
if (this.submitFrom.id) { this.notFilled = []
// console.log(this.submitFrom, '表单验证')
this.submitFrom.infoList.map(val => { if (!this.submitFrom.name) {
if (val.attrType === '组件类型') { this.notFilled.push('应用名称')
val.attrValue = this.radio }
} if (!this.submitFrom.description) {
this.notFilled.push('应用描述')
}
if (!this.submitFrom.shareCondition) {
this.notFilled.push('共享条件')
}
if (!this.submitFrom.deptContacts) {
this.notFilled.push('部门联系人')
}
if (!this.submitFrom.deptPhone) {
this.notFilled.push('部门联系人电话')
}
if (!this.submitFrom.infoList.filter(val => val.attrType == '应用领域')[0] || !this.submitFrom.infoList.filter(val => val.attrType == '应用领域')[0].attrValue) {
this.notFilled.push('应用领域')
}
if (!this.submitFrom.infoList.filter(val => val.attrType == '应用状态')[0] || !this.submitFrom.infoList.filter(val => val.attrType == '应用状态')[0].attrValue) {
this.notFilled.push('应用状态')
}
if (!this.submitFrom.infoList.filter(val => val.attrType == '应用类型')[0] || !this.submitFrom.infoList.filter(val => val.attrType == '应用类型')[0].attrValue) {
this.notFilled.push('应用类型')
}
if (this.notFilled.length > 0) {
this.$message({
message: '请填写必填字段!',
type: 'warning'
}) })
console.log('编辑===============>', this.submitFrom)
this.$http
.put('/resource/update', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('修改失败!')
} else {
this.$message.success('修改成功!')
this.clear()
}
})
.catch(() => {})
} else { } else {
this.$http if (this.submitFrom.id) {
.post('/resource/insert?source= b', this.submitFrom) //
.then(({ data: res }) => { this.submitFrom.infoList.map(val => {
if (res.code !== 0) { if (val.attrType === '组件类型') {
this.$message.error('上架失败!') val.attrValue = this.radio
} else {
this.$message.success('上架成功!')
this.clear()
} }
}) })
.catch(() => {}) console.log('编辑===============>', this.submitFrom)
this.$http
.put('/resource/update', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('修改失败!')
this.showPutOnTheShelfFlag2 = false
} else {
this.$message.success('修改成功!')
this.showPutOnTheShelfFlag2 = false
this.clear()
}
})
.catch(() => {})
} else {
this.$http
.post('/resource/insert?source= b', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('上架失败!')
this.showPutOnTheShelfFlag2 = false
} else {
this.$message.success('上架成功!')
this.showPutOnTheShelfFlag2 = false
this.clear()
}
})
.catch(() => {})
}
} }
}, },
// //

View File

@ -16,12 +16,13 @@ js:
<template> <template>
<div id="inputSelectCheckbox"> <div id="inputSelectCheckbox">
<!-- input框 --> <!-- input框 -->
<a-input v-if="type == 'input'" v-model:value="data.note1" :placeholder="'请输入' + name" /> <a-input v-if="type == 'input'" v-model:value="data.note1" :placeholder="'请输入' + name" @change="changeIiem(name,data.note1)"/>
<!-- 下拉框 --> <!-- 下拉框 -->
<el-select <el-select
v-else-if="(type === 'select' && name !== '归属部门' && name !== '使用方式') || type == 'radio'" v-else-if="(type === 'select' && name !== '归属部门' && name !== '使用方式') || type == 'radio'"
style="width: 240px" style="width: 240px"
v-model:value="data.note1" v-model:value="data.note1"
@change="changeIiem(name,data.note1)"
:placeholder="'请选择' + name"> :placeholder="'请选择' + name">
<el-option <el-option
:value="itemSelect.dictLabel" :value="itemSelect.dictLabel"
@ -36,6 +37,7 @@ js:
v-model:value="data.note1" v-model:value="data.note1"
filterable filterable
placeholder="请输入关键词" placeholder="请输入关键词"
@change="changeIiem(name,data.note1)"
:loading="loading"> :loading="loading">
<el-option <el-option
v-for="(itemSelect) in options" v-for="(itemSelect) in options"
@ -73,12 +75,13 @@ js:
v-model="value" v-model="value"
:placeholder="'请输入' + name" :placeholder="'请输入' + name"
:disabled="true" :disabled="true"
@change="changeIiem(name,data.note1)"
/> />
<!-- 单选 --> <!-- 单选 -->
<!-- <el-radio-group v-model:value="data.note1" v-else-if="type == 'radio'"> <!-- <el-radio-group v-model:value="data.note1" v-else-if="type == 'radio'">
<el-radio v-for="item in options" :label="item.dictLabel" :key="item.dictLabel">{{item.dictLabel}}</el-radio> <el-radio v-for="item in options" :label="item.dictLabel" :key="item.dictLabel">{{item.dictLabel}}</el-radio>
</el-radio-group> --> </el-radio-group> -->
<a-textarea v-else-if="type == 'textArea'" v-model:value="data.note1" :showCount="true" :maxlength="200" :placeholder="'请填写' + name" /> <a-textarea v-else-if="type == 'textArea'" @change="changeIiem(name,data.note1)" v-model:value="data.note1" :showCount="true" :maxlength="200" :placeholder="'请填写' + name" />
</div> </div>
</template> </template>
<script> <script>
@ -92,6 +95,7 @@ export default {
data: Array, data: Array,
name: String, name: String,
value: String, value: String,
changeField: Array,
options: { options: {
type: Array, type: Array,
default: null default: null
@ -108,6 +112,15 @@ export default {
} }
}, },
methods: { methods: {
changeIiem (name, value) {
if (value && value !== '' && this.changeField.indexOf(name) == -1) {
this.changeField.push(name)
} else if (!value || value == '') {
if (this.changeField.indexOf(name) > -1) {
this.changeField.splice(this.changeField.indexOf(name), 1)
}
}
},
selectOptions () { selectOptions () {
if (this.data.isLinkToDic === 'true' && this.data.linkValue) { if (this.data.isLinkToDic === 'true' && this.data.linkValue) {
this.$http this.$http
@ -140,7 +153,7 @@ export default {
// dataList.push(element) // dataList.push(element)
// }) // })
// this.options = dataList // this.options = dataList
if (!this.data.note1) { if (this.data.note1 == null) {
this.$http.get('/sys/user/info').then(({ data: res }) => { this.$http.get('/sys/user/info').then(({ data: res }) => {
console.log(res.data) console.log(res.data)
this.data.note1 = res.data.realName || '' this.data.note1 = res.data.realName || ''
@ -154,7 +167,7 @@ export default {
// dataList.push(element) // dataList.push(element)
// }) // })
// this.options = dataList // this.options = dataList
if (!this.data.note1) { if (this.data.note1 == null) {
this.$http.get('/sys/user/info').then(({ data: res }) => { this.$http.get('/sys/user/info').then(({ data: res }) => {
console.log(res.data) console.log(res.data)
this.data.note1 = res.data.mobile || '' this.data.note1 = res.data.mobile || ''
@ -172,6 +185,13 @@ export default {
} }
}) })
this.data.note1 = str this.data.note1 = str
if (str !== '' && this.changeField.indexOf('应用领域') == -1) {
this.changeField.push('应用领域')
} else if (str == '') {
if (this.changeField.indexOf('应用领域') > -1) {
this.changeField.splice(this.changeField.indexOf('应用领域'), 1)
}
}
}, },
showTypeClick (e) { showTypeClick (e) {
this.showType = e this.showType = e

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-08 09:54:50 * @Date: 2022-07-08 09:54:50
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-11 16:18:00 * @LastEditTime: 2022-07-25 11:20:25
* @Description: 多条数据特殊处理 * @Description: 多条数据特殊处理
--> -->
<template> <template>
@ -33,7 +33,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="add">添加更多{{ configure.name }}</div> <!-- <div class="add">添加更多{{ configure.name }}</div> -->
<div class="form" v-for="(val, index) in configure.list" :key="'key3' + val.name + index"> <div class="form" v-for="(val, index) in configure.list" :key="'key3' + val.name + index">
<span>{{ val.name }}</span> <span>{{ val.name }}</span>
<a-input v-model:value="val.note1" ::maxlength="24" :placeholder="'请填写' + val.name + ',不超过24个字符'" <a-input v-model:value="val.note1" ::maxlength="24" :placeholder="'请填写' + val.name + ',不超过24个字符'"
@ -42,7 +42,7 @@
<a-input <a-input
v-model:value="val.note1" v-model:value="val.note1"
:placeholder="'请填写' + val.name" :placeholder="'请填写' + val.name"
style="width: calc(100% - 150px);" style="width: 570px;"
/> />
<span style="width: 2.5rem; padding-left: 0.1rem"> <span style="width: 2.5rem; padding-left: 0.1rem">
{{ {{
@ -93,7 +93,8 @@ export default {
} }
}, },
methods: { methods: {
add (title) { add (title, addFlag, submitFlag) {
console.log(title, addFlag, submitFlag)
const list = this.configure.list const list = this.configure.list
let flag = true let flag = true
list.forEach((item) => { list.forEach((item) => {
@ -142,10 +143,23 @@ export default {
}) })
list.forEach((item) => { list.forEach((item) => {
item.note1 = '' item.note1 = ''
this.showKey++
}) })
this.showKey++ if (addFlag && submitFlag) {
this.$emit('submitData')
}
} else { } else {
this.$message.warning('请填写完整') if (!addFlag) {
this.$message.warning('请填写完整')
} else {
list.forEach((item) => {
item.note1 = ''
this.showKey++
})
if (submitFlag) {
this.$emit('submitData')
}
}
} }
}, },
del (title, index) { del (title, index) {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-08 09:48:52 * @Date: 2022-07-08 09:48:52
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-11 15:11:10 * @LastEditTime: 2022-07-25 15:57:25
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -21,7 +21,11 @@
(showTypeName == 'SDK' && item.name == '接口请求方式') || (showTypeName == 'SDK' && item.name == '接口请求方式') ||
(showTypeName == 'SDK' && item.name == '服务接口') (showTypeName == 'SDK' && item.name == '服务接口')
)"> )">
<span >{{ item.name }}</span> <div class="box">
<div>
<span class="required" v-if="required.indexOf(item.name) > -1">*</span>
{{ item.name }}
</div>
<!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item" <!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
tip="支持图片类型大小不超过100M"></upload> --> tip="支持图片类型大小不超过100M"></upload> -->
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.jpg,.jpeg,.png' :list="item" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" <upload @changeInfoList='changeInfoList' :title='item.name' accept='.jpg,.jpeg,.png' :list="item" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1"
@ -34,17 +38,20 @@
tip="支持视频类型大小不超过100M"></upload> 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" <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> 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 :changeField='changeField' :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 :changeField='changeField' :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 :changeField='changeField' :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" @show-type="showType"></input-select-checkbox> <input-select-checkbox :changeField='changeField' :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 :changeField='changeField' :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 :changeField='changeField' :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> <input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'textArea'" type="textArea" :data="item" :name="item.name"></input-select-checkbox>
</div>
<div class="requiredTips" v-show="notFilled.indexOf(item.name) > -1 && (item.type=='input' || item.type=='textArea') && changeField.indexOf(item.name) == -1">请填写{{item.name}}</div>
<div class="requiredTips" v-show="notFilled.indexOf(item.name) > -1 && (item.type=='select' || item.type=='checkBox' || item.type=='radio') && changeField.indexOf(item.name) == -1">请选择{{item.name}}</div>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<special :configure='judgmentType.filter(item => item.name==child.name)[0]' :showData='child' @changeInfoList='changeInfoList'></special> <special @submitData="submitData" ref="specialRef" :configure='judgmentType.filter(item => item.name==child.name)[0]' :showData='child' @changeInfoList='changeInfoList'></special>
</template> </template>
</div> </div>
</div> </div>
@ -64,10 +71,13 @@ export default {
props: { props: {
type: String, type: String,
putOnTheShelfList: Array, putOnTheShelfList: Array,
typeInput: String typeInput: String,
required: Array,
notFilled: Array
}, },
data () { data () {
return { return {
changeField: [],
judgmentType: [ judgmentType: [
{ {
name: '算法优势', name: '算法优势',
@ -182,6 +192,21 @@ export default {
this.defaultContent() this.defaultContent()
}, },
methods: { methods: {
//
submit (arr) {
console.log('提交', arr.length, this.$refs.specialRef)
arr.map((val, index) => {
if (index === arr.length - 1) {
this.$refs.specialRef[index].add(val, true, true)
} else {
this.$refs.specialRef[index].add(val, true, false)
}
})
},
submitData () {
// console.log('')
this.$emit('submitData')
},
changeInfoList (obj) { changeInfoList (obj) {
this.$emit('changeInfoList', obj) this.$emit('changeInfoList', obj)
}, },
@ -241,11 +266,27 @@ export default {
} }
} }
.item { .item {
display: flex; position: relative;
align-items: center; .box{
margin: 25px 0; display: flex;
& > span:nth-of-type(1) { align-items: center;
width: 105px; margin: 25px 0;
& > div:nth-of-type(1) {
width: 105px;
display: flex;
align-items: center;
}
.required{
color: #f56c6c;
margin-right: 3px;
}
}
.requiredTips{
font-size: 14px;
color: #f56c6c;
position: absolute;
bottom:-20px;
left:110px;
} }
} }
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27 * @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 17:39:25 * @LastEditTime: 2022-07-25 17:30:32
* @Description: 应用上架 * @Description: 应用上架
--> -->
<template> <template>
@ -35,6 +35,7 @@
'归属部门', '归属部门',
'部门联系人', '部门联系人',
'部门联系人电话', '部门联系人电话',
'共享条件',
]" ]"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
@ -60,7 +61,7 @@
v-else-if="showView === '部署与应用'" v-else-if="showView === '部署与应用'"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:externalField="['共享条件', '共享类型']" :externalField="['共享类型']"
:configure="bs" :configure="bs"
@submit="submit()" @submit="submit()"
@back="back()" @back="back()"

View File

@ -14,8 +14,9 @@
<div></div> <div></div>
</div> </div>
<template v-if="title.isConfigure"> <template v-if="title.isConfigure">
<div class="bottom"> <a-form ref="formRef" :model="data" name="basic">
<!-- <div class="items" v-if="data[title.name].length > 0"> <div class="bottom">
<!-- <div class="items" v-if="data[title.name].length > 0">
<div <div
class="item" class="item"
v-for="(val, index) in data[title.name]" v-for="(val, index) in data[title.name]"
@ -43,74 +44,75 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<div
v-for="(val, index) in data[title.name]"
:key="'key1' + val.name + index"
>
<div <div
style=" v-for="(val, index) in data[title.name]"
font-size: 0.18rem; :key="'key1' + val.name + index"
font-weight: 600;
display: flex;
justify-content: flex-start;
"
> >
<span>{{ title.name }}-{{ index + 1 }}</span> <div
<a-popconfirm style="
:title="'是否删除该条' + title.name + '?'" font-size: 0.18rem;
ok-text="是" font-weight: 600;
cancel-text="否" display: flex;
@confirm="del(title.name, index)" justify-content: flex-start;
"
> >
<div class="del"> <span>{{ title.name }}-{{ index + 1 }}</span>
<i class="delImg"></i> <a-popconfirm
<div>删除</div> :title="'是否删除该条' + title.name + '?'"
</div> ok-text="是"
</a-popconfirm> cancel-text="否"
</div> @confirm="del(title.name, index)"
<div >
class="form" <div class="del">
v-for="attr in props.configure.filter( <i class="delImg"></i>
(item, index2) => item.name === title.name <div>删除</div>
)[0].list" </div>
:key="'key2' + attr.name + index2" </a-popconfirm>
> </div>
<span>{{ attr.name }}</span> <div
<a-input class="form"
disabled v-for="attr in props.configure.filter(
v-model:value="val[attr.field]" (item, index2) => item.name === title.name
:maxlength="24" )[0].list"
:placeholder="'请填写' + attr.name + ',不超过24个字符'" :key="'key2' + attr.name + index2"
v-if="attr.type == 'input'" >
/> <span>{{ attr.name }}</span>
<template v-if="attr.type == 'input2'">
<a-input <a-input
disabled disabled
v-model:value="val[attr.field]" v-model:value="val[attr.field]"
:placeholder="'请填写' + attr.name" :maxlength="24"
:placeholder="'请填写' + attr.name + ',不超过24个字符'"
v-if="attr.type == 'input'"
/> />
</template> <template v-if="attr.type == 'input2'">
<a-textarea <a-input
disabled disabled
v-model:value="val[attr.field]" v-model:value="val[attr.field]"
:showCount="true" :placeholder="'请填写' + attr.name"
:maxlength="200" />
:placeholder="'请填写' + attr.name" </template>
v-else-if="attr.type == 'textArea'" <a-textarea
/> disabled
<!-- <a-radio-group v-model:value="val[attr.field]"
:showCount="true"
:maxlength="200"
:placeholder="'请填写' + attr.name"
v-else-if="attr.type == 'textArea'"
/>
<!-- <a-radio-group
v-model:value="val[attr.field]" v-model:value="val[attr.field]"
:options="val.options" :options="val.options"
@change="radioChange" @change="radioChange"
v-else-if="attr.type == 'radio'" v-else-if="attr.type == 'radio'"
/> --> /> -->
<div v-else-if="attr.type == 'radio'"> <div v-else-if="attr.type == 'radio'">
{{ val[attr.field] + (attr.company || '') }} {{ val[attr.field] + (attr.company || '') }}
</div> </div>
<span v-else-if="attr.type === 'image'"> <span v-else-if="attr.type === 'image'">
<a-image :width="85" :height="60" :src="val.img" /> <a-image :width="85" :height="60" :src="val.img" />
</span> </span>
<!-- <upload <!-- <upload
:key="showKey" :key="showKey"
type="图片" type="图片"
btnName="上传图片" btnName="上传图片"
@ -120,335 +122,346 @@
tip="支持图片类型大小不超过100M" tip="支持图片类型大小不超过100M"
v-else-if="val.type == 'image'" v-else-if="val.type == 'image'"
></upload> --> ></upload> -->
</div>
</div>
<!-- <div class="add" @click="add(title.name)">
添加更多{{ title.name }}
</div> -->
<div style="font-size: 0.18rem; font-weight: 600">
<span>{{ title.name }}-{{ data[title.name].length + 1 }}</span>
</div>
<div
class="form"
v-for="(val, index) in props.configure.filter(
(item) => item.name === title.name
)[0].list"
:key="'key3' + val.name + index"
>
<span>{{ val.name }}</span>
<a-input
v-model:value="val.note1"
:maxlength="24"
:placeholder="'请填写' + val.name + ',不超过24个字符'"
v-if="val.type == 'input'"
/>
<template v-if="val.type == 'input2'">
<a-input
v-model:value="val.note1"
:placeholder="'请填写' + val.name"
/>
<span style="width: 0.5rem; padding-left: 0.1rem">
{{
numType == '一次性买断'
? '元'
: numType == '按调用次数'
? '元/次'
: numType == '按并发路数'
? '元/路'
: numType == '按年计费'
? '元/年'
: ''
}}
</span>
</template>
<a-textarea
v-model:value="val.note1"
:showCount="true"
:maxlength="200"
:placeholder="'请填写' + val.name"
v-else-if="val.type == 'textArea'"
/>
<a-input-number
v-model:value="val.note1"
:min="0"
:max="9999"
:step="0.01"
string-mode
:placeholder="'请填写' + val.name"
v-else-if="val.type == 'number'"
/>
<a-radio-group
v-model:value="val.note1"
:options="val.options"
@change="radioChange"
v-else-if="val.type == 'radio'"
/>
<upload
:key="showKey"
type="图片"
btnName="上传图片"
:maxCount="1"
:data="val"
:list="[]"
tip="支持图片类型大小不超过100M"
v-else-if="val.type == 'image'"
></upload>
</div>
<div class="submit">
<a-button type="primary" @click="add(title.name)">
添加更多{{ title.name }}
</a-button>
</div>
</div>
</template>
<template v-else>
<div class="bottom">
<div
class="form"
v-for="item in title.children"
:key="item.id"
v-show="
!(
(showType == '调用接口' && item.name == '平台地址') ||
(showType == '调用接口' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == '接口请求方式') ||
(showType == '平台对接' && item.name == '服务接口') ||
(showType == 'SDK' && item.name == '平台地址') ||
(showType == 'SDK' && item.name == '接口请求方式') ||
(showType == 'SDK' && item.name == '服务接口')
)
"
>
<span>{{ item.name }}</span>
<a-input
v-if="item.type == 'input' && item.name.indexOf('名称') == -1"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
/>
<a-input
v-else-if="
item.type == 'input' && item.name.indexOf('名称') != -1
"
:maxLength="50"
v-model:value="item.note1"
:placeholder="'请输入' + item.name + '不超过50个字符'"
/>
<a-radio-group
v-else-if="item.type == 'radio'"
v-model:value="item.note1"
:options="item.options"
/>
<a-input
v-else-if="item.type == 'AbilityType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-input
v-else-if="item.type == 'ComponentType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-textarea
v-else-if="item.type == 'textArea'"
v-model:value="item.note1"
:showCount="true"
:maxlength="200"
:placeholder="'请输入' + item.name"
/>
<upload
v-else-if="item.type == 'image'"
type="图片"
btnName="上传图片"
:maxCount="1"
:data="item"
:list="props.imgList"
tip="支持图片类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'file' && item.name !== '使用手册'"
type="文件"
btnName="上传附件"
:maxCount="1"
:data="item"
:list="props.fileList"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.name == '使用手册'"
type="文件"
btnName="上传附件"
:maxCount="1"
:data="item"
:busType="2"
:list="props.fileList2"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div
class="Technical-text"
v-else-if="item.type == 'richText'"
@click="showTextFunction()"
>
编辑富文本
<div
v-if="showText"
class="fuwenbenbianjiqi"
style="position: absolute; z-index: 10000"
>
<VueTemplateDemo :dataFrom="props.dataFrom"></VueTemplateDemo>
</div> </div>
</div> </div>
<upload <!-- <div class="add" @click="add(title.name)">
v-else-if="item.type == 'video'" 添加更多{{ title.name }}
type="视频" </div> -->
btnName="上传视频" <div style="font-size: 0.18rem; font-weight: 600">
:maxCount="1" <span>{{ title.name }}-{{ data[title.name].length + 1 }}</span>
:data="item" </div>
:list="props.videoList" <div
tip="支持视频类型大小不超过100M" class="form"
></upload> v-for="(val, index) in props.configure.filter(
<!-- <a-button (item) => item.name === title.name
)[0].list"
:key="'key3' + val.name + index"
>
<span>{{ val.name }}</span>
<a-input
v-model:value="val.note1"
:maxlength="24"
:placeholder="'请填写' + val.name + ',不超过24个字符'"
v-if="val.type == 'input'"
/>
<template v-if="val.type == 'input2'">
<a-input
v-model:value="val.note1"
:placeholder="'请填写' + val.name"
/>
<span style="width: 0.5rem; padding-left: 0.1rem">
{{
numType == '一次性买断'
? '元'
: numType == '按调用次数'
? '元/次'
: numType == '按并发路数'
? '元/路'
: numType == '按年计费'
? '元/年'
: ''
}}
</span>
</template>
<a-textarea
v-model:value="val.note1"
:showCount="true"
:maxlength="200"
:placeholder="'请填写' + val.name"
v-else-if="val.type == 'textArea'"
/>
<a-input-number
v-model:value="val.note1"
:min="0"
:max="9999"
:step="0.01"
string-mode
:placeholder="'请填写' + val.name"
v-else-if="val.type == 'number'"
/>
<a-radio-group
v-model:value="val.note1"
:options="val.options"
@change="radioChange"
v-else-if="val.type == 'radio'"
/>
<upload
:key="showKey"
type="图片"
btnName="上传图片"
:maxCount="1"
:data="val"
:list="[]"
tip="支持图片类型大小不超过100M"
v-else-if="val.type == 'image'"
></upload>
</div>
<div class="submit">
<a-button type="primary" @click="add(title.name)">
添加更多{{ title.name }}
</a-button>
</div>
</div>
</a-form>
</template>
<template v-else>
<a-form>
<div class="bottom">
<div
class="form"
v-for="item in title.children"
:key="item.id"
v-show="
!(
(showType == '调用接口' && item.name == '平台地址') ||
(showType == '调用接口' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == '接口请求方式') ||
(showType == '平台对接' && item.name == '服务接口') ||
(showType == 'SDK' && item.name == '平台地址') ||
(showType == 'SDK' && item.name == '接口请求方式') ||
(showType == 'SDK' && item.name == '服务接口')
)
"
>
<span v-if="item.name.indexOf('名称') == -1">
{{ item.name }}
</span>
<a-input
v-if="item.type == 'input' && item.name.indexOf('名称') == -1"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
/>
<a-form-item
v-else-if="
item.type == 'input' && item.name.indexOf('名称') != -1
"
:label="item.name"
name="username"
:rules="[{ required: true, message: '请输入名称' }]"
>
<a-input
:maxLength="50"
v-model:value="item.note1"
:placeholder="'请输入' + item.name + '不超过50个字符'"
/>
</a-form-item>
<a-radio-group
v-else-if="item.type == 'radio'"
v-model:value="item.note1"
:options="item.options"
/>
<a-input
v-else-if="item.type == 'AbilityType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-input
v-else-if="item.type == 'ComponentType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-textarea
v-else-if="item.type == 'textArea'"
v-model:value="item.note1"
:showCount="true"
:maxlength="200"
:placeholder="'请输入' + item.name"
/>
<upload
v-else-if="item.type == 'image'"
type="图片"
btnName="上传图片"
:maxCount="1"
:data="item"
:list="props.imgList"
tip="支持图片类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'file' && item.name !== '使用手册'"
type="文件"
btnName="上传附件"
:maxCount="1"
:data="item"
:list="props.fileList"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.name == '使用手册'"
type="文件"
btnName="上传附件"
:maxCount="1"
:data="item"
:busType="2"
:list="props.fileList2"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div
class="Technical-text"
v-else-if="item.type == 'richText'"
@click="showTextFunction()"
>
编辑富文本
<div
v-if="showText"
class="fuwenbenbianjiqi"
style="position: absolute; z-index: 10000"
>
<VueTemplateDemo :dataFrom="props.dataFrom"></VueTemplateDemo>
</div>
</div>
<upload
v-else-if="item.type == 'video'"
type="视频"
btnName="上传视频"
:maxCount="1"
:data="item"
:list="props.videoList"
tip="支持视频类型大小不超过100M"
></upload>
<!-- <a-button
v-else-if="item.type == 'AssociatedApplication'" v-else-if="item.type == 'AssociatedApplication'"
@click="sourceClick" @click="sourceClick"
> >
请选择来源应用 请选择来源应用
</a-button> --> </a-button> -->
<a-select <a-select
v-else-if="item.type == 'select' && item.name == '来源应用'" v-else-if="item.type == 'select' && item.name == '来源应用'"
style="width: 2.4rem" style="width: 2.4rem"
v-model:value="item.note1" v-model:value="item.note1"
show-search show-search
placeholder="请输入关键字" placeholder="请输入关键字"
:options="item.options" :options="item.options"
:filter-option="applicationsOption" :filter-option="applicationsOption"
@focus="applicationsFocus" @focus="applicationsFocus"
@blur="applicationsBlur" @blur="applicationsBlur"
@change="applicationsChange" @change="applicationsChange"
></a-select> ></a-select>
<a-button <a-button
v-else-if="item.type == 'AssociatedComponents'" v-else-if="item.type == 'AssociatedComponents'"
@click="componentsClick" @click="componentsClick"
>
请选择关联组件
</a-button>
<a-select
v-else-if="item.type == 'select' && item.name == '使用方式'"
style="width: 2.4rem"
v-model:value="item.note1"
:placeholder="'请选择' + item.name"
@change="showTypeClick"
>
<a-select-option
v-for="(itemSelect, indexSelect) in item.options"
:key="indexSelect"
:value="itemSelect.dictLabel"
> >
{{ itemSelect.dictLabel }} 请选择关联组件
</a-select-option> </a-button>
</a-select> <a-select
<a-select v-else-if="item.type == 'select' && item.name == '使用方式'"
v-else-if="item.type == 'select' && item.name !== '归属部门'" style="width: 2.4rem"
style="width: 2.4rem" v-model:value="item.note1"
v-model:value="item.note1" :placeholder="'请选择' + item.name"
:placeholder="'请选择' + item.name" @change="showTypeClick"
>
<a-select-option
v-for="(itemSelect, indexSelect) in item.options"
:key="indexSelect"
:value="itemSelect.dictLabel"
> >
{{ itemSelect.dictLabel }} <a-select-option
</a-select-option> v-for="(itemSelect, indexSelect) in item.options"
</a-select> :key="indexSelect"
<a-select :value="itemSelect.dictLabel"
v-else-if="item.name === '归属部门'" >
style="width: 2.4rem" {{ itemSelect.dictLabel }}
v-model:value="item.note1" </a-select-option>
show-search </a-select>
placeholder="请输入关键字" <a-select
:options="item.options" v-else-if="item.type == 'select' && item.name !== '归属部门'"
:filter-option="filterOption" style="width: 2.4rem"
@focus="handleFocus" v-model:value="item.note1"
@blur="handleBlur" :placeholder="'请选择' + item.name"
@change="handleChange2" >
></a-select> <a-select-option
<div v-for="(itemSelect, indexSelect) in item.options"
v-else-if="item.type == 'checkBox'" :key="indexSelect"
class="application-Area" :value="itemSelect.dictLabel"
id="application-Area" >
:key="showKey" {{ itemSelect.dictLabel }}
> </a-select-option>
</a-select>
<a-select
v-else-if="item.name === '归属部门'"
style="width: 2.4rem"
v-model:value="item.note1"
show-search
placeholder="请输入关键字"
:options="item.options"
:filter-option="filterOption"
@focus="handleFocus"
@blur="handleBlur"
@change="handleChange2"
></a-select>
<div <div
v-for="(itemson, indexson) in item.options" v-else-if="item.type == 'checkBox'"
:key="indexson" class="application-Area"
class="application-Area-son" id="application-Area"
@click="ApplicationArea(item, itemson)" :key="showKey"
:class="
item.note2.indexOf(itemson.dictLabel) != -1
? 'application-Area-down'
: ''
"
> >
{{ itemson.dictLabel }} <div
v-for="(itemson, indexson) in item.options"
:key="indexson"
class="application-Area-son"
@click="ApplicationArea(item, itemson)"
:class="
item.note2.indexOf(itemson.dictLabel) != -1
? 'application-Area-down'
: ''
"
>
{{ itemson.dictLabel }}
</div>
</div> </div>
</div> </div>
<!-- 来源应用 -->
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplication"
:title="titleName"
@ok="handleOk"
@cancel="handleCancel"
style="width: 9.6rem"
>
<div>
<a-transfer
v-model:target-keys="targetKeys"
v-model:selected-keys="selectedKeys"
:data-source="mockData"
:titles="titles"
:render="(item) => item.title"
@change="handleChange"
@selectChange="handleSelectChange"
/>
</div>
</a-modal>
</div>
<!-- 关联组件 -->
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplicationOther"
:title="titleName"
@ok="handleOk"
@cancel="handleCancel"
style="width: 960px"
>
<div>
<a-transfer
v-model:target-keys="targetKeysOther"
v-model:selected-keys="selectedKeysOther"
:data-source="mockDataOther"
:titles="titles"
:render="(item) => item.title"
@change="handleChangeOther"
@selectChange="handleSelectChangeOther"
/>
</div>
</a-modal>
</div>
</div> </div>
<!-- 来源应用 --> </a-form>
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplication"
:title="titleName"
@ok="handleOk"
@cancel="handleCancel"
style="width: 9.6rem"
>
<div>
<a-transfer
v-model:target-keys="targetKeys"
v-model:selected-keys="selectedKeys"
:data-source="mockData"
:titles="titles"
:render="(item) => item.title"
@change="handleChange"
@selectChange="handleSelectChange"
/>
</div>
</a-modal>
</div>
<!-- 关联组件 -->
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplicationOther"
:title="titleName"
@ok="handleOk"
@cancel="handleCancel"
style="width: 960px"
>
<div>
<a-transfer
v-model:target-keys="targetKeysOther"
v-model:selected-keys="selectedKeysOther"
:data-source="mockDataOther"
:titles="titles"
:render="(item) => item.title"
@change="handleChangeOther"
@selectChange="handleSelectChangeOther"
/>
</div>
</a-modal>
</div>
</div>
</template> </template>
</div> </div>
</div> </div>

View File

@ -293,7 +293,7 @@
" "
> >
{{ {{
item.shareCondition == '免批申请' ? '立即申请' : '立即申请' item.shareCondition == '免批申请' ? '免批申请' : '立即申请'
}} }}
</a-button> </a-button>
</div> </div>

View File

@ -435,7 +435,7 @@
mapSearchParam.value.parentId || '70be8c5b664f4bcf869d82f2e8335051', mapSearchParam.value.parentId || '70be8c5b664f4bcf869d82f2e8335051',
pageNum: mapSearchParam.value.pageNum, pageNum: mapSearchParam.value.pageNum,
pageSize: mapSearchParam.value.pageSize, pageSize: mapSearchParam.value.pageSize,
name: mapSearchParam.value.name || '', name: mapSearchParam.value.cameraName || '',
longitude: mapSearchParam.value.gpsX || '', longitude: mapSearchParam.value.gpsX || '',
atitude: mapSearchParam.value.gpsY || '', atitude: mapSearchParam.value.gpsY || '',
radius: mapSearchParam.value.radius || '', radius: mapSearchParam.value.radius || '',

View File

@ -223,7 +223,7 @@
'70be8c5b664f4bcf869d82f2e8335051', '70be8c5b664f4bcf869d82f2e8335051',
pageNum: this.mapSearchParam.pageNum, pageNum: this.mapSearchParam.pageNum,
pageSize: this.mapSearchParam.pageSize, pageSize: this.mapSearchParam.pageSize,
name: this.mapSearchParam.name || '', name: this.mapSearchParam.cameraName || '',
longitude: this.mapSearchParam.gpsX || '', longitude: this.mapSearchParam.gpsX || '',
atitude: this.mapSearchParam.gpsY || '', atitude: this.mapSearchParam.gpsY || '',
radius: this.mapSearchParam.radius || '', radius: this.mapSearchParam.radius || '',

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-12 09:42:44 * @Date: 2022-07-12 09:42:44
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-21 17:25:45 * @LastEditTime: 2022-07-25 15:07:05
* @Description:我的申请 能力申请 查看详情 * @Description:我的申请 能力申请 查看详情
--> -->
<template> <template>
@ -132,8 +132,20 @@
</div> </div>
</div> </div>
<div class="ability-bottom"> <div class="ability-bottom">
<div class="dec">位置{{ val.nodeName }}</div> <div class="dec2">位置{{ val.nodeName }}</div>
<!-- <div class="result">申请结果{{ val.content || '--' }}</div> --> <div class="result" v-if="item.approveStatus == '通过'">
申请结果{{
'列表地址:' +
backUrl +
'resource/getApplyCameraList/' +
item.instanceId +
';' +
'视频流地址:' +
backUrl +
'/resource/hls/getHls/?channelId=' +
val.channelId
}}
</div>
</div> </div>
</div> </div>
</div> </div>
@ -144,6 +156,7 @@
</template> </template>
<script setup> <script setup>
import { ref, defineProps } from 'vue' import { ref, defineProps } from 'vue'
const backUrl = ref(window.SITE_CONFIG.apiURL + '/')
const props = defineProps({ const props = defineProps({
refObj: { type: Object, default: null }, refObj: { type: Object, default: null },
}) })
@ -334,6 +347,16 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
} }
.dec2 {
width: 7rem;
height: 0.22rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.result:hover { .result:hover {
color: #0058e1; color: #0058e1;
cursor: pointer; cursor: pointer;