<template>
    <fullscreen :fullscreen.sync="fullscreen" class="container">
        <div class="container-box">
            <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>


            <div style="padding-top: 10px;">
                <span v-if="stssp != '033'&&stssp != '023'&&stssp != '013'">
                    <el-button v-if="level != 4&&tableData.length>0" size="medium" style="margin-right:20px"
                        type="primary" @click="datadown">
                        数据分发</el-button>
                    <el-button v-if="level == 1&&tableData.length>0" size="medium" style="margin-right:20px"
                        type="primary" @click="guidangsts">确认归档
                    </el-button>
                    <el-button v-if="level != 4" size="medium" style="margin-right:20px" type="primary"
                        @click="procedure">
                        流程跟踪
                    </el-button>
                    <el-button size="medium" style="margin-right:20px" type="primary" @click="tijiaosts"
                        v-if="level != 1">提交
                    </el-button>
                    <el-button size="medium" style="margin-right:20px" type="primary" @click="shenpists = true"
                        v-if="level != 4 && level != 1">送审
                    </el-button>
                    <myUpload v-if="level == 1" style="display:inline-block;" :fileInfo="fileInfot"
                        :fileList="fileInfot.fileList" @uploadBack='uploadBack'></myUpload>
                    <el-button size="medium" type="primary" @click="dialogCliall">导出
                    </el-button>
                    <el-button v-if="level == 1" size="medium" type="primary" @click="xiazai" style="margin-left: 20px;">下载模板
                    </el-button>
                </span>


                <span v-if="stssp == '033'||stssp == '023'||stssp == '013'">
                    <el-button size="medium" type="primary" @click="ssshenpi(3)" style="margin-right: 20px;">通过
                    </el-button>
                    <el-button size="medium" type="primary" @click="ssshenpi(4)">驳回</el-button>
                </span>

                <el-button size="medium" type="primary" @click="baocun" style="float: right;">保存</el-button>

            </div>


            <div class="tabbox zdy">
                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" tooltip-effect="dark"
                    :data="tableData" size="mini" border style="width: 100%" @selection-change="handleSelectionChange">
                    <el-table-column type="selection" width="55" align="center" v-if="level == 3">
                    </el-table-column>
                    <el-table-column :prop="item.name" :label="item.name" v-for="item in tableDatacs">
                        <template slot-scope="scope">
                            <el-input v-model="scope.row[item.name].value" :disabled="scope.row[item.name].flag"></el-input>
                        </template>
                        <el-table-column :prop="items.name" :label="items.name" v-for="items in item.value"
                            v-if="item.sts">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row[items.name].value" :disabled="scope.row[items.name].flag"></el-input>
                            </template>
                            <!-- <el-table-column :prop="itemss.name" :label="itemss.name" v-for="itemss in items.value"
                                v-if="items.sts">
                                <template slot-scope="scope">
                                    <el-input v-model="scope.row[itemss.name].value" :disabled="scope.row[itemss.name].flag"></el-input>
                                </template>
                            </el-table-column> -->
                        </el-table-column>
                    </el-table-column>
                    <el-table-column label="操作" width="180px" align="center">
                        <template slot-scope="scope">
                            <!-- <el-button size="mini" type="primary" @click="tianbao(scope.row)"
                                style="margin-left: 20px;">确认</el-button> -->
                            <span @click="checkrow(scope.row)">
                                <myUpload :fileInfo="fileInfoup" :fileList="fileInfoup.fileList"
                                    style="display: inline-block;"></myUpload>
                            </span>
                            <el-button size="mini" type="danger" @click="delinfo(scope.row)" v-if="level == 1">删除
                            </el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
                    :total="total">
                </el-pagination>
            </div>
        </div>



        <el-dialog title="下发数据" :visible.sync="downinfosts" width="50%" :destroy-on-close="true"
            :modal-append-to-body="false" :close-on-click-modal="false">
            <div v-loading="loadinged">
                <el-form :model="infolist" ref="infolist">
                    <div>
                        <el-form-item prop="tempVersion" class="info-line online">
                            <span>截至时间</span>
                            <el-date-picker v-model="infolist.validTime"></el-date-picker>
                        </el-form-item>
                        <div class="leadecho" v-if="companyFlag != 2&&level!=3">
                            <div v-for="(item,index) in typeOptions">
                                <span>{{item.fillContent}}</span>
                                <p @click="cholone(index)">选择管理人</p>
                                <span>{{item.rowId}}</span>
                            </div>
                        </div>
                        <div v-if="companyFlag == 2||level==3">
                            <deptTreeOnly style="margin-bottom: 20px;" class="tree" @treeCheck="treeCheckonlyl" :defaultList="defaultList"
                                :type="depttype" :closeList="closeList"></deptTreeOnly>
                        </div>
                    </div>
                </el-form>
                <div slot="footer" class="dialog-footer myfooter">
                    <el-button type="primary" @click="dialogCli(2)">确 定</el-button>
                    <el-button @click="dialogCli(1)">取 消</el-button>
                </div>
            </div>
        </el-dialog>


        <el-dialog title="管理人" :visible.sync="leadersts" width="50%" :destroy-on-close="true"
            :modal-append-to-body="false" :close-on-click-modal="false" >
            <div v-loading="loadinged" style="height: 50vh;overflow-y: scroll;padding-bottom: 20px;">
                <deptTreeOnly style="margin-bottom: 20px;" class="tree" @treeCheck="treeCheckonlyl" :defaultList="defaultList"
                    :type="depttype" :closeList="closeList"></deptTreeOnly>
            </div>
        </el-dialog>



        <el-dialog title="流程" :visible.sync="procests" width="80%" :destroy-on-close="true"
            :modal-append-to-body="false" :close-on-click-modal="false">
            <div>
                <el-table height="50vh" class="com-table" :data="proceList" tooltip-effect="dark" size="mini" border
                    style="width: 100%">
                    <el-table-column prop="stepName" label="流程环节">
                    </el-table-column>
                    <el-table-column prop="dealName" label="处理人" width="200px">
                    </el-table-column>
                    <el-table-column prop="dealNo" label="处理人工号" width="200px">
                    </el-table-column>
                    <el-table-column prop="dealTime" label="处理时间" width="300px">
                    </el-table-column>
                    <!-- <el-table-column prop="remark" label="备注">
                	</el-table-column> -->
                </el-table>
            </div>
            <div slot="footer" class="dialog-footer myfooter">
                <el-button @click="procests = false">关 闭</el-button>
            </div>
        </el-dialog>

        <el-dialog title="审批人" :visible.sync="shenpists" width="50%" :destroy-on-close="true"
            :modal-append-to-body="false" :close-on-click-modal="false">
            <div v-loading="loadinged">
                <el-form :model="infolist" ref="infolist">
                    <div>
                        <el-form-item class="info-line online">
                            <span>审批人员</span>
                            <deptTreeOnly class="tree" @treeCheck="treeCheckonly" :defaultList="defaultList"
                                :type="depttype" :closeList="closeList"></deptTreeOnly>
                            <div class="tree treeUser">
                                <p>{{treeListonly.leaderAuditName}}
                                    <i v-if="treeListonly.leaderAuditName" @click="deletes()" class="el-icon-error"></i>
                                </p>
                            </div>
                        </el-form-item>
                    </div>
                </el-form>
                <div slot="footer" class="dialog-footer myfooter">
                    <el-button type="primary" @click="songshen(2)">确 定</el-button>
                    <el-button @click="shenpists = false">取 消</el-button>
                </div>
            </div>
        </el-dialog>
        <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible"
            v-if="centerDialogVisible"></myMessage>
        <myMessage :messTit='messTitback' @closeMessage="closeMessageback" :centerDialogVisible="centerDialogback"
            v-if="centerDialogback"></myMessage>
    </fullscreen>

