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

* 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs:
  端口修改
  BUG修改  应用资源新增 能力集市图标  和详情页切换
  bug修改
  bug修复
  BUG修改
  BUG修改

# Conflicts:
#	front/src/utils/request.js
#	front/src/vab/plugins/permissions.js
This commit is contained in:
yuhan_jiang 2022-07-16 16:22:28 +08:00
commit c156b52d84
22 changed files with 840 additions and 618 deletions

View File

@ -1,15 +1,15 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-11 16:30:04 * @Date: 2022-04-11 16:30:04
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-06 13:14:02 * @LastEditTime: 2022-07-16 15:07:44
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<!-- 流程图 --> <!-- 流程图 -->
<h4>{{ $t('process.flowImage') }}</h4> <!-- <h4>{{ $t('process.flowImage') }}</h4>
<img :src="getResourceURL()" class="image"> <img :src="getResourceURL()" class="image"> -->
<!-- 流转详情 --> <!-- 流转详情 -->
<h4>{{ $t('process.circulation') }}</h4> <h4>{{ $t('process.circulation') }}</h4>
<div class="mod-sys__dict"> <div class="mod-sys__dict">

View File

@ -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)
}) })
} }

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-27 19:34:30 * @Date: 2022-04-27 19:34:30
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-23 21:08:01 * @LastEditTime: 2022-07-16 11:40:26
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -40,6 +40,17 @@
align="center" align="center"
width="50" width="50"
></el-table-column> ></el-table-column>
<!-- <el-table-column label="申请标题" header-align="center" align="center">
<template slot-scope="scope">
<span>{{
(scope.row.params && scope.row.params.tAbilityApplicationDTOList && scope.row.params.tAbilityApplicationDTOList[0].title) ||
(scope.row.params && scope.row.params.comment) ||
(scope.row.params && scope.row.params.userName) ||
(scope.row.params && scope.row.params.undercarriageUserName)||
(scope.row.params && scope.row.params.name)
}}</span>
</template>
</el-table-column> -->
<el-table-column label="申请人" header-align="center" align="center"> <el-table-column label="申请人" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{

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-14 10:58:46 * @LastEditTime: 2022-07-16 16:01:48
* @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.238:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';

View File

@ -60,8 +60,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'] ===
@ -93,6 +92,7 @@ instance.interceptors.response.use(
console.log('接口返回REDIRECT', response.headers.redirect) console.log('接口返回REDIRECT', response.headers.redirect)
response['Access-Control-Expose-Headers'] = 'redirect' response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data const { code, message } = response.data
if (response.headers.token) { if (response.headers.token) {
setAccessToken(response.headers.token) setAccessToken(response.headers.token)
} }

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-11 16:39:36 * @LastEditTime: 2022-07-16 10:57:59
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
/** /**

View File

@ -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>

View File

@ -182,15 +182,15 @@
}) })
} }
let photoBg = ref([ let photoBg = ref([
require('../../../assets/abilityStatistics/zhishiku-bg.png'),
require('../../../assets/abilityStatistics/yingyongziyuan-bg.png'), require('../../../assets/abilityStatistics/yingyongziyuan-bg.png'),
require('../../../assets/abilityStatistics/zhishiku-bg.png'),
require('../../../assets/abilityStatistics/zujianfuwu-bg.png'), require('../../../assets/abilityStatistics/zujianfuwu-bg.png'),
require('../../../assets/abilityStatistics/shujuziyuan-bg.png'), require('../../../assets/abilityStatistics/shujuziyuan-bg.png'),
require('../../../assets/abilityStatistics/jichujianshe-bg.png'), require('../../../assets/abilityStatistics/jichujianshe-bg.png'),
]) ])
let photo = ref([ let photo = ref([
require('../../../assets/abilityStatistics/zhishiku.png'),
require('../../../assets/abilityStatistics/yingyongziyuan.png'), require('../../../assets/abilityStatistics/yingyongziyuan.png'),
require('../../../assets/abilityStatistics/zhishiku.png'),
require('../../../assets/abilityStatistics/zujianfuwu.png'), require('../../../assets/abilityStatistics/zujianfuwu.png'),
require('../../../assets/abilityStatistics/shujuziyuan.png'), require('../../../assets/abilityStatistics/shujuziyuan.png'),
require('../../../assets/abilityStatistics/jichujianshe.png'), require('../../../assets/abilityStatistics/jichujianshe.png'),
@ -202,19 +202,19 @@
// dataLists.value = res.data.data // dataLists.value = res.data.data
res.data.data.map((item) => { res.data.data.map((item) => {
switch (item.type) { switch (item.type) {
case '知识库':
dataLists.value[0] = item
break
case '应用资源': case '应用资源':
dataLists.value[1] = item dataLists.value[1] = item
break break
case '组件服务': case '业务组件':
dataLists.value[0] = item
break
case '图层服务':
dataLists.value[2] = item dataLists.value[2] = item
break break
case '数据资源': case '开发组件':
dataLists.value[3] = item dataLists.value[3] = item
break break
case '基础设施': case '智能算法':
dataLists.value[4] = item dataLists.value[4] = item
break break
default: default:

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:38:56 * @LastEditTime: 2022-07-16 14:27:31
* @Description: 算法上架 * @Description: 算法上架
--> -->
<template> <template>
@ -449,6 +449,21 @@
background: #999; background: #999;
} }
} }
.finish {
color: #0087ff;
.bg-box {
background: #9ccefa;
color: #fff;
border: 1px solid #9ccefa;
span {
background: #0087ff;
border: 1px solid #0087ff;
}
}
.line {
background: #0087ff;
}
}
.btn { .btn {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;

View File

@ -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-15 17:34:47 * @LastEditTime: 2022-07-16 15:05:16
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -111,7 +111,9 @@
></upload> ></upload>
</div> </div>
<div class="submit"> <div class="submit">
<a-button type="primary" @click="add(title.name)">添加</a-button> <a-button type="primary" @click="add(title.name)">
添加更多
</a-button>
</div> </div>
</div> </div>
</template> </template>
@ -598,22 +600,47 @@
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
queryApplicationRelByResourceId({ props.dataFrom.infoList.forEach((val) => {
referenceId: 0, if (val.attrType === '来源应用' && val.attrValue != '') {
}).then((res) => { queryApplicationRelByResourceId({
// console.log(res.data.data.notLinked) referenceId: 0,
res.data.data.notLinked.forEach((val, index) => { }).then((res) => {
// console.log(val, index) // console.log(res.data.data.notLinked)
mockData.value.push({ res.data.data.notLinked.forEach((val, index) => {
key: val.id, mockData.value.push({
title: val.name, key: val.id,
description: 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 == '') {
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,
})
})
})
}
}) })
} }
// //
@ -622,33 +649,57 @@
titleName.value = '关联组件' titleName.value = '关联组件'
mockData.value = [] mockData.value = []
visibleAssociatedApplication.value = true visibleAssociatedApplication.value = true
queryResourceRelByKeyId({ props.dataFrom.infoList.forEach((val) => {
keyId: 0, if (val.attrType === '关联组件信息' && val.attrValue != '') {
type: '组件服务', queryResourceRelByKeyId({
referenceName: '', keyId: 0,
}).then((res) => { type: '组件服务',
// console.log(res.data.data.notLinked) referenceName: '',
res.data.data.notLinked.forEach((val, index) => { }).then((res) => {
// console.log(val, index) // console.log(res.data.data.notLinked)
mockData.value.push({ res.data.data.notLinked.forEach((val, index) => {
key: val.id, mockData.value.push({
title: val.name, key: val.id,
description: 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({
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,
})
})
})
}
}) })
} }
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) => {
@ -724,253 +775,256 @@
</script> </script>
<style></style> <style></style>
<style lang="less" scoped> <style lang="less" scoped>
.put-on-the-shelf { .put-on-the-shelf {
height: 680px; height: 680px;
overflow: scroll; overflow: scroll;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 50px 100px 25px; padding: 50px 100px 25px;
.Technical-text { .Technical-text {
height: 30px; height: 30px;
width: 100px; width: 100px;
border: 1px solid #bbd3ef; border: 1px solid #bbd3ef;
border-radius: 6px; border-radius: 6px;
background: #edf4fc; background: #edf4fc;
color: #0087ff; color: #0087ff;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
line-height: 30px; line-height: 30px;
} }
.Technical-text:hover { .Technical-text:hover {
cursor: pointer; cursor: pointer;
}
& > div {
width: 100%;
margin-top: 60px;
.top {
color: #333333;
font-size: 22px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 25px;
div:first-child,
div:last-child {
width: 245px;
height: 1px;
background: #f0f0f0;
}
div:nth-child(2) {
margin: 0 30px;
}
} }
.bottom { & > div {
margin-top: 25px; width: 100%;
margin-top: 60px;
.items { .top {
background: #fafafa; color: #333333;
padding: 10px; font-size: 22px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 25px;
p { div:first-child,
div:last-child {
width: 245px;
height: 1px;
background: #f0f0f0;
}
div:nth-child(2) {
margin: 0 30px;
}
}
.bottom {
margin-top: 25px;
.items {
background: #fafafa;
padding: 10px;
p {
display: flex;
justify-content: space-between;
span:nth-of-type(1) {
width: 200px;
}
span:nth-of-type(2) {
width: 100%;
font-weight: 600;
}
}
p:nth-of-type(1) > span:nth-of-type(1) {
font-size: 18px;
font-weight: 600;
}
.del {
display: flex;
justify-content: flex-end;
align-items: center;
.delImg {
cursor: pointer;
display: inline-block;
width: 16px;
height: 18px;
background: url(~@/assets/home/sf_del.png) no-repeat;
margin-right: 5px;
}
div {
cursor: pointer;
}
}
}
.add {
margin-top: 10px;
font-size: 16px;
color: #007efb;
}
.form {
margin-top: 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: flex-start;
align-items: center;
span:nth-of-type(1) { span:first-child {
width: 120px;
}
:deep(.ant-input-textarea) {
width: 520px;
}
:deep(.ant-radio-group) {
width: 520px;
}
:deep(.ant-input-number) {
width: 200px; width: 200px;
} }
span:nth-of-type(2) { :deep(.ant-input) {
width: 100%; resize: none;
font-weight: 600; width: 520px;
}
.ant-btn {
width: 160px;
height: 32px;
text-align: center;
background: #edf4fc;
color: #0087ff;
border: 1px solid #bbd3ef;
border-radius: 6px;
} }
} }
p:nth-of-type(1) > span:nth-of-type(1) { .submit {
font-size: 18px; margin-top: 40px;
font-weight: 600;
}
.del {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center;
.delImg { .ant-btn {
cursor: pointer; width: 80px;
display: inline-block; height: 28px;
width: 16px; text-align: center;
height: 18px; background: #d9ebff;
background: url(~@/assets/home/sf_del.png) no-repeat; color: #0087ff;
margin-right: 5px; border: 1px solid #0087ff;
border-radius: 6px;
} }
div {
cursor: pointer;
}
}
}
.add {
margin-top: 10px;
font-size: 16px;
color: #007efb;
}
.form {
margin-top: 20px;
display: flex;
justify-content: flex-start;
align-items: center;
span:first-child {
width: 120px;
}
:deep(.ant-input-textarea) {
width: 520px;
}
:deep(.ant-radio-group) {
width: 520px;
}
:deep(.ant-input-number) {
width: 200px;
}
:deep(.ant-input) {
resize: none;
width: 520px;
}
.ant-btn {
width: 160px;
height: 32px;
text-align: center;
background: #edf4fc;
color: #0087ff;
border: 1px solid #bbd3ef;
border-radius: 6px;
}
}
.submit {
margin-top: 40px;
display: flex;
justify-content: flex-end;
.ant-btn {
width: 80px;
height: 28px;
text-align: center;
background: #d9ebff;
color: #0087ff;
border: 1px solid #0087ff;
border-radius: 6px;
} }
} }
} }
& > div:nth-of-type(1) {
margin-top: 0;
}
} }
& > div:nth-of-type(1) { .application-Area {
margin-top: 0; width: 520px;
display: grid;
margin-top: -5px;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
.application-Area-son {
cursor: pointer;
font-size: 14px;
width: 90px;
height: 26px;
border-radius: 13px;
color: #333333;
background: #f5f5f5;
border: 1px #cccccc solid;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
font-weight: 500;
}
.application-Area-down {
background: #0087ff;
color: #fff;
}
} }
}
.application-Area { :deep(.ant-image-img) {
width: 520px; width: 100%;
display: grid; height: 100%;
margin-top: -5px; object-fit: contain;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; }
.application-Area-son { :deep(.ant-modal) {
cursor: pointer; width: 960px;
font-size: 14px; }
width: 90px;
height: 26px; :deep(.ant-transfer-list) {
border-radius: 13px; width: 39.5%;
color: #333333; height: 520px;
background: #f5f5f5; }
border: 1px #cccccc solid;
:deep(.ant-transfer-operation) {
flex-direction: row-reverse;
margin: 0 30px;
}
:deep(.ant-btn) {
width: 56px;
height: 40px;
border-radius: 4px;
}
:deep(.ant-btn:first-child) {
margin-left: 4px;
}
:deep(.ant-modal-footer) {
border: 0;
}
:deep(.ant-modal-header) {
border: 0;
}
:deep(.ant-modal-title) {
line-height: 24px;
font-size: 18px;
color: #303133;
}
:deep(.ant-transfer-list-header) {
background: #f5f7fa;
}
:deep(.ant-transfer-list-header-selected) {
display: flex; display: flex;
justify-content: center; width: 90%;
flex-direction: row-reverse;
justify-content: space-between;
align-items: center; align-items: center;
margin-top: 10px;
font-weight: 500;
} }
.application-Area-down { :deep(.ant-transfer-list-header-title) {
background: #0087ff; font-size: 16px;
color: #fff; color: #303133;
font-weight: 400;
text-align: left;
}
:deep(.ant-transfer-list-header .ant-checkbox-wrapper) {
display: none !important;
} }
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
:deep(.ant-modal) {
width: 960px;
}
:deep(.ant-transfer-list) {
width: 39.5%;
height: 520px;
}
:deep(.ant-transfer-operation) {
flex-direction: row-reverse;
margin: 0 30px;
}
:deep(.ant-btn) {
width: 56px;
height: 40px;
border-radius: 4px;
}
:deep(.ant-btn:first-child) {
margin-left: 4px;
}
:deep(.ant-modal-footer) {
border: 0;
}
:deep(.ant-modal-header) {
border: 0;
}
:deep(.ant-modal-title) {
line-height: 24px;
font-size: 18px;
color: #303133;
}
:deep(.ant-transfer-list-header) {
background: #f5f7fa;
}
:deep(.ant-transfer-list-header-selected) {
display: flex;
width: 90%;
flex-direction: row-reverse;
justify-content: space-between;
align-items: center;
}
:deep(.ant-transfer-list-header-title) {
font-size: 16px;
color: #303133;
font-weight: 400;
text-align: left;
}
</style> </style>

View File

@ -126,10 +126,12 @@
'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 (navList.value.filter((item) => item.name === list.value[0])[0]) { if (list.value.length > 0) {
select.value = navList.value.filter( if (navList.value.filter((item) => item.name === list.value[0])[0]) {
(item) => (item.name === '关联应用') | (item.name === list.value[0]) select.value = navList.value.filter(
)[0].key (item) => (item.name === '关联应用') | (item.name === list.value[0])
)[0].key
}
} }
console.log('11111111111111111111111111', list.value, navList.value) console.log('11111111111111111111111111', list.value, navList.value)
} }

View File

@ -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)
} }
} }
) )

View File

@ -2,16 +2,37 @@
* @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.liangjunhua
* @LastEditTime: 2022-06-14 11:30:52 * @LastEditTime: 2022-07-16 15:59:09
* @Description: 应用展示 视频播放 * @Description: 应用展示 视频播放
--> -->
<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 class="main" :style="`${img}background-position:center;background-size:cover;`"> <div class="box">
<div class="play" @click="showModal"></div> <div class="left" @click="chagneShow()"></div>
<div
class="main"
: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" :src="showArr[showFlag].attrValue" />
</div>
<div class="right" @click="chagneShow()"></div>
</div> </div>
<a-modal v-model:visible="visible" title="视频预览" :width="750" destroyOnClose> <a-modal
v-model:visible="visible"
title="视频预览"
:width="750"
destroyOnClose
>
<template #footer></template> <template #footer></template>
<div style="width: 100%; display: flex; justify-content: center"> <div style="width: 100%; display: flex; justify-content: center">
<div style="width: 100%; height: 100%"> <div style="width: 100%; height: 100%">
@ -22,106 +43,134 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, reactive, defineProps, watch } from 'vue' import { ref, reactive, defineProps, watch } from 'vue'
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle.vue' import DetalsTitle from '@/views/detailsAll/components/DetalsTitle.vue'
const visible = ref(false) const visible = ref(false)
const options = reactive({ const options = reactive({
width: '7.00rem', // width: '7.00rem', //
height: '4.00rem', // height: '4.00rem', //
color: '#409eff', // color: '#409eff', //
title: '', // title: '', //
src: '', // src: '', //
muted: false, // muted: false, //
webFullScreen: false, webFullScreen: false,
speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], // speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //
autoPlay: true, // autoPlay: true, //
loop: false, // loop: false, //
mirror: false, // mirror: false, //
ligthOff: false, // ligthOff: false, //
volume: 0.3, // volume: 0.3, //
control: true, // control: true, //
controlBtns: [ controlBtns: [
'audioTrack', 'audioTrack',
'quality', 'quality',
'speedRate', 'speedRate',
'volume', 'volume',
'setting', 'setting',
'pip', 'pip',
'pageFullScreen', 'pageFullScreen',
'fullScreen', 'fullScreen',
], //, ], //,
}) })
const showModal = () => { const showFlag = ref(0)
visible.value = true const showArr = ref([])
} const chagneShow = () => {
const props = defineProps({ if (showArr.value.length > 1) {
dataList: { type: Object, default: null }, showFlag.value = showFlag.value == 0 ? 1 : 0
})
const flag = ref(true)
const img = ref({})
console.log('111111111111111111111,', props.dataList)
if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '应用展示视频'
)[0]
console.log('视频==============>', obj)
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;'
} }
} }
} const showModal = () => {
watch( visible.value = true
() => props.dataList, }
(val) => { const props = defineProps({
if (val) { dataList: { type: Object, default: null },
let obj = val.infoList.filter( })
(item) => item.attrType === '应用展示视频' const flag = ref(true)
)[0] const img = ref({})
console.log('视频==============>', obj) console.log('111111111111111111111,', props.dataList)
if (!obj) { if (props.dataList.infoList) {
flag.value = false showArr.value = props.dataList.infoList.filter(
} else { (item) => item.attrType === '应用展示视频' || item.attrType === '应用图片'
let imgindex = props.dataList.infoList.filter( )
(item) => item.attrType === '应用图片' console.log('视频==============>', showArr.value)
)[0] if (showArr.value.length == 0) {
options.src = obj.attrValue flag.value = false
if (imgindex) { }
img.value = }
'background:' + 'url(' + imgindex.attrValue + ') no-repeat;' watch(
() => props.dataList,
(val) => {
if (val) {
showArr.value = props.dataList.infoList.filter(
(item) =>
item.attrType === '应用展示视频' || item.attrType === '应用图片'
)
console.log('视频==============>', showArr.value)
if (showArr.value.length == 0) {
flag.value = false
} }
} }
} }
} )
)
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.application-presentation { .application-presentation {
padding: 0.8rem 3rem 0; padding: 0.8rem 3rem 0;
.main { .main {
height: 3.4rem; width: 13.14rem;
border-radius: 0.1rem; height: 3.4rem;
background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat; border-radius: 0.1rem;
background-size: 100%; background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat;
margin-top: 0.4rem;
display: flex;
justify-content: center;
align-items: center;
.play {
width: 0.96rem;
height: 0.96rem;
background: url('~@/assets/detailsAll/sf_video_play.png') no-repeat;
background-size: 100%; background-size: 100%;
cursor: pointer; margin-top: 0.4rem;
display: flex;
justify-content: center;
align-items: center;
.play {
width: 0.96rem;
height: 0.96rem;
background: url('~@/assets/detailsAll/sf_video_play.png') no-repeat;
background-size: 100%;
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;
} }
} }
}
</style> </style>

View File

@ -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>
@ -16,217 +21,216 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, defineProps, watch, getCurrentInstance } from 'vue' import { ref, defineProps, watch, getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { queryPartAppByKeyId2 } from '@/api/home' import { queryPartAppByKeyId2 } from '@/api/home'
// //
const router = useRouter() const router = useRouter()
const keyId = router.currentRoute.value.query.id const keyId = router.currentRoute.value.query.id
const navList = ref([ const navList = ref([
{ {
name: '组件展示', name: '组件展示',
key: 'business-presentation', key: 'business-presentation',
}, },
{ {
name: '功能介绍', name: '功能介绍',
key: 'function-introduction', key: 'function-introduction',
}, },
{ {
name: '应用场景', name: '应用场景',
key: 'application-scenarios', key: 'application-scenarios',
}, },
{ {
name: '应用案例', name: '应用案例',
key: 'application-case', key: 'application-case',
}, },
{ {
name: '使用方式', name: '使用方式',
key: 'business-usage-mode', key: 'business-usage-mode',
}, },
{ {
name: '常见问题', name: '常见问题',
key: 'common-problem', key: 'common-problem',
}, },
]) ])
const props = defineProps({ const props = defineProps({
associatedComponents: { type: Array, default: null }, associatedComponents: { type: Array, default: null },
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
})
const select = ref('business-associated-ability')
const list = ref([])
// id
if (keyId) {
queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length > 0) {
//
navList.value.unshift({
name: '关联应用',
key: 'business-associated-ability',
show: true,
})
// list.value.push('')
console.log('navList', navList)
}
}) })
} const select = ref('business-associated-ability')
const selectNav = (key) => { const list = ref([])
select.value = key // id
console.log(key, select.value) if (keyId) {
mybus.emit('flyToView', select.value) queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
} console.log('ressssssss', res)
if (props.dataList.infoList) { if (res.data.data.length > 0) {
list.value = [] //
let arr = [ navList.value.unshift({
'关联应用', name: '关联应用',
'组件视频介绍', key: 'business-associated-ability',
'功能介绍', show: true,
'应用场景', })
'应用案例', // list.value.push('')
'使用方式', console.log('navList', navList)
'常见问题',
]
//
// eslint-disable-next-line vue/no-mutating-props
props.dataList.infoList.sort((a, b) => {
return arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
})
props.dataList.infoList.map((item) => {
if (
item.attrType === '常见问题' ||
item.attrType === '功能介绍' ||
item.attrType === '应用场景' ||
item.attrType === '应用案例'
) {
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
}
})
list.value.unshift('关联应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
} }
} })
})
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
)[0].key
}
} }
console.log('11111111111111111111111111', list.value, navList.value) const selectNav = (key) => {
} select.value = key
watch( mybus.emit('flyToView', select.value)
() => props.selectNow,
(newValue) => {
select.value = newValue
} }
) if (props.dataList.infoList) {
watch( list.value = []
() => props.dataList, let arr = [
(val) => { '关联应用',
if (val) { '组件视频介绍',
list.value = [] '功能介绍',
let arr = [ '应用场景',
'关联应用', '应用案例',
'组件视频介绍', '使用方式',
'功能介绍', '常见问题',
'应用场景', ]
'应用案例', //
'使用方式', // eslint-disable-next-line vue/no-mutating-props
'常见问题', props.dataList.infoList.sort((a, b) => {
] return arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
// })
// eslint-disable-next-line vue/no-mutating-props props.dataList.infoList.map((item) => {
props.dataList.infoList.sort((a, b) => { if (
// console.log('==============>', a, b) item.attrType === '常见问题' ||
return arr.indexOf(a.attrType) - arr.indexOf(b.attrType) item.attrType === '功能介绍' ||
}) item.attrType === '应用场景' ||
val.infoList.map((item) => { item.attrType === '应用案例'
if ( ) {
item.attrType === '常见问题' || list.value.push(item.attrType)
item.attrType === '功能介绍' || } else if (item.attrType === '组件视频介绍') {
item.attrType === '应用场景' || list.value.push('组件展示')
item.attrType === '应用案例' }
) { })
list.value.push(item.attrType) list.value.unshift('关联应用')
} else if (item.attrType === '组件视频介绍') { list.value.push('使用方式')
list.value.push('组件展示') navList.value.forEach((item) => {
} console.log(item)
}) if (list.value.indexOf(item.name) > -1) {
list.value.unshift('关联应用') if (item.name == '关联应用') {
list.value.push('使用方式') if (props.associatedComponents[0].dataList.length != 0) {
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true item.show = true
} }
} } else {
}) item.show = true
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) =>
(item.name === '关联应用') | (item.name === list.value[0])
)[0].key
} }
} }
console.log('11111111111111111111111111', list.value, navList.value) })
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
)[0].key
}
} }
console.log('11111111111111111111111111', list.value, navList.value)
} }
) watch(
() => props.selectNow,
(newValue) => {
select.value = newValue
}
)
watch(
() => props.dataList,
(val) => {
if (val) {
list.value = []
let arr = [
'关联应用',
'组件视频介绍',
'功能介绍',
'应用场景',
'应用案例',
'使用方式',
'常见问题',
]
//
// eslint-disable-next-line vue/no-mutating-props
props.dataList.infoList.sort((a, b) => {
// console.log('==============>', a, b)
return arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
})
val.infoList.map((item) => {
if (
item.attrType === '常见问题' ||
item.attrType === '功能介绍' ||
item.attrType === '应用场景' ||
item.attrType === '应用案例'
) {
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
}
})
list.value.unshift('关联应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
}
}
})
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) =>
(item.name === '关联应用') | (item.name === list.value[0])
)[0].key
}
}
console.log('11111111111111111111111111', list.value, navList.value)
}
}
)
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.business-navigation { .business-navigation {
width: 19.12rem; width: 19.12rem;
height: 0.84rem; height: 0.84rem;
line-height: 0.8rem; line-height: 0.8rem;
display: flex;
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;
.nav {
cursor: pointer;
display: flex; display: flex;
flex-direction: column; justify-content: space-around;
justify-content: space-between; font-size: 0.24rem;
align-items: center; color: #666;
background: #fff;
padding: 0 3rem;
box-shadow: 0rem 0.05rem 0.1rem #f2f3fb;
position: relative;
.line { .nav {
width: 0.4rem; cursor: pointer;
height: 0.04rem; display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.line {
width: 0.4rem;
height: 0.04rem;
}
}
.select {
color: #526aff;
.line {
background: #526aff;
}
} }
} }
.select {
color: #526aff;
.line {
background: #526aff;
}
}
}
</style> </style>

View File

@ -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]
) { ) {

View File

@ -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 @@
// } // }
} }
}) })
select.value = navList.value.filter( if (navList.value.filter((item) => item.name === list.value[0])[0]) {
(item) => item.name === list.value[0] select.value = navList.value.filter(
)[0].key (item) => (item.name === '关联应用') | (item.name === list.value[0])
// (item) => item.name === list.value[0]
)[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)

View File

@ -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 {

View File

@ -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
} }
}) })
select.value = navList.value.filter( if (navList.value.filter((item) => item.name === list.value[0])[0]) {
(item) => item.name === list.value[0] select.value = navList.value.filter(
)[0].key (item) => (item.name === '关联应用') | (item.name === list.value[0])
// (item) => item.name === list.value[0]
)[0].key
}
console.log('11111111111111111111111111', list.value, navList.value) console.log('11111111111111111111111111', list.value, navList.value)
} }
watch( watch(

View File

@ -290,7 +290,7 @@
? 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(
list.value[0].checkedList.length > 0 list.value[0].checkedList.length > 1
? '等能力申请' + num.value + '个' ? '等能力申请' + num.value + '个'
: '能力申请' : '能力申请'
) )

View File

@ -50,6 +50,24 @@
:key="item.index" :key="item.index"
> >
<div class="item" :key="showKey"> <div class="item" :key="showKey">
<div
class="left"
style="display: flex; align-items: center"
v-if="
item.type === '应用资源' &&
item.infoList &&
item.infoList.filter((val) => val.attrType == '应用图片')[0]
"
>
<a-image
:width="106"
:preview="false"
:src="
item.infoList.filter((val) => val.attrType == '应用图片')[0]
.attrValue
"
/>
</div>
<div <div
class="left" class="left"
:class=" :class="
@ -78,7 +96,7 @@
? 'ywzj' ? 'ywzj'
: '' : ''
" "
v-if=" v-else-if="
selectCardsname !== '基础设施' && selectCardsname !== '融合服务' selectCardsname !== '基础设施' && selectCardsname !== '融合服务'
" "
></div> ></div>

View File

@ -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)
}, },
}, },

View File

@ -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
} }
}) })
} }