Browse Source

政策修改传参以及入驻企业修改

master
rose 4 years ago
parent
commit
fd0a98d25a
  1. 2
      debug.log
  2. 12
      src/App.vue
  3. 70
      src/components/EntityApply/EntityApplyAdd.vue
  4. 118
      src/components/EntityApply/EntityApplyEdit.vue
  5. 6
      src/components/EntityApply/EntityApplySearch.vue
  6. 8
      src/components/Policy/PolicyEdit.vue

2
debug.log

@ -0,0 +1,2 @@
[0517/095630.764:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
[0517/145027.865:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)

12
src/App.vue

@ -8,7 +8,7 @@
<template> <template>
<a-config-provider :locale="zh_CN"> <a-config-provider :locale="zh_CN">
<div class="d-flex flex-row flex-nowrap" id="app"> <div class="d-flex flex-row flex-nowrap" id="app">
<!-- <btn-con /> --> <btn-con />
<router-view class="flex-1 bg pa-3"></router-view> <router-view class="flex-1 bg pa-3"></router-view>
</div> </div>
</a-config-provider> </a-config-provider>
@ -17,11 +17,11 @@
<script> <script>
import { mapState, mapActions, mapMutations } from 'vuex'; import { mapState, mapActions, mapMutations } from 'vuex';
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN'; import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
// import BtnCon from 'components/BtnCom/BtnCon.vue'; import BtnCon from 'components/BtnCom/BtnCon.vue';
export default { export default {
name: 'App', name: 'App',
// components: { BtnCon }, components: { BtnCon },
data() { data() {
return { zh_CN }; return { zh_CN };
}, },
@ -40,9 +40,9 @@ export default {
created() { created() {
// // // //
// const userId = '1218763410024566784'; const userId = '1218763410024566784';
// const params = { userId }; const params = { userId };
// this.getUserId(params); this.getUserId(params);
const that = this; const that = this;
window.plugin = window.TallPlugin.init(); window.plugin = window.TallPlugin.init();

70
src/components/EntityApply/EntityApplyAdd.vue

@ -101,31 +101,22 @@
<a-input placeholder="请输入申请人职务..." v-model.trim="platform.position" /> <a-input placeholder="请输入申请人职务..." v-model.trim="platform.position" />
</a-form-item> </a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="联系电话" required> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="联系电话" required>
<a-input @change="changePhone" placeholder="请输入联系电话.." type="tel" v-decorator="['tel', { rules: phoneRules }]" /> <a-input
@change="changePhone" placeholder="请输入联系电话.." type="tel"
v-decorator="['tel', { rules: phoneRules,initialValue: platform.tel }]"
/>
</a-form-item> </a-form-item>
<!-- <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="图片验证码" required>
<div class="d-flex flex-nowrap">
<a-input placeholder="图片验证码" type="number" v-model="codeNum" />
<img :src="picCode.imageBase64" @click="changePicCode" class="code_img ml-2" v-if="picCode && picCode.imageBase64" />
<a-button @click="changePicCode" class="code_img ml-2" size="small" v-else>获取验证码</a-button>
</div>
</a-form-item> -->
<!-- <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="短信验证码" required>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入验证码" type="number" v-model="platform.code" />
<a-button class="code_img ml-2" disabled type="primary" v-if="showInterval">重新发送 {{ interval }}</a-button>
<a-button :disabled="platform.isTel === false" @click="getCode" class="code_img ml-2" type="primary" v-else
>获取验证码</a-button
>
</div>
</a-form-item> -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="电子邮箱"> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="电子邮箱">
<!-- 电子邮箱 --> <!-- 电子邮箱 -->
<a-input @change="changeEamil" placeholder="请输入电子邮箱..." type="email" v-decorator="['email', { rules: emailRules }]" /> <a-input @change="changeEamil" placeholder="请输入电子邮箱..." type="email"
v-decorator="['email', { rules: emailRules,initialValue: platform.email }]"
/>
</a-form-item> </a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="身份证号"> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="身份证号" required>
<!-- 身份证号 --> <!-- 身份证号 -->
<a-input @change="changeIdCard" placeholder="请输入身份证号..." v-decorator="['idCard']" /> <a-input @change="changeIdCard" placeholder="请输入身份证号..."
v-decorator="['idCard', { rules: idCardRules,initialValue: platform.idCard }]"
/>
</a-form-item> </a-form-item>
</a-form> </a-form>
<a-steps :current="current"> <a-steps :current="current">
@ -219,17 +210,18 @@ export default {
message: '请输入正确的邮箱格式', message: '请输入正确的邮箱格式',
}, },
], ],
// idCardRules: [ idCardRules: [
// { {
// required: true, required: true,
// pattern: new RegExp(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/), pattern: new RegExp(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/),
// whitespace: true, whitespace: true,
// message: '', message: '请输入身份证号',
// }, },
// ], ],
codeNum: '', codeNum: '',
showInterval: false, showInterval: false,
codeTimer: null, codeTimer: null,
filesUpload: [],
interval: 120, // interval: 120, //
}; };
}, },
@ -342,9 +334,11 @@ export default {
this.$message.error('请输入职务'); this.$message.error('请输入职务');
} else if (this.platform.isTel === false) { } else if (this.platform.isTel === false) {
this.$message.error('请输入联系电话'); this.$message.error('请输入联系电话');
} else if (this.platform.idCard === '') {
this.$message.error('请输入身份证号');
} else { } else {
for (var i = 0; i < this.fileList.length; i++) { for (var i = 0; i < this.fileList.length; i++) {
this.platform.files = this.platform.files.concat(this.fileList[i].response.data[0].id); this.filesUpload = this.filesUpload.concat(this.fileList[i].response.data[0].id);
} }
this.addSettled(); this.addSettled();
} }
@ -360,7 +354,7 @@ export default {
company: this.platform.company, company: this.platform.company,
electricDesign: this.platform.electricDesign, electricDesign: this.platform.electricDesign,
email: this.platform.email, email: this.platform.email,
fileList: this.platform.files, fileList: this.filesUpload,
friendCompany: this.platform.friendCompany, friendCompany: this.platform.friendCompany,
gender: this.platform.sex, gender: this.platform.sex,
idCard: this.platform.idCard, idCard: this.platform.idCard,
@ -372,7 +366,7 @@ export default {
patentGrented: this.platform.patentGrented, patentGrented: this.platform.patentGrented,
patentInvent: this.platform.patentInvent, patentInvent: this.platform.patentInvent,
phone: this.platform.tel, phone: this.platform.tel,
placeType: this.placeType, // store 0:线1:2 placeType: this.placeType, // store 0:1:
plantKind: this.platform.plantKind, plantKind: this.platform.plantKind,
position: this.platform.position, position: this.platform.position,
productTech: this.platform.productTech, productTech: this.platform.productTech,
@ -388,7 +382,6 @@ export default {
// console.log(res); // console.log(res);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { if (code === 200) {
this.$message.success('申请成功');
this.visible = false; this.visible = false;
this.confirmLoading = false; this.confirmLoading = false;
for (let key in this.platform) { for (let key in this.platform) {
@ -397,6 +390,19 @@ export default {
this.platform.isTel = false; this.platform.isTel = false;
this.platform.isEmail = false; this.platform.isEmail = false;
this.platform.isIdCard =false; this.platform.isIdCard =false;
this.platform.buildTime= 0 //
this.platform.registerMoney= 0 //
this.platform.staffCount= 0 //
this.platform.resarchStaff= 0 //
this.platform.juniorCollege =0 //
this.platform.businessIncome = 0 //
this.platform.productTech= 0 //
this.platform.patentApply= 0 //
this.platform.patentGrented= 0 //
this.platform.patentInvent= 0 //
this.platform.sex = 1
this.$emit('getData');
this.$message.success('申请成功');
} else { } else {
throw msg; throw msg;
// console.log('1'); // console.log('1');

118
src/components/EntityApply/EntityApplyEdit.vue

@ -17,8 +17,11 @@
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="成立时间" required> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="成立时间" required>
<!-- 时间选择器时间点 --> <!-- 时间选择器时间点 -->
<!-- <div>{{ platform.buildTime}}</div> --> <!-- <div>{{ platform.buildTime}}</div> -->
<!-- moment($moment(+platform.buildTime).format('YYYY-MM-DD'), 'YYYY-MM-DD') -->
<a-date-picker :default-value="$moment(+platform.buildTime).format('YYYY-MM-DD HH:mm:ss')" @change="changeBirthday" /> <!-- <a-date-picker :default-value="$moment(+platform.buildTime).format('YYYY-MM-DD HH:mm:ss')" @change="changeBirthday" /> -->
<a-date-picker
:default-value="$moment($moment(+platform.buildTime).format('YYYY-MM-DD'), 'YYYY-MM-DD')" @change="changeBirthday"
/>
</a-form-item> </a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="法人代码" required> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="法人代码" required>
<a-input placeholder="请输入法人代码..." v-model.trim="platform.legalPerson" /> <a-input placeholder="请输入法人代码..." v-model.trim="platform.legalPerson" />
@ -78,6 +81,13 @@
<a-input placeholder="请输入合作单位..." v-model.trim="platform.friendCompany" /> <a-input placeholder="请输入合作单位..." v-model.trim="platform.friendCompany" />
</a-form-item> </a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="上传附件"> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="上传附件">
<div v-if="editData.picUrl" class="d-flex align-end">
<img :src="editData.picUrl" style="height:100px;" alt="">
<div>
<a-icon @click="deleteFileList" class="ml-5" type="close-circle" />
</div>
</div>
<a-upload <a-upload
:action="action" :action="action"
:before-upload="beforeUpload" :before-upload="beforeUpload"
@ -89,7 +99,7 @@
<p>1.营业执照复印件尚无注册的无需梯控</p> <p>1.营业执照复印件尚无注册的无需梯控</p>
<p>2.法定代表或授权代表身份证复印件</p> <p>2.法定代表或授权代表身份证复印件</p>
<p>3.主导产品或技术简介</p> <p>3.主导产品或技术简介</p>
<a-button> <a-icon type="upload" />点击上传附件 </a-button> <a-button v-show="fileList.length - 0 === 0"><a-icon type="upload" />点击上传附件 </a-button>
</a-upload> </a-upload>
</a-form-item> </a-form-item>
</a-form> </a-form>
@ -98,11 +108,12 @@
<a-input v-model.trim="platform.companyName" placeholder="请输入公司名称..." /> <a-input v-model.trim="platform.companyName" placeholder="请输入公司名称..." />
</a-form-item>--> </a-form-item>-->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="姓名" required> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="姓名" required>
<a-input placeholder="请输入申请人姓名..." v-model.trim="platform.manName" /> <a-input placeholder="请输入申请人姓名..." v-model.trim="platform.name" />
</a-form-item> </a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="性别" required> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="性别" required>
<!-- 单选 --> <!-- 单选 -->
<a-radio-group v-model="platform.sex"> <a-radio-group v-model="platform.gender">
<a-radio :value="1" style="margin-right: 100px"></a-radio> <a-radio :value="1" style="margin-right: 100px"></a-radio>
<a-radio :value="0"></a-radio> <a-radio :value="0"></a-radio>
</a-radio-group> </a-radio-group>
@ -111,31 +122,22 @@
<a-input placeholder="请输入申请人职务..." v-model.trim="platform.position" /> <a-input placeholder="请输入申请人职务..." v-model.trim="platform.position" />
</a-form-item> </a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="联系电话" required> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="联系电话" required>
<a-input @change="changePhone" placeholder="请输入联系电话.." type="tel" v-decorator="['tel', { rules: phoneRules }]" /> <a-input
@change="changePhone" placeholder="请输入联系电话.." type="tel"
v-decorator="['tel', { rules: phoneRules,initialValue: platform.phone }]"
/>
</a-form-item> </a-form-item>
<!-- <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="图片验证码" required>
<div class="d-flex flex-nowrap">
<a-input placeholder="图片验证码" type="number" v-model="codeNum" />
<img :src="picCode.imageBase64" @click="changePicCode" class="code_img ml-2" v-if="picCode && picCode.imageBase64" />
<a-button @click="changePicCode" class="code_img ml-2" size="small" v-else>获取验证码</a-button>
</div>
</a-form-item> -->
<!-- <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="短信验证码" required>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入验证码" type="number" v-model="platform.code" />
<a-button class="code_img ml-2" disabled type="primary" v-if="showInterval">重新发送 {{ interval }}</a-button>
<a-button :disabled="platform.isTel === false" @click="getCode" class="code_img ml-2" type="primary" v-else
>获取验证码</a-button
>
</div>
</a-form-item> -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="电子邮箱"> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="电子邮箱">
<!-- 电子邮箱 --> <!-- 电子邮箱 -->
<a-input @change="changeEamil" placeholder="请输入电子邮箱..." type="email" v-decorator="['email', { rules: emailRules }]" /> <a-input @change="changeEamil" placeholder="请输入电子邮箱..." type="email"
v-decorator="['email', { rules: emailRules,initialValue: platform.email }]"
/>
</a-form-item> </a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="身份证号"> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="身份证号" required>
<!-- 身份证号 --> <!-- 身份证号 -->
<a-input @change="changeIdCard" placeholder="请输入身份证号..." v-decorator="['idCard']" /> <a-input @change="changeIdCard" placeholder="请输入身份证号..."
v-decorator="['idCard', { rules: idCardRules,initialValue: platform.idCard }]"
/>
</a-form-item> </a-form-item>
</a-form> </a-form>
<a-steps :current="current"> <a-steps :current="current">
@ -192,19 +194,19 @@ export default {
message: '请输入正确的邮箱格式', message: '请输入正确的邮箱格式',
}, },
], ],
// idCardRules: [ idCardRules: [
// { {
// required: true, required: true,
// pattern: new RegExp(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/), pattern: new RegExp(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/),
// whitespace: true, whitespace: true,
// message: '', message: '请输入身份证号',
// }, },
// ], ],
action: upload, action: upload,
platform: {}, platform: {},
current: 0, current: 0,
confirmLoading: false, confirmLoading: false,
filesUpload: []
}; };
}, },
@ -218,6 +220,19 @@ export default {
if( this.platform.buildTime === null){ if( this.platform.buildTime === null){
this.platform.buildTime = 0 this.platform.buildTime = 0
} }
//
if(val.picUrl){
var temp = {
uid: '1',
name: '1.png',
status: 'done',
url: val.picUrl,
thumbUrl: val.picUrl,
}
this.fileList.push(temp)
}
console.log("========>",this.platform) console.log("========>",this.platform)
@ -225,6 +240,16 @@ export default {
}, },
methods: { methods: {
// fileList
deleteFileList(){
console.log("进入事件")
this.fileList = []
this.editData.picUrl = ''
},
beforeUpload(file) { beforeUpload(file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const isLt5M = file.size / 1024 / 1024 < 5; const isLt5M = file.size / 1024 / 1024 < 5;
@ -276,22 +301,21 @@ export default {
this.$message.error('请输入职务'); this.$message.error('请输入职务');
} else if (this.platform.isTel === false) { } else if (this.platform.isTel === false) {
this.$message.error('请输入联系电话'); this.$message.error('请输入联系电话');
} else if(this.platform.email === ''){ } else if(this.platform.gender === undefined){
this.$message.error('请输入邮箱');
} else if(this.platform.sex === undefined){
this.$message.error('请输入申请人性别'); this.$message.error('请输入申请人性别');
} else if (this.platform.idCard === '') {
this.$message.error('请输入身份证号');
} else { } else {
for (var i = 0; i < this.fileList.length; i++) { for (var i = 0; i < this.fileList.length; i++) {
this.platform.files = this.platform.files.concat(this.fileList[i].response.data[0].id); console.log(this.fileList[i].response.data[0].id)
// this.platform.files = this.platform.files.concat(this.fileList[i].response.data[0].id);
this.filesUpload = this.filesUpload.concat(this.fileList[i].response.data[0].id);
console.log(this.filesUpload )
} }
this.updateSettled(); this.updateSettled();
} }
} }
}, },
async updateSettled() { async updateSettled() {
this.confirmLoading = true; this.confirmLoading = true;
try { try {
@ -303,9 +327,9 @@ export default {
company: this.platform.company, company: this.platform.company,
electricDesign: this.platform.electricDesign, electricDesign: this.platform.electricDesign,
email: this.platform.email, email: this.platform.email,
fileList: this.platform.files, fileList: this.filesUpload,
friendCompany: this.platform.friendCompany, friendCompany: this.platform.friendCompany,
gender: this.platform.sex, gender: this.platform.gender,
idCard: this.platform.idCard, idCard: this.platform.idCard,
juniorCollege: this.platform.juniorCollege, juniorCollege: this.platform.juniorCollege,
legalPerson: this.platform.legalPerson, legalPerson: this.platform.legalPerson,
@ -326,7 +350,7 @@ export default {
staffCount: this.platform.staffCount, staffCount: this.platform.staffCount,
}, },
}; };
console.log(params); console.log("updatePlace",params);
const res = await updatePlace(params); const res = await updatePlace(params);
// console.log(res); // console.log(res);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
@ -348,6 +372,10 @@ export default {
} }
}, },
}, },
}; };
</script> </script>

