|
@@ -0,0 +1,245 @@
|
|
|
+<template>
|
|
|
+ <!-- <object
|
|
|
+ :data="route.query.path || 'https://aidoc.sxtvs.net'"
|
|
|
+ style="height:100%;height: 100%;"
|
|
|
+ type="text/html"
|
|
|
+ ></object> -->
|
|
|
+ <!-- <iframe :src="route.query.path" frameborder="0"></iframe> -->
|
|
|
+ <div>
|
|
|
+ <header_local />
|
|
|
+ <div style="padding: 1em">
|
|
|
+ <el-form
|
|
|
+ style="background: #f9fafc; padding-top: 10px"
|
|
|
+ size="default"
|
|
|
+ :inline="true"
|
|
|
+ :model="formInline"
|
|
|
+ class="demo-form-inline"
|
|
|
+ >
|
|
|
+ <el-form-item label="项目名称">
|
|
|
+ <el-input v-model="formInline.user" placeholder="项目名称" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建日期">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formInline.date"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="onSubmit">查询</el-button>
|
|
|
+ <el-button type="primary" @click="create">创建</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-table :data="tableData" style="width: 100%">
|
|
|
+ <el-table-column prop="projectName" label="项目名称" />
|
|
|
+ <el-table-column prop="createTime" label="创建时间" />
|
|
|
+ <el-table-column label="状态">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag type="info" v-if="scope.row.status === 0">未开始</el-tag>
|
|
|
+ <el-tag type="primary" v-if="scope.row.status === 1">文件已导入</el-tag>
|
|
|
+ <el-tag type="success" v-if="scope.row.status === 3">审核成功</el-tag>
|
|
|
+ <el-tag type="warning" v-if="scope.row.status === 2">审核中</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="address" label="操作">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button-group class="ml-4">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ v-if="scope.row.status < 1"
|
|
|
+ @click="() => importFilesFun(scope.row.id)"
|
|
|
+ >导入</el-button
|
|
|
+ >
|
|
|
+ <el-button type="warning" @click="() => getDetail(scope.row)">查看</el-button>
|
|
|
+ <el-popconfirm title="确定删除该项目?" @confirm="deleteProject(scope.row.id)">
|
|
|
+ <template #reference>
|
|
|
+ <el-button type="danger">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ </el-button-group>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <br />
|
|
|
+ <el-pagination
|
|
|
+ @current-change="change"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :current-page="page"
|
|
|
+ :total="total"
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-dialog v-model="dialogVisible" title="项目创建">
|
|
|
+ <el-form label-width="auto" style="max-width: 600px">
|
|
|
+ <el-form-item label="项目名称">
|
|
|
+ <el-input v-model="proName" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="createPro"> 提交 </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog v-model="showimport" title="导入文件">
|
|
|
+ <el-form label-width="auto" style="max-width: 600px">
|
|
|
+ <el-form-item label="标书文件">
|
|
|
+ <el-upload v-model:file-list="file" :auto-upload="false">
|
|
|
+ <el-button type="primary">选择</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="对比文件">
|
|
|
+ <el-upload v-model:file-list="file1" :auto-upload="false" multiple>
|
|
|
+ <el-button type="primary">选择</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="subFiles"> 提交 </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog v-model="showlook" title="查看结果">
|
|
|
+ <el-form label-width="auto" style="max-width: 600px">
|
|
|
+ <el-form-item :label="item.fname" v-for="item in look.bidFiles || []" :key="item.id">
|
|
|
+ 与对标文件相似度{{ item.similarity }}%
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import {
|
|
|
+ getList,
|
|
|
+ createPlag,
|
|
|
+ delList,
|
|
|
+ upList,
|
|
|
+ importFiles,
|
|
|
+ upFiles
|
|
|
+} from '../../api/plagiarismCheck';
|
|
|
+import header_local from '../allMedia/components/header.vue';
|
|
|
+import { ElMessage, ElLoading } from 'element-plus';
|
|
|
+import { ref } from 'vue';
|
|
|
+const dialogVisible = ref(false);
|
|
|
+const showimport = ref(false);
|
|
|
+const showlook = ref(false);
|
|
|
+const look = ref({});
|
|
|
+let importId = '';
|
|
|
+const tableData = ref([]);
|
|
|
+const formInline = ref({
|
|
|
+ user: '',
|
|
|
+ date: []
|
|
|
+});
|
|
|
+const page = ref(1);
|
|
|
+const total = ref(0);
|
|
|
+const proName = ref('');
|
|
|
+const file = ref([]);
|
|
|
+const file1 = ref([]);
|
|
|
+const onSubmit = () => {
|
|
|
+ getProList();
|
|
|
+};
|
|
|
+
|
|
|
+const create = () => {
|
|
|
+ dialogVisible.value = true;
|
|
|
+ file.value = [];
|
|
|
+ file1.value = [];
|
|
|
+};
|
|
|
+
|
|
|
+const change = e => {
|
|
|
+ page.value = e;
|
|
|
+ getProList();
|
|
|
+};
|
|
|
+
|
|
|
+const getProList = () => {
|
|
|
+ getList({
|
|
|
+ page: page.value,
|
|
|
+ pageSize: 10,
|
|
|
+ keyword: formInline.value.user
|
|
|
+ }).then(res => {
|
|
|
+ tableData.value = res.records || [];
|
|
|
+ total.value = res.total;
|
|
|
+ });
|
|
|
+};
|
|
|
+getProList();
|
|
|
+
|
|
|
+const deleteProject = id => {
|
|
|
+ delList({
|
|
|
+ id: id
|
|
|
+ }).then(res => {
|
|
|
+ getProList();
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const createPro = () => {
|
|
|
+ createPlag({
|
|
|
+ projectName: proName.value
|
|
|
+ }).then(res => {
|
|
|
+ dialogVisible.value = false;
|
|
|
+ getProList();
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const getDetail = data => {
|
|
|
+ showlook.value = true;
|
|
|
+ data.bidFiles.shift();
|
|
|
+ look.value = data;
|
|
|
+};
|
|
|
+
|
|
|
+const importFilesFun = id => {
|
|
|
+ showimport.value = true;
|
|
|
+ importId = id;
|
|
|
+};
|
|
|
+
|
|
|
+const subFiles = () => {
|
|
|
+ const data = new FormData();
|
|
|
+ const li = [...file.value, ...file1.value];
|
|
|
+ for (let i = 0; i < li.length; i++) {
|
|
|
+ data.append('files', li[i].raw);
|
|
|
+ }
|
|
|
+ data.append('id', importId);
|
|
|
+ let loading = ElLoading.service({
|
|
|
+ lock: true,
|
|
|
+ text: 'Loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.1)'
|
|
|
+ });
|
|
|
+ upFiles(data)
|
|
|
+ .then(res => {
|
|
|
+ const baseFile = res.shift();
|
|
|
+ importFiles({
|
|
|
+ projectId: importId,
|
|
|
+ baseFile,
|
|
|
+ compareFiles: res
|
|
|
+ })
|
|
|
+ .then(r => {
|
|
|
+ file.value = [];
|
|
|
+ file1.value = [];
|
|
|
+ showimport.value = false;
|
|
|
+ loading.close();
|
|
|
+ getProList();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '请稍后再试!'
|
|
|
+ });
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '请稍后再试!'
|
|
|
+ });
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style></style>
|