This commit is contained in:
Apcallover
2024-02-27 09:54:50 +08:00
3 changed files with 41 additions and 11 deletions

View File

@@ -24,6 +24,18 @@
<template slot="cityIdForm" slot-scope="{ disabled }"> <template slot="cityIdForm" slot-scope="{ disabled }">
<jl-city-cascader :disabled="disabled" v-model="form.cityId"></jl-city-cascader> <jl-city-cascader :disabled="disabled" v-model="form.cityId"></jl-city-cascader>
</template> </template>
<template slot="companyAddressForm" slot-scope="{ disabled }">
<select-map
ref="selectMap"
@addAddress="addAddress"
@addressDel = "addressDel"
:isCanEdit="!disabled"
:lng="obj.lon"
:lat="obj.lat"
:address="form.companyAddress"
:type="type"
></select-map>
</template>
<template slot="authUrlIdImgForm"> <template slot="authUrlIdImgForm">
<el-image style="width: 100px; height: 100px" :src="form.authUrlId" :preview-src-list="[form.authUrlId]"> <el-image style="width: 100px; height: 100px" :src="form.authUrlId" :preview-src-list="[form.authUrlId]">
</el-image> </el-image>
@@ -90,6 +102,8 @@
</el-select> </el-select>
</template> --> </template> -->
<!--保证金状态搜索栏trialOn--> <!--保证金状态搜索栏trialOn-->
<template slot="trialOnSearch"> <template slot="trialOnSearch">
<el-select v-model="query.trialOn" placeholder="保证金" @change="selectTrailTyepChange"> <el-select v-model="query.trialOn" placeholder="保证金" @change="selectTrailTyepChange">
@@ -124,7 +138,7 @@ import { check18IdCardNo } from "@/util/validate";
import { moneyFormat } from "@/util/money"; import { moneyFormat } from "@/util/money";
import companyRecord from "./companyRecord"; import companyRecord from "./companyRecord";
import { companyStatus } from "@/const/company"; import { companyStatus } from "@/const/company";
import SelectMap from "@/components/map/selectLocation";
const accept = [ const accept = [
"image/png", "image/png",
"image/jpeg", "image/jpeg",
@@ -139,7 +153,7 @@ function getPath(path) {
} }
export default { export default {
components: { addAccount, companyConfig, companyCheck, companyRecord }, components: { addAccount, companyConfig, companyCheck, companyRecord, SelectMap },
name: "manage_compan_companyList", name: "manage_compan_companyList",
data() { data() {
const validateTradeId = (rule, value, callback) => { const validateTradeId = (rule, value, callback) => {
@@ -185,6 +199,7 @@ export default {
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
obj: {},
option: { option: {
height: "auto", height: "auto",
tip: false, tip: false,
@@ -198,7 +213,7 @@ export default {
addBtn: true, addBtn: true,
editBtn: true, editBtn: true,
addBtnText: "社区街道登记", addBtnText: "社区街道登记",
addTitle: "新增企业", addTitle: "新增社区街道名称",
delBtn: false, delBtn: false,
menuWidth: 300, menuWidth: 300,
labelWidth: 151, labelWidth: 151,
@@ -478,7 +493,7 @@ export default {
// }, // },
{ {
type: "input", type: "input",
label: "企业名称", label: "社区街道名称",
span: 20, span: 20,
display: true, display: true,
size: "small", size: "small",
@@ -487,7 +502,7 @@ export default {
{ {
required: true, required: true,
whitespace: true, whitespace: true,
message: "请输入企业名称", message: "请输入社区街道名称",
}, },
], ],
}, },
@@ -551,6 +566,7 @@ export default {
display: true, display: true,
size: "small", size: "small",
prop: "companyAddress", prop: "companyAddress",
formslot: true,
rules: [ rules: [
{ {
required: true, required: true,
@@ -808,6 +824,15 @@ export default {
}, },
}, },
methods: { methods: {
/*地图*/
addAddress(form) {
this.obj.address = form.address + (form.title || "");
this.obj.lat = form.lat;
this.obj.lon = form.lng;
},
addressDel(){
this.obj.address = "";
},
// uploadBefore(file, done, loading) { // uploadBefore(file, done, loading) {
// const isLt2M = file.size / 1024 / 1024 < 2; // const isLt2M = file.size / 1024 / 1024 < 2;
// if (!isLt2M) { // if (!isLt2M) {
@@ -841,7 +866,7 @@ export default {
}); });
if (!flags) { if (!flags) {
this.$message.closeAll(); //只显示一个提示 this.$message.closeAll(); //只显示一个提示
this.$message.error("该企业信息已经审核,不用重复操作"); this.$message.error("该社区街道名称已经审核,不用重复操作");
return; return;
} }
this.$refs.check.open(this.ids[0]); this.$refs.check.open(this.ids[0]);
@@ -894,7 +919,11 @@ export default {
row.authUrlId = getPath(row.authUrlId); row.authUrlId = getPath(row.authUrlId);
row.identityUrl4Id = getPath(row.identityUrl4Id); row.identityUrl4Id = getPath(row.identityUrl4Id);
row.identityUrl5Id = getPath(row.identityUrl5Id); row.identityUrl5Id = getPath(row.identityUrl5Id);
update(row).then( const copyRow = {...row}
if(this.obj.address) {
copyRow.companyAddress = this.obj.address
}
update(copyRow).then(
() => { () => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
@@ -913,7 +942,7 @@ export default {
rowStop(id) { rowStop(id) {
let h = this.$createElement; let h = this.$createElement;
this.$confirm( this.$confirm(
h("p", { style: "color: #F56C6C" }, "一旦终止合作企业将无法操作系统"), h("p", { style: "color: #F56C6C" }, "一旦终止合作社区街道将无法操作系统"),
"您确定要终止与此公司的合作吗?", "您确定要终止与此公司的合作吗?",
{ {
confirmButtonText: "确定", confirmButtonText: "确定",
@@ -941,7 +970,7 @@ export default {
rowStart(id) { rowStart(id) {
let h = this.$createElement; let h = this.$createElement;
this.$confirm( this.$confirm(
h("p", { style: "color: #F56C6C" }, "一旦恢复合作企业所有账号均可使用"), h("p", { style: "color: #F56C6C" }, "一旦恢复合作社区街道所有账号均可使用"),
"您确定要恢复与此公司的合作吗", "您确定要恢复与此公司的合作吗",
{ {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@@ -25,7 +25,8 @@ module.exports = {
"/api": { "/api": {
// target: 'http://192.168.3.104:8000', // 本地服务接口地址 // target: 'http://192.168.3.104:8000', // 本地服务接口地址
// target: "http://39.98.184.58:8000", // 阿里云后台地址 // target: "http://39.98.184.58:8000", // 阿里云后台地址
target: "http://192.168.3.108:8000", // 本地 // target: "http://192.168.3.108:8000", // 本地
target: 'http://192.168.3.111:8000',
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {