修改图片和视频接口
This commit is contained in:
parent
59566ffc61
commit
0af6c362b2
@ -2,10 +2,7 @@
|
||||
ENV = 'development'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://syy.xunyingcloud.cn'
|
||||
# VUE_APP_BASE_API = 'http://121.37.139.13:8080'
|
||||
#VUE_APP_BASE_API = 'http://localhost:20010/'
|
||||
|
||||
VUE_APP_BASE_API = 'https://0511syy.cn'
|
||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
|
||||
# It only does one thing by converting all import() to require().
|
||||
|
@ -2,5 +2,5 @@
|
||||
ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://syy.xunyingcloud.cn'
|
||||
VUE_APP_BASE_API = 'https://0511syy.cn'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="30">
|
||||
<el-col v-bind="grid">
|
||||
@ -34,12 +34,12 @@
|
||||
<span
|
||||
class="custom-tree-node-label"
|
||||
:title="node.label"
|
||||
>{{ node.label }}</span
|
||||
>{{ node.label }}</span
|
||||
>
|
||||
<span
|
||||
v-if="data.space_property_name"
|
||||
style="font-size: 11px; color: #3889b1"
|
||||
>({{ data.name }})</span
|
||||
>({{ data.name }})</span
|
||||
>
|
||||
</div>
|
||||
<span class="el-ic">
|
||||
@ -51,7 +51,7 @@
|
||||
<el-dropdown-item
|
||||
@click.native="onAdd(data.id)"
|
||||
v-if="checkPermi(['admin:category:save'])"
|
||||
>添加分类</el-dropdown-item
|
||||
>添加分类</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item
|
||||
v-if="
|
||||
@ -59,7 +59,7 @@
|
||||
checkPermi(['admin:category:update'])
|
||||
"
|
||||
@click.native="onEdit(data.id)"
|
||||
>编辑分类</el-dropdown-item
|
||||
>编辑分类</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item
|
||||
v-if="
|
||||
@ -67,7 +67,7 @@
|
||||
checkPermi(['admin:category:delete'])
|
||||
"
|
||||
@click.native="handleDelete(data.id)"
|
||||
>删除分类</el-dropdown-item
|
||||
>删除分类</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@ -88,7 +88,8 @@
|
||||
type="primary"
|
||||
class="mr15 mb20"
|
||||
@click="checkPics"
|
||||
>使用选中图片</el-button
|
||||
>使用选中图片
|
||||
</el-button
|
||||
>
|
||||
<div class="mb20">
|
||||
<el-tooltip
|
||||
@ -140,9 +141,7 @@
|
||||
:show-file-list="false"
|
||||
multiple
|
||||
>
|
||||
<el-button class="mr10" type="primary" v-if="pictureType"
|
||||
>上传图片</el-button
|
||||
>
|
||||
<el-button class="mr10" type="primary" v-if="pictureType">上传{{typeDate =='pic'?'图片':'视频'}}</el-button>
|
||||
</el-upload>
|
||||
<div>
|
||||
<el-button
|
||||
@ -150,7 +149,8 @@
|
||||
type="danger"
|
||||
@click.stop="editPicList('图片')"
|
||||
v-if="pictureType"
|
||||
>删除图片</el-button
|
||||
>删除{{typeDate =='pic'?'图片':'视频'}}
|
||||
</el-button
|
||||
>
|
||||
</div>
|
||||
<el-select
|
||||
@ -179,9 +179,9 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="abs_video">
|
||||
<el-radio-group v-model="typeDate" @change="radioChange" size="small">
|
||||
<el-radio-button label="pic">图片</el-radio-button>
|
||||
<el-radio-button label="video">视频</el-radio-button>
|
||||
<el-radio-group v-model="typeDate" @change="radioChange" size="small">
|
||||
<el-radio-button label="pic">图片</el-radio-button>
|
||||
<el-radio-button label="video">视频</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -202,7 +202,7 @@
|
||||
:key="index"
|
||||
class="gridPic"
|
||||
>
|
||||
<span class="num_badge" v-if="item.num > 0">{{item.num}}</span>
|
||||
<span class="num_badge" v-if="item.num > 0">{{ item.num }}</span>
|
||||
<img
|
||||
style="object-fit: contain;"
|
||||
v-lazy="item.sattDir ? item.sattDir : localImg"
|
||||
@ -278,14 +278,15 @@
|
||||
},
|
||||
]"
|
||||
>
|
||||
<el-input v-model="editPram.name" placeholder="分类名称" />
|
||||
<el-input v-model="editPram.name" placeholder="分类名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序">
|
||||
<el-input-number v-model="editPram.sort" />
|
||||
<el-input-number v-model="editPram.sort"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handlerSubmit('editPram')"
|
||||
>确定</el-button
|
||||
>确定
|
||||
</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -306,10 +307,10 @@ import {
|
||||
fileImageApi,
|
||||
fileListApi,
|
||||
fileDeleteApi,
|
||||
attachmentMoveApi,
|
||||
attachmentMoveApi, fileFileApi,
|
||||
} from "@/api/systemSetting";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { checkPermi } from "@/utils/permission"; // 权限判断函数
|
||||
import {getToken} from "@/utils/auth";
|
||||
import {checkPermi} from "@/utils/permission"; // 权限判断函数
|
||||
export default {
|
||||
name: "Upload",
|
||||
props: {
|
||||
@ -388,7 +389,7 @@ export default {
|
||||
attType: "jpg,jpeg,gif,png,bmp,PNG,JPG",
|
||||
},
|
||||
classifyId: 0,
|
||||
myHeaders: { "X-Token": getToken() },
|
||||
myHeaders: {"X-Token": getToken()},
|
||||
treeFrom: {
|
||||
status: -1,
|
||||
type: 2,
|
||||
@ -410,7 +411,7 @@ export default {
|
||||
},
|
||||
localImg: "",
|
||||
videoStatus: false,
|
||||
typeDate:"pic",
|
||||
typeDate: "pic",
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -460,15 +461,15 @@ export default {
|
||||
if (this.editPram.pid == 10000) this.editPram.pid = 0;
|
||||
this.bizTitle === "添加分类"
|
||||
? addCategroy(this.editPram).then((data) => {
|
||||
this.$message.success("创建成功");
|
||||
this.visible = false;
|
||||
this.getList();
|
||||
})
|
||||
this.$message.success("创建成功");
|
||||
this.visible = false;
|
||||
this.getList();
|
||||
})
|
||||
: updateCategroy(this.editPram).then((data) => {
|
||||
this.$message.success("编辑成功");
|
||||
this.visible = false;
|
||||
this.getList();
|
||||
});
|
||||
this.$message.success("编辑成功");
|
||||
this.visible = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -524,7 +525,7 @@ export default {
|
||||
if (id === 10000) id = 0;
|
||||
this.bizTitle = "编辑分类";
|
||||
this.loading = true;
|
||||
infoCategroy({ id: id }).then((res) => {
|
||||
infoCategroy({id: id}).then((res) => {
|
||||
this.editPram = res;
|
||||
this.loading = false;
|
||||
});
|
||||
@ -534,7 +535,7 @@ export default {
|
||||
handleDelete(id) {
|
||||
if (id === 10000) id = 0;
|
||||
this.$modalSure().then(() => {
|
||||
deleteCategroy({ id: id }).then(() => {
|
||||
deleteCategroy({id: id}).then(() => {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
});
|
||||
@ -559,16 +560,28 @@ export default {
|
||||
spinner: "el-icon-loading",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
});
|
||||
fileImageApi(formData, data)
|
||||
.then((res) => {
|
||||
loading.close();
|
||||
this.$message.success("上传成功");
|
||||
this.tableData.page = 1;
|
||||
this.getFileList();
|
||||
})
|
||||
.catch((res) => {
|
||||
|
||||
if (this.typeDate =='pic'){
|
||||
fileImageApi(formData, data)
|
||||
.then((res) => {
|
||||
loading.close();
|
||||
this.$message.success("上传成功");
|
||||
this.tableData.page = 1;
|
||||
this.getFileList();
|
||||
}).catch((res) => {
|
||||
loading.close();
|
||||
});
|
||||
}else {
|
||||
fileFileApi(formData, data)
|
||||
.then((res) => {
|
||||
loading.close();
|
||||
this.$message.success("上传成功");
|
||||
this.tableData.page = 1;
|
||||
this.getFileList();
|
||||
}).catch((res) => {
|
||||
loading.close();
|
||||
});
|
||||
}
|
||||
},
|
||||
// 文件列表
|
||||
getFileList() {
|
||||
@ -707,10 +720,10 @@ export default {
|
||||
this.getFileList();
|
||||
}
|
||||
},
|
||||
radioChange(val){
|
||||
if(val === 'video'){
|
||||
radioChange(val) {
|
||||
if (val === 'video') {
|
||||
this.videoChange(true)
|
||||
}else{
|
||||
} else {
|
||||
this.videoChange(false)
|
||||
}
|
||||
}
|
||||
@ -729,26 +742,32 @@ export default {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.temp {
|
||||
height: 0;
|
||||
margin-bottom: 0;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.selectTreeClass {
|
||||
background: #d5e8fc;
|
||||
}
|
||||
|
||||
.treeBox {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.upload-demo {
|
||||
display: inline-block !important;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.tree_w {
|
||||
padding: 20px 30px;
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@ -758,6 +777,7 @@ export default {
|
||||
padding-right: 8px;
|
||||
color: #4386c6;
|
||||
}
|
||||
|
||||
.custom-tree-node-label {
|
||||
display: block;
|
||||
width: 125px;
|
||||
@ -765,97 +785,119 @@ export default {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.el-ic {
|
||||
display: none;
|
||||
|
||||
i,
|
||||
span {
|
||||
/*padding: 0 14px;*/
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.svg-icon {
|
||||
color: #4386c6;
|
||||
}
|
||||
}
|
||||
|
||||
.el-tree-node__content {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.el-tree-node__expand-icon {
|
||||
color: #428bca;
|
||||
/*padding: 10px 10px 0px 10px !important;*/
|
||||
}
|
||||
|
||||
.el-tree-node__content:hover .el-ic {
|
||||
color: #428bca !important;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.el-tree-node__content:hover {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.el-tree--highlight-current
|
||||
.el-tree-node.is-current
|
||||
> .el-tree-node__content
|
||||
:hover {
|
||||
.el-tree-node.is-current
|
||||
> .el-tree-node__content
|
||||
:hover {
|
||||
.el-tree-node__expand-icon.is-leaf {
|
||||
color: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/*background-color: #3998d9;*/
|
||||
.custom-tree-node {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.el-tree-node__expand-icon {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
.upload-container .image-preview .image-preview-wrapper img {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.el-dialog .el-collapse-item__wrap {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
.spatial_img {
|
||||
.el-collapse-item__wrap {
|
||||
margin-bottom: 0;
|
||||
padding-top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-container .image-preview .image-preview-wrapper {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.upload-container .image-preview .image-preview-action {
|
||||
line-height: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.trees-coadd {
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.scollhide {
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
padding: 10px 0 10px 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.trees {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.scollhide::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.conters {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/*max-height: 296px;*/
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.conters:after {
|
||||
content: "";
|
||||
width: 410px !important;
|
||||
}
|
||||
|
||||
.gridPic {
|
||||
margin-right: 15px;
|
||||
margin-bottom: 10px;
|
||||
@ -863,16 +905,19 @@ export default {
|
||||
height: 110px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.num_badge {
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
@ -888,31 +933,38 @@ export default {
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.conter {
|
||||
width: 99%;
|
||||
height: 100%;
|
||||
|
||||
.bnt {
|
||||
width: 100%;
|
||||
padding: 0 13px 10px 7px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.pictrueList {
|
||||
/*padding-left: 15px;*/
|
||||
width: 100%;
|
||||
|
||||
el-image {
|
||||
width: 100%;
|
||||
border: 2px solid #fff;
|
||||
}
|
||||
|
||||
.on {
|
||||
border: 2px solid #1890FF;
|
||||
}
|
||||
}
|
||||
|
||||
.el-image {
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.imagesNo {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -920,6 +972,7 @@ export default {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 65px 0;
|
||||
|
||||
.imagesNo_sp {
|
||||
font-size: 13px;
|
||||
color: #dbdbdb;
|
||||
@ -927,10 +980,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.relative{
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
.abs_video{
|
||||
|
||||
.abs_video {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user