feat: There is no way the, bug #55865

This commit is contained in:
396572590@qq.com
2022-06-20 18:05:40 +08:00
parent 9f483a92ec
commit 5467c4ce7c
2 changed files with 23 additions and 4 deletions
@@ -136,7 +136,7 @@ export default {
this.$message.warning(res.message)
fileList.pop()
}
this.importModalshowflagtemp = false
// this.importModalshowflagtemp = false
},
//文件上传前
beforeUpload(file){
@@ -12,7 +12,9 @@
<div class="row">
<div class="item" @click="clickButtonTo">
<div style="cursor: pointer;">附件
<span style="color: #409EFF">{{answer.appendixName}}</span>
<div v-if="fileList.length > 0" v-for="(item,index) in fileList" :key="index" style="color: #409eff;cursor:pointer;margin-left: 40px;" class="fileClass">
<span style="" @click="clickButtonTo(item.id)" :title="item.name"> {{ item.name }}</span>
</div>
</div>
</div>
</div>
@@ -42,16 +44,30 @@ export default {
checked: '',
answererNowUserId: this.$store.getters.userInfo.userId,
answererNowUserName: this.$store.getters.userInfo.userName,
fileList:[],
}
},
methods:{
assemble(ids,names){
let list= [];
if(ids && ids !== '' && names && names !== ''){
let idArray=ids.split(',');
let nameArray=names.split(',');
for(let i=0; i<idArray.length; i++){
list.push({id:idArray[i],name:nameArray[i]});
}
}
return list;
},
//点击预览
clickButtonTo() {
const attId = this.answer.appendixId
clickButtonTo(attId) {
this.$preview(attId)
},
answerChang(){}
},
mounted () {
this.fileList = this.assemble(this.answer.appendixId,this.answer.appendixName)
},
watch:{
answer: {
immediate: true,
@@ -65,6 +81,9 @@ export default {
</script>
<style lang="less" scoped>
/deep/ .fileClass{
line-height: 22px !important;
}
#answer-item{
width: 100%;
min-width: 130px;