<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 = [];
}
},