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

修改逻辑

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