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-14 15:49:52 +08:00
commit d9ed994429
17 changed files with 290 additions and 195 deletions

View File

@ -322,7 +322,7 @@ export default {
}
</script>
<style scoped lang="scss">
.blue-font-color:hover {
.blue-font-color {
color: #0058e1;
cursor: pointer;
}

View File

@ -232,7 +232,7 @@ export default {
startDate: '',
endDate: '',
operation: '',
operationType: 'all'
operationType: ''
}
this.value1 = '' //
this.operationType = '' //
@ -281,7 +281,7 @@ export default {
}
</script>
<style scoped lang="scss">
.blue-font-color:hover {
.blue-font-color {
color: #0058e1;
cursor: pointer;
}

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-13 18:05:38
* @LastEditTime: 2022-07-14 10:01:08
* @Description: 数据资源参数配置
*/
const newLocation = 'qingdao'
@ -32,12 +32,12 @@ if (newLocation === 'qingdao') {
{ name: '能力统计', key: 'abilityStatistics' },
// { name: '', key: 'developmentGuide' },
{ name: '指导手册', key: 'instructionManual' },
{ name: '需求中心', key: 'demandCenter' },
// { name: '', key: 'demandCenter' },
// { name: '', key: 'personalCenter' },
{ name: '区市站点', key: 'mapTest' },
// { name: '', key: 'houtaiguanli' },
{ name: '赋能案例', key: 'assignCase' },
// { name: '', key: 'integrationServices' },
{ name: '融合服务', key: 'integrationServices' },
]
footerDataList.footerList = {
company: {

View File

@ -120,7 +120,7 @@
return false
}
// debugger
commit('setUsername', data.data.username)
commit('setUsername', data.data.realName)
commit('setRole', data.data.roleIdList.length)
commit('setUserId', data.data.id)
// TODO

View File

@ -162,6 +162,13 @@
@click="showTextFunction()"
>
编辑富文本
<div
v-show="showText"
class="fuwenbenbianjiqi"
style="position: absolute; z-index: 10000"
>
<VueTemplateDemo :dataFrom="props.dataFrom"></VueTemplateDemo>
</div>
</div>
<upload
v-else-if="item.type == 'video'"
@ -240,13 +247,6 @@
</div>
</template>
</div>
<div
v-show="showText"
class="fuwenbenbianjiqi"
style="width: 100px; height: 100px; z-index: 10000"
>
<VueTemplateDemo></VueTemplateDemo>
</div>
</div>
</template>
<script setup>
@ -260,7 +260,7 @@
queryResourceRelByKeyId,
filesUpload,
} from '@/api/personalCenter'
import VueTemplateDemo from '@/views/capacityOnTheShelf/FilesUpload.vue'
import VueTemplateDemo from '@/views/personalCenter/VueTemplateDemo.vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const abilityToType = router.currentRoute.value.query.abilityToType
@ -417,6 +417,7 @@
}
mybus.on('showTextFunctionEmit', (show) => {
console.log('ssdcsd')
debugger
showText.value = show
})
mybus.off('func')

View File

@ -35,7 +35,7 @@
</div>
<template v-for="itemSonTitle in dataFrom.attrValue" :key="itemSonTitle">
<div class="content" v-if="tabindex == itemSonTitle.name">
<div class="content-right">
<div class="content-left">
<div class="content-left-scene" v-if="!itemSonTitle.img"></div>
<a-image
:width="635"
@ -121,13 +121,13 @@
log(index, title)
if (index == 0) {
if (title == '应用场景') {
return 'content-right'
return 'content-left'
} else {
return 'content-left'
}
} else {
if (title == '应用场景') {
return 'content-left'
return 'content-right'
} else {
return 'content-right'
}

View File

@ -187,11 +187,7 @@
)[0]
// console.log('dataFrom.value.link', obj.attrValue)
if (obj) {
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(obj.attrValue))
)
window.open(window.SITE_CONFIG.frontUrl + obj.attrValue)
} else {
message.config({
top: '100px', //

View File

@ -1,10 +1,10 @@
<!-- 应用场景-->
<template>
<div class="function-intorduction" v-if="flag">
<div class="application-scenarios-and-case" v-if="flag">
<div class="application-scenarios-and-case-son">
<!-- {{ dataFrom.attrType }} -->
<div class="title">
<DetalsTitle :title="dataFrom.attrType" type="SCENE"></DetalsTitle>
<DetalsTitle :title="dataFrom.attrType" :type="SCENE"></DetalsTitle>
</div>
<div class="tab">
<div
@ -44,9 +44,9 @@
v-if="itemSonTitle.img"
></a-image>
</div>
<div class="content-right">
<div class="content-right-scene">
<!-- <div class="content-top">{{ itemSonTitle.name }}</div>-->
<div :class="contentLocation(1, dataFrom.attrType)">
<div class="content-right-scene" :class="'content-right-case'">
<div class="content-top">{{ itemSonTitle.name }}</div>
<a-tooltip>
<template #title>{{ itemSonTitle.desc }}</template>
<div class="content-bottom">{{ itemSonTitle.desc }}</div>
@ -97,11 +97,15 @@
}
}
)
const { log } = console
//
function tabIndexClass(index, title, content) {
if (title == '应用场景' && index == 0 && content.length > 6) {
return 'tab-son-class'
}
if (title == '应用案例' && index == 0 && content.length > 6) {
return 'tab-son-class-two'
}
}
//tab
function tabInitialize() {
@ -112,10 +116,27 @@
tabindex.value = name
return tabindex.value
}
//
function contentLocation(index, title) {
log(index, title)
if (index == 0) {
if (title == '应用场景') {
return 'content-left'
} else {
return 'content-left'
}
} else {
if (title == '应用场景') {
return 'content-right'
} else {
return 'content-right'
}
}
}
</script>
<style lang="less" scoped>
.function-intorduction {
.application-scenarios-and-case {
width: 100%;
background: #f7f8fa;
display: flex;
@ -123,63 +144,62 @@
align-items: center;
overflow-x: unset;
.application-scenarios-and-case-son {
padding-top: 0.8rem;
padding-bottom: 0.8rem;
padding-top: 80px;
padding-bottom: 80px;
display: flex;
flex-direction: column;
align-items: center;
overflow: unset;
.tab {
max-width: 13rem;
max-width: 1300px;
overflow-x: auto;
display: flex;
justify-content: center;
color: #808080;
border-bottom: 0.01rem #e4e6f5 solid;
margin-top: 0.45rem;
margin-bottom: 0.4rem;
border-bottom: 1px #e4e6f5 solid;
margin-top: 45px;
margin-bottom: 40px;
cursor: pointer;
padding-left: 0.4rem;
padding-right: 0.4rem;
padding-left: 40px;
padding-right: 40px;
.tab-son {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
margin-right: 1rem;
margin-right: 100px;
.tab-top {
min-width: 1.2rem;
font-size: 0.24rem;
line-height: 0.24rem;
margin-bottom: 0.2rem;
max-width: 2rem;
height: 0.24rem;
min-width: 120px;
font-size: 24px;
line-height: 24px;
margin-bottom: 20px;
max-width: 200px;
height: 24px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.tab-top-down {
min-width: 1.2rem;
min-width: 120px;
color: #526aff;
margin-bottom: 0.16rem;
margin-bottom: 16px;
}
.tab-bottom {
height: 0.04rem;
width: 0.6rem;
height: 4px;
width: 60px;
background: #526aff;
}
}
.tab-son-class {
margin-left: 4.3rem;
margin-bottom: 0.02rem;
margin-left: 430px;
margin-bottom: 2px;
}
.tab-son-class-two {
margin-left: 2.3rem;
margin-bottom: 0.02rem;
margin-left: 230px;
margin-bottom: 2px;
}
.tab-son:last-child {
margin-right: 0rem;
margin-right: 0px;
}
}
.tab::-webkit-scrollbar-thumb {
@ -189,57 +209,57 @@
display: flex;
position: relative;
width: 100%;
min-width: 13rem;
height: 3.4rem;
min-width: 1300px;
height: 340px;
.content-left {
position: absolute;
left: 0;
min-width: 6.2rem;
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
min-width: 620px;
// text-align: center;
.content-top {
text-align: left;
}
}
.content-right {
width: 6.2rem;
height: 3.4rem;
width: 620px;
height: 340px;
position: absolute;
right: 0;
display: flex;
justify-content: center;
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
}
.content-right-scene,
.content-right-case {
width: 6.2rem;
height: 3.4rem;
width: 620px;
height: 340px;
display: flex;
flex-direction: column;
justify-content: center;
}
.content-left-scene,
.content-left-case {
height: 3.4rem;
width: 6.35rem;
border-radius: 0.1rem;
height: 340px;
width: 635px;
border-radius: 10px;
background: url('~@/assets/detailsAll/sf_tupianceshi.png') no-repeat;
background-position: center;
background-size: 6.35rem 3.4rem;
background-size: 635px 340px;
}
.content-top {
font-size: 0.22rem;
line-height: 0.22rem;
font-size: 22px;
line-height: 22px;
color: #000000;
margin-bottom: 0.35rem;
margin-bottom: 35px;
}
.content-bottom {
font-size: 0.18rem;
font-size: 18px;
color: #999999;
line-height: 0.26rem;
line-height: 26px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 6;
@ -248,7 +268,7 @@
}
}
.application-scenarios-and-case-son:first-child {
padding-top: 1rem;
padding-top: 100px;
}
}
</style>

View File

@ -232,34 +232,26 @@
}
.bottom {
margin-top: 0.4rem;
margin-top: 40px;
display: flex;
.ant-btn {
height: 0.5rem;
margin-right: 0.2rem;
background: #ffffff;
border-radius: 0.06rem;
font-size: 0.2rem;
height: 50px;
margin-right: 20px;
background: #ff8b55;
border-radius: 6px;
font-size: 20px;
display: flex;
justify-content: center;
align-items: center;
}
.ant-btn-primary {
color: #1890ff;
}
.ant-btn:nth-of-type(1) {
width: 1.8rem;
width: 180px;
}
.ant-btn:nth-of-type(2) {
width: 2.2rem;
width: 220px;
}
.ant-btn:nth-of-type(3) {
width: 1.45rem;
width: 145px;
background: #fff;
color: #526aff;
}

View File

@ -207,11 +207,7 @@
(item) => item.attrType === '技术文档'
)[0]
if (obj) {
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(obj.attrValue))
)
window.open(window.SITE_CONFIG.frontUrl + obj.attrValue)
} else {
message.config({
top: '100px', //

View File

@ -35,7 +35,7 @@
</div>
<template v-for="itemSonTitle in dataFrom.attrValue" :key="itemSonTitle">
<div class="content" v-if="tabindex == itemSonTitle.name">
<div class="content-right">
<div class="content-left">
<div class="content-left-scene" v-if="!itemSonTitle.img"></div>
<a-image
:width="635"
@ -121,13 +121,13 @@
log(index, title)
if (index == 0) {
if (title == '应用场景') {
return 'content-right'
return 'content-left'
} else {
return 'content-left'
}
} else {
if (title == '应用场景') {
return 'content-left'
return 'content-right'
} else {
return 'content-right'
}

View File

@ -138,10 +138,9 @@
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '技术文档'
)[0]
debugger
console.log('dataFrom.value.link', obj.attrValue)
window.open(
window.SITE_CONFIG.previewUrl +
window.SITE_CONFIG.frontUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(obj.attrValue))
)
@ -150,7 +149,6 @@
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '使用手册'
)[0]
debugger
console.log('dataFrom.value.link', obj.attrValue)
window.open(
window.SITE_CONFIG.previewUrl +

View File

@ -1,10 +1,10 @@
<!-- 应用场景-->
<template>
<div class="function-intorduction" v-if="flag">
<div class="application-scenarios-and-case" v-if="flag">
<div class="application-scenarios-and-case-son">
<!-- {{ dataFrom.attrType }} -->
<div class="title">
<DetalsTitle :title="dataFrom.attrType" type="SCENE"></DetalsTitle>
<DetalsTitle :title="dataFrom.attrType" :type="SCENE"></DetalsTitle>
</div>
<div class="tab">
<div
@ -44,9 +44,9 @@
v-if="itemSonTitle.img"
></a-image>
</div>
<div class="content-right">
<div class="content-right-scene">
<!-- <div class="content-top">{{ itemSonTitle.name }}</div>-->
<div :class="contentLocation(1, dataFrom.attrType)">
<div class="content-right-scene" :class="'content-right-case'">
<div class="content-top">{{ itemSonTitle.name }}</div>
<a-tooltip>
<template #title>{{ itemSonTitle.desc }}</template>
<div class="content-bottom">{{ itemSonTitle.desc }}</div>
@ -97,11 +97,15 @@
}
}
)
const { log } = console
//
function tabIndexClass(index, title, content) {
if (title == '应用场景' && index == 0 && content.length > 6) {
return 'tab-son-class'
}
if (title == '应用案例' && index == 0 && content.length > 6) {
return 'tab-son-class-two'
}
}
//tab
function tabInitialize() {
@ -112,10 +116,27 @@
tabindex.value = name
return tabindex.value
}
//
function contentLocation(index, title) {
log(index, title)
if (index == 0) {
if (title == '应用场景') {
return 'content-left'
} else {
return 'content-left'
}
} else {
if (title == '应用场景') {
return 'content-right'
} else {
return 'content-right'
}
}
}
</script>
<style lang="less" scoped>
.function-intorduction {
.application-scenarios-and-case {
width: 100%;
background: #f7f8fa;
display: flex;
@ -123,63 +144,62 @@
align-items: center;
overflow-x: unset;
.application-scenarios-and-case-son {
padding-top: 0.8rem;
padding-bottom: 0.8rem;
padding-top: 80px;
padding-bottom: 80px;
display: flex;
flex-direction: column;
align-items: center;
overflow: unset;
.tab {
max-width: 13rem;
max-width: 1300px;
overflow-x: auto;
display: flex;
justify-content: center;
color: #808080;
border-bottom: 0.01rem #e4e6f5 solid;
margin-top: 0.45rem;
margin-bottom: 0.4rem;
border-bottom: 1px #e4e6f5 solid;
margin-top: 45px;
margin-bottom: 40px;
cursor: pointer;
padding-left: 0.4rem;
padding-right: 0.4rem;
padding-left: 40px;
padding-right: 40px;
.tab-son {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
margin-right: 1rem;
margin-right: 100px;
.tab-top {
min-width: 1.2rem;
font-size: 0.24rem;
line-height: 0.24rem;
margin-bottom: 0.2rem;
max-width: 2rem;
height: 0.24rem;
min-width: 120px;
font-size: 24px;
line-height: 24px;
margin-bottom: 20px;
max-width: 200px;
height: 24px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.tab-top-down {
min-width: 1.2rem;
min-width: 120px;
color: #526aff;
margin-bottom: 0.16rem;
margin-bottom: 16px;
}
.tab-bottom {
height: 0.04rem;
width: 0.6rem;
height: 4px;
width: 60px;
background: #526aff;
}
}
.tab-son-class {
margin-left: 4.3rem;
margin-bottom: 0.02rem;
margin-left: 430px;
margin-bottom: 2px;
}
.tab-son-class-two {
margin-left: 2.3rem;
margin-bottom: 0.02rem;
margin-left: 230px;
margin-bottom: 2px;
}
.tab-son:last-child {
margin-right: 0rem;
margin-right: 0px;
}
}
.tab::-webkit-scrollbar-thumb {
@ -189,57 +209,57 @@
display: flex;
position: relative;
width: 100%;
min-width: 13rem;
height: 3.4rem;
min-width: 1300px;
height: 340px;
.content-left {
position: absolute;
left: 0;
min-width: 6.2rem;
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
min-width: 620px;
// text-align: center;
.content-top {
text-align: left;
}
}
.content-right {
width: 6.2rem;
height: 3.4rem;
width: 620px;
height: 340px;
position: absolute;
right: 0;
display: flex;
justify-content: center;
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
}
.content-right-scene,
.content-right-case {
width: 6.2rem;
height: 3.4rem;
width: 620px;
height: 340px;
display: flex;
flex-direction: column;
justify-content: center;
}
.content-left-scene,
.content-left-case {
height: 3.4rem;
width: 6.35rem;
border-radius: 0.1rem;
height: 340px;
width: 635px;
border-radius: 10px;
background: url('~@/assets/detailsAll/sf_tupianceshi.png') no-repeat;
background-position: center;
background-size: 6.35rem 3.4rem;
background-size: 635px 340px;
}
.content-top {
font-size: 0.22rem;
line-height: 0.22rem;
font-size: 22px;
line-height: 22px;
color: #000000;
margin-bottom: 0.35rem;
margin-bottom: 35px;
}
.content-bottom {
font-size: 0.18rem;
font-size: 18px;
color: #999999;
line-height: 0.26rem;
line-height: 26px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 6;
@ -248,7 +268,7 @@
}
}
.application-scenarios-and-case-son:first-child {
padding-top: 1rem;
padding-top: 100px;
}
}
</style>

View File

@ -9,12 +9,15 @@
<div class="application-presentation" v-if="flag">
<detals-title title="图层预览" type="PREVIEW"></detals-title>
<div class="main">
<iframe
<!-- <iframe
:src="img"
width="100%"
height="100%"
border-radius="0.1rem"
></iframe>
></iframe> -->
<div class="iframe-box">
<iframe :src="img" width="100%" height="440"></iframe>
</div>
</div>
</div>
</template>
@ -37,7 +40,7 @@
} else {
props.dataList.infoList.map((item) => {
if (item.attrType === '预览服务地址') {
img.value = imgindex.attrValue || '--'
img.value = item.attrValue.replace(/amp;/g, '') || '--'
}
})
}
@ -54,7 +57,7 @@
} else {
val.infoList.map((item) => {
if (item.attrType === '预览服务地址') {
img.value = imgindex.attrValue || '--'
img.value = item.attrValue.replace(/amp;/g, '') || '--'
}
})
}
@ -64,14 +67,23 @@
</script>
<style lang="less" scoped>
.application-presentation {
padding: 0.8rem 3rem 0;
padding: 0.8rem 3rem 0.6rem;
.main {
height: 5rem;
border-radius: 0.1rem;
// border-radius: 0.1rem;
margin-top: 0.4rem;
display: flex;
justify-content: center;
align-items: center;
// display: flex;
// justify-content: center;
// align-items: center;
iframe {
border: none;
}
.iframe-box {
width: 100%;
height: 440px;
margin-top: 10px;
display: flex;
justify-content: center;
}
}
}
</style>

View File

@ -215,11 +215,7 @@
(item) => item.attrType === '技术文档'
)[0]
if (obj) {
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(obj.attrValue))
)
window.open(window.SITE_CONFIG.frontUrl + obj.attrValue)
} else {
message.config({
top: '100px', //

View File

@ -113,7 +113,7 @@
import { ref, onMounted, onBeforeUnmount, defineProps } from 'vue'
import { recordRoute } from '@/config'
import { useRoute, useRouter } from 'vue-router'
import { getUser, mynotice } from '@/api/home'
import { mynotice } from '@/api/home'
import { useStore } from 'vuex'
import { getSgcTotal } from '@/api/home'
import mybus from '@/myplugins/mybus'
@ -132,22 +132,25 @@
// // { name: '', key: 'houtaiguanli' },
// { name: '', key: 'assignCase' },
// ])
const user = ref({})
const user = ref({
username: store.getters['user/username'],
})
// user.username.value = store.getters(['user/username'])
const select = ref(router.currentRoute.value.name)
const mynoticeFlag = ref(false)
const mynoticeData = ref([])
console.log('navListManagement------------>', navListManagement);
console.log('navListManagement------------>', navListManagement)
// eslint-disable-next-line no-undef
const navList = ref(navListManagement.navList)
const props = defineProps({
showView: { type: String, default: '' },
})
//
getUser().then((res) => {
user.value = res.data.data
// console.log('user===============>', user.value)
})
// //
// getUser().then((res) => {
// user.value = res.data.data
// // console.log('user===============>', user.value)
// })
// 退
const logout = async () => {
await store.dispatch('user/logout')
@ -221,9 +224,9 @@
router.push({
path: '/integrationServices',
// path: '/DetailsPageconetent',
query: {
select: '融合服务',
},
query: {
select: '融合服务',
},
})
break
default:
@ -323,7 +326,7 @@
display: flex;
justify-content: center;
align-items: center;
padding: 0 1rem;
// padding: 0 1rem;
background-color: rgba(0, 0, 25, 0.7);
position: fixed;
z-index: 1000;
@ -362,7 +365,7 @@
color: #fff !important;
}
.info {
width: 2rem;
// width: 2rem;
margin-left: 0.2rem;
display: flex;
justify-content: center;
@ -381,7 +384,11 @@
font-size: 0.16rem;
}
.name {
max-width: 0.75rem;
max-width: 3.3rem;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
.out {

View File

@ -16,6 +16,7 @@
<script>
import { defineComponent } from 'vue'
import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
import { useRouter } from 'vue-router'
import { getDevelopmentFile, updateDevelopmentFile } from '@/api/file'
@ -27,34 +28,88 @@
export default defineComponent({
name: 'VueTemplateDemo',
components: { Editor },
props: {
dataFrom: {
type: Object,
},
},
data() {
return {
text: '',
route: useRouter(),
iconfontJs: fontJs,
uuidOne: '',
uuidTwo: '',
uuidSnum: '',
}
},
created() {
this.uuidSplice()
this.getDevelopmentFile()
},
methods: {
uuid(len, radix) {
var chars =
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
var uuid = [],
i
radix = radix || chars.length
if (len) {
// Compact form
for (i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)]
} else {
// rfc4122, version 4 form
var r
// rfc4122 requires these characters
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'
uuid[14] = '4'
// Fill in random data. At i==19 set the high bits of clock sequence as
// per rfc4122, sec. 4.1.5
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | (Math.random() * 16)
uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r]
}
}
}
return uuid.join('')
},
uuidSplice() {
this.uuidOne = this.uuid(13, 16)
this.uuidTwo = this.uuid(13, 16)
this.uuidSnum = this.uuidOne + this.uuidTwo
this.uuidSnum = this.uuidSnum.replace(/\s+/g, '')
console.log('this.uuidOne', this.uuidSnum)
},
async saveText(file) {
// console.log('', e)
// const jsonStr = JSON.stringify(e)
const blob = new Blob([file], {
type: 'md',
})
let myfile = new File([blob], this.route.currentRoute.query.id + '.md')
let myfile = new File([blob], this.uuidSnum + '.md')
var formData = new FormData()
const type = pinyin(this.route.currentRoute.query.type, {
const type = pinyin(this.dataFrom.type, {
pattern: 'initial',
}).replace(/\s*/g, '')
formData.append('fileName', this.route.currentRoute.query.id + '.md')
formData.append('fileName', this.uuidSnum + '.md')
formData.append('type', type)
formData.append('file', myfile) // 'file' HTTP Post, file File
// formData.append('name', this.route.currentRoute.query.id + '.md')
// FileSaver.saveAs(blob, '.md')
const res = await updateDevelopmentFile(formData)
let infoList = {
attrType: '技术文档',
attrValue: res.data.data,
delFlag: 0,
}
mybus.emit('chageDataFrom', infoList)
mybus.emit('showTextFunctionEmit', false)
console.log('res', res)
if (res.data.code === 0) {
message.success('保存成功')
@ -63,20 +118,22 @@
}
},
async getDevelopmentFile() {
console.log(
this.route.currentRoute.query.id,
this.route.currentRoute.query.type
)
const type = pinyin(this.route.currentRoute.query.type, {
const type = pinyin(this.dataFrom.type, {
pattern: 'initial',
}).replace(/\s*/g, '')
console.log(type)
const param = {
type: type,
resourceId: this.route.currentRoute.query.id,
resourceId: this.uuidSnum,
}
const res = await getDevelopmentFile(param)
this.text = res.data
let infoList = {
attrType: '技术文档',
attrValue: this.text.data,
delFlag: 0,
}
mybus.emit('chageDataFrom', infoList)
console.log('res', res)
},
},