Compare commits
No commits in common. "c8ee2b85cc16e01add02bbbfbd3b1c04f065f688" and "0c9c441fdc53b62bf6b8782f3476953aaf5f845a" have entirely different histories.
c8ee2b85cc
...
0c9c441fdc
|
@ -51,39 +51,17 @@
|
|||
<el-form-item label="QA内容">
|
||||
<el-input v-model="anchors.content" :rows="6" style="height: 120px" type="textarea" placeholder="QA内容" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="上传行程">
|
||||
<el-form-item label="上传行程">
|
||||
<el-input v-model="anchors.title" type="text" placeholder="请输入旅游路线" />
|
||||
<span style="color: #C03639">(只接受压缩包)</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传图片">
|
||||
<el-input v-model="anchors.title" type="text" placeholder="请输入旅游路线" />
|
||||
<span style="color: #C03639">(只接受压缩包)</span>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-switch v-model="anchors.status" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上传图片">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="admin/index/avatar"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
>
|
||||
<img v-if="imageUrl" :src="imageUrl" class="avatar" alt="">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传行程">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="admin/index/avatar"
|
||||
:show-file-list="false"
|
||||
:on-success="handleSuccess"
|
||||
>
|
||||
<img v-if="imageUrls" :src="imageUrls" class="avatar" alt="">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button v-loading="loading" type="primary" @click="onSave">保 存</el-button>
|
||||
|
@ -114,28 +92,6 @@
|
|||
<el-form-item label="状态">
|
||||
<el-switch v-model="anchors.status" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上传图片">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="admin/index/avatar"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
>
|
||||
<img v-if="imageUrl" :src="imageUrl" class="avatar" alt="">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传行程">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="admin/index/avatar"
|
||||
:show-file-list="false"
|
||||
:on-success="handleSuccess"
|
||||
>
|
||||
<img v-if="imageUrls" :src="imageUrls" class="avatar" alt="">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button v-loading="loading" type="primary" @click="onSave">保 存</el-button>
|
||||
|
@ -168,8 +124,6 @@ export default {
|
|||
dialogCreate: false,
|
||||
dialogEdit: false,
|
||||
item: {},
|
||||
imageUrl:'',
|
||||
imageUrls:'',
|
||||
anchors: {},
|
||||
getQaCitys: {}
|
||||
}
|
||||
|
@ -191,13 +145,6 @@ export default {
|
|||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.imageUrl = URL.createObjectURL(file.raw)
|
||||
console.log(this.imageUrl);
|
||||
},
|
||||
handleSuccess(res, file) {
|
||||
this.imageUrls = URL.createObjectURL(file.raw)
|
||||
},
|
||||
onAdd() {
|
||||
this.anchors = {} // 初始化时默认排序值为0
|
||||
this.dialogCreate = true
|
||||
|
@ -262,24 +209,4 @@ export default {
|
|||
.search {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px solid #131313;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
.avatar-uploader-icon {
|
||||
border: 1px solid #979797;
|
||||
border-radius: 15px;
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue