提交 897ee0a1 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-mvp-20200331' of...

Merge branch 'dev-mvp-20200331' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-mvp-20200331

* 'dev-mvp-20200331' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin:
  上过架的模板项目的开始时间不能编辑
  图片在新建项目或是编辑的时候都是不可以修改的
  选择模板后,项目简介可以编辑
  适配高度的设置
  修改上传图片大小的提示
  更改上传的图片的尺寸
  更改编辑获取的id
......@@ -104,7 +104,7 @@
>
<div class="img-delete" v-show="imgMouseOver && !disabled" @click.stop="deleteImg(1)" @mouseout.stop="imgMouseOver=false"><i class="el-icon-delete"></i></div>
<div class="limit-text">
<p>尺寸:48*48</p>
<p>尺寸:230*172</p>
<p>限制大小: 500Kb</p>
<p>支持.jpg,.png格式</p>
</div>
......@@ -434,8 +434,8 @@ export default {
//上传列表图片
beforeUploadListPic(file) {
let fileLimit = {
width: 48,
height: 48,
width: 230,
height: 172,
size: 0.5,
sizeText: "500K",
key: "attachmentUrl1",
......@@ -450,10 +450,6 @@ export default {
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (file.width != fileLimit.width || file.height != fileLimit.height) {
vm.$message.error("图片不符合规范,请根据规范上传图片");
return;
}
if (!isJPG && !isPNG) {
vm.$message.error("图片不符合规范,请根据规范上传图片");
return;
......@@ -468,10 +464,10 @@ export default {
let image = new Image();
image.src = theFile.target.result;
image.onload = function() {
let _vm = vm;
if ( false
// _vm.width != fileLimit.width ||
// _vm.height != fileLimit.height
let _vm = this;
if (
_vm.width != fileLimit.width ||
_vm.height != fileLimit.height
) {
vm.$message.error("图片不符合规范,请根据规范上传图片");
} else {
......
......@@ -59,6 +59,7 @@
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions0"
style="width: 100%;"
:disabled="formData.status4Flag == 1"
></el-date-picker>
</el-form-item>
</el-col>
......@@ -90,7 +91,7 @@
action="#"
:show-file-list="false"
:before-upload="beforeUploadListPic"
:disabled="disabled"
disabled
>
<img v-if="formData.attachmentUrl1" @mouseover.stop="imgMouseOver=true" :src="formData.attachmentUrl1" class="bg-img">
<img
......@@ -98,9 +99,9 @@
class="bg-img"
src="../../../assets/image/small.png"
>
<div class="img-delete" v-show="imgMouseOver && !disabled" @click.stop="deleteImg(1)" @mouseout.stop="imgMouseOver=false"><i class="el-icon-delete"></i></div>
<div class="img-delete" v-show="imgMouseOver && false" @click.stop="deleteImg(1)" @mouseout.stop="imgMouseOver=false"><i class="el-icon-delete"></i></div>
<div class="limit-text">
<p>尺寸:48*48</p>
<p>尺寸:230*172</p>
<p>限制大小: 500Kb</p>
<p>支持.jpg,.png格式</p>
</div>
......@@ -114,7 +115,7 @@
size="small"
v-model="formData.type"
@change="changeCover"
:disabled="disabled"
disabled
>
<el-radio :label="1">图片</el-radio>
<el-radio :label="2">视频</el-radio>
......@@ -130,7 +131,7 @@
action="#"
:show-file-list="false"
:before-upload="beforeUploadCoverPic"
:disabled="disabled"
disabled
>
<img
v-if="formData.type == 1 && formData.attachmentUrl2"
......@@ -152,7 +153,7 @@
class="bg-img"
src="../../../assets/image/small.png"
>
<div class="img-delete" v-show="imgMouseOver2 && !disabled" @click.stop="deleteImg(2)" @mouseout.stop="imgMouseOver2=false"><i class="el-icon-delete"></i></div>
<div class="img-delete" v-show="imgMouseOver2 && false" @click.stop="deleteImg(2)" @mouseout.stop="imgMouseOver2=false"><i class="el-icon-delete"></i></div>
<div v-show="formData.type == 1" class="limit-text">
<p>尺寸:750*420</p>
<p>限制大小: 2.0 Mb</p>
......@@ -177,7 +178,6 @@
placeholder="请输入项目简介"
v-model="formData.projectIntro"
style="width:83%;"
:disabled="disabled"
></el-input>
<span class="word-num">{{(formData.projectIntro).replace(/\s+/g,"").length}}/200</span>
</el-col>
......@@ -240,6 +240,7 @@ export default {
type: 1, //封面类型 1图片2视频
projectStatus: 3, //1.草稿 2.未上架 3.审核中/待审核 4.已上架 5.已下架 6.已拒绝/未上架
expireDay: 1, //模板有效期(天)
status4Flag: 0, //0表示没有上过架,1表示上过架
attachmentUrl1: "",
attachmentUrl2: "",
attachmentUrl3: "",
......@@ -448,8 +449,8 @@ export default {
//上传列表图片
beforeUploadListPic(file) {
let fileLimit = {
width: 48,
height: 48,
width: 230,
height: 172,
size: 0.5,
sizeText: "500K",
key: "attachmentUrl1",
......@@ -463,10 +464,6 @@ export default {
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (file.width != fileLimit.width || file.height != fileLimit.height) {
vm.$message.error("图片不符合规范,请根据规范上传图片");
return;
}
if (!isJPG && !isPNG) {
vm.$message.error("图片不符合规范,请根据规范上传图片");
return;
......@@ -481,10 +478,10 @@ export default {
let image = new Image();
image.src = theFile.target.result;
image.onload = function() {
let _vm = vm;
if ( false
// _vm.width != fileLimit.width ||
// _vm.height != fileLimit.height
let _vm = this;
if (
_vm.width != fileLimit.width ||
_vm.height != fileLimit.height
) {
vm.$message.error("图片不符合规范,请根据规范上传图片");
} else {
......
......@@ -65,6 +65,7 @@ import selectTemplate from "../../components/education/template/selectTemplate";
import selectRegion from "../../components/education/template/selectRegion";
import setOrganization from "../../components/education/template/setOrganization";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
export default {
data() {
return {
......@@ -106,6 +107,9 @@ export default {
this.getBaseMessage()
}
},
mounted() {
commonUtil.resizeHeight();
},
methods: {
//用于存储基本信息
nextStep() {
......
......@@ -146,7 +146,7 @@ export default {
methods: {
isEditorFn(){
if(vm.$route.query.projectId) {
vm.projectId = vm.$route.query.id;
vm.projectId = vm.$route.query.projectId;
vm.editor = true;
vm.active = 1;
vm.canNext = true;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册