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

This commit is contained in:
wuhongjian 2022-07-18 17:29:30 +08:00
commit 665484d30c
5 changed files with 154 additions and 92 deletions

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-01 19:19:40 * @Date: 2022-04-01 19:19:40
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-30 19:36:48 * @LastEditTime: 2022-07-18 16:24:44
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -119,6 +119,14 @@ export function submitApply(data) {
data, data,
}) })
} }
//
export function applyAllApplication(data) {
return request({
url: '/ability/center/v2/applyAllApplication',
method: 'post',
data,
})
}
export function tabilityapplication(data) { export function tabilityapplication(data) {
return request({ return request({
url: '/processForm/tabilityapplication', url: '/processForm/tabilityapplication',
@ -342,7 +350,7 @@ export function getIntegrationServicesList(params) {
return request({ return request({
url: '/fuse/page', url: '/fuse/page',
method: 'get', method: 'get',
params params,
}) })
} }
@ -359,6 +367,6 @@ export function getDevelopDocTree(params) {
return request({ return request({
url: '/resource/selectDevelopDoc', url: '/resource/selectDevelopDoc',
method: 'get', method: 'get',
params params,
}) })
} }

View File

@ -39,6 +39,14 @@
class="resultListSearchInput" class="resultListSearchInput"
/> />
<button class="button-reset" @click="chongzhi()">重置</button> <button class="button-reset" @click="chongzhi()">重置</button>
<button
v-if="Cardsname == '应用资源'"
class="button-reset"
@click="applyAll()"
style="margin-left: 0.1rem"
>
全部申请
</button>
<div class="hengxian"></div> <div class="hengxian"></div>
</div> </div>
</div> </div>
@ -96,7 +104,7 @@
/> />
</div> </div>
</div> </div>
<div <!-- <div
class="top-content" class="top-content"
v-if="Cardsname == '组件服务' || Cardsname == '应用资源'" v-if="Cardsname == '组件服务' || Cardsname == '应用资源'"
> >
@ -119,7 +127,7 @@
</a-checkable-tag> </a-checkable-tag>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
</div> </div>
@ -316,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">
@ -336,7 +344,7 @@
</a-checkable-tag> </a-checkable-tag>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
</div> </div>
@ -514,7 +522,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">
@ -534,7 +542,7 @@
</a-checkable-tag> </a-checkable-tag>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
</div> </div>
@ -1095,7 +1103,15 @@
getAppResources() getAppResources()
} }
}) })
//
const applyAll = () => {
router.push({
path: '/apply',
query: {
applyAll: true,
},
})
}
// //
const onShowSizeChange = (current, pageSize) => { const onShowSizeChange = (current, pageSize) => {
currentPage.value = current currentPage.value = current
@ -1193,6 +1209,7 @@
loading, loading,
getShoppingCartList, getShoppingCartList,
whoShow1, whoShow1,
applyAll,
} }
}, },
components: { components: {

View File

@ -6,7 +6,7 @@
<aside-menu></aside-menu> <aside-menu></aside-menu>
</aside> --> </aside> -->
<article> <article>
<div class="from-card" v-if="applySuccess"> <div class="from-card" v-if="applySuccess && !applyAll">
<AbilityToApplyFor :dataList="list"></AbilityToApplyFor> <AbilityToApplyFor :dataList="list"></AbilityToApplyFor>
</div> </div>
<div class="form-container"> <div class="form-container">
@ -243,6 +243,7 @@
startOfBusinessKey, startOfBusinessKey,
updateInstanceId, updateInstanceId,
submitApply, submitApply,
applyAllApplication,
getUser, getUser,
getUserInfo, getUserInfo,
relaunch, relaunch,
@ -269,7 +270,8 @@
const disabled = ref(false) const disabled = ref(false)
const flag = ref(false) const flag = ref(false)
const list = ref(JSON.parse(localStorage.getItem('applyList'))) const list = ref(JSON.parse(localStorage.getItem('applyList')))
const num = ref(0) const applyAll = router.currentRoute.value.query.applyAll
if (!applyAll) {
list.value.map((item) => { list.value.map((item) => {
item.arr.map((val) => { item.arr.map((val) => {
console.log(item, '组件===========================') console.log(item, '组件===========================')
@ -288,6 +290,8 @@
num.value += Number(item.checkedList.length) num.value += Number(item.checkedList.length)
} }
}) })
}
const num = ref(0)
console.log( console.log(
'list', 'list',
list.value list.value
@ -299,7 +303,9 @@
let record = ref('1') let record = ref('1')
const text = ref('') const text = ref('')
const formName = reactive({ const formName = reactive({
title: list.value[0].children title: applyAll
? '全部应用资源申请'
: list.value[0].children
? list.value[0].children ? list.value[0].children
.filter((val) => val.id == list.value[0].checkedList[0])[0] .filter((val) => val.id == list.value[0].checkedList[0])[0]
.resourceName.concat( .resourceName.concat(
@ -412,6 +418,7 @@
if (!formName) { if (!formName) {
return message.error('请设置表单名称') return message.error('请设置表单名称')
} }
if (!applyAll) {
let ids = [] let ids = []
formName.system = [] formName.system = []
console.log('list==================', list.value) console.log('list==================', list.value)
@ -456,14 +463,13 @@
console.log('提交数据==========================>', formName, ids) console.log('提交数据==========================>', formName, ids)
if (formName.system.length !== 0) { if (formName.system.length !== 0) {
submitApply(formName).then((res) => { submitApply(formName).then((res) => {
applySuccess.value = false // applySuccess.value = false
message.success('操作成功') message.success('申请提交成功,请到消息中心查看')
console.log('能力申请================>', res) console.log('能力申请================>', res)
if (ids && ids.length > 0) { if (ids && ids.length > 0) {
sgcDel({ ids: ids }).then((res) => { sgcDel({ ids: ids }).then((res) => {
if (res.data.msg === 'success') { if (res.data.msg === 'success') {
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {
@ -482,6 +488,22 @@
} }
}) })
} }
} else {
formName.applicationSystem = ''
applyAllApplication(formName).then((res) => {
if (res.data.code == 0) {
message.success('申请提交成功,请到消息中心查看!')
router.push({
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
} else {
message.error('申请失败!')
}
})
}
}) })
} }
} }
@ -668,6 +690,7 @@
systemOptions, systemOptions,
applicationSceneOpthion, applicationSceneOpthion,
flag, flag,
applyAll,
} }
}, },
} }

View File

@ -289,7 +289,7 @@
" "
> >
{{ {{
item.shareCondition == '免批申请' ? '免批申请' : '立即申请' item.shareCondition == '免批申请' ? '立即申请' : '立即申请'
}} }}
</a-button> </a-button>
</div> </div>
@ -551,8 +551,8 @@
type: item.type, type: item.type,
componentType: componentType:
(item.infoList.filter( (item.infoList.filter(
(val) => (val.attrType == '组件类型')[0] (val) => val.attrType == '组件类型'
) && )[0] &&
item.infoList.filter( item.infoList.filter(
(val) => val.attrType == '组件类型' (val) => val.attrType == '组件类型'
)[0].attrValue) || )[0].attrValue) ||

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-13 15:56:51 * @LastEditTime: 2022-07-18 17:25:03
* @Description:我的申请 能力申请 查看详情 * @Description:我的申请 能力申请 查看详情
--> -->
<template> <template>
@ -34,7 +34,7 @@
申请单附件 申请单附件
<span class="enclosure"> <span class="enclosure">
{{ props.refObj.enclosureName || '--' }} {{ props.refObj.enclosureName || '--' }}
<span class="btn">预览</span> <span class="btn" @click="showThis()">预览</span>
</span> </span>
</span> </span>
</p> </p>
@ -139,6 +139,13 @@
const props = defineProps({ const props = defineProps({
refObj: { type: Object, default: null }, refObj: { type: Object, default: null },
}) })
const showThis = () => {
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(props.refObj.enclosure))
)
}
const showArr = ref([]) const showArr = ref([])
console.log(props.refObj, '=====================================') console.log(props.refObj, '=====================================')
if (props.refObj.resourceApplication) { if (props.refObj.resourceApplication) {
@ -286,6 +293,13 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.name { .name {
width: 6rem;
height: 0.2rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
.type { .type {
background: #0087ff; background: #0087ff;
color: #fff; color: #fff;