ソースを参照

头条数据 查看 页面

jiayufei 4 年 前
コミット
6170c67ee5
1 ファイル変更90 行追加169 行削除
  1. 90 169
      src/views/modules/headline-view/headline-view.vue

+ 90 - 169
src/views/modules/headline-view/headline-view.vue

@@ -169,37 +169,64 @@
                             <span slot="unitStatus" slot-scope="text,record">
                                 <a-spin :spinning="record.spin" size="small">
                                     <div class="spin-content">
-                                        <a-switch size="default" :checked='text === 1' @change="switchChange(text,record)"/>
+                                        <a-switch size="default" :checked='text === 1' @change="switchChange(text, record)"/>
                                     </div>
                                 </a-spin>
                             </span>
-                            
                             <span slot="bid" slot-scope="text">
-                                {{text?text/1000:0}}
+                                {{ text ? text / 1000 : 0 }}
                             </span>
                             <span slot="grew" slot-scope="text">
-                                {{text?text+'%':0+'%'}}
+                                {{ text ? text + '%' : 0 + '%' }}
                             </span>
                             <span slot="authName" slot-scope="text">
-                                {{text || '-'}}
+                                {{ text || '-' }}
                             </span>
                             <span slot="time" slot-scope="text,record">
-                                {{record.startTime}}至{{record.endTime}}
+                                {{ record.startTime }}至{{ record.endTime }}
                             </span>
                             <span slot="operator" slot-scope="text,record">
-                                <a-popover v-model="record.visible" trigger="click" placement="topLeft" @visibleChange='visibleChange'>
+                                <a-popover
+                                    v-model="record.visible"
+                                    trigger="click"
+                                    placement="topLeft"
+                                    @visibleChange='visibleChange'
+                                >
                                     <span slot="title">修改出价</span>
-                                    <template  slot="content" style="width:300px;">
+                                    <template slot="content" style="width:300px;">
                                         <div style="margin:5px 0 0;padding: 0 0 15px;">
-                                            <span ><a-input-number :min="0" v-model="newBid" :step="0.1" placeholder="请输入出价" size="small" style='margin-right:20px;width:120px' /></span>
-                                            <p style="color:red;font-size:12px;height:16px;padding:5px 0">{{bidErrorMessage}}</p>
+                                            <span>
+                                                <a-input-number
+                                                    :min="0"
+                                                    v-model="newBid"
+                                                    :step="0.1"
+                                                    placeholder="请输入出价"
+                                                    size="small"
+                                                    style='margin-right:20px;width:120px'
+                                                />
+                                            </span>
+                                            <p style="color:red;font-size:12px;height:16px;padding:5px 0">
+                                                {{ bidErrorMessage }}
+                                            </p>
                                         </div>
-                                        
                                         <div>
-                                            <a-button type='default' @click="bidChangeCancel(record)" size='small' style='margin-right:10px'>取消</a-button>
-                                            <a-button type='primary' @click="bidChangeOk(record)" size='small' class="ok">修改</a-button>
+                                            <a-button
+                                                type='default'
+                                                @click="bidChangeCancel(record)"
+                                                size='small'
+                                                style='margin-right:10px'
+                                            >
+                                                取消
+                                            </a-button>
+                                            <a-button
+                                                type='primary'
+                                                @click="bidChangeOk(record)"
+                                                size='small'
+                                                class="ok"
+                                            >
+                                                修改
+                                            </a-button>
                                         </div>
-                                        
                                     </template>
                                     <a href="javascript:;"  type='primary' @click="()=>{record.visible=true}">调价</a>
                                 </a-popover>
@@ -213,7 +240,6 @@
                                     <a-menu-item>
                                         <span href="javascript:;" @click="editLink(record)">修改链接</span>
                                     </a-menu-item>
-                                    
                                     </a-menu>
                                 </a-dropdown>
                             </span>
@@ -230,148 +256,62 @@
                         :disabled-date="disabledDate"
                         @change="materialDataChange"
                     />
-                </div>           
-                <div class="materialBodyLeft">
-                    <div class="title">
-                        <div class="titleContext">
-                            <span class="spot"> </span>
-                            素材相关
-                            <a-tooltip >
-                                <template slot="title">
-                                <div style="margin-bottom:8px">新上素材数:前一日上传的素材数</div>
-                                <div style="margin-bottom:8px">有效素材:素材上线14天内消耗超过5000的素材数量</div>
-                                <div style="margin-bottom:8px">爆量素材:素材上线7天内消耗超过50000的素材数量</div>
-                                <div >素材总数:账户的素材总数</div>
-                                </template>
-                                <a-icon type="question-circle" />
-                            </a-tooltip>
-                            <span class="titleTip">更新时间:{{materialBodyUpdateTime || '-'}}</span>
-                        </div>
-                    </div>
-                    <div class="echart">
-                        <a-spin :spinning="materialBodyEchartSpinning">
-                        <div class="materialEchart" id="materialEchart"  style='width:100%;height:350px;margin:0 auto;' ref="materialEchart">
-                            <a-empty  />
-                        </div>
-                        </a-spin >
-                    </div>
                 </div>
