<template>
    <!-- 广告位管理 -->
    <div>
        <!-- 头部搜索框部分 -->
        <div class="title">
            <el-row>
                <el-col :span="6" class="left">
                    <div class="searchBox">
                        <div class="searchTitle">网站名称</div>
                        <el-select v-model="webSiteName_id" :multiple="false" :multiple-limit="1" filterable remote
                            reserve-keyword placeholder="请输入网站名称" clearable :remote-method="getWebNavLists"
                            :loading="webSiteLoading" @change="selectWebSite">
                            <el-option v-for="item in webSiteLists" :key="item.value" :label="item.label"
                                :value="item.value">
                            </el-option>
                        </el-select>
                    </div>
                </el-col>
                <el-col :span="6" class="left">
                    <div class="searchBox">
                        <div class="searchTitle">广告位名称</div>
                        <el-input v-model="adPlaceName" class="input" clearable placeholder="请输入广告位名称"></el-input>
                    </div>
                </el-col>
                <el-col :span="8" class="right">
                    <div class="btnList">
                        <button class="search" @click="goSearch">搜索</button>
                        <button class="reset" @click="goReset">重置</button>
                    </div>
                </el-col>
            </el-row>
        </div>
        <!--表格内容 start------------------------------------------------------------>
        <div class="layerBox">
            <tableTitle :name="tableDivTitle" />
            <button class="btn" @click="addWebsite">添加广告位</button>
            <el-row>
                <template>
                    <el-table class="my-table" v-loading="loading" :data="tableData" style="width: 100%">
                        <el-table-column fixed prop="id" label="编号" width="90">
                        </el-table-column>
                        <el-table-column prop="website_name" label="网站名称" width="160">
                        </el-table-column>
                        <el-table-column prop="name" label="广告位名称" width="220">
                        </el-table-column>
                        <el-table-column prop="type_name" label="广告类型" width="110">
                        </el-table-column>
                        <el-table-column prop="size" label="宽/高 (PX)" width="120">
                        </el-table-column>
                        <el-table-column prop="price" label="价格 (天)" width="110">
                        </el-table-column>
                        <el-table-column prop="created_at" label="创建时间" >
                        </el-table-column>
                        <el-table-column prop="updated_at" label="修改时间" >
                        </el-table-column>
                        <el-table-column fixed="right" label="操作" width="200">
                            <template slot-scope="scope">
                                <div class="listBtnBox">
                                    <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)"><i
                                            class="el-icon-edit-outline"></i>编辑</div>
                                    <div class="listLookBtn" @click="goLook(scope.row.id)"><i
                                            class="el-icon-view"></i>查看</div>
                                </div>
                            </template>
                        </el-table-column>
                        <!-- <el-table-column prop="created_at" label="创建时间" width="190">
                        </el-table-column>
                        <el-table-column prop="updated_at" label="修改时间" width="190">
                        </el-table-column> -->
                        <!-- <el-table-column fixed="right" label="操作" width="300">
                            <template slot-scope="scope">
                                <div class="listBtnBox">
                                    <div class="listDeleteBtn" @click="deleteRow(scope.row.id)"><i
                                            class="el-icon-delete"></i>删除</div>
                                    <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)"><i
                                            class="el-icon-edit-outline"></i>编辑</div>
                                    <div class="listLookBtn" @click="goLook(scope.row.id)"><i
                                            class="el-icon-view"></i>查看</div>
                                </div>
                            </template>
                        </el-table-column> -->
                    </el-table>
                </template>
            </el-row>
        </div>
        <!--分页 start------------------------------------------------------------>
        <div class="alignBox">
            <el-row>
                <el-col :span="24">
                    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
                        :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
                        :total="total">
                    </el-pagination>
                </el-col>
            </el-row>
        </div>
        <!--分页 end------------------------------------------------------------>
        <!--表格内容 end------------------------------------------------------------>

        <!-- 弹出框 编辑 start----------------------------------------------------------->
        <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="50%" top="8vh"
            :close-on-click-modal="false">
            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
                <div class="dialogText">
                    <el-form-item label="网站名称:" prop="webName">
                        <el-select v-model="ruleForm.webName" :multiple="false" :multiple-limit="1" filterable remote
                            reserve-keyword placeholder="请输入网站名称" :remote-method="getWebNavList"
                            :loading="webSiteLoading" @change="detectionWebSite" :disabled="disabledFields.webName">
                            <el-option v-for="item in webSiteList" :key="item.value" :label="item.label"
                                :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="广告位名称:" prop="adName">
                        <el-input v-model="ruleForm.adName" placeholder="请输入广告位名称"></el-input>
                    </el-form-item>
                    <el-form-item label="广告位标识:" prop="adTag">
                        <el-input v-model="ruleForm.adTag" placeholder="请输入广告位标识" :disabled="disabledFields.adTag"></el-input>
                    </el-form-item>
                    <el-form-item label="广告位介绍:" prop="adDesc">
                        <el-input v-model="ruleForm.adDesc" type="textarea" :rows="2" placeholder="请输入广告位介绍"
                            resize="none">
                        </el-input>
                    </el-form-item>
                    <el-form-item label="广告示例图:" prop="adPhoto" :label-width="formLabelWidth"
                        :class="['custom-form-item']" class="custom-align-right">
                        <div class="uploaderBox">
                            <!--图片上传组件 start ------------------------------------------------------------>
                            <div class="avatar-upload-container" @mouseenter="hovering = true"
                                @mouseleave="hovering = false">
                                <!-- 上传组件 -->
                                <el-upload class="avatar-uploader" action="#" :show-file-list="false"
                                    :before-upload="beforeAvatarUpload">
                                    <!-- 预览图片 -->
                                    <img v-if="logoUrl" :src="logoUrl" class="avatar">
                                    <div v-else class="chooseImgDiv">
                                        <div>
                                            <img src="@/assets/public/upload/noImage.png">
                                            <div>选择图片</div>
                                        </div>
                                    </div>
                                    <input type="hidden" name="logo" v-model="ruleForm.adPhoto">
                                </el-upload>
                                <!-- 删除按钮，当鼠标悬浮时显示 -->
                                <div v-if="hovering && logoUrl" class="delete-button" @click="handleDelete">
                                    <i class="el-icon-delete"></i>
                                </div>
                            </div>
                            <!--图片上传组件 end ------------------------------------------------------------>
                        </div>
                    </el-form-item>
                    <el-form-item label="广告类型:" prop="adType">
                        <el-radio v-model="ruleForm.adType" label='2' :disabled="disabledFields.adType">图片</el-radio>
                    </el-form-item>
                    <el-form-item label="广告位大小:" prop="adSize">
                        <el-select v-model="ruleForm.adSize" placeholder="请选择广告位大小" @change="change" :disabled="disabledFields.adSize">
                            <el-option v-for="item in options" :key="item.id" :label="item.size" :value="item.id" >
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="价格:" prop="price">
                        <el-input v-model="ruleForm.price" placeholder="请输入价格"></el-input>
                    </el-form-item>
                    <el-form-item label="状态:" prop="status">
                        <el-radio v-model="ruleForm.status" label="1">通过</el-radio>
                        <el-radio v-model="ruleForm.status" label="2">下架</el-radio>
                    </el-form-item>
                </div>
                <div class="dialogBtn">
                    <!-- <button class="cancel" @click="cancelForm">取消</button>
                    <button class="submit" @click="submitForm">提交</button> -->
                    <el-button type="info" @click="cancelForm">取消</el-button>
                    <el-button type="primary" @click="submitForm">提交</el-button>
                </div>
            </el-form>
        </el-dialog>
        <!-- 弹出框 编辑 end----------------------------------------------------------->
    </div>
