|
|
|
|
@ -0,0 +1,608 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增文物' : '编辑文物'" :form="form"
|
|
|
|
|
:rules="rules" @submit="submit">
|
|
|
|
|
<template v-slot:name>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>名称:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.name" placeholder="请输入文物名称" clearable style="width: 300px;"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:release_time>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>发布时间:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-date-picker style="width: 300px;" v-model="form.release_time" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
type="datetime" placeholder="选择发布时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:source>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>来源:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.source" placeholder="请输入来源" clearable style="width: 300px;"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:link_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>关联文物:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.link_id" placeholder="请选择">
|
|
|
|
|
<el-option v-for="item in relicList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:show_list>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>列表显示:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-radio-group v-model="form.show_list">
|
|
|
|
|
<el-radio :label="1">显示</el-radio>
|
|
|
|
|
<el-radio :label="0">不显示</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:history_time>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>文物年限:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-date-picker style="width: 300px;" v-model="form.history_time" value-format="yyyy" type="year"
|
|
|
|
|
placeholder="选择文物年限">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:contain>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>文物组成:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.contain" placeholder="请输入文物组成" clearable style="width: 300px;"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:grade>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>文物等级:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.grade" placeholder="请输入文物等级" clearable style="width: 300px;"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
<template v-slot:url_3d>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>fbx别名:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.url_3d" placeholder="请输入fbx别名" clearable style="width: 300px;"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:threed_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>3D图:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" class="upload-demo" :file-list="threedList" style="width:600px" :limit="1"
|
|
|
|
|
:auto-upload="true" :data="uploadOther"
|
|
|
|
|
:on-success="(response, file, fileList)=>{handlesuccessVoice(response, file, fileList,'threed')}"
|
|
|
|
|
:on-remove="(file,fileList,type)=>{handleRemoveVoice(file,fileList,'threed')}">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:fbx_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>fbx文件:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" class="upload-demo" :file-list="fbxList" style="width:600px" :limit="1"
|
|
|
|
|
:auto-upload="true" :data="uploadOther"
|
|
|
|
|
:on-success="(response, file, fileList)=>{handlesuccessVoice(response, file, fileList,'fbx')}"
|
|
|
|
|
:on-remove="(file,fileList,type)=>{handleRemoveVoice(file,fileList,'fbx')}">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:jpg_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>jpg文件:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" class="upload-demo" :file-list="jpgList" style="width:600px" :limit="1"
|
|
|
|
|
:auto-upload="true" :data="uploadOther"
|
|
|
|
|
:on-success="(response, file, fileList)=>{handlesuccessVoice(response, file, fileList,'jpg')}"
|
|
|
|
|
:on-remove="(file,fileList,type)=>{handleRemoveVoice(file,fileList,'jpg')}">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:jpg2_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>jpg文件2:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" class="upload-demo" :file-list="jpg2List" style="width:600px" :limit="1"
|
|
|
|
|
:auto-upload="true" :data="uploadOther"
|
|
|
|
|
:on-success="(response, file, fileList)=>{handlesuccessVoice(response, file, fileList,'jpg2')}"
|
|
|
|
|
:on-remove="(file,fileList,type)=>{handleRemoveVoice(file,fileList,'jpg2')}">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:voice>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>语音文件:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" class="upload-demo" :file-list="voiceList" style="width:600px" :limit="1"
|
|
|
|
|
:auto-upload="true" :data="uploadOther"
|
|
|
|
|
:on-success="(response, file, fileList)=>{handlesuccessVoice(response, file, fileList,'voice')}"
|
|
|
|
|
:on-remove="(file,fileList,type)=>{handleRemoveVoice(file,fileList,'voice')}">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:head_picture>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>关联头图:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" :file-list="headPictureList" list-type="picture-card" style="width:600px"
|
|
|
|
|
:limit="1" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
|
|
|
|
|
:on-preview="handlePictureCardPreview" :on-remove="handleRemove">
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:content>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
内容:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content" style="width:680px">
|
|
|
|
|
<xyTinymce v-if="isShow" v-model="form.content"></xyTinymce>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
<el-dialog :visible.sync="dialogVisible">
|
|
|
|
|
<img width="100%" :src="dialogImageUrl" alt="">
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import xyTinymce from "@/components/XyTinymce/index.vue";
|
|
|
|
|
import {
|
|
|
|
|
store,
|
|
|
|
|
show,
|
|
|
|
|
save,
|
|
|
|
|
index
|
|
|
|
|
} from "@/api/relic2"
|
|
|
|
|
import {
|
|
|
|
|
Message
|
|
|
|
|
} from 'element-ui'
|
|
|
|
|
import {
|
|
|
|
|
getToken
|
|
|
|
|
} from '@/utils/auth'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
xyTinymce
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isShow: false,
|
|
|
|
|
type: 'add',
|
|
|
|
|
id: '',
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
dialogImageUrl: '',
|
|
|
|
|
relicList: [],
|
|
|
|
|
form: {
|
|
|
|
|
name: '',
|
|
|
|
|
release_time: '',
|
|
|
|
|
source: '',
|
|
|
|
|
link_id: '',
|
|
|
|
|
show_list: 1,
|
|
|
|
|
url_3d: '',
|
|
|
|
|
threed_id: '',
|
|
|
|
|
fbx_id: '',
|
|
|
|
|
jpg_id: '',
|
|
|
|
|
voice: '',
|
|
|
|
|
head_picture: '',
|
|
|
|
|
content: '',
|
|
|
|
|
history_time: '',
|
|
|
|
|
contain: '',
|
|
|
|
|
grade: '',
|
|
|
|
|
},
|
|
|
|
|
uploadOther: {
|
|
|
|
|
token: ""
|
|
|
|
|
},
|
|
|
|
|
action: `${process.env.VUE_APP_BASE_API}/api/admin/upload-file`,
|
|
|
|
|
headPictureList: [],
|
|
|
|
|
threedList: [],
|
|
|
|
|
fbxList: [],
|
|
|
|
|
jpgList: [],
|
|
|
|
|
jpg2List: [],
|
|
|
|
|
voiceList: [],
|
|
|
|
|
rules: {
|
|
|
|
|
name: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入文物名称'
|
|
|
|
|
}],
|
|
|
|
|
release_time: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择发布时间'
|
|
|
|
|
}],
|
|
|
|
|
source: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入来源'
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.uploadOther.token = getToken();
|
|
|
|
|
this.getRelic()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async getRelic() {
|
|
|
|
|
const res = await index({
|
|
|
|
|
page_size: 999,
|
|
|
|
|
page: 1,
|
|
|
|
|
name: '',
|
|
|
|
|
sort_name: 'release_time',
|
|
|
|
|
sort_type: "DESC",
|
|
|
|
|
})
|
|
|
|
|
this.relicList = res.data
|
|
|
|
|
},
|
|
|
|
|
getDatetimeValue() {
|
|
|
|
|
const now = new Date();
|
|
|
|
|
const year = now.getFullYear();
|
|
|
|
|
const month = now.getMonth() + 1;
|
|
|
|
|
const day = now.getDate();
|
|
|
|
|
const hour = now.getHours();
|
|
|
|
|
const minute = now.getMinutes();
|
|
|
|
|
const second = now.getSeconds();
|
|
|
|
|
const currentTime =
|
|
|
|
|
`${year}-${month >= 10 ? month : '0' + month}-${day >= 10 ? day : '0' + day} ${hour >= 10 ? hour : '0' + hour}:${minute >= 10 ? minute : '0' + minute}:${second >= 10 ? second : '0' + second}`;
|
|
|
|
|
return currentTime;
|
|
|
|
|
},
|
|
|
|
|
async getDetail() {
|
|
|
|
|
const res = await show({
|
|
|
|
|
id: this.id
|
|
|
|
|
})
|
|
|
|
|
this.form = {
|
|
|
|
|
name: res?.name,
|
|
|
|
|
release_time: res.release_time ? res.release_time : this.getDatetimeValue(),
|
|
|
|
|
source: res.source ? res.source : '苏州革命博物馆',
|
|
|
|
|
link_id: res?.link_id,
|
|
|
|
|
show_list: res.show_list===0 ? 0 : 1,
|
|
|
|
|
url_3d: res?.url_3d,
|
|
|
|
|
threed_id: res?.threed_id,
|
|
|
|
|
fbx_id: res?.fbx_id,
|
|
|
|
|
jpg_id: res?.jpg_id,
|
|
|
|
|
jpg2_id: res?.jpg_id,
|
|
|
|
|
voice: res?.voice,
|
|
|
|
|
head_picture: res?.head_picture,
|
|
|
|
|
content: res?.content,
|
|
|
|
|
history_time: res?.history_time,
|
|
|
|
|
contain: res?.contain,
|
|
|
|
|
grade: res?.grade,
|
|
|
|
|
}
|
|
|
|
|
res.head_upload ? this.headPictureList.push(res.head_upload) : ''
|
|
|
|
|
res.voice_upload ? this.voiceList.push({
|
|
|
|
|
id: res.voice_upload.id,
|
|
|
|
|
name: res.voice_upload.original_name,
|
|
|
|
|
url: res.voice_upload.url
|
|
|
|
|
}) : ''
|
|
|
|
|
res.threed ? this.threedList.push({
|
|
|
|
|
id: res.threed.id,
|
|
|
|
|
name: res.threed.original_name,
|
|
|
|
|
url: res.threed.url
|
|
|
|
|
}) : ''
|
|
|
|
|
res.fbx ? this.fbxList.push({
|
|
|
|
|
id: res.fbx.id,
|
|
|
|
|
name: res.fbx.original_name,
|
|
|
|
|
url: res.fbx.url
|
|
|
|
|
}) : ''
|
|
|
|
|
res.jpg ? this.jpgList.push({
|
|
|
|
|
id: res.jpg.id,
|
|
|
|
|
name: res.jpg.original_name,
|
|
|
|
|
url: res.jpg.url
|
|
|
|
|
}) : ''
|
|
|
|
|
res.jpg2 ? this.jpg2List.push({
|
|
|
|
|
id: res.jpg2.id,
|
|
|
|
|
name: res.jpg2.original_name,
|
|
|
|
|
url: res.jpg2.url
|
|
|
|
|
}) : ''
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
if (this.headPictureList.length > 0) {
|
|
|
|
|
for (var h of this.headPictureList) {
|
|
|
|
|
if (h.response) {
|
|
|
|
|
this.form.head_picture = h.response.id
|
|
|
|
|
} else {
|
|
|
|
|
this.form.head_picture = h.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.form.head_picture = ''
|
|
|
|
|
}
|
|
|
|
|
if (this.voiceList.length > 0) {
|
|
|
|
|
for (var h of this.voiceList) {
|
|
|
|
|
if (h.response) {
|
|
|
|
|
this.form.voice = h.response.id
|
|
|
|
|
} else {
|
|
|
|
|
this.form.voice = h.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.form.voice = ''
|
|
|
|
|
}
|
|
|
|
|
if (this.threedList.length > 0) {
|
|
|
|
|
for (var h of this.threedList) {
|
|
|
|
|
if (h.response) {
|
|
|
|
|
this.form.threed_id = h.response.id
|
|
|
|
|
} else {
|
|
|
|
|
this.form.threed_id = h.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.form.threed_id = ''
|
|
|
|
|
}
|
|
|
|
|
if (this.fbxList.length > 0) {
|
|
|
|
|
for (var h of this.fbxList) {
|
|
|
|
|
if (h.response) {
|
|
|
|
|
this.form.fbx_id = h.response.id
|
|
|
|
|
} else {
|
|
|
|
|
this.form.fbx_id = h.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.form.fbx_id = ''
|
|
|
|
|
}
|
|
|
|
|
if (this.jpgList.length > 0) {
|
|
|
|
|
for (var h of this.jpgList) {
|
|
|
|
|
if (h.response) {
|
|
|
|
|
this.form.jpg_id = h.response.id
|
|
|
|
|
} else {
|
|
|
|
|
this.form.jpg_id = h.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.form.jpg_id = ''
|
|
|
|
|
}
|
|
|
|
|
if (this.jpg2List.length > 0) {
|
|
|
|
|
for (var h of this.jpg2List) {
|
|
|
|
|
if (h.response) {
|
|
|
|
|
this.form.jpg2_id = h.response.id
|
|
|
|
|
} else {
|
|
|
|
|
this.form.jpg2_id = h.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.form.jpg2_id = ''
|
|
|
|
|
}
|
|
|
|
|
console.log(this.form)
|
|
|
|
|
// return
|
|
|
|
|
if (this.type === 'add') {
|
|
|
|
|
store({
|
|
|
|
|
...this.form
|
|
|
|
|
}).then(res => {
|
|
|
|
|
Message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '新增文物成功'
|
|
|
|
|
})
|
|
|
|
|
this.isShow = false
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.type === 'editor') {
|
|
|
|
|
save({
|
|
|
|
|
id: this.id,
|
|
|
|
|
...this.form
|
|
|
|
|
}).then(res => {
|
|
|
|
|
Message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '编辑文物成功'
|
|
|
|
|
})
|
|
|
|
|
this.isShow = false
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleRemove(file, fileList) {
|
|
|
|
|
this.headPictureList = fileList
|
|
|
|
|
},
|
|
|
|
|
handlePictureCardPreview(file) {
|
|
|
|
|
this.dialogImageUrl = file.url;
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
},
|
|
|
|
|
handlesuccess(response, file, fileList) {
|
|
|
|
|
this.headPictureList = fileList
|
|
|
|
|
},
|
|
|
|
|
handleRemoveVoice(file, fileList, type) {
|
|
|
|
|
console.log(file, fileList, type)
|
|
|
|
|
switch (type) {
|
|
|
|
|
case 'voice':
|
|
|
|
|
this.voiceList = fileList
|
|
|
|
|
break;
|
|
|
|
|
case 'threed':
|
|
|
|
|
this.threedList = fileList
|
|
|
|
|
break;
|
|
|
|
|
case 'fbx':
|
|
|
|
|
this.fbxList = fileList
|
|
|
|
|
break;
|
|
|
|
|
case 'jpg':
|
|
|
|
|
this.jpgList = fileList
|
|
|
|
|
break;
|
|
|
|
|
case 'jpg2':
|
|
|
|
|
this.jpg2List = fileList
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handlesuccessVoice(response, file, fileList, type) {
|
|
|
|
|
console.log(response, file, fileList, type)
|
|
|
|
|
switch (type) {
|
|
|
|
|
case 'voice':
|
|
|
|
|
this.voiceList = fileList
|
|
|
|
|
break;
|
|
|
|
|
case 'threed':
|
|
|
|
|
this.threedList = fileList
|
|
|
|
|
break;
|
|
|
|
|
case 'fbx':
|
|
|
|
|
this.fbxList = fileList
|
|
|
|
|
break;
|
|
|
|
|
case 'jpg':
|
|
|
|
|
this.jpgList = fileList
|
|
|
|
|
break;
|
|
|
|
|
case 'jpg2':
|
|
|
|
|
this.jpg2List = fileList
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
isShow(newVal) {
|
|
|
|
|
if (newVal) {
|
|
|
|
|
if (this.type === 'editor') {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
} else {
|
|
|
|
|
this.form.source = '苏州革命博物馆'
|
|
|
|
|
this.form.release_time = this.getDatetimeValue()
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.id = ''
|
|
|
|
|
this.type = ''
|
|
|
|
|
this.headPictureList = []
|
|
|
|
|
this.voiceList = []
|
|
|
|
|
this.threedList = []
|
|
|
|
|
this.fbxList = []
|
|
|
|
|
this.jpgList = []
|
|
|
|
|
this.jpg2List = []
|
|
|
|
|
this.$refs['dialog'].reset()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.xy-table-item-label {
|
|
|
|
|
width: 160px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.img__delete {
|
|
|
|
|
transform: scale(0.8, 0.8);
|
|
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 4px;
|
|
|
|
|
right: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .avatar-uploader .el-upload {
|
|
|
|
|
border: 1px dashed #d9d9d9;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
position: relative;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .avatar-uploader .el-upload:hover {
|
|
|
|
|
border-color: #409EFF;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-upload--picture-card {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
color: #8c939d;
|
|
|
|
|
width: 80px !important;
|
|
|
|
|
height: 80px !important;
|
|
|
|
|
line-height: 80px !important;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .avatar-uploader-icon {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
color: #8c939d;
|
|
|
|
|
width: 80px !important;
|
|
|
|
|
height: 80px !important;
|
|
|
|
|
line-height: 80px !important;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .avatar {
|
|
|
|
|
width: 80px !important;
|
|
|
|
|
display: block;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .xy-table-item-label {
|
|
|
|
|
width: 160px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-date-editor .el-range-separator {
|
|
|
|
|
width: auto !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-input-number .el-input__inner {
|
|
|
|
|
text-align: left !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.searchCompanys {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
|
|
|
|
.el-input {
|
|
|
|
|
width: 80%
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|