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) this.$message.warning(res.message)
fileList.pop() fileList.pop()
} }
this.importModalshowflagtemp = false // this.importModalshowflagtemp = false
}, },
//文件上传前 //文件上传前
beforeUpload(file){ beforeUpload(file){
@@ -12,7 +12,9 @@
<div class="row"> <div class="row">
<div class="item" @click="clickButtonTo"> <div class="item" @click="clickButtonTo">
<div style="cursor: pointer;">附件: <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> </div>
</div> </div>
@@ -42,16 +44,30 @@ export default {
checked: '', checked: '',
answererNowUserId: this.$store.getters.userInfo.userId, answererNowUserId: this.$store.getters.userInfo.userId,
answererNowUserName: this.$store.getters.userInfo.userName, answererNowUserName: this.$store.getters.userInfo.userName,
fileList:[],
} }
}, },
methods:{ 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() { clickButtonTo(attId) {
const attId = this.answer.appendixId
this.$preview(attId) this.$preview(attId)
}, },
answerChang(){} answerChang(){}
}, },
mounted () {
this.fileList = this.assemble(this.answer.appendixId,this.answer.appendixName)
},
watch:{ watch:{
answer: { answer: {
immediate: true, immediate: true,
@@ -65,6 +81,9 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/ .fileClass{
line-height: 22px !important;
}
#answer-item{ #answer-item{
width: 100%; width: 100%;
min-width: 130px; min-width: 130px;