master
lion 1 year ago
parent eb92989734
commit b01019a287

@ -96,7 +96,7 @@ export default {
}).catch(err=>{
reject(err)
this.$Message.warning({
content:'请填写完整信息',
content:'Please fill in the complete information',
duration:1
})
})
@ -131,7 +131,7 @@ export default {
}
}).catch(err => {
this.$Message.warning({
content: "请填写完整信息",
content: "Please fill in the complete information",
background: true,
duration: 1
})

@ -33,6 +33,18 @@
<el-input placeholder="Please Input" style="width:100%" v-model="form.sort"></el-input>
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in visibelList" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:size>
@ -135,10 +147,18 @@
}, {
id: 1,
value: 'Special'
}],
visibelList:[{
id: 1,
value: 'Yes'
}, {
id: 0,
value: 'No'
}],
form: {
name: '',
type: 0,
type: 0,
is_visible:1,
sort: 0,
size: [],
lon: [],
@ -208,12 +228,13 @@
show_relation: []
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.type = res.type ? res.type : 0
this.form.type = res.type ? res.type : 0
this.form.is_visible = res.is_visible?res.is_visible:0
this.form.size = res.size ? res.size : []
this.form.lon = res.lon ? res.lon : []
this.form.phase = res.phase ? res.phase : []
this.form.interaction = res.interaction ? res.interaction : [],
this.form.webinar_ids = res.webinar_ids ? res.webinar_ids : []
this.form.webinar_ids = res.webinar_ids ? res.webinar_ids : []
})
}
},
@ -227,7 +248,8 @@
this.id = ''
this.form = {
name: '',
type: 0,
type: 0,
is_visible:1,
sort: 0,
size: [],
lon: [],

@ -47,7 +47,18 @@
<el-input placeholder="Please Input" style="width:100%" v-model="form.title"></el-input>
</div>
</div>
</template>
</template>
<template v-slot:keywords>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Keywords
</div>
<div class="xy-table-item-content">
<el-input placeholder="Please Input" type="textarea" style="width:100%" v-model="form.keywords"></el-input>
</div>
</div>
</template>
<template v-slot:separation>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -101,7 +112,7 @@
</div>
</div>
</template>
<template v-slot:tag_ids>
<!-- <template v-slot:tag_ids>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Tags
@ -113,7 +124,7 @@
</el-select>
</div>
</div>
</template>
</template> -->
<template v-slot:file_ids>
<div class="xy-table-item">
@ -217,7 +228,8 @@
application_type_id: '',
category_id: [],
number: '',
title: "",
title: "",
keywords:'',
separation: [],
branch: [],
topic: [],
@ -320,7 +332,12 @@
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.application_details = res.application_details ? res.application_details : [],
this.form.tag_ids = res.tag_ids?res.tag_ids:[]
this.form.tag_ids = res.tag_ids?res.tag_ids:[],
this.form.category_id = res.category_id?res.category_id:[],
this.form.separation = res.separation?res.separation:[]
this.form.branch = res.branch?res.branch:[]
this.form.topic = res.topic?res.topic:[]
this.form.equipment = res.equipment?res.equipment:[]
if (res.files && res.files.length > 0) {
this.filesList = []
res.files.map(item => {
@ -347,7 +364,8 @@
application_type_id: '',
category_id: [],
number: '',
title: "",
title: "",
keywords:'',
separation: [],
branch: [],
topic: [],

@ -154,7 +154,9 @@
},
deleteList(id) {
var that = this;
destroy(id).then(response => {
destroy({
id:id
}).then(response => {
this.$Message.success('操作成功');
this.getList()
}).catch(error => {

@ -400,13 +400,16 @@
if (this.type === 'editor') {
this.getDetail()
} else {
for (var k in this.productDetailsKeyList) {
this.form.product_details.push({
key: this.productDetailsKeyList[k]["key"],
type: this.productDetailsKeyList[k]["type"],
value: '',
list: this.productDetailsKeyList[k]["list"]
})
for (var k in this.productDetailsKeyList) {
if (this.productDetailsKeyList[k]["type"] === 'select') {
this.form.product_details.push({
key: this.productDetailsKeyList[k]["key"],
type: this.productDetailsKeyList[k]["type"],
value: '',
list: this.productDetailsKeyList[k]["list"]
})
}
}
}
this.showWang = true

@ -40,7 +40,7 @@
<template v-slot:type>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Type
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Type
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" filterable v-model="form.type" placeholder="Please Select">
@ -108,10 +108,10 @@
required: true,
message: 'Please Input'
}],
type: [{
required: true,
message: 'Please Select'
}]
// type: [{
// required: true,
// message: 'Please Select'
// }]
}
}
},

@ -37,6 +37,17 @@
</div>
</div>
</template>
<template v-slot:source>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Source
</div>
<div class="xy-table-item-content">
<el-input placeholder="Please Input" style="width:100%" v-model="form.source"></el-input>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -109,7 +120,7 @@
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.specific_sample" placeholder="Please Select">
<el-option v-for="item in appSpecialList" :key="item.id" :label="item.value"
<el-option v-for="item in appSpecialList" :key="item.id" :label="item.name"
:value="item.id">
</el-option>
</el-select>
@ -154,6 +165,7 @@
application_ids:[],
year: "",
title: "",
source:'',
date:'',
link: '',
product_numbers: [],
@ -286,6 +298,7 @@
application_ids:[],
year: "",
title: "",
source:'',
date:'',
link: '',
product_numbers: [],

@ -30,14 +30,40 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Picture
</div>
<div class="xy-table-item-content">
<el-upload :action="action" :limit='1' class='upload-demo' :file-list="filesList"
<!-- <el-upload :action="action" :limit='1' class='upload-demo' :file-list="filesList"
ref="pictureUpload" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
:on-remove="handleRemove">
<el-button size="small" type="primary">upload</el-button>
</el-upload> -->
<el-upload :action="action" class='upload-demo' :limit="1" list-type="picture-card"
accept=".PNG,.jpg,.jpeg,.bmp,.svg" :data="uploadOther" :file-list="filesList" ref="pictureUpload" :auto-upload="true"
:on-success="handlesuccess" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</div>
</div>
</template>
<template v-slot:video_pics>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Video Picture
</div>
<div class="xy-table-item-content">
<!-- <el-upload :action="action" class='upload-demo' :file-list="videosPicList"
ref="pictureUpload" :auto-upload="true" :data="uploadOther" :on-success="handlesuccessVp"
:on-remove="handleRemoveVp">
<el-button size="small" type="primary">upload</el-button>
</el-upload> -->
<el-upload :action="action" class='upload-demo' list-type="picture-card"
accept=".PNG,.jpg,.jpeg,.bmp,.svg" :data="uploadOther" :file-list="videosPicList" ref="pictureUpload" :auto-upload="true"
:on-success="handlesuccessVp" :on-remove="handleRemoveVp">
<i class="el-icon-plus"></i>
</el-upload>
</div>
</div>
</template>
<template v-slot:videos>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -103,11 +129,13 @@
},
action: `${process.env.VUE_APP_UPLOAD_API}`,
filesList: [],
videosList:[],
videosList:[],
videosPicList:[],
form: {
title: "",
date:'',
picture: [],
video_pics:[],
videos:[],
introduction: "",
content: ''
@ -141,6 +169,7 @@
handleRemoveV(file, fileList) {
this.videosList = fileList
},
handlesuccessV(response, file, fileList) {
if (response && response.hasOwnProperty('errcode')) {
this.$Message.warning(response.errmsg || '')
@ -148,7 +177,19 @@
return
}
this.videosList = fileList
},
},
handleRemoveVp(file, fileList) {
this.videosPicList = fileList
},
handlesuccessVp(response, file, fileList) {
if (response && response.hasOwnProperty('errcode')) {
this.$Message.warning(response.errmsg || '')
this.videosPicList = []
return
}
this.videosPicList = fileList
},
submit() {
@ -184,6 +225,21 @@
this.form.videos = []
}
let vp_files = []
if (this.videosPicList.length > 0) {
for (var v of this.videosPicList) {
if (v.response) {
vp_files.push(v.response.id)
} else {
vp_files.push(v.id)
}
}
this.form.video_pics = vp_files
} else {
this.form.video_pics = []
}
console.log("this.form", this.form)
// return
@ -232,6 +288,16 @@
})
})
}
if (res.video_pics_details && res.video_pics_details.length > 0) {
this.videosPicList = []
res.video_pics_details.map(item => {
this.videosPicList.push({
name: item.original_name,
id: item.id,
url: item.url
})
})
}
})
}
@ -249,11 +315,13 @@
this.id = ''
this.showWang = false
this.filesList = []
this.videosList = []
this.videosList = []
this.videosPicList = []
this.form = {
title: "",
date:'',
picture: [],
video_pics:[],
videos:[],
introduction: "",
content: ''
@ -269,7 +337,8 @@
<style scoped lang="scss">
::v-deep .title,
::v-deep .date,
::v-deep .picture,
::v-deep .picture,
::v-deep .video_pics,
::v-deep .introduction,
::v-deep .content {
flex-basis: 100%;

Loading…
Cancel
Save