jinlin
2024-09-05 aa4a6ed94ea6861a6ce634550d2f05f528529098
web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
@@ -1,7 +1,7 @@
<template>
  <zt-dialog ref="dialog" @confirm="formSubmit">
  <zt-dialog ref="dialog" @confirm="formSubmit" :hasConfirm="true">
    <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
      <zt-form-item label="上级系统" prop="pid" v-if="isShow">
      <zt-form-item label="上级节点" prop="pid" v-if="isShow">
        <zt-combo-tree v-model="dataForm.pid" :datas="productList"/>
      </zt-form-item>
      <zt-form-item label="名称" prop="name" rules="required">
@@ -43,11 +43,12 @@
          id: '',
          pid: '',
          name: '',
          shipId: '',
          productType: '',
          operatImg: '',
          operatImgName: '',
          sort: '',
          equipType:'',
          equipType: '',
          status: ''
        }
      }
@@ -57,6 +58,10 @@
    },
    methods: {
      init(id, params) {
        this.getProductList()
        if (params.shipId) {
          this.dataForm.shipId = params.shipId
        }
        if (params.type === 'xh') {
          this.isShow = false
          this.dataForm.pid = null
@@ -65,7 +70,6 @@
        } else if (params.type === 'zt') {
          this.dataForm.pid = params.pid
          this.dataForm.productType = 2
          this.getProductList()
          this.getDefaultImg(this.dataForm.productType)
        } else {
          this.dataForm.pid = params.pid
@@ -88,7 +92,7 @@
          productType: selected
        }
        let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params})
        if (res.data){
        if (res.data) {
          this.dataForm.operatImgName = res.data.name
          this.dataForm.operatImg = res.data.id
        }
@@ -126,7 +130,6 @@
          await this.$tip.success()
          this.$refs.dialog.close()
          this.$emit('refreshDataList')
          this.map.clear()
        }
      }
    }