瀏覽代碼

提交代码

zhuxinbo 5 年之前
父節點
當前提交
7733584e90

+ 3 - 8
src/components/ctop/vm-image-list.vue

@@ -63,17 +63,12 @@
             @change="pageChange"
           ></a-pagination>-->
 
-          <a-pagination
-            showQuickJumper
-            :total="total"
-            @change="pageChange"
-            :pageSize.sync="showNum"
-          />
+          <a-pagination showQuickJumper :total="total" @change="pageChange" :pageSize.sync="showNum" />
         </a-row>
       </a-row>
     </a-row>
     <a-row class="image-list" :gutter="16" style="padding:0 8px">
-      <a-col :lg="6" :sm="12" class="vm-margin" v-for="(item,index) of dataShow" :key="index" style="padding:0">
+      <a-col :lg="6" :sm="12" class="vm-margin" v-for="(item, index) of dataShow" :key="index" style="padding:0">
         <vm-card
           style="margin: 0 15px;"
           :editable="true"
@@ -84,7 +79,7 @@
           :editUrl="item.editUrl"
           :id="item.id"
           :record="item"
-          @delete-ok=" deleteOk(item) "
+          @delete-ok="deleteOk(item)"
           @updateList="updateList"
         ></vm-card>
       </a-col>

+ 279 - 149
src/views/modules/Statistics/yicheStatistics/dayStatistics.vue