</template>
<script>
    import mySearch from "../../../components/search.vue";
    import myMessage from "../../../components/myMessage.vue"
    import toolList from '../../../components/toolList'
    import myUpload from '../../../components/upload.vue'
    import deptTreeOnly from "../../../components/deptTreeOnly.vue"

    export default {
        components: {
            mySearch,
            myMessage,
            toolList,
            myUpload,
            deptTreeOnly
        },
        data() {
            return {
                tooltit: '进行中',
                fullscreen: false,
                total: 0,
                pageSize: 1,
                tableData: [],
                dialogStatus: false,
                disableStatus: false,
                titname: '',
                infolist: {},
                userInfo: {},
                params: {},
                centerDialogVisible: false,
                centerDialogback: false,
                messTit: '',
                messTitback: '存在尚未汇总的数据，是否确认归档?',
                delid: '',
                loading: false,
                loadinged: false,
                tableDatacs: [],
                fileInfot: {
                    type: 'btn',
                    typename: '导入',
                    btntype: 'primary',
                    limit: 1,
                    url: '/market/cChannelInfo/cIllegalCallTask/importTempByProv',
                    fileList: [],
                    taskId: "",
                    tempId: "",
                    typexz:'csv'
                },
                fileInfotout: {
                    type: 'btn',
                    typename: '导出',
                    btntype: 'primary',
                    limit: 1,
                    url: '/market/cChannelInfo/cIllegalCallTemp/importTemp',
                    fileList: []
                },
                fileInfoup: {
                    type: 'btn',
                    size: 'mini',
                    typename: '上传附件',
                    btntype: 'primary',
                    limit: 1,
                    url: '/market/cChannelInfo/cIllegalCallTaskRow/upload',
                    fileList: [],
                    uploadType: "outCall",
                    relId: ""
                },
                downinfosts: false,
                typeOptions: [],
                treeListonly: {},
                defaultList: [],
                closeList: false,
                depttype: 0,
                proceList: [],
                procests: false,
                rowIdList: [],
                rowIdListls: [],
                level: 0,
                shenpists: false,
                leadersts: false,
                stssp: '',
                leaderList:[],
                treeListonlyl:{},
                numl:0,
                companyFlag:''
            }
        },
        methods: {
            cholone(v){
                this.leadersts = true;
                this.numl = v;
            },
            closeMessage(v) {
                if (v == 1) {
                    this.tijiao();
                }
                this.centerDialogVisible = false;
            },
            closeMessageback(v) {
                if (v == 1) {
                    this.jumpinfo();
                }
                this.centerDialogback = false;
            },
            baocun() {
                let params = [];
                for (let i = 0; i < this.tableData.length; i++) {
                    let fillContent = {};
                    for (let item in this.tableData[i]) {
                        if (item != 'rowId') {
                            fillContent[item] = this.tableData[i][item]
                        }
                    }
                    params.push({
                        rowId: this.tableData[i].rowId,
                        fillContent: JSON.stringify(fillContent)
                    })
                }
                this.$http({
                    url: '/market/cChannelInfo/cIllegalCallTaskRow/saveTaskRowBatch',
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: params,
                }).then((res) => {
                    if (res.data.result === 1) {
                        this.$message({
                            message: res.data.desc,
                            type: 'error'
                        });
                    } else {
                        this.$message({
                            message: '成功',
                            type: 'success'
                        });
                    }
                    this.getList({}, this.pageSize);
                });
            },
            uploadBack(v) {
                if (v.data.result == 0) {
                    let _this = this;
                    let t = setInterval(function() {
                        _this.$http({
                            url: '/market/cChannelInfo/illegalCallTask/query',
                            method: "post",
                            headers: {
                                "Content-Type": "application/json",
                            },
                            data: {
                                taskId: _this.$route.query.id.split(",")[1]
                            },
                        }).then((res) => {
                            _this.fileInfot.typename = res.data.tempProgress;
                            if (res.data.tempProgress == '100%') {
                                _this.fileInfot.typename = '导入';
                                clearInterval(t);
                                _this.getList({}, _this.pageSize);
                            }
                        });
                    }, 500)
                }
            },
            dialogCliall() {
                let param = new FormData();
                param.append("missionId", this.$route.query.id.split(",")[2]);
                this.$http({
                    url: '/market/cChannelInfo/cIllegalCallTask/excelData',
                    method: "post",
                    responseType: 'blob',
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: param,
                }).then((response) => {
                    if (window.navigator && window.navigator.msSaveOrOpenBlob) {
                        let blob = new Blob([response.data], {
                            type: response.data.type
                        });
                        window.navigator.msSaveOrOpenBlob(blob, '汇总数据.xlsx');
                    } else {
                        /* 火狐谷歌的文件下载方式 */
                        var blob = new Blob([response.data])
                        var downloadElement = document.createElement('a')
                        var href = window.URL.createObjectURL(blob);
                        downloadElement.href = href;
                        downloadElement.download = '汇总数据.xlsx';
                        document.body.appendChild(downloadElement);
                        downloadElement.click();
                        document.body.removeChild(downloadElement);
                        window.URL.revokeObjectURL(href);
                    }
                });
            },
            xiazai() {
            let param = new FormData();
            param.append("tempId", this.$route.query.id.split(",")[0]);
                this.$http({
                    url: '/market/cChannelInfo/cIllegalCallTemp/downLoadTemp',
                    method: "post",
                    responseType: 'blob',
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: param,
                }).then((response) => {
                    if (window.navigator && window.navigator.msSaveOrOpenBlob) {
                        let blob = new Blob([response.data], {
                            type: response.data.type
                        });
                        window.navigator.msSaveOrOpenBlob(blob, '模板.csv');
                    } else {
                        /* 火狐谷歌的文件下载方式 */
                        var blob = new Blob([response.data])
                        var downloadElement = document.createElement('a')
                        var href = window.URL.createObjectURL(blob);
                        downloadElement.href = href;
                        downloadElement.download = '模板.csv';
                        document.body.appendChild(downloadElement);
                        downloadElement.click();
                        document.body.removeChild(downloadElement);
                        window.URL.revokeObjectURL(href);
                    }
                });
            },
            ssshenpi(v) {
                let url = '';
                if (v == 3) {
                    url = '/market/cChannelInfo/cIllegalCallTask/submmitApprovalPass';
                } else if (v == 4) {
                    url = '/market/cChannelInfo/cIllegalCallTask/submmitApprovalReject';
                }
                this.$http({
                    url: url,
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        missionId: this.$route.query.id.split(",")[2]
                    },
                }).then((res) => {
                    if (res.data.result === 1) {
                        this.$message({
                            message: res.data.desc,
                            type: 'error'
                        });
                    } else {
                        this.$message({
                            message: '成功',
                            type: 'success'
                        });
                    }
                    this.getList({}, this.pageSize);
                });
            },
            delinfo(v) {
                this.$http({
                    url: "/market/cChannelInfo/cIllegalCallTaskRow/del",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        rowId: v.rowId
                    },
                }).then((res) => {
                    if (res.data.result === 1) {
                        this.$message({
                            message: res.data.desc,
                            type: 'error'
                        });
                    } else {
                        this.$message({
                            message: '成功',
                            type: 'success'
                        });
                    }
                    this.getList({}, this.pageSize);
                });
            },
            checkrow(v) {
                this.fileInfoup.relId = v.rowId;
            },
            songshen(v) {
                this.$http({
                    url: "/market/cChannelInfo/cIllegalCallTask/submmitApproval",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        missionId: this.$route.query.id.split(",")[2],
                        receiverNo: this.treeListonly.leaderAuditNo,
                        receiverName: this.treeListonly.leaderAuditName
                    },
                }).then((res) => {
                    this.shenpists = false;
                    if (res.data.result === 1) {
                        this.$message({
                            message: res.data.desc,
                            type: 'error'
                        });
                    } else {
                        this.$message({
                            message: '成功',
                            type: 'success'
                        });
                    }
                    this.getList({}, this.pageSize);
                });
            },
            guidangsts() {
                this.$http({
                    url: "/market/cChannelInfo/cIllegalCallTask/checkData",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        missionId: this.$route.query.id.split(",")[2]
                    },
                }).then((res) => {
                    if(res.data.desc == 'true'){
                        this.jumpinfo()
                    }else{
                        this.centerDialogback = true;
                    }
                });
            },
            tijiaosts() {
                let sts = this.$route.query.id.split(",")[6];
                if(sts == '114'||sts == '124'||sts == '134'){
                    this.messTit = '工单未完成审批,是否将数据提交至上级？'
                }else{
                    this.messTit = '是否将数据提交至上级？'
                }
                this.centerDialogVisible = true;
            },
            tijiao() {
                this.$http({
                    url: "/market/cChannelInfo/cIllegalCallTask/submmitData",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        missionId: this.$route.query.id.split(",")[2]
                    },
                }).then((res) => {
                    if (res.data.result === 1) {
                        this.$message({
                            message: res.data.desc,
                            type: 'error'
                        });
                    } else {
                        this.$message({
                            message: '成功',
                            type: 'success'
                        });
                    }
                    this.getList({}, this.pageSize);
                });
            },
            tianbao(v) {
                let x = {}
                for (let item in v) {
                    if (item != 'rowId') {
                        x[item] = v[item]
                    }
                }
                this.$http({
                    url: "/market/cChannelInfo/cIllegalCallTaskRow/update",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        rowId: v.rowId,
                        fillContent: JSON.stringify(x)
                    },
                }).then((res) => {
                    if (res.data.result === 1) {
                        this.$message({
                            message: res.data.desc,
                            type: 'error'
                        });
                    } else {
                        this.$message({
                            message: '成功',
                            type: 'success'
                        });
                    }
                    this.getList({}, this.pageSize);
                });
            },
            handleSelectionChange(v) {
                this.rowIdList = [];
                for (let i = 0; i < v.length; i++) {
                    this.rowIdList.push(v[i].rowId)
                }
            },
            //流程跟踪
            procedure() {
                this.$http({
                    url: "/market/cChannelInfo/cIllegalCallTask/queryTraceList",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        taskId: this.$route.query.id.split(",")[1]
                    },
                }).then((res) => {
                    this.procests = true;
                    this.proceList = res.data;
                });
            },
            //确认下发
            dialogCli(v) {
                if (v == 1) {
                    this.infolist = {};
                    this.treeListonly = {};
                    this.downinfosts = false;
                } else if (v == 2) {
                    let _this = this;
                    let params = {};

                    params.taskId = this.$route.query.id.split(",")[1];
                    params.groupLevel = this.$route.query.id.split(",")[3];
                    this.infolist.validTime ? params.validTime = this.$formatDate(this.infolist.validTime,
                        "YYYY-MM-DD") : '';
                    params.missionId = this.$route.query.id.split(",")[2];
                    params.missionName = this.$route.query.id.split(",")[4];
                    let url = "/market/cChannelInfo/cIllegalCallTask/dispatchAllData";
                    if (this.$route.query.id.split(",")[3] == 3) {
                        url = '/market/cChannelInfo/cIllegalCallTask/dispatchStaff';
                        params.receiverNo = this.treeListonlyl.leaderAuditNo;
                        params.receiverName = this.treeListonlyl.leaderAuditName;
                        params.groupName = this.treeListonlyl.displayname;
                        params.groupId = this.treeListonlyl.groupId;
                        params.rowIdList = this.rowIdList;
                        for (let i = 0; i < this.rowIdListls.length; i++) {
                            params.rowIdList.push(this.rowIdListls[i])
                        }
                    }

                    let receiveList = [];
                    for (let i = 0; i < this.typeOptions.length; i++) {
                        if(this.typeOptions[i].groupId){
                            receiveList.push({
                                receiverNo: this.typeOptions[i].leaderAuditNo,
                                receiverName: this.typeOptions[i].leaderAuditName,
                                groupName: this.typeOptions[i].displayname,
                                groupId: this.typeOptions[i].groupId,
                                areaName: this.typeOptions[i].fillContent,
                            })
                        }
                    }
                    params.receiveList = receiveList;
                    console.log(params)
                    this.$http({
                        url: url,
                        method: "post",
                        headers: {
                            "Content-Type": "application/json",
                        },
                        data: params,
                    }).then((res) => {
                        if (res.data.result === 1) {
                            this.$message({
                                message: res.data.desc,
                                type: 'error'
                            });
                        } else {
                            this.$message({
                                message: '成功',
                                type: 'success'
                            });
                            _this.infolist = {};
                            _this.treeListonly = {};
                            _this.downinfosts = false;
                            _this.getList({}, _this.pageSize);
                        }
                    });
                }
            },
            deletes() {
                this.treeListonly = {};
                this.closeList = !this.closeList;
            },
            treeCheckonly(v) {
                this.treeListonly = v;
            },
            treeCheckonlyl(v) {
                this.treeListonlyl = v;
                this.typeOptions[this.numl].rowId = v.leaderAuditName;
                this.typeOptions[this.numl].leaderAuditName = v.leaderAuditName;
                this.typeOptions[this.numl].leaderAuditNo = v.leaderAuditNo;
                this.typeOptions[this.numl].groupId = v.groupId;
                this.typeOptions[this.numl].displayname = v.displayname;
                this.leadersts = false;
            },
            //数据下发
            datadown() {
                this.$http({
                    url: "/market/cChannelInfo/cIllegalCallTask/choseData",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        missionId: this.$route.query.id.split(",")[2]
                    },
                }).then((res) => {
                    this.downinfosts = true;
                    this.typeOptions = res.data.body;
                });
            },
            jumpinfo() {
                this.$http({
                    url: "/market/cChannelInfo/cIllegalCallTask/endTask",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        missionId: this.$route.query.id.split(",")[2]
                    },
                }).then((res) => {
                    if (res.data.result === 1) {
                        this.$message({
                            message: res.data.desc,
                            type: 'error'
                        });
                    } else {
                        this.$message({
                            message: '成功',
                            type: 'success'
                        });
                    }
                    this.$router.push({
                        path: "/punishInfosumc",
                    });
                    this.setabList("已完成", "/punishInfosumc");
                });
            },
            setabList(n, p) {
                let params = {
                    children: "",
                    name: n,
                    rountPath: p,
                    target: "_self",
                };
                for (let i = 0; i < this.$store.state.tabList.length; i++) {
                    if (this.$store.state.tabList[i].name === params.name) {
                        this.$store.state.tabList[i] = params;
                    }
                }
                let set = new Set([...this.$store.state.tabList, params]);
                set.add(params);
                this.$store.commit("setDefaultActive", params.rountPath);
                this.$store.commit("setTabList", Array.from(set));
            },
            //获取列表
            getList(v, n) {
                this.pageSize = n;
                let _this = this;
                this.loading = true;
                this.tableData = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}];
                // v.sts = 0;
                v.missionId = this.$route.query.id.split(",")[2];
                let url = '';
                if (this.stssp == '033' || this.stssp == '023' || this.stssp == '013') {
                    url = '/market/cChannelInfo/cIllegalCallTaskRow/queryApprovalListPage'
                    v.parentMissionId = this.$route.query.id.split(",")[5];
                } else {
                    url = "/market/cChannelInfo/cIllegalCallTaskRow/queryPage"
                }
                this.$http({
                    url: url,
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                        "page": '{"pageNo":"' + n + '","pageSize":"10"}'
                    },
                    data: v,
                }).then((res) => {
                    this.tableData = [];
                    res.data.data.forEach(item => {
                        let x = JSON.parse(item.fillContent);
                        x.rowId = item.rowId;
                        this.tableData.push(x);
                    })
                    this.total = res.data.totalRecord;
                    this.loading = false;
                });
            },
            // 分页
            currchange(v) {
                this.pageSize = v;
                for (let i = 0; i < this.rowIdList.length; i++) {
                    this.rowIdListls.push(this.rowIdList[i])
                }
                this.getList(this.params, this.pageSize);
            },
            //功能栏
            iconCli(v) {
                if (v === 1) {
                    this.getList(this.params, this.pageSize);
                }
                if (v === 2) {
                    this.fullscreen = !this.fullscreen
                }
            },
            getUser() {
                this.userInfo = JSON.parse(window.sessionStorage.userInfo);
                this.fileInfot.taskId = this.$route.query.id.split(",")[1];
                this.fileInfot.tempId = this.$route.query.id.split(",")[0];
                this.level = this.$route.query.id.split(",")[3];
                this.stssp = this.$route.query.id.split(",")[this.$route.query.id.split(",").length - 1];
                this.$http({
                    url: "/market/cChannelInfo/illegalCallTemp/query",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {
                        tempId: this.$route.query.id.split(",")[0]
                    },
                }).then((res) => {
                    this.tableDatacs = JSON.parse(res.data.tempHead)
                    let _this = this;
                    this.getList({}, 1);
                });
                this.$http({
                    url: "/sysmgr/csysuserinfo/queryUserInfoByLoginNo",
                    method: "post",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: {},
                }).then((res) => {
                    this.companyFlag = res.data.companyFlag
                });
            }
        },
        mounted() {
            this.getUser();
        },
        created() {

        }
    }
