wente
2024-06-07 4bff52e938ae2c260fe54d32ef680908868bb27e
web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
@@ -5,7 +5,7 @@
        <el-input v-model="dataForm.name"></el-input>
      </zt-form-item>
      <zt-form-item label="产品类型" prop="productType" rules="required">
        <zt-dict v-model="dataForm.productType" dict="product"></zt-dict>
        <zt-dict v-model="dataForm.productType" dict="product" :additional=additional></zt-dict>
      </zt-form-item>
      <zt-form-item label="是否默认" prop="isDefault" rules="required">
        <zt-dict v-model="dataForm.isDefault" dict="is_or_not"></zt-dict>
@@ -39,6 +39,7 @@
  export default {
    data() {
      return {
        additional: [{dictValue: '20', dictLabel: '运算图元', remark: ''}],
        SVGEditorUrl: `/SVGOrigin/Method-Draw-master/editor/index.html`,
        url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`,
        fileList: [],
@@ -58,12 +59,12 @@
      }
    },
    methods: {
      async init() {
        if (this.dataForm.id) {
          let res = await this.$http.get(`/sysPictureBase/${this.dataForm.id}`)
      async init(id,row) {
        if (id) {
          //let res = await this.$http.get(`/sysPictureBase/${this.dataForm.id}`)
          this.dataForm = {
            ...this.dataForm,
            ...res.data
            ...row
          }
          console.log(this.dataForm,'this.dataForm this.dataForm')
        }
@@ -151,6 +152,7 @@
    cursor: pointer;
    background-color: #f9f9f9;
  }
  .img-sc > .el-form-item > .el-form-item__content {
    width: 100%;
  }