提交 bdb39f4b 编写于 作者: kai.wang's avatar kai.wang

修改逻辑

上级 2d52f18a
......@@ -18,9 +18,9 @@
<i class="el-icon-delete"></i>
</div>
<div class="limit-text">
<p>尺寸:48*48</p>
<p>限制大小: 500kb</p>
<p>支持.jpg,.png格式</p>
<p></p>
<p>分辨率160*160</p>
<p>支持.jpeg,.png格式</p>
</div>
</el-upload>
</el-form-item>
......@@ -128,7 +128,6 @@
if (!this.formData.headUrl){
this.uploadImgMessage1 = true;
}
debugger
this.$refs[formName].validate(valid => {
if (valid&&this.formData.headUrl!="") {
flag = true;
......@@ -173,10 +172,10 @@
image.src = theFile.target.result;
image.onload = function () {
let _this = this;
if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
// if (false) {
vm.$message.error("图片尺寸不符合规范,请根据规范上传图片");
} else {
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
// // if (false) {
// vm.$message.error("图片尺寸不符合规范,请根据规范上传图片");
// } else {
openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "preview4", "progress1", 1).then(function (path) {
closeLoading(vm);
......@@ -194,7 +193,7 @@
};
vm.$message.success("上传成功");
});
}
// }
};
};
return isJPG && isLt2M;
......
<template>
<el-tabs v-model="activeName">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline" >
<el-form-item label>
<el-cascader size="small" ref="cascaderRegion" :options="optionsRegion" :props="props"
v-model="formOrganization.administrativeIdList" @change="handleChangeRegion" filterable change-on-select
......@@ -46,7 +46,7 @@
</el-tabs>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import { openLoading, closeLoading } from "../../utils/utils";
import { doUpload, getFilePath } from "../../utils/qiniu-util";
import * as operationData from "../../utils/operation";
import { getCircleProvincesReq, getMemberSelectOrgReq,getMemberSelectOrgOptionReq } from '@/utils/yqrange/rangeApi';
......@@ -54,7 +54,7 @@
export default {
name: "organzation",
props: {
formdata: {
formData: {
type: Object,
default: () => {
return {}
......@@ -102,6 +102,7 @@
currentOrganization: 1,
totalOrganization: 10,
pageSizeOrganization: 2,
activeName:"",
formOrganization: {
name: "",
administrativeId: "0",
......@@ -113,19 +114,22 @@
},
}
},
created() {
vm = this;
// debugger
const { enterType, id } = this.$route.query;
this.circleId = id;
mounted() {
debugger
// const { enterType, id } = this.$route.query;
this.circleId = vm.formData.id;
this.initRange();
//Idtype:1,内部 2.外部
vm.idType = localStorage.getItem("storageIdType");
console.log("this.idType:" + vm.idType);
},
created() {
vm = this;
},
methods: {
initRange() {
let circleId = this.circleId;
let circleId = this.formData.id;
this.getRegionOption();
this.listLevels();
this.getOrganization();
......@@ -200,7 +204,6 @@
},
//机构table中勾选一排
selectAllOrganization(selection) {
debugger
let setList = [];
let selectList = [];
for (let i = 0; i < vm.tableOrganization.length; i++) {
......@@ -213,7 +216,6 @@
}
let intersect = operationData.getIntersect(setList, selectList);
let typeStatus = 0;
debugger
if (intersect.length > 0) {
typeStatus = 1;
}
......
......@@ -18,11 +18,11 @@
</el-row>
<div class="first-step" v-if="active === 0">
<p class="p-title">基础信息</p>
<base-info :formData="formData" @returnTypeData="returnTypeData" @returnIsNext="returnIsNext" ref='child'>
<base-info :formData="formData" @returnTypeData="returnTypeData" @returnIsNext="returnIsNext" ref="child">
</base-info>
</div>
<div class="second-step" v-else-if="active === 1">
<organzation></organzation>
<organzation :formData="formData"></organzation>
</div>
</div>
</div>
......@@ -33,7 +33,7 @@
import { openLoading, closeLoading } from "../../utils/utils";
import BaseInfo from '@/components/yqrange/baseinfo.vue';
import Organzation from '@/components/yqrange/organzation.vue';
import { getCircleInfoReq,getMemberSelectOrgSaveReq } from '@/utils/yqrange/rangeApi';
import { getCircleInfoReq, getMemberSelectOrgSaveReq } from '@/utils/yqrange/rangeApi';
export default {
name: "create-range",
components: {
......@@ -51,14 +51,14 @@
//页面展示位置
stepData: [true, false],
formData: {
id:null,
id: null,
name: '',
headUrl: '',
imgUrl1More: {},
imgUrl2More: {},
introduce: '',
dynamicFlag: '',
idType:localStorage.getItem("storageIdType")
idType: localStorage.getItem("storageIdType")
}
}
},
......@@ -69,7 +69,7 @@
const { enterType, id } = this.$route.query;
this.id = id;
this.enterType = enterType;
//edit
if (this.enterType == 2 && this.id != null) {
this.getCircleInfo();
......@@ -82,7 +82,7 @@
// debugger
this.$refs.child.submitForm();
},
//完成
complete() {
console.log(this.formData.id);
......@@ -94,10 +94,10 @@
closeLoading(vm);
if (res.code == "000000") {
this.$message.success('操作成功');
const _this = this;
setTimeout(function () {
_this.$router.go(-1)
}, 2000);
const _this = this;
setTimeout(function () {
_this.$router.go(-1)
}, 2000);
// vm.$router.push({ path: "yq-range" });
} else {
this.$message(res.message);
......@@ -105,23 +105,23 @@
}).catch(err => {
this.$message.error('请求失败');
});
},
returnIsNext(flag){
debugger
if (flag == true){
},
// 修改编辑基础信息
returnIsNext(flag) {
if (flag == true) {
this.commitQuanziInfo();
}
},
}
},
returnTypeData(item) {
this.formData[item.name] = item.val
},
//获取圈子详情
getCircleInfo() {
//获取圈子详情
getCircleInfo() {
getCircleInfoReq(this.id).then(res => {
// closeLoading(this);
if (res.code == "000000") {
this.formData= { ...this.formData, ...res.data };
this.formData = { ...this.formData, ...res.data };
} else {
this.$message(res.message);
}
......@@ -136,8 +136,12 @@
vm.POST("circle/circle/save", req).then(res => {
if (res.code == "000000") {
// console.log(res);
this.active = 1
console.log(this.$refs);
vm.formData.id = res.data;
this.active = 1;
this.stepData = [false, true];
} else {
//
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册