</script>
<style scoped lang="scss">

    .leadecho{
        border: 1px solid #ddd;
        padding: 20px;
        div{
            margin-bottom: 5px;
            background: #f9f9f9;
            padding: 10px;
        }
        span{
            width: 40%;
            display: inline-block;
            text-align: center;
        }
        span:last-child{
            float: right;
        }
        p{
            width: 20%;
            text-align: center;
            display: inline-block;
            color: #007AFF;
            cursor: pointer;
        }

    }
    .onetab {
        margin-bottom: 20px;
        padding: 0 20px;
    }

    .titbox {
        div {
            float: right;

            i {
                font-size: 22px;
                margin-left: 20px;
                cursor: pointer;
            }
        }
    }

    .tabbox {
        margin-top: 15px;
    }

    .pageBox {
        text-align: right;
        margin-top: 10px;
    }

    .info-line {
        width: 100%;
        display: block;
        padding-left: 20px;

        div {
            width: 50%;
            display: inline-block;
        }

        span {
            width: 80px;
            display: inline-block;
            text-align: left;

            i {
                color: red;
                display: inline-block;
                padding-right: 5px;
            }
        }

        .el-select,
        .el-input {
            width: calc(100% - 100px);
        }
    }

    .online {
        width: 100%;

        .el-select {
            width: calc(100% - 100px);
        }

        span {
            vertical-align: top;
        }

        .el-textarea {
            width: calc(100% - 100px);
        }

        .tree {
            width: calc(50% - 60px);
            display: inline-block;
            margin-right: 20px;
            height: 300px;
            overflow-y: scroll;

            .el-icon-error {
                float: right;
                font-size: 20px;
                margin-top: 9px;
                cursor: pointer;
            }
        }

        .treeUser {
            margin: 0;
            border: 1px solid #ddd;

            p {
                background: #f4f4f4;
                padding: 0 20px;
                margin-bottom: 5px;
            }
        }

        .treeUserb {
            width: calc(100% - 100px);
            border: 1px solid #ddd;
            background: #f4f4f4;
            border-radius: 3px;
            height: auto;
            overflow: hidden;

            p {
                display: inline-block;
                padding: 0 20px;
                margin-bottom: 5px;
            }
        }
    }
</style>