6
src/components/EntityApply/EntityApplySearch.vue

@ -24,7 +24,7 @@
<!-- <a-button @click="showModal" class="editable-add-btn mb-3" type="primary">增加</a-button> --> <!-- <a-button @click="showModal" class="editable-add-btn mb-3" type="primary">增加</a-button> -->
<!-- 添加 --> <!-- 添加 -->
<entity-apply-add :visible="visible" @closeModal="closeModal" /> <entity-apply-add :visible="visible" @closeModal="closeModal" @getData="getData" />
</div> </div>
</template> </template>
@ -48,6 +48,10 @@ export default {
}; };
}, },
methods: { methods: {
getData() {
this.$emit('entityApplicationSearch');
},
handleChangeName(value) { handleChangeName(value) {
console.log('value: ', value); console.log('value: ', value);
this.companyName = value; this.companyName = value;

8
src/components/Policy/PolicyEdit.vue

@ -2,9 +2,9 @@
<div class="d-flex flex-wrap pb-3"> <div class="d-flex flex-wrap pb-3">
<!-- 编辑 --> <!-- 编辑 -->
<a-modal <a-modal
:maskClosable="false" :mask-closable="false"
@cancel="$emit('closeModal')" @cancel="$emit('closeModal')"
destroyOnClose destroy-on-close
footer footer
title="修改创新政策" title="修改创新政策"
v-model="editVisible" v-model="editVisible"
@ -91,7 +91,7 @@
style="height:120px" style="height:120px"
placeholder="原文链接" placeholder="原文链接"
v-decorator="[ v-decorator="[
'url', 'intro',
{ {
initialValue: editItem.intro, initialValue: editItem.intro,
}, },
@ -131,8 +131,8 @@ const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default { export default {
name: 'PolicyEdit', name: 'PolicyEdit',
props: { editVisible: { type: Boolean, default: false }, editItem: { type: Object, default: () => {} } },
components: { QuillEditor }, components: { QuillEditor },
props: { editVisible: { type: Boolean, default: false }, editItem: { type: Object, default: () => {} } },
data() { data() {
return { return {
formItemLayout, formItemLayout,

Loading…
Cancel
Save