| | |
| | | <template> |
| | | <div> |
| | | <div style="margin: 10px 0;text-align: right"> |
| | | <el-button size="small" type="primary" @click="getList">刷新</el-button> |
| | | <!-- <el-button size="small" type="primary" @click="getList">刷新</el-button>--> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true">受控申请</el-button> |
| | | </div> |
| | | <el-table :data="tableData" border height="calc(100vh - 18em)"> |
| | |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="downloadFile(scope.row.fileSystemName)">下载</el-button> |
| | | <el-button type="text" size="small" style="color: red;" |
| | | @click="deleteHomeworkGuidebook(scope.row)">删除</el-button> |
| | | <el-button type="text" size="small" @click="instructionEditFun(scope.row)">编辑</el-button> |
| | | <el-button type="text" size="small" @click="approval(scope.row)">审批</el-button> |
| | | @click="deleteHomeworkGuidebook(scope.row)" :disabled="scope.row.status === true">删除</el-button> |
| | | <el-button type="text" size="small" @click="instructionEditFun(scope.row)" :disabled="scope.row.status === true">编辑</el-button> |
| | | <el-button type="text" size="small" @click="approval(scope.row)" :disabled="scope.row.status === true">审批</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }); |
| | | }, |
| | | downloadFile(fileName) { |
| | | let state = /\.(jpg|jpeg|png|gif)$/i.test(fileName) |
| | | if (state) { |
| | | let url = this.javaApi + '/img/' + fileName; |
| | | fileDownload.downloadIamge(url, fileName) |
| | | } else { |
| | | const url = this.javaApi + '/word/' + fileName |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = fileName; |
| | | link.click(); |
| | | this.$message.success('下载成功') |
| | | } |
| | | this.$download.saveAs(fileName, fileName) |
| | | }, |
| | | instructionEditFun(row) { |
| | | this.dialogVisible = true |