3 changed files with 476 additions and 21 deletions
@ -0,0 +1,245 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" title="详情" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
||||
|
<el-row> |
||||
|
<el-form-item label="联盟图片"> |
||||
|
<img v-if="dataForm.headPic" |
||||
|
:src="dataForm.headPic" |
||||
|
class="avatar"> |
||||
|
</el-form-item> |
||||
|
</el-row> |
||||
|
<el-form-item label="联盟名称"> |
||||
|
{{dataForm.unionName}} |
||||
|
</el-form-item> |
||||
|
<el-form-item label="联系人"> |
||||
|
{{dataForm.contacts}} |
||||
|
</el-form-item> |
||||
|
<el-form-item label="联系电话"> |
||||
|
{{dataForm.phone}} |
||||
|
</el-form-item> |
||||
|
<el-form-item label="排序"> |
||||
|
{{dataForm.sort}} |
||||
|
</el-form-item> |
||||
|
<el-form-item label="联盟简介"> |
||||
|
<el-row style="height: 400px;"> |
||||
|
<tinymce-editor v-model="dataForm.content"></tinymce-editor> |
||||
|
</el-row> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<template slot="footer"> |
||||
|
<el-button @click="visible = false">返回</el-button> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import TinymceEditor from '@/components/tinymce-editor' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
unionName: '', |
||||
|
contacts: '', |
||||
|
phone: '', |
||||
|
content: '', |
||||
|
sort: '', |
||||
|
headPic: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
TinymceEditor |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/heart/volunteerunion/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style> |
||||
|
.avatar-uploader .el-upload { |
||||
|
border: 1px dashed #d9d9d9; |
||||
|
border-radius: 6px; |
||||
|
cursor: pointer; |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: #409eff; |
||||
|
} |
||||
|
.avatar-uploader-icon { |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
line-height: 178px; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.avatar { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
display: block; |
||||
|
} |
||||
|
</style> |
||||
|
<style lang="scss"> |
||||
|
.project-handle { |
||||
|
.el-timeline { |
||||
|
padding-left: 9px; |
||||
|
font-size: 13px; |
||||
|
} |
||||
|
.el-textarea { |
||||
|
width: 600px !important; |
||||
|
} |
||||
|
.el-input { |
||||
|
width: 600px !important; |
||||
|
} |
||||
|
} |
||||
|
.el-form-item__label { |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
</style> |
||||
|
<style lang="scss" scoped> |
||||
|
.project-handle { |
||||
|
width: 100%; |
||||
|
height: calc(100vh - 120px); |
||||
|
background: #ffffff; |
||||
|
box-sizing: border-box; |
||||
|
padding: 10px; |
||||
|
.project-detail { |
||||
|
width: 100%; |
||||
|
height: 49%; |
||||
|
border: 2px solid #ccc; |
||||
|
box-sizing: border-box; |
||||
|
padding: 10px; |
||||
|
padding-top: 20px; |
||||
|
float: left; |
||||
|
margin-bottom: 1%; |
||||
|
position: relative; |
||||
|
.project-detail-tip { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 80px; |
||||
|
height: 30px; |
||||
|
line-height: 30px; |
||||
|
color: #ffffff; |
||||
|
background: #4ac38b; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-form { |
||||
|
width: 58%; |
||||
|
height: 100%; |
||||
|
float: left; |
||||
|
overflow-y: auto; |
||||
|
&::-webkit-scrollbar { |
||||
|
width: 5px; |
||||
|
height: 1px; |
||||
|
} |
||||
|
&::-webkit-scrollbar-thumb { |
||||
|
border-radius: 5px; |
||||
|
background: #ccc; |
||||
|
} |
||||
|
&::-webkit-scrollbar-track { |
||||
|
border-radius: 10px; |
||||
|
background: #fff; |
||||
|
} |
||||
|
} |
||||
|
.container { |
||||
|
width: 40%; |
||||
|
height: 100%; |
||||
|
float: right; |
||||
|
.location { |
||||
|
height: 30px; |
||||
|
line-height: 30px; |
||||
|
} |
||||
|
#map { |
||||
|
width: 100%; |
||||
|
height: calc(100% - 30px); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.project-progress { |
||||
|
width: 20%; |
||||
|
height: 100%; |
||||
|
float: right; |
||||
|
border: 2px solid #ccc; |
||||
|
box-sizing: border-box; |
||||
|
margin-left: 1%; |
||||
|
padding-top: 20px; |
||||
|
overflow-y: auto; |
||||
|
&::-webkit-scrollbar { |
||||
|
width: 5px; |
||||
|
height: 1px; |
||||
|
} |
||||
|
&::-webkit-scrollbar-thumb { |
||||
|
border-radius: 5px; |
||||
|
background: #aaa; |
||||
|
} |
||||
|
&::-webkit-scrollbar-track { |
||||
|
border-radius: 10px; |
||||
|
background: #ccc; |
||||
|
} |
||||
|
} |
||||
|
.handle-operation { |
||||
|
padding-top: 30px; |
||||
|
box-sizing: border-box; |
||||
|
width: 100%; |
||||
|
height: 49%; |
||||
|
box-sizing: border-box; |
||||
|
border: 2px solid #ccc; |
||||
|
float: left; |
||||
|
position: relative; |
||||
|
overflow-y: auto; |
||||
|
&::-webkit-scrollbar { |
||||
|
width: 5px; |
||||
|
height: 1px; |
||||
|
} |
||||
|
&::-webkit-scrollbar-thumb { |
||||
|
border-radius: 5px; |
||||
|
background: #aaa; |
||||
|
} |
||||
|
&::-webkit-scrollbar-track { |
||||
|
border-radius: 10px; |
||||
|
background: #ccc; |
||||
|
} |
||||
|
.handle-operation-tip { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 80px; |
||||
|
height: 30px; |
||||
|
line-height: 30px; |
||||
|
color: #ffffff; |
||||
|
background: #ff7600; |
||||
|
text-align: center; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue