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-25 19:15:08 +08:00
commit a5e5c35da8
67 changed files with 1953 additions and 1354 deletions

View File

@ -27,7 +27,7 @@
'isTab': true, // 是否通过tab展示内容? 'isTab': true, // 是否通过tab展示内容?
'iframeURL': '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配) 'iframeURL': '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配)
}; };
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/#/vueTemplateDemo'; window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.243:9796/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/#/vueTemplateDemo'; // window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/#/vueTemplateDemo'; // window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9797/#/vueTemplateDemo'; // window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9797/#/vueTemplateDemo';
@ -72,9 +72,9 @@
<script> <script>
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.243:9796/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.2.21.243:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
// WebSocket地址 // WebSocket地址

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

@ -4,7 +4,7 @@
<div class="Ability-to-take-off-the-shelf-approval-title">能力下架审批</div> <div class="Ability-to-take-off-the-shelf-approval-title">能力下架审批</div>
<div class="basic-information"> <div class="basic-information">
<div class="basic-information-title"> <div class="basic-information-title">
<span></span><span>基本信息</span> <span></span><span>基本1111信息</span>
</div> </div>
<div class="basic-information-content"> <div class="basic-information-content">
<p> <p>
@ -98,7 +98,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="agreeOr" v-if="this.dataForm.taskId"> <div class="agreeOr" v-if="taskId">
<div> <div>
<!-- <el-radio-group v-model="agreeOrList" style="width:230px;"> <!-- <el-radio-group v-model="agreeOrList" style="width:230px;">
<el-radio-button label="同意" class="blueAll" @click="showDialog('同意')">同意</el-radio-button> <el-radio-button label="同意" class="blueAll" @click="showDialog('同意')">同意</el-radio-button>
@ -136,6 +136,7 @@
<script> <script>
// //
import bus from '@/views/bus.js'
import processModule from '@/mixins/process-module' import processModule from '@/mixins/process-module'
import RenProcessDetail from '@/components/ren-process-detail/src/ren-process-detail' import RenProcessDetail from '@/components/ren-process-detail/src/ren-process-detail'
import debounce from 'lodash/debounce' import debounce from 'lodash/debounce'
@ -154,6 +155,7 @@ export default {
dataForm: [], dataForm: [],
deptName: '', deptName: '',
dataList: {}, dataList: {},
taskId: '',
datalistrighttablelist: [ datalistrighttablelist: [
'赋能应用名称', '赋能应用名称',
'应用归属部门', '应用归属部门',
@ -242,6 +244,7 @@ export default {
} }
return return
} }
bus.$emit('AbilityResourcesRemovedInit')
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t('prompt.success'),
type: 'success', type: 'success',
@ -271,6 +274,7 @@ export default {
} }
return return
} }
bus.$emit('AbilityResourcesRemovedInit')
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t('prompt.success'),
type: 'success', type: 'success',
@ -324,6 +328,7 @@ export default {
taskHandleErrorCallback (data) {} taskHandleErrorCallback (data) {}
}, },
created () { created () {
this.taskId = this.$route.params.taskId
this.dataForm.taskId = this.$route.params.taskId this.dataForm.taskId = this.$route.params.taskId
this.init() this.init()
}, },

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22 * @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-29 16:31:26 * @LastEditTime: 2022-07-25 09:45:35
* @Description: "能力资源上架" * @Description: "能力资源上架"
--> -->
<template> <template>
@ -128,6 +128,7 @@
</template> </template>
<script> <script>
import bus from '@/views/bus.js'
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from '@/mixins/view-module'
import processModule from '@/mixins/process-module' import processModule from '@/mixins/process-module'
export default { export default {
@ -165,6 +166,12 @@ export default {
} }
this.getProcDefRouteSet(row, this.forwardTaskDetail) this.getProcDefRouteSet(row, this.forwardTaskDetail)
} }
},
created () {
bus.$off('abilityResourceShelfInit')
bus.$on('abilityResourceShelfInit', () => {
this.getDataList()
})
} }
} }
</script> </script>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22 * @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-29 16:31:26 * @LastEditTime: 2022-07-25 09:48:46
* @Description: "能力资源下架" * @Description: "能力资源下架"
--> -->
<template> <template>
@ -128,6 +128,7 @@
</template> </template>
<script> <script>
import bus from '@/views/bus.js'
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from '@/mixins/view-module'
import processModule from '@/mixins/process-module' import processModule from '@/mixins/process-module'
export default { export default {
@ -165,6 +166,12 @@ export default {
} }
this.getProcDefRouteSet(row, this.forwardTaskDetail) this.getProcDefRouteSet(row, this.forwardTaskDetail)
} }
},
created () {
bus.$off('AbilityResourcesRemovedInit')
bus.$on('AbilityResourcesRemovedInit', () => {
this.getDataList()
})
} }
} }
</script> </script>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22 * @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-29 16:31:26 * @LastEditTime: 2022-07-25 09:39:01
* @Description: 能力申请 * @Description: 能力申请
--> -->
<template> <template>
@ -118,6 +118,7 @@
</template> </template>
<script> <script>
import bus from '@/views/bus.js'
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from '@/mixins/view-module'
import processModule from '@/mixins/process-module' import processModule from '@/mixins/process-module'
export default { export default {
@ -155,6 +156,12 @@ export default {
} }
this.getProcDefRouteSet(row, this.forwardTaskDetail) this.getProcDefRouteSet(row, this.forwardTaskDetail)
} }
},
created () {
bus.$off('competencyApplicationInit')
bus.$on('competencyApplicationInit', () => {
this.getDataList()
})
} }
} }
</script> </script>

View File

@ -83,6 +83,7 @@
</template> </template>
<script> <script>
import bus from '@/views/bus.js'
import ResourcesAndServices from './ResourcesAndServices.vue' import ResourcesAndServices from './ResourcesAndServices.vue'
import debounce from 'lodash/debounce' import debounce from 'lodash/debounce'
import qs from 'qs' import qs from 'qs'
@ -214,6 +215,7 @@ export default {
} }
return return
} }
bus.$emit('abilityResourceShelfInit')
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t('prompt.success'),
type: 'success', type: 'success',
@ -244,6 +246,7 @@ export default {
} }
return return
} }
bus.$emit('abilityResourceShelfInit')
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t('prompt.success'),
type: 'success', type: 'success',

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-29 15:59:51 * @Date: 2022-06-29 15:59:51
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-21 16:41:09 * @LastEditTime: 2022-07-25 09:42:46
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!-- 流程业务表单 --> <!-- 流程业务表单 -->
@ -29,16 +29,18 @@
{{ dataForm.content.title || '--' }}</span {{ dataForm.content.title || '--' }}</span
></span ></span
> >
<span class="text" <span class="text" v-if="dataForm.content.applicationSystem"
>应用系统<span>{{ >应用系统<span>{{
dataForm.content.applicationSystem || '--' dataForm.content.applicationSystem || '--'
}}</span></span }}</span></span
> >
<span class="text" <span class="text" ></span>
</p>
<p>
<span v-if="dataForm.content.applicationSceneStr"
>应用场景<span> >应用场景<span>
{{ dataForm.content.applicationSceneStr || '--' }}</span {{ dataForm.content.applicationSceneStr || '--' }}</span
></span ></span>
>
</p> </p>
<p> <p>
<span> <span>
@ -131,6 +133,7 @@ import processModule from '@/mixins/process-module'
import debounce from 'lodash/debounce' import debounce from 'lodash/debounce'
import qs from 'qs' import qs from 'qs'
import RenProcessDetail from '@/components/ren-process-detail/src/ren-process-detail' import RenProcessDetail from '@/components/ren-process-detail/src/ren-process-detail'
import bus from '@/views/bus.js'
export default { export default {
// //
mixins: [processModule], mixins: [processModule],
@ -386,6 +389,7 @@ export default {
} }
return return
} }
bus.$emit('competencyApplicationInit')
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t('prompt.success'),
type: 'success', type: 'success',
@ -415,6 +419,7 @@ export default {
} }
return return
} }
bus.$emit('competencyApplicationInit')
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t('prompt.success'),
type: 'success', type: 'success',

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

@ -15,21 +15,19 @@
<div v-for="(item, i) in dataInfo.list" :key="i"> <div v-for="(item, i) in dataInfo.list" :key="i">
<!-- 待办 --> <!-- 待办 -->
<el-tooltip effect="dark" v-if="dataInfo.type === 'todo'" <el-tooltip effect="dark" v-if="dataInfo.type === 'todo'"
:content="(item.userName || '--')+'提交的'+(item.processDefinitionName|| '--')+(item.processDefinitionName!=='能力申请'?'申请':'')" :content="(item.userName || '--')+'提交的'+(item.processDefinitionName|| '--')+(item.processDefinitionName!=='能力申请'&&item.processDefinitionName!=='能力需求申请'?'申请':'')"
placement="top"> placement="top">
<div class="list-item ellipsis"> <div class="list-item ellipsis">
<!-- {{ `${(item.processDefinitionName || '--')}${item.taskName ? ('—' + item.taskName) : ''}` }} --> <!-- {{ `${(item.processDefinitionName || '--')}${item.taskName ? ('—' + item.taskName) : ''}` }} -->
{{(item.userName || '--')+'提交的'+(item.processDefinitionName|| '--')+(item.processDefinitionName!=='能力申请'?'申请':'')}} {{(item.userName || '--')+'提交的'+(item.processDefinitionName|| '--')+(item.processDefinitionName!=='能力申请'&&item.processDefinitionName!=='能力需求申请'?'申请':'')}}
</div> </div>
</el-tooltip> </el-tooltip>
<!-- 已办 --> <!-- 已办 -->
<el-tooltip effect="dark" v-else <el-tooltip effect="dark" v-else
:content="`${(item.processDefinitionName || '--')}${item.resourceName ? ('—' + item.resourceName) : ''}`" :content="(item.startUserName||'--')+'提交的'+(item.processDefinitionName|| '--')+(item.processDefinitionName!=='能力申请'&&item.processDefinitionName!=='能力需求申请'?'申请':'')"
placement="top"> placement="top">
<div class="list-item ellipsis"> <div class="list-item ellipsis">
{{ `${(item.processDefinitionName || '--')}${item.resourceName ? ('—' + item.resourceName) : {{ (item.startUserName||'--')+'提交的'+(item.processDefinitionName|| '--')+(item.processDefinitionName!=='能力申请'&&item.processDefinitionName!=='能力需求申请'?'申请':'')}}
''}`
}}
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>

View File

