var vm = null;
export const sendThis = ( _this,title )=> {
    vm = _this;
		let _option = {
			height: 'auto',
			calcHeight: 32,
			selection: true,
			index: true,
			indexLabel: '序号',
			indexWidth: 60,
			menu:false,
			menuFixed: true,
			menuWidth: 200,
			border: true,
			searchMenuSpan:6,
			searchMenuPosition: "left",
			searchGutter:20,
			labelWidth: 98,
			dialogWidth: '65%',
			gutter:10,
			column: [{
					label: '服务商名称',
					prop: 'name',
					minWidth: 150,
					search: true,
					searchLabelWidth: 88,
					span:24,
					fixed:"left",
					rules: [{
						required: true,
						message: '请输入',
						trigger: 'blur',
					}],
				},
				{
					label: '联系人',
					prop: 'contacts',
					minWidth: 100,
					search: true,
					rules: [{
						required: true,
						message: '请输入',
						trigger: 'blur',
					}],
				},
				{
					label: '联系方式',
					prop: 'mobile',
					minWidth: 120,
					search: true,
					maxlength:11,
					rules: [{
						required: true,
						message: '请输入',
						trigger: 'blur',
					}],
				},
				{
					label: '地址',
					prop: 'address',
					minWidth: 200,
					search: true,
					display:false,
				},
				{
					label: '省',
					prop: 'province',
					hide:true,
					display:false,
				},
				{
					label: '市',
					prop: 'city',
					hide:true,
					display:false,
				},
				{
					label: '区',
					prop: 'area',
					hide:true,
					display:false,
				},
				{
					label: '地址',
					prop: 'provinceCode',
					placeholder:'请选择省',
					type: 'select',
					props: {
						label: 'name',
						value: 'code',
					},
					cascader: ['cityCode'],
					dicUrl: '/blade-system/region/select',
					slot: true,
					hide:true,
					span:7,
					rules: [{
						required: true,
						message: '请选择',
						trigger: 'change',
					}],
					change:(res)=>{
						vm.formData.provinceCode = res.value;
						if(res&&res.item&&res.item.name){
							vm.formData.province = res.item.name
						}
					},
				},
				{
					label: '',
					prop: 'cityCode',
					placeholder:'请选择市',
					type: 'select',
					props: {
						label: 'name',
						value: 'code',
					},
					cascader: ['areaCode'],
					dicFlag: false,
					dicUrl: '/blade-system/region/select?code={{provinceCode}}',
					slot: true,
					hide:true,
					span:5,
					labelWidth: 0,
					rules: [{
						required: true,
						message: '请选择',
						trigger: 'change',
					}],
					change:(res)=>{
						vm.formData.cityCode = res.value;
						if(res&&res.item&&res.item.name){
							vm.formData.city = res.item.name
						}
					},
				},
				{
					label: '',
					prop: 'areaCode',
					placeholder:'请选择区',
					type: 'select',
					props: {
						label: 'name',
						value: 'code',
					},
					dicFlag: false,
					dicUrl: '/blade-system/region/select?code={{cityCode}}',
					slot: true,
					hide:true,
					span:5,
					labelWidth: 0,
					rules: [{
						required: true,
						message: '请选择',
						trigger: 'change',
					}],
					change:(res)=>{
						vm.formData.areaCode = res.value;
						if(res&&res.item&&res.item.name){
							vm.formData.area = res.item.name
						}
					},
				},
				{
					label: '',
					prop: 'address',
					placeholder:'请输入详细地址',
					minWidth:200,
					span:7,
					labelWidth: 0,
					rules: [{
						required: true,
						message: '请输入',
						trigger: 'blur',
					}],
					hide:true,
				},
				{
					label: '登录账号',
					prop: 'loginName',
					autocomplete:'new-password',
					hide:true,
					rules: [{
						required: true,
						message: '请输入',
						trigger: 'blur',
					}],
				},
				{
					label: '登录密码',
					prop: 'password',
					type:'password',
					autocomplete:'new-password',
					hide:true,
					rules: [{
						required: title&&title=='edit' ? false : true,
						message: '请输入',
						trigger: 'blur',
					}],
				},
				{
					label: '状态',
					prop: 'status',
					minWidth: 90,
					type: 'radio',
					value:'0',
					span:24,
					dicData: [{
						label: '启用',
						value: '0'
					}, 
					// {
					// 	label: '删除',
					// 	value: '1',
					// }, {
					// 	label: '未授权',
					// 	value: '2',
					// }, 
					{
						label: '禁用',
						value: '3',
					}, 
					// {
					// 	label: '暂未合作',
					// 	value: '4',
					// },
					]
				},
				{
					label: '添加时间',
					prop: 'createTime',
					minWidth: 120,
					display:false
				},
				{
					label: '员工数量',
					prop: 'amount',
					minWidth: 100,
					display:false
				},
				{
					label: '工程师数量',
					prop: 'empamount',
					minWidth: 100,
					display:false
				},
				{
					label: '相关资质',
					prop: 'licenseImg',
					hide:true,
					span:24,
					type: 'upload',
					listType: 'picture-card',
					multiple:true,
					limit:3,
					dataType: 'string',
					action: '/blade-resource/oss/endpoint/put-file?code=aliyun',
					propsHttp: {
						res: 'data',
						url: 'link',
					},
					tip: '最多上传3张图片',
				},
			],
		}
		vm.option = _option;
}
