<el-table :data="pushMessageData" :height="tableStyle.height" border style="width: 100%;" @cell-click="clickTable" ref="refTable" @selection-change="handleSelectionChange"
@expand-change="expandSelect">
<el-table-column prop="info_id" label="信息推送主键编号ID" align="center" v-if="1==2"></el-table-column>
<el-table-column fixed type="index" label="序号" header-align="center" width="80" align="center">
</el-table-column>
<el-table-column type="expand">
<template slot-scope="scope">
<span>推送内容:</span>
<quill-editor title="推送内容" v-model="scope.row.pushcontent" style="width:90%;"
ref="myquilleditor"
:options="editorOptionEdit" @blur="onEditorBlur($event)" @focus="onEditorFocusReadOnly($event)"
@change="onEditorChange($event)">
</quill-editor>
<span v-if="scope.row.status=='2'">备注信息:</span>
<quill-editor title="备注信息" v-if="scope.row.status=='2'" v-model="scope.row.remarks" style="width:90%;"
ref="myquilleditor"
:options="editorOptionEdit" @blur="onEditorBlur($event)" @focus="onEditorFocusReadOnly($event)"
@change="onEditorChange($event)">
</quill-editor>
</template>
</el-table-column>
<el-table-column prop="title" label="标题" style="width:10%" align="center">
</el-table-column>
<el-table-column prop="pushuserid" label="推送人" width="100" align="center"></el-table-column>
<el-table-column prop="pushtime" label="推送时间" style="width:10%" align="center">
</el-table-column>
<el-table-column prop="auditor" label="审批人" width="100" align="center"></el-table-column>
<el-table-column prop="approvaltime" label="审批时间" style="width:10%" align="center">
</el-table-column>
<el-table-column label="状态" prop="status">
<template slot-scope="scope">
<el-tag v-if="scope.row.status=='0'" type="warning" style="border-radius: 20px">未审批</el-tag>
<el-tag v-if="scope.row.status=='1'" type="success" style="border-radius: 20px">已通过</el-tag>
<el-tag v-if="scope.row.status=='2'" type="danger" style="border-radius: 20px">未通过</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button @click="editOrSelPushMessage(scope.row,1)" type="text" size="small">查看详情</el-button>
<!--<el-button type="text" v-if="scope.row.status!='1'" @click="DeleteMessageById(scope.row)" size="small">删除</el-button>
<el-button type="text" v-if="scope.row.status!='1'" @click="editOrSelPushMessage(scope.row,0)" size="small">编辑</el-button>-->
<el-button type="text" v-if="scope.row.status=='0'" @click="approvalPass(scope.row)" size="small">审批通过</el-button>
<el-button type="text" v-if="scope.row.status=='0'" @click="editOrSelPushMessage(scope.row,2)" size="small">审批拒绝</el-button>
</template>
</el-table-column>
</el-table>
clickTable: function (row, column, cell, event) {//展开事件日志列表
if (cell.cellIndex != 3 && cell.cellIndex != 10) {
this.$refs.refTable.toggleRowExpansion(row);
}
},
handleSelectionChange: function (val) {
console.log(val)
},
expandSelect: function (row, expandedRows) {
var that = this
if (expandedRows.length > 1) {
that.expands = []
if (row) {
that.expands.push(row);
}
this.$refs.refTable.toggleRowExpansion(expandedRows[0]);
} else {
that.expands = [];
}
},