Commit a9c0e924 authored by Mac's avatar Mac

图文

parent 5191ca5c
......@@ -19,7 +19,7 @@
</div>
<q-img :src="x.ImageModel && x.ImageModel.ImagePath?x.ImageModel.ImagePath:''" class="imgstyle">
<div class="absolute-bottom text-subtitle1 text-center onetext"
style="padding: 0;padding: 0 5px;font-size: 12px;" v-if='x.ImageModel'>
style="padding: 0;padding: 0 5px;font-size: 12px;" >
{{x.ImageModel.ImageName}}
</div>
</q-img>
......
......@@ -18,68 +18,28 @@
<i class="el-icon-edit-outline" style="font-size: 20px;color: #1890ff;"
@click.stop="goedit(x)"></i>
</div>
<q-img :src="x.Content" class="imgstyle">
<q-img :src="x.ImgTextModel && x.ImgTextModel.ImgPath?x.ImgTextModel.ImgPath:''" class="imgstyle">
<div class="absolute-bottom text-subtitle1 text-center onetext"
style="padding: 0;padding: 0 5px;font-size: 12px;">
{{x.title}}
{{x.ImgTextModel.Title}}
</div>
</q-img>
<div class="onetext" style="margin-top: 5px;">上传者:{{x.CreatorName}}</div>
<div class="onetext" style="margin-top: 5px;">来源:{{x.source}}</div>
<div class="onetext" style="margin-top: 5px;">上传者:{{x.UpdateByName}}</div>
<div class="onetext" style="margin-top: 5px;">分钟:{{x.MediumGroupName}}</div>
</q-card-section>
</q-card>
<div style="width: 100%;height: 50px;line-height: 50px;text-align: center;" v-if="dataList.length==0">暂无数据</div>
</div>
</div>
<q-dialog v-model="Isadd" persistent>
<q-card style="width: 520px; max-width: 80vw;">
<q-card-section>
<div class="text-h6">新建图文</div>
</q-card-section>
<q-separator />
<q-card-section class="q-pt-none" style="margin-top: 15px;padding: 20px;">
<q-select filled stack-label option-value="ID" option-label="Name" v-model="addMsg.classifyId"
ref="ID" :options="classifyList" label="分组" :dense="false" emit-value map-options />
<div style="margin-top: 15px;">
<div style="width:70px">上传图片:</div>
<div style="margin-top: 15px;">
<el-upload class="avatar-uploader materialupload" action="" :before-upload="uploadFile"
accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp" :show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon" style="font-size: 30px;"
v-if="addMsg.img==''"></i>
<q-img v-else :src="addMsg.img"
style="width: 110px;height: 110px;border-radius: 6px;display: flex;">
</q-img>
</el-upload>
<div style="margin-top: 20px;">
图片大小不超过2M,图片名不能重复,支持JPG,JPEG及PNG格式
</div>
<q-input clearable standout="bg-primary text-white" v-model="addMsg.title" label="添加标题"
style="margin-top: 20px;" />
<q-input clearable standout="bg-primary text-white" v-model="addMsg.content" type="textarea"
label="添加描述" style="margin-top: 20px;" />
<q-input clearable standout="bg-primary text-white" v-model="addMsg.link"
label="请输入跳转链接,且必须以http://或https://开头" style="margin-top: 20px;" />
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="Isadd = false" />
<q-btn color="accent" class="q-mr-md" label="添加" @click="submit()" />
</q-card-actions>
</q-card>
</q-dialog>
<div v-if="Isadd==true">
<alladdsc :allclassifyList="allclassifyList" type='3' @editsuccess="getchildren" :editobj='editobj' @getcancel='Isadd=false'></alladdsc>
</div>
</div>
</template>
<script>
import {
UploadSelfFile
} from "../../../api/common/common"; //上传图片
import alladdsc from './allAddSC'
export default {
name: "imgtextmaterial",
......@@ -104,7 +64,6 @@
}
},
created() {
},
methods: {
......@@ -118,9 +77,8 @@
this.editobj.Id = row.Id;
this.editobj.MediaGroupId = row.MediaGroupId;
this.editobj.Type = row.Type;
this.editobj.ImageModel = JSON.parse(JSON.stringify(row.ImageModel)) ;
this.editobj.ImgTextModel = JSON.parse(JSON.stringify(row.ImgTextModel)) ;
this.Isadd = true
console.log(row)
},
getchildren(){
this.$emit('editsuccess')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment