|
@@ -7,7 +7,7 @@
|
|
|
<div class="uc-l">
|
|
<div class="uc-l">
|
|
|
<div class="preview">
|
|
<div class="preview">
|
|
|
<img :src="info.icon || require('@/assets/images/default/img_cover_default_2.png')" alt="" />
|
|
<img :src="info.icon || require('@/assets/images/default/img_cover_default_2.png')" alt="" />
|
|
|
- <button class="ui-button submit setting-cover-btn" @click="addScene">设置封面</button>
|
|
|
|
|
|
|
+ <button class="ui-button submit setting-cover-btn" @click="onClickSettingCover">设置封面</button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="upload-btn">
|
|
<div class="upload-btn">
|
|
|
<button class="ui-button submit" @click="selectHandle('image')">选择图片</button>
|
|
<button class="ui-button submit" @click="selectHandle('image')">选择图片</button>
|
|
@@ -33,7 +33,7 @@
|
|
|
maxlength="50"
|
|
maxlength="50"
|
|
|
placeholder="请输入作品标题"
|
|
placeholder="请输入作品标题"
|
|
|
/>
|
|
/>
|
|
|
- <span class="count">{{info.name.length}}/50</span>
|
|
|
|
|
|
|
+ <span class="count">{{titleLength}}/50</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="ui-title jianjie"><span>简介</span></div>
|
|
<div class="ui-title jianjie"><span>简介</span></div>
|
|
|
<div class="jianjie-textarea-wrapper">
|
|
<div class="jianjie-textarea-wrapper">
|
|
@@ -44,7 +44,7 @@
|
|
|
placeholder="请输入作品简介"
|
|
placeholder="请输入作品简介"
|
|
|
type="text"
|
|
type="text"
|
|
|
/>
|
|
/>
|
|
|
- <span class="count">{{info.description.length}}/500</span>
|
|
|
|
|
|
|
+ <span class="count">{{jianjieLength}}/500</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -56,21 +56,35 @@
|
|
|
|
|
|
|
|
</ul>
|
|
</ul>
|
|
|
</div>
|
|
</div>
|
|
|
- <eidt-panel :select="select" @openMaterial="handleOpen" v-if="activeSetting" @close="onCloseEdit" :show="activeSetting"></eidt-panel>
|
|
|
|
|
|
|
+ <eidt-panel
|
|
|
|
|
+ :select="select"
|
|
|
|
|
+ @openMaterial="selectHandle('image','editpanel')"
|
|
|
|
|
+ v-if="activeSetting"
|
|
|
|
|
+ @close="onCloseEdit"
|
|
|
|
|
+ :show="activeSetting"
|
|
|
|
|
+ ></eidt-panel>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="dialog" style="z-index: 2000" v-if="isShowSettingCoverWindow">
|
|
|
|
|
+ <Table2
|
|
|
|
|
+ title="选择素材"
|
|
|
|
|
+ :tabHeader="$MAPTABLEHEADER['image']"
|
|
|
|
|
+ @cancle="isShowSettingCoverWindow = false"
|
|
|
|
|
+ @submit="handleSubmitFromTable2"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<div class="dialog" style="z-index: 2000" v-if="isShowSelect">
|
|
<div class="dialog" style="z-index: 2000" v-if="isShowSelect">
|
|
|
<Table
|
|
<Table
|
|
|
:list="list"
|
|
:list="list"
|
|
|
:tabHeader="$MAPTABLEHEADER[type]"
|
|
:tabHeader="$MAPTABLEHEADER[type]"
|
|
|
- @updateList="update"
|
|
|
|
|
|
|
+ @updateList="updateList"
|
|
|
@cancle="isShowSelect = false"
|
|
@cancle="isShowSelect = false"
|
|
|
- :title="`选择${$MARERIALSTR[type]}`"
|
|
|
|
|
|
|
+ title="选择素材"
|
|
|
@changeCurrent="changeCurrent"
|
|
@changeCurrent="changeCurrent"
|
|
|
:paging="paging"
|
|
:paging="paging"
|
|
|
:hideAll="true"
|
|
:hideAll="true"
|
|
|
@submit="handleSelect"
|
|
@submit="handleSelect"
|
|
|
- >
|
|
|
|
|
- </Table>
|
|
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="dialog" style="z-index: 2000" v-if="isShowScene">
|
|
<div class="dialog" style="z-index: 2000" v-if="isShowScene">
|
|
@@ -88,6 +102,7 @@
|
|
|
import { getMaterialList} from "@/api";
|
|
import { getMaterialList} from "@/api";
|
|
|
import EidtPanel from "./EditPanel";
|
|
import EidtPanel from "./EditPanel";
|
|
|
import Table from "@/components/tableSelect";
|
|
import Table from "@/components/tableSelect";
|
|
|
|
|
+import Table2 from "@/components/tableSelect2";
|
|
|
import { changeByteUnit } from '@/utils/file'
|
|
import { changeByteUnit } from '@/utils/file'
|
|
|
|
|
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
@@ -97,6 +112,7 @@ export default {
|
|
|
components: {
|
|
components: {
|
|
|
EidtPanel,
|
|
EidtPanel,
|
|
|
Table,
|
|
Table,
|
|
|
|
|
+ Table2,
|
|
|
Select
|
|
Select
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
@@ -119,6 +135,7 @@ export default {
|
|
|
dataURL: "",
|
|
dataURL: "",
|
|
|
isShowScene:false, // 显示全景图片选择窗口
|
|
isShowScene:false, // 显示全景图片选择窗口
|
|
|
isShowSelect:false, // 显示普通图片选择窗口
|
|
isShowSelect:false, // 显示普通图片选择窗口
|
|
|
|
|
+ isShowSettingCoverWindow: false,
|
|
|
list:[],
|
|
list:[],
|
|
|
key:'',
|
|
key:'',
|
|
|
clickFrom:'', // 来自“选择图片”:base。来自“全景封面”:scene。来自右侧的“选择图片”:editPanel
|
|
clickFrom:'', // 来自“选择图片”:base。来自“全景封面”:scene。来自右侧的“选择图片”:editPanel
|
|
@@ -129,20 +146,26 @@ export default {
|
|
|
showSize: 4,
|
|
showSize: 4,
|
|
|
current: 1
|
|
current: 1
|
|
|
},
|
|
},
|
|
|
- select:''
|
|
|
|
|
|
|
+ select:'',
|
|
|
};
|
|
};
|
|
|
- },
|
|
|
|
|
|
|
+ },
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters({
|
|
...mapGetters({
|
|
|
info:'info'
|
|
info:'info'
|
|
|
- })
|
|
|
|
|
|
|
+ }),
|
|
|
|
|
+ titleLength() {
|
|
|
|
|
+ return this.info?.name?.length || '0'
|
|
|
|
|
+ },
|
|
|
|
|
+ jianjieLength() {
|
|
|
|
|
+ return this.info?.description?.length || '0'
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
mounted(){
|
|
mounted(){
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
watch:{
|
|
watch:{
|
|
|
"paging.pageNum": function () {
|
|
"paging.pageNum": function () {
|
|
|
- this.isShowSelect && this.getMaterialList();
|
|
|
|
|
|
|
+ this.isShowSelect && this.getMaterialListProxy();
|
|
|
},
|
|
},
|
|
|
isShowSelect(newVal){
|
|
isShowSelect(newVal){
|
|
|
if (!newVal) {
|
|
if (!newVal) {
|
|
@@ -152,9 +175,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- handleOpen(){
|
|
|
|
|
- this.selectHandle('image','editpanel')
|
|
|
|
|
- },
|
|
|
|
|
addScene(){
|
|
addScene(){
|
|
|
this.clickFrom = 'scene'
|
|
this.clickFrom = 'scene'
|
|
|
this.isShowScene = true
|
|
this.isShowScene = true
|
|
@@ -162,16 +182,15 @@ export default {
|
|
|
changeCurrent(data){
|
|
changeCurrent(data){
|
|
|
this.paging.pageNum = data;
|
|
this.paging.pageNum = data;
|
|
|
},
|
|
},
|
|
|
- update(data) {
|
|
|
|
|
|
|
+ updateList(data) {
|
|
|
this.key = data;
|
|
this.key = data;
|
|
|
- this.getMaterialList();
|
|
|
|
|
|
|
+ this.getMaterialListProxy();
|
|
|
},
|
|
},
|
|
|
handleSelect(data){
|
|
handleSelect(data){
|
|
|
if (this.clickFrom == 'scene') {
|
|
if (this.clickFrom == 'scene') {
|
|
|
this.info.icon = data.icon
|
|
this.info.icon = data.icon
|
|
|
this.isShowScene = false
|
|
this.isShowScene = false
|
|
|
- }
|
|
|
|
|
- else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.clickFrom == 'editpanel'? this.select = data[0].icon :this.info.icon = data[0].icon
|
|
this.clickFrom == 'editpanel'? this.select = data[0].icon :this.info.icon = data[0].icon
|
|
|
this.isShowSelect = false
|
|
this.isShowSelect = false
|
|
|
}
|
|
}
|
|
@@ -179,7 +198,7 @@ export default {
|
|
|
this.select = ''
|
|
this.select = ''
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- getMaterialList() {
|
|
|
|
|
|
|
+ getMaterialListProxy() {
|
|
|
getMaterialList(
|
|
getMaterialList(
|
|
|
{
|
|
{
|
|
|
pageNum: this.paging.pageNum,
|
|
pageNum: this.paging.pageNum,
|
|
@@ -203,17 +222,25 @@ export default {
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
|
|
+ onClickSettingCover() {
|
|
|
|
|
+ this.isShowSettingCoverWindow = true
|
|
|
|
|
+ },
|
|
|
|
|
+ // 点击各种选择素材按钮后调用这个
|
|
|
selectHandle(type, from='base'){
|
|
selectHandle(type, from='base'){
|
|
|
this.clickFrom = from
|
|
this.clickFrom = from
|
|
|
this.type = type
|
|
this.type = type
|
|
|
this.isShowSelect = true
|
|
this.isShowSelect = true
|
|
|
- this.getMaterialList()
|
|
|
|
|
|
|
+ this.getMaterialListProxy()
|
|
|
|
|
+ },
|
|
|
|
|
+ handleSubmitFromTable2(selected) {
|
|
|
|
|
+ this.info.icon = selected[0].icon
|
|
|
|
|
+ this.isShowSettingCoverWindow = false
|
|
|
},
|
|
},
|
|
|
onCloseEdit(){
|
|
onCloseEdit(){
|
|
|
this.activeSetting = ''
|
|
this.activeSetting = ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-};
|
|
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|