|
@@ -4,20 +4,11 @@
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
<span>文件名称:</span>
|
|
<span>文件名称:</span>
|
|
- <el-input
|
|
|
|
- v-model="listQuery.fileTitle"
|
|
|
|
- placeholder="文件名称"
|
|
|
|
- @keyup.enter.native="getList"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input v-model="listQuery.fileTitle" placeholder="文件名称" @keyup.enter.native="getList" />
|
|
</div>
|
|
</div>
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
<span>审核状态:</span>
|
|
<span>审核状态:</span>
|
|
- <el-select
|
|
|
|
- v-model="listQuery.auditStatus"
|
|
|
|
- placeholder="审核状态"
|
|
|
|
- clearable
|
|
|
|
- @change="getList"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-select v-model="listQuery.auditStatus" placeholder="审核状态" clearable @change="getList">
|
|
<el-option label="全部" value="" />
|
|
<el-option label="全部" value="" />
|
|
<el-option label="待审核" :value="2" />
|
|
<el-option label="待审核" :value="2" />
|
|
<el-option label="审核通过" :value="1" />
|
|
<el-option label="审核通过" :value="1" />
|
|
@@ -48,40 +39,41 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="审核时间" width="160px" align="center">
|
|
<el-table-column label="审核时间" width="160px" align="center">
|
|
- <template slot-scope="{row}">
|
|
|
|
- <span v-if="row.auditStatus!==2">{{ row.auditTime | formatTime }}</span>
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <span v-if="row.auditStatus !== 2">{{ row.auditTime | formatTime }}</span>
|
|
<span v-else>—</span>
|
|
<span v-else>—</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="审核人" align="center" width="280px">
|
|
<el-table-column label="审核人" align="center" width="280px">
|
|
- <template slot-scope="{row}">
|
|
|
|
- <span v-if="row.auditStatus!==2">{{ row.auditBy }}</span>
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <span v-if="row.auditStatus !== 2">{{ row.auditBy }}</span>
|
|
<span v-else>—</span>
|
|
<span v-else>—</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="150px" align="center">
|
|
<el-table-column label="操作" width="150px" align="center">
|
|
- <template slot-scope="{row}">
|
|
|
|
- <el-button
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <!-- <el-button
|
|
v-if="row.auditStatus===2"
|
|
v-if="row.auditStatus===2"
|
|
type="primary"
|
|
type="primary"
|
|
size="mini"
|
|
size="mini"
|
|
@click="handleShowDialog(row)"
|
|
@click="handleShowDialog(row)"
|
|
>审核</el-button>
|
|
>审核</el-button>
|
|
- <span v-else class="status success el-icon-check"> 已审核</span>
|
|
|
|
|
|
+ <span v-else class="status success el-icon-check"> 已审核</span> -->
|
|
|
|
+ <audit-button-group type="audit" :is-dot="true" :margin-right="false" @click="onClick(row, $event)" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<!-- 表格区域END -->
|
|
<!-- 表格区域END -->
|
|
<!-- 页码 -->
|
|
<!-- 页码 -->
|
|
- <pagination :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList(listQuery)" />
|
|
|
|
|
|
+ <pagination
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="listQuery.pageNum"
|
|
|
|
+ :limit.sync="listQuery.pageSize"
|
|
|
|
+ @pagination="getList(listQuery)"
|
|
|
|
+ />
|
|
<!-- 视频预览对话框 -->
|
|
<!-- 视频预览对话框 -->
|
|
- <el-dialog
|
|
|
|
- title="视频审核"
|
|
|
|
- :visible.sync="dialogVisible"
|
|
|
|
- width="40%"
|
|
|
|
- @closed="dialogColosed"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-dialog :title="editTitle" :visible.sync="dialogVisible" width="40%" @closed="dialogColosed">
|
|
<el-form ref="formRef" :model="dialogData" label-width="65px" :rules="dialogFormRules">
|
|
<el-form ref="formRef" :model="dialogData" label-width="65px" :rules="dialogFormRules">
|
|
<el-form-item label="标题:">
|
|
<el-form-item label="标题:">
|
|
{{ current.fileTitle }}
|
|
{{ current.fileTitle }}
|
|
@@ -90,20 +82,24 @@
|
|
<img src="@/assets/img/pdf_cover.png" alt="文件封面" width="60" height="60">
|
|
<img src="@/assets/img/pdf_cover.png" alt="文件封面" width="60" height="60">
|
|
<span class="preview" @click.prevent="handlePreviewFile">预览</span>
|
|
<span class="preview" @click.prevent="handlePreviewFile">预览</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="审核:">
|
|
|
|
- <el-radio-group v-model="dialogData.auditStatus">
|
|
|
|
- <el-radio :label="1">通过</el-radio>
|
|
|
|
- <el-radio :label="0">不通过</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item v-if="dialogData.auditStatus === 0" label="原因:" prop="invalidReason">
|
|
|
|
- <el-input v-model="dialogData.invalidReason" type="textarea" placeholder="请说明原因" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <template v-if="type === 'audit'">
|
|
|
|
+ <el-form-item label="审核:">
|
|
|
|
+ <el-radio-group v-model="dialogData.auditStatus">
|
|
|
|
+ <el-radio :label="1">通过</el-radio>
|
|
|
|
+ <el-radio :label="0">不通过</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-if="dialogData.auditStatus === 0" label="原因:" prop="invalidReason">
|
|
|
|
+ <el-input v-model="dialogData.invalidReason" type="textarea" placeholder="请说明原因" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
</el-form>
|
|
</el-form>
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
- <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
|
- <el-button type="primary" @click="handleAuditStatus">提 交</el-button>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <template v-if="type === 'audit'">
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="handleAuditStatus">提 交</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!-- 视频预览对话框END -->
|
|
<!-- 视频预览对话框END -->
|
|
</div>
|
|
</div>
|
|
@@ -117,6 +113,7 @@ import { mapGetters } from 'vuex'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ type: 'review',
|
|
dialogVisible: false, // 文件审核dialog是否显示
|
|
dialogVisible: false, // 文件审核dialog是否显示
|
|
listLoading: false, // 列表加载
|
|
listLoading: false, // 列表加载
|
|
total: 0, // 列表数据条数
|
|
total: 0, // 列表数据条数
|
|
@@ -148,18 +145,46 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(['authUserId'])
|
|
|
|
|
|
+ ...mapGetters(['authUserId']),
|
|
|
|
+ editTitle() {
|
|
|
|
+ return this.type === 'review' ? '查看' : '审核'
|
|
|
|
+ }
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.listQuery.authUserId = this.$route.query.authUserId
|
|
this.listQuery.authUserId = this.$route.query.authUserId
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 按钮组点击事件
|
|
|
|
+ onClick(row, type) {
|
|
|
|
+ const actions = {
|
|
|
|
+ review: this.onReview,
|
|
|
|
+ result: this.onResult,
|
|
|
|
+ audit: this.onAudit
|
|
|
|
+ }
|
|
|
|
+ actions[type](row)
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 预览
|
|
|
|
+ onReview(row) {
|
|
|
|
+ console.log('预览')
|
|
|
|
+ this.type = 'review'
|
|
|
|
+ this.handleShowDialog(row)
|
|
|
|
+ },
|
|
|
|
+ // 驳回
|
|
|
|
+ onResult(row) {
|
|
|
|
+ console.log('驳回')
|
|
|
|
+ },
|
|
|
|
+ // 审核
|
|
|
|
+ onAudit(row) {
|
|
|
|
+ this.type = 'audit'
|
|
|
|
+ this.handleShowDialog(row)
|
|
|
|
+ },
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
getList() {
|
|
getList() {
|
|
this.listLoading = true
|
|
this.listLoading = true
|
|
getFileList(this.listQuery)
|
|
getFileList(this.listQuery)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
if (res.code !== 0) return
|
|
if (res.code !== 0) return
|
|
this.list = res.data.list
|
|
this.list = res.data.list
|
|
this.total = res.data.total
|
|
this.total = res.data.total
|
|
@@ -188,21 +213,20 @@ export default {
|
|
},
|
|
},
|
|
// 审核操作
|
|
// 审核操作
|
|
handleAuditStatus() {
|
|
handleAuditStatus() {
|
|
- this.$refs.formRef.validate(valid => {
|
|
|
|
|
|
+ this.$refs.formRef.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.dialogData.auditBy = this.authUserId
|
|
this.dialogData.auditBy = this.authUserId
|
|
- auditfile(this.dialogData)
|
|
|
|
- .then(res => {
|
|
|
|
- console.log(res)
|
|
|
|
- if (res.code !== 0) return
|
|
|
|
- this.$message({
|
|
|
|
- message: res.data,
|
|
|
|
- type: 'success',
|
|
|
|
- duration: 1000
|
|
|
|
- })
|
|
|
|
- this.dialogVisible = false
|
|
|
|
- this.getList()
|
|
|
|
|
|
+ auditfile(this.dialogData).then((res) => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (res.code !== 0) return
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.data,
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 1000
|
|
})
|
|
})
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -221,10 +245,10 @@ export default {
|
|
.el-table .cell {
|
|
.el-table .cell {
|
|
overflow: visible;
|
|
overflow: visible;
|
|
}
|
|
}
|
|
-.el-badge{
|
|
|
|
|
|
+.el-badge {
|
|
margin: 0 6px;
|
|
margin: 0 6px;
|
|
}
|
|
}
|
|
-.preview{
|
|
|
|
|
|
+.preview {
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
margin-left: 5px;
|
|
margin-left: 5px;
|
|
color: #0eaae7;
|
|
color: #0eaae7;
|