Browse Source

feat: #.0.

loki 3 years ago
parent
commit
574c065f9d
2 changed files with 78 additions and 9 deletions
  1. 9 9
      README.md
  2. 69 0
      src/views/photographerManagement/photoVerify/modal/ItemModal.vue

+ 9 - 9
README.md

@@ -88,12 +88,12 @@ Modern browsers and Internet Explorer 10+.
 
 Copyright (c) 2017-present PanJiaChen
 
-1. 后台前端需要重置标准表格宽度
-2. 后台前端富文本需要 px 转换 rem
-3. 后台后端列表需要 sort 排序
-4. 活动管理需要场景组件
-5. 数据字典组件 [x]
-6. 上传位置 幼儿园活动组件
-7. 暂时停止批量编辑
-8. 图片上传地址
-9. 上传照片管理
+- 后台前端需要重置标准表格宽度 [x]
+- 后台后端列表需要 sort 排序 [x]
+- 数据字典组件 [x]
+- 暂时停止批量编辑 [x]
+- 上传位置 幼儿园活动组件
+- 上传照片管理
+- 活动管理需要场景组件
+- 图片上传地址
+- 后台前端富文本需要 px 转换 rem

+ 69 - 0
src/views/photographerManagement/photoVerify/modal/ItemModal.vue

@@ -0,0 +1,69 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="modal"
+    width="500px"
+    :close-on-click-modal="false"
+    @close="
+      res => {
+        $emit('cancel');
+      }
+    "
+  >
+    <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+      <el-form-item label="图片" prop="imgUrl">
+        <upload v-model="form.imgUrl" params="prefix=/banner" />
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="modal = false">取消</el-button>
+      <el-button type="primary" @click="handleConfirm">确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { saveItem } from '@/api/photoWarehouse';
+
+export default {
+  name: 'PhotoUploadItemModal',
+
+  data() {
+    return {
+      title: '上传图片'
+      modal: true,
+
+      form: {
+      },
+      rules: {
+
+      },
+
+      typeOptions: []
+    };
+  },
+
+
+  mounted() {},
+
+  methods: {
+    handleConfirm() {
+      this.$refs.form.validate(async valid => {
+        if (valid) {
+          let params = Object.assign({}, this.form);
+          params.imgUrl = this.form.imgUrl[0].url;
+          if (this.id) params.id = this.id;
+          const { success, msg } = await saveItem(params);
+          if (success) {
+            this.$success('保存成功!');
+            this.modal = false;
+            this.$g_emit('banner_reload');
+          }
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped></style>