const uploadUrl = '/api/blade-resource/oss/endpoint/put-file-attach' const propsHttp = { url:'link', res: 'data' } let baseUrl = '/api/blade-system/region/lazy-tree?parentCode=' const labelWidth = '25%' import axios from '@/router/axios'; export default { height: 'auto', calcHeight: 30, tip: false, searchShow: true, searchMenuSpan: 6, border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, addBtn:false, group: [ { label: '联系人信息', icon:'el-icon-user-solid', collapse: true, prop: 'info', arrow: false, column: [ { label: "用户名", prop: "account", labelWidth:labelWidth, type: "input", hide: true, disabled:false }, { label: "联系人姓名", labelWidth:labelWidth, prop: "name", type: "input", }, { label: "邮件", labelWidth:labelWidth, prop: "email", type: "input", }, { label: "手机", labelWidth:labelWidth, prop: "phone", type: "input", }, ] }, { label: '企业基本信息', icon: 'el-icon-info', collapse: true, prop: 'enterprise', arrow: false, column: [ { label: "企业名称", labelWidth:labelWidth, prop: "enterpriseName", type: "input", }, { label: "单位地址", labelWidth:labelWidth, prop: "address", type: "input", }, { label: "注册省市", labelWidth:labelWidth, prop: "location", type: "cascader", props: { label: 'title', value: 'key' }, separator:'', lazy: true, lazyLoad(node, resolve) { let stop_level = 1; let level = node.level; let data = node.data || {} let code = data.key; let list = []; let callback = () => { resolve((list || []).map(ele => { return Object.assign(ele, { leaf: level >= stop_level }) })); } if (level == 0) { axios.get(`${baseUrl}00`).then(res => { list = res.data.data; callback() }) }else if (level == 1) { axios.get(`${baseUrl}${code}`).then(res => { list = res.data.data; callback() }) } else if (level == 2) { axios.get(`${baseUrl}${code}`).then(res => { list = res.data.data; callback() }) }else{ callback() } } }, { label: "单位类型", labelWidth:labelWidth, prop: "type", type: "select", dicData:[ { label:'个体', value: 1, }, { label:'企业', value: 2, } ] }, { label: "法人姓名", labelWidth:labelWidth, prop: "legalPerson", type: "input", }, { label: "身份证号", labelWidth:labelWidth, prop: "idCard", type: "input", }, { label: "企业电话", labelWidth:labelWidth, prop: "enterprisePhone", type: "input", }, { label: "企业传真", labelWidth:labelWidth, prop: "enterpriseFax", type: "input", }, ] }, { label: '企业资质信息', icon: 'el-icon-s-check', collapse: true, prop: 'permission', arrow: false, column: [ { label: "道路运输经营许可证号", labelWidth:labelWidth, prop: "permitNumber", type: "input", }, { label: "有效期起", labelWidth:labelWidth, prop: "startTime", type: "date", format:'yyyy-MM-dd', valueFormat:'yyyy-MM-dd', }, { label: "有效期止", labelWidth:labelWidth, prop: "endTime", type: "date", format:'yyyy-MM-dd', valueFormat:'yyyy-MM-dd', }, ] }, { label: '企业资质文件', icon: 'el-icon-upload', collapse: true, prop: 'info', arrow: false, column: [ { label: "道路运输经营许可证照片", labelWidth:'17%', prop: "permitUrl", type: 'upload', loadText: '附件上传中,请稍等', span: 24, listType: 'picture-card', accept:'image/png, image/jpeg', propsHttp:propsHttp, action: uploadUrl }, ] } ], column: [ { label: "主键", prop: "id", type: "input", addDisplay: false, editDisplay: false, viewDisplay: false, hide: true, display:false, }, { label: "企业名称", labelWidth:labelWidth, prop: "enterpriseName", type: "input", display: false, }, { label: "单位地址", labelWidth:labelWidth, prop: "address", type: "input", display: false, }, ] }