Commit 6c6be1ea authored by anxixi's avatar anxixi

Merge remote-tracking branch 'origin/master'

parents f3b79f5d 87000f6f
......@@ -17,6 +17,7 @@
"element-ui": "^2.11.1",
"es6-promise": "^4.2.8",
"html2canvas": "^1.0.0-rc.3",
"image-conversion": "^1.1.9",
"jquery": "^3.4.1",
"js-base64": "^2.5.1",
"js-md5": "^0.7.3",
......
<template>
<div style="text-align: left">
<page-screen class="statebottm" :screenlist="screenlist" :screenchildListIf="true" ref="screenchild" :titleName="$t('indexCount.industryInvolved')" @changecheck="screenData"></page-screen>
<region-choice @changecheck="regionData" ref="regionchild"></region-choice>
<page-screen class="statebottm" :checkboxGroupstate="searchData.companyIndustryList" :screenlist="screenlist" :screenchildListIf="true" ref="screenchild" :titleName="$t('indexCount.industryInvolved')" @changecheck="screenData"></page-screen>
<region-choice @changecheck="regionData" ref="regionchild" :searchReturnData="searchData"></region-choice>
<el-row v-show="downIf">
<page-screen class="statebottm" :screenlist="bigbusinesslevelist" :screenchildListIf="true" ref="bigbusinesslevechild" :titleName="$t('searchResult.targetCooperation')" @changecheck="bigbusinessleveData"></page-screen>
<page-screen class="statebottm" :checkboxGroupstate="searchData.targetIndustryList" :screenlist="bigbusinesslevelist" :screenchildListIf="true" ref="bigbusinesslevechild" :titleName="$t('searchResult.targetCooperation')" @changecheck="bigbusinessleveData"></page-screen>
</el-row>
<el-row style="text-align: center;position:relative;margin-top: 20px">
<span @click="downIf=!downIf" v-if="downIf" style="cursor:pointer;text-align: center;color: #B7BDDE;"><i class="el-icon-arrow-up"></i> {{$t("commonTitle.showUp")}}</span>
......@@ -17,6 +17,11 @@
import api from '../../views/bigbusiness/api/api';
import pageScreen from '../../components/index/Pagescreen';
import regionChoice from '../../components/index/regionchoice';
import {mapState,
mapGetters,
mapMutations,
mapActions
} from 'vuex';
export default {
name : "searchCmpt",
data() {
......@@ -24,7 +29,7 @@
screenlist : [],
bigbusinesslevelist : [],//目标客户行业
downIf:false,//收起展开
stateData:{},
searchData:{}
}
},
components:{
......@@ -33,33 +38,37 @@
methods : {
//行业领域
screenData(a,b){
if(b) this.stateData.companyIndustryList = b;
else this.stateData.companyIndustryList = a?[a]:[];
this.$emit('active',this.stateData);
if(b) this.searchData.companyIndustryList = b;
else this.searchData.companyIndustryList = a?[a]:[];
this.$store.dispatch('saveListPagePars',{path:this.$route.path,pars:this.searchData});
this.$emit('active',this.searchData);
},
//公司总部所在地
regionData(a,b,c){
if(a){
this.stateData.companyNationIds = [1];
this.stateData.companyProvinceIds = b;
this.stateData.companyCityIds = c;
this.searchData.companyNationIds = [1];
this.searchData.companyProvinceIds = b;
this.searchData.companyCityIds = c;
}else{
if(!!b) this.stateData.companyNationIds = b;
if(!!b) {
this.searchData.companyNationIds = b;
}
else {
this.stateData.companyNationIds = [-1];
this.stateData.companyProvinceIds = [];
this.stateData.companyCityIds = [];
this.searchData.companyNationIds = [-1];
this.searchData.companyProvinceIds = [];
this.searchData.companyCityIds = [];
}
}
this.$emit('active',this.stateData);
this.$store.dispatch('saveListPagePars',{path:this.$route.path,pars:this.searchData});
this.$emit('active',this.searchData);
},
//目标客户行业
bigbusinessleveData(a,b){
if(b) this.stateData.targetIndustryList = b;
else this.stateData.targetIndustryList = a?[a]:[];
this.$emit('active',this.stateData);
if(b) this.searchData.targetIndustryList = b;
else this.searchData.targetIndustryList = a?[a]:[];
this.$emit('active',this.searchData);
},
//获取行业领域接口
bigBusinessselect() {
......@@ -70,6 +79,9 @@
item.screenchildList = item.childrenList;
} );
this.screenlist = response.result;
// if(this.screenlist){
// this.returnDataIndustryFunc(this.screenlist)
// }
} else {
this.$message.error( response.msg );
}
......@@ -79,6 +91,26 @@
} );
},
//回填大B所属行业
returnDataIndustryFunc(data){
if(this.searchData.companyIndustryList){
this.searchData.companyIndustryList.forEach((indus)=>{
data.forEach((item,index)=>{
var children = item.childrenList;
children.forEach((son,sonInd)=>{
if (indus==son.industryId){
this.$set(son,"checked",true)
if(son.industryPid==item.industryId){
this.$set(item,"checked",true)
}
}
})
})
})
}
},
//获取目标客户行业
selectBigBusinessLevelOneSet() {
......@@ -101,14 +133,22 @@
this.$refs.screenchild.stateinit();
this.$refs.regionchild.stateinit();
this.$refs.bigbusinesslevechild.stateinit();
this.stateData = {};
this.$emit('active',this.stateData);
this.searchData = {};
this.$emit('active',this.searchData);
},
},
mounted() {
this.bigBusinessselect();
this.selectBigBusinessLevelOneSet();
},
created(){
if(this.$store.state.bigBusinessSearch.has(this.$route.path)) {
this.searchData=this.$store.state.bigBusinessSearch.get(this.$route.path);
}
if(this.$router.name!="bigBusinessList") this.$store.dispatch('saveListPagePars',{path:this.$route.path,pars:{}});
this.$emit('active',this.searchData);
}
}
......
......@@ -244,7 +244,6 @@
}
},
mounted() {
},
watch:{
screenlist(val){
......@@ -266,6 +265,24 @@
}
}
}
var childrenListData = this.screenlist[i].childrenList;
for(var k in this.checkboxGroupstate){
for(var j in childrenListData){
if(this.checkboxGroupstate[k]==childrenListData[j].industryId){
this.$set(childrenListData[j],"checked",true);
this.checkboxGroupchild.push(childrenListData[j].industryId);
this.wholechildck = [];
if(childrenListData[j].industryPid==this.screenlist[i].industryId){
this.screenchildList = this.screenlist[i].childrenList;
this.checkboxIf = true;
this.$set(this.screenlist[i],"checked",true);
this.checkboxGroup.push(this.screenlist[i].industryId);
this.wholecheck = [];
}
}
}
}
}
}
},
......
......@@ -95,6 +95,7 @@
import api from '../../views/innovatecompany/submitprojects/api/api'
export default {
name : "regionchoice",
props:['searchReturnData'],
data() {
return {
checkboxlocation:[],
......@@ -133,6 +134,9 @@
this.screenlist[i].screenchildList[j].checked = false;
}
}
this.cityList.forEach((item)=>{
item.checked = false;
})
this.$emit('changecheck',false,[],null);
},
stateinit(){
......@@ -160,6 +164,11 @@
this.checkprovince = [];
this.cityData = [];
this.provinceck = [this.$t("listproject.unlimited")];
for ( let i in this.provinceData ) {
this.provinceData[i].checked = false;
}
this.$emit('changecheck',true,null,null);
},
citychildClik(){
this.citychildck = [this.$t("listproject.unlimited")];
......@@ -174,12 +183,16 @@
item.checked = false;
} );
this.overseas = [];
this.$emit('changecheck',false,null,null);
},
//选择省份
checkboxprovince() {
// this.provinceIf = false;
this.provinceck = [];
if ( this.checkprovince.length > 1 ) {
this.checkprovince.shift();
}else if(this.checkprovince.length==0){
this.provinceck = [this.$t("listproject.unlimited")];
}
for ( let i in this.provinceData ) {
if ( this.provinceData[i].geoId == this.checkprovince[0] ) {
......@@ -294,6 +307,57 @@
return false;
});
},
},
mounted(){
if(this.searchReturnData){
if(this.searchReturnData.companyNationIds){
this.wholecheck = [];
if(this.searchReturnData.companyNationIds[0]==1) {
this.$set(this.cityList[0],"checked",true)
this.$set(this.checkboxlocation,0,this.$t("Otherjson.domestic"))
this.wholecheck = [];
this.overseas = [];
this.provinceIf = true;
this.countryIf = true;
this.checkboxIf = false;
this.getCityList(1);
if(this.searchReturnData.companyProvinceIds&&this.searchReturnData.companyProvinceIds.length>0){
this.searchReturnData.companyProvinceIds.forEach((item)=>{
this.checkprovince.push(item);
})
this.provinceck = [];
this.$emit('changecheck',true,this.checkprovince,null);
}else{
this.$emit('changecheck',true,null,null);
}
}else{
this.$set(this.cityList[1],"checked",true);
this.$set(this.checkboxlocation,0,this.$t("Otherjson.overseas"));
this.wholecheck = [];
this.checkprovince = [];
this.checkcity = [];
this.checkboxIf = true;
this.countryIf = false;
this.getNationList();
if(this.searchReturnData.companyNationIds[0]!=-1){
this.countryck = [];
this.searchReturnData.companyNationIds.forEach((item)=>{
this.overseas.push(item);
})
this.$emit('changecheck',false,this.overseas,null);
}else{
this.$emit('changecheck',false,null,null);
}
}
}
}
},
watch:{
searchReturnData(val){
}
}
}
</script>
......
......@@ -4,13 +4,31 @@ import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
state: {
stateData: {},
bigBusinessSearch:new Map(),
},
mutations: {
someMutation(state,data) {
state.stateData = data;
},
},
mutations: {
SAVE_LIST_PAGE_PARS:(state,{path,pars})=>{
state.bigBusinessSearch.set(path,pars);
}
},
actions: {
getStateData2(context) {
return context.commit('someMutation');
},
},
actions: {
}
saveListPagePars: ({ commit },{path,pars}) => {
commit('SAVE_LIST_PAGE_PARS',{ path,pars });
},
},
getters:{
getStateData(state){
return state.stateData
}
}
})
<template>
<div class="overfolowWrapper">
<div style="overflow: auto;padding-top: 1.3rem">
<breadTop :title="title" :isSearch="false" :isColor="false" :isReturn="true" :isTranslate="false"></breadTop>
<div class="shareMain">
<div style="padding:0 .4rem;">
<el-form :label-position="labelPosition" ref="ruleForm" :rules="rules" :model="ruleForm" class="auth-ruleForm">
<el-form-item :label="$t('personalAuth.name')+':'" prop="empName">
<el-input v-model="ruleForm.empName" :placeholder="$t('personalAuth.placeholderName')"
......@@ -48,10 +48,10 @@
<!--<div class="list-default-img" v-show="isPhoto" @click.stop="addPic">-->
<!--&lt;!&ndash;<img src="./images/icon_photo.png" />&ndash;&gt;-->
<!--<span>请选择或者拍照上传照片</span>-->
<!--<input accept="image/png,image/jpg" type="file" capture="camera" @change="onFileChange" multiple/>-->
<!--&lt;!&ndash;<input type="file" accept="image/jpeg,image/jpg,image/png" capture="camera" @change="onFileChange" style="display: none;">&ndash;&gt;-->
<!--&lt;!&ndash;<img src="./images/icon_photo.png" />&ndash;&gt;-->
<!--<span>请选择或者拍照上传照片</span>-->
<!--<input accept="image/png,image/jpg" type="file" capture="camera" @change="onFileChange" multiple/>-->
<!--&lt;!&ndash;<input type="file" accept="image/jpeg,image/jpg,image/png" capture="camera" @change="onFileChange" style="display: none;">&ndash;&gt;-->
<!--</div>-->
......@@ -112,6 +112,7 @@
import 'babel-polyfill'; // es6 shim
import imageCrop from '../../../components/mobile/imgCrop';
import lrz from 'lrz'
import imageConversion from 'image-conversion'
// import Exif from '../../../../public/js/exif';
export default {
name: "addAuth",
......@@ -365,12 +366,12 @@
var nameArr = file.name.split('.');
const isPng = nameArr[nameArr.length - 1] === 'png';
const isJpg = nameArr[nameArr.length - 1] === 'jpg';
// const isJpeg = nameArr[nameArr.length - 1] === 'jpeg';
const isJpeg = nameArr[nameArr.length - 1] === 'jpeg';
const isPNG = nameArr[nameArr.length - 1] === 'PNG';
const isJPG = nameArr[nameArr.length - 1] === 'JPG';
// const isJPEG = nameArr[nameArr.length - 1] === 'JPEG';
const isJPEG = nameArr[nameArr.length - 1] === 'JPEG';
const isLt2M = file.size / 1024 / 1024 <= 2;
if (!isPNG && !isJPG && !isPng && !isJpg) {
if (!isPNG && !isJPG && !isPng && !isJpg && !isJpeg && !isJPEG) {
this.isShowErrorText1 = false;
this.isShowErrorText2 = true;
this.isShowErrorText3 = false;
......@@ -380,13 +381,18 @@
return false;
}
if (!isLt2M) {
this.isShowErrorText1 = false;
this.isShowErrorText2 = false;
this.isShowErrorText3 = true;
this.isShowErrorText4 = false;
this.isShowErrorText5 = false;
// this.isShowErrorText1 = false;
// this.isShowErrorText2 = false;
// this.isShowErrorText3 = true;
// this.isShowErrorText4 = false;
// this.isShowErrorText5 = false;
// this.$toast('上传图片大小不能超过 2MB!');
return false;
// return false;
return new Promise((resolve, reject) => {
imageConversion.compressAccurately(file, 400).then(res => { // console.log(res)
resolve(res)
})
})
} else {
this.flag = 1;
this.isShowErrorText1 = false;
......@@ -472,10 +478,6 @@
</script>
<style scoped lang="scss">
.shareMain{
padding: 1rem .6rem;
padding-bottom: 0;
}
.authyzcodeItem {
position: relative;
margin-bottom: 0 !important;
......
......@@ -30,6 +30,6 @@
width: 100%;
position: absolute;
top: 1rem;
overflow: hidden;
/*overflow: hidden;*/
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment