|  |  | 
 |  |  | import BaseOpera from '@/components/base/BaseOpera' | 
 |  |  | import GlobalWindow from '@/components/common/GlobalWindow' | 
 |  |  | import { getFetchList } from '@/api/Inspection/ywPatrolPoint' | 
 |  |  | import { create } from '@/api/Inspection/ywPatrolLine' | 
 |  |  | import { create,detailById } from '@/api/Inspection/ywPatrolLine' | 
 |  |  | import { Message } from 'element-ui' | 
 |  |  | export default { | 
 |  |  |   name: 'OperaYwPatrolLineWindow', | 
 |  |  | 
 |  |  |       if (list.length == 0) return Message.warning('请先选择巡检点') | 
 |  |  |       form.linePointList = list | 
 |  |  |       create({ ...form }).then(res => { | 
 |  |  |         if (res.code == 200) { | 
 |  |  |           Message.success('保存成功') | 
 |  |  |           this.close() | 
 |  |  |         } | 
 |  |  |         Message.success('保存成功') | 
 |  |  |         this.$emit('success') | 
 |  |  |         this.close() | 
 |  |  |          | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     getDetail(row) { | 
 |  |  |       detailById(row.id).then(res => { | 
 |  |  |         this.form = res | 
 |  |  |         this.list = res.linePointList || [] | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     initData() { | 
 |  |  |       this.list = [] | 
 |  |  |  | 
 |  |  |       getFetchList({}).then(res => { | 
 |  |  |         this.pointList = res || [] | 
 |  |  |       }) | 
 |  |  | 
 |  |  |           needScancode: '1', | 
 |  |  |           pointName: i.name, | 
 |  |  |           pointId: i.id, | 
 |  |  |           code: i.code, | 
 |  |  |           id: i.id | 
 |  |  |           code: i.code | 
 |  |  |         }) | 
 |  |  |       }) | 
 |  |  |       this.isShowModal = false | 
 |  |  |     }, | 
 |  |  |     close(){ | 
 |  |  |     close() { | 
 |  |  |       this.visible = false | 
 |  |  |       this.$emit('success') | 
 |  |  |     } |