jinlin
2024-03-19 b04b1f186c4250e6894823f990189950508d877d
web/src/views/modules/basicInfo/XhProductModel.vue
@@ -8,8 +8,9 @@
      </el-col>
      <el-col :span="19">
        <div class="mod-basicInfo-xhProductModel}">
          <zt-table-wraper ref="tableObj" query-url="/basicInfo/XhProductModel/page"
          <zt-table-wraper ref="tableObj"  defaultNotQuery="true" query-url="/basicInfo/XhProductModel/page"
                           delete-url="/basicInfo/XhProductModel/ "
                           :paging='false'
                           v-slot="{ table }">
            <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
              <el-form-item>
@@ -26,23 +27,10 @@
                      @selection-change="table.selectionChangeHandle"
            >
              <el-table-column prop="name" label="名称"/>
              <zt-table-column-dict prop="nodeType" label="节点类型" dict="product"/>
              <el-table-column prop="operationalStatus" label="运行状态图" align="center">
              <zt-table-column-dict prop="productType" label="节点类型" dict="product"/>
              <el-table-column prop="operatImg" label="运行图片" align="center">
                <template v-slot="{ row }">
                  <el-image v-if="row.operationalStatus" :src="getPath(row.operationalStatus)"
                            style="height: 50px;width: 50px"></el-image>
                </template>
              </el-table-column>
              <el-table-column prop="standbyState" label="待机状态图" align="center">
                <template v-slot="{ row }">
                  <el-image v-if="row.standbyState" :src="getPath(row.standbyState)"
                            style="height: 50px;width: 50px"></el-image>
                </template>
              </el-table-column>
              <el-table-column prop="faultState" label="故障状态图" align="center">
                <template v-slot="{ row }">
                  <el-image v-if="row.faultState" :src="getPath(row.faultState)"
                            style="height: 50px;width: 50px"></el-image>
                  <el-image v-if="row.operatImg" :src="url+row.operatImg" style="height: 50px;width: 50px"></el-image>
                </template>
              </el-table-column>
              <el-table-column prop="sort" label="排序"/>
@@ -62,16 +50,18 @@
  import AddOrUpdate from './XhProductModel-AddOrUpdate'
  import SelectTyModel from './SelectTyModel'
  import ProductModelTree from "./ProductModelTree";
  import Cookies from "js-cookie";
  export default {
    data() {
      return {
        url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`,
        productType: '',
        dataForm: {
          name: '',
          nodeType: '',
          type:'',
          pid: '',
          srcId:''
          srcId:'',
        }
      }
    },
@@ -82,11 +72,12 @@
    },
    methods: {
      add() {
        if (this.dataForm.type !== '4') {
        this.dataForm.type=this.productType
        if (this.dataForm.type !== '3') {
          console.log(1111)
          console.log(this.dataForm.type,'add() {')
          this.dataForm.type = this.dataForm.type - 1
        } else if (this.dataForm.type === '4') {
        } else if (this.dataForm.type === '3') {
          console.log(2222)
          console.log(this.dataForm.type,'add() {')
          this.dataForm.type = this.dataForm.type - 2
@@ -107,8 +98,10 @@
        return `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${id}`
      },
      onProductSelected(data) {
        console.log(data)
        this.dataForm.pid = data.id
        this.dataForm.type = data.nodeType
        this.dataForm.type = data.productType
        this.productType = data.productType
        this.$refs.tableObj.query()
      }
    }