| | |
| | | // import AvueMap from "avue-plugin-map"; |
| | | export default { |
| | | data () { |
| | | |
| | | //手机号格式校验 |
| | | let validatorPhone = function (rule, value, callback) { |
| | | if (value) { |
| | | if (!/^1[3456789]\d{9}$/.test(value)) { |
| | | callback(new Error('手机号格式有误!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | callback() |
| | | } |
| | | |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | searchSpan: 4, |
| | | width: 100, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入事件名称", |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事件类型", |
| | | prop: "type", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | dataType: "number", |
| | | type: "select", |
| | | width: 100, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=eCallEventType", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | },], |
| | | // search: true, |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | prop: "communityCode", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | width: 150, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | label: "所属社区", |
| | | hide: true, |
| | | parent: false, |
| | | prop: "communityCode", |
| | | search: false, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/tree", |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | value: "id", |
| | | }, |
| | | rules: [ |
| | | { |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | label: "数据来源", |
| | | prop: "source", |
| | |
| | | // search: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "姓名", |
| | | prop: "realName", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | rules: [{ |
| | | required: false, |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | span: 12, |
| | | width: 100, |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | { |
| | | label: "事发地点", |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事发时间", |
| | | prop: "occurrenceTime", |
| | | width: 100, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "现场图片", |
| | | prop: "imageUrls", |
| | | width: 80, |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler (val) { |
| | | if (typeof val == "string") { |
| | | console.log(val, 7777) |
| | | var arr = val.split(",") |
| | | console.log(val, 88888) |
| | | //经纬度替换 |
| | | this.form.lat = arr[1] |
| | | this.form.lng = arr[0] |
| | | // this.form.location = arr[2]; |
| | | this.form.address = arr[2] |
| | | } |
| | | }, |
| | | immediate: true, |