-                <a-divider type="vertical" />
                 <div class="materialBodyRight">
                     <div class="table">
                         <a-table
-                        :columns="materialColumns"
-                        :data-source="materialData"
-                        :scroll="{ x: 950,y:260}"
-                        :pagination="materialIpagination"
-                        :loading="materialLoading"
-                        @change="materialChange"
-                        size='middle'
-                        style="font-size:14px">
-                        
-                        <span slot="coverUrl" slot-scope="text,record" >  
-                            <div style="background:#e8e8e8;text-align:center;border-radius:3px">
-                                <a-popover placement="right">
-                                <template slot="content">                                
-                                    <video :src="record.url" style="width:250px" controls  ></video>
-                                </template>
-                                <template slot="title">                            
-                                </template>
-                                <img :src="text" alt="" style="width:20px">
-                            </a-popover>
-                            </div>                      
-                            
-                            
-                        </span>
-                        <span slot="bid" slot-scope="text">
-                            {{text/1000 }}
-                        </span>
-                        <span slot="charge" slot-scope="text"> {{text | decimalsHandle}} </span>
-                        <span slot="phototShow" slot-scope="text"> {{text | formatCurrency}} </span>
-                        <span slot="activation" slot-scope="text"> {{text | formatCurrency}} </span>
-                        <span slot="activationCost" slot-scope="text"> {{text | decimalsHandle}} </span>
-                        <span slot="stateDate" slot-scope="text">
-                            {{text || '暂无'}}
-                        </span>
-                        
-                    </a-table>
-                    </div>
-                </div>
-            </div>
-            <div class="bodyBox targetBody">
-                <div class="title">
-                        
-                        <a-select size="default" v-model="echartIndex" style="width: 150px" @change="echartIndexChange">
-                            <a-select-option v-for="item in indexValue" :key="item.value" :value='item.value'>
-                                {{ item.label }}
-                            </a-select-option>
-                        </a-select>
-                        <span class="titleTip">该处展示前天起七天数据</span>
-                        
-                    </div>
-                <a-spin :spinning="targetBodyEchartSpinning">
-                <div class="dataMode">
-                    <div class="adPositionMode">
-                        <div class="title">
-                            <div class="titleContext">
-                                <span class="spot"> </span>
-                                分版位数据
-                                <span class="titleTip" style="font-size:12px;margin-left:10px">数据与消耗存在一定误差</span>
-                            </div>
-                        </div>
-                        <div class="eachrt">
-                            <a-spin :spinning="adPositionEchartSpinning">
-                            <div class="adPositionEchart" id="adPositionEchart"  style='width:100%;height:350px;margin:0 auto;' ref="adPositionEchart">
-                                <a-empty  />
-                            </div>
-                            </a-spin >
-                        </div>
-                    </div>
-                    <a-divider type="vertical" />
-                    <div class="ageMode">
-                        <div class="title">
-                            <div class="titleContext">
-                                <span class="spot"> </span>
-                                分年龄数据
-                                <!-- <span class="titleTip" style="font-size:12px;margin-left:10px">数据与消耗存在一定误差</span> -->
-                            </div>
-                        </div>
-                        <div class="eachrt">
-                            <a-spin :spinning="ageEchartSpinning">
-                            <div class="ageEchart" id="ageEchart"  style='width:100%;height:350px;margin:0 auto;' ref="ageEchart">  <a-empty  /></div>
-                            </a-spin >
-                        </div>
+                            :columns="materialColumns"
+                            :data-source="materialData"
+                            :scroll="{ x: 950,y:260}"
+                            :pagination="materialIpagination"
+                            :loading="materialLoading"
+                            size='middle'
+                            style="font-size:14px"
+                            @change="materialChange"
+                        >
+                            <span slot="coverUrl" slot-scope="text,record" >  
+                                <div style="background:#e8e8e8;text-align:center;border-radius:3px">
+                                    <a-popover placement="right">
+                                        <template slot="content">                                
+                                            <video :src="record.url" style="width:250px" controls></video>
+                                        </template>
+                                        <template slot="title">                            
+                                        </template>
+                                        <img :src="text" style="width:20px">
+                                    </a-popover>
+                                </div>
+                            </span>
+                            <span slot="bid" slot-scope="text">
+                                {{ text / 1000 }}
+                            </span>
+                            <span slot="charge" slot-scope="text">{{ text | decimalsHandle }}</span>
+                            <span slot="phototShow" slot-scope="text">{{ text | formatCurrency }}</span>
+                            <span slot="activation" slot-scope="text">{{ text | formatCurrency }}</span>
+                            <span slot="activationCost" slot-scope="text">{{ text | decimalsHandle }}</span>
+                            <span slot="stateDate" slot-scope="text">
+                                {{text || '暂无'}}
+                            </span>
+                        </a-table>
                     </div>
