Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
d38c0ae217
|
@ -72,16 +72,17 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getInfo (id) {
|
getInfo (id) {
|
||||||
this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
|
this.$http.get('/demandComment/' + id).then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
this.dataForm = res.data.resourceDTO
|
this.dataForm = res.data
|
||||||
if (this.dataForm.type != '应用资源') {
|
// this.dataForm = res.data.resourceDTO
|
||||||
this.shifoushizujian = false
|
// if (this.dataForm.type != '应用资源') {
|
||||||
} else {
|
// this.shifoushizujian = false
|
||||||
this.shifoushizujian = true
|
// } else {
|
||||||
}
|
// this.shifoushizujian = true
|
||||||
|
// }
|
||||||
console.log('this.dataForm', this.dataForm)
|
console.log('this.dataForm', this.dataForm)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<!--
|
<!--
|
||||||
* @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.wuhongjian
|
||||||
* @LastEditTime: 2022-07-14 10:58:46
|
* @LastEditTime: 2022-07-16 13:01:41
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
// 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';
|
||||||
// 开发
|
// 开发
|
||||||
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
|
window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
|
||||||
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
|
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['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
|
||||||
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
|
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
|
||||||
|
|
|
@ -74,8 +74,7 @@ instance.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
debugger
|
debugger
|
||||||
const token = getAccessToken()
|
const token = getAccessToken()
|
||||||
if (token)
|
if (token) config.headers[tokenName] = token
|
||||||
config.headers[tokenName] = token
|
|
||||||
if (
|
if (
|
||||||
config.data &&
|
config.data &&
|
||||||
config.headers['Content-Type'] ===
|
config.headers['Content-Type'] ===
|
||||||
|
|
|
@ -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-11 16:39:36
|
* @LastEditTime: 2022-07-16 10:57:59
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
// 这里是一个单点登录的入口
|
// 这里是一个单点登录的入口
|
||||||
getUserInfo().then(res=>{
|
getUserInfo().then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
router.replace('/home')
|
router.replace('/home')
|
||||||
})
|
})
|
||||||
|
|
|
@ -110,9 +110,24 @@
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, text }">
|
<template #bodyCell="{ column, text }">
|
||||||
<template v-if="column.dataIndex !== 'name'">
|
<template
|
||||||
|
v-if="
|
||||||
|
column.dataIndex !== 'name' &&
|
||||||
|
(column.title === '组件服务' || column.title === '应用资源')
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ text || 0 }}
|
{{ text || 0 }}
|
||||||
</template>
|
</template>
|
||||||
|
<template
|
||||||
|
v-else-if="
|
||||||
|
column.dataIndex !== 'name' &&
|
||||||
|
(column.title === '知识库' ||
|
||||||
|
column.title === '基础设施' ||
|
||||||
|
column.title === '数据资源')
|
||||||
|
"
|
||||||
|
>
|
||||||
|
--
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<!--
|
<!--
|
||||||
* @Author: hisense.liangjunhua
|
* @Author: hisense.liangjunhua
|
||||||
* @Date: 2022-06-17 14:11:08
|
* @Date: 2022-06-17 14:11:08
|
||||||
* @LastEditors: hisense.liangjunhua
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-07-16 11:29:11
|
* @LastEditTime: 2022-07-16 15:05:16
|
||||||
* @Description: 上架
|
* @Description: 上架
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -600,16 +600,20 @@
|
||||||
const mockData = ref([])
|
const mockData = ref([])
|
||||||
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
|
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
|
||||||
const titleName = ref('关联应用')
|
const titleName = ref('关联应用')
|
||||||
|
const targetKeys = ref([])
|
||||||
|
// 上一步关联数据
|
||||||
|
const targetKeysBack = ref([])
|
||||||
|
|
||||||
const sourceClick = () => {
|
const sourceClick = () => {
|
||||||
mockData.value = []
|
mockData.value = []
|
||||||
visibleAssociatedApplication.value = true
|
visibleAssociatedApplication.value = true
|
||||||
|
props.dataFrom.infoList.forEach((val) => {
|
||||||
|
if (val.attrType === '来源应用' && val.attrValue != '') {
|
||||||
queryApplicationRelByResourceId({
|
queryApplicationRelByResourceId({
|
||||||
referenceId: 0,
|
referenceId: 0,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
// console.log(res.data.data.notLinked)
|
// console.log(res.data.data.notLinked)
|
||||||
res.data.data.notLinked.forEach((val, index) => {
|
res.data.data.notLinked.forEach((val, index) => {
|
||||||
// console.log(val, index)
|
|
||||||
mockData.value.push({
|
mockData.value.push({
|
||||||
key: val.id,
|
key: val.id,
|
||||||
title: val.name,
|
title: val.name,
|
||||||
|
@ -617,6 +621,27 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
targetKeys.value = []
|
||||||
|
val.attrValue.split(',').forEach((item) => {
|
||||||
|
targetKeys.value.push(item)
|
||||||
|
})
|
||||||
|
console.log(targetKeys.value)
|
||||||
|
// console.log('wowowo')
|
||||||
|
} else if (val.attrType === '来源应用' && val.attrValue == '') {
|
||||||
|
queryApplicationRelByResourceId({
|
||||||
|
referenceId: 0,
|
||||||
|
}).then((res) => {
|
||||||
|
// console.log(res.data.data.notLinked)
|
||||||
|
res.data.data.notLinked.forEach((val, index) => {
|
||||||
|
mockData.value.push({
|
||||||
|
key: val.id,
|
||||||
|
title: val.name,
|
||||||
|
description: val.id,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 关联组件
|
// 关联组件
|
||||||
const componentsClick = () => {
|
const componentsClick = () => {
|
||||||
|
@ -624,6 +649,29 @@
|
||||||
titleName.value = '关联组件'
|
titleName.value = '关联组件'
|
||||||
mockData.value = []
|
mockData.value = []
|
||||||
visibleAssociatedApplication.value = true
|
visibleAssociatedApplication.value = true
|
||||||
|
props.dataFrom.infoList.forEach((val) => {
|
||||||
|
if (val.attrType === '关联组件信息' && val.attrValue != '') {
|
||||||
|
queryResourceRelByKeyId({
|
||||||
|
keyId: 0,
|
||||||
|
type: '组件服务',
|
||||||
|
referenceName: '',
|
||||||
|
}).then((res) => {
|
||||||
|
// console.log(res.data.data.notLinked)
|
||||||
|
res.data.data.notLinked.forEach((val, index) => {
|
||||||
|
mockData.value.push({
|
||||||
|
key: val.id,
|
||||||
|
title: val.name,
|
||||||
|
description: val.id,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
targetKeys.value = []
|
||||||
|
val.attrValue.split(',').forEach((item) => {
|
||||||
|
targetKeys.value.push(item)
|
||||||
|
})
|
||||||
|
console.log(targetKeys.value)
|
||||||
|
// console.log('wowowo')
|
||||||
|
} else if (val.attrType === '关联组件信息' && val.attrValue == '') {
|
||||||
queryResourceRelByKeyId({
|
queryResourceRelByKeyId({
|
||||||
keyId: 0,
|
keyId: 0,
|
||||||
type: '组件服务',
|
type: '组件服务',
|
||||||
|
@ -631,7 +679,6 @@
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
// console.log(res.data.data.notLinked)
|
// console.log(res.data.data.notLinked)
|
||||||
res.data.data.notLinked.forEach((val, index) => {
|
res.data.data.notLinked.forEach((val, index) => {
|
||||||
// console.log(val, index)
|
|
||||||
mockData.value.push({
|
mockData.value.push({
|
||||||
key: val.id,
|
key: val.id,
|
||||||
title: val.name,
|
title: val.name,
|
||||||
|
@ -640,17 +687,19 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const targetKeys = ref([])
|
})
|
||||||
|
}
|
||||||
const selectedKeys = ref([])
|
const selectedKeys = ref([])
|
||||||
|
|
||||||
const handleChange = (nextTargetKeys, direction, moveKeys) => {
|
const handleChange = (nextTargetKeys, direction, moveKeys) => {
|
||||||
console.log('targetKeys: ', nextTargetKeys)
|
console.log('targetKeys: ', nextTargetKeys)
|
||||||
console.log('direction: ', direction)
|
console.log('direction: ', direction)
|
||||||
console.log('moveKeys: ', moveKeys)
|
console.log('moveKeys: ', moveKeys)
|
||||||
|
targetKeys.value = moveKeys
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
|
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
|
||||||
console.log('targetSelectedKeys: ', targetSelectedKeys)
|
console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleOk = (e) => {
|
const handleOk = (e) => {
|
||||||
|
@ -975,4 +1024,7 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
:deep(.ant-transfer-list-header .ant-checkbox-wrapper) {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -126,11 +126,13 @@
|
||||||
'props.dataList.infoList==============>',
|
'props.dataList.infoList==============>',
|
||||||
navList.value.filter((item) => item.name === list.value[0])
|
navList.value.filter((item) => item.name === list.value[0])
|
||||||
)
|
)
|
||||||
|
if (list.value.length > 0) {
|
||||||
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
|
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
|
||||||
select.value = navList.value.filter(
|
select.value = navList.value.filter(
|
||||||
(item) => (item.name === '关联应用') | (item.name === list.value[0])
|
(item) => (item.name === '关联应用') | (item.name === list.value[0])
|
||||||
)[0].key
|
)[0].key
|
||||||
}
|
}
|
||||||
|
}
|
||||||
console.log('11111111111111111111111111', list.value, navList.value)
|
console.log('11111111111111111111111111', list.value, navList.value)
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
|
|
|
@ -149,11 +149,6 @@
|
||||||
dataFrom.value.content[1].childrenContent.push(itemContent)
|
dataFrom.value.content[1].childrenContent.push(itemContent)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let obj = {
|
|
||||||
attrType: '访问地址',
|
|
||||||
attrValue: props.dataList.link || '------',
|
|
||||||
}
|
|
||||||
dataFrom.value.content[0].childrenContent.push(obj)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,7 +8,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="business-navigation" v-if="navList.length > 0">
|
<div class="business-navigation" v-if="navList.length > 0">
|
||||||
<template v-for="nav in navList" :key="nav.key">
|
<template v-for="nav in navList" :key="nav.key">
|
||||||
<div class="nav" :class="{ select: nav.key == select }" v-if="nav.show" @click="selectNav(nav.key)">
|
<div
|
||||||
|
class="nav"
|
||||||
|
:class="{ select: nav.key == select }"
|
||||||
|
v-if="nav.show"
|
||||||
|
@click="selectNav(nav.key)"
|
||||||
|
>
|
||||||
{{ nav.name }}
|
{{ nav.name }}
|
||||||
<span class="line"></span>
|
<span class="line"></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -75,7 +80,6 @@ if (keyId) {
|
||||||
}
|
}
|
||||||
const selectNav = (key) => {
|
const selectNav = (key) => {
|
||||||
select.value = key
|
select.value = key
|
||||||
console.log(key, select.value)
|
|
||||||
mybus.emit('flyToView', select.value)
|
mybus.emit('flyToView', select.value)
|
||||||
}
|
}
|
||||||
if (props.dataList.infoList) {
|
if (props.dataList.infoList) {
|
||||||
|
|
|
@ -164,6 +164,9 @@
|
||||||
businessArea.value = props.dataList.infoList.filter(
|
businessArea.value = props.dataList.infoList.filter(
|
||||||
(val) => val.attrType === '应用领域'
|
(val) => val.attrType === '应用领域'
|
||||||
)[0].attrValue
|
)[0].attrValue
|
||||||
|
let obj = props.dataList.infoList.filter(
|
||||||
|
(val) => val.attrType === '组件类型'
|
||||||
|
)[0]
|
||||||
if (
|
if (
|
||||||
props.dataList.infoList.filter((val) => val.attrType === '部署位置')[0]
|
props.dataList.infoList.filter((val) => val.attrType === '部署位置')[0]
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -96,6 +96,8 @@
|
||||||
list.value.push(item.attrType)
|
list.value.push(item.attrType)
|
||||||
} else if (item.attrType === '组件视频介绍') {
|
} else if (item.attrType === '组件视频介绍') {
|
||||||
list.value.push('组件展示')
|
list.value.push('组件展示')
|
||||||
|
} else if (item.attrType === '是否支持试用' && item.attrValue === '是') {
|
||||||
|
list.value.push('组件试用')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
list.value.unshift('关联应用')
|
list.value.unshift('关联应用')
|
||||||
|
@ -111,9 +113,12 @@
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
|
||||||
select.value = navList.value.filter(
|
select.value = navList.value.filter(
|
||||||
(item) => item.name === list.value[0]
|
(item) => (item.name === '关联应用') | (item.name === list.value[0])
|
||||||
|
// (item) => item.name === list.value[0]
|
||||||
)[0].key
|
)[0].key
|
||||||
|
}
|
||||||
console.log('11111111111111111111111111', list.value, navList.value)
|
console.log('11111111111111111111111111', list.value, navList.value)
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
|
@ -137,10 +142,15 @@
|
||||||
list.value.push(item.attrType)
|
list.value.push(item.attrType)
|
||||||
} else if (item.attrType === '组件视频介绍') {
|
} else if (item.attrType === '组件视频介绍') {
|
||||||
list.value.push('组件展示')
|
list.value.push('组件展示')
|
||||||
|
} else if (
|
||||||
|
item.attrType === '是否支持试用' &&
|
||||||
|
item.attrValue === '是'
|
||||||
|
) {
|
||||||
|
list.value.push('组件试用')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
list.value.unshift('关联应用')
|
list.value.unshift('关联应用')
|
||||||
list.value.push('组件试用')
|
// list.value.push('组件试用')
|
||||||
list.value.push('使用方式')
|
list.value.push('使用方式')
|
||||||
navList.value.forEach((item) => {
|
navList.value.forEach((item) => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
})
|
})
|
||||||
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 === '是否支持试用' && item.attrValue === '是'
|
||||||
)[0]
|
)[0]
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
flag.value = false
|
flag.value = false
|
||||||
|
@ -94,7 +94,9 @@
|
||||||
() => props.dataList,
|
() => props.dataList,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
let obj = val.infoList.filter((item) => item.attrType === '试用地址')[0]
|
let obj = val.infoList.filter(
|
||||||
|
(item) => item.attrType === '是否支持试用' && item.attrValue === '是'
|
||||||
|
)[0]
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
flag.value = false
|
flag.value = false
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -82,7 +82,6 @@
|
||||||
const select = ref('layer-service-associated-ability')
|
const select = ref('layer-service-associated-ability')
|
||||||
const selectNav = (key) => {
|
const selectNav = (key) => {
|
||||||
select.value = key
|
select.value = key
|
||||||
console.log(key, select.value)
|
|
||||||
mybus.emit('flyToView', select.value)
|
mybus.emit('flyToView', select.value)
|
||||||
}
|
}
|
||||||
if (props.dataList.infoList) {
|
if (props.dataList.infoList) {
|
||||||
|
@ -145,9 +144,12 @@
|
||||||
item.show = true
|
item.show = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
|
||||||
select.value = navList.value.filter(
|
select.value = navList.value.filter(
|
||||||
(item) => item.name === list.value[0]
|
(item) => (item.name === '关联应用') | (item.name === list.value[0])
|
||||||
|
// (item) => item.name === list.value[0]
|
||||||
)[0].key
|
)[0].key
|
||||||
|
}
|
||||||
console.log('11111111111111111111111111', list.value, navList.value)
|
console.log('11111111111111111111111111', list.value, navList.value)
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-04-19 17:18:48
|
* @Date: 2022-04-19 17:18:48
|
||||||
* @LastEditors: hisense.wuhongjian
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-05-06 19:11:32
|
* @LastEditTime: 2022-07-16 15:01:48
|
||||||
* @Description: markdown编辑器
|
* @Description: markdown编辑器
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.uuidSplice()
|
// this.uuidSplice()
|
||||||
this.getDevelopmentFile()
|
this.getDevelopmentFile()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -92,12 +92,15 @@
|
||||||
const blob = new Blob([file], {
|
const blob = new Blob([file], {
|
||||||
type: 'md',
|
type: 'md',
|
||||||
})
|
})
|
||||||
let myfile = new File([blob], this.uuidSnum + '.md')
|
if (this.uuidSnum === '') {
|
||||||
|
this.uuidSplice()
|
||||||
|
}
|
||||||
|
let myfile = new File([blob], this.uuidSnum)
|
||||||
var formData = new FormData()
|
var formData = new FormData()
|
||||||
const type = pinyin(this.dataFrom.type, {
|
const type = pinyin(this.dataFrom.type, {
|
||||||
pattern: 'initial',
|
pattern: 'initial',
|
||||||
}).replace(/\s*/g, '')
|
}).replace(/\s*/g, '')
|
||||||
formData.append('fileName', this.uuidSnum + '.md')
|
formData.append('fileName', this.uuidSnum)
|
||||||
formData.append('type', type)
|
formData.append('type', type)
|
||||||
formData.append('file', myfile) // 'file' 为HTTP Post里的字段名, file 对浏览器里的File对象
|
formData.append('file', myfile) // 'file' 为HTTP Post里的字段名, file 对浏览器里的File对象
|
||||||
// formData.append('name', this.route.currentRoute.query.id + '.md')
|
// formData.append('name', this.route.currentRoute.query.id + '.md')
|
||||||
|
@ -118,22 +121,33 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDevelopmentFile() {
|
async getDevelopmentFile() {
|
||||||
|
debugger
|
||||||
|
const uuidParam = this.dataFrom.infoList.filter((item) => {
|
||||||
|
if (item.attrType === '技术文档') {
|
||||||
|
return item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let uuid = ''
|
||||||
|
if (uuidParam[0].attrValue) {
|
||||||
|
uuid = uuidParam[0].attrValue.split('/')[1].split('.')[0]
|
||||||
|
}
|
||||||
|
this.uuidSnum = uuid
|
||||||
const type = pinyin(this.dataFrom.type, {
|
const type = pinyin(this.dataFrom.type, {
|
||||||
pattern: 'initial',
|
pattern: 'initial',
|
||||||
}).replace(/\s*/g, '')
|
}).replace(/\s*/g, '')
|
||||||
console.log(type)
|
console.log(type)
|
||||||
const param = {
|
const param = {
|
||||||
type: type,
|
type: type,
|
||||||
resourceId: this.uuidSnum,
|
resourceId: uuid,
|
||||||
}
|
}
|
||||||
const res = await getDevelopmentFile(param)
|
const res = await getDevelopmentFile(param)
|
||||||
this.text = res.data
|
this.text = res.data
|
||||||
let infoList = {
|
// let infoList = {
|
||||||
attrType: '技术文档',
|
// attrType: '技术文档',
|
||||||
attrValue: this.text.data,
|
// attrValue: this.text.data,
|
||||||
delFlag: 0,
|
// delFlag: 0,
|
||||||
}
|
// }
|
||||||
mybus.emit('chageDataFrom', infoList)
|
// mybus.emit('chageDataFrom', infoList)
|
||||||
console.log('res', res)
|
console.log('res', res)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -68,8 +68,8 @@
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items" :key="showKey">
|
||||||
<div class="item" v-for="val in list" :key="val.id">
|
<div class="item" v-for="(val, valIndex) in list" :key="val.id">
|
||||||
<div class="item-top" @click="showBottom(val)">
|
<div class="item-top" @click="showBottom(val)">
|
||||||
<div>
|
<div>
|
||||||
<a-checkbox
|
<a-checkbox
|
||||||
|
@ -89,7 +89,6 @@
|
||||||
:loading="val.initLoading"
|
:loading="val.initLoading"
|
||||||
item-layout="horizontal"
|
item-layout="horizontal"
|
||||||
:data-source="val.children"
|
:data-source="val.children"
|
||||||
:key="showKey"
|
|
||||||
>
|
>
|
||||||
<template #renderItem="{ item }">
|
<template #renderItem="{ item }">
|
||||||
<a-list-item>
|
<a-list-item>
|
||||||
|
@ -131,7 +130,7 @@
|
||||||
title="是否删除该记录?"
|
title="是否删除该记录?"
|
||||||
ok-text="是"
|
ok-text="是"
|
||||||
cancel-text="否"
|
cancel-text="否"
|
||||||
@confirm="delOne(item)"
|
@confirm="delOne(item, valIndex)"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
>
|
>
|
||||||
<a-button
|
<a-button
|
||||||
|
@ -453,7 +452,7 @@
|
||||||
reverseSelectionFalg.value = !reverseSelectionFalg.value
|
reverseSelectionFalg.value = !reverseSelectionFalg.value
|
||||||
}
|
}
|
||||||
// 重置
|
// 重置
|
||||||
const clean = () => {
|
const clean = (index) => {
|
||||||
name.value = ''
|
name.value = ''
|
||||||
type.value = ''
|
type.value = ''
|
||||||
pageNum.value = '1'
|
pageNum.value = '1'
|
||||||
|
@ -463,10 +462,10 @@
|
||||||
checkedListAll.value = []
|
checkedListAll.value = []
|
||||||
checkAll.value = false
|
checkAll.value = false
|
||||||
showKey.value++
|
showKey.value++
|
||||||
getList()
|
getList('', index)
|
||||||
}
|
}
|
||||||
// 获取信息
|
// 获取信息
|
||||||
const getList = (type) => {
|
const getList = (type, index) => {
|
||||||
if (type == 'init') {
|
if (type == 'init') {
|
||||||
pageNum.value = 1
|
pageNum.value = 1
|
||||||
pageSize.value = 99999
|
pageSize.value = 99999
|
||||||
|
@ -491,7 +490,7 @@
|
||||||
val.pageNum = '1'
|
val.pageNum = '1'
|
||||||
val.pageSize = '99999'
|
val.pageSize = '99999'
|
||||||
})
|
})
|
||||||
if (statistics == res.data.data.list.length) {
|
if (statistics != 0 && statistics == res.data.data.list.length) {
|
||||||
checkAll.value = true
|
checkAll.value = true
|
||||||
}
|
}
|
||||||
if (list.value.length == 0) {
|
if (list.value.length == 0) {
|
||||||
|
@ -501,8 +500,31 @@
|
||||||
load.value = Number(pageNum.value)
|
load.value = Number(pageNum.value)
|
||||||
}
|
}
|
||||||
// console.log('整体页面加载次数===============>', load.value)
|
// console.log('整体页面加载次数===============>', load.value)
|
||||||
|
// 判断是否有已打开项,如果有重新载入之后自动打开
|
||||||
|
debugger
|
||||||
list.value = res.data.data.list
|
list.value = res.data.data.list
|
||||||
|
if (index || index === 0) {
|
||||||
|
debugger
|
||||||
|
list.value[index].show = true
|
||||||
|
// console.log('1111', list.value[index])
|
||||||
|
showNew(list.value[index])
|
||||||
|
// showBottom()
|
||||||
|
}
|
||||||
|
// list.value = res.data.data.list
|
||||||
|
console.log(
|
||||||
|
'重新请求值',
|
||||||
|
index,
|
||||||
|
// res.data.data.list[index].show,
|
||||||
|
list.value
|
||||||
|
)
|
||||||
|
|
||||||
total.value = res.data.data.deptCount
|
total.value = res.data.data.deptCount
|
||||||
|
console.log(
|
||||||
|
'重新请求值2',
|
||||||
|
index,
|
||||||
|
// res.data.data.list[index].show,
|
||||||
|
list.value
|
||||||
|
)
|
||||||
showKey.value++
|
showKey.value++
|
||||||
if (type == 'init' || type == 'changePage') {
|
if (type == 'init' || type == 'changePage') {
|
||||||
getListByDeptId(list.value[0])
|
getListByDeptId(list.value[0])
|
||||||
|
@ -573,11 +595,15 @@
|
||||||
}
|
}
|
||||||
// 显示资源信息
|
// 显示资源信息
|
||||||
const showBottom = (item) => {
|
const showBottom = (item) => {
|
||||||
|
debugger
|
||||||
item.show = !item.show
|
item.show = !item.show
|
||||||
if (item.show) {
|
if (item.show) {
|
||||||
getListByDeptId(item)
|
getListByDeptId(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const showNew = (item) => {
|
||||||
|
getListByDeptId(item)
|
||||||
|
}
|
||||||
// 切换页数
|
// 切换页数
|
||||||
const pageChange = (val) => {
|
const pageChange = (val) => {
|
||||||
checkAll.value = false
|
checkAll.value = false
|
||||||
|
@ -642,13 +668,13 @@
|
||||||
}
|
}
|
||||||
// 判断是否全选
|
// 判断是否全选
|
||||||
const judgeAll = (item, val) => {
|
const judgeAll = (item, val) => {
|
||||||
// console.log(
|
console.log(
|
||||||
// '判断是否全选============>',
|
'判断是否全选============>',
|
||||||
// item,
|
item,
|
||||||
// val,
|
val,
|
||||||
// list.value,
|
list.value,
|
||||||
// checkedList.value
|
checkedList.value
|
||||||
// )
|
)
|
||||||
if (!val) {
|
if (!val) {
|
||||||
let all = true
|
let all = true
|
||||||
list.value.map((val) => {
|
list.value.map((val) => {
|
||||||
|
@ -734,7 +760,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const delOne = (item) => {
|
const delOne = (item, index) => {
|
||||||
// console.log(item)
|
// console.log(item)
|
||||||
sgcDel({
|
sgcDel({
|
||||||
ids: [item.id],
|
ids: [item.id],
|
||||||
|
@ -743,7 +769,8 @@
|
||||||
message.success('删除成功')
|
message.success('删除成功')
|
||||||
// console.log('删除申购车列表================>', res)
|
// console.log('删除申购车列表================>', res)
|
||||||
mybus.emit('getSgcNum')
|
mybus.emit('getSgcNum')
|
||||||
clean()
|
clean(index)
|
||||||
|
// val.show = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue