jiangping
2024-11-27 bc87b51e20a0adf0badf2033ede93cafeb5fc147
admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue
@@ -48,7 +48,7 @@
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',
@@ -82,13 +82,21 @@
      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 || []
      })
@@ -130,13 +138,12 @@
          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')
    }