| | |
| | | </u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="九小场所:" labelWidth="100" prop="isNine" :required="isRequired"> |
| | | <u-radio-group v-model="form.isNine"> |
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" |
| | | :key="index" :label="item.name" :name="item.id"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | <!-- <view class="f-30" v-if="currentId"> |
| | | {{form.isNine == 1?"是":"否"}} |
| | | </view> --> |
| | | </u-form-item> |
| | | <u-form-item v-if="form.isNine == 1" @click="showNineTypeSelector" class="form-item" |
| | | labelWidth="100" label="九小场所类型:" :required="isRequired" :disabled="isDisabled" prop="nineType"> |
| | | <u-input border="none" v-model="nineTypeValue" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | </u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="阵地:" labelWidth="100" prop="isFront" :required="isRequired"> |
| | | <u-radio-group v-model="form.isFront"> |
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" |
| | | :key="index" :label="item.name" :name="item.id"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | <!-- <view class="f-30" v-if="currentId"> |
| | | {{form.isFront == 1?"是":"否"}} |
| | | </view> --> |
| | | </u-form-item> |
| | | <u-form-item v-if="form.isFront == 1" @click="showFrontTypePicker = true" class="form-item" |
| | | labelWidth="100" label="阵地类型:" :required="isRequired" :disabled="isDisabled" prop="frontType"> |
| | | <u-input border="none" v-model="frontTypeValue" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | </u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <!-- <view v-if="showLabelList.length" class="label" style="border-bottom:1px solid eff1f3;"> |
| | | <view v-for="(item,index) in showLabelList" :key="index" class="activeLabel"> |
| | | <u-tag :closable="currentId?false:true" :show="!item.isClose" size="mini" |
| | | @close="delTag(item)" :text="item.text"></u-tag> |
| | | </view> |
| | | </view> --> |
| | | <!-- <view v-if="categoryValue.length" class="label" style="border-bottom:1px solid eff1f3;"> |
| | | <view v-for="(item,index) in categoryValue" :key="index" class="activeLabel"> |
| | | <u-tag :closable="currentId?false:true" size="mini" |
| | | @close="delTag()" :text="item.categoryName"></u-tag> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <u-form-item label="三级消防单位" labelWidth="100" prop="threeFireProtection" :required="isRequired"> |
| | | <u-radio-group v-model="form.threeFireProtection"> |
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" |
| | | :key="index" :label="item.name" :name="item.id"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" label="无诈类别:" :required="isRequired" |
| | | :disabled="isDisabled" prop="noExplosionCategory"> |
| | | <view class="flex j-c-s-b a-i-c" @click="showNotSwindleTypePicker= true"> |
| | | <u-input border="none" v-model="notSwindleValue" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | </u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </view> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" label="备注:" prop="remark"> |
| | | <u--input border="none" v-model="form.remark" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | |
| | | <u-form-item label="经纬度:" prop="location" labelWidth="100"> |
| | | <view class="address-row flex j-c-s-b a-i-c"> |
| | |
| | | </view> |
| | | |
| | | <view class="item"> |
| | | <view class="box-title"> |
| | | <box-title title="负责人信息"></box-title> |
| | | <view class="flex j-c-s-b a-i-c"> |
| | | <view class="box-title" style="width:50%;"> |
| | | <box-title title="负责人信息"></box-title> |
| | | </view> |
| | | <!-- #ifdef MP-WEIXIN --> |
| | | <ocr-navigator @onSuccess="recognizeSuccess($event,'principal')" certificateType="idCard" |
| | | :opposite="false"> |
| | | <view class="recognize-btn flex a-i-c"> |
| | | <u-icon name="scan" color="#fff" size="24"></u-icon> |
| | | <text class="f-26 c-ff" style="margin-left: 10rpx;">身份证信息识别</text> |
| | | </view> |
| | | </ocr-navigator> |
| | | <!-- #endif --> |
| | | </view> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="场所负责人:" prop="principal"> |
| | |
| | | <u--input border="none" type="number" v-model="form.principalPhone" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="身份证号:" prop="principalIdCard"> |
| | | <u--input border="none" type="idcard" v-model="form.principalIdCard" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | </view> |
| | | |
| | | |
| | | <view class="item"> |
| | | <view class="flex j-c-s-b a-i-c"> |
| | | <view class="box-title" style="width:50%;"> |
| | | <box-title title="法人信息"></box-title> |
| | | </view> |
| | | <!-- #ifdef MP-WEIXIN --> |
| | | <ocr-navigator @onSuccess="recognizeSuccess($event,'legal')" certificateType="idCard" |
| | | :opposite="false"> |
| | | <view class="recognize-btn flex a-i-c"> |
| | | <u-icon name="scan" color="#fff" size="24"></u-icon> |
| | | <text class="f-26 c-ff" style="margin-left: 10rpx;">身份证信息识别</text> |
| | | </view> |
| | | </ocr-navigator> |
| | | <!-- #endif --> |
| | | </view> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="姓名:" prop="legalPerson"> |
| | | <u--input border="none" v-model="form.placeExtEntity.legalPerson" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="身份证号:" prop="legalIdCard"> |
| | | <u--input border="none" type="idcard" v-model="form.placeExtEntity.legalIdCard" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="手机号:" prop="legalTel"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.legalTel" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="item"> |
| | | <view class="flex j-c-s-b a-i-c"> |
| | | <view class="box-title" style="width:50%;"> |
| | | <box-title title="房东信息"></box-title> |
| | | </view> |
| | | <!-- #ifdef MP-WEIXIN --> |
| | | <ocr-navigator @onSuccess="recognizeSuccess($event)" certificateType="idCard" :opposite="false"> |
| | | <view class="recognize-btn flex a-i-c"> |
| | | <u-icon name="scan" color="#fff" size="24"></u-icon> |
| | | <text class="f-26 c-ff" style="margin-left: 10rpx;">身份证信息识别</text> |
| | | </view> |
| | | </ocr-navigator> |
| | | <!-- #endif --> |
| | | </view> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="姓名:" prop="landlordName"> |
| | | <u--input border="none" v-model="form.placeExtEntity.landlordName" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="身份证号:" prop="landlordIdCard"> |
| | | <u--input border="none" type="idcard" v-model="form.placeExtEntity.landlordIdCard" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="手机号:" prop="landlordPhone"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.landlordPhone" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="微信号:" prop="landlordWxAccount"> |
| | | <u--input border="none" v-model="form.placeExtEntity.landlordWxAccount" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | </view> |
| | | |
| | | <view class="item" v-if="form.label == 160102 || form.label == 160103"> |
| | | <view class="flex j-c-s-b a-i-c"> |
| | | <view class="box-title" style="width:50%;"> |
| | | <box-title title="学校信息"></box-title> |
| | | </view> |
| | | </view> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="学生人数:" prop="studentNumber"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.studentNumber" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="教职工人数:" prop="workersNumber"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.workersNumber" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="专职保安:" prop="securityNumber"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.securityNumber" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="专职门卫:" prop="guardNumber"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.guardNumber" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="专兼职保卫人员:" prop="temporarySecurityNumber"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.temporarySecurityNumber" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="走读/寄宿:" prop="dayStudentsNumber"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.dayStudentsNumber" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="住校生人数:" prop="residentialStudentsNumber"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.residentialStudentsNumber" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="宿舍管理人员:" prop="housemasterNumber"> |
| | | <u--input border="none" type="number" v-model="form.placeExtEntity.housemasterNumber" |
| | | placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | </view> |
| | | |
| | | |
| | | <view class="item pic"> |
| | | <view class="box-title"> |
| | |
| | | </u-upload> |
| | | </view> |
| | | </u-form> |
| | | |
| | | <view class="practitioner"> |
| | | <view style="padding:20rpx 30rpx;"> |
| | | <box-title title="从业人员信息"></box-title> |
| | | </view> |
| | | <view class="info" v-for="(item, index) in personNumArr" :key="index"> |
| | | <view class="flex a-i-c j-c-s-b" style="padding:20rpx;"> |
| | | <view class="flex j-c-s-b a-i-c"> |
| | | <view class="title fw" style="text-align:center; mr-20">人员信息-#{{ index*1 + 1 }}</view> |
| | | <!-- #ifdef MP-WEIXIN --> |
| | | <ocr-navigator @onSuccess="recognizePersonSuccess($event,index)" certificateType="idCard" |
| | | :opposite="false"> |
| | | <view class="recognize-btn flex a-i-c"> |
| | | <u-icon name="scan" color="#fff" size="24"></u-icon> |
| | | <text class="f-26 c-ff" style="margin-left: 10rpx;">身份证信息识别</text> |
| | | </view> |
| | | </ocr-navigator> |
| | | <!-- #endif--> |
| | | </view> |
| | | <view> |
| | | <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" /> |
| | | </view> |
| | | </view> |
| | | <formItem ref="formItemRef"></formItem> |
| | | </view> |
| | | |
| | | <view class="add-person" style="padding:20rpx 30rpx;"> |
| | | <u-button type="success" plain @click="addPerson">再加一人</u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="item" v-if="currentId"> |
| | | <view class="box-title"> |
| | | <box-title title="综治网格"> |
| | | <template slot="titleMore"> |
| | | <view class="title-more"> |
| | | <view class="red item"></view> |
| | | <view class="orange item"></view> |
| | | <view class="green item"></view> |
| | | </view> |
| | | </template> |
| | | </box-title> |
| | | </view> |
| | | <lineItem :dataInfo="comprehensiveData.basic"> |
| | | </lineItem> |
| | | <!-- <view class="bgc-ff flex j-c-s-b a-i-c" @click="navTo(1)" style="padding:20rpx;"> |
| | | <text>历史事件</text> |
| | | <u-icon name="arrow-right"></u-icon> |
| | | </view> --> |
| | | |
| | | <lineItem :dataInfo="comprehensiveData.scene"> |
| | | <template v-slot:pic="{scope}"> |
| | | <view class="image" v-if="scope.value !== ''"> |
| | | <u--image @click="imgPreview(scope.value)" width="200rpx" height="200rpx" |
| | | :src="scope.value"></u--image> |
| | | </view> |
| | | <view class="" v-else> |
| | | {{scope.value}} |
| | | </view> |
| | | </template> |
| | | </lineItem> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="item" v-if="currentId"> |
| | | <view class="box-title"> |
| | | <box-title title="公安网格"> |
| | | <template slot="titleMore"> |
| | | <view class="title-more"> |
| | | <view class="red item"></view> |
| | | <view class="orange item"></view> |
| | | <view class="green item"></view> |
| | | </view> |
| | | </template> |
| | | </box-title> |
| | | </view> |
| | | <lineItem :dataInfo="publicData.basic"> |
| | | </lineItem> |
| | | <!-- <view class="bgc-ff flex j-c-s-b a-i-c" @click="navTo(2)" style="padding:20rpx;"> |
| | | <text>历史事件</text> |
| | | <u-icon name="arrow-right"></u-icon> |
| | | </view> --> |
| | | |
| | | <lineItem :dataInfo="publicData.scene"> |
| | | <template v-slot:pic="{scope}"> |
| | | {{scope.value}} |
| | | </template> |
| | | </lineItem> |
| | | </view> |
| | | </view> |
| | | <footer-btn @click="submit" text="保存" /> |
| | | <u-picker :show="showPicker" :defaultIndex="defaultIndex" ref="uPicker" keyName="name" :loading="pickerLoading" |
| | | :columns="pickColumns" @change="changeHandler" @confirm="confirmPicker" |
| | | @cancel="showPicker = false"></u-picker> |
| | | |
| | | <u-picker :show="showNineTypePicker" :defaultIndex="nineTypeIndex" ref="uPicker" keyName="name" |
| | | :loading="pickerLoading" :columns="[nineTypeList]" @confirm="confirmNineTypePicker" |
| | | @cancel="showNineTypePicker = false"></u-picker> |
| | | |
| | | <!-- <u-picker :show="showPicker" :defaultIndex="defaultIndex" ref="uPicker" keyName="name" :loading="pickerLoading" |
| | | :columns="pickColumns" @change="changeHandler" @confirm="confirmPicker" |
| | | @cancel="showPicker = false"></u-picker> --> |
| | | |
| | | <u-picker :show="showFrontTypePicker" :defaultIndex="frontTypeIndex" ref="uPicker" keyName="name" |
| | | :loading="pickerLoading" :columns="[frontTypeList]" @confirm="confirmFrontTypePicker" |
| | | @cancel="showFrontTypePicker = false"></u-picker> |
| | | |
| | | <u-picker :show="isShowCatePicker" :defaultIndex="categoryIndex" ref="catePicker" keyName="categoryName" |
| | | :columns="categoryList" @confirm="confirmCategory" @change="changeCategory" |
| | | @cancel="isShowCatePicker = false"></u-picker> |
| | | |
| | | |
| | | <u-picker :defaultIndex="nationTypeListIndex" :closeOnClickOverlay="true" :show="showNationPicker" |
| | | :columns="[nationTypeList]" @close="showNationPicker = false" @cancel="showNationPicker = false" |
| | | keyName="name" @confirm="confirmNation"></u-picker> |
| | | |
| | | <u-picker :defaultIndex="genderIndex" :closeOnClickOverlay="true" :show="showGenderPicker" :columns="[gender]" |
| | | @close="showGenderPicker = false" @cancel="showGenderPicker = false" keyName="name" |
| | | @confirm="confirmGender"></u-picker> |
| | | |
| | | <u-picker :defaultIndex="notSwindleTypeIndex" :closeOnClickOverlay="true" :show="showNotSwindleTypePicker" |
| | | :columns="[notSwindleTypeList]" @close="showNotSwindleTypePicker = false" |
| | | @cancel="showNotSwindleTypePicker = false" keyName="name" @confirm="confirmNotSwindleType"></u-picker> |
| | | |
| | | <cate-selector ref="selector" @comfirm="comfirmNineType" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import uploadMixin from "@/mixin/uploadMixin"; |
| | | import uploadMixin from "@/mixin/uploadMixinPlace"; |
| | | import lineItem from "@/subPackage/workbench/components/lineItem.vue" |
| | | import { |
| | | getLabelCate |
| | |
| | | getDoorplateAddressList |
| | | } from "@/api/doorplateAddress/doorplateAddress"; |
| | | import { |
| | | add, |
| | | getPlaceDetail |
| | | } from '@/api/place/place.js' |
| | | import { |
| | | add |
| | | } from "@/api/place/place"; |
| | | import { |
| | | format |
| | |
| | | import { |
| | | minioBaseUrl |
| | | } from "../../../common/setting"; |
| | | import { |
| | | bizDictionary, |
| | | bizDictionaryTree |
| | | } from '@/api/system/dict.js' |
| | | |
| | | import cateSelector from "../components/cateSelector.vue" |
| | | |
| | | import { |
| | | getQrCodeDetail |
| | | } from "@/api/system/index" |
| | | |
| | | import formItem from '../components/formItem.vue' |
| | | export default { |
| | | mixins: [uploadMixin], |
| | | components: { |
| | | lineItem, |
| | | boxTitle |
| | | boxTitle, |
| | | cateSelector, |
| | | formItem |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | placeName: "", |
| | | principal: '', |
| | | principalPhone: '', |
| | | principalIdCard: '', |
| | | lat: '', |
| | | lng: '', |
| | | location: '' |
| | | location: '', |
| | | isNine: "", |
| | | isFront: "", |
| | | frontType: "", |
| | | nineType: "", |
| | | threeFireProtection: "", |
| | | noExplosionCategory: "", |
| | | placeExtEntity: { |
| | | landlordName: "", |
| | | landlordIdCard: "", |
| | | landlordPhone: "", |
| | | landlordWxAccount: "", |
| | | legalPerson: "", |
| | | legalTel: "", |
| | | legalIdCard: "", |
| | | placeId: "", |
| | | |
| | | studentNumber: "", |
| | | workersNumber: "", |
| | | securityNumber: "", |
| | | guardNumber: "", |
| | | temporarySecurityNumber: "", |
| | | dayStudentsNumber: "", |
| | | residentialStudentsNumber: "", |
| | | housemasterNumber: "" |
| | | |
| | | } |
| | | }, |
| | | rules: { |
| | | // 'buildingCode': { |
| | |
| | | // message: '请选择楼栋', |
| | | // trigger: ['blur', 'change'] |
| | | // }, |
| | | 'form.isNine': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '是否九小场所', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'form.placeName': { |
| | | type: 'string', |
| | | required: true, |
| | |
| | | trigger: ['change', 'blur'] |
| | | |
| | | } |
| | | |
| | | ], |
| | | 'form.principalIdCard': [{ |
| | | type: 'string', |
| | | required: false, |
| | | message: '请输入身份证号码', |
| | | trigger: ['change', 'blur'] |
| | | }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | const idCardRegex = |
| | | /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/ |
| | | return idCardRegex.test(value) |
| | | }, |
| | | message: '身份证号码有误', |
| | | trigger: ['change', 'blur'] |
| | | } |
| | | ], |
| | | }, |
| | | |
| | |
| | | // name: 'username', |
| | | // value: "未完善", |
| | | // }, |
| | | { |
| | | label: "采集人", |
| | | name: 'createUserName', |
| | | value: "未完善" |
| | | }, |
| | | { |
| | | label: "采集时间", |
| | | name: 'createTime', |
| | | value: "未完善" |
| | | }, |
| | | // { |
| | | // label: "采集人", |
| | | // name: 'createUserName', |
| | | // value: "未完善" |
| | | // }, |
| | | // { |
| | | // label: "采集时间", |
| | | // name: 'createTime', |
| | | // value: "未完善" |
| | | // }, |
| | | // { |
| | | // label: "历史事件", |
| | | // value: "未完善", |
| | |
| | | secondId: "", |
| | | categoryValue: "", |
| | | houseCode: "", |
| | | from: "" |
| | | statusList: [{ |
| | | name: "是", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "否", |
| | | id: 2 |
| | | } |
| | | ], |
| | | nineTypeList: [], //九小类型 |
| | | frontTypeList: [], //阵地 |
| | | nineTypeIndex: [0], |
| | | frontTypeIndex: [0], |
| | | showNineTypePicker: false, |
| | | showFrontTypePicker: false, |
| | | nineTypeValue: "", |
| | | frontTypeValue: "", |
| | | isView: false, |
| | | |
| | | nationTypeList: [], //民族 |
| | | nationTypeIndex: [0], |
| | | nationValue: "", |
| | | gender: [{ //性别 |
| | | value: 1, |
| | | name: '男', |
| | | }, |
| | | { |
| | | value: 0, |
| | | name: '女', |
| | | } |
| | | ], |
| | | genderIndex: [0], |
| | | genderValue: "", |
| | | showNationPicker: false, |
| | | showGenderPicker: false, |
| | | personNum: 0, |
| | | personNumArr: [], |
| | | notSwindleTypeList: [], |
| | | notSwindleIndex: [0], |
| | | notSwindleValue: "", |
| | | showNotSwindleTypePicker: false |
| | | } |
| | | }, |
| | | created() { |
| | | this.buildColumn() |
| | | }, |
| | | options: { |
| | | styleIsolation: 'shared', // 解除样式隔离 |
| | | }, |
| | | onLoad(option) { |
| | | async onLoad(option) { |
| | | console.log("option===>", option); |
| | | await this.getCategory(); |
| | | await this.getAllBizDict(); |
| | | // this.getNineTypeList(); |
| | | |
| | | const { |
| | | type |
| | | } = option |
| | |
| | | if (option.id || option.houseCode) { |
| | | this.getBuildingDetail() |
| | | } |
| | | this.getCategory(); |
| | | this.getCurrentLocation(); |
| | | // this.getCategory(); |
| | | }, |
| | | |
| | | watch: { |
| | |
| | | }, |
| | | immediate: true |
| | | } |
| | | |
| | | // secondId:{ |
| | | // handler(newVal,oldVal){ |
| | | // this.getCategory(3,this.secondId); |
| | | // }, |
| | | // immediate:true |
| | | // } |
| | | |
| | | }, |
| | | onReady() { |
| | | this.$refs.form.setRules(this.rules) |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | // getBuildingDetail(params = {}) { |
| | | // getDoorplateAddressDetail(Object.assign(params, { |
| | | // stdId: this.stdId |
| | | // })).then(res => { |
| | | // let data = res.data |
| | | // this.form.buildingCode = data.buildingCode |
| | | |
| | | // let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName, |
| | | // data.buildingName |
| | | // ] |
| | | // let arr = buildingNameArr.filter(e => { |
| | | // return e != null || e != '' |
| | | // }) |
| | | async getAllBizDict() { |
| | | // 获取九小场所类型 |
| | | // await this.getBizDict('nineType', this.nineTypeList) |
| | | // 获取阵地 |
| | | await this.getBizDict('frontType', this.frontTypeList) |
| | | // 获取民族 |
| | | await this.getBizDict('nationType', this.nationTypeList); |
| | | //反诈类别 |
| | | await this.getBizDict('noExplosionCategory', this.notSwindleTypeList); |
| | | }, |
| | | |
| | | // // 赋值 |
| | | // // this.form.placeName = data['placeName'] |
| | | // Object.keys(this.form).forEach(key => { |
| | | // if (!data[key]) { |
| | | // this.form[key] = data.place[key] |
| | | // } else { |
| | | // this.form[key] = data[key] |
| | | // } |
| | | // }) |
| | | // 获取业务字典 |
| | | async getBizDict(code, list) { |
| | | const param = { |
| | | code: code |
| | | } |
| | | const res = await bizDictionary(param) |
| | | res.data.forEach(e => { |
| | | list.push({ |
| | | name: e.dictValue, |
| | | value: Number(e.dictKey) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | // this.form.building = arr.join("") |
| | | getNineTypeList() { |
| | | bizDictionaryTree({ |
| | | code: "nineType" |
| | | }).then(res => { |
| | | console.log(res.data); |
| | | }) |
| | | }, |
| | | |
| | | // Object.keys(this.comprehensiveData).forEach(key => { |
| | | // this.comprehensiveData[key].forEach(item => { |
| | | // if (!data[item.name]) { |
| | | // item.value = data.place[item.name] || '未完善' |
| | | // } else { |
| | | // item.value = data[item.name] || '未完善' |
| | | // } |
| | | // }) |
| | | // this.publicData[key].forEach(item => { |
| | | // if (!data[item.name]) { |
| | | // item.value = data.place[item.name] || '未完善' |
| | | // } else { |
| | | // item.value = data[item.name] || '未完善' |
| | | // } |
| | | // }) |
| | | // }) |
| | | // }) |
| | | // }, |
| | | showNineTypeSelector() { |
| | | this.$refs.selector.open(); |
| | | }, |
| | | |
| | | navTo(type) { |
| | | if (type == 1) { |
| | |
| | | |
| | | // 当第一列值发生变化时,变化第二列(后一列)对应的选项 |
| | | if (columnIndex === 0) { |
| | | // picker为选择器this实例,变化第二列对应的选项 |
| | | // picker.setColumnValues(1, this.categoryList[index]) |
| | | |
| | | this.firstId = e.value[columnIndex].categoryNo; |
| | | // this.secondId = this.categoryList[1][0].categoryNo; |
| | | // this.getCategory(2,this.firstId); |
| | | } |
| | | // else if ( columnIndex === 1){ |
| | | // picker.setColumnValues(2, this.categoryList[index]) |
| | | // this.secondId = e.value[columnIndex].categoryNo; |
| | | // this.getCategory(3,this.secondId) |
| | | // } |
| | | |
| | | }, |
| | | |
| | | getBuildingDetail(params = {}) { |
| | |
| | | id: this.currentId |
| | | } |
| | | } |
| | | uni.showLoading({ |
| | | title: "加载中..." |
| | | }) |
| | | getPlaceDetail({ |
| | | ...params, |
| | | ...idorCodeParams |
| | |
| | | code, |
| | | data |
| | | }) => { |
| | | uni.hideLoading(); |
| | | if (code !== 200) { |
| | | uni.showToast({ |
| | | title: "数据加载失败", |
| | |
| | | }) |
| | | return |
| | | } |
| | | this.houseCode = data.houseCode; |
| | | const placePractitioner = data?.placePractitioner || [] |
| | | this.personNum = placePractitioner.length |
| | | this.personNumArr = placePractitioner; |
| | | this.source = data.source; |
| | | // this.houseCode = data.houseCode; |
| | | const dpaEntity = data?.doorplateAddressEntity || {} |
| | | const gridEntity = data?.grid || {} |
| | | // this.form.buildingCode = dpaEntity?.buildingCode || '' |
| | |
| | | let arr = buildingNameArr.filter(e => { |
| | | return e != null || e != '' |
| | | }) |
| | | |
| | | console.log("data===>", data); |
| | | this.form.placeName = data['placeName'] || '' |
| | | Object.keys(this.form).forEach(key => { |
| | | if (!data[key]) { |
| | | if (!data[key] && key != "placeExtEntity") { |
| | | // this.form[key] = dpaEntity[key] || '未完善' |
| | | this.form[key] = dpaEntity[key] |
| | | } else if (key == "placeExtEntity") { |
| | | if (data.placeExtEntity) { |
| | | this.form.placeExtEntity = data.placeExtEntity; |
| | | } else { |
| | | this.form.placeExtEntity = { |
| | | landlordName: "", |
| | | landlordIdCard: "", |
| | | landlordPhone: "", |
| | | landlordWxAccount: "", |
| | | legalPerson: "", |
| | | legalTel: "", |
| | | legalIdCard: "", |
| | | placeId: "", |
| | | } |
| | | } |
| | | } else { |
| | | // this.form[key] = data[key] || '未完善' |
| | | |
| | | console.log(1111) |
| | | this.form[key] = data[key] |
| | | } |
| | | if (key === "images") { |
| | |
| | | this.form.images = [] |
| | | } |
| | | } |
| | | |
| | | if (key == "isNine") { |
| | | // let { |
| | | // index, |
| | | // name |
| | | // } = this.$getIndex(this.nineTypeList, data.nineType, "value", "name"); |
| | | // this.nineTypeIndex = index; |
| | | // this.nineTypeValue = name; |
| | | if (!data.isNine) { |
| | | this.form.isNine = 2; |
| | | } else { |
| | | if (data.isNine == 1) { |
| | | this.$refs.selector.showDefault(data.nineType) |
| | | setTimeout(() => { |
| | | if (this.$refs.selector.selectedItem.childrenId) { |
| | | this.nineTypeValue = this.$refs.selector.selectedItem |
| | | .childrenName |
| | | } else { |
| | | this.nineTypeValue = this.$refs.selector.selectedItem |
| | | .parentName; |
| | | } |
| | | }, 200) |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (key == "isFront") { |
| | | if (!data.isFront) { |
| | | this.form.isFront = 2; |
| | | } else { |
| | | if (data.isFront == 1) { |
| | | let { |
| | | index, |
| | | name |
| | | } = this.$getIndex(this.frontTypeList, data.frontType, "value", |
| | | "name"); |
| | | this.frontTypeIndex = index; |
| | | this.frontTypeValue = name; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (key == "legalGender" && data.legalGender) { |
| | | let { |
| | | index, |
| | | name |
| | | } = this.$getIndex(this.gender, data.legalGender, "value", |
| | | "name"); |
| | | this.genderIndex = index; |
| | | this.genderValue = name; |
| | | } |
| | | |
| | | if (key == "ethnicity" && data.ethnicity) { |
| | | let { |
| | | index, |
| | | name |
| | | } = this.$getIndex(this.nationTypeList, data.ethnicity, "value", |
| | | "name"); |
| | | this.nationTypeIndex = index; |
| | | this.nationValue = name; |
| | | } |
| | | if (key == "noExplosionCategory" && data.noExplosionCategory) { |
| | | let { |
| | | index, |
| | | name |
| | | } = this.$getIndex(this.notSwindleTypeList, data.noExplosionCategory, "value", |
| | | "name") |
| | | this.notSwindleIndex = [index]; |
| | | this.notSwindleValue = name; |
| | | } |
| | | |
| | | |
| | | }) |
| | | this.form.jwd = `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}` |
| | | this.$set(this.form, "jwd", `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`) |
| | | this.form.building = arr.join("") |
| | | let labelList = data.placePoiLabelVOList; |
| | | let tempLabelList = []; |
| | |
| | | this.firstId = tempLabelList[0].poiCode; |
| | | this.categoryValue = tempLabelList[1].labelName; |
| | | this.form.label = tempLabelList[1].poiCode |
| | | setTimeout(() => { |
| | | let firstIndex = this.categoryList[0].findIndex(i => i.categoryNo == |
| | | tempLabelList[0].poiCode) |
| | | let childIndex = this.categoryList[1].findIndex(i => i.categoryNo == |
| | | tempLabelList[1].poiCode) |
| | | this.categoryIndex = [firstIndex, childIndex] |
| | | }, 500) |
| | | // setTimeout(() => { |
| | | let firstIndex = this.categoryList[0].findIndex(i => i.categoryNo == |
| | | tempLabelList[0].poiCode) |
| | | let childIndex = this.categoryList[1].findIndex(i => i.categoryNo == |
| | | tempLabelList[1].poiCode) |
| | | this.categoryIndex = [firstIndex, childIndex] |
| | | // }, 500) |
| | | |
| | | |
| | | Object.keys(this.comprehensiveData).forEach(key => { |
| | | this.comprehensiveData[key].forEach(item => { |
| | |
| | | }) |
| | | }) |
| | | |
| | | placePractitioner.forEach((item, index) => { |
| | | this.$nextTick(() => { |
| | | if (item.ethnicity) { |
| | | let obj = this.$getIndex(this.nationTypeList, item.ethnicity, |
| | | "value", "name") |
| | | this.$refs.formItemRef[index].nationValue = obj.name; |
| | | this.$refs.formItemRef[index].nationTypeIndex = obj.index; |
| | | } |
| | | |
| | | if (typeof(item.gender) == 'number') { |
| | | let obj = this.$getIndex(this.$refs.formItemRef[index] |
| | | .gender, item.gender, "value", "name") |
| | | this.$refs.formItemRef[index].genderValue = obj.name; |
| | | this.$refs.formItemRef[index].genderIndex = obj.index; |
| | | } |
| | | if (item.employerImg == "" || item.employerImg == null) { |
| | | item.employerImg = []; |
| | | } else { |
| | | item.employerImg = this.$setImageUrl(item.employerImg, 2) |
| | | } |
| | | |
| | | this.$refs.formItemRef[index].form = item |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | //选择九小场所类型 |
| | | comfirmNineType(val) { |
| | | if (val.childrenId) { |
| | | this.form.nineType = val.childrenId; |
| | | this.nineTypeValue = val.childrenName; |
| | | } else { |
| | | this.form.nineType = val.parentId; |
| | | this.nineTypeValue = val.parentName; |
| | | } |
| | | }, |
| | | |
| | | //表单提交 |
| | | submit() { |
| | | const that = this |
| | | this.$refs.form.validate().then(valid => { |
| | | if (valid) { |
| | | if (this.form?.images?.length > 0) { |
| | | let urls = [] |
| | | this.form.images.forEach(e => { |
| | | urls.push(e.name) |
| | | }) |
| | | this.form.imageUrls = urls.join(",") |
| | | } |
| | | if (!this.form.placeName) { |
| | | this.$showTips("请输入场所名称") |
| | | return |
| | | } |
| | | |
| | | this.form.roleName = uni.getStorageSync("activeRole").roleName; |
| | | add(this.form).then(res => { |
| | | uni.showToast({ |
| | | icon: 'success', |
| | | title: '保存成功' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 300) |
| | | }) |
| | | } |
| | | if (!this.form.label) { |
| | | this.$showTips("请选择标签") |
| | | return |
| | | } |
| | | // this.$refs.form.validate().then(valid => { |
| | | // if (valid) { |
| | | if (this.form.images.length) { |
| | | let urls = [] |
| | | this.form.images.forEach(e => { |
| | | urls.push(e.name) |
| | | }) |
| | | this.form.imageUrls = urls.join(",") |
| | | } else { |
| | | this.form.imageUrls = "" |
| | | } |
| | | |
| | | this.form.roleName = uni.getStorageSync("activeRole").roleName; |
| | | if (this.form.isNine == 2 && this.form.nineType) { |
| | | this.form.nineType = ""; |
| | | } |
| | | if (this.form.isFront == 2 && this.form.frontType) { |
| | | this.form.frontType = ""; |
| | | } |
| | | |
| | | if (this.form.isNine == 1 && !this.form.nineType) { |
| | | this.$showTips("请选择九小场所类型") |
| | | return |
| | | } |
| | | |
| | | if (this.form.isFront == 1 && !this.form.frontType) { |
| | | this.$showTips("请选择阵地类型") |
| | | return |
| | | } |
| | | this.form.lng = Number(this.form.lng).toFixed(8) |
| | | this.form.lat = Number(this.form.lat).toFixed(8) |
| | | |
| | | delete this.form.images; |
| | | if (this.personNum > 0) { |
| | | const placePractitioner = [] |
| | | this.$refs.formItemRef.forEach(item => { |
| | | item.form.placeId = this.form.placeId |
| | | item.form.employerImg = this.$formattingUrls(item.form.employerImg); |
| | | placePractitioner.push(item.form) |
| | | }) |
| | | this.form.placePractitioner = placePractitioner |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | add(this.form).then(res => { |
| | | this.$showTips("提交成功", "success"); |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 300) |
| | | |
| | | }) |
| | | }, |
| | | |
| | | async buildColumn() { |
| | | //设置街道 |
| | | const townStreet = await this.getDoorplateAddressList(null, "townStreet") |
| | | this.setColumn(townStreet, 0) |
| | | //设置社区 |
| | | const nei = await this.getDoorplateAddressList(townStreet[0]?.code, "nei") |
| | | this.setColumn(nei, 1) |
| | | //设置路 |
| | | const streetRu = await this.getDoorplateAddressList(nei[0]?.code, "streetRu") |
| | | this.setColumn(streetRu, 2) |
| | | //设置地区 |
| | | const district = await this.getDoorplateAddressList(streetRu[0]?.code, "district") |
| | | this.setColumn(district, 3) |
| | | //设置楼栋 |
| | | const building = await this.getDoorplateAddressList(district[0]?.code, "building") |
| | | this.setColumn(building, 4) |
| | | }, |
| | | |
| | | setColumn(data, index) { |
| | | this.$set(this.pickColumns, index, data) |
| | | |
| | | //获取当前位置信息 |
| | | getCurrentLocation() { |
| | | uni.getLocation({ |
| | | type: 'gcj02', // 坐标系类型 |
| | | success: (res) => { |
| | | // var latitude = res.latitude; // 维度 |
| | | // var longitude = res.longitude; // 经度 |
| | | |
| | | // this.form.lng = longitude |
| | | // this.form.lat = latitude |
| | | // this.form.jwd = |
| | | // `${Number(res.longitude).toFixed(6)},${Number(res.latitude).toFixed(6)}` |
| | | }, |
| | | complete: (res) => { |
| | | if (res.latitude) { |
| | | this.$set(this.form, "x", res.longitude) |
| | | this.$set(this.form, "y", res.latitude) |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示!", |
| | | content: `获取定位信息失败 ${res.errMsg}`, |
| | | showCancel: false |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | getLocation() { |
| | |
| | | this.showPicker = false |
| | | }, |
| | | |
| | | async changeHandler(e) { |
| | | const { |
| | | columnIndex, |
| | | index, |
| | | // 微信小程序无法将picker实例传出来,只能通过ref操作 |
| | | picker = this.$refs.uPicker |
| | | } = e |
| | | let item = e.values[columnIndex][index] |
| | | //街道 |
| | | if (columnIndex === 0) { |
| | | //获取社区列表 |
| | | const nei = await this.getDoorplateAddressList(item.code, "nei") |
| | | picker.setColumnValues(1, nei) |
| | | confirmNineTypePicker(e) { |
| | | this.nineTypeIndex = e.indexs; |
| | | this.nineTypeValue = e.value[0].name; |
| | | this.form.nineType = e.value[0].value; |
| | | this.showNineTypePicker = false; |
| | | }, |
| | | |
| | | const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu") |
| | | picker.setColumnValues(2, streetRu) |
| | | confirmFrontTypePicker(e) { |
| | | this.frontTypeIndex = e.indexs; |
| | | this.frontTypeValue = e.value[0].name; |
| | | this.form.frontType = e.value[0].value; |
| | | this.showFrontTypePicker = false; |
| | | }, |
| | | |
| | | const district = await this.getDoorplateAddressList(streetRu[0].code, "district") |
| | | picker.setColumnValues(3, district) |
| | | //选择民族 |
| | | confirmNation(e) { |
| | | this.nationIndex = e.indexs; |
| | | this.nationValue = e.value[0].name; |
| | | this.form.placeExtEntity.ethnicity = e.value[0].value; |
| | | this.showNationPicker = false; |
| | | }, |
| | | |
| | | const building = await this.getDoorplateAddressList(district[0].code, "building") |
| | | picker.setColumnValues(4, building) |
| | | } |
| | | //选择性别 |
| | | confirmGender(e) { |
| | | this.genderIndex = e.indexs; |
| | | this.genderValue = e.value[0].name; |
| | | this.form.placeExtEntity.legalGender = e.value[0].value; |
| | | this.showGenderPicker = false; |
| | | }, |
| | | |
| | | if (columnIndex === 1) { |
| | | const streetRu = await this.getDoorplateAddressList(item.code, "streetRu") |
| | | picker.setColumnValues(2, streetRu) |
| | | |
| | | const district = await this.getDoorplateAddressList(streetRu[0].code, "district") |
| | | picker.setColumnValues(3, district) |
| | | |
| | | const building = await this.getDoorplateAddressList(district[0].code, "building") |
| | | picker.setColumnValues(4, building) |
| | | } |
| | | |
| | | if (columnIndex === 2) { |
| | | |
| | | const district = await this.getDoorplateAddressList(item.code, "district") |
| | | picker.setColumnValues(3, district) |
| | | |
| | | const building = await this.getDoorplateAddressList(district[0].code, "building") |
| | | picker.setColumnValues(4, building) |
| | | } |
| | | |
| | | if (columnIndex === 3) { |
| | | const building = await this.getDoorplateAddressList(item.code, "building") |
| | | picker.setColumnValues(4, building) |
| | | } |
| | | |
| | | //选择无诈类别 |
| | | confirmNotSwindleType(e) { |
| | | this.notSwindleIndex = e.indexs; |
| | | this.notSwindleValue = e.value[0].name; |
| | | this.form.noExplosionCategory = e.value[0].value; |
| | | this.showNotSwindleTypePicker = false; |
| | | }, |
| | | |
| | | //弹出层打开 |
| | |
| | | urls: minioBaseUrl + [value], |
| | | }) |
| | | }, |
| | | |
| | | addPerson() { |
| | | this.personNum++ |
| | | this.personNumArr.push(1) |
| | | }, |
| | | |
| | | deletePerson(index) { |
| | | this.personNum--; |
| | | this.personNumArr.splice(index, 1) |
| | | }, |
| | | |
| | | //识别成功 |
| | | recognizeSuccess(e, key) { |
| | | let { |
| | | detail: { |
| | | name, |
| | | id, |
| | | address, |
| | | gender, |
| | | nationality |
| | | } |
| | | } = e; |
| | | |
| | | if (key == "principal") { //负责人 |
| | | this.form.principal = name.text; |
| | | this.form.principalIdCard = id.text; |
| | | } else if (key == "legal") { //法人 |
| | | this.form.placeExtEntity.legalPerson = name.text; |
| | | this.form.placeExtEntity.legalIdCard = id.text; |
| | | } else { //房东 |
| | | this.form.placeExtEntity.landlordName = name.text; |
| | | this.form.placeExtEntity.landlordIdCard = id.text; |
| | | } |
| | | }, |
| | | |
| | | //识别从业人员身份证信息 |
| | | recognizePersonSuccess(e, index) { |
| | | let { |
| | | detail: { |
| | | name, |
| | | id, |
| | | address, |
| | | gender, |
| | | nationality |
| | | } |
| | | } = e; |
| | | |
| | | this.$refs.formItemRef[index].form.name = name.text; //姓名 |
| | | this.$refs.formItemRef[index].form.idCard = id.text; //身份证号 |
| | | this.$refs.formItemRef[index].genderValue = gender.text; //性别 |
| | | this.$refs.formItemRef[index].nationValue = `${nationality.text}族`; //民族 |
| | | this.$refs.formItemRef[index].form.gender = this.getValue(this.gender, gender.text).value; |
| | | this.$refs.formItemRef[index].form.ethnicity = this.getValue(this.nationTypeList, `${nationality.text}族`) |
| | | .value; |
| | | this.$refs.formItemRef[index].gender = [this.getValue(this.gender, gender.text).index]; |
| | | this.$refs.formItemRef[index].nationTypeIndex = [this.getValue(this.nationTypeList, `${nationality.text}族`) |
| | | .index |
| | | ]; |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | | getValue(arr, name) { |
| | | for (let i = 0, ii = arr.length; i < ii; i++) { |
| | | if (arr[i].name == name) { |
| | | return { |
| | | index: i, |
| | | value: arr[i].value |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | background-color: #fff; |
| | | text-align: center; |
| | | } |
| | | |
| | | |
| | | .practitioner { |
| | | background-color: #fff; |
| | | border-radius: 8rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .recognize-btn { |
| | | padding: 12rpx; |
| | | border-radius: 6rpx; |
| | | background-color: #3c9cff; |
| | | margin-left: 30rpx; |
| | | } |
| | | </style> |