@ -1,3 +1,10 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-06-14 09:31:29
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-15 16:33:55
* @Description: 告诉大家这是什么
*/
module.exports = { module.exports = {
root: true, root: true,
env: { env: {
@ -15,6 +22,7 @@ module.exports = {
ignorePatterns: [ ignorePatterns: [
'src/supermap', 'src/supermap',
'src/views/home/videoSurveillance', 'src/views/home/videoSurveillance',
'src/views/vab/*',
'src/utils/coordinateSystemTransform.js', 'src/utils/coordinateSystemTransform.js',
], ],
} }

View File

@ -5,7 +5,9 @@
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint", "lint": "eslint --ext .js --ext .jsx --ext .vue src/",
"lint:fix": "eslint --fix --ext .js,.vue .",
"fix": "eslint src/**/*.* --fix",
"clear": "rimraf node_modules&&npm install --registry=https://registry.npm.taobao.org", "clear": "rimraf node_modules&&npm install --registry=https://registry.npm.taobao.org",
"use:npm": "nrm use npm", "use:npm": "nrm use npm",
"use:taobao": "nrm use taobao", "use:taobao": "nrm use taobao",
@ -48,25 +50,25 @@
}, },
"devDependencies": { "devDependencies": {
"@turf/turf": "^6.5.0", "@turf/turf": "^6.5.0",
"@vue/cli-plugin-babel": "^4.5.9", "@vue/cli-plugin-babel": "^4.5.15",
"@vue/cli-plugin-eslint": "^4.5.9", "@vue/cli-plugin-eslint": "^4.5.15",
"@vue/cli-service": "^4.5.9", "@vue/cli-service": "^4.5.9",
"@vue/compiler-sfc": "^3.1.4", "@vue/compiler-sfc": "^3.1.4",
"@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-prettier": "^7.0.0",
"babel-eslint": "^11.0.0-beta.2", "babel-eslint": "^10.1.0",
"body-parser": "^1.19.0", "body-parser": "^1.20.0",
"chalk": "^4.1.1", "chalk": "^4.1.1",
"chokidar": "^3.5.2", "chokidar": "^3.5.2",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"eslint": "^7.30.0", "eslint": "^7.32.0",
"eslint-plugin-prettier": "^3.4.0", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^7.13.0", "eslint-plugin-vue": "^9.1.1",
"filemanager-webpack-plugin": "^6.1.4", "filemanager-webpack-plugin": "^6.1.4",
"less": "^4.1.1", "less": "^4.1.1",
"less-loader": "^7.3.0", "less-loader": "^7.3.0",
"prettier": "^2.3.2", "prettier": "^2.7.1",
"stylelint": "^13.13.1", "stylelint": "^13.13.1",
"stylelint-config-prettier": "^8.0.2", "stylelint-config-prettier": "^9.0.3",
"stylelint-config-recess-order": "^2.4.0", "stylelint-config-recess-order": "^2.4.0",
"stylus": "^0.54.5", "stylus": "^0.54.5",
"stylus-loader": "^3.0.2", "stylus-loader": "^3.0.2",

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-21 15:09:22 * @LastEditTime: 2022-07-22 18:42:44
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -40,9 +40,16 @@
// window.SITE_CONFIG['frontUrl'] = 'http://10.110.205.1:8002/document/#/devModelFile/'; // window.SITE_CONFIG['frontUrl'] = 'http://10.110.205.1:8002/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://10.110.205.1:8000/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://10.110.205.1:8000/renren-admin';
// 测试环境
// window.SITE_CONFIG['backUrl'] = 'http://15.2.21.243:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.243:9796/';
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.243:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.243:8888/renren-admin';
// window.SITE_CONFIG['websocketURL'] = '15.2.21.243:8888/renren-admin';
// window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 西海岸版本 // 西海岸版本
// window.SITE_CONFIG['backUrl'] = 'http://10.134.135.9:9797'; // window.SITE_CONFIG['backUrl'] = 'http://10.134.135.9:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://10.134.135.9:9796/';基础设施 // window.SITE_CONFIG['previewUrl'] = 'http://10.134.135.9:9796/';
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/'; // window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
// 开发 // 开发
@ -52,6 +59,11 @@
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.236:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.2.21.236:8888/renren-admin';
window.SITE_CONFIG['websocketURL'] = '15.2.21.236:8888/renren-admin'; window.SITE_CONFIG['websocketURL'] = '15.2.21.236:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
// window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本 // 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797'; // window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/'; // window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';

View File

@ -83,14 +83,22 @@ export function dataResourceInfo(params) {
//- //-
export function callTheTrendPort(start, end, params) { export function callTheTrendPort(start, end, params) {
return request({ return request({
url: '/metrics/api/v1/query_range?query=sum(increase(apigateway_http_status%5B1d%5D))&start=' + start + '&end=' + end + '&step=' + params, url:
'/metrics/api/v1/query_range?query=sum(increase(apigateway_http_status%5B1d%5D))&start=' +
start +
'&end=' +
end +
'&step=' +
params,
method: 'get', method: 'get',
}) })
} }
//- //-
export function totalCallsSnum(params) { export function totalCallsSnum(params) {
return request({ return request({
url: '/metrics/api/v1/query?query=sum(apigateway_http_status)&time=1655793262.495' + params, url:
'/metrics/api/v1/query?query=sum(apigateway_http_status)&time=1655793262.495' +
params,
method: 'get', method: 'get',
}) })
} }

View File

@ -50,7 +50,14 @@ const setting = {
// history hash // history hash
routerMode: 'hash', routerMode: 'hash',
//token //token
routesWhiteList: ['/login', '/register', '/callback', '/404', '/403', '/capabilityCloud'], // routesWhiteList: [
'/login',
'/register',
'/callback',
'/404',
'/403',
'/capabilityCloud',
], //
// //
loadingText: '正在加载中...', loadingText: '正在加载中...',
//token //token

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 17:48:03 * @Date: 2022-03-29 17:48:03
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-21 18:39:03 * @LastEditTime: 2022-07-22 16:03:23
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import { createApp } from 'vue' import { createApp } from 'vue'

View File

@ -2,182 +2,182 @@
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 登录获取用户信息退出登录清除accessToken逻辑不建议修改 * @description 登录获取用户信息退出登录清除accessToken逻辑不建议修改
*/ */
import { getUserInfo, login, logout } from '@/api/user' import { getUserInfo, login, logout } from '@/api/user'
import { import {
getAccessToken, getAccessToken,
removeAccessToken, removeAccessToken,
setAccessToken, setAccessToken,
} from '@/utils/accessToken' } from '@/utils/accessToken'
import { title, tokenName } from '@/config' import { title, tokenName } from '@/config'
import { message, notification } from 'ant-design-vue' import { message, notification } from 'ant-design-vue'
const state = () => ({ const state = () => ({
accessToken: getAccessToken(), accessToken: getAccessToken(),
username: '', username: '',
userId: '', userId: '',
avatar: '', avatar: '',
role: 0, // role: 0, //
}) })
const getters = { const getters = {
accessToken: (state) => state.accessToken, accessToken: (state) => state.accessToken,
username: (state) => state.username, username: (state) => state.username,
avatar: (state) => state.avatar, avatar: (state) => state.avatar,
role: (state) => state.role, role: (state) => state.role,
userId: (state) => state.userId, userId: (state) => state.userId,
} }
const mutations = { const mutations = {
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 设置accessToken * @description 设置accessToken
* @param {*} state * @param {*} state
* @param {*} accessToken * @param {*} accessToken
*/ */
setAccessToken(state, accessToken) { setAccessToken(state, accessToken) {
state.accessToken = accessToken state.accessToken = accessToken
setAccessToken(accessToken) setAccessToken(accessToken)
}, },
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 设置用户名 * @description 设置用户名
* @param {*} state * @param {*} state
* @param {*} username * @param {*} username
*/ */
setUsername(state, username) { setUsername(state, username) {
state.username = username state.username = username
}, },
// //
setRole(state, role) { setRole(state, role) {
state.role = role state.role = role
}, },
// userId // userId
setUserId(state, id) { setUserId(state, id) {
state.userId = id state.userId = id
}, },
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 设置头像 * @description 设置头像
* @param {*} state * @param {*} state
* @param {*} avatar * @param {*} avatar
*/ */
setAvatar(state, avatar) { setAvatar(state, avatar) {
state.avatar = avatar state.avatar = avatar
}, },
} }
const actions = { const actions = {
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 登录拦截放行时设置虚拟角色 * @description 登录拦截放行时设置虚拟角色
* @param {*} { commit, dispatch } * @param {*} { commit, dispatch }
*/ */
setVirtualRoles({ commit, dispatch }) { setVirtualRoles({ commit, dispatch }) {
dispatch('acl/setFull', true, { dispatch('acl/setFull', true, {
root: true, root: true,
}) })
commit('setAvatar', 'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif') commit('setAvatar', 'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif')
commit('setUsername', 'admin(未开启登录拦截)') commit('setUsername', 'admin(未开启登录拦截)')
}, },
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 登录 * @description 登录
* @param {*} { commit } * @param {*} { commit }
* @param {*} userInfo * @param {*} userInfo
*/ */
async login({ commit }, userInfo) { async login({ commit }, userInfo) {
const { data } = await login(userInfo) const { data } = await login(userInfo)
// debugger // debugger
const accessToken = data.data[tokenName] const accessToken = data.data[tokenName]
if (accessToken) { if (accessToken) {
commit('setAccessToken', accessToken) commit('setAccessToken', accessToken)
const hour = new Date().getHours() const hour = new Date().getHours()
const thisTime = const thisTime =
hour < 8 hour < 8
? '早上好' ? '早上好'
: hour <= 11 : hour <= 11
? '上午好' ? '上午好'
: hour <= 13 : hour <= 13
? '中午好' ? '中午好'
: hour < 18 : hour < 18
? '下午好' ? '下午好'
: '晚上好' : '晚上好'
notification.open({ notification.open({
message: `欢迎登录${title}`, message: `欢迎登录${title}`,
description: `${thisTime}`, description: `${thisTime}`,
}) })
} else { } else {
message.error(`登录接口异常,未正确返回${tokenName}...`) message.error(`登录接口异常,未正确返回${tokenName}...`)
} }
}, },
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 获取用户信息接口 这个接口非常非常重要如果没有明确底层前逻辑禁止修改此方法错误的修改可能造成整个框架无法正常使用 * @description 获取用户信息接口 这个接口非常非常重要如果没有明确底层前逻辑禁止修改此方法错误的修改可能造成整个框架无法正常使用
* @param {*} { commit, dispatch, state } * @param {*} { commit, dispatch, state }
* @returns * @returns
*/ */
async getUserInfo({ commit }) { async getUserInfo({ commit }) {
const { data } = await getUserInfo() const { data } = await getUserInfo()
if (!data) { if (!data) {
message.error(`验证失败,请重新登录...`) message.error(`验证失败,请重新登录...`)
return false return false
} }
// debugger // debugger
commit('setUsername', data.data.realName) commit('setUsername', data.data.realName)
commit('setRole', data.data.roleIdList.length) commit('setRole', data.data.roleIdList.length)
commit('setUserId', data.data.id) commit('setUserId', data.data.id)
// TODO // TODO
// let { username, avatar, roles, ability } = data // let { username, avatar, roles, ability } = data
// if (username && roles && Array.isArray(roles)) { // if (username && roles && Array.isArray(roles)) {
// dispatch('acl/setRole', roles, { // dispatch('acl/setRole', roles, {
// root: true, // root: true,
// }) // })
// if (ability && ability.length > 0) // if (ability && ability.length > 0)
// dispatch('acl/setAbility', ability, { // dispatch('acl/setAbility', ability, {
// root: true, // root: true,
// }) // })
// commit('setUsername', username) // commit('setUsername', username)
// commit('setAvatar', avatar) // commit('setAvatar', avatar)
// } else { // } else {
// message.error('') // message.error('')
// } // }
}, },
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 退出登录 * @description 退出登录
* @param {*} { dispatch } * @param {*} { dispatch }
*/ */
async logout({ dispatch }) { async logout({ dispatch }) {
await logout(state.accessToken) await logout(state.accessToken)
await dispatch('resetAll') await dispatch('resetAll')
}, },
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 重置accessTokenrolesabilityrouter等 * @description 重置accessTokenrolesabilityrouter等
* @param {*} { commit, dispatch } * @param {*} { commit, dispatch }
*/ */
async resetAll({ dispatch }) { async resetAll({ dispatch }) {
await dispatch('setAccessToken', '') await dispatch('setAccessToken', '')
await dispatch('acl/setFull', false, { await dispatch('acl/setFull', false, {
root: true, root: true,
}) })
await dispatch('acl/setRole', [], { await dispatch('acl/setRole', [], {
root: true, root: true,
}) })
await dispatch('acl/setAbility', [], { await dispatch('acl/setAbility', [], {
root: true, root: true,
}) })
removeAccessToken() removeAccessToken()
}, },
/** /**
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 设置token * @description 设置token
*/ */
setAccessToken({ commit }, accessToken) { setAccessToken({ commit }, accessToken) {
commit('setAccessToken', accessToken) commit('setAccessToken', accessToken)
}, },
} }
export default { export default {
state, state,
getters, getters,
mutations, mutations,
actions, actions,
} }

View File

@ -35,7 +35,7 @@ const handleCode = (code, msg, res) => {
message.error(msg || '接口异常') message.error(msg || '接口异常')
break break
case 302: case 302:
window.location.href = redirect // window.location.href = redirect
break break
} }
} }
@ -70,7 +70,7 @@ instance.interceptors.request.use(
if (debounce.some((item) => config.url.includes(item))) { if (debounce.some((item) => config.url.includes(item))) {
// //
} }
if (!config.headers.REQUESTURI){ if (!config.headers.REQUESTURI) {
config.headers.REQUESTURI = window.location.href config.headers.REQUESTURI = window.location.href
} }
@ -98,7 +98,7 @@ instance.interceptors.response.use(
} }
if (response.headers.redirect) { if (response.headers.redirect) {
window.location.replace(response.headers.redirect) window.location.replace(response.headers.redirect)
return return
} }
if (response.headers.redirect === '/#/login') { if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g) var keys = document.cookie.match(/[^ =;]+(?=\=)/g)

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11 * @Date: 2022-04-01 17:23:11
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-18 11:25:28 * @LastEditTime: 2022-07-18 18:45:20
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
/** /**

View File

@ -53,10 +53,7 @@
v-for="(item, index) in contenBox" v-for="(item, index) in contenBox"
:key="index" :key="index"
> >
<img <img :src="item.note1" alt="" />
:src="item.note1"
alt=""
/>
<h3>{{ item.name }}</h3> <h3>{{ item.name }}</h3>
<p> <p>
发布时间 发布时间

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

@ -466,6 +466,7 @@
import upload from '@/views/components/upload' import upload from '@/views/components/upload'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { getUserInfo, getDeptAll } from '@/api/user' import { getUserInfo, getDeptAll } from '@/api/user'
import VueTemplateDemo from '@/views/personalCenter/VueTemplateDemo.vue'
import { import {
getCategoryTreePage, getCategoryTreePage,
queryApplicationRelByResourceId, queryApplicationRelByResourceId,

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:32:22 * @Date: 2022-06-08 11:32:22
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-30 17:06:56 * @LastEditTime: 2022-07-18 18:49:30
* @Description: 算法详情页 * @Description: 算法详情页
--> -->
<template> <template>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:32:22 * @Date: 2022-06-08 11:32:22
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-18 13:55:03 * @LastEditTime: 2022-07-22 18:43:37
* @Description: 应用详情页 * @Description: 应用详情页
--> -->
<template> <template>
@ -87,16 +87,16 @@
import ApplicationTopDetails from '@/views/detailsAll/components/Application/ApplicationTopDetails.vue' import ApplicationTopDetails from '@/views/detailsAll/components/Application/ApplicationTopDetails.vue'
import ApplicationNavigation from '@/views/detailsAll/components/Application/ApplicationNavigation.vue' import ApplicationNavigation from '@/views/detailsAll/components/Application/ApplicationNavigation.vue'
import ApplicationPresentation from '@/views/detailsAll/components/Application/ApplicationPresentation.vue' import ApplicationPresentation from '@/views/detailsAll/components/Application/ApplicationPresentation.vue'
import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem.vue'
import ApplicationAbilityTrial from '@/views/detailsAll/components/Application/ApplicationAbilityTrial.vue' import ApplicationAbilityTrial from '@/views/detailsAll/components/Application/ApplicationAbilityTrial.vue'
import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem' //
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue' import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import { import {
updateVisits, updateVisits,
selectOne, selectOne,
queryPartAppByKeyId, queryPartAppByKeyId,
browsingInsert, browsingInsert,
} from '@/api/home' } from '@/api/home'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const associatedComponents = ref([{ type: '组件服务', dataList: [] }]) const associatedComponents = ref([{ type: '组件服务', dataList: [] }])
let loading = ref(true) let loading = ref(true)

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.gaoyuanwei * @Author: hisense.gaoyuanwei
* @Date: 2022-06-20 10:12:22 * @Date: 2022-06-20 10:12:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-20 18:58:56 * @LastEditTime: 2022-07-18 18:49:01
* @Description: 业务组件详情页 * @Description: 业务组件详情页
--> -->
<template> <template>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:32:22 * @Date: 2022-06-08 11:32:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-20 18:59:01 * @LastEditTime: 2022-07-18 18:48:53
* @Description: 开发组件详情页 * @Description: 开发组件详情页
--> -->
<template> <template>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:32:22 * @Date: 2022-06-08 11:32:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-20 18:59:01 * @LastEditTime: 2022-07-18 18:48:32
* @Description: 图层服务详情页 * @Description: 图层服务详情页
--> -->
<template> <template>

View File

@ -179,6 +179,7 @@
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
word-break: break-all; word-break: break-all;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
text-align: center;
} }
.tab-top-down { .tab-top-down {
min-width: 120px; min-width: 120px;

View File

@ -38,7 +38,9 @@
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
let obj = val.infoList.filter((item) => item.attrType === '试用地址' && item.attrValue)[0] let obj = val.infoList.filter(
(item) => item.attrType === '试用地址' && item.attrValue
)[0]
if (!obj) { if (!obj) {
flag.value = false flag.value = false
} else { } else {

View File

@ -87,16 +87,25 @@
const deploymentLocation = ref('') // const deploymentLocation = ref('') //
// //
const addShoppingCart = () => { const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList) if (props.dataList.isInShoppingCart) {
sgcInsert({ message.error('已经加入申购车了')
delFlag: '0', } else {
resourceId: props.dataList.id, console.log('加入申购车==================>', props.dataList)
// userId: userId.value, sgcInsert({
}).then((res) => { delFlag: '0',
console.log(res) resourceId: props.dataList.id,
message.success('添加申购车成功!') // userId: userId.value,
mybus.emit('getSgcNum') }).then((res) => {
}) console.log(res)
message.success('添加申购车成功!')
mybus.emit('getSgcNum')
props.dataList.isInShoppingCart = true
console.log(
props.dataList.isInShoppingCart,
'props.dataList.isInShoppingCart'
)
})
}
} }
// //
function toView() { function toView() {

View File

@ -73,7 +73,7 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { paddleocr,algo } from '@/api/file' import { algo } from '@/api/file'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
@ -85,10 +85,12 @@
const imageResult1 = ref('') const imageResult1 = ref('')
const menuOpenKeys2 = ref(['全文还原']) const menuOpenKeys2 = ref(['全文还原'])
// //
let responseUrl = ref('static/image/' + router.currentRoute.value.query.exampleImg) let responseUrl = ref(
'static/image/' + router.currentRoute.value.query.exampleImg
)
const imgType = router.currentRoute.value.query.exampleImg.split('.')[1] const imgType = router.currentRoute.value.query.exampleImg.split('.')[1]
const handleChange = (info) => { const handleChange = (info) => {
debugger; debugger
if (info.file.status !== 'uploading') { if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList) console.log(info.file, info.fileList)
} }
@ -111,7 +113,7 @@
company: router.currentRoute.value.query.company, company: router.currentRoute.value.query.company,
algorithmName: router.currentRoute.value.query.algorithmName, algorithmName: router.currentRoute.value.query.algorithmName,
data: base64.split('base64,')[1], data: base64.split('base64,')[1],
type: router.currentRoute.value.query.type type: router.currentRoute.value.query.type,
} }
algo(param).then((res) => { algo(param).then((res) => {
// wordValue.value = res.data // wordValue.value = res.data

View File

@ -43,7 +43,7 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { correct,algo } from '@/api/file' import { algo } from '@/api/file'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
// const keyId = router.currentRoute.value.query.id // const keyId = router.currentRoute.value.query.id
@ -58,7 +58,7 @@
company: router.currentRoute.value.query.company, company: router.currentRoute.value.query.company,
algorithmName: router.currentRoute.value.query.algorithmName, algorithmName: router.currentRoute.value.query.algorithmName,
data: wordValue.value, data: wordValue.value,
type: router.currentRoute.value.query.type type: router.currentRoute.value.query.type,
} }
// correct(param).then((res) => { // correct(param).then((res) => {
// // wordContent.value = res.data.data // // wordContent.value = res.data.data
@ -72,7 +72,7 @@
// errorWordContent.value = val.value // errorWordContent.value = val.value
// }) // })
// }) // })
algo(param).then(res=>{ algo(param).then((res) => {
errorWord.value = res.data.data.text_data errorWord.value = res.data.data.text_data
}) })
} }

View File

@ -6,7 +6,7 @@
* @Description: 应用详情 * @Description: 应用详情
--> -->
<template> <template>
<div class="algorithm-on-trial" v-if="flag && whoShow1.itShowQingDao"> <div class="algorithm-on-trial" v-if="flag">
<detals-title title="应用详情" type="PROBATION"></detals-title> <detals-title title="应用详情" type="PROBATION"></detals-title>
<div class="main"> <div class="main">
<div class="main-left"> <div class="main-left">
@ -60,13 +60,13 @@
password2: '', password2: '',
}) })
if (props.dataList.infoList) { if (props.dataList.infoList) {
let obj = props.dataList.applyState let obj = props.dataList.approveStatus
if (obj !== '通过') { if (obj !== '通过' && whoShow1.value.itShowQingDao) {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.link = props.dataList.link dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '试用用户名') { if (item.attrType == '试用用户名' || item.attrType == '试用账号') {
dataFrom.value.number = item.attrValue dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') { } else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue dataFrom.value.password2 = item.attrValue
@ -110,13 +110,13 @@
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
let obj = props.dataList.applyState let obj = props.dataList.approveStatus
if (obj !== '通过') { if (obj !== '通过') {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.link = props.dataList.link dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '试用用户名') { if (item.attrType == '试用用户名' || item.attrType == '试用账号') {
dataFrom.value.number = item.attrValue dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') { } else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue dataFrom.value.password2 = item.attrValue

View File

@ -16,127 +16,125 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else class="no-data"> <div v-else class="no-data">暂无数据</div>
暂无数据
</div>
</div> </div>
</template> </template>
<script setup> <script setup>
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle' import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch } from 'vue'
const flag = ref(true) const flag = ref(true)
let dataFrom = ref([]) let dataFrom = ref([])
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
if (props.dataList.infoList) { if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(item) => item.attrType === '常见问题' (item) => item.attrType === '常见问题'
)[0] )[0]
if (!obj) { if (!obj) {
flag.value = false flag.value = false
} else { } else {
obj.attrValue = JSON.parse(obj.attrValue) obj.attrValue = JSON.parse(obj.attrValue)
obj.attrValue.map((item) => { obj.attrValue.map((item) => {
let params = { let params = {
title: item.question, title: item.question,
answer: item.answer, answer: item.answer,
} }
dataFrom.value.push(params) dataFrom.value.push(params)
}) })
}
}
watch(
() => props.dataList,
(val) => {
if (val) {
let obj = val.infoList.filter((item) => item.attrType === '常见问题')[0]
if (!obj) {
flag.value = false
} else {
obj.attrValue = JSON.parse(obj.attrValue)
obj.attrValue.map((item) => {
let params = {
title: item.question,
answer: item.answer,
}
dataFrom.value.push(params)
})
}
} }
} }
) watch(
() => props.dataList,
(val) => {
if (val) {
let obj = val.infoList.filter((item) => item.attrType === '常见问题')[0]
if (!obj) {
flag.value = false
} else {
obj.attrValue = JSON.parse(obj.attrValue)
obj.attrValue.map((item) => {
let params = {
title: item.question,
answer: item.answer,
}
dataFrom.value.push(params)
})
}
}
}
)
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.cpmmon-problem { .cpmmon-problem {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding-top: 160px; padding-top: 160px;
background: #f7f8fa; background: #f7f8fa;
.content { .content {
width: 1300px; width: 1300px;
margin: 20px 0px; margin: 20px 0px;
background: #ffffff; background: #ffffff;
padding: 40px; padding: 40px;
.content-son { .content-son {
font-size: 20px; font-size: 20px;
margin-bottom: 60px; margin-bottom: 60px;
.content-top { .content-top {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
line-height: 20px; line-height: 20px;
} }
.content-bottom { .content-bottom {
display: flex; display: flex;
line-height: 34px; line-height: 34px;
color: #666666; color: #666666;
} }
.content-top, .content-top,
.content-bottom { .content-bottom {
div:last-child { div:last-child {
width: calc(100% - 54px); width: calc(100% - 54px);
}
}
.top-img {
width: 34px;
height: 30px;
background: url('~@/assets/detailsAll/sf_top_img.png') no-repeat;
background-position: center;
background-size: cover;
margin-right: 20px;
}
.bottom-img {
width: 34px;
height: 30px;
background: url('~@/assets/detailsAll/sf_bottom_img.png') no-repeat;
ackground-size: cover;
background-position: center;
margin-right: 20px;
} }
} }
.top-img { .content-son:last-child {
width: 34px; margin-bottom: 0px;
height: 30px;
background: url('~@/assets/detailsAll/sf_top_img.png') no-repeat;
background-position: center;
background-size: cover;
margin-right: 20px;
}
.bottom-img {
width: 34px;
height: 30px;
background: url('~@/assets/detailsAll/sf_bottom_img.png') no-repeat;
ackground-size: cover;
background-position: center;
margin-right: 20px;
} }
} }
.content-son:last-child { .no-data {
margin-bottom: 0px; background: transparent !important;
color: #212121;
text-align: center;
padding: 0.5rem 0;
font-size: 0.2rem;
} }
} }
.no-data {
background: transparent !important;
color: #212121;
text-align: center;
padding: 0.5rem 0;
font-size: 0.2rem;
}
}
</style> </style>

View File

@ -104,9 +104,8 @@
} }
}) })
if ( if (
props.dataList.link &&
whoShow1.value.itShowQingDao && whoShow1.value.itShowQingDao &&
props.dataList.applyState === '通过' props.dataList.approveStatus === '通过'
) { ) {
list.value.push('应用详情') list.value.push('应用详情')
} }
@ -152,9 +151,8 @@
} }
}) })
if ( if (
props.dataList.link &&
whoShow1.value.itShowQingDao && whoShow1.value.itShowQingDao &&
props.dataList.applyState === '通过' props.dataList.approveStatus === '通过'
) { ) {
list.value.push('应用详情') list.value.push('应用详情')
} }

View File

@ -38,11 +38,11 @@
englishTitle: 'DEPARTMENT&ERVICE', englishTitle: 'DEPARTMENT&ERVICE',
content: [ content: [
{ {
childrenTitle: '归属部门信息', childrenTitle: '归属部门',
childrenContent: [], childrenContent: [],
}, },
{ {
childrenTitle: '服务商信息', childrenTitle: '服务商',
childrenContent: [], childrenContent: [],
}, },
], ],
@ -54,17 +54,17 @@
}) })
if (props.dataList.infoList) { if (props.dataList.infoList) {
let obj = { let obj = {
attrType: '部门名称', attrType: '归属部门',
attrValue: props.dataList.deptName || '------', attrValue: props.dataList.deptName || '------',
} }
dataFrom.value.content[0].childrenContent[0] = obj dataFrom.value.content[0].childrenContent[0] = obj
let deptContacts = { let deptContacts = {
attrType: '部门联系人', attrType: '联系人',
attrValue: props.dataList.deptContacts || '------', attrValue: props.dataList.deptContacts || '------',
} }
dataFrom.value.content[0].childrenContent[1] = deptContacts dataFrom.value.content[0].childrenContent[1] = deptContacts
let deptPhone = { let deptPhone = {
attrType: '部门联系电话', attrType: '联系电话',
attrValue: props.dataList.deptPhone || '------', attrValue: props.dataList.deptPhone || '------',
} }
dataFrom.value.content[0].childrenContent[2] = deptPhone dataFrom.value.content[0].childrenContent[2] = deptPhone
@ -85,11 +85,13 @@
} }
} else if (item.attrType === '服务商联系人') { } else if (item.attrType === '服务商联系人') {
dataFrom.value.content[1].childrenContent[1] = item dataFrom.value.content[1].childrenContent[1] = item
dataFrom.value.content[1].childrenContent[1].attrType = '联系人'
if (dataFrom.value.content[1].childrenContent[1].attrValue == '') { if (dataFrom.value.content[1].childrenContent[1].attrValue == '') {
dataFrom.value.content[1].childrenContent[1].attrValue = '------' dataFrom.value.content[1].childrenContent[1].attrValue = '------'
} }
} else if (item.attrType === '服务商联系电话') { } else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2] = item dataFrom.value.content[1].childrenContent[2] = item
dataFrom.value.content[1].childrenContent[2].attrType = '联系人电话'
if (dataFrom.value.content[1].childrenContent[2].attrValue == '') { if (dataFrom.value.content[1].childrenContent[2].attrValue == '') {
dataFrom.value.content[1].childrenContent[2].attrValue = '------' dataFrom.value.content[1].childrenContent[2].attrValue = '------'
} }
@ -106,17 +108,17 @@
// dataFrom.value.content[0].childrenContent = [] // dataFrom.value.content[0].childrenContent = []
// dataFrom.value.content[1].childrenContent = [] // dataFrom.value.content[1].childrenContent = []
let obj = { let obj = {
attrType: '部门名称', attrType: '归属部门',
attrValue: props.dataList.deptName || '------', attrValue: props.dataList.deptName || '------',
} }
dataFrom.value.content[0].childrenContent[0] = obj dataFrom.value.content[0].childrenContent[0] = obj
let deptContacts = { let deptContacts = {
attrType: '部门联系人', attrType: '联系人',
attrValue: props.dataList.deptContacts || '------', attrValue: props.dataList.deptContacts || '------',
} }
dataFrom.value.content[0].childrenContent[1] = deptContacts dataFrom.value.content[0].childrenContent[1] = deptContacts
let deptPhone = { let deptPhone = {
attrType: '部门联系电话', attrType: '联系电话',
attrValue: props.dataList.deptPhone || '------', attrValue: props.dataList.deptPhone || '------',
} }
dataFrom.value.content[0].childrenContent[2] = deptPhone dataFrom.value.content[0].childrenContent[2] = deptPhone
@ -140,6 +142,7 @@
} }
} else if (item.attrType === '服务商联系人') { } else if (item.attrType === '服务商联系人') {
dataFrom.value.content[1].childrenContent[1] = item dataFrom.value.content[1].childrenContent[1] = item
dataFrom.value.content[1].childrenContent[1].attrType = '联系人'
if ( if (
dataFrom.value.content[1].childrenContent[1].attrValue == '' dataFrom.value.content[1].childrenContent[1].attrValue == ''
) { ) {
@ -148,6 +151,8 @@
} }
} else if (item.attrType === '服务商联系电话') { } else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2] = item dataFrom.value.content[1].childrenContent[2] = item
dataFrom.value.content[1].childrenContent[2].attrType =
'联系人电话'
if ( if (
dataFrom.value.content[1].childrenContent[2].attrValue == '' dataFrom.value.content[1].childrenContent[2].attrValue == ''
) { ) {
@ -155,9 +160,9 @@
'------' '------'
} }
} }
} else if (item.attrType === '部门联系人') { } else if (item.attrType === '联系人') {
deptContacts.attrValue = item.attrValue || '------' deptContacts.attrValue = item.attrValue || '------'
} else if (item.attrType === '部门联系人电话') { } else if (item.attrType === '联系人电话') {
deptPhone.attrValue = item.attrValue || '------' deptPhone.attrValue = item.attrValue || '------'
} }
}) })
@ -187,11 +192,10 @@
height: 1.5rem; height: 1.5rem;
width: 6.2rem; width: 6.2rem;
border-radius: 0.2rem; border-radius: 0.2rem;
background: linear-gradient( background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
to right, no-repeat;
rgba(113, 132, 252, 0.4), background-position: center;
rgba(148, 163, 252, 0.4) background-size: 100% 100%;
);
padding: 0 0.3rem; padding: 0 0.3rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 15:25:33 * @Date: 2022-06-08 15:25:33
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-16 16:58:16 * @LastEditTime: 2022-07-16 17:03:24
* @Description: 应用展示 视频播放 * @Description: 应用展示 视频播放
--> -->
<template> <template>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-21 16:18:54 * @LastEditTime: 2022-07-21 18:17:30
* @Description: 算法详情页头部 * @Description: 算法详情页头部
--> -->
<template> <template>
@ -90,16 +90,25 @@
const applicationArea = ref('') const applicationArea = ref('')
// // // //
const addShoppingCart = () => { const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList) if (props.dataList.isInShoppingCart) {
sgcInsert({ message.error('已经加入申购车了')
delFlag: '0', } else {
resourceId: props.dataList.id, console.log('加入申购车==================>', props.dataList)
// userId: userId.value, sgcInsert({
}).then((res) => { delFlag: '0',
console.log(res) resourceId: props.dataList.id,
message.success('添加申购车成功!') // userId: userId.value,
mybus.emit('getSgcNum') }).then((res) => {
}) console.log(res)
message.success('添加申购车成功!')
mybus.emit('getSgcNum')
props.dataList.isInShoppingCart = true
console.log(
props.dataList.isInShoppingCart,
'props.dataList.isInShoppingCart'
)
})
}
} }
// // // //
function toView() { function toView() {

View File

@ -179,6 +179,7 @@
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
text-align: center;
} }
.tab-top-down { .tab-top-down {
min-width: 120px; min-width: 120px;

View File

@ -159,6 +159,7 @@
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
text-align: center;
} }
.tab-top-down { .tab-top-down {
min-width: 1.2rem; min-width: 1.2rem;

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 14:54:01 * @Date: 2022-06-08 14:54:01
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-15 18:24:39 * @LastEditTime: 2022-07-16 16:43:19
* @Description: 应用详情页导航 * @Description: 应用详情页导航
--> -->
<template> <template>

View File

@ -87,16 +87,25 @@
const componentType = ref('') // const componentType = ref('') //
// // // //
const addShoppingCart = () => { const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList) if (props.dataList.isInShoppingCart) {
sgcInsert({ message.error('已经加入申购车了')
delFlag: '0', } else {
resourceId: props.dataList.id, console.log('加入申购车==================>', props.dataList)
// userId: userId.value, sgcInsert({
}).then((res) => { delFlag: '0',
console.log(res) resourceId: props.dataList.id,
message.success('添加申购车成功!') // userId: userId.value,
mybus.emit('getSgcNum') }).then((res) => {
}) console.log(res)
message.success('添加申购车成功!')
mybus.emit('getSgcNum')
props.dataList.isInShoppingCart = true
console.log(
props.dataList.isInShoppingCart,
'props.dataList.isInShoppingCart'
)
})
}
} }
// // // //
function toView() { function toView() {

View File

@ -179,6 +179,7 @@
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
text-align: center;
} }
.tab-top-down { .tab-top-down {
min-width: 120px; min-width: 120px;

View File

@ -60,7 +60,7 @@
childrenTitle: '归属部门', childrenTitle: '归属部门',
childrenContent: [ childrenContent: [
{ {
attrType: '归属部门名称', attrType: '归属部门',
attrValue: '------', attrValue: '------',
}, },
{ {
@ -74,10 +74,10 @@
], ],
}, },
{ {
childrenTitle: '服务商信息', childrenTitle: '服务商',
childrenContent: [ childrenContent: [
{ {
attrType: '服务商名称', attrType: '服务商',
attrValue: '------', attrValue: '------',
}, },
{ {
@ -226,11 +226,10 @@
height: 1.8rem; height: 1.8rem;
width: 6.6rem; width: 6.6rem;
border-radius: 0.2rem; border-radius: 0.2rem;
background: linear-gradient( background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
to right, no-repeat;
rgba(113, 132, 252, 0.4), background-position: center;
rgba(148, 163, 252, 0.4) background-size: 100% 100%;
);
padding: 0 0.3rem; padding: 0 0.3rem;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -8,11 +8,28 @@
<template> <template>
<div class="application-presentation" v-if="flag"> <div class="application-presentation" v-if="flag">
<detals-title title="组件展示" type="IMAGE&VIDEO"></detals-title> <detals-title title="组件展示" type="IMAGE&VIDEO"></detals-title>
<div <div class="box">
class="main" <div class="left" @click="chagneShow()"></div>
:style="`${img}background-position:center;background-size:cover;`" <div
> class="main"
<div class="play" @click="showModal"></div> :style="`${img}background-position:center;background-size:cover;`"
v-if="
showArr.length > 0 && showArr[showFlag].attrType == '组件视频介绍'
"
>
<div class="play" @click="showModal"></div>
</div>
<div
class="main2"
v-if="showArr.length > 0 && showArr[showFlag].attrType == '组件图片'"
>
<a-image
:width="700"
:height="340"
:src="showArr[showFlag].attrValue"
/>
</div>
<div class="right" @click="chagneShow()"></div>
</div> </div>
<a-modal <a-modal
v-model:visible="visible" v-model:visible="visible"
@ -59,6 +76,13 @@
'fullScreen', 'fullScreen',
], //, ], //,
}) })
const showFlag = ref(0)
const showArr = ref([])
const chagneShow = () => {
if (showArr.value.length > 1) {
showFlag.value = showFlag.value == 0 ? 1 : 0
}
}
const showModal = () => { const showModal = () => {
visible.value = true visible.value = true
} }
@ -69,42 +93,63 @@
const img = ref({}) const img = ref({})
console.log('111111111111111111111,', props.dataList) console.log('111111111111111111111,', props.dataList)
if (props.dataList.infoList) { if (props.dataList.infoList) {
showArr.value = props.dataList.infoList.filter(
(item) => item.attrType === '组件视频介绍' || item.attrType === '组件图片'
)
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(item) => item.attrType === '组件视频介绍' (item) => item.attrType === '组件视频介绍'
)[0] )[0]
console.log('视频==============>', obj) console.log('视频==============>', showArr.value)
if (!obj) { if (showArr.value.length == 0) {
flag.value = false flag.value = false
} else { } else {
let imgindex = props.dataList.infoList.filter( if (obj) {
(item) => item.attrType === '组件图片' options.src = obj.attrValue
)[0]
options.src = obj.attrValue
if (imgindex) {
img.value = 'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
} }
} }
// if (!obj) {
// flag.value = false
// } else {
// let imgindex = props.dataList.infoList.filter(
// (item) => item.attrType === ''
// )[0]
// options.src = obj.attrValue
// if (imgindex) {
// img.value = 'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
// }
// }
} }
watch( watch(
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
showArr.value = props.dataList.infoList.filter(
(item) =>
item.attrType === '组件视频介绍' || item.attrType === '组件图片'
)
let obj = val.infoList.filter( let obj = val.infoList.filter(
(item) => item.attrType === '组件视频介绍' (item) => item.attrType === '组件视频介绍'
)[0] )[0]
console.log('视频==============>', obj) console.log('视频==============>', showArr.value)
if (!obj) { if (showArr.value.length == 0) {
flag.value = false flag.value = false
} else { } else {
let imgindex = props.dataList.infoList.filter( if (obj) {
(item) => item.attrType === '组件图片' options.src = obj.attrValue
)[0]
options.src = obj.attrValue
if (imgindex) {
img.value =
'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
} }
} }
// if (!obj) {
// flag.value = false
// } else {
// let imgindex = props.dataList.infoList.filter(
// (item) => item.attrType === ''
// )[0]
// options.src = obj.attrValue
// if (imgindex) {
// img.value =
// 'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
// }
// }
} }
} }
) )
@ -113,6 +158,7 @@
.application-presentation { .application-presentation {
padding: 0.8rem 3rem 0; padding: 0.8rem 3rem 0;
.main { .main {
width: 13.14rem;
height: 3.4rem; height: 3.4rem;
border-radius: 0.1rem; border-radius: 0.1rem;
background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat; background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat;
@ -129,5 +175,47 @@
cursor: pointer; cursor: pointer;
} }
} }
.main2 {
width: 13.14rem;
height: 3.4rem;
border-radius: 0.1rem;
background-size: 100%;
margin-top: 0.4rem;
display: flex;
justify-content: center;
align-items: center;
}
}
.box {
display: flex;
justify-content: space-around;
align-items: center;
margin-bottom: 0.8rem;
.left {
width: 0.37rem;
height: 0.6rem;
cursor: pointer;
margin-right: 0.2rem;
background: url('~@/assets/detailsAll/business/business_previous.png')
no-repeat;
background-size: 100%;
background-position: center;
}
.right {
width: 0.37rem;
height: 0.6rem;
cursor: pointer;
margin-left: 0.2rem;
background: url('~@/assets/detailsAll/business/business_next.png')
no-repeat;
background-size: 100%;
background-position: center;
}
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
} }
</style> </style>

View File

@ -82,16 +82,25 @@
const deploymentLocation = ref('') // const deploymentLocation = ref('') //
// //
const addShoppingCart = () => { const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList) if (props.dataList.isInShoppingCart) {
sgcInsert({ message.error('已经加入申购车了')
delFlag: '0', } else {
resourceId: props.dataList.id, console.log('加入申购车==================>', props.dataList)
// userId: userId.value, sgcInsert({
}).then((res) => { delFlag: '0',
console.log(res) resourceId: props.dataList.id,
message.success('添加申购车成功!') // userId: userId.value,
mybus.emit('getSgcNum') }).then((res) => {
}) console.log(res)
message.success('添加申购车成功!')
mybus.emit('getSgcNum')
props.dataList.isInShoppingCart = true
console.log(
props.dataList.isInShoppingCart,
'props.dataList.isInShoppingCart'
)
})
}
} }
// //
function toView() { function toView() {

View File

@ -179,6 +179,7 @@
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
text-align: center;
} }
.tab-top-down { .tab-top-down {
min-width: 120px; min-width: 120px;

View File

@ -82,16 +82,25 @@
const deploymentLocation = ref('') // const deploymentLocation = ref('') //
// //
const addShoppingCart = () => { const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList) if (props.dataList.isInShoppingCart) {
sgcInsert({ message.error('已经加入申购车了')
delFlag: '0', } else {
resourceId: props.dataList.id, console.log('加入申购车==================>', props.dataList)
// userId: userId.value, sgcInsert({
}).then((res) => { delFlag: '0',
console.log(res) resourceId: props.dataList.id,
message.success('添加申购车成功!') // userId: userId.value,
mybus.emit('getSgcNum') }).then((res) => {
}) console.log(res)
message.success('添加申购车成功!')
mybus.emit('getSgcNum')
props.dataList.isInShoppingCart = true
console.log(
props.dataList.isInShoppingCart,
'props.dataList.isInShoppingCart'
)
})
}
} }
// //
function toView() { function toView() {

View File

@ -247,11 +247,10 @@
.content-left { .content-left {
height: 1.8rem; height: 1.8rem;
width: 6.2rem; width: 6.2rem;
background: linear-gradient( background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
to right, no-repeat;
rgba(113, 132, 252, 0.4), background-position: center;
rgba(148, 163, 252, 0.4) background-size: 100% 100%;
);
border-radius: 0.1rem; border-radius: 0.1rem;
margin-right: 0.6rem; margin-right: 0.6rem;
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4); box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
@ -310,11 +309,10 @@
.content-right { .content-right {
height: 1.8rem; height: 1.8rem;
width: 6.2rem; width: 6.2rem;
background: linear-gradient( background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
to right, no-repeat;
rgba(113, 132, 252, 0.4), background-position: center;
rgba(148, 163, 252, 0.4) background-size: 100% 100%;
);
border-radius: 0.1rem; border-radius: 0.1rem;
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4); box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
display: flex; display: flex;

View File

@ -104,7 +104,7 @@
/> />
</div> </div>
</div> </div>
<!-- <div <div
class="top-content" class="top-content"
v-if="Cardsname == '组件服务' || Cardsname == '应用资源'" v-if="Cardsname == '组件服务' || Cardsname == '应用资源'"
> >
@ -127,7 +127,7 @@
</a-checkable-tag> </a-checkable-tag>
</div> </div>
</div> </div>
</div> --> </div>
</div> </div>
</template> </template>
</div> </div>
@ -324,7 +324,7 @@
/> />
</div> </div>
</div> </div>
<!-- <div class="top-content" v-if="Cardsname == '组件服务'"> <div class="top-content" v-if="Cardsname == '组件服务'">
<span class="top-content-title">共享条件</span> <span class="top-content-title">共享条件</span>
<div class="leixingsumfather"> <div class="leixingsumfather">
<div class="leixingsum"> <div class="leixingsum">
@ -344,7 +344,7 @@
</a-checkable-tag> </a-checkable-tag>
</div> </div>
</div> </div>
</div> --> </div>
</div> </div>
</template> </template>
</div> </div>
@ -1034,7 +1034,8 @@
loading.value = false loading.value = false
} else { } else {
resourceTotal.value = res.data.data.total || '' resourceTotal.value = res.data.data.total || ''
getShoppingCartList(res.data.data.records) resourceList.data = res.data.data.records || []
// getShoppingCartList(res.data.data.records)
} }
}) })
} }
@ -1111,7 +1112,8 @@
loading.value = false loading.value = false
} else { } else {
resourceTotal.value = res.data.data.total || '' resourceTotal.value = res.data.data.total || ''
getShoppingCartList(res.data.data.records) resourceList.data = res.data.data.records || []
// getShoppingCartList(res.data.data.records)
} }
}) })
} }
@ -1129,12 +1131,12 @@
}).then((res) => { }).then((res) => {
console.log('申购车列表================>', res.data.data.records) console.log('申购车列表================>', res.data.data.records)
shoppingCartList.value = res.data.data.records shoppingCartList.value = res.data.data.records
list.map((item) => { // list.map((item) => {
item.isInShoppingCart = false // item.isInShoppingCart = false
item.isInShoppingCart = shoppingCartList.value.some((item2) => { // item.isInShoppingCart = shoppingCartList.value.some((item2) => {
return item.id === item2.resourceId // return item.id === item2.resourceId
}) // })
}) // })
console.log('经过过滤后的列表信息', list) console.log('经过过滤后的列表信息', list)
resourceList.data = list resourceList.data = list
}) })

View File

@ -57,13 +57,22 @@
:id="data.title" :id="data.title"
:title="data.title" :title="data.title"
:ref="data.title" :ref="data.title"
v-if="
!(
data.title == '算法优势' ||
data.title == '应用场景' ||
data.title == '应用案例' ||
data.title == '常见问题' ||
data.title == '计费标准信息'
)
"
> >
{{ data.title }} {{ data.title }}
</div> </div>
<!-- 算法优势 --> <!-- 算法优势 -->
<div class="group-data" v-if="data.groupName"> <!-- <div class="group-data" v-if="data.groupName"> -->
<!-- <compare-group-view :dataList="data.groupList"></compare-group-view> --> <!-- <compare-group-view :dataList="data.groupList"></compare-group-view> -->
<div v-if="data.groupList.length > 0"> <!-- <div v-if="data.groupList.length > 0">
<div <div
class="group-box" class="group-box"
v-for="(data, i) in data.groupList" v-for="(data, i) in data.groupList"
@ -97,11 +106,10 @@
</div> </div>
<div v-if="data.groupList.length == 0" class="no-data"> <div v-if="data.groupList.length == 0" class="no-data">
暂无数据 暂无数据
</div> </div> -->
</div> <!-- </div> -->
<div <div
class="flex-row-start row-tr" class="flex-row-start row-tr"
v-else
v-for="(rowData, j) in data.list" v-for="(rowData, j) in data.list"
:key="j" :key="j"
:class="j == data.list.length - 1 ? 'border-bottom' : ''" :class="j == data.list.length - 1 ? 'border-bottom' : ''"
@ -235,51 +243,51 @@
key: '算法介绍视频', key: '算法介绍视频',
}, },
], ],
算法优势: [ // : [
{ // {
text: '算法优势名称', // text: '',
key: 'name', // key: 'name',
}, // },
{ // {
text: '算法优势描述', // text: '',
key: 'desc', // key: 'desc',
}, // },
], // ],
应用场景: [ // : [
{ // {
text: '场景名称', // text: '',
key: '场景名称', // key: '',
}, // },
{ // {
text: '场景描述', // text: '',
key: '场景描述', // key: '',
}, // },
], // ],
应用案例: [ // : [
{ // {
text: '关联应用', // text: '',
}, // },
{ // {
text: '算法需求背景', // text: '',
}, // },
{ // {
text: '算法应用期望达成效果', // text: '',
}, // },
], // ],
计费标准信息: [ // : [
{ // {
text: '是否收费', // text: '',
}, // },
{ // {
text: '计费方式', // text: '',
}, // },
{ // {
text: '计费描述', // text: '',
}, // },
// { // // {
// text: '', key: '' // // text: '', key: ''
// }, // // },
], // ],
使用方式: [ 使用方式: [
{ {
text: '服务接口', text: '服务接口',
@ -311,14 +319,14 @@
text: '服务商联系电话', text: '服务商联系电话',
}, },
], ],
常见问题: [ // : [
{ // {
text: '常见问题', // text: '',
}, // },
{ // {
text: '回答', // text: '',
}, // },
], // ],
} }
// //
const leftNav = ref([]) const leftNav = ref([])

View File

@ -151,6 +151,7 @@
:headers="headers" :headers="headers"
@change="handleChange" @change="handleChange"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:maxCount="1"
> >
<a-button <a-button
style=" style="
@ -172,6 +173,10 @@
<span style="font-size: 14px; color: #999"> <span style="font-size: 14px; color: #999">
支持docdocxjpgpngjpegpdfxlxsppt类型文件 支持docdocxjpgpngjpegpdfxlxsppt类型文件
</span> </span>
<div v-if="fileList.length < 1">
<plus-outlined />
<div style="margin-top: 8px">上传限一个文件</div>
</div>
</a-upload> </a-upload>
</a-form-item> </a-form-item>
@ -421,8 +426,17 @@
} }
if (!applyAll) { if (!applyAll) {
let ids = [] let ids = []
let falgNum = 0
let sxt = true
formName.system = [] formName.system = []
console.log('list==================', list.value) console.log('list==================', list.value)
list.value.map((val) => {
val.arr.map((item) => {
if (item.type !== '基础设施') {
falgNum++
}
})
})
list.value.map((val) => { list.value.map((val) => {
val.arr.map((item) => { val.arr.map((item) => {
if (item.type !== '基础设施') { if (item.type !== '基础设施') {
@ -430,6 +444,7 @@
resourceId: item.resourceId, resourceId: item.resourceId,
resourceName: item.resourceName, resourceName: item.resourceName,
}) })
falgNum++
console.log(item.id) console.log(item.id)
if (item.id) { if (item.id) {
ids.push(item.id) ids.push(item.id)
@ -451,8 +466,14 @@
// applySuccess.value = false // applySuccess.value = false
console.log('摄像头申请================>', res) console.log('摄像头申请================>', res)
if (item.id) { if (item.id) {
sgcDel({ ids: [item.id] }).then((res) => { sgcDel({ ids: [item.id] }).then((res1) => {
if (res.data.msg === 'success') { if (res1.data.msg === 'success') {
if (falgNum == 0 && sxt) {
message.success(
'申请提交成功,请到消息中心查看!'
)
sxt = false
}
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
@ -463,6 +484,10 @@
} }
}) })
} else { } else {
if (res.data.msg === 'success' && falgNum == 0 && sxt) {
message.success('申请提交成功,请到消息中心查看!')
sxt = false
}
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {

View File

@ -1,54 +1,59 @@
<template> <template>
<div> <div>
<div v-if="groupArray.length > 0"> <div v-if="groupArray.length > 0">
<div class="group-box" v-for="(data, i) in groupArray" :key="i"> <div class="group-box" v-for="(data, i) in groupArray" :key="i">
<div class="flex-row-start row-tr" v-for="(item, j) in Object.keys(data)" :key="j" <div
:class="j == Object.keys(data).length - 1 ? 'border-bottom' : ''"> class="flex-row-start row-tr"
<div class="td-name">{{ item }}</div> v-for="(item, j) in Object.keys(data)"
<div class="flex-row-start"> :key="j"
<div class="td" v-for="(d, k) in data[item]" :key="k">{{ d || '--' }}</div> :class="j == Object.keys(data).length - 1 ? 'border-bottom' : ''"
</div> >
</div> <div class="td-name">{{ item }}</div>
<div class="flex-row-start">
<div class="td" v-for="(d, k) in data[item]" :key="k">
{{ d || '--' }}
</div> </div>
</div>
</div> </div>
{{ '哈啊哈哈哈哈' + groupArray.length }} </div>
<div v-if="groupArray.length == 0" class="no-data">暂无数据</div>
</div> </div>
{{ '哈啊哈哈哈哈' + groupArray.length }}
<div v-if="groupArray.length == 0" class="no-data">暂无数据</div>
</div>
</template> </template>
<script> <script>
import { defineComponent, ref, onMounted, getCurrentInstance, computed, watch, nextTick } from 'vue' import { ref, watch, nextTick } from 'vue'
export default { export default {
props: ["dataList"], props: ['dataList'],
setup(props) { setup(props) {
let groupArray = ref([]) let groupArray = ref([])
watch( watch(
() => { () => {
return props.dataList return props.dataList
}, },
(newVal) => { (newVal) => {
console.log('newVal------------>', newVal); console.log('newVal------------>', newVal)
groupArray = ref([]) groupArray = ref([])
newVal.map(v => { newVal.map((v) => {
groupArray.value.push(v) groupArray.value.push(v)
}) })
groupArray.value = groupArray.value.splice(0) groupArray.value = groupArray.value.splice(0)
nextTick(() => { nextTick(() => {
console.log('groupArray---子组件--------->', groupArray.value); console.log('groupArray---子组件--------->', groupArray.value)
}) })
}, },
{ {
deep: true, deep: true,
immediate: true immediate: true,
}
)
return {
groupArray,
} }
} )
}
return {
groupArray,
}
},
}
</script> </script>
<!-- <script setup> <!-- <script setup>
@ -79,44 +84,43 @@ nextTick(() => {
</script> --> </script> -->
<style lang="less" scoped> <style lang="less" scoped>
.group-box { .group-box {
margin-bottom: 20px; margin-bottom: 20px;
} }
.border { .border {
border: 1px solid #dddee1; border: 1px solid #dddee1;
border-bottom: none; border-bottom: none;
border-right: none; border-right: none;
} }
.row-tr {
.row-tr {
border: 1px solid #dddee1; border: 1px solid #dddee1;
border-right: none; border-right: none;
border-bottom: none; border-bottom: none;
} }
.no-border-right { .no-border-right {
border: 1px solid #dddee1; border: 1px solid #dddee1;
border-right: none; border-right: none;
} }
.flex-row-start { .flex-row-start {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
} }
.td-name { .td-name {
border-right: 1px solid #dddee1; border-right: 1px solid #dddee1;
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
text-align: center; text-align: center;
width: 200px; width: 200px;
font-size: 14px; font-size: 14px;
} }
.td { .td {
border-right: 1px solid #dddee1; border-right: 1px solid #dddee1;
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
@ -128,18 +132,18 @@ nextTick(() => {
word-wrap: break-all; word-wrap: break-all;
word-break: normal; word-break: normal;
overflow: hidden; overflow: hidden;
} }
.border-bottom { .border-bottom {
border-bottom: 1px solid #dddee1; border-bottom: 1px solid #dddee1;
} }
.no-data { .no-data {
height: 100px; height: 100px;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: 1px solid #dddee1; border: 1px solid #dddee1;
} }
</style> </style>

View File

@ -465,7 +465,7 @@
border-radius: 0.05rem; border-radius: 0.05rem;
position: absolute; position: absolute;
top: 0.45rem; top: 0.45rem;
right: 3.1rem; right: 2.9rem;
overflow-y: scroll; overflow-y: scroll;
.bottom { .bottom {
cursor: pointer; cursor: pointer;

View File

@ -293,7 +293,7 @@
" "
> >
{{ {{
item.shareCondition == '免批申请' ? '立即申请' : '立即申请' item.shareCondition == '免批申请' ? '免批申请' : '立即申请'
}} }}
</a-button> </a-button>
</div> </div>
@ -589,7 +589,6 @@
// //
const addShoppingCart = (item, index) => { const addShoppingCart = (item, index) => {
console.log('item===============>', item) console.log('item===============>', item)
mybus.emit('changeSelcted', index)
if (flag.value && item.id) { if (flag.value && item.id) {
flag.value = false flag.value = false
sgcInsert({ sgcInsert({
@ -600,6 +599,7 @@
console.log(res) console.log(res)
message.success('添加申购车成功!') message.success('添加申购车成功!')
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
mybus.emit('changeSelcted', index)
flag.value = true flag.value = true
}) })
} }
@ -789,7 +789,7 @@
}, },
beforeUnmount() { beforeUnmount() {
mybus.off('chongzhi') mybus.off('chongzhi')
mybus.emit('changeSelcted') // mybus.emit('changeSelcted')
}, },
} }
</script> </script>

View File

@ -1,68 +1,68 @@
export const titleNameArray = [ export const titleNameArray = [
{ {
photo: require('@/assets/newHome/banner-zj.png'), photo: require('@/assets/newHome/banner-zj.png'),
name: '组件服务', name: '组件服务',
}, },
{ {
photo: require('@/assets/newHome/banner-yy.png'), photo: require('@/assets/newHome/banner-yy.png'),
name: '应用资源', name: '应用资源',
}, },
{ {
photo: require('@/assets/newHome/banner-jc.png'), photo: require('@/assets/newHome/banner-jc.png'),
name: '基础设施', name: '基础设施',
}, },
{ {
photo: require('@/assets/newHome/banner-sj.png'), photo: require('@/assets/newHome/banner-sj.png'),
name: '数据资源', name: '数据资源',
}, },
{ {
photo: require('@/assets/newHome/banner-zs.png'), photo: require('@/assets/newHome/banner-zs.png'),
name: '知识库', name: '知识库',
}, },
] ]
// //
export const keyongziyuanqingkaungArray = [ export const keyongziyuanqingkaungArray = [
{ {
name: 'CPU/核:', name: 'CPU/核:',
value: 2102, value: 2102,
}, },
{ {
name: '内存/T', name: '内存/T',
value: 6.68, value: 6.68,
}, },
{ {
name: '存储/T', name: '存储/T',
value: 2102, value: 2102,
}, },
{ {
name: 'RDS for Mysql/G', name: 'RDS for Mysql/G',
value: 982.82, value: 982.82,
}, },
{ {
name: 'RDS for SqlServer/G', name: 'RDS for SqlServer/G',
value: 997.17, value: 997.17,
}, },
] ]
export const shujuziyuanqingkuangArray = [ export const shujuziyuanqingkuangArray = [
{ {
name: '已上线目录:', name: '已上线目录:',
value: 10372, value: 10372,
danwei: '条', danwei: '条',
}, },
{ {
name: '已发布服务:', name: '已发布服务:',
value: 1080, value: 1080,
danwei: '条', danwei: '条',
}, },
{ {
name: '已发布接口:', name: '已发布接口:',
value: 976, value: 976,
danwei: '条', danwei: '条',
}, },
{ {
name: '更新时间:', name: '更新时间:',
value: '2022-05-06', value: '2022-05-06',
}, },
] ]

View File

@ -2,13 +2,20 @@
<template> <template>
<div class="IntegrationServicesDetails" :class="{ fixed2: scrollTop >= 600 }"> <div class="IntegrationServicesDetails" :class="{ fixed2: scrollTop >= 600 }">
<!-- 头部基本信息 --> <!-- 头部基本信息 -->
<application-top-details :dataList="detailInfoObj" :navList="navList"></application-top-details> <application-top-details
:dataList="detailInfoObj"
:navList="navList"
></application-top-details>
<!-- 导航 --> <!-- 导航 -->
<div :class="{ fixed: scrollTop >= 600 }"> <div :class="{ fixed: scrollTop >= 600 }">
<div class="application-navigation"> <div class="application-navigation">
<template v-for="nav in navList" :key="nav.key"> <template v-for="nav in navList" :key="nav.key">
<div class="nav" :class="{ selectNow: nav.key == selectNow }" @click="selectNav(nav.key)"> <div
class="nav"
:class="{ selectNow: nav.key == selectNow }"
@click="selectNav(nav.key)"
>
{{ nav.name }} {{ nav.name }}
<span class="line"></span> <span class="line"></span>
</div> </div>
@ -17,7 +24,10 @@
</div> </div>
<!-- 组合能力 --> <!-- 组合能力 -->
<div id="integration-combination-ability" class="combination-ability scrollBox"> <div
id="integration-combination-ability"
class="combination-ability scrollBox"
>
<div class="title-1"> <div class="title-1">
<DetalsTitle title="组合能力" type="COMBINATION ABILITY"></DetalsTitle> <DetalsTitle title="组合能力" type="COMBINATION ABILITY"></DetalsTitle>
</div> </div>
@ -50,9 +60,17 @@
</div> </div>
</div> </div>
<div class="content-card flex-row-start"> <div class="content-card flex-row-start">
<div class="right-item content-card-item" v-for="(use, i) in useWayShowList" :key="i"> <div
class="right-item content-card-item"
v-for="(use, i) in useWayShowList"
:key="i"
>
<div class="card-title title">{{ use.title }}</div> <div class="card-title title">{{ use.title }}</div>
<div class="card-text" v-for="(d, k) in Object.keys(use.info)" :key="k"> <div
class="card-text"
v-for="(d, k) in Object.keys(use.info)"
:key="k"
>
{{ use.info[d] }}:{{ detailInfoObj[d] || '--' }} {{ use.info[d] }}:{{ detailInfoObj[d] || '--' }}
</div> </div>
</div> </div>
@ -61,390 +79,403 @@
</div> </div>
<!-- 常见问题--> <!-- 常见问题-->
<application-common-problem :dataList="detailInfoObj" id="common-problem" class="scrollBox"> <application-common-problem
</application-common-problem> :dataList="detailInfoObj"
id="common-problem"
class="scrollBox"
></application-common-problem>
<home-footer></home-footer> <home-footer></home-footer>
</div> </div>
</template> </template>
<script setup> <script setup>
import ApplicationTopDetails from '@/views/detailsAll/components/Application/ApplicationTopDetails.vue' import ApplicationTopDetails from '@/views/detailsAll/components/Application/ApplicationTopDetails.vue'
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle' import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem' // import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem' //
import HomeFooter from '@/views/newHome/components/Footer' import HomeFooter from '@/views/newHome/components/Footer'
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue' import { ref, onMounted, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { getIntegrationDetail } from '@/api/home' import { getIntegrationDetail } from '@/api/home'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const id = router.currentRoute.value.query.id
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top =
document.querySelector('#' + id) &&
document.querySelector('#' + id).offsetTop - 50
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
const router = useRouter() const navList = ref([
const scrollTop = ref(0) {
const domArr = ref([]) name: '组合能力',
const id = router.currentRoute.value.query.id key: 'integration-combination-ability',
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id) && document.querySelector('#' + id).offsetTop - 50;
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
const navList = ref([
{
name: '组合能力',
key: 'integration-combination-ability',
},
{
name: '使用方式',
key: 'integration-use-way',
},
{
name: '常见问题',
key: 'common-problem',
},
])
const selectNow = ref('integration-combination-ability')
const useWayShowList = ref([
{
title: '归属部门',
info: {
deptUser: '部门联系人',
mobile: '联系人电话',
}, },
}, {
{ name: '使用方式',
title: '服务商', key: 'integration-use-way',
info: {
providerUser: '服务商联系人',
providerMobile: '联系人电话',
}, },
}, {
]) name: '常见问题',
key: 'common-problem',
},
])
const combineList = ref([ const selectNow = ref('integration-combination-ability')
{
title: '基础设施',
list: []
},
{
title: '组件服务',
list: []
},
{
title: '数据资源',
list: []
},
])
const detailInfoObj = ref({})
onMounted(() => { const useWayShowList = ref([
window.addEventListener('scroll', () => { {
domArr.value = document.querySelectorAll('.scrollBox') title: '归属部门',
scrollTop.value = info: {
document.documentElement.scrollTop || document.body.scrollTop deptUser: '部门联系人',
for (let i = 0; i < domArr.value.length; i++) { mobile: '联系人电话',
if (i === 0) { },
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) { },
selectNow.value = domArr.value[i].id {
} title: '服务商',
} else if (i == domArr.value.length - 1) { info: {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) { providerUser: '服务商联系人',
selectNow.value = domArr.value[i].id providerMobile: '联系人电话',
} },
} else { },
if ( ])
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50 const combineList = ref([
) { {
selectNow.value = domArr.value[i].id title: '基础设施',
list: [],
},
{
title: '组件服务',
list: [],
},
{
title: '数据资源',
list: [],
},
])
const detailInfoObj = ref({})
onMounted(() => {
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
} }
} }
}
})
})
const selectNav = (key) => {
selectNow.value = key
mybus.emit('flyToView', selectNow.value)
}
// --
const getIntegrationServicesDeatil = (id) => {
getIntegrationDetail(id).then(res => {
if (res.data.code !== 0) {
return message.error(res.data.msg)
}
detailInfoObj.value = res.data.data || {}
//
let fuseAttrList = res.data.data.fuseAttrList || []
//
let fuseResourceList = res.data.data.fuseResourceList || []
let questionValue = fuseAttrList.find(v => v.attrType === '常见问题') || {}
let questionObj = {
attrType: '常见问题',
attrValue: questionValue.attrValue || "[]"
}
let areaObj = {
attrType: '应用领域',
attrValue: detailInfoObj.value.applicationArea
}
combineList.value.map(item => {
let arr = (fuseResourceList.filter(v => v.resource && v.resource.type == item.title) || []).map(d => d.resource.name)
item.list = arr;
return item
}) })
detailInfoObj.value.infoList = []
detailInfoObj.value.infoList.push(questionObj)
detailInfoObj.value.infoList.push(areaObj)
}, err => {
message.error(err)
}) })
}
getIntegrationServicesDeatil(id)
function handleOpenUrl(type) { const selectNav = (key) => {
let obj = (detailInfoObj.value.fuseAttrList || []).find(v => v.attrType == type) || {}; selectNow.value = key
let url = obj.attrValue || ''; mybus.emit('flyToView', selectNow.value)
if (!obj.attrValue) {
return message.error('错误的文档链接地址!')
} }
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(url))
)
}
onBeforeUnmount(() => { // --
mybus.off('flyToView') const getIntegrationServicesDeatil = (id) => {
}) getIntegrationDetail(id).then(
(res) => {
if (res.data.code !== 0) {
return message.error(res.data.msg)
}
detailInfoObj.value = res.data.data || {}
//
let fuseAttrList = res.data.data.fuseAttrList || []
//
let fuseResourceList = res.data.data.fuseResourceList || []
let questionValue =
fuseAttrList.find((v) => v.attrType === '常见问题') || {}
let questionObj = {
attrType: '常见问题',
attrValue: questionValue.attrValue || '[]',
}
let areaObj = {
attrType: '应用领域',
attrValue: detailInfoObj.value.applicationArea,
}
combineList.value.map((item) => {
let arr = (
fuseResourceList.filter(
(v) => v.resource && v.resource.type == item.title
) || []
).map((d) => d.resource.name)
item.list = arr
return item
})
detailInfoObj.value.infoList = []
detailInfoObj.value.infoList.push(questionObj)
detailInfoObj.value.infoList.push(areaObj)
},
(err) => {
message.error(err)
}
)
}
getIntegrationServicesDeatil(id)
function handleOpenUrl(type) {
let obj =
(detailInfoObj.value.fuseAttrList || []).find(
(v) => v.attrType == type
) || {}
let url = obj.attrValue || ''
if (!obj.attrValue) {
return message.error('错误的文档链接地址!')
}
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(url))
)
}
onBeforeUnmount(() => {
mybus.off('flyToView')
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.flex-row-between { .flex-row-between {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.flex-row-start {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.flex-row-center {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.IntegrationServicesDetails {
.fixed {
position: fixed !important;
z-index: 2000;
top: 0;
left: 0;
}
.fixed2>div:nth-of-type(3) {
margin-top: 0.84rem;
}
.application-navigation {
width: 19.12rem;
height: 0.84rem;
line-height: 0.8rem;
display: flex; display: flex;
justify-content: space-around; flex-direction: row;
font-size: 0.24rem; align-items: center;
color: #666;
background: #fff;
padding: 0 3rem;
box-shadow: 0rem 0.05rem 0.1rem #f2f3fb;
position: relative;
.nav {
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.line {
width: 0.4rem;
height: 0.04rem;
}
}
.selectNow {
color: #526aff;
.line {
background: #526aff;
}
}
}
}
.use-way {
padding: 0.8rem 0;
display: flex;
flex-direction: column;
align-items: center;
.title-1 {
margin-bottom: 0.3rem;
}
.left {
.btn {
padding: 10px 20px;
color: #526aff;
background: #fff;
border-radius: 50px;
margin: 10px;
font-size: 0.2rem;
width: 150px;
text-align: center;
cursor: pointer;
}
.btn-box {
display: flex;
flex-direction: column;
align-items: flex-end;
}
}
.content {
display: flex;
width: 13rem;
justify-content: space-between; justify-content: space-between;
}
.word-bg { .flex-row-start {
background: linear-gradient(90deg, #7184fc, #94a3fc) !important; display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.flex-row-center {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.IntegrationServicesDetails {
.fixed {
position: fixed !important;
z-index: 2000;
top: 0;
left: 0;
} }
.content-card { .fixed2 > div:nth-of-type(3) {
height: 1.5rem; margin-top: 0.84rem;
width: 6.2rem; }
border-radius: 0.2rem;
background: linear-gradient(to right, .application-navigation {
rgba(113, 132, 252, 0.4), width: 19.12rem;
rgba(148, 163, 252, 0.4)); height: 0.84rem;
padding: 0 0.3rem; line-height: 0.8rem;
display: flex; display: flex;
justify-content: center; justify-content: space-around;
font-size: 0.24rem;
color: #666;
background: #fff;
padding: 0 3rem;
box-shadow: 0rem 0.05rem 0.1rem #f2f3fb;
position: relative;
.card-title { .nav {
font-size: 0.26rem; cursor: pointer;
color: #212956; display: flex;
margin-bottom: 0.2rem; flex-direction: column;
line-height: 0.26rem; justify-content: space-between;
align-items: center;
.line {
width: 0.4rem;
height: 0.04rem;
}
} }
.content-card-item { .selectNow {
width: 50%; color: #526aff;
.card-text { .line {
margin-right: 0.2rem; background: #526aff;
color: rgba(33, 41, 86, 0.8);
font-size: 0.2rem;
max-width: 2.8rem;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
div:first-child {
display: block;
} }
} }
} }
} }
}
.combination-ability { .use-way {
padding: 0.8rem 0; padding: 0.8rem 0;
background: rgb(247, 248, 250);
.title-1 {
margin-bottom: 0.3rem;
}
.combine-content {
width: 13rem;
margin: 0 auto;
}
.combine-item {
margin: 0 0.1rem;
width: 4.28rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
border: 1px solid #e4e6f5;
border-radius: 0.1rem;
padding: 0.1rem 0;
cursor: pointer;
height: 2.5rem;
&:hover { .title-1 {
border-radius: 0.02rem; margin-bottom: 0.3rem;
border: 0.01rem solid #0058e1;
box-shadow: 0rem 0.08rem 0.2rem rgb(0 88 225 / 30%);
} }
.title { .left {
.btn {
padding: 10px 20px;
color: #526aff;
background: #fff;
border-radius: 50px;
margin: 10px;
font-size: 0.2rem;
width: 150px;
text-align: center;
cursor: pointer;
}
.btn-box {
display: flex;
flex-direction: column;
align-items: flex-end;
}
}
.content {
display: flex;
width: 13rem;
justify-content: space-between;
.word-bg {
background: linear-gradient(90deg, #7184fc, #94a3fc) !important;
}
.content-card {
height: 1.5rem;
width: 6.2rem;
border-radius: 0.2rem;
background: linear-gradient(
to right,
rgba(113, 132, 252, 0.4),
rgba(148, 163, 252, 0.4)
);
padding: 0 0.3rem;
display: flex;
justify-content: center;
.card-title {
font-size: 0.26rem;
color: #212956;
margin-bottom: 0.2rem;
line-height: 0.26rem;
}
.content-card-item {
width: 50%;
.card-text {
margin-right: 0.2rem;
color: rgba(33, 41, 86, 0.8);
font-size: 0.2rem;
max-width: 2.8rem;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
div:first-child {
display: block;
}
}
}
}
}
.combination-ability {
padding: 0.8rem 0;
background: rgb(247, 248, 250);
.title-1 {
margin-bottom: 0.3rem;
}
.combine-content {
width: 13rem;
margin: 0 auto;
}
.combine-item {
margin: 0 0.1rem;
width: 4.28rem;
display: flex;
flex-direction: column;
align-items: center;
border: 1px solid #e4e6f5;
border-radius: 0.1rem;
padding: 0.1rem 0;
cursor: pointer;
height: 2.5rem;
&:hover {
border-radius: 0.02rem;
border: 0.01rem solid #0058e1;
box-shadow: 0rem 0.08rem 0.2rem rgb(0 88 225 / 30%);
}
.title {
color: #212121;
text-align: center;
padding: 0.2rem 0;
font-size: 0.22rem;
text-align: center;
}
}
.name-box {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
width: 100%;
}
.no-data {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
font-size: 0.16rem;
color: #666;
text-align: center;
}
.name-text {
font-size: 0.16rem;
color: #212121; color: #212121;
line-height: 0.3rem;
height: 0.3rem;
text-align: center; text-align: center;
padding: 0.2rem 0; width: 50%;
font-size: .22rem; box-sizing: border-box;
text-align: center;
} }
} }
.name-box {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
width: 100%;
}
.no-data {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
font-size: 0.16rem;
color: #666;
text-align: center;
}
.name-text {
font-size: 0.16rem;
color: #212121;
line-height: 0.3rem;
height: 0.3rem;
text-align: center;
width: 50%;
box-sizing: border-box;
}
}
</style> </style>

View File

@ -56,7 +56,7 @@
clickData: { clickData: {
type: Object, type: Object,
default: () => { default: () => {
title: '' ''
}, },
}, },
}) })

View File

@ -4,21 +4,40 @@
<div id="container" class="content-menu"> <div id="container" class="content-menu">
<div class="rela"> <div class="rela">
<div class="left"> <div class="left">
<div class="first-title-text" v-for="(data, i) in titleList" :key="i" @click="changeName(data)" <div
:style="{ color: data.name === titleData.name ? '#0058e1' : '' }"> class="first-title-text"
v-for="(data, i) in titleList"
:key="i"
@click="changeName(data)"
:style="{ color: data.name === titleData.name ? '#0058e1' : '' }"
>
<div class="img" :class="data.className"></div> <div class="img" :class="data.className"></div>
{{ data.name }} {{ data.name }}
</div> </div>
<abilityDocTree :dataList="treeArray" @treeClick="treeClick" :clickData="clickData"></abilityDocTree> <abilityDocTree
:dataList="treeArray"
@treeClick="treeClick"
:clickData="clickData"
></abilityDocTree>
</div> </div>
<div class="right"> <div class="right">
<div class="new-menu-box" style="height: 100%" v-if="titleData.name === '新手指引'"> <div
class="new-menu-box"
style="height: 100%"
v-if="titleData.name === '新手指引'"
>
<!-- 新手指引 --> <!-- 新手指引 -->
<a-empty description="新手指引" /> <a-empty description="新手指引" />
</div> </div>
<div v-else style="height:100%"> <div v-else style="height: 100%">
<iframe name="iframeName" width="1000" height="100%" id="iframeId" :frameborder="0" <iframe
:src="doc_base_url + clickData.doc"></iframe> name="iframeName"
width="1000"
height="100%"
id="iframeId"
:frameborder="0"
:src="doc_base_url + clickData.doc"
></iframe>
</div> </div>
</div> </div>
</div> </div>
@ -26,199 +45,199 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import abilityDocTree from './components/abilityDocTree' import abilityDocTree from './components/abilityDocTree'
import { ref, reactive, onMounted, nextTick, watch } from 'vue' import { ref, onMounted } from 'vue'
import { Empty, message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { getDevelopDocTree } from '@/api/home' import { getDevelopDocTree } from '@/api/home'
import flatten from '@turf/flatten' // import flatten from '@turf/flatten'
const titleList = ref([ const titleList = ref([
{ {
name: '新手指引', name: '新手指引',
className: 'newGuide', className: 'newGuide',
}, },
{ {
name: '技术文档', name: '技术文档',
className: 'doc', className: 'doc',
}, },
]) ])
const titleData = ref(titleList.value[0]) const titleData = ref(titleList.value[0])
const clickData = ref({}) const clickData = ref({})
const treeArray = ref([]) const treeArray = ref([])
const treeArrayCopy = ref([]) const treeArrayCopy = ref([])
let typeList = ['组件服务', '应用资源', '基础设施', '数据资源', '知识库'] let typeList = ['组件服务', '应用资源', '基础设施', '数据资源', '知识库']
let doc_base_url = ref(window.SITE_CONFIG['frontUrl']) let doc_base_url = ref(window.SITE_CONFIG['frontUrl'])
const treeClick = (item) => { const treeClick = (item) => {
clickData.value = item clickData.value = item
console.log('clickData------------>', item) console.log('clickData------------>', item)
titleData.value = titleList.value[1] titleData.value = titleList.value[1]
}
const getTreeData = () => {
getDevelopDocTree({})
.then((res) => {
console.log('res------文档树------>', res)
if (res.data.code !== 0) {
return message.error(res.data.msg)
}
treeArray.value = res.data.data || []
treeArrayCopy.value = JSON.parse(JSON.stringify(treeArray.value))
})
.catch((err) => {
message.error(err)
})
}
const changeName = (item) => {
titleData.value = item
if (item.name == '新手指引') {
clickData.value = {}
} }
if (item.name == '技术文档') {
if (!clickData.value.title) { const getTreeData = () => {
clickData.value = {} getDevelopDocTree({})
treeArray.value = [] .then((res) => {
treeArrayCopy.value.map((val, i) => { console.log('res------文档树------>', res)
let obj = Object.assign({}, val, { if (res.data.code !== 0) {
title: val.title, return message.error(res.data.msg)
show: }
(i === 0 && val.children && val.children.length > 0) || treeArray.value = res.data.data || []
typeList.includes(val.title) treeArrayCopy.value = JSON.parse(JSON.stringify(treeArray.value))
? true
: false,
children: [],
})
formData(val.children, obj)
treeArray.value.push(obj)
}) })
getFirstData(treeArrayCopy.value[0] || {}) .catch((err) => {
message.error(err)
})
}
const changeName = (item) => {
titleData.value = item
if (item.name == '新手指引') {
clickData.value = {}
}
if (item.name == '技术文档') {
if (!clickData.value.title) {
clickData.value = {}
treeArray.value = []
treeArrayCopy.value.map((val, i) => {
let obj = Object.assign({}, val, {
title: val.title,
show:
(i === 0 && val.children && val.children.length > 0) ||
typeList.includes(val.title)
? true
: false,
children: [],
})
formData(val.children, obj)
treeArray.value.push(obj)
})
getFirstData(treeArrayCopy.value[0] || {})
}
} }
} }
}
const formData = (children = [], dataItem) => { const formData = (children = [], dataItem) => {
children.map((item, index) => { children.map((item, index) => {
let _obj = Object.assign({}, item, { let _obj = Object.assign({}, item, {
title: item.title, title: item.title,
show: show:
(index === 0 && item.children && item.children.length > 0) || (index === 0 && item.children && item.children.length > 0) ||
typeList.includes(item.title) typeList.includes(item.title)
? true ? true
: false, : false,
children: [], children: [],
})
if (item.children && item.children.length > 0) {
formData(item.children, _obj)
}
dataItem.children.push(_obj)
}) })
if (item.children && item.children.length > 0) {
formData(item.children, _obj)
}
dataItem.children.push(_obj)
})
}
const getFirstData = (firstObj = {}) => {
if (firstObj && firstObj.children && firstObj.children.length > 0) {
getFirstData(firstObj.children[0])
} else {
clickData.value = firstObj
} }
}
onMounted(() => { const getFirstData = (firstObj = {}) => {
getTreeData() if (firstObj && firstObj.children && firstObj.children.length > 0) {
}) getFirstData(firstObj.children[0])
} else {
clickData.value = firstObj
}
}
onMounted(() => {
getTreeData()
})
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.menu-box { .menu-box {
// overflow: hidden; // overflow: hidden;
height: 100%; height: 100%;
}
.first-title-text {
cursor: pointer;
font-size: 18px;
color: #333;
padding-bottom: 10px;
display: flex;
align-items: center;
&:hover {
color: #0058e1;
} }
}
.content-menu { .first-title-text {
width: 1240px; cursor: pointer;
display: flex; font-size: 18px;
justify-content: flex-start; color: #333;
margin: 0 auto; padding-bottom: 10px;
margin-top: 74px; display: flex;
box-sizing: border-box; align-items: center;
position: fixed;
left: 50%;
bottom: 0;
transform: translateX(-50%);
top: 0.6rem;
top: 0;
}
.left { &:hover {
width: 240px; color: #0058e1;
padding: 20px; }
height: 600px; }
margin-right: 20px;
background: rgba(244, 245, 248, 0.8);
overflow-y: scroll;
position: absolute;
top: 10px;
left: 0;
}
.right { .content-menu {
width: 870px; width: 1240px;
height: calc(100% - 20px); display: flex;
justify-content: flex-start;
margin: 0 auto;
margin-top: 74px;
box-sizing: border-box;
position: fixed;
left: 50%;
bottom: 0;
transform: translateX(-50%);
top: 0.6rem;
top: 0;
}
position: absolute; .left {
top: 10px; width: 240px;
left: 260px; padding: 20px;
} height: 600px;
margin-right: 20px;
background: rgba(244, 245, 248, 0.8);
overflow-y: scroll;
position: absolute;
top: 10px;
left: 0;
}
.sidebar { .right {
right: 0 !important; width: 870px;
} height: calc(100% - 20px);
.content { position: absolute;
right: 16rem !important; top: 10px;
left: 0 !important; left: 260px;
} }
.img { .sidebar {
height: 20px; right: 0 !important;
width: 20px; }
margin-right: 8px;
}
.doc { .content {
background: url('~@/assets/capabilityCloud/doc.png') no-repeat; right: 16rem !important;
background-size: 100%; left: 0 !important;
} }
.newGuide { .img {
background: url('~@/assets/capabilityCloud/newGuide.png') no-repeat; height: 20px;
background-size: 100%; width: 20px;
} margin-right: 8px;
}
.new-menu-box { .doc {
height: 100%; background: url('~@/assets/capabilityCloud/doc.png') no-repeat;
display: flex; background-size: 100%;
align-items: center; }
justify-content: center;
}
.rela { .newGuide {
width: 100%; background: url('~@/assets/capabilityCloud/newGuide.png') no-repeat;
height: 100%; background-size: 100%;
position: relative; }
}
.new-menu-box {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.rela {
width: 100%;
height: 100%;
position: relative;
}
</style> </style>

View File

@ -100,7 +100,7 @@
query: { query: {
select: type, select: type,
tecHnosphere: '', tecHnosphere: '',
appLiCation: '' appLiCation: '',
}, },
}) })
} }

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;

View File

@ -237,7 +237,7 @@
resourceId: val.resourceId, resourceId: val.resourceId,
createDate: val.createDate, createDate: val.createDate,
updateDate: val.updateDate, updateDate: val.updateDate,
...getObj(val, val.resourceDTO ? 'resourceDTO' : 'fuseDTO') ...getObj(val, val.resourceDTO ? 'resourceDTO' : 'fuseDTO'),
} }
if (checkedList.value.indexOf(val.resourceId) == -1) { if (checkedList.value.indexOf(val.resourceId) == -1) {
checkAll.value = false checkAll.value = false
@ -250,8 +250,8 @@
} }
function getObj(val, typeStr) { function getObj(val, typeStr) {
let typeObj = val[typeStr] || {}; let typeObj = val[typeStr] || {}
console.log('typeObj------------>', typeObj); console.log('typeObj------------>', typeObj)
return { return {
name: typeObj.name, name: typeObj.name,
type: typeObj.type, type: typeObj.type,

View File

@ -39,7 +39,9 @@
<a-list-item> <a-list-item>
<a-skeleton avatar :title="false" :loading="!!item.loading" active> <a-skeleton avatar :title="false" :loading="!!item.loading" active>
<a-list-item-meta <a-list-item-meta
:description="item.description || '--'" :description="
tabList[tabIndex] != '知识库' ? item.description || '--' : ''
"
style="position: relative" style="position: relative"
> >
<template #title> <template #title>