|
|
|
@ -6,7 +6,7 @@
|
|
|
|
|
<p>企业工商信息</p>
|
|
|
|
|
<!-- 为适应上传图片表单布局把企业工商表单拆分 -->
|
|
|
|
|
<div class="commerceMessage_one">
|
|
|
|
|
<el-form ref="commerceMessage_form" :model="form" class="commerceMessage_form">
|
|
|
|
|
<el-form ref="commerceMessage_form" :model="form" :rules="rules" class="commerceMessage_form">
|
|
|
|
|
<el-form-item label="企业名称" prop="companyName">
|
|
|
|
|
<el-input v-model="form.companyName"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -48,7 +48,7 @@
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 为适应上传图片表单布局把企业工商表单拆分,剩余部分 -->
|
|
|
|
|
<el-form ref="commerceMessage_form_two" :model="form" class="commerceMessage_form_two">
|
|
|
|
|
<el-form ref="commerceMessage_form_two" :model="form" :rules="rules" class="commerceMessage_form_two">
|
|
|
|
|
<el-form-item label="企业登记注册地" prop="registerAddress">
|
|
|
|
|
<el-input v-model="form.registerAddress"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -79,7 +79,7 @@
|
|
|
|
|
<!-- 企业位置信息表单 -->
|
|
|
|
|
<div class="company_position">
|
|
|
|
|
<p>企业位置信息</p>
|
|
|
|
|
<el-form ref="company_position_form" :model="form" class="company_position_form">
|
|
|
|
|
<el-form ref="company_position_form" :model="form" :rules="rules" class="company_position_form">
|
|
|
|
|
<el-form-item label="省份名称" prop="provinceName">
|
|
|
|
|
<el-select v-model="form.provinceName" @change="checkCity" placeholder="请选择省份名称">
|
|
|
|
|
<el-option v-for="item in form.province" :key="item.areaCode" :label="item.areaName" :value="item.areaCode">
|
|
|
|
@ -157,7 +157,7 @@ import {
|
|
|
|
|
postCompanyList,
|
|
|
|
|
putCompanyList,
|
|
|
|
|
} from "@/api/systemManagement";
|
|
|
|
|
import defaultImage from "@/assets/companyFile/defaultimage.png";
|
|
|
|
|
import defaultImage from "@/assets/companyFile/default.png";
|
|
|
|
|
export default {
|
|
|
|
|
name: "CompanyDataDialog",
|
|
|
|
|
data() {
|
|
|
|
@ -216,10 +216,33 @@ export default {
|
|
|
|
|
belongingArea: "",
|
|
|
|
|
},
|
|
|
|
|
imageUrl: "",
|
|
|
|
|
upUrl: `http://192.168.0.188:8118/zhapi/safety/system/enterpriseList`, // 图片上传地址
|
|
|
|
|
upUrl: `http://${window.location.host}/zhapi/safety/system/enterpriseList`, // 图片上传地址
|
|
|
|
|
upheaders: {
|
|
|
|
|
Authorization: localStorage.getItem("AuthorizationToken"),
|
|
|
|
|
},
|
|
|
|
|
rules:{
|
|
|
|
|
companyName: [
|
|
|
|
|
{ required: true, message: "请选择企业", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
companyTypes:[
|
|
|
|
|
{ type: 'array', required: true, message: '请至少选择一个企业类型', trigger: 'change' }
|
|
|
|
|
],
|
|
|
|
|
provinceName:[
|
|
|
|
|
{ required: true, message: "请选择省份名称", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
cityName:[
|
|
|
|
|
{ required: true, message: "请选择城市名称", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
areaName:[
|
|
|
|
|
{ required: true, message: "请选择区县名称", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
blockName:[
|
|
|
|
|
{ required: true, message: "请选择街道/乡镇名称", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
streetName:[
|
|
|
|
|
{ required: true, message: "请选择社区/村名称", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
@ -261,15 +284,16 @@ export default {
|
|
|
|
|
policeDistrictCn: "",
|
|
|
|
|
policeDistrictCode: "",
|
|
|
|
|
belongingArea: "",
|
|
|
|
|
companyType:'',
|
|
|
|
|
companyTypes: [], // 非下拉List, 记录复选框的
|
|
|
|
|
values: [],
|
|
|
|
|
id: [],
|
|
|
|
|
id: '',
|
|
|
|
|
};
|
|
|
|
|
this.imageUrl = "";
|
|
|
|
|
Object.assign(this.form, newForm);
|
|
|
|
|
} else if (num === 3) {
|
|
|
|
|
this.dialogTitle = "编辑";
|
|
|
|
|
console.log("item", item);
|
|
|
|
|
console.log("item123", item);
|
|
|
|
|
this.imageUrl = item.picUrl;
|
|
|
|
|
this.form = Object.assign(this.form, item);
|
|
|
|
|
}
|
|
|
|
@ -363,17 +387,33 @@ export default {
|
|
|
|
|
this.form.picUrl = val
|
|
|
|
|
},
|
|
|
|
|
// 确定数据
|
|
|
|
|
saveFormData() {
|
|
|
|
|
async saveFormData() {
|
|
|
|
|
delete this.form.city
|
|
|
|
|
delete this.form.community
|
|
|
|
|
delete this.form.companyTypes
|
|
|
|
|
delete this.form.county
|
|
|
|
|
delete this.form.township
|
|
|
|
|
delete this.form.jurisdiction
|
|
|
|
|
delete this.form.province
|
|
|
|
|
delete this.form.values
|
|
|
|
|
const params = this.form;
|
|
|
|
|
console.log("this.form3", this.form);
|
|
|
|
|
if (this.dialogTitle === "新建") {
|
|
|
|
|
postCompanyList(params).then((res) => {
|
|
|
|
|
await postCompanyList(params).then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.$message.success("新建成功");
|
|
|
|
|
this.visible = false;
|
|
|
|
|
});
|
|
|
|
|
} else if (this.dialogTitle === "编辑") {
|
|
|
|
|
putCompanyList(params).then((res) => {
|
|
|
|
|
// const params_again = {
|
|
|
|
|
// // pageSize: this.pageSize,
|
|
|
|
|
// // pageNum: this.pageNum,
|
|
|
|
|
// companyName: this.searchCompany, // 查询框条件
|
|
|
|
|
// };
|
|
|
|
|
// await getCompanyList(params_again).then(res=>{
|
|
|
|
|
// console.log('res_again',res);
|
|
|
|
|
// })
|
|
|
|
|
await putCompanyList(params).then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.$message.success("编辑成功");
|
|
|
|
|
this.visible = false;
|
|
|
|
|