|
|
|
@ -51,7 +51,6 @@
|
|
|
|
|
class="avatar-uploader"
|
|
|
|
|
accept=".jpg,.jpeg,.png,.gif,.JPG,.JPEG"
|
|
|
|
|
:action="upUrl"
|
|
|
|
|
:headers="upheaders"
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
:on-success="handleAvatarSuccess"
|
|
|
|
|
>
|
|
|
|
@ -252,7 +251,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() {
|
|
|
|
@ -311,7 +310,7 @@ export default {
|
|
|
|
|
belongingArea: "",
|
|
|
|
|
},
|
|
|
|
|
imageUrl: "",
|
|
|
|
|
upUrl: `http://172.18.113.50:8080/zhapi/safety/system/enterpriseList`, // 图片上传地址
|
|
|
|
|
upUrl: `http://${window.location.host}/zhapi/safety/system/enterpriseList`, // 图片上传地址
|
|
|
|
|
upheaders: {
|
|
|
|
|
Authorization: localStorage.getItem("AuthorizationToken"),
|
|
|
|
|
},
|
|
|
|
@ -379,9 +378,10 @@ export default {
|
|
|
|
|
policeDistrictCn: "",
|
|
|
|
|
policeDistrictCode: "",
|
|
|
|
|
belongingArea: "",
|
|
|
|
|
companyType:'',
|
|
|
|
|
companyTypes: [], // 非下拉List, 记录复选框的
|
|
|
|
|
values: [],
|
|
|
|
|
id: [],
|
|
|
|
|
id: '',
|
|
|
|
|
};
|
|
|
|
|
this.imageUrl = "";
|
|
|
|
|
Object.assign(this.form, newForm);
|
|
|
|
@ -477,17 +477,33 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 确定数据
|
|
|
|
|
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;
|
|
|
|
|