flat: defer 节点完成后加载

This commit is contained in:
Apcallover
2024-03-28 17:24:50 +08:00
parent ba3c5a408d
commit 20e9ef260d
4 changed files with 55 additions and 527 deletions

View File

@@ -6,8 +6,8 @@
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad" :upload-before="uploadBefore">
<template slot="menuLeft">
<el-button v-if="vaildData(permission.manage_compan_companyList_addUser, false)" size="small"
@click.stop="handleAddUser" type="primary" :disabled="selectionList.length === 0">关联账号</el-button>
<!-- <el-button v-if="vaildData(permission.manage_compan_companyList_addUser, false)" size="small"-->
<!-- @click.stop="handleAddUser" type="primary" :disabled="selectionList.length === 0">关联账号</el-button>-->
<!-- <el-button v-if="vaildData(permission.manage_compan_companyList_config, false)" size="small"
@click.stop="handleConfig" type="primary" :disabled="selectionList.length === 0">服务设置</el-button> -->
<!-- <el-button v-if="vaildData(permission.manage_compan_companyList_check, false)" size="small"
@@ -113,7 +113,7 @@
<script>
import {
getList,
getDetail,
detailCompany,
add,
update,
stop,
@@ -195,7 +195,36 @@ export default {
total: 0,
},
obj: {},
option: {
data: [],
};
},
computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
addBtn: this.vaildData(
this.permission.manage_compan_companyList_add,
false
),
viewBtn: this.vaildData(
this.permission.manage_compan_companyList_view,
false
),
editBtn: this.vaildData(
this.permission.manage_compan_companyList_edit,
false
),
};
},
ids() {
let ids = [];
this.selectionList.forEach((ele) => {
ids.push(ele.id);
});
return ids;
},
option() {
return {
height: "auto",
tip: false,
searchShow: true,
@@ -224,184 +253,12 @@ export default {
searchLabelWidth: 100,
display: false,
},
{
type: "tree",
label: "所属市场",
prop: "stationId",
span: 20,
display: false,
search: true,
searchSpan: 6,
searchLabelWidth: 100,
dicUrl: getStationDic(),
props: {
label: "stationName",
value: "stationId",
},
},
// {
// type: "input",
// label: "所在地区",
// display: false,
// prop: "cityId",
// dicData: [
// {
// label: "男",
// value: 1,
// },
// {
// label: "女",
// value: 2,
// },
// ],
// },
// {
// type: "tree",
// label: "所属行业",
// display: false,
// prop: "tradeId",
// },
{
type: "tree",
label: "联系人姓名",
display: false,
prop: "masterName",
},
// {
// label: "企业状态",
// prop: "status",
// type: "select",
// search: true,
// dicData: companyStatus,
// display: false,
// span: 24,
// searchSpan: 4,
// },
// {
// label: "商保状态",
// prop: "insuranceOn",
// type: "select",
// // search: true,
// // searchslot:false,
// // searchSpan: 4,
// dicData: [
// {
// label: "停用",
// value: 0,
// },
// {
// label: "启用",
// value: 1,
// }
// ],
// display: false,
// },
// {
// label: "先开票",
// prop: "invoiceOn",
// type: "select",
// dicData: [
// {
// label: "停用",
// value: 0,
// },
// {
// label: "启用",
// value: 1,
// },
// {
// label: "-",
// value: -1,
// },
// ],
// display: false,
// },
// {
// label: "银联代发",
// prop: "payType",
// type: "select",
// dicData: [
// {
// label: "停用",
// value: 0,
// },
// {
// label: "启用",
// value: 1,
// },
// {
// label: "-",
// value: -1,
// },
// ],
// display: false,
// },
// {
// label: "保证金",
// prop: "trialOn",
// type: "select",
// // search: true,
// // searchslot:false,
// // searchLabelWidth: 66,
// // searchSpan: 5,
// dicData: [
// {
// label: "已缴",
// value: 0,
// },
// {
// label: "未缴",
// value: 1,
// },
// {
// label: "免缴",
// value: 2,
// }
// ],
// display: false,
// },
// {
// label: "签订合同",
// prop: "isSign",
// dicData: [
// {
// label: "未签",
// value: 0,
// },
// {
// label: "已签",
// value: 1,
// },
// ],
// display: false,
// },
// {
// label:'电子合同',
// prop:'contractOn',
// type:'select',
// dicData:[
// {
// label:'关闭',
// value:0
// },
// {
// label:'开启',
// value:1
// }
// ],
// display:false,
// },
// {
// label: "服务费",
// prop: "serveCost",
// slot: true,
// display: false,
// },
// {
// label: "驳回原因",
// prop: "remarks",
// display: false,
// },
{
label: "创建日期",
prop: "createTime",
@@ -409,84 +266,11 @@ export default {
format: "yyyy-MM-dd",
display: false,
},
{
label: "审核日期",
prop: "reviewTime",
type: "datetime",
format: "yyyy-MM-dd",
display: false,
},
],
group: [
{
label: "",
column: [
{
type: "tree",
label: "所属市场",
span: 20,
size: "small",
prop: "stationId",
rules: [
{
required: true,
message: "请选择所属市场",
},
],
filterable: true,
dicUrl: getStationDic(),
props: {
label: "stationName",
value: "stationId",
},
dicFormatter(resp) {
return resp.data;
},
},
// {
// type: "select",
// label: "所属行业",
// span: 20,
// size: "small",
// prop: "tradeId",
// rules: [
// {
// required: true, validator: validateTradeId, trigger: 'blur'
// }
// ],
// filterable: true,
// dicUrl: getTradeDic(),
// props: {
// label: "name",
// value: "id",
// },
// dicFormatter(resp) {
// var result = [];
// resp.data.forEach(ele => {
// if (ele.name != "1") {
// result.push(ele)
// }
// });
// return result;
// },
// },
// {
// type: "input",
// label: "统一信用代码",
// span: 12,
// display: true,
// editDisabled: true,
// size: "small",
// prop: "companyTid",
// rules: [
// {
// required: true,
// whitespace: true,
// message: "请输入统一信用代码",
// },
// ],
// placeholder: "18位统一社会信用代码",
// },
{
type: "input",
label: "所属机构",
@@ -494,6 +278,8 @@ export default {
display: true,
size: "small",
prop: "companyName",
value: this.userInfo.company_name,
disabled: true,
rules: [
{
required: true,
@@ -517,30 +303,6 @@ export default {
},
],
},
// {
// type: "input",
// label: "法人身份证号",
// span: 12,
// display: true,
// size: "small",
// prop: "masterIdentity",
// rules: [
// {
// required: true,
// whitespace: true,
// message: "请输入法人身份证号",
// },
// {
// validator: (rule, value, callback) => {
// if (check18IdCardNo(value)) {
// callback();
// } else {
// callback(new Error("身份证格式不正确"));
// }
// },
// },
// ],
// },
{
type: "input",
label: "所在地区",
@@ -556,268 +318,25 @@ export default {
],
},
{
type: "input",
label: "详细地址",
type: "textarea",
label: "备注",
span: 20,
display: true,
size: "small",
prop: "companyAddress",
formslot: true,
prop: "remarks",
rules: [
{
required: true,
whitespace: true,
message: "请输入详细地址",
message: "请输入备注",
},
],
},
// 图片上传
// {
// type: "upload",
// label: "法人身份证(人像)",
// span: 12,
// showFileList: false,
// listType: "picture-img",
// multiple: false,
// propsHttp: {
// res: "data",
// url: "link",
// },
// canvasOption: {},
// headers: [],
// data: [],
// accept,
// size: "small",
// prop: "identityUrl4Id",
// action: putFile(),
// viewDisplay: false,
// rules: [
// {
// required: true,
// message: "请上传法人身份证(人像)",
// },
// ],
// // tip:'上传图片大小限制2M以内',
// },
// {
// type: "upload",
// label: "法人身份证(国徽)",
// span: 12,
// showFileList: false,
// listType: "picture-img",
// multiple: false,
// propsHttp: {
// res: "data",
// url: "link",
// },
// canvasOption: {},
// headers: [],
// data: [],
// accept,
// size: "small",
// prop: "identityUrl5Id",
// action: putFile(),
// viewDisplay: false,
// rules: [
// {
// required: true,
// message: "请上传法人身份证(国徽)",
// },
// ],
// // tip:'上传图片大小限制2M以内',
// },
// {
// type: "upload",
// label: "营业执照",
// span: 12,
// showFileList: false,
// listType: "picture-img",
// multiple: false,
// propsHttp: {
// res: "data",
// url: "link",
// },
// accept,
// canvasOption: {},
// headers: [],
// data: [],
// size: "small",
// prop: "authUrlId",
// action: putFile(),
// viewDisplay: false,
// rules: [
// {
// required: true,
// message: "请上传营业执照照片",
// },
// ],
// // tip:'上传图片大小限制2M以内',
// },
// {
// type: "upload",
// label: "电子签章申请表",
// span: 12,
// showFileList: false,
// listType: "picture-img",
// multiple: false,
// propsHttp: {
// res: "data",
// url: "link",
// },
// accept,
// canvasOption: {},
// headers: [],
// data: [],
// size: "small",
// prop: "signSrcUrl",
// action: putFile(),
// viewDisplay: false,
// rules: [
// {
// required: true,
// message: "请上传电子签章申请表",
// },
// ],
// // tip:'上传图片大小限制2M以内',
// },
// {
// type: "upload",
// label: "授权委托书",
// span: 24,
// showFileList: false,
// listType: "picture-img",
// multiple: false,
// propsHttp: {
// res: "data",
// url: "link",
// },
// canvasOption: {},
// headers: [],
// data: [],
// accept,
// size: "small",
// prop: "letterOfAttorneyUrl",
// action: putFile(),
// viewDisplay: false,
// rules: [
// {
// required: true,
// message: "请上传授权委托书",
// },
// ],
// // tip:'上传图片大小限制2M以内',
// },
// {
// label: "招聘简章",
// formslot:true,
// span:24,
// prop:'motoleyUrl',
// rules: [
// {
// required: true,
// message: "请上传招聘简章",
// },
// ],
// viewDisplay: false,
// },
// // 图片预览
// {
// label: "法人身份证(人像)",
// span: 12,
// prop: "identityUrl4IdImg",
// formslot: true,
// editDisplay: false,
// addDisplay: false,
// viewDisplay: true,
// },
// {
// label: "法人身份证(国徽)",
// span: 12,
// prop: "identityUrl5IdImg",
// formslot: true,
// editDisplay: false,
// addDisplay: false,
// viewDisplay: true,
// },
// {
// label: "营业执照照片",
// span: 12,
// prop: "authUrlIdImg",
// formslot: true,
// editDisplay: false,
// addDisplay: false,
// viewDisplay: true,
// },
// {
// label: "电子签章申请表",
// span: 12,
// prop: "signSrcUrl",
// formslot: true,
// editDisplay: false,
// addDisplay: false,
// viewDisplay: true,
// },
// {
// label: "授权委托书",
// span: 12,
// prop: "letterOfAttorneyUrl",
// formslot: true,
// editDisplay: false,
// addDisplay: false,
// viewDisplay: true,
// },
// {
// label: "招聘简章",
// span: 24,
// prop: "motoleyUrlImg",
// formslot: true,
// editDisplay: false,
// addDisplay: false,
// viewDisplay: true,
// },
// {
// label: "操作记录",
// prop: "record",
// labelPosition: "top",
// span: 24,
// formslot: true,
// editDisplay: false,
// addDisplay: false,
// viewDisplay: true,
// },
],
}
],
},
data: [],
};
},
computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
addBtn: this.vaildData(
this.permission.manage_compan_companyList_add,
false
),
viewBtn: this.vaildData(
this.permission.manage_compan_companyList_view,
false
),
editBtn: this.vaildData(
this.permission.manage_compan_companyList_edit,
false
),
};
},
ids() {
let ids = [];
this.selectionList.forEach((ele) => {
ids.push(ele.id);
});
return ids;
},
}
}
},
methods: {
/*地图*/
@@ -1019,10 +538,10 @@ export default {
if (["edit", "view"].includes(type)) {
this.imgList = [];
this.loading = true;
getDetail(this.form.id).then((res) => {
detailCompany(this.form.id).then((res) => {
this.loading = false;
this.form = res.data.data;
if (this.form.motoleyUrl != "") {
if (this.form.motoleyUrl) {
var strList = this.form.motoleyUrl.split(',');
for (var i in strList) {
this.imgList.push({ url: strList[i] })