-                    <a-divider type="vertical" />
-                    <div class="genderMode">
-                        <div class="title">
-                            <div class="titleContext">
-                                <span class="spot"> </span>
-                                分性别数据
-                                <!-- <span class="titleTip" style="font-size:12px;margin-left:10px">数据与消耗存在一定误差</span> -->
-                            </div>
-                        </div>
-                        <div class="eachrt">
-                            <a-spin :spinning="genderEchartSpinning">
-                            <div class="genderEchart" id="genderEchart"  style='width:100%;height:350px;margin:0 auto;' ref="genderEchart">
-                                <a-empty  />
-                            </div>
-                            </a-spin >
-                        </div>
-                    </div>  
                 </div>
-                </a-spin>
             </div>
         </a-spin>
         <!-- 修改检测链接的modal -->
-        <a-modal v-model="linkVisible" title="修改链接" @ok="linkhandleOk" :width='800' :height='400' @cancel='linkhandleCancel'>
+        <a-modal
+            v-model="linkVisible"
+            title="修改链接"
+            :width="800"
+            :height="400"
+            @ok="linkhandleOk"
+            @cancel="linkhandleCancel"
+        >
             <div class="linkBody">
                 <a-row>
                     <a-col :span="4">
                         <div style="text-align:right">第三方检测链接:</div>
                     </a-col>
                     <a-col :span="18">
-                        <span>{{oldLink || '-'}}</span>
+                        <span>{{ oldLink || '-' }}</span>
                     </a-col>
                 </a-row>
                 <div style="margin-bottom:20px"></div>
@@ -380,16 +320,19 @@
                         <div style="text-align:right">修改链接:</div>
                     </a-col>
                     <a-col :span="18">
-                        <a-input placeholder="请输入监测链接" style="300px"  v-model="newLink"/>
+                        <a-input placeholder="请输入监测链接" style="300px" v-model="newLink"/>
                     </a-col>
                 </a-row>
             </div>
         </a-modal>
         <!-- 修改定向的modal -->
-        <a-modal v-model="targetVisible" title="修改定向" @ok="targethandleOk" @cancel='targethandleCancel'>
+        <a-modal
+            v-model="targetVisible"
+            title="修改定向"
+            @ok="targethandleOk"
+            @cancel="targethandleCancel"
+        >
             <div class="linkBody">
-                
- 
                 <a-row>
                     <a-col :span="6">
                         <div style="text-align:right">修改定向包:</div>
@@ -407,24 +350,6 @@
         <!-- 修改账户modal -->
         <a-modal v-model="accountVisible" title="切换账户" @ok="accounthandleOk" :width='800' @cancel='accountCancel' >
             <div class="linkBody" style='height:100px;display:flex;'>
-                <!-- <a-input-search style="margin-bottom: 8px;width:500px" placeholder="Search" v-model="searchValues"  @change="searchChange" />
-                <a-tree
-                :expanded-keys="expandedKeys"
-                :auto-expand-parent="autoExpandParent"
-                :tree-data="gData"
-                @expand="onExpand"
-                @select="accountSelect"
-                
-                >
-                <template slot="title" slot-scope="{ title }">
-                    <span v-if="title.indexOf(searchValue) > -1">
-                        {{ title.substr(0, title.indexOf(searchValue)) }}
-                        <span style="color: red">{{ searchValue }}</span>
-                        {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
-                    </span>
-                    <span v-else>{{ title }}</span>
-                </template>
-                </a-tree> -->
                 <div style="height:32px;line-height:32px">选择账户:</div>
                 <Treeselect :appId.sync="selectaccountId" :multiple="false"  request="2,4"   ref="treeSelect" style="margin-bottom:8px;width:600px " />     
             </div>
@@ -2594,12 +2519,8 @@ export default {
                 right: 20px;
             }
         }
-        .materialBodyLeft {
-            width: 40%;
-            height: 100%;
-        }
         .materialBodyRight {
-            width: 60%;
+            width: 100%;
             height: 100%;
             padding-top: 60px;
         }