Procházet zdrojové kódy

Merge branch 'test' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into test

chencc před 1 rokem
rodič
revize
ffc31a436a

+ 80 - 86
src/components/upload/WithView.vue

@@ -7,17 +7,8 @@
       <img src="~@/assets/upload-placeholder.svg" alt="" />
     </div>
     <div class="btn-box">
-      <el-upload
-        class="avatar-div"
-        action="#"
-        accept="image/png,image/jpeg"
-        :show-file-list="false"
-        ref="uploadRef"
-        :on-exceed="handleExceed"
-        :limit="1"
-        :http-request="handlSuccess"
-        :multiple="false"
-      >
+      <el-upload class="avatar-div" action="#" accept="image/png,image/jpeg" :show-file-list="false" ref="uploadRef"
+        :on-exceed="handleExceed" :limit="1" :http-request="handlSuccess" :multiple="false">
         <el-button type="text">上传{{ assetName }}图片</el-button>
       </el-upload>
       <el-button type="text" @click="clearImg">清除图片</el-button>
@@ -26,90 +17,93 @@
 </template>
 
 <script>
-  import { uploadFile, removeFile } from '@/api/system/file/index.js';
-  import { getImageUrl } from '@/utils/file';
-  export default {
-    props: {
-      assetName: {
-        type: String,
-        default: '设备'
-      },
-      value: {
-        type: Object,
-        default: () => []
-      },
-      // 所属模块
-      module: {
-        type: String,
-        default: 'main'
-      }
+import { uploadFile, removeFile } from '@/api/system/file/index.js';
+import { getImageUrl } from '@/utils/file';
+export default {
+  props: {
+    assetName: {
+      type: String,
+      default: '设备'
     },
-    data () {
-      return {};
+    value: {
+      type: Object,
+      default: () => []
     },
-    computed: {
-      dialogImageUrl () {
-        return this.value?.storePath && getImageUrl(this.value.storePath);
+    // 所属模块
+    module: {
+      type: String,
+      default: 'main'
+    }
+  },
+  data() {
+    return {};
+  },
+  computed: {
+    dialogImageUrl() {
+      return this.value?.storePath && getImageUrl(this.value.storePath);
+    }
+  },
+  methods: {
+    // 清空已上传的文件列表
+    clearUploadFiles() { },
+    //图片添加
+    async handlSuccess(params) {
+      let res = await uploadFile({
+        multiPartFile: params.file,
+        module: this.module
+      });
+      if (res?.data) {
+        this.$emit('input', res.data);
       }
     },
-    methods: {
-      // 清空已上传的文件列表
-      clearUploadFiles () {},
-      //图片添加
-      async handlSuccess (params) {
-        let res = await uploadFile({
-          multiPartFile: params.file,
-          module: this.module
-        });
-        if (res?.data) {
-          this.$emit('input', res.data);
-        }
-      },
-      async clearImg () {
-        await removeFile({ fileId: this.value.id });
-        this.$emit('input', {});
-        this.$refs.uploadRef.clearFiles();
-      },
-      // 限制上传的数量
-      handleExceed (files, fileList) {
-        this.$message.warning(`最多允许上传一张图片!`);
-      }
+    async clearImg() {
+      await removeFile({ fileId: this.value.id });
+      this.$emit('input', {});
+      this.$refs.uploadRef.clearFiles();
+    },
+    // 限制上传的数量
+    handleExceed(files, fileList) {
+      this.$message.warning(`最多允许上传一张图片!`);
     }
-  };
+  }
+};
 </script>
 <style lang="scss" scoped>
-  .img-view {
-    width: 280px;
-    height: 342px;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    border-width: 1px;
-    border-style: solid;
-    border-color: rgba(215, 215, 215, 1);
-    img {
-      max-width: 100%;
-    }
-  }
-  .placeholder-box {
-    width: 280px;
-    height: 342px;
-    text-align: center;
+.img-view {
+  width: 280px;
+  height: 342px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-width: 1px;
+  border-style: solid;
+  border-color: rgba(215, 215, 215, 1);
 
-    background-color: rgba(242, 242, 242, 1);
-    box-sizing: border-box;
-    border-width: 1px;
-    border-style: solid;
-    border-color: rgba(215, 215, 215, 1);
-    padding-top: 60px;
-    img {
-      width: 158px;
-      height: 158px;
-    }
+  img {
+    max-width: 100%;
   }
+}
 
-  .btn-box {
-    display: flex;
-    justify-content: space-around;
+.placeholder-box {
+  width: 250px;
+  height: 200px;
+  text-align: center;
+
+  background-color: rgba(242, 242, 242, 1);
+  box-sizing: border-box;
+  border-width: 1px;
+  border-style: solid;
+  border-color: rgba(215, 215, 215, 1);
+  padding-top: 60px;
+
+  img {
+    width: 100px;
+    height: 100px;
   }
+}
+
+.btn-box {
+  display: flex;
+  justify-content: space-around;
+}
 </style>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 194 - 621
src/views/system/organization/components/org-user-edit.vue


+ 1 - 1
src/views/system/organization/components/org-user-list.vue

@@ -136,7 +136,7 @@
     <el-dialog
       title="提示"
       :visible.sync="dialogVisible"
-      :before-close="handleClose"
+      @close="dialogVisible=false"
       width="400px"
     >
       <span>是否绑定已有用户?</span>

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů