| | |
| | | <span>报警记录</span> |
| | | <span>乱停乱放违法占道</span> |
| | | </div> |
| | | <el-form ref="currentEvent" label-width="120px" :model="currentEvent" :rules="rules"> |
| | | <el-form ref="currentEvent" label-width="120px" :model="eventInfoData" :rules="rules"> |
| | | <el-form-item label="事件编号:"> |
| | | <span>{{ currentEvent.code }}</span> |
| | | </el-form-item> |
| | |
| | | <span>{{ currentEvent.conntinueTime }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="关联店铺" prop="store"> |
| | | <el-select v-model="currentEvent.store" @change="selectStoreChange" placeholder="请选择关联店铺"> |
| | | <el-select v-model="eventInfoData.store" @change="selectStoreChange" placeholder="请选择关联店铺"> |
| | | <el-option v-for="store in storeList" :value="store.id" :label="store.storeName" :key="store.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="currentEvent.store" label="店铺得分:"> |
| | | <span>{{ selectStoreChange(currentEvent.store).storeScore }}</span> |
| | | <el-form-item v-if="eventInfoData.store" label="店铺得分:"> |
| | | <span>{{ selectStoreChange(eventInfoData.store).storeScore }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="处理意见:" prop="advice"> |
| | | <el-radio-group v-model="currentEvent.advice"> |
| | | <el-radio-group v-model="eventInfoData.advice"> |
| | | <el-radio :label="item.id" v-for="item in adviceList" :key="item.id">{{ item.label }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="大类名称:" prop="categoryId"> |
| | | <el-select v-model="currentEvent.categoryId" placeholder="请选择大类名称" @change="categoryChange"> |
| | | <el-select v-model="eventInfoData.categoryId" placeholder="请选择大类名称" @change="categoryChange"> |
| | | <el-option v-for="category in categoryOptions" :key="category.id" :value="category.id" :label="category.name" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="小类名称:" prop="typeId"> |
| | | <el-select v-model="currentEvent.typeId" placeholder="请选择小类名称"> |
| | | <el-select v-model="eventInfoData.typeId" placeholder="请选择小类名称"> |
| | | <el-option v-for="type in typeOptions" :key="type.id" :value="type.id" :label="type.name" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车牌号:" prop="carNumber"> |
| | | <el-input v-model="currentEvent.carNumber" placeholder="请填写车牌号码"></el-input> |
| | | <el-input v-model="eventInfoData.carNumber" placeholder="请填写车牌号码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注:" prop="description"> |
| | | <el-input type="textarea" :rows="5" v-model="currentEvent.description"></el-input> |
| | | <el-input type="textarea" :rows="5" v-model="eventInfoData.description"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button :disabled="currentPage === 1" @click="pageChange('prev')">上一条</el-button> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog :visible="isShowDialog" title="调度信息"> |
| | | <MyDispatch v-if="isShowDialog" :mytype="1" @confirmInspection="handleConfirm" :isGetData="true" @changeDialog="closeDialog"></MyDispatch> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { getStoreInfoList } from "@/api/operate/storeManagement"; |
| | | import { FILE_ORIGINAL_URL } from "@/utils"; |
| | | import { validateCarNum } from "@/utils/validate"; |
| | | import MyDispatch from '@/components/dispatch'; |
| | | |
| | | export default { |
| | | components: { MyDispatch }, |
| | | created() { |
| | | this.getInspectionData(); |
| | | this.initEventParams(); |
| | | basecase.getInspectionCountData() |
| | | .then(res => { |
| | | this.countData = res; |
| | |
| | | currentEvent: {}, |
| | | adviceList: [ |
| | | { |
| | | id: 1, |
| | | id: 2, |
| | | label: '上报', |
| | | }, |
| | | { |
| | | id: 2, |
| | | id: 6, |
| | | label: '调度', |
| | | }, |
| | | { |
| | |
| | | label: '暂不处理', |
| | | }, |
| | | ], |
| | | eventInfoData: null, |
| | | rules:{ |
| | | advice:[ |
| | | { |
| | |
| | | categoryOptions: [], |
| | | typeOptions: [], |
| | | storeList: [], |
| | | typeList: [] |
| | | typeList: [], |
| | | isShowDialog: false |
| | | } |
| | | }, |
| | | methods:{ |
| | |
| | | handleConfirm(){ |
| | | this.$refs.currentEvent.validate((flag)=>{ |
| | | if(flag){ |
| | | this.currentEvent.linkShop = 0; |
| | | if (this.currentEvent.store) { |
| | | const selectedStore = this.selectStoreChange(this.currentEvent.store); |
| | | this.currentEvent.shopName = selectedStore.storeName; |
| | | this.currentEvent.linkShop = 1; |
| | | this.eventInfoData.baseId = this.currentEvent.code; |
| | | |
| | | // 调度 |
| | | if (this.eventInfoData.advice === 6) { |
| | | this.isShowDialog = true; |
| | | } else { |
| | | this.confirmInspection(); |
| | | } |
| | | basecase.confirmInspection(this.currentEvent) |
| | | .then(() => { |
| | | this.$message.success('操作成功'); |
| | | this.getInspectionData(); |
| | | }) |
| | | .catch(err => this.$message.error(err)) |
| | | } else { |
| | | this.$message.warning('请检查必填项'); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | initEventParams() { |
| | | this.eventInfoData = { |
| | | baseId: null, |
| | | store: null, |
| | | advice: null, |
| | | categoryId: null, |
| | | typeId: null, |
| | | carNumber: null, |
| | | description: null, |
| | | linkShop: 0, |
| | | shopName: null |
| | | } |
| | | }, |
| | | |
| | | categoryChange(id) { |
| | | this.typeOptions = this.typeList.filter(type => type.parentId === id); |
| | | }, |
| | | |
| | | confirmInspection(data) { |
| | | basecase.confirmInspection({ ...this.eventInfoData, ...data }) |
| | | .then(() => { |
| | | this.$message.success('操作成功'); |
| | | this.getInspectionData(); |
| | | this.initEventParams(); |
| | | }) |
| | | .catch(err => this.$message.error(err)) |
| | | }, |
| | | |
| | | closeDialog() { |
| | | this.isShowDialog = false; |
| | | }, |
| | | |
| | | selectStoreChange(id) { |
| | | return this.storeList.find(store => store.id === id); |
| | | const selectedStore = this.storeList.find(store => store.id === id); |
| | | this.eventInfoData.shopName = selectedStore.storeName; |
| | | this.eventInfoData.linkShop = 1; |
| | | return selectedStore; |
| | | } |
| | | } |
| | | } |