|
@@ -12,7 +12,23 @@
|
|
|
type="text"
|
|
|
icon="icon icon-upload-act"
|
|
|
@click="toUpload(scope.row)"
|
|
|
- title="上传"
|
|
|
+ title="上传登记表"
|
|
|
+ ></el-button>
|
|
|
+ <el-button
|
|
|
+ class="btn-table-icon"
|
|
|
+ type="text"
|
|
|
+ icon="icon icon-circle-right"
|
|
|
+ @click="toView(scope.row.path)"
|
|
|
+ title="预览登记表"
|
|
|
+ v-if="scope.row.id"
|
|
|
+ ></el-button>
|
|
|
+ <el-button
|
|
|
+ class="btn-table-icon"
|
|
|
+ type="text"
|
|
|
+ icon="icon icon-delete"
|
|
|
+ @click="toDelete(scope.row)"
|
|
|
+ title="删除登记表"
|
|
|
+ v-if="scope.row.id"
|
|
|
></el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -41,7 +57,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { checkinExamList, saveCheckinExam } from "../api";
|
|
|
+import { checkinExamList, saveCheckinExam, deleteCheckinExam } from "../api";
|
|
|
import UploadFileDialog from "@/components/UploadFileDialog";
|
|
|
|
|
|
export default {
|
|
@@ -63,7 +79,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async getList() {
|
|
|
- const data = await checkinExamList(this.schoolId);
|
|
|
+ const datas = {
|
|
|
+ schoolId: this.schoolId,
|
|
|
+ pageNumber: this.current,
|
|
|
+ pageSize: this.size
|
|
|
+ };
|
|
|
+ const data = await checkinExamList(datas);
|
|
|
this.dataList = data.records;
|
|
|
this.total = data.total;
|
|
|
},
|
|
@@ -80,6 +101,22 @@ export default {
|
|
|
this.$refs.UploadFileDialog.open();
|
|
|
console.log(row);
|
|
|
},
|
|
|
+ toDelete(row) {
|
|
|
+ this.$confirm("确定要删除当前学校登记表吗?", "删除警告", {
|
|
|
+ cancelButtonClass: "el-button--danger is-plain",
|
|
|
+ confirmButtonClass: "el-button--primary",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ await deleteCheckinExam(row.id);
|
|
|
+ this.$message.success("删除成功!");
|
|
|
+ this.deletePageLastItem();
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ toView(path) {
|
|
|
+ window.open(path);
|
|
|
+ },
|
|
|
async uploadConfirm(attachment) {
|
|
|
const datas = {
|
|
|
attachmentId: attachment.attachmentId,
|