rk
2026-03-11 0e4b49f4bee160790b1830e6a8606e739b32fc3b
admin/src/components/business/OperaInformationWindow.vue
@@ -1,17 +1,16 @@
<template>
  <GlobalWindow
      width="80%"
    :title="title"
    :visible.sync="visible"
    v-loading="isUploading"
    :confirm-working="isWorking"
    @confirm="confirm"
  >
    <el-form :model="form" ref="form" label-width="130px" label-suffix=":" :rules="rules" inline>
    <el-form :model="form" ref="form" label-width="130px" label-suffix=":" :rules="rules"  >
      <el-form-item label="标题" prop="name">
        <el-input v-model="form.name" placeholder="请输入标题" v-trim/>
      </el-form-item>
      <el-form-item label="资讯封面图" prop="imgurlfull">
      <el-form-item label="主图" prop="imgurl">
        <UploadAvatarImage
            :file="{ 'imgurlfull': form.imgurlfull, 'imgurl': form.imgurl }"
            @uploadSuccess="uploadAvatarSuccess"
@@ -100,10 +99,7 @@
        ],
        brandId: [
          { required: true, message: '请选择所属品牌' }
        ],
        imgurlfull: [
          { required: true, message: '请上传资讯主图'  }
        ],
        ]
      }
    }
  },
@@ -122,6 +118,26 @@
    },
    getWangedditor(val){
      this.form.content =val
    },
    open (title, target) {
      this.title = title
      this.visible = true
      this.form.imgurlfull=null
      this.form.imgurl=null
      // 新建
      if (target == null) {
        this.$nextTick(() => {
          this.$refs.form.resetFields()
          this.form[this.configData['field.id']] = null
        })
        return
      }
      // 编辑
      this.$nextTick(() => {
        for (const key in this.form) {
          this.form[key] = target[key]
        }
      })
    }
  }
}
@@ -129,43 +145,10 @@
<style lang="scss" scoped>
@import "@/assets/style/alertstyle.scss";
::v-deep .el-form-item__content {
  flex: 0.6;
}
::v-deep .el-select {
  width: 100%;
  .el-input__inner {
    width: 100%;
  }
}
$image-width: 100px;
.avatar-uploader {
  width: $image-width;
  height: $image-width;
}
::v-deep .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  width: $image-width;
  height: $image-width;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409EFF;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: $image-width;
  height: $image-width;
  line-height: $image-width;
  text-align: center;
}
.avatar {
  width: $image-width;
  height: $image-width;
  display: block;
}
</style>