+
@@ -243,6 +243,7 @@
startOfBusinessKey,
updateInstanceId,
submitApply,
+ applyAllApplication,
getUser,
getUserInfo,
relaunch,
@@ -269,25 +270,28 @@
const disabled = ref(false)
const flag = ref(false)
const list = ref(JSON.parse(localStorage.getItem('applyList')))
- const num = ref(0)
- list.value.map((item) => {
- item.arr.map((val) => {
- console.log(item, '组件===========================')
- let obj = item.children
- ? item.children.filter((type) => type.id == val.id)[0]
- : val.type !== '应用资源'
- if (obj) {
- console.log('11111111111111111111111111111', obj, flag.value)
- if (obj.type !== '应用资源') {
- flag.value = true
+ const applyAll = router.currentRoute.value.query.applyAll
+ if (!applyAll) {
+ list.value.map((item) => {
+ item.arr.map((val) => {
+ console.log(item, '组件===========================')
+ let obj = item.children
+ ? item.children.filter((type) => type.id == val.id)[0]
+ : val.type !== '应用资源'
+ if (obj) {
+ console.log('11111111111111111111111111111', obj, flag.value)
+ if (obj.type !== '应用资源') {
+ flag.value = true
+ }
}
+ })
+ if (item.checkedList) {
+ console.log(item)
+ num.value += Number(item.checkedList.length)
}
})
- if (item.checkedList) {
- console.log(item)
- num.value += Number(item.checkedList.length)
- }
- })
+ }
+ const num = ref(0)
console.log(
'list',
list.value
@@ -299,7 +303,9 @@
let record = ref('1')
const text = ref('')
const formName = reactive({
- title: list.value[0].children
+ title: applyAll
+ ? '全部应用资源申请'
+ : list.value[0].children
? list.value[0].children
.filter((val) => val.id == list.value[0].checkedList[0])[0]
.resourceName.concat(
@@ -412,73 +418,89 @@
if (!formName) {
return message.error('请设置表单名称')
}
- let ids = []
- formName.system = []
- console.log('list==================', list.value)
- list.value.map((val) => {
- val.arr.map((item) => {
- if (item.type !== '基础设施') {
- formName.system.push({
- resourceId: item.resourceId,
- resourceName: item.resourceName,
- })
- console.log(item.id)
- if (item.id) {
- ids.push(item.id)
- }
- } else {
- let obj = {}
- Object.assign(obj, formName)
- console.log('摄像头===============>', obj, item)
- obj.system = []
- item.note1 = JSON.parse(item.note1)
- item.note1.map((sxt) => {
- obj.system.push({
- resourceId: sxt.idtCameraChannel + '',
- resourceName: sxt.channelName,
- cameraId: sxt.channelId,
+ if (!applyAll) {
+ let ids = []
+ formName.system = []
+ console.log('list==================', list.value)
+ list.value.map((val) => {
+ val.arr.map((item) => {
+ if (item.type !== '基础设施') {
+ formName.system.push({
+ resourceId: item.resourceId,
+ resourceName: item.resourceName,
})
- })
- submitApply(obj).then((res) => {
- applySuccess.value = false
- console.log('摄像头申请================>', res)
+ console.log(item.id)
if (item.id) {
- sgcDel({ ids: [item.id] }).then((res) => {
- if (res.data.msg === 'success') {
- mybus.emit('getSgcNum')
- }
- })
+ ids.push(item.id)
}
- })
- }
+ } else {
+ let obj = {}
+ Object.assign(obj, formName)
+ console.log('摄像头===============>', obj, item)
+ obj.system = []
+ item.note1 = JSON.parse(item.note1)
+ item.note1.map((sxt) => {
+ obj.system.push({
+ resourceId: sxt.idtCameraChannel + '',
+ resourceName: sxt.channelName,
+ cameraId: sxt.channelId,
+ })
+ })
+ submitApply(obj).then((res) => {
+ applySuccess.value = false
+ console.log('摄像头申请================>', res)
+ if (item.id) {
+ sgcDel({ ids: [item.id] }).then((res) => {
+ if (res.data.msg === 'success') {
+ mybus.emit('getSgcNum')
+ }
+ })
+ }
+ })
+ }
+ })
})
- })
- console.log('提交数据==========================>', formName, ids)
- if (formName.system.length !== 0) {
- submitApply(formName).then((res) => {
- applySuccess.value = false
- message.success('操作成功!')
- console.log('能力申请================>', res)
- if (ids && ids.length > 0) {
- sgcDel({ ids: ids }).then((res) => {
- if (res.data.msg === 'success') {
- mybus.emit('getSgcNum')
-
- router.push({
- path: '/DetailsPageconetent',
- query: {
- select: '组件服务',
- },
- })
- }
- })
- } else {
+ console.log('提交数据==========================>', formName, ids)
+ if (formName.system.length !== 0) {
+ submitApply(formName).then((res) => {
+ // applySuccess.value = false
+ message.success('申请提交成功,请到消息中心查看!')
+ console.log('能力申请================>', res)
+ if (ids && ids.length > 0) {
+ sgcDel({ ids: ids }).then((res) => {
+ if (res.data.msg === 'success') {
+ mybus.emit('getSgcNum')
+ router.push({
+ path: '/DetailsPageconetent',
+ query: {
+ select: '组件服务',
+ },
+ })
+ }
+ })
+ } else {
+ router.push({
+ path: '/DetailsPageconetent',
+ query: {
+ select: '组件服务',
+ },
+ })
+ }
+ })
+ }
+ } 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,
applicationSceneOpthion,
flag,
+ applyAll,
}
},
}
diff --git a/front/src/views/home/components/searchResultList.vue b/front/src/views/home/components/searchResultList.vue
index 973483c4..1d3fdc97 100644
--- a/front/src/views/home/components/searchResultList.vue
+++ b/front/src/views/home/components/searchResultList.vue
@@ -289,7 +289,7 @@
"
>
{{
- item.shareCondition == '免批申请' ? '免批申请' : '立即申请'
+ item.shareCondition == '免批申请' ? '立即申请' : '立即申请'
}}
@@ -548,8 +548,8 @@
type: item.type,
componentType:
(item.infoList.filter(
- (val) => (val.attrType == '组件类型')[0]
- ) &&
+ (val) => val.attrType == '组件类型'
+ )[0] &&
item.infoList.filter(
(val) => val.attrType == '组件类型'
)[0].attrValue) ||
diff --git a/front/src/views/personalCenter/components/AbilityApplication.vue b/front/src/views/personalCenter/components/AbilityApplication.vue
index 2afbf921..9fed0ba6 100644
--- a/front/src/views/personalCenter/components/AbilityApplication.vue
+++ b/front/src/views/personalCenter/components/AbilityApplication.vue
@@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-07-12 09:42:44
* @LastEditors: hisense.liangjunhua
- * @LastEditTime: 2022-07-13 15:56:51
+ * @LastEditTime: 2022-07-18 17:25:03
* @Description:我的申请 能力申请 查看详情
-->
@@ -34,7 +34,7 @@
申请单附件:
{{ props.refObj.enclosureName || '--' }}
- 预览
+ 预览
@@ -139,6 +139,13 @@
const props = defineProps({
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([])
console.log(props.refObj, '=====================================')
if (props.refObj.resourceApplication) {
@@ -286,6 +293,13 @@
justify-content: space-between;
align-items: center;
.name {
+ width: 6rem;
+ height: 0.2rem;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 1;
+ -webkit-box-orient: vertical;
.type {
background: #0087ff;
color: #fff;