123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <template>
- <div class="hui-flex hui-content">
- <div class="hui-flex-box hui-table">
- <el-table :data="tableData" row-key="id" border height="100%">
- <el-table-column label="序号" width="50">
- <template slot-scope="scope">
- <div style="text-align: center;">{{scope.$index + 1}}</div>
- </template>
- </el-table-column>
- <el-table-column prop="requestUserName" label="姓名"></el-table-column>
- <el-table-column label="使用类型">
- <template slot-scope="scope">
- <span>
- <span v-if="scope.row.documentId">文档</span>
- </span>
- </template>
- </el-table-column>
- <el-table-column label="申请状态">
- <template slot-scope="scope">
- <div class="hui-table-tag">
- <div class="hui-tag hui-tag-info" v-if="scope.row.status == 0">待审核</div>
- <div class="hui-tag hui-tag-success" v-else>通过</div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作">
- <template slot-scope="scope">
- <div class="hui-table-operation">
- <span v-if="scope.row.documentId" class="table-operation"
- @click="showDocument(scope.row.documentId)">
- 查看文档
- </span>
- <span class="table-operation" @click="pass(scope.row)" v-if="scope.row.status == 0">
- 通过
- </span>
- </div>
- </template>
- </el-table-column>
- <template slot="empty">
- <empty description="暂无数据"></empty>
- </template>
- </el-table>
- </div>
- <div class="hui-content-pagination" style="padding:0 20px 10px 20px">
- <el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
- @current-change="currentChange">
- </el-pagination>
- </div>
- <el-dialog :close-on-click-modal="false" title="查看文档" :visible.sync="documentShow" class="document-dialog"
- width="80%" :append-to-body="true">
- <editor :documentId="documentId" v-if="documentShow" @close="documentShow = false" type="look">
- </editor>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- getSealRequestListByQuery,
- requestUseSeal
- } from '@/httpApi/organization'
- import editor from '@/components/document/editor'
- export default {
- props: ['detailId'],
- data() {
- return {
- tableData: [],
- currPage: 1,
- pageSize: 10,
- totalCount: 0,
- documentShow: false,
- documentId: ''
- }
- },
- created() {
- this.init();
- },
- components: {
- editor
- },
- methods: {
- init() {
- let postData = {
- currPage: this.currPage,
- pageSize: this.pageSize,
- sealId: this.detailId
- }
- getSealRequestListByQuery(postData).then(res => {
- if (res.state) {
- this.tableData = res.data.dataList;
- this.totalCount = res.data.totalCount;
- }
- })
- },
- currentChange(currPage) {
- this.currPage = currPage;
- this.init();
- },
- showDocument(id) {
- this.documentId = id;
- this.documentShow = true;
- },
- pass(item) {
- this.$confirm('确定通过该印章申请?', () => {
- this.$loading.open();
- requestUseSeal(item.id, {
- documentId: item.documentId,
- requestId: item.id,
- sealId: item.sealId,
- usageUserId: this.$store.getters.user.userId,
- usageUserName: this.$store.getters.user.name
- }).then(res => {
- if (res.state) {
- this.$message.success('操作成功');
- this.init();
- }
- this.$loading.close();
- });
- });
- },
- },
- }
- </script>
- <style>
- </style>
|