@@ -69,18 +69,31 @@ th div {
       <a-row type="flex" align="middle" justify="space-between" class="panel-body">
         <div class="search-bar" style="width:100%">
           <span>账户选择:</span>
-          <treeselect :appId.sync="appId" style="width:400px" />
+          <a-select
+            v-model="projectId"
+            style="width:500px"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+          >
+            <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
+              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                item.mediaId == '1' ? '头条' : '快手'
+              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
+            </a-select-option>
+          </a-select>
+          <span style="margin-left:10px">日期选择:</span>
+          <a-date-picker v-model="statDate" format="YYYY-MM-DD" :defaultValue="moment().subtract(1, 'days')" />
           <span style="margin-left:10px">返点比例:</span>
           <a-input-number
             :min="1"
             :max="10"
-            :step="0.1"
+            :step="0.01"
             v-model="discount"
             placeholder="请输入折扣"
             style="width:100px"
           />
-          <span style="margin-left:10px">日期选择:</span>
-          <a-date-picker @change="getDate" :disabledDate="disabledDate" />
+
           <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
           <a-button
             type="primary"
@@ -113,30 +126,9 @@ th div {
             bordered
             id="outTable"
             :pagination="ipagination"
-            :scroll="{ x: 1900 }"
+            :scroll="{ x: 2000 }"
             :loading="loading"
           >
-            <span slot="statDate" slot-scope="statDate">{{ statDate | formatDate }}</span>
-            <span slot="disCountCost" slot-scope="disCountCost">{{ disCountCost | toFixtwo }}</span>
-
-            <span slot="clickConversionRate" slot-scope="clickConversionRate">{{ clickConversionRate | getBo }}</span>
-
-            <span slot="cost" slot-scope="cost">{{ cost | toFixtwo }}</span>
-            <span slot="photoClickCost" slot-scope="photoClickCost">{{ photoClickCost | toFixtwo }}</span>
-            <span slot="impression1kCost" slot-scope="impression1kCost">{{ impression1kCost | toFixtwo }}</span>
-            <span slot="conversionPrice" slot-scope="conversionPrice">{{ conversionPrice | toFixtwo }}</span>
-            <span slot="discountConversionPrice" slot-scope="discountConversionPrice">{{
-              discountConversionPrice | toFixtwo
-            }}</span>
-            <span slot="contractRebateRealCharged" slot-scope="contractRebateRealCharged">{{
-              contractRebateRealCharged | toFixtwo
-            }}</span>
-            <span slot="actualCost" slot-scope="actualCost">{{ actualCost | toFixtwo }}</span>
-
-            <span slot="photoClickRatio" slot-scope="photoClickRatio">{{ photoClickRatio | getBo }}</span>
-            <span slot="actionRatio" slot-scope="actionRatio">{{ actionRatio | getBo }}</span>
-            <span slot="conversionRate" slot-scope="conversionRate">{{ conversionRate | getBo }}</span>
-            <span slot="photoClickRatio" slot-scope="photoClickRatio">{{ photoClickRatio | getBo }}</span>
           </a-table>
         </a-card>
       </a-col>
@@ -155,205 +147,299 @@ import axios from 'axios'
 import lifting from '../components/lifting'
 import timeCheck from '../components/timeCheck'
 import Treeselect from '../components/Treeselect.vue'
-
+import { mapGetters } from 'vuex'
 import { JeecgListMixin } from '@/mixins/ipagination'
 
 var length = 0
 var active = 1
 const columns = [
   {
-    title: '消耗(¥)',
-    dataIndex: 'cost',
-    scopedSlots: { customRender: 'cost' },
+    title: '代理商',
+    dataIndex: 'agent',
+    scopedSlots: { customRender: 'agent' },
     align: 'center'
   },
   {
-    title: '展示数',
-    dataIndex: 'photoShow',
+    title: '媒体',
+    dataIndex: 'media',
+    scopedSlots: { customRender: 'media' },
     align: 'center'
   },
   {
-    title: '点击数',
-    dataIndex: 'photoClick',
+    title: '设备',
+    dataIndex: 'systemType',
     align: 'center'
   },
   {
-    title: '点击率',
-    dataIndex: 'photoClickRatio',
+    title: '日期',
+    dataIndex: 'statDate',
+    align: 'center'
+  },
+  {
+    title: '渠道包',
+    dataIndex: 'campaignName',
+    align: 'center'
+  },
+  {
+    title: '账面花费',
+    dataIndex: 'charge',
     align: 'center',
-    scopedSlots: { customRender: 'photoClickRatio' }
+    scopedSlots: { customRender: 'charge' }
   },
   {
-    title: '平均点击花费',
-    dataIndex: 'photoClickCost',
+    title: '现金花费',
+    dataIndex: 'cashCost',
     align: 'center',
-    scopedSlots: { customRender: 'photoClickCost' }
+    scopedSlots: { customRender: 'cashCost' }
   },
+
   {
-    title: '行为数',
-    dataIndex: 'bclick',
-    align: 'center'
+    title: '曝光',
+    dataIndex: 'photoShow',
+    align: 'center',
+    scopedSlots: { customRender: 'photoShow' }
   },
   {
-    title: '行为率',
-    dataIndex: 'actionRatio',
+    title: '点击',
+    dataIndex: 'photoClick',
     align: 'center',
-    scopedSlots: { customRender: 'actionRatio' }
+    scopedSlots: { customRender: 'photoClick' }
   },
   {
-    title: '平均千次展示花费(¥)',
+    title: '点击率',
+    dataIndex: 'clickRate',
+    align: 'center',
+    scopedSlots: { customRender: 'clickRate' }
+  },
+  {
+    title: '千次嚗光花费',
     dataIndex: 'impression1kCost',
     align: 'center',
     scopedSlots: { customRender: 'impression1kCost' }
   },
-
   {
-    title: '转化数',
-    dataIndex: 'conversions',
-    align: 'center'
+    title: '行为量',
+    dataIndex: 'bclick',
+    align: 'center',
+    scopedSlots: { customRender: 'bclick' }
   },
   {
-    title: '转化单价(¥)',
-    dataIndex: 'conversionPrice',
+    title: '下载完成数',
+    dataIndex: 'eventJinJianApp',
     align: 'center',
-    scopedSlots: { customRender: 'conversionPrice' }
+    scopedSlots: { customRender: 'eventJinJianApp' }
   },
   {
-    title: '转化率',
-    dataIndex: 'conversionRate',
+    title: '账户激活量',
+    dataIndex: 'activation',
     align: 'center',
-    scopedSlots: { customRender: 'conversionRate' }
+    scopedSlots: { customRender: 'activation' }
   },
   {
-    title: '折后转化成本(¥)',
-    dataIndex: 'discountConversionPrice',
+    title: '友盟激活量',
+    dataIndex: 'youMengactivation',
     align: 'center',
-    scopedSlots: { customRender: 'discountConversionPrice' }
+    scopedSlots: { customRender: 'youMengactivation' }
   },
   {
-    title: '激励花费(¥)',
-    dataIndex: 'contractRebateRealCharged',
+    title: 'TD激活量',
+    dataIndex: 'tdActivation',
     align: 'center',
-    scopedSlots: { customRender: 'contractRebateRealCharged' }
+    scopedSlots: { customRender: 'tdActivation' }
   },
   {
-    title: '实际消耗(¥)',
-    dataIndex: 'actualCost',
+    title: '账户激活成本',
+    dataIndex: 'activationCost',
     align: 'center',
-    scopedSlots: { customRender: 'actualCost' }
-  }
-]
+    scopedSlots: { customRender: 'activationCost' }
+  },
+  {
+    title: '友盟激活成本',
+    dataIndex: 'youMengactivationCost',
+    align: 'center',
+    scopedSlots: { customRender: 'youMengactivationCost' }
+  },
+  {
+    title: 'TD激活成本',
+    dataIndex: 'tdActivationCost',
+    align: 'center',
+    scopedSlots: { customRender: 'tdActivationCost' }
+  },
+  {
+    title: '平均行为单价',
+    dataIndex: 'actionCost',
+    align: 'center',
+    scopedSlots: { customRender: 'actionCost' }
+  },
+  {
+    title: '平均点击单价',
+    dataIndex: 'clickCost',
+    align: 'center',
+    scopedSlots: { customRender: 'clickCost' }
+  },
 
-const columnsGroup = [
   {
-    title: '日期',
-    dataIndex: 'statDate',
-    scopedSlots: { customRender: 'statDate' },
-    align: 'center'
+    title: '行为率',
+    dataIndex: 'actionRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'actionRatio' }
   },
   {
-    title: '账号',
-    dataIndex: 'accountId',
+    title: '下载完成行为率',
+    dataIndex: 'eventJinJianAppRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'eventJinJianAppRatio' }
+  },
+  {
+    title: '下载完成激活率',
+    dataIndex: 'activationRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'activationRatio' }
+  }
+]
+const columnsThree = [
+  {
+    title: '代理商',
+    dataIndex: 'agent',
+    scopedSlots: { customRender: 'agent' },
     align: 'center'
   },
   {
-    title: '账号名称',
-    dataIndex: 'authName',
+    title: '媒体',
+    dataIndex: 'media',
+    scopedSlots: { customRender: 'media' },
     align: 'center'
   },
   {
-    title: '计划名称',
-    dataIndex: 'campaignName',
+    title: '设备',
+    dataIndex: 'systemType',
     align: 'center'
   },
   {
-    title: '广告组名称',
-    dataIndex: 'unitName',
+    title: '日期',
+    dataIndex: 'statDate',
     align: 'center'
   },
   {
-    title: '消耗',
-    dataIndex: 'cost',
+    title: '账面花费',
+    dataIndex: 'charge',
     align: 'center',
-    scopedSlots: { customRender: 'cost' }
+    scopedSlots: { customRender: 'charge' }
   },
   {
-    title: '折后消耗',
-    dataIndex: 'disCountCost',
+    title: '现金花费',
+    dataIndex: 'cashCost',
     align: 'center',
-    scopedSlots: { customRender: 'cost' }
+    scopedSlots: { customRender: 'cashCost' }
   },
+
   {
-    title: '展示数',
+    title: '曝光',
     dataIndex: 'photoShow',
-    align: 'center'
+    align: 'center',
+    scopedSlots: { customRender: 'photoShow' }
   },
   {
-    title: '点击',
+    title: '点击',
     dataIndex: 'photoClick',
-    align: 'center'
+    align: 'center',
+    scopedSlots: { customRender: 'photoClick' }
   },
   {
     title: '点击率',
-    dataIndex: 'photoClickRatio',
+    dataIndex: 'clickRate',
     align: 'center',
-    scopedSlots: { customRender: 'photoClickRatio' }
+    scopedSlots: { customRender: 'clickRate' }
   },
-
   {
-    title: '行为数',
+    title: '千次嚗光花费',
+    dataIndex: 'impression1kCost',
+    align: 'center',
+    scopedSlots: { customRender: 'impression1kCost' }
+  },
+  {
+    title: '行为量',
     dataIndex: 'bclick',
-    align: 'center'
+    align: 'center',
+    scopedSlots: { customRender: 'bclick' }
   },
   {
-    title: '行为率',
-    dataIndex: 'actionRatio',
+    title: '下载完成数',
+    dataIndex: 'eventJinJianApp',
     align: 'center',
-    scopedSlots: { customRender: 'actionRatio' }
+    scopedSlots: { customRender: 'eventJinJianApp' }
   },
   {
-    title: '平均千次展示花费(¥)',
-    dataIndex: 'impression1kCost',
+    title: '账户激活量',
+    dataIndex: 'activation',
     align: 'center',
-    scopedSlots: { customRender: 'impression1kCost' }
+    scopedSlots: { customRender: 'activation' }
   },
   {
-    title: '平均点击花费',
-    dataIndex: 'photoClickCost',
+    title: '友盟激活量',
+    dataIndex: 'youMengactivation',
     align: 'center',
-    scopedSlots: { customRender: 'photoClickCost' }
+    scopedSlots: { customRender: 'youMengactivation' }
   },
   {
-    title: '转化数',
-    dataIndex: 'conversions',
-    align: 'center'
+    title: 'TD激活量',
+    dataIndex: 'tdActivation',
+    align: 'center',
+    scopedSlots: { customRender: 'tdActivation' }
+  },
+  {
+    title: '账户激活成本',
+    dataIndex: 'activationCost',
+    align: 'center',
+    scopedSlots: { customRender: 'activationCost' }
   },
   {
-    title: '转化单价(¥)',
-    dataIndex: 'conversionPrice',
+    title: '友盟激活成本',
+    dataIndex: 'youMengactivationCost',
     align: 'center',
-    scopedSlots: { customRender: 'conversionPrice' }
+    scopedSlots: { customRender: 'youMengactivationCost' }
   },
   {
-    title: '转化率',
-    dataIndex: 'conversionRate',
+    title: 'TD激活成本',
+    dataIndex: 'tdActivationCost',
     align: 'center',
-    scopedSlots: { customRender: 'conversionRate' }
+    scopedSlots: { customRender: 'tdActivationCost' }
   },
   {
-    title: '折后转化成本(¥)',
-    dataIndex: 'discountConversionPrice',
+    title: '平均行为单价',
+    dataIndex: 'actionCost',
     align: 'center',
-    scopedSlots: { customRender: 'discountConversionPrice' }
+    scopedSlots: { customRender: 'actionCost' }
   },
   {
-    title: '点击转化率',
-    dataIndex: 'clickConversionRate',
+    title: '平均点击单价',
+    dataIndex: 'clickCost',
     align: 'center',
-    scopedSlots: { customRender: 'clickConversionRate' }
+    scopedSlots: { customRender: 'clickCost' }
+  },
+
+  {
+    title: '行为率',
+    dataIndex: 'actionRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'actionRatio' }
+  },
+  {
+    title: '下载完成行为率',
+    dataIndex: 'eventJinJianAppRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'eventJinJianAppRatio' }
+  },
+  {
+    title: '下载完成激活率',
+    dataIndex: 'activationRatio',
+    align: 'center',
+    scopedSlots: { customRender: 'activationRatio' }
   }
 ]
 
+const columnsGroup = columns
+
 export default {
   name: 'data-display-statistics',
   components: {
@@ -367,28 +453,40 @@ export default {
   mixins: [JeecgListMixin],
   data: function() {
     return {
+      // this.timeRange[1] = moment().add(1, 'months')
+      statDate: moment().subtract(1, 'day'),
       title: '账户数据展示',
       show: true,
       data: [],
       dataAll: null,
-      columns: columns,
+      columns: columnsThree,
       options: [],
       list: [],
       appId: [],
       tabListNoTitle: [
         {
           key: 'day',
-          tab: '分日数据'
+          tab: '安卓汇总'
         },
         {
           key: 'group',
-          tab: '分组数据'
+          tab: 'ios汇总'
+        },
+        {
+          key: 'application',
+          tab: '应用直达'
+        },
+        {
+          key: 'channel',
+          tab: '渠道包分析'
         }
       ],
       noTitleKey: 'day',
-      discount: 1,
+      discount: 1.06,
       date: '',
-      loading: false
+      loading: false,
+      dataElse: [],
+      projectId: 50
     }
   },
   filters: {
@@ -424,17 +522,35 @@ export default {
   },
   methods: {
     moment,
-    
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    getParticipateList() {
+      getAction('/ctop/projectMember/participateList', {
+        userId: this.userInfo().id
+      }).then(res => {
+        if (res.code == 0) {
+          this.dataElse = res.result
+        }
+      })
+    },
     onTabChange(key, type) {
       console.log(key, type)
       this[type] = key
       this.data = []
-      if (key == 'day') {
+      if (this.noTitleKey == 'day') {
+        this.columns = columnsThree
+        this.data.push(this.dataAll.android)
+      } else if (this.noTitleKey == 'group') {
+        this.columns = columnsThree
+        this.data.push(this.dataAll.ios)
+      } else if (this.noTitleKey == 'application') {
+        this.columns = columnsThree
+        this.data.push(this.dataAll.directApplication)
+      } else if (this.noTitleKey == 'channel') {
         this.columns = columns
-        this.data.push({ ...this.dataAll.dailyAccountReport, key: 1 })
-      } else {
-        this.columns = columnsGroup
-        this.data = this.dataAll.dailyGroupReport.map((item, index) => {
+        this.data = this.dataAll.channelSubcontracting.map((item, index) => {
           return {
             ...item,
             key: index
@@ -452,27 +568,36 @@ export default {
     },
     addUser() {
       var that = this
-      if (this.appId.length > 0 && this.date != '') {
-        that.getDailyReport()
-      } else {
-        this.$message.error('请选择账户及时间')
-      }
+      //   if (this.appId.length > 0 && this.date != '') {
+      that.getDailyReport()
+      //   } else {
+      //     this.$message.error('请选择账户及时间')
+      //   }
     },
     getDailyReport() {
       var params = {}
-      params.accountIds = JSON.stringify(this.appId)
-      params.date = this.date
-      params.discount = this.discount
+      params.projectId = this.projectId
+      params.disCount = this.discount
+      params.statDate = this.statDate.format('YYYY-MM-DD')
       this.data = []
       this.loading = true
-      getDailyReport(params).then(res => {
+      postAction('/ctop/yiche/report/dailyReport', params).then(res => {
         if (res.success) {
           this.loading = false
           this.dataAll = res.result
+          console.log(res)
           if (this.noTitleKey == 'day') {
-            this.data.push({ ...res.result.dailyAccountReport, key: 1 })
-          } else {
-            this.data = res.result.dailyGroupReport.map((item, index) => {
+            this.columns = columnsThree
+            this.data.push({ ...res.result.android, key: 1 })
+          } else if (this.noTitleKey == 'group') {
+            this.columns = columnsThree
+            this.data.push({ ...res.result.ios, key: 1 })
+          } else if (this.noTitleKey == 'application') {
+            this.columns = columnsThree
+            this.data.push({ ...res.result.directApplication, key: 1 })
+          } else if (this.noTitleKey == 'channel') {
+            this.columns = columns
+            this.data = res.result.channelSubcontracting.map((item, index) => {
               return {
                 ...item,
                 key: index
@@ -504,17 +629,20 @@ export default {
     },
     exportExcel() {
       var params = {}
-      params.accountIds = JSON.stringify(this.appId)
-      params.date = this.date
-      params.discount = this.discount
-      downFilePost('/ctop/daily/exportDailyReport', params).then(res => {
+      params.projectId = this.projectId
+      params.disCount = this.discount
+      params.statDate = this.statDate.format('YYYY-MM-DD')
+      var name = this.dataElse.filter(item => {
+        return item.projectId == this.projectId
+      })[0].projectName
+      downFilePost('/ctop/yiche/report/exportDailyReport', params).then(res => {
         let blob = new Blob([res], {
           type: 'application/vnd.ms-excel'
         })
         let downloadElement = document.createElement('a')
         let href = window.URL.createObjectURL(blob) //创建下载的链接
         downloadElement.href = href
-        downloadElement.download = this.date + '-日报' //下载后文件名
+        downloadElement.download = name + '-' + this.statDate.format('YYYY-MM-DD') + '-日报' //下载后文件名
         document.body.appendChild(downloadElement)
         downloadElement.click() //点击下载
         document.body.removeChild(downloadElement) //下载完成移除元素
@@ -525,7 +653,9 @@ export default {
   watch: {},
   distoryed() {},
   mounted: function() {
-    this.$nextTick(() => {})
+    this.getParticipateList()
+    this.statDate = moment().subtract(1, 'day')
+    // moment().format('YYYY-MM-DD_HH:mm')
   }
 }
 </script>

+ 26 - 12
src/views/modules/Statistics/yicheStatistics/timeStatistics.vue

@@ -82,6 +82,8 @@ th div {
               }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
           </a-select>
+          <span style="margin-left:10px">日期选择:</span>
+          <a-date-picker v-model="statDate" format="YYYY-MM-DD" />
           <span style="margin-left:10px">返点比例:</span>
           <a-input-number
             :min="1"
@@ -91,6 +93,7 @@ th div {
             placeholder="请输入折扣"
             style="width:100px"
           />
+
           <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
           <a-button
             type="primary"
@@ -201,6 +204,7 @@ export default {
   mixins: [JeecgListMixin],
   data: function() {
     return {
+      statDate: moment(new Date()),
       title: '账户数据展示',
       show: true,
       data: [],
@@ -315,6 +319,7 @@ export default {
       var params = {}
       params.projectId = this.projectId
       params.disCount = this.discount
+      params.statDate = this.statDate.format('YYYY-MM-DD')
       this.data = []
       this.loading = true
       postAction('/ctop/yiche/report/hourReport', params).then(res => {
@@ -323,19 +328,27 @@ export default {
           this.dataAll = res.result
           console.log(res)
           if (this.noTitleKey == 'day') {
-            this.data = res.result.android.map((item, index) => {
-              return {
-                ...item,
-                key: index
-              }
-            })
+            if (res.result.android) {
+              this.data = res.result.android.map((item, index) => {
+                return {
+                  ...item,
+                  key: index
+                }
+              })
+            } else {
+              this.data = []
+            }
           } else {
-            this.data = res.result.ios.map((item, index) => {
-              return {
-                ...item,
-                key: index
-              }
-            })
+            if (res.result.ios) {
+              this.data = res.result.ios.map((item, index) => {
+                return {
+                  ...item,
+                  key: index
+                }
+              })
+            } else {
+              this.data = []
+            }
           }
           this.ipagination.total = this.data.length
         }
@@ -364,6 +377,7 @@ export default {
       var params = {}
       params.projectId = this.projectId
       params.disCount = this.discount
+      params.statDate = this.statDate.format('YYYY-MM-DD')
       var name = this.dataElse.filter(item => {
         return item.projectId == this.projectId
       })[0].projectName

+ 4 - 4
src/views/modules/actor/ActorList.vue

@@ -5,13 +5,13 @@
     @delete-ok="deletefn"
     class="vm-margin"
     @getList="getActorList"
-    @updateList="getActorList(1,'')"
+    @updateList="getActorList(1, '')"
   ></vm-image-list>
 </template>
 
 <script>
 import VmImageList from '@/components/ctop/vm-image-list'
-import { actorList  } from '@/api/actor'
+import { actorList } from '@/api/actor'
 export default {
   name: 'ImageList',
   components: {
@@ -30,9 +30,9 @@ export default {
         }
       }
     },
-    getActorList(page,name) {
+    getActorList(page, name) {
       this.dataImageList = []
-      actorList({ pageNo: page, pageSize: 8,name:name }).then(res => {
+      actorList({ pageNo: page, pageSize: 8, name: name }).then(res => {
         if (res.code == 0) {
           this.dataImageList = res.result.records
           this.total = res.result.total

+ 118 - 534
src/views/modules/material/materialList.vue

@@ -21,9 +21,9 @@
 }
 </style>
 <style lang="scss" scoped>
-.home-item {
-  overflow: hidden;
-}
+// .home-item {
+//   overflow: hidden;
+// }
 
 @media (min-width: 1024px) {
   .home-item {
@@ -166,38 +166,7 @@ a {
         <a-row :gutter="24">
           <a-col :md="8" :sm="8">
             <selectTable :projectId.sync="queryParam.projectId"></selectTable>
-            <!-- <a-form-item label="项目名称">
-              <a-select
-                placeholder="请输入项目名称"
-                showSearch
-                optionFilterProp="children"
-                :filterOption="filterOption"
-                v-model="queryParam.projectId"
-                @change="getList"
-              >
-                <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
-                  {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-                    item.mediaId == '1' ? '头条' : '快手'
-                  }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
-                </a-select-option>
-              </a-select>
-            </a-form-item> -->
-          </a-col>
-          <!-- <a-col :md="6" :sm="8">
-            <a-form-item label="剪辑">
-              <a-input placeholder="请输入剪辑者名称" v-model="queryParam.advertiserId"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="编导">
-              <a-input placeholder="请输入编导" v-model="queryParam.responsible"></a-input>
-            </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="拍摄">
-              <a-input placeholder="请输入拍摄" v-model="queryParam.responsible"></a-input>
-            </a-form-item>
-          </a-col> -->
           <a-col :md="8" :sm="8">
             <a-form-item label="时间选择">
               <!-- <a-date-picker v-model="queryParam.createTime" format="YYYY-MM-DD" style="width:100%" /> -->
@@ -218,27 +187,13 @@ a {
     <!-- <div> -->
 
     <div class="table-operator" style="position:relative;z-index:100">
-      <a-button @click="visible = true" type="primary" icon="plus">新增</a-button>
+      <!-- <a-button @click="visible = true" type="primary" icon="plus">新增</a-button> -->
       <a-button @click="onCheckAllChange" v-if="queryParam.projectId && active == '1'">{{
         checkAll ? '取消  (  ' + checkArr.length + '  )' : '全选'
       }}</a-button>
       <a-button v-if="queryParam.projectId && active == '1'" :disabled="checkArr.length == 0" @click="tongbu"
         >一键下载
       </a-button>
-      <a-button
-        v-if="
-          queryParam.projectId &&
-            active == '1' &&
-            (role.roleCode == 'operator' ||
-              role.roleCode == 'kuaishouOperationManager' ||
-              role.roleCode == 'admin' ||
-              role.roleCode == 'operationAssistant' ||
-              role.roleCode == 'touTiaoOperationManager')
-        "
-        :disabled="checkArr.length == 0"
-        @click="tongbuImage"
-        >一键同步</a-button
-      >
     </div>
     <a-tabs @change="callbackTwo" v-model="active" id="material-card" type="card">
       <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
@@ -299,65 +254,12 @@ a {
                   <a
                     href="javascript:;"
                     style="margin-left:20px"
-                    @click="edit(items, '2')"
+                    @click="imageEdit(items, '2')"
                     v-show="active == '2'"
                     v-if="items.userId == userInfo().id"
                   >
                     修改</a
                   >
-                  <a-popconfirm
-                    @confirm="okEditShow(items, '2')"
-                    v-show="active != '2'"
-                    v-if="
-                      role.roleCode == 'operator' ||
-                        role.roleCode == 'kuaishouOperationManager' ||
-                        role.roleCode == 'admin' ||
-                        role.roleCode == 'touTiaoOperationManager'
-                    "
-                  >
-                    <div slot="title">
-                      <div>
-                        驳回原因:
-                        <a-textarea
-                          placeholder="请输入原因"
-                          v-model="refuseReason"
-                          :autosize="{ minRows: 3, maxRows: 10 }"
-                        />
-                      </div>
-                      <div>
-                        截图:
-                        <upload-to-ali
-                          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>
-                    </div>
-                    <a href="javascript:;" style="margin-left:20px">驳回</a>
-                  </a-popconfirm>
-                  <a
-                    @click="okEditShow(items, '1')"
-                    href="javascript:;"
-                    style="margin-left:20px"
-                    v-show="active != '1'"
-                    v-if="
-                      role.roleCode == 'operator' ||
-                        role.roleCode == 'kuaishouOperationManager' ||
-                        role.roleCode == 'admin' ||
-                        role.roleCode == 'touTiaoOperationManager'
-                    "
-                  >
-                    通过审核</a
-                  >
 
                   <a-checkbox :value="items.url" v-show="active == '1'" style="float:right"></a-checkbox>
                 </span>
@@ -387,43 +289,18 @@ a {
         <a-button
           key="submit"
           type="primary"
-          :disabled="material.filter(item => item == false).length > 0 || urlList.url.length == 0"
+          :disabled="material.filter(item => item == false).length > 0 || urlList.url == ''"
           @click="handleOk"
         >
           确定
         </a-button>
       </template>
       <a-form :form="form">
-        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="项目选择">
-          <a-select
-            v-decorator="[
-              'projectId', // 给表单赋值或拉取表单时,该input对应的key
-              { rules: [{ required: true, message: '请选择项目!' }] }
-            ]"
-            @change="getProjectId"
-            showSearch
-            optionFilterProp="children"
-            :filterOption="filterOption"
-          >
-            <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
-              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-                item.mediaId == '1' ? '头条' : '快手'
-              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
-            </a-select-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item
-          :label-col="labelCol"
-          :wrapper-col="wrapperCol"
-          label="图片素材上传"
-          class="add-image-material"
-          v-if="getData('projectId')"
-        >
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="图片素材上传" class="add-image-material">
           <upload-to-ali
             style="width:160%"
             v-model="urlList.url"
             :customDomain="customDomain"
-            :multiple="add"
             preview
             :region="region"
             :bucket="bucket"
@@ -436,70 +313,13 @@ a {
             :dir="activeKey == 'image' ? dirImg : dirVideo"
             @loaded="overUpload"
           ></upload-to-ali>
-          <span v-if="material.filter(item => item == false).length > 0 && urlList.url.length > 0" style="color:red"
-            >上传素材的尺寸不符,请修改(<span v-for="(item, index) of material" :key="index" v-show="!item"
-              >第{{ index + 1 }}张</span
-            >出错)</span
+          <span v-if="material.filter(item => item == false).length > 0 && urlList.url != ''" style="color:red"
+            >上传素材的尺寸不符,请修改</span
           >
-          <span
-            v-else-if="urlList.url.length > 0 && material.filter(item => item == false).length == 0"
-            style="color:green"
+          <span v-else-if="material.filter(item => item == false).length == 0 && urlList.url != ''" style="color:green"
             >上传成功</span
           >
         </a-form-item>
-
-        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="role.roleName">
-          <span>{{ userInfo().realname }}</span>
-        </a-form-item>
-        <a-form-item
-          :label-col="labelCol"
-          :wrapper-col="{
-            xs: { span: 24 },
-            sm: { span: 18 }
-          }"
-          label="标签"
-        >
-          <template v-for="(tag, index) in tags">
-            <a-tooltip v-if="tag.length > 20" :key="tag" :title="tag">
-              <a-tag :key="tag" :closable="index !== 0" :afterClose="() => handleClose(tag)">
-                {{ `${tag.slice(0, 20)}...` }}
-              </a-tag>
-            </a-tooltip>
-            <a-tag v-else :key="tag" :closable="true" :afterClose="() => handleClose(tag)">
-              {{ tag }}
-            </a-tag>
-          </template>
-          <a-input
-            v-if="inputVisible"
-            ref="input"
-            type="text"
-            size="small"
-            :style="{ width: '78px' }"
-            :value="inputValue"
-            @change="handleInputChange"
-            @blur="handleInputConfirm"
-            @keyup.enter="handleInputConfirm"
-          />
-          <a-tag v-else @click="showInput" style="background: #fff; borderStyle: dashed;">
-            <a-icon type="plus" /> New Tag
-          </a-tag>
-        </a-form-item>
-        <a-form-item
-          :label-col="labelCol"
-          :wrapper-col="{
-            xs: { span: 24 },
-            sm: { span: 18 }
-          }"
-          label="描述"
-        >
-          <a-textarea
-            placeholder="请输入描述"
-            v-decorator="[
-              'materialDescribe' // 给表单赋值或拉取表单时,该input对应的key
-            ]"
-            :autosize="{ minRows: 3, maxRows: 10 }"
-          />
-        </a-form-item>
       </a-form>
     </a-modal>
 
@@ -516,43 +336,30 @@ a {
           <img :src="showUrl" alt="" v-if="activeKey == 'image'" style="height:100%" />
         </div>
         <div style="flex:3;padding:10px;box-sizing:border-box;">
+          <!-- <video
+            v-if="detail.videoUrl"
+            :src="detail.videoUrl"
+            style="height:200px;max-width:100%;position:absolute;z-index:10;"
+          /> -->
+
           <a-form v-if="detail" class="detail">
-            <div v-if="detail.parameter">
-              <a-form-item
-                label="尺寸"
-                :label-col="{ span: 6 }"
-                :wrapper-col="{ span: 18 }"
-                v-if="detail.parameter.width"
-              >
-                {{ detail.parameter.width }}*{{ detail.parameter.height }}
-              </a-form-item>
-              <a-form-item
-                label="大小"
-                :label-col="{ span: 6 }"
-                :wrapper-col="{ span: 18 }"
-                v-if="detail.parameter.size"
-              >
-                {{ detail.parameter.size }}
-              </a-form-item>
-            </div>
-            <div v-if="detail.ascription">
-              <a-form-item
-                label="剪辑"
-                :label-col="{ span: 6 }"
-                :wrapper-col="{ span: 18 }"
-                v-if="detail.ascription.clipName"
+            <a-form-item label="绑定视频" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="detail.videoUrl">
+              <video
+                class="video"
+                :src="detail.videoUrl"
+                controls="controls"
+                style="width:150px"
+                controlsList="nodownload"
               >
-                {{ detail.ascription.clipName }}
-              </a-form-item>
-              <a-form-item
-                label="平面"
-                :label-col="{ span: 6 }"
-                :wrapper-col="{ span: 18 }"
-                v-if="detail.ascription.planeName"
-              >
-                {{ detail.ascription.planeName }}
-              </a-form-item>
-            </div>
+                您的浏览器不支持 video 标签。
+              </video>
+            </a-form-item>
+            <a-form-item label="尺寸" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="detail.width">
+              {{ detail.width }}*{{ detail.height }}
+            </a-form-item>
+            <a-form-item label="大小" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="detail.size">
+              {{ detail.size }}
+            </a-form-item>
             <a-form-item label="标签" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" v-if="detail.tag">
               <a-tag v-for="(item, index) of detail.tag" :key="index">{{ item }}</a-tag>
             </a-form-item>
@@ -587,53 +394,6 @@ a {
               ></upload-to-ali>
               <div v-else>无截图</div>
             </a-form-item>
-            <a-form-item
-              label="审核"
-              :label-col="{ span: 6 }"
-              :wrapper-col="{ span: 18 }"
-              v-if="
-                active != '2' &&
-                  (role.roleCode == 'operator' ||
-                    role.roleCode == 'kuaishouOperationManager' ||
-                    role.roleCode == 'admin' ||
-                    role.roleCode == 'touTiaoOperationManager')
-              "
-            >
-              <a-button type="primary" @click="edit(null, '0', '1')" v-if="active == '0'" style="margin-right:10px"
-                >通过审核
-              </a-button>
-              <a-popconfirm @confirm="okEdit">
-                <div slot="title">
-                  <div>
-                    驳回原因:
-                    <a-textarea
-                      placeholder="请输入原因"
-                      v-model="refuseReason"
-                      :autosize="{ minRows: 3, maxRows: 10 }"
-                    />
-                  </div>
-                  <div>
-                    截图:
-                    <upload-to-ali
-                      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>
-                </div>
-                <a-button type="primary">驳回</a-button>
-                <!-- @click="edit(null, '0', '2')" -->
-              </a-popconfirm>
-            </a-form-item>
           </a-form>
         </div>
       </div>
@@ -648,7 +408,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import UploadToAli from '@femessage/upload-to-ali'
 import { fileCheck, fileInsert, fileEdit } from '@/api/actor'
-import { getAction, postAction, postFile, downFile, downFilePost, deleteAction } from '@/api/manage'
+import { getAction, postAction, postFile, downFile, downFilePost, deleteAction, putAction } from '@/api/manage'
 
 import { mapGetters } from 'vuex'
 import moment from 'moment'
@@ -670,6 +430,8 @@ export default {
 
   data() {
     return {
+      projectId: '',
+      videoId: '',
       inputVisible: false,
       inputValue: '',
       labelCol: {
@@ -719,9 +481,12 @@ export default {
       // 表头
       columns: [],
       urlList: {
-        url: [],
-        md5: [],
-        name: []
+        url: '',
+        md5: '',
+        name: '',
+        size: '',
+        width: '',
+        height: ''
       },
       imageArr: [],
       watermarkUrl: {
@@ -730,7 +495,7 @@ export default {
         name: ''
       },
       url: {
-        list: '/ctop/materialInfo/list'
+        list: '/ctop/MaterialImageInfo/pageList'
       },
       detail: false,
       form: this.$form.createForm(this),
@@ -906,29 +671,6 @@ export default {
           })
         }
       }
-
-      //   for (var i = 0; i < this.checkArr.length; i++) {
-      //     let image = new Image()
-      //     image.setAttribute('crossOrigin', 'anonymous')
-      //     image.src = this.checkArr[i]
-      //     image.onload = () => {
-      //       let canvas = document.createElement('canvas')
-      //       canvas.width = image.width
-      //       canvas.height = image.height
-      //       let ctx = canvas.getContext('2d')
-      //       ctx.drawImage(image, 0, 0, image.width, image.height)
-      //       canvas.toBlob(blob => {
-      //         let url = URL.createObjectURL(blob)
-      //         let eleLink = document.createElement('a')
-      //         eleLink.download = '封面下载'
-      //         eleLink.href = url
-      //         eleLink.click()
-      //         eleLink.remove()
-      //         // 用完释放URL对象
-      //         URL.revokeObjectURL(url)
-      //       })
-      //     }
-      //   }
     },
     implement(data) {
       var params = {}
@@ -1079,201 +821,49 @@ export default {
         this.refuseReason = ''
         this.refuseFile = []
       }
-      getAction('/ctop/materialInfo/getDetail', {
-        materialId: item.id
+      getAction('/ctop/MaterialImageInfo/getDetail', {
+        id: item.id
       }).then(res => {
-        this.detail = res
+        this.detail = res.result
       })
     },
-    okEditShow(item, editStatus) {
-      if (editStatus == '2') {
-        var params = {}
-        params.id = item.id
-        params.auditorId = this.userInfo().id
-        params.refuseReason = this.refuseReason
-        var data = this.refuseFile.map(item => {
-          return 'https:' + item
-        })
-        params.refuseFile = JSON.stringify(data)
-        params.status = editStatus
-        fileEdit(params).then(res => {
-          this.refuseFile = []
-          this.refuseReason = ''
-          this.loadData()
-        })
-      } else if (editStatus == '1') {
-        var params = {}
-        params.id = item.id
-        params.auditorId = this.userInfo().id
-        params.creativeCopywriter = this.refuseReason
-        params.status = editStatus
-        fileEdit(params).then(res => {
-          this.refuseReason = ''
-          this.loadData()
-        })
-      }
-    },
-    okEdit(e) {
-      this.edit(null, this.active, '2')
-    },
-    edit(item, status, editStatus) {
-      if (status == '0' || status == '1') {
-        if (editStatus == '2') {
-          var params = {}
-          params.id = this.id
-          params.auditorId = this.userInfo().id
-          params.refuseReason = this.refuseReason
-          var data = this.refuseFile.map(item => {
-            return 'https:' + item
-          })
-          params.refuseFile = JSON.stringify(data)
-          params.status = editStatus
-          fileEdit(params).then(res => {
-            this.refuseFile = []
-            this.refuseReason = ''
-            this.loadData()
-            this.visibleDetail = false
-          })
-        } else {
-          fileEdit({
-            id: this.id,
-            status: editStatus,
-            auditorId: this.userInfo().id
-          }).then(res => {
-            this.refuseFile = []
-            this.refuseReason = ''
-            this.loadData()
-            this.visibleDetail = false
-          })
-        }
-      } else {
-        this.add = false
-        this.visible = true
-        this.getProjectId(item.projectId)
-        getAction('/ctop/materialInfo/getDetail', {
-          materialId: item.id
-        }).then(res => {
-          if (this.activeKey == 'image') {
-            this.form.setFieldsValue({
-              projectId: item.projectId,
-              clipId: res.ascription.clipId,
-              planeId: res.ascription.planeId,
-              materialDescribe: item.materialDescribe
-            })
-          } else {
-            this.form.setFieldsValue({
-              projectId: item.projectId,
-              clipId: res.ascription.clipId,
-              planId: res.ascription.planId,
-              shotId: res.ascription.shotId,
-              materialDescribe: item.materialDescribe
-            })
-          }
-          this.tags = res.tag
-          this.urlList.url = item.url
-          this.urlList.md5 = item.code
-          this.urlList.name = item.materialName
-          this.watermarkUrl.url = item.watermarkUrl
-          this.watermarkUrl.md5 = item.watermarkCode
-          this.watermarkUrl.name = item.watermarkMaterialName
-          this.id = item.id
-        })
-      }
+    imageEdit(item) {
+      this.projectId = item.id
+      this.videoId = item.videoId
+      this.visible = true
     },
     handleOk() {
       this.form.validateFieldsAndScroll((err, values) => {
         if (err) {
           // 这里做逻辑处理
         } else {
-          var params = {}
-          var roleCode = {}
-          for (const key in this.role) {
-            if (key == 'roleCode') {
-              this.role[key] = this.role[key] + 'Id'
-              roleCode[this.role[key]] = this.userInfo().id
-            }
-          }
-          params.id = this.add ? null : this.id
-          //   params.code = this.urlList.md5
-          params.url = this.add ? null : this.urlList.url[0]
-          //   params.materialName = this.urlList.name
-          params.imageArr = this.add ? this.urlList.url : null
-          //   params.watermarkCode = this.watermarkUrl.md5
-          //   params.watermarkUrl = this.watermarkUrl.url
-          //   params.watermarkMaterialName = this.watermarkUrl.name
-          params.userId = this.userInfo().id
-          params.projectId = values.projectId
-          params.materialDescribe = values.materialDescribe
-          params.type = 'IMAGE'
-          params.ascription =
-            this.activeKey == 'image'
-              ? roleCode
-              : {
-                  planId: values.planId,
-                  shotId: values.shotId,
-                  clipId: values.clipId
-                }
-          params.tag = this.tags
-          if (this.add) {
-            fileInsert(params).then(res => {
-              this.form.resetFields()
-              this.urlList = {
-                url: '',
-                md5: '',
-                name: ''
-              }
-              this.watermarkUrl = {
-                url: '',
-                md5: '',
-                name: ''
-              }
-              this.tags = []
-              this.loadData()
-              this.visible = false
-              this.add = true
-              for (const key in this.role) {
-                if (key == 'roleCode') {
-                  this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
-                }
-              }
-              this.$message.success('素材上传成功')
-            })
-          } else {
-            fileEdit({
-              ...params,
-              status: '0'
-            }).then(res => {
+          var params = { ...this.urlList }
+          params.id = this.projectId
+          params.videoId = this.videoId
+          params.status = '0'
+          putAction('/ctop/MaterialImageInfo/edit', params).then(res => {
+            if (res.success) {
               this.form.resetFields()
               this.urlList = {
-                url: [],
-                md5: '',
-                name: ''
-              }
-              this.watermarkUrl = {
                 url: '',
                 md5: '',
-                name: ''
+                name: '',
+                size: '',
+                width: '',
+                height: ''
               }
               this.tags = []
               this.loadData()
               this.visible = false
-              this.add = true
-              for (const key in this.role) {
-                if (key == 'roleCode') {
-                  this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
-                }
-              }
               this.$message.success('素材修改成功')
-            })
-          }
+            }
+          })
         }
       })
     },
     close() {
-      //   this.form.resetFields()
-      //   this.urlList = { url: '', md5: '', name: '' }
-      //   this.watermarkUrl = { url: '', md5: '', name: '' }
-      //   this.tags = []
+      this.urlList = { url: '', md5: '', name: '', size: '', width: '', height: '' }
+      this.visible = false
     },
     onChange(date, dateString) {},
     callbackTwo(key) {
@@ -1289,19 +879,49 @@ export default {
     },
     overUpload(urlAll) {
       console.log(urlAll, this.urlList)
-
-      //   var index = this.urlList.url.findIndex(item => item === urlAll[0])
-      //   var data = { url: urlAll[0], code: this.urlList.md5[index], name: this.urlList.name[index] }
-      //   this.imageArr.push(data)
-      //   console.log(this.imageArr)
       var that = this
       var img = null
       img = new Image()
       that.material = []
-      for (let i = 0; i < this.urlList.url.length; i++) {
-        img.src = this.urlList.url[i]
-        if (img.complete) {
-          // 打印
+
+      img.src = this.urlList.url
+      if (img.complete) {
+        that.urlList.width = img.width
+        that.urlList.height = img.height
+        // 打印
+        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)
+        }
+        console.log(this.material)
+      } else {
+        // 加载完成执行
+        img.onload = function() {
+          that.urlList.width = img.width
+          that.urlList.height = img.height
           if (img.width == 720) {
             if (img.height == 1280) {
               that.material.push(true)
@@ -1329,40 +949,6 @@ export default {
           } else {
             that.material.push(false)
           }
-          console.log(this.material)
-        } else {
-          // 加载完成执行
-          img.onload = function() {
-            // 打印
-            // alert('from:onload : width:' + img.width + ',height:' + img.height)
-            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)
-            }
-          }
         }
       }
     },
@@ -1371,25 +957,23 @@ export default {
       var bmf = new BMF()
       var that = this
       return new Promise(function(resolve, reject) {
-        for (let i = 0; i < file.length; i++) {
-          bmf.md5(file[i], (err, md5) => {
-            //   that.urlList.name.push(file[0].name)
-            //   that.urlList.md5.push(md5)
-
-            fileCheck({
-              code: md5,
-              projectId: that.getData('projectId')
-            }).then(res => {
-              if (res.code == 0) {
-                that.$message.error('此素材已经上传')
-                reject()
-              } else {
-                resolve()
-                //   reject()
-              }
-            })
+        bmf.md5(file[0], (err, md5) => {
+          that.urlList.name = file[0].name
+          that.urlList.md5 = md5
+          that.urlList.size = file[0].size
+          fileCheck({
+            code: md5,
+            projectId: that.getData('projectId')
+          }).then(res => {
+            if (res.code == 0) {
+              that.$message.error('此素材已经上传')
+              reject()
+            } else {
+              resolve()
+              //   reject()
+            }
           })
-        }
+        })
       })
     },
     getData(className) {

+ 287 - 49
src/views/modules/material/scriptMaterial.vue

@@ -27,6 +27,10 @@
 #only-des .ant-comment-content-author {
   justify-content: center;
 }
+.ant-comment-content-author > a,
+.ant-comment-content-author > span {
+  display: contents;
+}
 </style>
 <style lang="scss" scoped>
 .home-item {
@@ -193,15 +197,7 @@ a {
     <!-- 操作按钮区域 -->
 
     <div class="table-operator" style="position:relative;z-index:100">
-      <a-button
-        type="primary"
-        icon="plus"
-        @click="
-          visible = true
-          confirmLoading = false
-        "
-        >新增</a-button
-      >
+      <a-button type="primary" icon="plus" @click="addScript">新增</a-button>
     </div>
 
     <div v-if="dataSource.length > 0">
@@ -247,7 +243,7 @@ a {
     <div v-else style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;">
       <a-empty />
     </div>
-    <a-modal :title="add?'添加素材':'修改'" v-model="visible" :maskClosable="false" :width="800">
+    <a-modal :title="add ? '添加素材' : '修改'" v-model="visible" :maskClosable="false" :width="800">
       <template slot="footer">
         <a-button key="back" @click="close">取消</a-button>
         <a-button key="submit" type="primary" @click="handleOk">
@@ -258,6 +254,40 @@ a {
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="剧本名称">
           <a-input v-decorator="['dramaName', { rules: [{ required: true, message: '请输入剧本名称' }] }]" />
         </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="场景">
+          <a-input v-decorator="['scnece', { rules: [{ required: true, message: '请输入场景' }] }]" />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="时长">
+          <a-input v-decorator="['timeLong']" addonAfter="秒" />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="视频类型">
+          <a-select v-decorator="['videoType', { rules: [{ required: true, message: '请选择视频类型' }] }]">
+            <a-select-option value="horizontal">横版</a-select-option>
+            <a-select-option value="vertical">竖版</a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="演员">
+          <a-select mode="multiple" v-decorator="['actorId', { rules: [{ required: true, message: '请选择演员' }] }]">
+            <a-select-option v-for="(item, index) of actorList" :key="index" :value="item.id + ''">{{
+              item.name
+            }}</a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="卖点">
+          <a-input v-decorator="['usp', { rules: [{ required: true, message: '请输入卖点' }] }]" />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="服装备注">
+          <a-input v-decorator="['actorRemark']" />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="拍摄要求">
+          <a-input v-decorator="['shootReq']" />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="封面文案">
+          <a-input v-decorator="['coverText']" />
+        </a-form-item>
+        <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="剪辑备注">
+          <a-input v-decorator="['clipRemark']" />
+        </a-form-item>
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="行业类型">
           <j-tree-select
             ref="treeSelect"
@@ -336,7 +366,7 @@ a {
         </a-form-item>
       </a-form>
     </a-modal>
-    <a-modal title="脚本内容" v-model="visibleScript" :maskClosable="false" :width="800" class="role-item">
+    <a-modal title="脚本内容" v-model="visibleScript" :maskClosable="false" :width="900" class="role-item">
       <template slot="footer">
         <a-button key="back" @click="closeScript">取消</a-button>
         <a-button key="submit" type="primary" @click="handleOkScript">
@@ -345,29 +375,74 @@ a {
       </template>
       <a-list v-if="comments.length" :dataSource="comments" itemLayout="horizontal">
         <a-list-item slot="renderItem" slot-scope="item, index" v-if="item.author == '情节描述'" id="only-des">
-          <a-comment :author="item.author" :content="item.content"> </a-comment>
-          <!-- <a slot="actions" @click="editAction(item, index)">修改</a> -->
+          <a-comment :author="item.author">
+            <p slot="content">
+              <span v-if="item.content">描述:{{ item.content }}</span
+              ><br />
+              <span v-if="item.scene" style="margin-right:15px">镜头:{{ item.scene }}</span
+              ><br />
+              <span v-if="item.picContent" style="margin-right:15px">画面内容:{{ item.picContent }}</span
+              ><br />
+              <span v-if="item.clipRemark">剪辑备注:{{ item.clipRemark }}</span>
+            </p>
+          </a-comment>
+          <a slot="actions" @click="editAction(item, index)">修改</a>
+          <a-divider type="vertical" />
           <a slot="actions" @click="deleteAction(item, index)">删除</a>
         </a-list-item>
         <a-list-item slot="renderItem" slot-scope="item" v-else>
-          <a-comment :author="item.author" :avatar="item.avatar" :content="item.content"> </a-comment>
-          <!-- <a slot="actions" @click="editAction(item, index)">修改</a> -->
+          <a-comment :avatar="item.avatar">
+            <p slot="author">
+              <span v-if="item.scene" style="margin-right:15px">镜头:{{ item.scene }}</span
+              ><br />
+              <span v-if="item.picContent" style="margin-right:15px">画面内容:{{ item.picContent }}</span
+              ><br />
+              <span v-if="item.clipRemark">剪辑备注:{{ item.clipRemark }}</span>
+            </p>
+            <span slot="content">
+              {{ item.author }}:
+              {{ item.content }}
+            </span>
+          </a-comment>
+          <a slot="actions" @click="editAction(item, index)">修改</a>
+          <a-divider type="vertical" />
           <a slot="actions" @click="deleteAction(item, index)">删除</a>
         </a-list-item>
       </a-list>
       <a-comment>
         <div slot="avatar">
-          <a-select v-model="author" @change="getAuthor" style="width:100px">
-            <a-select-option v-for="(item, index) of roleList" :key="index" :value="item.buttonType">{{
-              item.name
-            }}</a-select-option>
-          </a-select>
+          <a-cascader v-model="author" :options="options" @change="getAuthor" :defaultValue="['scence']" />
         </div>
 
-        <div slot="content">
-          <a-form-item>
+        <div slot="content" v-if="!repeat">
+          <a-form-item
+            label="镜头"
+            :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
+          >
+            <a-input v-model="scene"></a-input>
+          </a-form-item>
+          <a-form-item
+            label="画面内容"
+            :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
+          >
+            <a-input v-model="picContent"></a-input>
+          </a-form-item>
+          <a-form-item
+            label="描述"
+            :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
+          >
             <a-textarea :rows="4" @change="handleChange" :value="value"></a-textarea>
           </a-form-item>
+          <a-form-item
+            label="剪辑备注"
+            :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+            :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
+          >
+            <a-input v-model="clipRemark"></a-input>
+          </a-form-item>
           <a-form-item>
             <a-button htmlType="submit" :loading="submitting" @click="handleSubmit" type="primary">
               添加对话
@@ -375,24 +450,25 @@ a {
           </a-form-item>
         </div>
       </a-comment>
-      <a-form :form="formRole" v-if="repeat">
+      <a-form :form="formRole" v-if="repeat" :hideRequiredMark="true">
         <a-row :gutter="24" style="border-bottom:1px solid #f2f2f2">
           <a-col :span="6">
             <a-form-item
-              :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
-              :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
+              :label-col="{ xs: { span: 24 }, sm: { span: 6 } }"
+              :wrapper-col="{ xs: { span: 24 }, sm: { span: 18 } }"
               label="姓名"
             >
               <a-input
                 placeholder="请输入姓名"
                 v-decorator="[
-                  'name' // 给表单赋值或拉取表单时,该input对应的key
+                  'name',
+                  { rules: [{ required: true, message: '请输入姓名!' }] } // 给表单赋值或拉取表单时,该input对应的key
                 ]"
               />
             </a-form-item>
             <a-form-item
-              :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
-              :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
+              :label-col="{ xs: { span: 24 }, sm: { span: 6 } }"
+              :wrapper-col="{ xs: { span: 24 }, sm: { span: 18 } }"
               label="性别"
             >
               <a-select
@@ -433,11 +509,36 @@ a {
     <a-modal title="内容展示" v-model="visibleScriptShow" :footer="null" :width="800" class="role-item">
       <div id="printTest" v-if="inforDetail">
         <h3 style="text-align:center">{{ inforDetail.dramaName }}</h3>
-        <p style="text-align:center"> 
-          类型:{{ inforDetail.category }}&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 创作者:{{
-            inforDetail.userName
-          }}
-        </p>
+        <a-row>
+          <a-col :span="8" v-if="inforDetail.category">类型:{{ inforDetail.category }}</a-col>
+          <a-col :span="8" v-if="inforDetail.userName">创作者:{{ inforDetail.userName }}</a-col>
+          <a-col :span="8" v-if="inforDetail.usp"> 卖点:{{ inforDetail.usp }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="8" v-if="inforDetail.scnece">场景:{{ inforDetail.scnece }}</a-col>
+          <a-col :span="8" v-if="inforDetail.videoType">
+            视频类型:{{ inforDetail.videoType == 'horizontal' ? '横板' : '竖版' }}</a-col
+          >
+          <a-col :span="8" v-if="inforDetail.timeLong"> 时长:{{ inforDetail.timeLong }}秒</a-col>
+        </a-row>
+        <a-row v-if="inforDetail.actorId">
+          <a-col :span="24"
+            >演员:<span style="margin-right:15px" v-for="item of inforDetail.actorId.split(',')" :key="item">
+              {{ actorName(item) }}
+            </span>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="8" v-if="inforDetail.actorRemark">服装备注:{{ inforDetail.actorRemark }}</a-col>
+          <a-col :span="16" v-if="inforDetail.shootReq">拍摄要求:{{ inforDetail.shootReq }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="24" v-if="inforDetail.coverText"> 封面文案:{{ inforDetail.coverText }}</a-col>
+        </a-row>
+        <a-row style="margin-bottom:15px">
+          <a-col :span="24" v-if="inforDetail.clipRemark"> 剪辑备注:{{ inforDetail.clipRemark }}</a-col>
+        </a-row>
+
         <P
           v-for="(item, index) of comments"
           :key="index"
@@ -448,6 +549,13 @@ a {
           <span>
             {{ item.author == '情节描述' ? '【' + item.content + '】' : item.content }}
           </span>
+          {{ item.scene || item.picContent || item.clipRemark ? '(' : ''
+          }}<span v-if="item.scene" style="margin-right:15px;color:LightSlateGray">镜头:{{ item.scene }}</span>
+          <span v-if="item.picContent" style="margin-right:15px;color:LightSlateGray"
+            >画面内容:{{ item.picContent }}</span
+          >
+          <span v-if="item.clipRemark" style="color:LightSlateGray">剪辑备注:{{ item.clipRemark }}</span
+          >{{ item.scene || item.picContent || item.clipRemark ? ')' : '' }}
         </P>
       </div>
       <a-button v-print="'#printTest'" type="primary">
@@ -481,17 +589,36 @@ export default {
 
   data() {
     return {
-      author: 'scence',
+      author: ['scence'],
       comments: [],
       roleList: [],
+      actorList: [],
       submitting: false,
       value: '',
+      scene: '',
+      clipRemark: '',
+      picContent: '',
       projectId: '',
       inputVisible: false,
       visibleScript: false,
       visibleScriptShow: false,
       visibleRole: false,
       inputValue: '',
+      options: [
+        {
+          value: 'scence',
+          label: '情节描述'
+        },
+        {
+          value: 'taici',
+          label: '台词',
+          children: []
+        },
+        {
+          value: 'createRole',
+          label: '新建角色'
+        }
+      ],
       labelCol: {
         xs: {
           span: 24
@@ -551,9 +678,23 @@ export default {
   computed: {},
   created() {
     this.ipagination.pageSize = 8
+    this.getActor()
   },
   watch: {},
   methods: {
+    actorName(actorId) {
+      var data = this.actorList.filter(item => {
+        return item.id == actorId
+      })
+      return data[0].name
+    },
+    addScript() {
+      this.visible = true
+      this.confirmLoading = false
+      this.form.resetFields()
+      this.tags = []
+      this.getActor()
+    },
     deleteAction(item, index) {
       postAction('/ctop/dramaItemInfo/delete', { id: item.id }).then(res => {
         if (res.success) {
@@ -562,12 +703,21 @@ export default {
       })
     },
     editAction(item, index) {
+      console.log(item,index)
       //   postAction('/ctop/dramaItemInfo/edit', { id: item.id }).then(res => {
       //     if (res.success) {
       //       this.comments.splice(index, 1)
       //     }
       //   })
     },
+    getActor() {
+      getAction('/ctop/actor/list', { column: 'createTime', order: 'desc', pageNo: 1, pageSize: 1000 }).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.actorList = res.result.records
+        }
+      })
+    },
     showDetail(item) {
       this.visibleScriptShow = true
       this.inforDetail = item
@@ -577,20 +727,40 @@ export default {
           this.comments = res.itemInfos.map(v => {
             return {
               ...v,
-              author: v.type == 'scence' ? '情节描述' : v.roleName,
+              author: v.type == 1 ? '情节描述' : v.roleName,
               avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
-              content: v.content,
+              content: v.line,
               edit: false
             }
           })
           this.roleList = res.roleInfos
+          this.options = [
+            {
+              value: 'scence',
+              label: '情节描述'
+            },
+            {
+              value: 'taici',
+              label: '台词',
+              children: res.roleInfos.map(item => {
+                return {
+                  value: item.id,
+                  label: item.name
+                }
+              })
+            },
+            {
+              value: 'createRole',
+              label: '新建角色'
+            }
+          ]
         }
       })
     },
     getAuthor(e) {
       console.log(e)
-      if (e == 'createRole') {
-        this.author = ''
+      if (e[0] == 'createRole') {
+        // this.author = []
         this.repeat = true
       } else {
         this.repeat = false
@@ -606,8 +776,12 @@ export default {
       //   setTimeout(() => {
       postAction('/ctop/dramaItemInfo/add', {
         dramaId: this.dramaId,
-        content: this.value,
-        buttonType: this.author
+        line: this.value,
+        scene: this.scene,
+        clipRemark: this.clipRemark,
+        picContent: this.picContent,
+        type: this.author[0] == 'scence' ? 1 : 2,
+        roleId: this.author[0] == 'scence' ? null : this.author[1]
       }).then(res => {
         console.log(res)
         this.submitting = false
@@ -615,16 +789,25 @@ export default {
           this.comments = [
             ...this.comments,
             {
-              author: this.roleList.filter(item => {
-                return this.author == item.buttonType
-              })[0].name,
+              author:
+                this.author[0] == 'scence'
+                  ? '情节描述'
+                  : this.roleList.filter(v => {
+                      return v.id == this.author[1]
+                    })[0].name,
               avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
               content: this.value,
+              scene: this.scene,
+              clipRemark: this.clipRemark,
+              picContent: this.picContent,
               datetime: moment().fromNow(),
               edit: false
             }
           ]
           this.value = ''
+          this.scene = ''
+          this.clipRemark = ''
+          this.picContent = ''
         } else {
           this.$message.error('添加失败')
         }
@@ -638,20 +821,43 @@ export default {
     writeScript(item) {
       this.visibleScript = true
       this.dramaId = item.id
-      this.author = 'scence'
+      //   this.author = 'scence'
       getAction('/ctop/dramaInfo/detail', { dramaId: item.id }).then(res => {
         console.log(res)
         if (res.success) {
           this.comments = res.itemInfos.map(v => {
             return {
               ...v,
-              author: v.type == 'scence' ? '情节描述' : v.roleName,
+              author: v.type == '1' ? '情节描述' : v.roleName,
               avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
-              content: v.content,
+              content: v.line,
+              scene: v.scene,
+              clipRemark: v.clipRemark,
+              picContent: v.picContent,
               edit: false
             }
           })
           this.roleList = res.roleInfos
+          this.options = [
+            {
+              value: 'scence',
+              label: '情节描述'
+            },
+            {
+              value: 'taici',
+              label: '台词',
+              children: res.roleInfos.map(item => {
+                return {
+                  value: item.id,
+                  label: item.name
+                }
+              })
+            },
+            {
+              value: 'createRole',
+              label: '新建角色'
+            }
+          ]
         }
       })
     },
@@ -659,6 +865,26 @@ export default {
       getAction('/ctop/dramaInfo/detail', { dramaId: this.dramaId }).then(res => {
         if (res.success) {
           this.roleList = res.roleInfos
+          this.options = [
+            {
+              value: 'scence',
+              label: '情节描述'
+            },
+            {
+              value: 'taici',
+              label: '台词',
+              children: res.roleInfos.map(item => {
+                return {
+                  value: item.id,
+                  label: item.name
+                }
+              })
+            },
+            {
+              value: 'createRole',
+              label: '新建角色'
+            }
+          ]
         }
       })
     },
@@ -703,7 +929,7 @@ export default {
         this.$refs.input.focus()
       })
     },
-    onChangeCheck() {},
+    onChange() {},
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     searchRe() {
       this.queryParam.projectId = ''
@@ -728,18 +954,26 @@ export default {
       this.comments = []
     },
     editScript(item) {
+      //   this.getActor()
       this.visible = true
       this.add = false
       this.id = item.id
       this.$nextTick(() => {
         this.form.setFieldsValue({
+          actorId: item.actorId.split(','),
+          actorRemark: item.actorRemark,
           category: item.category,
+          clipRemark: item.clipRemark,
+          coverText: item.coverText,
           dramaName: item.dramaName,
+          introduction: item.introduction,
           nonpublic: item.nonpublic,
-          introduction: item.introduction
+          scnece: item.scnece,
+          shootReq: item.shootReq,
+          usp: item.usp,
+          videoType: item.videoType
         })
       })
-
       this.tags = item.tag.split(',')
     },
     handleOk() {
@@ -749,6 +983,7 @@ export default {
         } else {
           var params = { ...values }
           params.tag = this.tags.join()
+          params.actorId = params.actorId.join()
           if (this.add) {
             postAction('/ctop/dramaInfo/add', params).then(res => {
               if (res.success) {
@@ -781,6 +1016,9 @@ export default {
     getDataSource(page, pageSize) {
       this.ipagination.current = page
       this.loadData()
+    },
+    getData(className) {
+      return this.form.getFieldValue(className)
     }
   }
 }

+ 23 - 13
src/views/modules/material/videoMaterial.vue

@@ -84,9 +84,9 @@
   color: #fff;
   background-color: rgba(0, 0, 0, 0.3);
 }
-.home-item {
-  overflow: hidden;
-}
+// .home-item {
+//   overflow: hidden;
+// }
 
 @media (min-width: 1024px) {
   .home-item {
@@ -396,6 +396,12 @@ a {
                       />
                     </a-tooltip>
                   </div>
+
+                  <a-icon
+                    type="fire"
+                    style="font-size:20px;position: absolute;right: 0;bottom:10px;z-index:1000;color:red"
+                    v-if="items.whetherUnaudited"
+                  />
                   <img
                     :src="items.url + '?x-oss-process=video/snapshot,t_00000,m_fast'"
                     alt=""
@@ -829,7 +835,7 @@ a {
             <a-button @click="onCheckAllImageChange" v-if="model.length > 0">{{
               checkAllImage ? '取消  (  ' + checkArrImage.length + '  )' : '全选'
             }}</a-button>
-            <ul class="actor-photo-list" :style="{ width: 25 * model.length + '%' }" v-if="model.length > 0">
+            <ul class="actor-photo-list" :style="{ width: model.length>4?25 * model.length + '%':'100%' }" v-if="model.length > 0">
               <a-checkbox-group
                 v-model="checkArrImage"
                 style="width:100%;  display: flex;padding-left: 0;"
@@ -842,11 +848,7 @@ a {
                     class="tag-video"
                     :style="{
                       backgroundColor:
-                        item.status == 0
-                          ? 'rgba(0, 0, 0)'
-                          : item.status == 1
-                          ? 'rgba(0, 180, 100)'
-                          : 'red'
+                        item.status == 0 ? 'rgba(0, 0, 0)' : item.status == 1 ? 'rgba(0, 180, 100)' : 'red'
                     }"
                     >{{ item.status == 0 ? '未审核' : item.status == 1 ? '已批准' : '已驳回' }}</span
                   >
@@ -1322,6 +1324,7 @@ export default {
       var params = {}
       params.id = item.id
       params.status = status
+      params.auditorId = this.userInfo().id
       if (status == '1') {
       } else {
         params.refuseReason = this.refuseReasonImage
@@ -1332,7 +1335,7 @@ export default {
         if (res.success) {
           //   this.coverPreviewVisible = false
           getAction('/ctop/MaterialImageInfo/list', {
-            videoId: this.code
+            videoId: this.id
           }).then(res => {
             if (res.success) {
               this.model = res.result.map((item, index) => {
@@ -1349,6 +1352,9 @@ export default {
               }
             }
           })
+          this.loadData()
+        } else {
+          this.$message.error(res.message)
         }
       })
     },
@@ -1371,7 +1377,7 @@ export default {
         if (res.success) {
           //   this.coverPreviewVisible = false
           getAction('/ctop/MaterialImageInfo/list', {
-            videoId: this.code
+            videoId: this.id
           }).then(res => {
             if (res.success) {
               this.checkArrImage = []
@@ -1384,6 +1390,9 @@ export default {
               })
             }
           })
+          this.loadData()
+        } else {
+          this.$message.error(res.message)
         }
       })
     },
@@ -1624,7 +1633,7 @@ export default {
         }
       })
       getAction('/ctop/MaterialImageInfo/list', {
-        videoId: item.code
+        videoId: item.id
       }).then(res => {
         console.log(res)
         if (res.success) {
@@ -1747,7 +1756,7 @@ export default {
     handleOkImage() {
       var params = {}
       params.projectId = this.addImageData.projectId
-      params.videoId = this.addImageData.code
+      params.videoId = this.addImageData.id
       params.imageArr = this.imageArrList
       postAction('/insertImage', params).then(res => {
         console.log(res)
@@ -1760,6 +1769,7 @@ export default {
           }
           this.imageArrList = []
           this.addImageVisible = false
+          this.loadData()
         }
       })
     },

+ 2 - 2
vue.config.js

@@ -66,8 +66,8 @@ module.exports = {
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
         // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
-        target: 'http://192.168.2.138:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        // target: 'http://192.168.2.110:8080', //请求本地 需要jeecg-boot后台项目  英豪
+        target: 'http://192.168.2.53:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        // target: 'http://192.168.2.109:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.2.124:8080', //请求本地 需要jeecg-boot后台项目  孙震