<!DOCTYPE html>
<div class="interaction">
    <ks-title title="问题互动" />
    <div class="interaction-top">
        <span>提问总数：<i>{{data.questions_count}}</i>个</span>
        <span>已解决：<i>{{data.solve_count}}</i>个</span>
        <span>解决中：<i>{{data.solveing_count}}</i>个</span>
        <span>被推荐：<i>{{data.recommend_count}}</i>个</span>
        <span>被关闭：<i>{{data.close_count}}</i>个</span>
    </div>
    <!-- 排序和搜索 -->
    <div class="consultation-sort">
        <el-input placeholder="请输入想要搜索的内容" size="medium" v-model="key" @change="change">
            <i slot="suffix" class="el-input__icon el-icon-search" @click="change"></i>
        </el-input>
        <el-select v-model="type" placeholder="请选择" size="medium" @change="change">
            <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
        </el-select>
        <span>类型：</span>
        <el-select v-model="solve" placeholder="请选择" size="medium" @change="change" v-if="type == 10000">
            <el-option v-for="item in solveList" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
        </el-select>
        <span v-if="type == 10000">状态：</span>
    </div>
    <div class="interaction-title">
        <el-row>
            <el-col :span="3" align="middle"><span>选择</span></el-col>
            <el-col :span="2" style="text-align: left" align="middle"><span>类型</span></el-col>
            <el-col :span="type == 10000 ? 8 : 13" style="text-align: left" align="middle"><span>问题</span></el-col>
            <el-col :span="2" align="middle"  v-if="type == 10000"><span>悬赏分</span></el-col>
            <el-col :span="3" align="middle"><span>是否审核</span></el-col>
            <el-col :span="3" v-if="type == 10000" align="middle"><span>状态</span></el-col>
            <el-col :span="3" align="middle"><span>操作</span></el-col>
        </el-row>
    </div>
    <div class="interaction-list">
        <el-row type="flex" v-for="(item,i) in askTopList" :key="i">
            <el-col :span="3" align="middle">
                <el-checkbox-group v-model="checkList" @change="change">
                    <el-checkbox :label="item.topicid" :key="item.topicid" :disabled="item.issolve == 1"></el-checkbox>
                </el-checkbox-group>
            </el-col>
            <el-col :span="2" align="middle" style="text-align: left"> <span>{{item.flag_str}}</span> </el-col>
            <el-col :span="type == 10000 ? 8 : 13" align="middle" style="text-align: left">
                <div style="overflow: hidden;cursor: pointer;" v-html="item.content" @click="open(item.view_url)"></div>
                <div class="interaction-list__word">
                    <span>提问时间：{{item.adddate}}</span>
                    <span>{{item.flag_str == '问答'? '分类':'名称'}}：{{item.title}}</span>
                </div>
            </el-col>
            <el-col :span="2" align="middle"  v-if="type == 10000"> <span>{{item.reward}}</span> </el-col>
            <el-col :span="3" align="middle"> <span :style="{color:item.verify == 1 ? '#606367' : '#E91C35'}">{{item.verify == 1 ? '已审核' : '未审核'}}</span> </el-col>
            <el-col :span="3" align="middle" v-if="type == 10000"> <span :style="{color:item.issolve == 1 ? '#2BC152' : '#E91C35'}">{{item.issolve == 1 ? '已解决' : '未解决'}}</span> </el-col>
            <el-col :span="3" align="middle"> <span style="cursor: pointer;" @click="deleteUserConsultation(item.topicid)">删除</span> </el-col>
        </el-row>
        <div class="interaction-list__pldelete" v-if="askTopList.length > 0">
            <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
            <el-button size="medium" @click="deleteUserConsultation(checkListStr)" v-if='checkList.length > 0'>批量删除</el-button>
            <el-button size="medium" disabled v-else>批量删除</el-button>
        </div>
        <el-pagination style="text-align: center;background: #fff;margin-top:20px;" background layout="prev, pager, next" :current-page="currentPage" :total="pageCount" @current-change="getUserAskTopList" v-if="pageCount > 0" />
        <ks-empty msg="该分类下暂无内容" v-else />
    </div>
</div>