From a76c5c86ac9af71da45bf78c825a2c7aa843b4c8 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 26 一月 2024 15:35:54 +0800
Subject: [PATCH] Revert "Mr.Shi"
---
platform/src/components/business/OperaBrandWindow.vue | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/platform/src/components/business/OperaBrandWindow.vue b/platform/src/components/business/OperaBrandWindow.vue
new file mode 100644
index 0000000..b5899ee
--- /dev/null
+++ b/platform/src/components/business/OperaBrandWindow.vue
@@ -0,0 +1,100 @@
+<template>
+ <GlobalAlertWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" width="600px" @confirm="confirm">
+ <el-form :model="form" ref="form" label-width="150px" label-suffix="锛�" :rules="rules">
+ <el-form-item label="鍝佺墝鍚嶇О" prop="name">
+ <el-input v-model="form.name" maxlength="20" placeholder="璇疯緭鍏ワ紝涓嶈秴杩�20涓瓧绗�" v-trim />
+ </el-form-item>
+ <el-form-item label="鍝佺墝鍥炬爣" prop="imgurl">
+ <UploadAvatarImage
+ :file="{ 'imgurlfull': form.imgfullurl, 'imgurl': form.imgurl }"
+ :uploadData="uploadData"
+ tipsLabel=""
+ @uploadSuccess="uploadReverseSuccess"
+ @uploadEnd="end"
+ @uploadBegin="begin"
+ />
+ 鍙兘涓婁紶鍥剧墖鏍煎紡锛宲ng鏍煎紡锛屽缓璁昂瀵�200px*200px
+ </el-form-item>
+ <el-form-item label="鎺掑簭鐮�(鍗囧簭)" prop="sortnum">
+ <el-input v-model="form.sortnum" type="number" placeholder="璇疯緭鍏ユ帓搴忕爜锛屽崌搴忓睍绀�" v-trim />
+ </el-form-item>
+ </el-form>
+ </GlobalAlertWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import UploadAvatarImage from '../common/UploadAvatarImage.vue'
+import GlobalAlertWindow from '@/components/common/GlobalAlertWindow'
+export default {
+ name: 'OperaBrandWindow',
+ extends: BaseOpera,
+ components: { GlobalAlertWindow, UploadAvatarImage },
+ data() {
+ return {
+ action: process.env.VUE_APP_API_PREFIX + '/public/uploadLocal',
+ // 琛ㄥ崟鏁版嵁
+ form: {
+ id: null,
+ name: '',
+ sortnum: '',
+ imgurl: '',
+ imgfullurl: '',
+ type: 1
+ },
+ uploadData: {
+ folder: 'brand_img',
+ type: 'image'
+ },
+ // 楠岃瘉瑙勫垯
+ rules: {
+ name: [
+ { required: true, message: '涓嶈兘涓虹┖', trigger: 'blur' }
+ ]
+ }
+ }
+ },
+ created() {
+ this.config({
+ api: '/business/brand',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+ open (title, target) {
+ this.title = title
+ this.visible = true
+ // 鏂板缓
+ if (target == null) {
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ this.form.imgfullurl = ''
+ this.form[this.configData['field.id']] = null
+ })
+ return
+ }
+ // 缂栬緫
+ this.$nextTick(() => {
+ for (const key in this.form) {
+ this.form[key] = target[key]
+ }
+ })
+ },
+ begin() {
+ this.isUploading=true
+ },
+ end() {
+ this.isUploading=false
+ },
+ // 涓婁紶鍥剧墖
+ uploadReverseSuccess(file) {
+ this.form.imgurl = file.imgurl;
+ this.form.imgfullurl = file.imgurlfull;
+ },
+ }
+}
+</script>
+
+<style lang="scss">
+</style>
+
\ No newline at end of file
--
Gitblit v1.9.3