| | |
| | | <template> |
| | | <view class=""> |
| | | <view class="site-box bgc-ff flex"> |
| | | |
| | | <!-- <view class="site-box bgc-ff flex"> |
| | | <view class="flex a-i-c"> |
| | | <u-icon name="map-fill" color="#AAAAAA"></u-icon> |
| | | <text class="f-28 c-aa ml-20">当前小区:</text> |
| | | </view> |
| | | |
| | | <text class="address f-28">{{ curSelectSite.name }}</text> |
| | | </view> |
| | | <view class="content bgc-ff"> |
| | | <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90" |
| | | :labelStyle="{fontSize:'28rpx'}"> |
| | | <u-form-item label="姓名" prop="realName" borderBottom ref="realName"> |
| | | <u-input v-model="info.realName" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | </view> --> |
| | | <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="100" |
| | | :labelStyle="{fontSize:'28rpx'}"> |
| | | <view class="content bgc-ff mb-20"> |
| | | <u-form-item label="当事人1姓名" prop="nameOne" borderBottom ref="nameOne"> |
| | | <u-input v-model="info.nameOne" border="none" placeholder="请输入当事人1姓名" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="手机" prop="phone" borderBottom ref="phone"> |
| | | <u-input v-model="info.phone" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | <u-form-item label="当事人1手机号" prop="phoneOne" borderBottom ref="phoneOne"> |
| | | <u-input v-model="info.phoneOne" border="none" placeholder="请输入当事人1手机号" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="事发位置" prop="address" :borderBottom="false"> |
| | | <u-form-item label="当事人1性别" prop="genderOne" borderBottom @click="showGenderPicker = true"> |
| | | <u-input v-model="genderValue" border="none" placeholder="请选择当事人1性别" placeholderClass="f-28 c-99" |
| | | inputAlign="right" disabled disabledColor="#ffffff"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="当事人1身份证号码" prop="idCardTwo" borderBottom ref="idCardTwo"> |
| | | <u-input v-model="info.idCardTwo" type="idcard" border="none" placeholder="请输入当事人1身份证号码" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="当事人2姓名" prop="nameTwo" borderBottom ref="nameTwo"> |
| | | <u-input v-model="info.nameTwo" border="none" placeholder="请输入当事人2姓名" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="当事人2性别" prop="genderTwo" borderBottom @click="showGender2Picker = true"> |
| | | <u-input v-model="genderValue2" border="none" placeholder="请选择当事人2性别" placeholderClass="f-28 c-99" |
| | | inputAlign="right" disabled disabledColor="#ffffff"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="当事人2手机" prop="phoneTwo" borderBottom ref="phoneTwo"> |
| | | <u-input v-model="info.phoneTwo" border="none" placeholder="请输入当事人2手机" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="当事人2身份证号码" prop="idCardTwo" ref="idCardTwo"> |
| | | <u-input v-model="info.idCardTwo" type="idcard" border="none" placeholder="请输入当事人2身份证号码" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | </view> |
| | | |
| | | <view class="content bgc-ff"> |
| | | <u-form-item label="事发时间" prop="eventTime" :borderBottom="false" required |
| | | @click="showSelectDate = true"> |
| | | <u-input v-model="info.eventTime" disabled disabledColor="#ffffff" border="none" placeholder="请选择" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="事发位置" prop="address" borderBottom> |
| | | <view class="address-row flex"> |
| | | <view class="address-content f-28" v-if="info.address"> |
| | | {{info.address}} |
| | | </view> |
| | | <view class="address-content f-28 c-99" v-if="!info.address"> |
| | | <view class="address-content f-28" style="color:#c0c4cc;" v-if="!info.address"> |
| | | 请选择地址 |
| | | </view> |
| | | <view class="location-btn c-main f-24" @click="getLocation()"> |
| | | 获取地址 |
| | | </view> |
| | | </view> |
| | | <!-- <u-input v-model="info.address" border="none" placeholderClass="f-28 c-99" |
| | | inputAlign="right" disabled disabledColor="#fff"> |
| | | <template slot="suffix"> |
| | | <button class="location-btn c-main f-24" @click="getLocation()">获取地址</button> |
| | | </template> |
| | | </u-input> --> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | | <u-form-item label="报警次数" prop="alarmNum" borderBottom ref="alarmNum"> |
| | | <u-input v-model="info.alarmNum" border="none" type="number" placeholder="请输入报警次数" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="信息来源" prop="source" borderBottom @click="showSourcePicker = true"> |
| | | <u-input v-model="sourceValue" border="none" placeholder="请选择信息来源" placeholderClass="f-28 c-99" |
| | | inputAlign="right" disabled disabledColor="#ffffff"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <view class="upload bgc-ff"> |
| | | <u-form-item label="纠纷类型" prop="disputeType" borderBottom @click="showDisputeTypePicker = true"> |
| | | <u-input v-model="disputeTypeValue" border="none" placeholder="请选择处理情况" placeholderClass="f-28 c-99" |
| | | inputAlign="right" disabled disabledColor="#ffffff"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="纠纷内容" prop="disputeContent" borderBottom ref="disputeContent"> |
| | | <u-textarea v-model="info.disputeContent" border="none" placeholder="请输入纠纷内容" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-textarea> |
| | | </u-form-item> |
| | | |
| | | |
| | | <u-form-item label="是否有人员受伤:" labelWidth="100" prop="isNine" :required="isRequired" borderBottom> |
| | | <u-radio-group v-model="form.injuryFlag" v-if="!currentId"> |
| | | <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 v-if="form.injuryFlag == 1" label="受伤情况" prop="injuryDesc" borderBottom ref="injuryDesc"> |
| | | <u-textarea v-model="info.injuryDesc" border="none" placeholder="请输入受伤情况" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-textarea> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label="处理情况" prop="handleResult" @click="showHandleResultPicker = true"> |
| | | <u-input v-model="handleResultValue" border="none" placeholder="请选择处理情况" |
| | | placeholderClass="f-28 c-99" inputAlign="right" disabled disabledColor="#ffffff"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | |
| | | </view> |
| | | </u-form> |
| | | <!-- <view class="upload bgc-ff"> |
| | | <view class="f-28 mb-20">描述</view> |
| | | <u-textarea v-model="info.remark" placeholder="请输入内容" border="none" |
| | | placeholderClass="c-99 f-26"></u-textarea> |
| | |
| | | </view> |
| | | </u-upload> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | |
| | | <button class="submit-btn" @click="sumitInfo">提交</button> |
| | | <button class="list-btn" @click="navigatorPage">我上报的事件</button> |
| | | <button class="list-btn" @click="navigatorPage">纠纷记录</button> |
| | | |
| | | |
| | | <u-picker :show="showGenderPicker" :defaultIndex="genderIndex" ref="uPicker" keyName="name" |
| | | :loading="pickerLoading" :columns="[genderList]" @confirm="confirmGender" |
| | | @cancel="showGenderPicker = false"></u-picker> |
| | | <u-picker :show="showGender2Picker" :defaultIndex="genderIndex2" ref="uPicker" keyName="name" |
| | | :loading="pickerLoading" :columns="[genderList]" @confirm="confirmGender2" |
| | | @cancel="showGender2Picker = false"></u-picker> |
| | | |
| | | <u-picker :show="showDisputeTypePicker" :defaultIndex="disputeTypeIndex" ref="uPicker" keyName="name" |
| | | :loading="pickerLoading" :columns="[disputeTypeList]" @confirm="confirmDisputeType" |
| | | @cancel="showDisputeTypePicker = false"></u-picker> |
| | | |
| | | <u-picker :show="showHandleResultPicker" :defaultIndex="handleResultIndex" ref="uPicker" keyName="name" |
| | | :loading="pickerLoading" :columns="[handleResultList]" @confirm="confirmHandleResult" |
| | | @cancel="showHandleResultPicker = false"></u-picker> |
| | | |
| | | <u-picker :show="showSourcePicker" :defaultIndex="sourceIndex" ref="uPicker" keyName="name" |
| | | :loading="pickerLoading" :columns="[sourceList]" @confirm="confirmSource" |
| | | @cancel="showSourcePicker = false"></u-picker> |
| | | |
| | | <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="eventTime" mode="datetime" |
| | | :formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | |
| | | import { |
| | | save |
| | | } from "@/api/task/taskReportForRepairs"; |
| | | import { |
| | | bizDictionary, |
| | | } from '@/api/system/dict.js' |
| | | |
| | | import { |
| | | addContradiction |
| | | } from '@/api/contradiction/contradiction.js' |
| | | |
| | | export default { |
| | | mixins: [uploadMixin], |
| | | data() { |
| | | return { |
| | | info: { |
| | | realName: "", |
| | | phone: "", |
| | | remark: "", |
| | | type: -1, |
| | | nameOne: "", |
| | | nameTwo: "", |
| | | phoneOne: "", |
| | | phoneTwo: "", |
| | | grenderOne: "", |
| | | grenderTwo: "", |
| | | idCardOne: "", |
| | | idCardTwo: "", |
| | | injuryDesc: "", |
| | | injuryFlag: "", |
| | | source: "", |
| | | disputeContent: "", |
| | | alarmNum: "", |
| | | address: "", |
| | | lat: "", |
| | | lng: "" |
| | | lng: "", |
| | | eventTime: "" |
| | | }, |
| | | rules: { |
| | | 'realName': { |
| | |
| | | }, |
| | | desc: "", |
| | | title: "", |
| | | curSelectSite: {} |
| | | curSelectSite: {}, |
| | | statusList: [{ |
| | | name: "是", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "否", |
| | | id: 0 |
| | | } |
| | | ], |
| | | handleResultList: [{ |
| | | name: "已化解", |
| | | value: 1 |
| | | }, |
| | | { |
| | | name: "未化解 ", |
| | | value: 2 |
| | | }, |
| | | { |
| | | name: "移送e呼即办", |
| | | value: 3 |
| | | } |
| | | ], |
| | | genderList: [{ //性别 |
| | | value: 1, |
| | | name: '男', |
| | | }, |
| | | { |
| | | value: 2, |
| | | name: '女', |
| | | } |
| | | ], |
| | | genderIndex: [0], |
| | | genderValue: "", |
| | | genderIndex2: [0], |
| | | genderValue2: "", |
| | | showGenderPicker: false, |
| | | showGender2Picker: false, |
| | | disputeTypeList: [], |
| | | disputeTypeValue: "", |
| | | disputeTypeIndex: [0], |
| | | showDisputeTypePicker: false, |
| | | handleResultValue: "", |
| | | handleResultIndex: [0], |
| | | showHandleResultPicker: false, |
| | | sourceList: [], |
| | | sourceIndex: [0], |
| | | sourceValue: "", |
| | | showSourcePicker: false, |
| | | showSelectDate: false, |
| | | eventTime: Number(new Date()), |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | this.getAllBizDict(); |
| | | this.title = option.title |
| | | uni.setNavigationBarTitle({ |
| | | title: this.title |
| | |
| | | }, |
| | | methods: { |
| | | |
| | | async getAllBizDict() { |
| | | // 获取纠纷 |
| | | await this.getBizDict('disputeType', this.disputeTypeList) |
| | | // 获取来源 |
| | | await this.getBizDict('disputeSource', this.sourceList); |
| | | }, |
| | | |
| | | // 获取业务字典 |
| | | 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) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | getLocation() { |
| | | uni.chooseLocation({ |
| | | success: (res) => { |
| | |
| | | |
| | | |
| | | sumitInfo() { |
| | | const that = this |
| | | this.$refs.form.validate().then(valid => { |
| | | if (this.form.images.length > 0) { |
| | | let urls = [] |
| | | this.form.images.forEach(e => { |
| | | urls.push(e.name) |
| | | }) |
| | | this.info.imageUrls = urls.join(",") |
| | | } |
| | | save(that.info).then(res => { |
| | | uni.showToast({ |
| | | icon: 'success', |
| | | title: '提交成功', |
| | | success() { |
| | | setTimeout(() => { |
| | | that.$u.func.globalNavigator("", "navBack") |
| | | }, 1000) |
| | | } |
| | | }) |
| | | addContradiction(this.info).then(res => { |
| | | this.$showTips("提交成功", "success") |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 300) |
| | | }) |
| | | }) |
| | | }, |
| | | navigatorPage() { |
| | | let url = "/subPackage/bs/views/repairList" + "?title=" + this.title + "&type=" + this.info.type |
| | | this.$u.func.globalNavigator(url, "navTo") |
| | | } |
| | | }, |
| | | |
| | | |
| | | //选择性别 |
| | | confirmGender(e) { |
| | | this.genderIndex = e.indexs; |
| | | this.genderValue = e.value[0].name; |
| | | this.form.genderOne = e.value[0].value; |
| | | this.showGenderPicker = false; |
| | | }, |
| | | |
| | | //选择性别2 |
| | | confirmGender2(e) { |
| | | this.genderIndex2 = e.indexs; |
| | | this.genderValue2 = e.value[0].name; |
| | | this.form.genderTwo = e.value[0].value; |
| | | this.showGender2Picker = false; |
| | | }, |
| | | |
| | | //选择纠纷类型 |
| | | confirmDisputeType(e) { |
| | | this.disputeTypeIndex = e.indexs; |
| | | this.disputeTypeValue = e.value[0].name; |
| | | this.form.disputeType = e.value[0].value; |
| | | this.showDisputeTypePicker = false; |
| | | }, |
| | | |
| | | //选择处理结果 |
| | | confirmHandleResult(e) { |
| | | this.handleResultIndex = e.indexs; |
| | | this.handleResultValue = e.value[0].name; |
| | | this.form.handleResult = e.value[0].value; |
| | | this.showHandleResultPicker = false; |
| | | }, |
| | | |
| | | //选择处理结果 |
| | | confirmSource(e) { |
| | | this.sourcetIndex = e.indexs; |
| | | this.sourceValue = e.value[0].name; |
| | | this.form.source = e.value[0].value; |
| | | this.showSourcePicker = false; |
| | | }, |
| | | |
| | | confirmDate(e) { |
| | | this.showSelectDate = false; |
| | | this.info.eventTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |