Browse Source

提交代码

zhuxinbo 5 năm trước cách đây
mục cha
commit
5abc51103f

+ 3 - 0
debug.log

@@ -3,6 +3,9 @@
 [0529/112937.608:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
 [0619/110835.729:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
 [0701/153438.192:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
+<<<<<<< HEAD
 [0708/055752.148:ERROR:process_info.cc(375)] NtQuerySystemInformation SystemExtendedHandleInformation: {没有足够配额} 没有足够的虚拟内存或分页文件配额以完成指定的操作。 (0xc0000017)
 [0708/055807.088:ERROR:process_info.cc(359)] UncheckedAllocate
 [0713/163350.208:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
+=======
+>>>>>>> test-2

+ 58 - 80
src/components/ctop/ActorModal.vue

@@ -1,27 +1,15 @@
 <template>
-  <a-modal
-    :title="title"
-    :width="800"
-    :visible="visible"
-    :confirmLoading="confirmLoading"
-    @ok="handleOk"
-    @cancel="handleCancel"
-    cancelText="关闭">
+  <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk"
+    @cancel="handleCancel" cancelText="关闭">
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
 
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="演员姓名">
-          <a-input placeholder="请输入演员姓名" v-decorator="['name', validatorRules.name ]"/>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="演员姓名">
+          <a-input placeholder="请输入演员姓名" v-decorator="['name', validatorRules.name ]" />
         </a-form-item>
-        <a-form-item
-          label="封面"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-        >
-          <upload-to-ali
+        <a-form-item label="封面" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          {{coverUrl}}
+          <!-- <upload-to-ali
             v-model="coverUrl"
             :customDomain="customDomain"
             preview
@@ -32,53 +20,25 @@
             :size="1024000"
             :accessKeyId="accessKeyId"
             :accessKeySecret="accessKeySecret"
-          ></upload-to-ali>
+          ></upload-to-ali> -->
+
+          <uploadFile :value.sync="coverUrl" :fileCount="1" uploadType="image" :multiple="false" />
         </a-form-item>
-        <a-form-item
-          label="照片"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          v-if="!model.name"
-        >
-          <upload-to-ali
-            v-model="imageUrl"
-            :customDomain="customDomain"
-            multiple
-            preview
-            :region="region"
-            :bucket="bucket"
-            :accept="acceptImage"
-            :max="10"
-            :size="1024000"
-            :accessKeyId="accessKeyId"
-            :accessKeySecret="accessKeySecret"
-          ></upload-to-ali>
+        <a-form-item label="照片" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="!model.name">
+          <uploadFile :value.sync="imageUrl" :fileCount="1" uploadType="image" :multiple="false" />
+          <!-- <upload-to-ali v-model="imageUrl" :customDomain="customDomain" multiple preview :region="region"
+            :bucket="bucket" :accept="acceptImage" :max="10" :size="1024000" :accessKeyId="accessKeyId"
+            :accessKeySecret="accessKeySecret"></upload-to-ali> -->
         </a-form-item>
-        <a-form-item
-          label="视频作品"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          v-if="!model.name"
-        >
-          <upload-to-ali
-            v-model="videoUrl"
-            :customDomain="customDomain"
-            multiple
-            preview
-            :region="region"
-            :bucket="bucket"
-            :accept="acceptVideo"
-            :max="10"
-            :size="1024000"
-            :accessKeyId="accessKeyId"
-            :accessKeySecret="accessKeySecret"
-          ></upload-to-ali>
+        <a-form-item label="视频作品" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="!model.name">
+          <uploadFile :value.sync="videoUrl" :fileCount="1" uploadType="video" :multiple="false" />
+          <!-- <upload-to-ali v-model="videoUrl" :customDomain="customDomain" multiple preview :region="region"
+            :bucket="bucket" :accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId"
+            :accessKeySecret="accessKeySecret"></upload-to-ali> -->
         </a-form-item>
         <a-form-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-date-picker
-            style="width: 100%"
-            placeholder="请选择生日"
-            v-decorator="['birthday', {initialValue:!model.birthday?null:moment(model.birthday,dateFormat)}]"/>
+          <a-date-picker style="width: 100%" placeholder="请选择生日"
+            v-decorator="['birthday', {initialValue:!model.birthday?null:moment(model.birthday,dateFormat)}]" />
         </a-form-item>
 
         <a-form-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -87,11 +47,8 @@
             <a-select-option :value="2">女</a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="特长">
-          <a-input placeholder="请输入特长" v-decorator="['speciality']"/>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="特长">
+          <a-input placeholder="请输入特长" v-decorator="['speciality']" />
         </a-form-item>
 
 
@@ -101,7 +58,10 @@
 </template>
 
 <script>
-  import {httpAction} from '@/api/manage'
+  import uploadFile from '@/components/uploadFile.vue'
+  import {
+    httpAction
+  } from '@/api/manage'
   import pick from 'lodash.pick'
   import JTreeSelect from '@/components/jeecg/JTreeSelect'
   import moment from 'moment'
@@ -110,7 +70,8 @@
     name: "ActorModal",
     components: {
       UploadToAli,
-      JTreeSelect
+      JTreeSelect,
+      uploadFile
     },
     data() {
       return {
@@ -119,7 +80,7 @@
         model: {},
         videoUrl: [],
         imageUrl: [],
-        coverUrl:"",
+        coverUrl: "",
         customDomain: '',
         region: 'oss-cn-beijing',
         bucket: 'ctop-media',
@@ -129,18 +90,31 @@
         accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
         dateFormat: "YYYY-MM-DD",
         labelCol: {
-          xs: {span: 24},
-          sm: {span: 5},
+          xs: {
+            span: 24
+          },
+          sm: {
+            span: 5
+          },
         },
         wrapperCol: {
-          xs: {span: 24},
-          sm: {span: 16},
+          xs: {
+            span: 24
+          },
+          sm: {
+            span: 16
+          },
         },
 
         confirmLoading: false,
         form: this.$form.createForm(this),
         validatorRules: {
-          name: {rules: [{required: true, message: '请输入演员姓名!'}]},
+          name: {
+            rules: [{
+              required: true,
+              message: '请输入演员姓名!'
+            }]
+          },
           // sex:{initialValue:((!this.model.sex)?"": (this.model.sex+""))},
         },
         url: {
@@ -149,9 +123,13 @@
         },
       }
     },
-    created() {
-    },
+    created() {},
     methods: {
+      fileWater() {
+        return new Promise(function (resolve, reject) {
+
+        })
+      },
       add() {
         this.edit({});
       },
@@ -161,9 +139,9 @@
         that.form.resetFields();
         that.model = Object.assign({}, record);
         that.visible = true;
-        that.coverUrl = record.coverUrl
-        that.imageUrl = record.imageUrl
-        that.videoUrl = record.videoUrl
+        // that.coverUrl = ""
+        // that.imageUrl = ""
+        // that.videoUrl = ""
         that.$nextTick(() => {
           that.form.setFieldsValue(pick(this.model, 'name', 'sex', 'speciality'))
           //时间格式化

+ 9 - 5
src/components/ctop/vm-card.vue

@@ -201,7 +201,8 @@ li {
       @ok="handleOk('photo')"
       @cancel="handleCancel('photo')"
     >
-      <upload-to-ali
+    <uploadFile :value.sync="imageUrl" :fileCount="1" uploadType="image" :multiple="false" />
+      <!-- <upload-to-ali
         style="margin:10px"
         v-model="imageUrl"
         :customDomain="customDomain"
@@ -213,7 +214,7 @@ li {
         :size="1024000"
         :accessKeyId="accessKeyId"
         :accessKeySecret="accessKeySecret"
-      ></upload-to-ali>
+      ></upload-to-ali> -->
     </a-modal>
     <!-- 新增作品 -->
     <a-modal
@@ -222,7 +223,8 @@ li {
       @ok="handleOk('video')"
       @cancel="handleCancel('video')"
     >
-      <upload-to-ali
+    <uploadFile :value.sync="videoUrl" :fileCount="1" uploadType="video" :multiple="false" />
+      <!-- <upload-to-ali
         style="margin:10px"
         v-model="videoUrl"
         :customDomain="customDomain"
@@ -234,7 +236,7 @@ li {
         :size="1024000"
         :accessKeyId="accessKeyId"
         :accessKeySecret="accessKeySecret"
-      ></upload-to-ali>
+      ></upload-to-ali> -->
     </a-modal>
     <actor-modal ref="modalForm" @ok="modalFormOk" @updateList="updateList" @close="closeVideo"></actor-modal>
   </div>
@@ -255,6 +257,7 @@ import {
 } from '@/api/actor'
 import actorModal from './ActorModal'
 import UploadToAli from '@femessage/upload-to-ali'
+  import uploadFile from '@/components/uploadFile.vue'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { closeAllVideoFun } from '@/utils/videoControl'
 export default {
@@ -262,7 +265,8 @@ export default {
   mixins: [JeecgListMixin],
   components: {
     actorModal,
-    UploadToAli
+    UploadToAli,
+    uploadFile
   },
   props: {
     type: {

+ 78 - 8
src/components/uploadFile.vue

@@ -7,11 +7,11 @@
     <a-upload name="file" :multiple="multiple" list-type="picture-card" class="avatar-uploader"
       action="https://media-1301855440.cos.ap-chongqing.myqcloud.com/" :before-upload="beforeUpload"
       @change="handleChange" :accept="uploadType+'/*'" :file-list="fileList" :remove="removeFile"
-      @preview="handlePreview" :disabled="loadingElse">
+      @preview="handlePreview" :disabled="loadingElse||disabled">
       <div v-if="uploadType=='image'?fileList.length < fileCount:fileList.length<1">
         <a-progress v-if='loadingElse' :percent="percent" :show-info="false" />
         <div class="ant-upload-text">
-          Upload
+          点击上传
         </div>
       </div>
     </a-upload>
@@ -76,11 +76,21 @@
         default (file) {
           return Promise.resolve()
         }
+      },
+      disabled: {
+        type: Boolean,
+        default () {
+          return false
+        }
+      },
+      value: {
+        type: [String, Array],
+        required: true
       }
     },
     data() {
       return {
-        fileList: [], //链接集合
+        fileList: [],
         loadingElse: false,
         imageUrl: '',
         percent: 0,
@@ -90,8 +100,48 @@
     },
     filters: {},
     computed: {},
-    created() {},
-    watch: {},
+    mounted() {
+
+    },
+    watch: {
+      //    fileListAll
+      value: {
+        immediate: true,
+        handler(n, o) {
+          if (this.fileList.length == 0) {
+            if (typeof n == 'object') {
+              this.fileList = n.map((item, index) => {
+                return {
+                  uid: index + 1,
+                  name: index + 1,
+                  status: 'done',
+                  url: item,
+                }
+              })
+            } else {
+              if (n == '') {
+                this.fileList = []
+              } else {
+                this.fileList = [{
+                  uid: 1,
+                  name: 1,
+                  status: 'done',
+                  url: n,
+                }]
+
+              }
+
+            }
+          } else {
+            if (n.length == 0 || n == '') {
+              this.clearAll()
+            }
+          }
+
+        },
+        deep: true
+      }
+    },
     methods: {
       handleCancel() {
         closeAllVideoFun()
@@ -129,12 +179,17 @@
         this.checkFile(file).then(res => {
           this.cosUpload(file)
 
+        }).catch(() => {
+          this.loadingElse = false
         })
         return new Promise(function (resolve, reject) {
           reject()
         })
 
       },
+      clearAll() {
+        this.fileList = []
+      },
       cosUpload(file) {
         var that = this
         let date = new Date()
@@ -172,16 +227,31 @@
           that.loadingElse = false
           if (that.fileList.length < that.fileCount) {
             that.fileList.push({
-              uid: i++,
+              uid: file.name,
               name: file.name,
               status: 'done',
-              url: 'http://' + data.Location,
+              url: '//' + data.Location,
             })
+
+            // that.$emit('overUpload', that.fileList.map(item => {
+            //                 return item.url
+            //               }))
             that.$emit('overUpload', that.fileList)
+
+            if (that.multiple) {
+              that.$emit('update:value', that.fileList.map(item => {
+                return item.url
+              }))
+            } else {
+              that.$emit('update:value', that.fileList.map(item => {
+                return item.url
+              })[0])
+            }
+
+
           } else {
             that.$message.error('上传已达上限' + that.fileCount + '张')
           }
-
         });
       }
     }

+ 1 - 1
src/views/modules/Statistics/materialRank.vue

@@ -28,7 +28,7 @@
     </div>
     <a-table :columns="columns" :data-source="dataSource" tableLayout='auto' bordered :pagination='false' :loading='loading'>
       <div slot="videoU" slot-scope="test,records">
-        <img :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'" alt="" style="width:140px"
+        <img :src="records.coverUrl" alt="" style="width:140px"
           @click="openVideo(records.url)">
       </div>
       <span slot="convertRate" slot-scope="convertRate">{{ convertRate | toPercentage }}</span>

+ 1 - 1
src/views/modules/Statistics/performanceRelated/performanceRelated.vue

@@ -143,7 +143,7 @@
                         
                         <div slot="urls" slot-scope="test,records">
                             <img
-                            :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"
+                            :src="records.coverUrl"
                             alt
                             style="width:100px"
                             @click="openVideo(records.url)"                           

+ 1 - 1
src/views/modules/Statistics/videoStatics/vDay.vue

@@ -84,7 +84,7 @@
       @change="sort"
     >
       <div slot="videoU" slot-scope="test,records">
-        <img  :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"  alt=""  style="width:140px"  @click="openVideo(records.url)" @load="loadShow">
+        <img  :src="records.coverUrl"  alt=""  style="width:140px"  @click="openVideo(records.url)" @load="loadShow">
 
       </div>
       <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>

+ 1 - 1
src/views/modules/Statistics/videoStatics/vMonth.vue

@@ -93,7 +93,7 @@
       </span>
 
       <div slot="videoU" slot-scope="test,records">
-        <img  :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"  alt="" style="width:140px" @click="openVideo(records.url)" @load="loadShow">
+        <img  :src="records.coverUrl"  alt="" style="width:140px" @click="openVideo(records.url)" @load="loadShow">
       </div>
       <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
       <span

+ 1 - 1
src/views/modules/Statistics/videoStatics/vSummary.vue

@@ -93,7 +93,7 @@
     >
       <div slot="videoU" slot-scope="test,records">
         <img
-          :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"
+          :src="records.coverUrl"
           alt
           style="width:140px"
           @click="openVideo(records.url)"

+ 1 - 1
src/views/modules/Statistics/videoStatics/vWeek.vue

@@ -93,7 +93,7 @@
       </span>
 
       <div slot="videoU" slot-scope="test,records">
-       <img  :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'"  alt="" style="width:140px" @click="openVideo(records.url)"  @load="loadShow">
+       <img  :src="records.coverUrl"  alt="" style="width:140px" @click="openVideo(records.url)"  @load="loadShow">
       </div>
       <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
       <span

+ 10 - 5
src/views/modules/actor/modules/ActorModal.vue

@@ -22,7 +22,9 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
         >
-          <upload-to-ali
+
+        <uploadFile :value.sync="imageUrl" :fileCount="1" uploadType="image" :multiple="false" />
+          <!-- <upload-to-ali
             v-model="imageUrl"
             :customDomain="customDomain"
             multiple
@@ -34,14 +36,15 @@
             :size="1024000"
             :accessKeyId="accessKeyId"
             :accessKeySecret="accessKeySecret"
-          ></upload-to-ali>
+          ></upload-to-ali> -->
         </a-form-item>
         <a-form-item
           label="视频作品"
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
         >
-          <upload-to-ali
+        <uploadFile :value.sync="videoUrl" :fileCount="1" uploadType="video" :multiple="false" />
+          <!-- <upload-to-ali
             v-model="videoUrl"
             :customDomain="customDomain"
             multiple
@@ -53,7 +56,7 @@
             :size="1024000"
             :accessKeyId="accessKeyId"
             :accessKeySecret="accessKeySecret"
-          ></upload-to-ali>
+          ></upload-to-ali> -->
         </a-form-item>
         <a-form-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-date-picker
@@ -87,11 +90,13 @@
   import JTreeSelect from '@/components/jeecg/JTreeSelect'
   import moment from 'moment'
   import UploadToAli from '@femessage/upload-to-ali'
+    import uploadFile from '@/components/uploadFile.vue'
   export default {
     name: "ActorModal",
     components: {
       UploadToAli,
-      JTreeSelect
+      JTreeSelect,
+      uploadFile
     },
     data() {
       return {

+ 1 - 1
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -64,7 +64,7 @@
       </a-form-item>
       <a-form-item :label="campaignType == '3' ? ' ' : '链接'" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType != '2'"
-        :class="{ elseLabel: campaignType == '3' }">
+        :class="{ 'else-label': campaignType == '3' }">
         <!-- 请填写以http://或者https://开头的落地页地址,长度不超过1000个字符 -->
         <a-input placeholder="请填写链接"
           v-decorator="['url', { rules: [{ required: true, message: ' ' }, { validator: handleConfirmValue }] }]" />

+ 82 - 79
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -266,10 +266,13 @@
         </a-button>
       </template>
       <a-form-item label="" class="add-image-material">
+        <uploadFile v-if="addImageVisible" :value.sync="urlListImage.url" :checkFile="fileWater"
+          @overUpload="overUploadImage" @removeUpload="deleteImage" :fileCount="15" uploadType="image" />
+        <!-- 
         <upload-to-ali style="width:100%" v-model="urlListImage.url" :customDomain="customDomain" :multiple="true"
           preview :region="region" :bucket="bucket" :accept="acceptImage" :max="15" :size="2048"
           :accessKeyId="accessKeyId" :accessKeySecret="accessKeySecret" :before-upload="fileWater" :dir="dirImg"
-          @delete='deleteImage' @loaded="overUploadImage"></upload-to-ali>
+          @delete='deleteImage' @loaded="overUploadImage"></upload-to-ali> -->
         <span v-if="material.filter(item => item == false).length > 0 && urlListImage.url.length > 0"
           style="color:red">上传素材的尺寸不符,请修改(<span v-for="(item, index) of material" :key="index"
             v-show="!item">第{{ index + 1 }}张</span>出错)</span>
@@ -286,10 +289,13 @@
         </a-button>
       </template>
       <a-form-item label="" class="add-image-material">
-        <upload-to-ali v-model="urlList.url" :customDomain="customDomain" preview :region="region" :bucket="bucket"
+        <uploadFile v-if="addVideoVisible" :checkFile="file" :value.sync="urlList.url" @overUpload="overUpload" :fileCount="10"
+          uploadType="video" :multiple="false" />
+
+        <!-- <upload-to-ali v-model="urlList.url" :customDomain="customDomain" preview :region="region" :bucket="bucket"
           :accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId" :accessKeySecret="accessKeySecret"
           :before-upload="file" :dir="dirVideo" @loaded="overUpload">
-        </upload-to-ali>
+        </upload-to-ali> -->
         <span v-if="messageTip" style="color:red">{{messageTip}}</span>
       </a-form-item>
     </a-modal>
@@ -418,7 +424,7 @@
   } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
   import checkMatemal from './stepModule/checkMatemal'
   import BMF from 'browser-md5-file'
-
+  import uploadFile from '@/components/uploadFile.vue'
 
   let nowIndex = 0
   let bestIndex = 0
@@ -428,7 +434,8 @@
     components: {
       UploadToAli,
       VuePreview,
-      checkMatemal
+      checkMatemal,
+      uploadFile
     },
     data() {
       return {
@@ -1068,76 +1075,76 @@
         that.imageArrList = []
         var img
         if (urlAll.length > 0) {
-          for (var i = 0; i < this.urlListImage.url.length; i++) {
+          for (var i = 0; i < urlAll.length; i++) {
             that.imageArrList.push({
               signature: this.urlListImage.md5[i],
-              url: this.urlListImage.url[i],
+              url: urlAll[i].url,
             })
 
             img = new Image()
-            img.src = this.urlListImage.url[i]
-            if (img.complete) {
-              // 打印
-              if (img.width == 720) {
-                if (img.height == 1280) {
-                  that.material.push(true)
-                } else {
-                  that.material.push(false)
-                }
-              } else if (img.width == 1080) {
-                if (img.height == 1920) {
-                  that.material.push(true)
-                } else {
-                  that.material.push(false)
-                }
-              } else if (img.width == 1280) {
-                if (img.height == 720) {
-                  that.material.push(true)
-                } else {
-                  that.material.push(false)
-                }
-              } else if (img.width == 1920) {
-                if (img.height == 1080) {
-                  that.material.push(true)
-                } else {
-                  that.material.push(false)
-                }
-              } else {
-                that.material.push(false)
-              }
-            } else {
-
-              img.onload = () => {
-                if (img.width == 720) {
-                  if (img.height == 1280) {
-                    that.material.push(true)
-                  } else {
-                    that.material.push(false)
-                  }
-                } else if (img.width == 1080) {
-                  if (img.height == 1920) {
-                    that.material.push(true)
-                  } else {
-                    that.material.push(false)
-                  }
-                } else if (img.width == 1280) {
-                  if (img.height == 720) {
-                    that.material.push(true)
-                  } else {
-                    that.material.push(false)
-                  }
-                } else if (img.width == 1920) {
-                  if (img.height == 1080) {
-                    that.material.push(true)
-                  } else {
-                    that.material.push(false)
-                  }
-                } else {
-                  that.material.push(false)
-                }
-
-              }
-            }
+            img.src = urlAll[i].url
+            // if (img.complete) {
+            //   // 打印
+            //   if (img.width == 720) {
+            //     if (img.height == 1280) {
+            //       that.material.push(true)
+            //     } else {
+            //       that.material.push(false)
+            //     }
+            //   } else if (img.width == 1080) {
+            //     if (img.height == 1920) {
+            //       that.material.push(true)
+            //     } else {
+            //       that.material.push(false)
+            //     }
+            //   } else if (img.width == 1280) {
+            //     if (img.height == 720) {
+            //       that.material.push(true)
+            //     } else {
+            //       that.material.push(false)
+            //     }
+            //   } else if (img.width == 1920) {
+            //     if (img.height == 1080) {
+            //       that.material.push(true)
+            //     } else {
+            //       that.material.push(false)
+            //     }
+            //   } else {
+            //     that.material.push(false)
+            //   }
+            // } else {
+
+            //   img.onload = () => {
+            //     if (img.width == 720) {
+            //       if (img.height == 1280) {
+            //         that.material.push(true)
+            //       } else {
+            //         that.material.push(false)
+            //       }
+            //     } else if (img.width == 1080) {
+            //       if (img.height == 1920) {
+            //         that.material.push(true)
+            //       } else {
+            //         that.material.push(false)
+            //       }
+            //     } else if (img.width == 1280) {
+            //       if (img.height == 720) {
+            //         that.material.push(true)
+            //       } else {
+            //         that.material.push(false)
+            //       }
+            //     } else if (img.width == 1920) {
+            //       if (img.height == 1080) {
+            //         that.material.push(true)
+            //       } else {
+            //         that.material.push(false)
+            //       }
+            //     } else {
+            //       that.material.push(false)
+            //     }
+
+            //   }
+            // }
           }
         }
 
@@ -1150,14 +1157,10 @@
         //   md5: []
         // }
         return new Promise(function (resolve, reject) {
-          for (let i = 0; i < file.length; i++) {
-            bmf.md5(file[i], (err, md5) => {
-              // that.urlListImage.name.push(file[i].name)
-              that.urlListImage.md5.push(md5)
-              resolve()
-
-            })
-          }
+          bmf.md5(file, (err, md5) => {
+            that.urlListImage.md5.push(md5)
+            resolve()
+          })
         })
       },
       overUpload(urlAll) {
@@ -1167,7 +1170,7 @@
         var bmf = new BMF()
         var that = this
         return new Promise(function (resolve, reject) {
-          bmf.md5(file[0], (err, md5) => {
+          bmf.md5(file, (err, md5) => {
 
 
             getAction('/kusiShouUpload/checkVideo', {

+ 1 - 1
src/views/modules/material/excellentMaterial.vue

@@ -220,7 +220,7 @@
                     }"></div>
                   <img v-if="active == 'IMAGE'" :src="items.url"
                     style="height:200px;max-width:100%;position:absolute;z-index:10;" />
-                  <img v-else :src="items.url + '?x-oss-process=video/snapshot,t_00000,m_fast'" alt=""
+                  <img v-else :src="items.coverUrl" alt=""
                     style="height:200px;max-width:100%;position:absolute;z-index:10;" />
                 </div>
 

+ 7 - 4
src/views/modules/material/fragmentMatemal.vue

@@ -384,12 +384,13 @@
         </a-form-item>
 
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="视频素材上传">
-          <upload-to-ali :customDomain="customDomain" preview :region="region" :bucket="bucket" :accept="acceptVideo"
+          <uploadFile :value.sync="urlList.url" :fileCount="1" uploadType="video" :multiple="false" />
+          <!-- <upload-to-ali :customDomain="customDomain" preview :region="region" :bucket="bucket" :accept="acceptVideo"
             :max="10" :size="1024000" :accessKeyId="accessKeyId" :accessKeySecret="accessKeySecret"
             :before-upload="file" :dir="dirVideo" @loaded="overUpload" v-decorator="[
               'url', // 给表单赋值或拉取表单时,该input对应的key
               { rules: [{ required: true, message: '请上传图片!' }] }
-            ]"></upload-to-ali>
+            ]"></upload-to-ali> -->
         </a-form-item>
         <a-form-item :label-col="labelCol" :wrapper-col="{
             xs: { span: 24 },
@@ -480,6 +481,7 @@
   } from '@/mixins/JeecgListMixin'
   import JEllipsis from '@/components/jeecg/JEllipsis'
   import UploadToAli from '@femessage/upload-to-ali'
+  import uploadFile from '@/components/uploadFile.vue'
   import {
     fileCheck,
     fileInsert,
@@ -525,7 +527,8 @@
       JEllipsis,
       UploadToAli,
       accountCheck,
-      checkMatemal
+      checkMatemal,
+      uploadFile
     },
 
     data() {
@@ -1250,7 +1253,7 @@
             }
             params.id = this.add ? null : this.id
             params.code = this.urlList.md5
-            params.url = values.url
+            params.url = this.urlList.url
             params.materialName = this.urlList.name
             params.userId = this.userInfo().id
             params.projectId = values.projectId

+ 17 - 20
src/views/modules/material/materialList.vue

@@ -303,7 +303,9 @@ a {
       </template>
       <a-form :form="form">
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="图片素材上传" class="add-image-material">
-          <upload-to-ali
+        <uploadFile :value.sync="urlList.url" :multiple='false'
+          @overUpload="overUpload" :fileCount="1" uploadType="image" />
+          <!-- <upload-to-ali
             style="width:160%"
             v-model="urlList.url"
             :customDomain="customDomain"
@@ -318,7 +320,7 @@ a {
             :before-upload="file"
             :dir="activeKey == 'image' ? dirImg : dirVideo"
             @loaded="overUpload"
-          ></upload-to-ali>
+          ></upload-to-ali> -->
           <span v-if="material.filter(item => item == false).length > 0 && urlList.url != ''" style="color:red"
             >上传素材的尺寸不符,请修改</span
           >
@@ -386,22 +388,9 @@ a {
               {{ refuseReason ? refuseReason : '无原因' }}
             </a-form-item>
             <a-form-item label="截图" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="active == '2'">
-              <upload-to-ali
-                v-if="refuseFile"
-                disabled
-                v-model="refuseFile"
-                :customDomain="customDomain"
-                multiple
-                preview
-                :region="region"
-                :bucket="bucket"
-                :accept="acceptImage"
-                :max="10"
-                :size="1024000"
-                :accessKeyId="accessKeyId"
-                :accessKeySecret="accessKeySecret"
-                :dir="dirImg"
-              ></upload-to-ali>
+              <div v-if="refuseFile" style="width:100%">
+                    <img style="width:100px;height:auto;margin:5px"  @click="showBoHui(item)" :src="item" v-for="(item,index) in refuseFile" :key="index" alt="">
+                </div>
               <div v-else>无截图</div>
             </a-form-item>
           </a-form>
@@ -417,6 +406,7 @@ a {
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import UploadToAli from '@femessage/upload-to-ali'
+import uploadFile from '@/components/uploadFile.vue'
 import { fileCheck, fileInsert, fileEdit } from '@/api/actor'
 import { getAction, postAction, postFile, downFile, downFilePost, deleteAction, putAction } from '@/api/manage'
 
@@ -435,7 +425,8 @@ export default {
     JEllipsis,
     UploadToAli,
     accountCheck,
-    selectTable
+    selectTable,
+    uploadFile
   },
 
   data() {
@@ -539,7 +530,9 @@ export default {
       noList: [],
       material: [],
       excellent: 0,
-      code: ''
+      code: '',
+      bohui:"",
+      bohuiShow:false
     }
   },
   filters: {
@@ -606,6 +599,10 @@ export default {
     }
   },
   methods: {
+    showBoHui(item){
+      this.bohui = item
+      this.bohuiShow = true
+    },
     setSuccess() {
       var params = {}
       params.id = this.code

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1828 - 1539
src/views/modules/material/videoMaterial.vue


+ 6 - 2
src/views/modules/onlineTraining/onlineTrainingList.vue

@@ -112,10 +112,12 @@
         </a-form-item>
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="文件上传"
           v-show="(getData('title') && getData('topic'))||(oneList.length>0 && getData('topicAll'))">
-          <upload-to-ali v-model="fileUrl" :customDomain="customDomain" preview :region="region" :bucket="bucket"
+          <uploadFile :value.sync="fileUrl" :multiple='false':checkFile="file" :fileCount="1"
+            uploadType="video" />
+          <!-- <upload-to-ali v-model="fileUrl" :customDomain="customDomain" preview :region="region" :bucket="bucket"
             :accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId"
             :accessKeySecret="accessKeySecret" :before-upload="file" :dir="dirVideo" @loaded="overUpload">
-          </upload-to-ali>
+          </upload-to-ali> -->
         </a-form-item>
 
       </a-form>
@@ -136,6 +138,7 @@
   import $ from 'jquery'
   import qs from 'qs'
   import UploadToAli from '@femessage/upload-to-ali'
+  import uploadFile from '@/components/uploadFile.vue'
   // document.write(textDes('https://ctop-media.oss-cn-beijing.aliyuncs.com/video/2020-03-20/20网服-1584693978588.mp4'))
   // document.write('<br>' + desDecrypt('s4HMPbmUfZ0=', 'ckplayerDesKey'))
   function textDes(str) {
@@ -250,6 +253,7 @@
     },
     components: {
       UploadToAli,
+      uploadFile
     },
     methods: {
       clear() {

+ 7 - 3
src/views/modules/prop/modules/ActorModal.vue

@@ -9,9 +9,11 @@
           <a-input placeholder="请输入道具名称" v-decorator="['name', validatorRules.name ]" />
         </a-form-item>
         <a-form-item label="照片" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <upload-to-ali v-model="imageUrl" :customDomain="customDomain" multiple preview :region="region"
+          <uploadFile :value.sync="imageUrl" @overUpload="overUpload" :fileCount="10"
+            uploadType="image" />
+          <!-- <upload-to-ali v-model="imageUrl" :customDomain="customDomain" multiple preview :region="region"
             :bucket="bucket" :accept="acceptImage" :max="10" :size="1024000" :accessKeyId="accessKeyId"
-            :accessKeySecret="accessKeySecret"></upload-to-ali>
+            :accessKeySecret="accessKeySecret"></upload-to-ali> -->
         </a-form-item>
         <a-form-item label="道具类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-input placeholder="请输入道具类型" v-decorator="['type']" />
@@ -47,11 +49,13 @@
   import JTreeSelect from '@/components/jeecg/JTreeSelect'
   import moment from 'moment'
   import UploadToAli from '@femessage/upload-to-ali'
+  import uploadFile from '@/components/uploadFile.vue'
   export default {
     name: "ActorModal",
     components: {
       UploadToAli,
-      JTreeSelect
+      JTreeSelect,
+      uploadFile
     },
     data() {
       return {

+ 9 - 5
src/views/modules/yard/YardList.vue

@@ -134,15 +134,17 @@
 
     <!-- 新增图集 -->
     <a-modal v-model="addPhoto" title="新增图集" @ok="handleOk('photo')" @cancel="handleCancel('photo')">
-      <upload-to-ali style="margin:10px" v-model="imageUrl" :customDomain="customDomain" preview :region="region"
+        <uploadFile :value.sync="imageUrl" :fileCount="1" uploadType="image" :multiple="false" />
+      <!-- <upload-to-ali style="margin:10px" v-model="imageUrl" :customDomain="customDomain" preview :region="region"
         :bucket="bucket" :accept="acceptImage" :max="1" :size="1024000" :accessKeyId="accessKeyId"
-        :accessKeySecret="accessKeySecret"></upload-to-ali>
+        :accessKeySecret="accessKeySecret"></upload-to-ali> -->
     </a-modal>
     <!-- 新增作品 -->
     <a-modal v-model="addVideo" title="新增作品" @ok="handleOk('video')" @cancel="handleCancel('video')">
-      <upload-to-ali style="margin:10px" v-model="videoUrl" :customDomain="customDomain" preview :region="region"
+        <uploadFile :value.sync="videoUrl" :fileCount="1" uploadType="video" :multiple="false" />
+      <!-- <upload-to-ali style="margin:10px" v-model="videoUrl" :customDomain="customDomain" preview :region="region"
         :bucket="bucket" :accept="acceptVideo" :max="1" :size="1024000" :accessKeyId="accessKeyId"
-        :accessKeySecret="accessKeySecret"></upload-to-ali>
+        :accessKeySecret="accessKeySecret"></upload-to-ali> -->
     </a-modal>
 
     <yard-modal ref="modalForm" @ok="modalFormOk"></yard-modal>
@@ -157,6 +159,7 @@
   } from '@/mixins/JeecgListMixin'
   import JEllipsis from '@/components/jeecg/JEllipsis'
   import UploadToAli from '@femessage/upload-to-ali'
+  import uploadFile from '@/components/uploadFile.vue'
   import {
     yardPhotoList,
     yardVideoList,
@@ -171,7 +174,8 @@
     components: {
       JEllipsis,
       YardModal,
-      UploadToAli
+      UploadToAli,
+      uploadFile
     },
     data() {
       return {

+ 10 - 5
src/views/modules/yard/modules/YardModal.vue

@@ -28,7 +28,8 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
         >
-          <upload-to-ali
+        <uploadFile :value.sync="imageUrl" :fileCount="1" uploadType="image" :multiple="false" />
+          <!-- <upload-to-ali
             v-model="imageUrl"
             :customDomain="customDomain"
             multiple
@@ -40,14 +41,16 @@
             :size="1024000"
             :accessKeyId="accessKeyId"
             :accessKeySecret="accessKeySecret"
-          ></upload-to-ali>
+          ></upload-to-ali> -->
         </a-form-item>
         <a-form-item
           label="视频"
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
         >
-          <upload-to-ali
+
+         <uploadFile :value.sync="videoUrl" :fileCount="1" uploadType="video" :multiple="false" />
+          <!-- <upload-to-ali
             v-model="videoUrl"
             :customDomain="customDomain"
             multiple
@@ -59,7 +62,7 @@
             :size="1024000"
             :accessKeyId="accessKeyId"
             :accessKeySecret="accessKeySecret"
-          ></upload-to-ali>
+          ></upload-to-ali> -->
         </a-form-item>
 
         <a-form-item
@@ -91,11 +94,13 @@
   import JTreeSelect from '@/components/jeecg/JTreeSelect'
   import moment from 'moment'
   import UploadToAli from '@femessage/upload-to-ali'
+  import uploadFile from '@/components/uploadFile.vue'
   export default {
     name: "YardModal",
     components: {
       UploadToAli,
-      JTreeSelect
+      JTreeSelect,
+      uploadFile
     },
     data() {
       return {

+ 9 - 5
src/views/modules/yard/modules/yardDetail.vue

@@ -106,7 +106,8 @@ li {
       @ok="handleOk('photo')"
       @cancel="handleCancel('photo')"
     >
-      <upload-to-ali
+     <uploadFile :value.sync="imageUrl" :fileCount="1" uploadType="image" :multiple="false" />
+      <!-- <upload-to-ali
         style="margin:10px"
         v-model="imageUrl"
         :customDomain="customDomain"
@@ -118,7 +119,7 @@ li {
         :size="1024000"
         :accessKeyId="accessKeyId"
         :accessKeySecret="accessKeySecret"
-      ></upload-to-ali>
+      ></upload-to-ali> -->
     </a-modal>
     <!-- 新增作品 -->
     <a-modal
@@ -127,7 +128,8 @@ li {
       @ok="handleOk('video')"
       @cancel="handleCancel('video')"
     >
-      <upload-to-ali
+    <uploadFile :value.sync="videoUrl" :fileCount="1" uploadType="video" :multiple="false" />
+      <!-- <upload-to-ali
         style="margin:10px"
         v-model="videoUrl"
         :customDomain="customDomain"
@@ -139,7 +141,7 @@ li {
         :size="1024000"
         :accessKeyId="accessKeyId"
         :accessKeySecret="accessKeySecret"
-      ></upload-to-ali>
+      ></upload-to-ali> -->
     </a-modal>
   </div>
 </template>
@@ -149,13 +151,15 @@ import {
 
 } from '@/api/actor'
 import UploadToAli from '@femessage/upload-to-ali'
+import uploadFile from '@/components/uploadFile.vue'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { closeAllVideoFun } from '@/utils/videoControl'
 export default {
   name: 'VmCard',
   mixins: [JeecgListMixin],
   components: {
-    UploadToAli
+    UploadToAli,
+    uploadFile
   },
   props: {},
   data: function() {