</template>

<script>
//表格标题
import tableTitle from './components/tableTitle.vue';

//引入公用样式
import '@/styles/global.less';
import { createAdPlace, getAdPlaceList, delAdPlace, updateAdPlace, getAdList, getAdPlaceInfo, getSize } from '@/api/advertise'
export default {
    components: {
        tableTitle,//表格标题-
    },
    data() {
        const validateEmpty = (rule, value, callback) => {
            if (value.length == 0) {
                callback(new Error('该项不能为空！'))
            } else {
                callback()
            }
        }
        return {
            tableDivTitle: "广告位列表",  //列表标题
            dialogTableVisible: false,      //编辑弹框
            dialogName: '编辑', //编辑弹窗名称
            loading: true, //加载中

            tableData: [],//表格数据

            // 可以输入的搜索框相关
            webSiteList: [],//获取关联网站列表
            webSiteLists: [],
            webSiteLoading: false,

            //3.4 上传logo图片
            logoUrl: '',
            hovering: false, // 鼠标悬浮状态 悬浮时显示删除

            value: '',

            //活动id
            activeid: "",

            // 分页相关
            page: 1,
            pageSize: 10,
            total: 0,

            options: [], //广告尺寸

            formLabelWidth: '', //广告示例图相关


            // 搜索框相关
            webSiteName_id: '', //网站名称id
            adPlaceName: '', //广告位名称
            website_id: "", //网站id
            disabledFields: {
                webName: false,
                adTag: false,
                adType: false,
                adSize: false
            },
            ruleForm: {
                webName: '', //网站名称
                adName: '', //广告位名称
                adTag: '', //广告位标识
                adDesc: '',//广告位介绍
                adPhoto: '', //广告示例图
                adType: '',//广告类型
                adSize: '',   //广告位大小
                ad_size_id: 1,   //广告位大小
                price: '',  //价格
                status: '',   //状态
            },
            rules: {
                webName: [{ required: true, trigger: 'blur', validator: validateEmpty }],
                adName: [{ required: true, trigger: 'blur', validator: validateEmpty }],
                adTag: [{ required: true, trigger: 'blur', validator: validateEmpty }],
                adDesc: [{ required: true, trigger: 'blur', validator: validateEmpty }],
                adPhoto: [{ required: true, trigger: 'blur', validator: validateEmpty }],
                adType: [{ required: true, trigger: 'blur', validator: validateEmpty }],
                adSize: [{ required: true, trigger: 'blur', validator: validateEmpty }],
                price: [{ required: true, trigger: 'blur', validator: validateEmpty }],
                status: [{ required: true, trigger: 'blur', validator: validateEmpty }],
            }
        }
    },
    methods: {
        //1.列表和分页相关 start ------------------------------------------------------------>
        //1.1 开始请求列表信息方法
        getData() {
            if (this.adPlaceName !== '' || this.webSiteName_id !== '') {
                getAdPlaceList({
                    page: this.page,
                    pageSize: this.pageSize,
                    name: this.adPlaceName,
                    website_id: this.webSiteName_id, //广告位名称 id
                }).then(data => {
                    console.log(data);
                    this.tableData = data.data.rows
                    this.total = data.data.count
                    for (let item of this.tableData) {
                        item.size = item.width + 'x' + item.height
                        if (item.typeid == 2) {
                            item.type_name = '图文'
                        } else if (item.typeid == 1) {
                            item.type_name = '文字'
                        }
                    }
                })
            } else {
                getAdPlaceList({
                    page: this.page,
                    pageSize: this.pageSize
                }).then(data => {
                    this.loading = false
                    console.log(data.data.rows);
                    this.tableData = data.data.rows
                    this.total = data.data.count
                    for (let item of this.tableData) {
                        item.size = item.width + 'x' + item.height
                        if (item.typeid == 2) {
                            item.type_name = '图文'
                        } else if (item.typeid == 1) {
                            item.type_name = '文字'
                        }
                    }
                })
            }

        },

        //获取广告尺寸
        getSize() {
            getSize().then(data => {
                console.log(data.data);
                this.options = data.data
                for (let item of this.options) {
                    item.size = item.width + 'x' + item.height
                }
                console.log(this.options);
            })
        },

        change(val) {
            console.log('val1111111111', val);
            this.ruleForm.ad_size_id = val
            console.log('this.ruleForm.adSize', this.ruleForm.adSize);
        },

        //1.2 删除内容
        deleteRow(id) {
            console.log(id);
            let data = new FormData()
            data.append('id', id)
            this.$confirm('注意:删除后，该条信息及其绑定关系全部删除', '是否确认删除该条信息？', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
            }).then(() => {
                console.log("当前删除：" + id)

                delAdPlace({
                    id: id
                }).then(data => {
                    console.log(data);
                    if (data.code = 200) {
                        this.$message({
                            message: '删除成功',
                            type: 'success'
                        })
                        this.getData()
                    } else if (data.code == 0) {
                        this.$message({
                            message: data.message,
                            type: 'error'
                        })
                    }
                })

            }).catch(() => {
                this.$message({
                    type: 'warning',
                    message: '已取消删除'
                });
            });
        },
        //1.3 查看示例图
        // goGraph() {
        //     this.dialogVisible = true
        // },

        //1.4 列表内容分页
        //直接跳转
        handleSizeChange(val) {
            this.page = val;
            this.getData();
        },
        //1.5 点击分页
        handleCurrentChange(val) {
            this.page = val;
            this.getData();
        },
        // 1.6 搜索按钮
        goSearch() {
            getAdPlaceList({
                page: this.page,
                pageSize: this.pageSize,
                name: this.adPlaceName,
                website_id: this.webSiteName_id, //广告位名称 id
            }).then(data => {
                console.log(data);
                this.tableData = data.data.rows
                this.total = data.data.count
                for (let item of this.tableData) {
                    item.size = item.width + 'x' + item.height
                    if (item.typeid == 2) {
                        item.type_name = '图文'
                    } else if (item.typeid == 1) {
                        item.type_name = '文字'
                    }
                }
            })

        },
        //1.7 重置按钮
        goReset() {
            this.webSiteName_id = ""
            this.adPlaceName = ""
            this.getData()
        },
        //列表和分页相关 end ------------------------------------------------------------>

        //1.8 编辑
        goEdit(id, val) {
            // console.log(id);
            this.dialogName = '编辑'
            this.activeid = id
            this.dialogTableVisible = true
            console.log(id, val);
            // console.log("状态", val.status);

            // 检查 website_column_arr_id 数组是否包含 2
            const shouldDisable = val.website_column_arr_id && val.website_column_arr_id.includes(2);
            this.disabledFields = {
                webName: shouldDisable,
                adTag: shouldDisable,
                adType: shouldDisable,
                adSize: shouldDisable
            };

            //数据回显
            this.website_id = val.website_id
            this.ruleForm.webName = val.website_name //网站名称
            this.ruleForm.adName = val.name //广告位名称
            this.ruleForm.adTag = val.ad_tag //广告位标识
            this.ruleForm.adDesc = val.introduce //广告位介绍
            this.logoUrl = val.thumb //广告示例图
            this.ruleForm.adPhoto = val.thumb //广告示例图
            this.ruleForm.price = val.price //价格
            this.ruleForm.status = val.status //状态
            this.ad_size_id=val.ad_size_id //广告尺寸
            this.ruleForm.adSize=val.width+'x'+val.height //广告尺寸

            if (val.typeid == 2) {
                this.ruleForm.adType = '2' //广告类型
            }
            if (val.status == 1) {
                this.ruleForm.status = '1' //状态
            } else if (val.status == 2) {
                this.ruleForm.status = '2' //状态
            }

        },

        //1.9 查看
        goLook(id) {
            this.activeid = id
            this.$router.push({
                path: '/adPlaceDetail',
                query: {
                    id: this.activeid
                }
            })
        },

        //2.0 添加
        addWebsite() {
            this.dialogTableVisible = true
            this.dialogName = "添加"

            //添加时清空回显回来的数据
            this.ruleForm.webName = '' //网站名称
            this.ruleForm.adName = '' //广告位名称
            this.ruleForm.adTag = '' //广告位标识
            this.ruleForm.adDesc = '' //广告位介绍
            this.ruleForm.adPhoto = '' //广告示例图
            this.ruleForm.adSize = '' //广告尺寸
            this.ruleForm.adType = '2' //广告类型
            this.ruleForm.price = '' //价格
            this.ruleForm.status = '' //状态
            this.logoUrl = ''
        },


        // 2.1 弹出层相关方法
        // 提交表单
        submitForm() {
            // 判断用户是否输入数据
            if (this.ruleForm.webName == '') {
                this.$message({
                    message: '请将数据填写完整',
                    type: 'error'
                })
                return
            }
            if (this.ruleForm.adTag == '') {
                this.$message({
                    message: '请将数据填写完整',
                    type: 'error'
                })
                return
            }
            if (this.dialogName == "添加") {
                createAdPlace({
                    name: this.ruleForm.adName,
                    website_id: this.website_id,
                    ad_tag: this.ruleForm.adTag,
                    price: this.ruleForm.price,
                    thumb: this.ruleForm.adPhoto,
                    typeid: this.ruleForm.adType,
                    ad_size_id: this.ruleForm.adSize,
                    status: this.ruleForm.status,
                    introduce: this.ruleForm.adDesc,
                }).then(data => {
                    console.log(data);
                    if (data.code == 200) {
                        this.$message({
                            message: '添加成功',
                            type: 'success'
                        })
                        this.dialogTableVisible = false
                        this.getData()
                    } else if (data.code == 0) {
                        this.$message({
                            message: data.message,
                            type: 'error'
                        })
                        this.dialogTableVisible = true
                        return
                    } else {
                        this.$message({
                            message: data.message,
                            type: 'error'
                        })
                        this.dialogTableVisible = true
                        return
                    }
                })
            }

            if (this.website_id == '') {
                this.$message({
                    message: '请输入并选择网站名称',
                    type: 'error'
                })
                this.dialogVisible = true
            }
            if (this.ruleForm.adTag == '') {
                this.$message({
                    message: '请将数据填写完整',
                    type: 'error'
                })
                return
            }
            if (this.dialogName == "编辑") {
                updateAdPlace({
                    name: this.ruleForm.adName,
                    website_id: this.website_id,
                    ad_tag: this.ruleForm.adTag,
                    price: this.ruleForm.price,
                    thumb: this.ruleForm.adPhoto,
                    typeid: Number(this.ruleForm.adType),
                    ad_size_id: Number(this.ruleForm.ad_size_id),
                    status: Number(this.ruleForm.status),
                    introduce: this.ruleForm.adDesc,
                    id: this.activeid
                }).then(data => {
                    console.log(data);
                    if (data.code == 200) {
                        this.$message({
                            message: '编辑成功',
                            type: 'success'
                        })
                        this.dialogTableVisible = false
                    }
                    if (data.code == 0) {
                        this.$message({
                            message: data.message,
                            type: 'error'
                        })
                        this.dialogTableVisible = true
                    }
                    this.getData()
                })
            }

        },
        //取消添加或编辑
        cancelForm() {
            this.dialogTableVisible = false
        },
        //3.6 上传图片操作
        beforeAvatarUpload(file) {
            const isJPG = file.type === 'image/jpeg';
            const isPNG = file.type === 'image/png';
            const isLt2M = file.size / 1024 / 1024 < 2;

            if (!isJPG && !isPNG) {
                this.$message.error('上传图片只能是 JPG 或 PNG 格式!');
                return false;
            }
            if (!isLt2M) {
                this.$message.error('上传图片大小不能超过 2MB!');
                return false;
            }

            const formData = new FormData();
            formData.append('file', file);

            this.$store.dispatch('pool/uploadFile', formData).then(res => {
                this.logoUrl = res.data.imgUrl;//显示缩略图
                this.ruleForm.adPhoto = res.data.imgUrl;//提供表单地址
                console.log(res.data.imgUrl)
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '网络错误，请重试！'
                });
            })

            // 阻止默认的上传行为
            return false;
        },
        handleDelete() {
            // 删除图片
            this.logoUrl = ''; // 清空图片 URL
        },

        //搜索部分的输入关键词下拉框
        selectWebSite(value) {
            this.webSiteName_id = value
        },

        //添加 / 编辑弹窗中输入关键词下拉框 
        // 判断是否已经关联了网站
        detectionWebSite(value) {
            console.log(value);
            this.website_id = value
            console.log(this.website_id);

        },

        //
        getWebNavList(query) {
            if (query !== '') {
                this.webSiteLoading = true;
                let data = { keyword: query ,website_column_id:2}
                let dataArr = [];
                this.$store.dispatch('pool/getNavWebList', data).then(res => {
                    console.log(res.data)
                    for (let item of res.data) {
                        let data = {};
                        data.key = item.id;
                        data.value = item.id;
                        data.label = item.website_name;
                        dataArr.push(data)
                    }
                    this.webSiteList = dataArr;
                    this.webSiteLoading = false;
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '网络错误，请重试！'
                    });
                })
            } else {
                this.navList = [];
            }
        },
        
        getWebNavLists(query) {
            if (query !== '') {
                this.webSiteLoading = true;
                let data = { keyword: query}
                let dataArr = [];
                this.$store.dispatch('pool/getNavWebList', data).then(res => {
                    console.log(res.data)
                    for (let item of res.data) {
                        let data = {};
                        data.key = item.id;
                        data.value = item.id;
                        data.label = item.website_name;
                        dataArr.push(data)
                    }
                    this.webSiteLists = dataArr;
                    this.webSiteLoading = false;
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '网络错误，请重试！'
                    });
                })
            } else {
                this.navList = [];
            }
        },
    },
    mounted() {
        this.getData()
        this.getSize()
    },
}
</script>

