|
@@ -1,82 +1,129 @@
|
|
|
<template>
|
|
|
- <!-- ↓ @click="handleMouseDown" -->
|
|
|
<div class="merge-ppt-dialog-wrap">
|
|
|
<el-dialog
|
|
|
v-if="mergePptShow"
|
|
|
:visible.sync="mergePptShow"
|
|
|
:close-on-click-modal="false"
|
|
|
:modal-append-to-body="false"
|
|
|
- @close="cancelHandle" v-dialogDrag center width="40%" top="8vh">
|
|
|
+ @close="cancelHandle" v-dialogDrag center width="650px" top="8vh">
|
|
|
<div slot="title" style="display: flex; alignitems: center">
|
|
|
<span style="fontsize: 16px">{{$t('Slides.ppt_merge_btn')}}</span>
|
|
|
</div>
|
|
|
<div class="dialog-container">
|
|
|
<div class="ppt-form">
|
|
|
<div class="input-item" style="position:relative;">
|
|
|
- <h3>{{$t('Slides.please_select_ppt_title')}}</h3>
|
|
|
+ <h3>
|
|
|
+ <span>{{$t('Slides.please_select_ppt_title')}}</span>
|
|
|
+ <el-cascader
|
|
|
+ @change="getPPtList"
|
|
|
+ :options="classifyOptions"
|
|
|
+ v-model="searchClassifyId"
|
|
|
+ :props="{
|
|
|
+ value: 'Id',
|
|
|
+ label: 'ClassifyName',
|
|
|
+ children: 'Child',
|
|
|
+ emitPath:false
|
|
|
+ }"
|
|
|
+ clearable
|
|
|
+ :placeholder="$t('ReportManage.smart_type_filtering')"
|
|
|
+ style="width:200px;"
|
|
|
+ ></el-cascader>
|
|
|
+ </h3>
|
|
|
<div class="select-ppt-wrap select-wrap">
|
|
|
- <el-tabs value="public">
|
|
|
- <el-tab-pane :label="$t('Slides.public_ppt_tabs')" name="public">
|
|
|
- <div class="tree-container">
|
|
|
- <div class="tree-list" :key="treeKey">
|
|
|
- <div class="list-item" v-for="(item,index) in publicList" :key="item.nodeKeyId" @click.stop="expandList(index,'public')">
|
|
|
- <p class="item-label"><span @click.stop="expandList(index,'public')"><i :class="item.expand?'el-icon-caret-bottom':'el-icon-caret-right'"></i></span> {{item.label}}</p>
|
|
|
- <template v-if="item.expand">
|
|
|
- <div class="list-child" v-for="i in item.children" :key="i.nodeKeyId">
|
|
|
- <el-checkbox
|
|
|
- :disabled="disabled&&!choosedIdArr.includes(i.PptId)||i.disabled"
|
|
|
- v-model="i.checked"
|
|
|
- @change="(checked)=>{changeCheck(checked,i,'public')}"
|
|
|
- >{{i.label}}</el-checkbox>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <el-tabs value="public" v-model="panelSource" @tab-click="()=>{getCatalogsList();getPPtList()}">
|
|
|
+ <el-tab-pane :label="$t('Slides.public_ppt_tabs')" :name="3">
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane :label="$t('Slides.my_ppt_tabs')" name="private">
|
|
|
- <div class="tree-container">
|
|
|
- <div class="tree-list" :key="treeKey">
|
|
|
- <div class="list-item" v-for="(item,index) in privateList" :key="item.nodeKeyId" @click.stop="expandList(index,'private')">
|
|
|
- <p class="item-label"><span @click.stop="expandList(index,'private')"><i :class="item.expand?'el-icon-caret-bottom':'el-icon-caret-right'"></i></span> {{item.label}}</p>
|
|
|
- <template v-if="item.expand">
|
|
|
- <div class="list-child" v-for="i in item.children" :key="i.nodeKeyId">
|
|
|
- <el-checkbox
|
|
|
- :disabled="disabled&&!choosedIdArr.includes(i.PptId)||i.disabled"
|
|
|
- v-model="i.checked"
|
|
|
- @change="(checked)=>{changeCheck(checked,i,'private')}"
|
|
|
- >{{i.label}}</el-checkbox>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <el-tab-pane :label="$t('Slides.my_ppt_tabs')" :name="1">
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
+
|
|
|
+ <ul class="tree-container" v-if="catalogPPTList.length">
|
|
|
+ <li v-for="item in catalogPPTList" :key="item.PptId" class="list-item">
|
|
|
+ <el-checkbox
|
|
|
+ v-model="item.checked"
|
|
|
+ @change="(checked)=>{changeCheck(checked,item)}"
|
|
|
+ >{{item.Title}}</el-checkbox>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ <tableNoData text="暂无ppt" size="mini" v-else/>
|
|
|
</div>
|
|
|
<div class="selected-ppt-wrap ">
|
|
|
<span>{{$t('Slides.selected_pages')}}:</span>
|
|
|
<div class="selected-ppt">
|
|
|
<div class="select-node" v-for="item in choosedItemArr" :key="item.PptId">
|
|
|
- <span>{{ item.Title }} {{translatePageNumber(item.PptPage)}}</span>
|
|
|
- <i class="el-icon-error" @click.stop="changeCheck(false,item,'unknow')"></i>
|
|
|
+ <span>{{ item.Title }} ({{item.PptPage}}页)</span>
|
|
|
+ <i class="el-icon-error" @click.stop="changeCheck(false,item,'list')"></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="input-item">
|
|
|
- <h3>{{$t('Slides.please_selecdirectory_into')}}</h3>
|
|
|
- <div class="select-catalog-wrap select-wrap">
|
|
|
- <el-radio-group v-model="selectedCatalogId">
|
|
|
- <el-radio v-for="item in MyPrivateList" :key="item.GroupId"
|
|
|
- :label="item.GroupId">{{item.GroupName}}</el-radio>
|
|
|
+
|
|
|
+ <el-form
|
|
|
+ :model="pptInfo"
|
|
|
+ :rules="rules"
|
|
|
+ ref="baseinfoForm"
|
|
|
+ class="ppt-baseInfo"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
+ <el-form-item prop="classify" :label="$t('ReportManage.ReportList.label_report_classify')">
|
|
|
+ <el-cascader
|
|
|
+ ref="cascader"
|
|
|
+ :options="privateClassifyList"
|
|
|
+ v-model="pptInfo.classify"
|
|
|
+ :props="{
|
|
|
+ value: 'Id',
|
|
|
+ label: 'ClassifyName',
|
|
|
+ children: 'Child',
|
|
|
+ emitPath:false
|
|
|
+ }"
|
|
|
+ :placeholder="$t('ReportManage.ReportList.please_select_category')"
|
|
|
+ size="medium"
|
|
|
+ style="width: 400px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item prop="Title" :label="$t('ReportManage.ReportList.label_report_tit')">
|
|
|
+ <el-input
|
|
|
+ :placeholder="$t('ReportManage.ReportList.input_title_please')"
|
|
|
+ v-model="pptInfo.Title"
|
|
|
+ style="width:400px"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item prop="cooperationType" :label="$t('ReportManage.ReportList.label_coop')">
|
|
|
+ <el-radio-group
|
|
|
+ v-model="pptInfo.cooperationType"
|
|
|
+ :disabled="pptInfo.type===2"
|
|
|
+ @change="pptInfo.cooperationUsers=[]"
|
|
|
+ >
|
|
|
+ <el-radio :label="1"><!-- 个人 -->{{$t('ReportManage.ReportList.coop_own')}}</el-radio>
|
|
|
+ <el-radio :label="2"><!-- 多人协作 -->{{$t('ReportManage.ReportList.coop_more')}}</el-radio>
|
|
|
</el-radio-group>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="input-item">
|
|
|
- <h3>{{$t('Slides.ppt_title_input')}}</h3>
|
|
|
- <el-input :placeholder="$t('Slides.input_ppt_title')" v-model="pptInfo.Title" required ></el-input>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="pptInfo.cooperationType===2"
|
|
|
+ style="margin-left: 20px"
|
|
|
+ @click="isChooseCooperaUser = true"
|
|
|
+ ><!-- 选择协作人 -->{{$t('ReportManage.ReportList.choose_cooper')}}</el-button>
|
|
|
+
|
|
|
+ <div class="choosed-cooper" v-if="pptInfo.cooperationUsers.length">
|
|
|
+ <el-tag
|
|
|
+ v-for="(item,index) in pptInfo.cooperationUsers"
|
|
|
+ :key="item.NodeId"
|
|
|
+ size="mini"
|
|
|
+ effect="dark"
|
|
|
+ closable
|
|
|
+ @close="removeCooper(index)"
|
|
|
+ >
|
|
|
+ {{ item.NodeName }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div slot="footer" class="foot-container">
|
|
@@ -84,16 +131,25 @@
|
|
|
<el-button @click="cancelHandle">{{$t('Dialog.cancel_btn')}}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 选择协作人弹窗 -->
|
|
|
+ <chooseCooperaUserDia
|
|
|
+ :isShow.sync="isChooseCooperaUser"
|
|
|
+ :users="pptInfo.cooperationUsers"
|
|
|
+ @save="getChooseCooperaUser"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {pptInterface} from '@/api/api.js';
|
|
|
-import {pptEnInterface} from '@/api/modules/pptEnApi.js';
|
|
|
import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
|
|
|
import {changeCatalogArr,createRandomCode} from '../../utils/untils';
|
|
|
+import chooseCooperaUserDia from '@/views/report_manage/reportV2/components/chooseCooperaUserDia.vue';
|
|
|
export default {
|
|
|
+ components: { chooseCooperaUserDia },
|
|
|
props:{
|
|
|
mergePptShow:{
|
|
|
type:Boolean,
|
|
@@ -106,28 +162,53 @@ export default {
|
|
|
Title:'',
|
|
|
ImgUrl:'',//读取etaBaseConfig中封面页的第一个
|
|
|
BackIndex:0,
|
|
|
- TemplateType:1
|
|
|
+ TemplateType:1,
|
|
|
+ classify: 0,
|
|
|
+ cooperationType: 1,//协作方式
|
|
|
+ cooperationUsers:[],
|
|
|
+
|
|
|
},//PPT的标题信息
|
|
|
publicList:[],
|
|
|
- privateList:[],
|
|
|
- treeKey:0,
|
|
|
+ catalogPPTList:[],
|
|
|
+
|
|
|
disabled:false,//判断所有的checkbox是否应该是启用/禁用状态
|
|
|
choosedIdArr:[],//选中的PPTIds
|
|
|
choosedItemArr:[],//选中的PPT item
|
|
|
- choosedTreesName:{},//选中的ppt分别来自哪个目录
|
|
|
+
|
|
|
PptId:0,//合并后的pptId
|
|
|
- showCatalog:false,
|
|
|
- selectedCatalogId:0,//选择的目录Id
|
|
|
saveLoading:null,//加载loading
|
|
|
- MyPrivateList:[]
|
|
|
+
|
|
|
+ classifyOptions: [],
|
|
|
+ privateClassifyList: [],
|
|
|
+ rules: {
|
|
|
+ classify: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '报告分类不能为空',
|
|
|
+ trigger: "change",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ Title: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '报告标题不能为空',
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+
|
|
|
+ panelSource: 1,
|
|
|
+ searchClassifyId:0,
|
|
|
+ //协作人弹窗
|
|
|
+ isChooseCooperaUser: false,
|
|
|
};
|
|
|
},
|
|
|
watch:{
|
|
|
mergePptShow(newValue){
|
|
|
if(newValue){
|
|
|
this.init()
|
|
|
- this.getCatalogsList()
|
|
|
- this.getPrivateList()
|
|
|
+ this.getCatalogsList('init')
|
|
|
+ this.getPPtList()
|
|
|
this.getBaseConfig()
|
|
|
}
|
|
|
if(!newValue){
|
|
@@ -138,19 +219,44 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ //ppt列表
|
|
|
+ async getPPtList() {
|
|
|
+ const res = await pptInterface.getPptListV2({
|
|
|
+ PageSize: 1000,
|
|
|
+ CurrentIndex: 1,
|
|
|
+ Source: this.panelSource,
|
|
|
+ ClassifyId: this.searchClassifyId,
|
|
|
+ Keyword: ''
|
|
|
+ })
|
|
|
+
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ let data = res.Data.List||[];
|
|
|
+ this.catalogPPTList = data.map(_ => ({
|
|
|
+ ..._,
|
|
|
+ checked: this.choosedIdArr.includes(_.PptId)?true:false
|
|
|
+ }))
|
|
|
+ },
|
|
|
+
|
|
|
+ getChooseCooperaUser(val) {
|
|
|
+ this.pptInfo.cooperationUsers = val;
|
|
|
+ },
|
|
|
+
|
|
|
+ removeCooper(index) {
|
|
|
+ this.pptInfo.cooperationUsers.splice(index,1)
|
|
|
+ },
|
|
|
+
|
|
|
cancelHandle(){
|
|
|
this.$emit('cancel')
|
|
|
},
|
|
|
- translatePageNumber(num){
|
|
|
- let str = this.$i18n.locale == 'zh' ?`({${num}}页)`:`(Slide{${num}})`
|
|
|
- return str
|
|
|
- },
|
|
|
+
|
|
|
async saveChange(){
|
|
|
const {result,msg} = this.checkForm()
|
|
|
if(!result){
|
|
|
this.$message.warning(msg)
|
|
|
return
|
|
|
}
|
|
|
+ await this.$refs.baseinfoForm.validate()
|
|
|
this.saveLoading = this.$loading({
|
|
|
fullscreen:true,
|
|
|
lock: true,
|
|
@@ -160,14 +266,12 @@ export default {
|
|
|
background: 'rgba(255, 255, 255, 0.8)'
|
|
|
})
|
|
|
await this.getPptsDetail()
|
|
|
- if(this.$parent.currentLang==='en'){
|
|
|
- this.pptInfo.PptDate = (new Date().getFullYear())+'.'+(new Date().getMonth()+1)
|
|
|
- }
|
|
|
+
|
|
|
await this.addNewPpt()
|
|
|
if(this.PptId!==0){
|
|
|
this.saveLoading.close()
|
|
|
//跳转至ppt编辑页
|
|
|
- const path = this.$parent.currentLang!=='en'?'/ppteditor':'/ppteneditor'
|
|
|
+ const path = '/ppteditor'
|
|
|
this.$router.push({
|
|
|
path,
|
|
|
query:{
|
|
@@ -182,10 +286,7 @@ export default {
|
|
|
if(this.choosedIdArr.length!==2){
|
|
|
return {result:false,msg: this.$t('Slides.please_select_two_msg')}
|
|
|
}
|
|
|
- if(!this.pptInfo.Title.length){
|
|
|
- return {result:false,msg:this.$t('Slides.please_fill_title_msg')}
|
|
|
- }
|
|
|
- if(this.selectedCatalogId===0){
|
|
|
+ if(this.pptInfo.classify===0){
|
|
|
return {result:false,msg:this.$t('Slides.please_select_directory_msg') }
|
|
|
}
|
|
|
return {result:true,msg:''}
|
|
@@ -194,26 +295,21 @@ export default {
|
|
|
async getPptsDetail(){
|
|
|
//只需要content
|
|
|
let content_font = [],content_back=[]
|
|
|
- const res_font = this.$parent.currentLang!=='en'
|
|
|
- ? await pptInterface.getpptDetail({
|
|
|
- PptId:this.choosedIdArr[0]
|
|
|
- })
|
|
|
- : await pptEnInterface.getpptDetail({
|
|
|
- PptId:this.choosedIdArr[0]
|
|
|
- })
|
|
|
+ const res_font = await pptInterface.getpptDetail({
|
|
|
+ PptId:this.choosedIdArr[0]
|
|
|
+ })
|
|
|
+
|
|
|
if(res_font.Ret===200){
|
|
|
content_font = JSON.parse(res_font.Data.Content)
|
|
|
}
|
|
|
- const res_back = this.$parent.currentLang!=='en'
|
|
|
- ? await pptInterface.getpptDetail({
|
|
|
- PptId:this.choosedIdArr[1]
|
|
|
- })
|
|
|
- : await pptEnInterface.getpptDetail({
|
|
|
- PptId:this.choosedIdArr[1]
|
|
|
- })
|
|
|
+ const res_back = await pptInterface.getpptDetail({
|
|
|
+ PptId:this.choosedIdArr[1]
|
|
|
+ })
|
|
|
+
|
|
|
if(res_back.Ret===200){
|
|
|
content_back = JSON.parse(res_back.Data.Content)
|
|
|
}
|
|
|
+
|
|
|
//合并两个content,并给每个重新赋id,保证id唯一
|
|
|
let content = content_font.concat(content_back)
|
|
|
this.content = content.map(item=>{
|
|
@@ -223,17 +319,29 @@ export default {
|
|
|
},
|
|
|
//添加PPT
|
|
|
async addNewPpt(){
|
|
|
- const res = this.$parent.currentLang!=='en'
|
|
|
- ? await pptInterface.addppt({
|
|
|
- FirstPage:this.pptInfo,
|
|
|
- Content:JSON.stringify(this.content),
|
|
|
- GroupId:this.selectedCatalogId
|
|
|
- })
|
|
|
- : await pptEnInterface.addppt({
|
|
|
- FirstPage:this.pptInfo,
|
|
|
+ const {
|
|
|
+ Title,
|
|
|
+ ImgUrl,
|
|
|
+ BackIndex,
|
|
|
+ TemplateType,
|
|
|
+ } = this.pptInfo
|
|
|
+
|
|
|
+ const res = await pptInterface.addpptV2({
|
|
|
+ FirstPage:{
|
|
|
+ Title,
|
|
|
+ ImgUrl,
|
|
|
+ BackIndex,
|
|
|
+ TemplateType
|
|
|
+ },
|
|
|
Content:JSON.stringify(this.content),
|
|
|
- GroupId:this.selectedCatalogId
|
|
|
+ AddType: 1,
|
|
|
+ ClassifyId: this.pptInfo.classify,
|
|
|
+ Title: Title,
|
|
|
+ CollaborateType: this.pptInfo.cooperationType,
|
|
|
+ InheritPptId: 0,
|
|
|
+ CollaborateUserIds: this.pptInfo.cooperationUsers.map(_ => _.NodeId)
|
|
|
})
|
|
|
+
|
|
|
if(res.Ret===200){
|
|
|
this.$message.success(this.$t('Slides.merging_successful_msg'))
|
|
|
this.PptId = res.Data.PptId
|
|
@@ -245,96 +353,47 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//PPT的选中和取消选中处理
|
|
|
- changeCheck(type,i,treeName){
|
|
|
- let ListName = treeName==='public'?'privateList':'publicList'
|
|
|
- //从已选择的PPT内点击,只能是取消选中
|
|
|
- if(treeName==='unknow'){
|
|
|
- ListName = this.choosedTreesName[i.PptId]+'List'
|
|
|
- }
|
|
|
- if(type){
|
|
|
+ changeCheck(type,i,treeName=''){
|
|
|
+ if(type) {
|
|
|
+ if(this.choosedIdArr.length===2){
|
|
|
+ i.checked=false;
|
|
|
+ return this.$message.warning('最多只能选择两个ppt')
|
|
|
+ }
|
|
|
this.choosedIdArr.push(i.PptId)
|
|
|
this.choosedItemArr.push(i)
|
|
|
- this.choosedTreesName[i.PptId] = treeName
|
|
|
- //选中时,同时要将另一个List的对应i也勾选,如果有
|
|
|
- this.setNodeChecked(ListName,i.PptId,true)
|
|
|
- }else{
|
|
|
+ }else {
|
|
|
const index = this.choosedIdArr.findIndex(item=>item===i.PptId)
|
|
|
index!==-1&&this.choosedIdArr.splice(index,1)
|
|
|
index!==-1&&this.choosedItemArr.splice(index,1)
|
|
|
- //取消选中时,同时要将另一个List的对应i也取消勾选,如果有
|
|
|
- this.setNodeChecked(ListName,i.PptId,false)
|
|
|
- if(treeName==='unknow'){
|
|
|
- ListName = this.choosedTreesName[i.PptId]==='public'?'privateList':'publicList'
|
|
|
- this.setNodeChecked(ListName,i.PptId,false)
|
|
|
- }
|
|
|
- delete this.choosedTreesName[i.PptId]
|
|
|
- }
|
|
|
- if(this.choosedIdArr.length===2){
|
|
|
- this.disabled = true
|
|
|
- }else if(this.choosedIdArr.length<2){
|
|
|
- if(this.disabled){
|
|
|
- this.disabled=false
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- //设置ppt的选中取消和禁用启用属性
|
|
|
- setNodeChecked(listName,PptId,checked){
|
|
|
- this[listName].forEach(item=>{
|
|
|
- if(item.children.length>0){
|
|
|
- item.children.forEach(i=>{
|
|
|
- if(i.PptId===PptId){
|
|
|
- i.checked = checked
|
|
|
- //顺便禁用下,不然看起来就像选了四个
|
|
|
- i.disabled = checked
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- //展开收起列表
|
|
|
- expandList(index,treeName){
|
|
|
- const {expand} = this[`${treeName}List`][index]
|
|
|
- this.$set(this[`${treeName}List`][index],'expand',!expand)
|
|
|
- this.treeKey++
|
|
|
- },
|
|
|
- //获取PPT目录
|
|
|
- async getCatalogsList(){
|
|
|
- const res = this.$parent.currentLang!=='en'
|
|
|
- ? await pptInterface.getCatalogsList({IsNewPpt:1})
|
|
|
- : await pptEnInterface.getCatalogsList({IsNewPpt:1})
|
|
|
- if(res.Ret===200){
|
|
|
- const {PublicList,PrivateList} = res.Data
|
|
|
- this.publicList = changeCatalogArr(PublicList)
|
|
|
- this.privateList = changeCatalogArr(PrivateList)
|
|
|
- this.publicList.forEach(item=>{
|
|
|
- item.expand = false
|
|
|
- })
|
|
|
- this.privateList.forEach(item=>{
|
|
|
- item.expand = false
|
|
|
+
|
|
|
+ treeName==='list' && this.catalogPPTList.forEach(_ => {
|
|
|
+ if(_.PptId===i.PptId) {
|
|
|
+ _.checked = false
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- //获取私有PPT目录
|
|
|
- async getPrivateList(){
|
|
|
- const res = this.$parent.currentLang!=='en'
|
|
|
- ? await pptInterface.getPrivateCatalogList()
|
|
|
- : await pptEnInterface.getPrivateCatalogList()
|
|
|
+
|
|
|
+ //获取PPT目录
|
|
|
+ async getCatalogsList(type=''){
|
|
|
+ const res = await pptInterface.getCatalogsListV2({Source: 3})
|
|
|
if(res.Ret===200){
|
|
|
- this.MyPrivateList = res.Data.List||[]
|
|
|
- this.selectedCatalogId = this.MyPrivateList[0].GroupId
|
|
|
+ this.classifyOptions = res.Data||[]
|
|
|
+ this.filterNode(this.classifyOptions)
|
|
|
+
|
|
|
+ type==='init' && (this.privateClassifyList = this.classifyOptions)
|
|
|
}
|
|
|
},
|
|
|
- //模拟blur事件,隐藏展开的目录框
|
|
|
- handleMouseDown(target){
|
|
|
- //console.log(target)
|
|
|
- const {path} = target
|
|
|
- for(let i=0;i<path.length;i++){
|
|
|
- if(path[i].className==="catalog-wrap")return
|
|
|
- }
|
|
|
- if(this.showCatalog){
|
|
|
- this.showCatalog = false
|
|
|
- }
|
|
|
+ filterNode(arr) {
|
|
|
+ arr.forEach(item => {
|
|
|
+ if(item.Child&&item.Child.length) {
|
|
|
+ this.filterNode(item.Child)
|
|
|
+ }else {
|
|
|
+ delete item.Child
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
+
|
|
|
//重置data的值
|
|
|
init(){
|
|
|
Object.assign(this.$data,this.$options.data())
|
|
@@ -343,7 +402,7 @@ export default {
|
|
|
etaBaseConfigInterence.getBaseConfig().then(res=>{
|
|
|
if(res.Ret!==200) return
|
|
|
const {CnPptCoverImgs='',EnPptCoverImgs=''} = res.Data||{}
|
|
|
- this.pptInfo.ImgUrl = this.$parent.currentLang!=='en'?CnPptCoverImgs.split(',')[0]:EnPptCoverImgs.split(',')[0]
|
|
|
+ this.pptInfo.ImgUrl = CnPptCoverImgs.split(',')[0]
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -382,7 +441,7 @@ export default {
|
|
|
font-size: 14px;
|
|
|
color:#999999FF;
|
|
|
&.is-active{
|
|
|
- color: #409EFF
|
|
|
+ color: #0052D9;
|
|
|
}
|
|
|
}
|
|
|
.el-tabs__nav-wrap.is-top{
|
|
@@ -417,33 +476,6 @@ export default {
|
|
|
width: 100%;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- .public-tree,.private-tree{
|
|
|
- /* flex: 1; */
|
|
|
- width:47.5%;
|
|
|
- .tree-container{
|
|
|
- margin-top: 10px;
|
|
|
- width:100%;
|
|
|
- height:300px;
|
|
|
- overflow-y: scroll;
|
|
|
- border: 1px dashed #999;
|
|
|
- .tree-list{
|
|
|
- .list-item{
|
|
|
- cursor: pointer;
|
|
|
- .item-label{
|
|
|
- &:hover{
|
|
|
- background-color: #f0f4ff;
|
|
|
- }
|
|
|
- }
|
|
|
- .list-child{
|
|
|
- margin-left: 10px;
|
|
|
- &:hover{
|
|
|
- background-color: #f0f4ff;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
}
|
|
|
.ppt-form{
|
|
@@ -456,6 +488,11 @@ export default {
|
|
|
.input-item{
|
|
|
width: 90%;
|
|
|
margin-top:20px;
|
|
|
+ h3 {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
&:first-child{
|
|
|
margin-top: 0;
|
|
|
}
|
|
@@ -522,25 +559,23 @@ export default {
|
|
|
.tree-container{
|
|
|
height:200px;
|
|
|
overflow-y: scroll;
|
|
|
- .tree-list{
|
|
|
- .list-item{
|
|
|
- margin-left: 20px;
|
|
|
- margin-top: 6px;
|
|
|
- cursor: pointer;
|
|
|
- &:first-child{
|
|
|
- margin-top:0;
|
|
|
- }
|
|
|
- .item-label{
|
|
|
- &:hover{
|
|
|
- background-color: #f0f4ff;
|
|
|
- }
|
|
|
+ .list-item{
|
|
|
+ margin-left: 20px;
|
|
|
+ margin-top: 6px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:first-child{
|
|
|
+ margin-top:0;
|
|
|
+ }
|
|
|
+ .item-label{
|
|
|
+ &:hover{
|
|
|
+ background-color: #f0f4ff;
|
|
|
}
|
|
|
- .list-child{
|
|
|
- margin-left: 10px;
|
|
|
- margin-top: 6px;
|
|
|
- &:hover{
|
|
|
- background-color: #f0f4ff;
|
|
|
- }
|
|
|
+ }
|
|
|
+ .list-child{
|
|
|
+ margin-left: 10px;
|
|
|
+ margin-top: 6px;
|
|
|
+ &:hover{
|
|
|
+ background-color: #f0f4ff;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -598,6 +633,16 @@ export default {
|
|
|
border: 1px solid #DCDFE6;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .ppt-baseInfo {
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 30px;
|
|
|
+ .choosed-cooper {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|