浏览代码

'新上计划监控'

魏志佳 4 年之前
父节点
当前提交
9a039ee262

+ 7 - 0
src/api/yard.js

@@ -8,6 +8,13 @@ export function yardPhotoList(parameter) {
       params: parameter
     })
 }
+export function yardListDelete(parameter) {
+    return axios({
+      url: "/ctop/yard/delete",
+      method: 'delete',
+      params: parameter
+    })
+}
 
 export function yardVideoList(parameter) {
     return axios({

+ 50 - 6
src/components/ctop/vm-card.vue

@@ -50,7 +50,7 @@ li {
       <div v-if="editable && type == 'vertical'" class="control">
         <span class="edit">
           <a href="javascript:;">
-            <a-icon type="edit" @click="handleDetail(record)"></a-icon>
+            <a-icon type="edit" @click="handleDetails(record)"></a-icon>
           </a>
         </span>
         <span class="delete">
@@ -213,6 +213,7 @@ li {
             </div>
           </div>
       </div>
+      
     </a-modal>
     <!-- 新增图集 -->
     <a-modal
@@ -258,8 +259,9 @@ li {
         :accessKeySecret="accessKeySecret"
       ></upload-to-ali> -->
     </a-modal>
-    <actor-modal ref="modalForm" @ok="modalFormOk" @updateList="updateList" @close="closeVideo" v-show="pageTitle=='演员管理'" ></actor-modal>
-    <propModal ref="modalForm" @ok="modalFormOk" @updateList="updateList" @close="closeVideo" v-show="pageTitle=='道具管理'" ></propModal>
+    <actor-modal ref="modalFormActor" @ok="modalFormOks" @updateList="updateList" @close="closeVideo"  ></actor-modal>
+    <propModal ref="modalFormProp" @ok="modalFormOks" @updateList="updateList" @close="closeVideo"  ></propModal>
+    <yardModal ref="modalFormYard" @ok="modalFormOks" @updateList="updateList" @close="closeVideo" ></yardModal>
   </div>
 </template>
 <script>
@@ -278,6 +280,7 @@ import {
   propDetail,
 } from '@/api/actor'
 import actorModal from './ActorModal'
+import yardModal from '@/views/modules/yard/modules/YardModal'
 import UploadToAli from '@femessage/upload-to-ali'
   import uploadFile from '@/components/uploadFile.vue'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
@@ -291,7 +294,8 @@ export default {
     actorModal,
     UploadToAli,
     uploadFile,
-    propModal
+    propModal,
+    yardModal
   },
   props: {
     type: {
@@ -426,6 +430,9 @@ export default {
   methods: {
     updateList() {
       this.$emit('updateList')
+      if(this.pageTitle=='场地列表'){
+        this.loadData(1)
+      }
     },
     pageChange: function(page) {
       console.log(page)
@@ -473,7 +480,7 @@ export default {
           this.form.speciality = res.result.speciality
         }
       })
-      }else{
+      }else if(this.pageTitle=='道具列表'){
         propDetail({ propId: this.id }).then(res => {
             console.log(res)
           if (res.code == 0) {
@@ -483,6 +490,11 @@ export default {
             
           }
         })
+      }else{
+        console.log(1)
+        this.indexDetail = '1'
+        this.detail = false
+        this.$emit('showDetail')
       }
       
     },
@@ -595,7 +607,39 @@ export default {
         this.videoUrl = ''
         this.addVideo = false
       }
-    }
+    },
+
+    handleDetails(record) {
+      console.log(record) 
+      if(this.pageTitle=='演员列表'){
+        console.log(this.$refs.modalFormActor)
+        this.$refs.modalFormActor.edit(record);
+        this.$refs.modalFormActor.title = "详情";
+        this.$refs.modalFormActor.disableSubmit = true;
+      }else if(this.pageTitle=='道具列表'){
+        this.$refs.modalFormProp.edit(record);
+        this.$refs.modalFormProp.title = "详情";
+        this.$refs.modalFormProp.disableSubmit = true;
+      }else if(this.pageTitle=='场地列表'){
+        this.$refs.modalFormYard.edit(record);
+        this.$refs.modalFormYard.title = "详情";
+        this.$refs.modalFormYard.disableSubmit = true;
+      }
+      
+    },
+
+    modalFormOks() {
+      // 新增/修改 成功时,重载列表
+      if(this.pageTitle=='演员列表'){
+        this.url.list='/ctop/actor/list'
+      }else if(this.pageTitle=='道具列表'){
+        this.url.list='/ctop/prop/list'
+      }else if(this.pageTitle=='场地列表'){
+        this.url.list='/ctop/yard/list'
+      }
+      // this.loadData(1);
+      this.updateList()
+    },
   },
 
   mounted() {

+ 6 - 3
src/mixins/JeecgListMixin.js

@@ -314,9 +314,12 @@ export const JeecgListMixin = {
       this.loadData(1);
     },
     handleDetail: function (record) {
-      this.$refs.modalForm.edit(record);
-      this.$refs.modalForm.title = "详情";
-      this.$refs.modalForm.disableSubmit = true;
+      this.$nextTick(()=>{
+        this.$refs.modalForm.edit(record);
+        this.$refs.modalForm.title = "详情";
+        this.$refs.modalForm.disableSubmit = true;
+      })
+      
     },
     /* 导出 */
     handleExportXls2() {

+ 2 - 1
src/views/modules/Statistics/components/datePick.vue

@@ -170,7 +170,8 @@ export default {
     }
   },
   mounted() {
-    this.mydateValue = [moment(), moment()]    
+    this.mydateValue = this.dateValue;
+    this.active=this.type
     // console.log(this.$refs.pickOptions.style.left)
   }
 

+ 8 - 6
src/views/modules/Statistics/newPlanStatic/newPlanStatic.vue

@@ -648,8 +648,8 @@ export default {
       treeData: [],
       SHOW_PARENT,
 
-      type:1,
-      dateValue:[moment(), moment()],
+      type:3,
+      dateValue:[moment().subtract(7,'days'), moment()],
 
       operate:'',
       operateList:[],
@@ -745,7 +745,8 @@ export default {
               
           });
         this.operateDisabled=false;
-        
+        this.operate=this.userId
+        // this.accountDisabled=true
       }
       if(val){
         val.forEach((ele,index)=>{
@@ -1007,7 +1008,7 @@ export default {
         url='/ctop/bytedance/newPlan/report/AllOperator'
       }else{
         // 快手
-        url='/ctop/kuaishou/newPlan/report/AllOperator'
+        url='/ctop/kuaishou/newGroup/report/AllOperator'
       }
       postAction(url,{}).then(res=>{
         console.log(res);
@@ -1037,7 +1038,7 @@ export default {
         url='/ctop/bytedance/newPlan/report/data'
       }else{
         // 快手
-        url='/ctop/kuaishou/newPlan/report/data'
+        url='/ctop/kuaishou/newGroup/report/data'
       }
       // if(this.accountId){
       //   this.operate='';
@@ -1103,7 +1104,7 @@ export default {
   watch: {
     dateValue(newName,oldName){
       
-          this.search()
+        this.search()
     },
   },
   computed: {
@@ -1122,6 +1123,7 @@ export default {
     this.accountHttp(2);
     this.getAllOperator(1)
     this.getAllOperator(2)
+    this.accountDisabled=true
   },
   activated: function() {
     this.$nextTick(()=>{

+ 110 - 8
src/views/modules/yard/YardList.vue

@@ -54,13 +54,14 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator">
       <a-button @click="handleAdd" v-show="show" type="primary" icon="plus">新增</a-button>
+      <a-pagination showQuickJumper :total="ipagination.total" v-model="ipagination.current" style="float:right" @change="totalpageChange" :pageSize.sync="ipagination.pageSize" />
     </div>
 
     <!-- table区域-begin -->
     <div>
-      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
+      <!-- <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
         :pagination="ipagination" :loading="loading">
-        <!-- 字符串超长截取省略号显示-->
+        
         <span slot="esContent" slot-scope="text">
           <j-ellipsis :value="text" :length="10" />
         </span>
@@ -87,7 +88,29 @@
           <a-divider type="vertical" />
           <a href="javascript:;" @click="showDetail(record)">场地信息</a>
         </span>
-      </a-table>
+      </a-table> -->
+
+
+      <a-row class="image-list" :gutter="16" style="padding:0 8px">
+      <a-col :lg="6" :sm="12" class="vm-margin" style="padding:0"  v-for="(item, index) of dataSource" :key="index" >
+          <vm-card
+          style="margin: 0 15px;"
+          :editable="true"
+          :title="item.buildingName"
+          :img="item.coverUrl"
+          :desc="item.address"
+          :detailUrl="item.videoUrl"
+          :editUrl="item.editUrl"      
+          pageTitle='场地列表'   
+          :id="item.id"
+          :record="item"          
+          @delete-ok="deleteOk(item)"
+          @showDetail='showDetail(item)'
+          @editDetail='handleEdit(item)'
+          @updateList='updateList(1)'
+        ></vm-card>
+      </a-col>
+    </a-row>
     </div>
     <!-- table区域-end -->
 
@@ -97,6 +120,7 @@
     </a-modal>
     <a-modal title="详情" v-model="detail" class="ping" :footer="null" :width="800" style="overflow:hidden">
       <a-tabs defaultActiveKey="1" @change="callback" v-model="indexDetail">
+        
         <a-tab-pane tab="场地图集" key="1" forceRender>
           <div>
             <a type="primary" style="margin-left:10px" @click="addPhoto=true">新增场地图片</a>
@@ -113,7 +137,31 @@
             <a-pagination showQuickJumper size="small" :total="total" @change="pageChange" :pageSize.sync="pageSize" />
           </div>
         </a-tab-pane>
-        <a-tab-pane tab="场地视频" key="2">
+        <a-tab-pane tab="场地信息" key="2">
+          <div style="display:flex;flex-direction:row;height:300px;">
+            <div
+              style="height:200px;width:30%;border:1px solid #f2f2f2;"
+              :style="{backgroundImage: imageUrl?'url(' +imageUrl+')':'url('+noImgUrl+')', backgroundSize:'contain', backgroundRepeat: 'no-repeat',backgroundPosition:'center center'}"
+            ></div>
+            <div style="flex:1;margin:15px">
+              <a-form >
+                <a-form-item label="场地名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
+                  <span>{{currentYard.buildingName}}</span>
+                </a-form-item>
+                <a-form-item label="场地地址" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
+                  <span>{{currentYard.address}}</span>
+                </a-form-item>
+                <a-form-item label="联系人名" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
+                  <span>{{currentYard.contactName}}</span>
+                </a-form-item>
+                <a-form-item label="联系电话" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
+                  <span>{{currentYard.contactMobile}}</span>
+                </a-form-item>
+              </a-form>
+            </div>
+          </div>
+        </a-tab-pane>
+        <a-tab-pane tab="场地视频" key="3">
           <div>
             <a type="primary" style="margin-left:10px" @click="addVideo=true">新增场地视频</a>
             <ul class="actor-photo-list">
@@ -156,6 +204,7 @@
 <script>
   import YardModal from './modules/YardModal'
   import yardDetail from './modules/yardDetail'
+  import VmCard from '@/components/ctop/vm-card'
   import {
     JeecgListMixin
   } from '@/mixins/JeecgListMixin'
@@ -168,7 +217,8 @@
     yardPhotoDelete,
     yardVideoDelete,
     yardPhotoAdd,
-    yardVideoAdd
+    yardVideoAdd,
+    yardListDelete
   } from '@/api/yard'
   export default {
     name: 'YardList',
@@ -177,10 +227,31 @@
       JEllipsis,
       YardModal,
       UploadToAli,
-      uploadFile
+      uploadFile,
+      VmCard
     },
     data() {
       return {
+        ipagination: {
+            current: 1,
+            pageSize: 8,
+            //   pageSizeOptions: ['10', '20', '30'],
+            showTotal: (total, range) => {
+                return range[0] + "-" + range[1] + " 共" + total + "条"
+            },
+            showQuickJumper: true,
+            showSizeChanger:true,
+            pageSizeOptions: ['10', '30', '50'],
+            total: 0,
+            onChange: (current, pageSize) => {
+                // 切换分页时的回调,
+                // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+                this.ipagination.current = current;
+                this.ipagination.pageSize= pageSize;
+            }
+        },
+
+        noImgUrl:require('@/assets/img/noImg.png'),
         queryParam: {},
         description: '场地管理',
         // 新增修改按钮是否显示
@@ -251,13 +322,20 @@
         accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
         addPhoto: false,
         addVideo: false,
-        confirmLoading: true
+        confirmLoading: true,
+        currentYard:{},
       }
     },
 
     methods: {
+      totalpageChange(page){
+        console.log(page)
+        this.ipagination.current=page;
+        this.loadData(this.ipagination.current)
+      },
       showDetail(item) {
         console.log(item)
+        this.currentYard=item
         this.detail = true
         this.id = item.id
         // this.currentPage = 1
@@ -382,7 +460,31 @@
             this.getVideo()
           }
         })
-      }
+      },
+
+      deleteOk: function (data) {
+        console.log('最外层deleteFn执行',data)
+        yardListDelete({
+          id:data.id
+        }).then(res=>{
+          if(res.success){
+            this.$message.success('删除成功')
+            for (let i = 0; i < this.dataSource.length; i++) {
+              if (this.dataSource[i].id === data.id) {
+                this.dataSource.splice(i, 1)
+              }
+            }
+            // this.getActorList(data.page)
+          }else{
+            this.$message.error('删除失败,稍后再试')
+          }
+          
+        })
+      },
+      updateList(page){
+        this.totalpageChange(page)
+      },
+      
     }
   }
 </script>

+ 2 - 2
vue.config.js

@@ -74,7 +74,7 @@ module.exports = {
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
 
         // target: 'http://192.168.1.74:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
 
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         
@@ -82,7 +82,7 @@ module.exports = {
         // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
 
 
-         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目