<style scoped lang="less">
input[aria-hidden=true] {
    display: none !important;
}

// 提示信息
.tips {
    margin: 30px;
    background-color: #e9ecf9;
    border-radius: 11px;

    .tipsIcon {
        margin: 10px 15px;
        display: inline-block;
        width: 24px;
        height: 24px;
        background: url("../../assets/advertise/Info Circle.png") no-repeat;
        vertical-align: middle;
    }

    .tipsText {
        font-size: 14px;
        color: #666666;
    }
}

// 头部
.title {
    margin: 30px 30px 20px 30px;
    padding: 30px 30px 40px 30px;
    background-color: #fff;
    border-radius: 20px 20px 20px 20px;
    border: 1px solid #E9EDF7;

    .left {
        float: left;
    }

    .right {
        float: right;
    }


    .searchBox {
        ::v-deep .el-input {
            position: relative;
            font-size: 14px;
            display: inline-block;
            width: 80%;
        }

        .searchTitle {
            padding-bottom: 10px;
            font-family: Microsoft YaHei, Microsoft YaHei;
            font-weight: 400;
            font-size: 14px;
            color: #999999;
            line-height: 16px;
        }

        .el-select {
            width: 100%;
            display: inline-block;
            position: relative;
        }
    }


    .btnList {
        float: right;
        padding-top: 28px;

        button {
            height: 38px;
            border: none;
            border-radius: 8px;
            padding: 0 30px;
        }

        .search {
            background-color: #5570f1;
            color: #fff;
            margin-right: 20px;
        }

        .reset {
            font-family: Microsoft YaHei, Microsoft YaHei;
            font-weight: 400;
            font-size: 16px;
            color: #333333;
            background: #F5F7FB;
            border-radius: 8px 8px 8px 8px;
            border: 1px solid rgba(85, 112, 241, 0.11);
        }
    }
}

.layerBox {
    padding: 30px 20px;
    position: relative;

    .btn {
        position: absolute;
        top: 30px;
        right: 20px;
        height: 38px;
        color: #fff;
        background-color: #5570f1;
        border: none;
        border-radius: 8px;
        padding: 8px 28px 9px;
        box-sizing: border-box;
    }

    .listBtnBox {
        justify-content: left;
    }


    .listDeleteBtn,
    .listEditBtn,
    .listLookBtn {
        margin-left: 0px;
        padding-left: 0px;
        margin-right: 20px;
        width: 76px;
        height: 36px;
        line-height: 36px;
    }


    .listLookBtn {
        text-align: center;
        border-radius: 8px;
        cursor: pointer;
        color: #55b5f1;
        background-color: rgba(85, 181, 241, 0.16);

        >i {
            padding-right: 8px;
        }
    }

    ::v-deep .el-form-item {
        margin-bottom: 50px;
    }

    ::v-deep .el-select {
        width: 100%;
    }

    ::v-deep .el-input--medium,
    ::v-deep .el-form-item__label {
        line-height: 36px;
        font-size: 16px;
    }
}

// 弹出层内容
.dialogText {
    margin: 0 7px 0 3px;
    padding-bottom: 1px;
    padding: 30px 60px 1px 20px;
    background-color: #f5f7fb;

    .adImage {
        width: 140px;
        height: 140px;
        line-height: 210px;
        border-radius: 12px;
        border: 1px solid rgba(85, 112, 241, 0.11);

        img {
            width: 140px;
            height: 80px;
        }
    }



    ::v-deep .avatar {
        width: 140px;
        height: auto;
    }

    .price {
        ::v-deep .el-input {
            width: 29%;
        }
    }

    .example {
        font-family: Microsoft YaHei;
        color: #5570F1;
    }

    .el_btnList {
        margin-right: 15px;
        margin-top: 20px;
    }

    //日期时间选择器的宽
    ::v-deep .el-date-editor.el-input {
        width: 48%;
    }

    ::v-deep .el-button+.el-button {
        margin-left: 0px;
    }

    ::v-deep .el-select {
        width: 100%;
    }

    ::v-deep .el-form-item {
        margin-bottom: 50px;
    }
}

// 弹出层按钮
.dialogBtn {
    text-align: center;
    margin: 50px auto 20px;

    button {
        width: 184px;
        padding: 16px;
        font-family: Microsoft YaHei, Microsoft YaHei;
        font-weight: 400;
        font-size: 20px;
        border: none;
        border-radius: 12px 12px 12px 12px;
    }

    // 取消
    .cancel {
        color: #333333;
        background-color: #f5f7fb;
        border: 2px solid rgba(85, 112, 241, 0.11);
    }

    // 提交
    .submit {
        color: #fff;
        background-color: #5570F1;
        margin-left: 40px;
    }
}

//审核弹出框
.radioGroup {
    ::v-deep .el-form-item {
        margin-top: 40px;
        margin-bottom: 0;
    }
}

.graph {
    background-color: #f5f7fb;
    padding: 60px 100px;
    overflow: hidden;

    li {
        float: left;
    }

    >li:first-child {
        margin-right: 100px;
    }
}

.dialog-footer {
    margin: 0 auto;
}
</style>