|
|
@@ -135,6 +135,26 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <div v-if="thisRole.some(item=>item == 'upload') || (isDept && thisFolder.dirId)"
|
|
|
+ style="display: flex;width: 92px;height: 32px;justify-content: flex-start;align-items: center;line-height: 18px;">
|
|
|
+ <div style="margin-left: 5px;">
|
|
|
+ <img src="../../assets/images/scanFile.png" style="width: 24px;height: 24px;" alt="">
|
|
|
+ </div>
|
|
|
+ <div style="margin-left: 5px;">
|
|
|
+ <span style="color: black;cursor: pointer;" @click="scannerFile">扫描
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else
|
|
|
+ style="display: flex;width: 92px;opacity:0.5;height: 32px;justify-content: flex-start;align-items: center;line-height: 18px;">
|
|
|
+ <div style="margin-left: 5px;">
|
|
|
+ <img src="../../assets/images/scanFile.png" style="width: 24px;height: 24px;" alt="">
|
|
|
+ </div>
|
|
|
+ <div style="margin-left: 5px;">
|
|
|
+ <span style="color: black;cursor: pointer;">扫描
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="tip">
|
|
|
<img src="@/assets/images/mouseRight.png" alt="">
|
|
|
@@ -412,6 +432,24 @@
|
|
|
<!-- 二次密码验证 -->
|
|
|
<inputPassword v-if="showInputPassword" @surePass="surePass" @closeIptPass="closeIptPass" :showInputPassword="showInputPassword"></inputPassword>
|
|
|
<div v-loading.fullscreen="loadingPreview" v-if="loadingPreview" class="lodingBox"></div>
|
|
|
+ <!-- 扫描文档 -->
|
|
|
+ <ScanFile v-if="openScan" :openScan="openScan" :scannerFiles="scannerFiles" @saveScanFile="saveScanFile" @closeOpen="closeOpen"></ScanFile>
|
|
|
+ <!-- 可用扫描仪信息 -->
|
|
|
+ <div>
|
|
|
+ <el-dialog v-model="checkScanner" title="扫描仪" width="30%">
|
|
|
+ <div v-for="item in scannerList" :key="item.scannerId" @click="checkScanFn(item)" :class="{'checkScan':item.scannerId ==checkScanId }">
|
|
|
+ {{item.scannerName}}
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="closeCheckScanner">取消</el-button>
|
|
|
+ <el-button type="primary" @click="sureScaner">确认</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+ <!-- 扫描文件移动到 -->
|
|
|
+ <MoveTo v-if="openScanMove" :spaceType='1' :scanFileArr="scanFileArr" :thisFolder="thisFolder" :openScanMove="openScanMove" @closeOpenScanMove='closeOpenScanMove'></MoveTo>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -443,6 +481,8 @@ import level3 from "@/assets/images/level3.png";
|
|
|
import level4 from "@/assets/images/level4.png";
|
|
|
import { ElMessage ,ElLoading } from 'element-plus'
|
|
|
import ImgPreview from '@/components/ImgPreview/ImgPreview.vue'
|
|
|
+import ScanFile from '@/components/ScanFile/ScanFile.vue'
|
|
|
+import MoveTo from '@/components/MoveTo/MoveTo.vue'
|
|
|
import { preview } from "@/api/common/common.js";
|
|
|
import historyList from "@/components/historyList/index.vue"; //选择文件发送的列表,历史版本
|
|
|
import inputPassword from "./components/inputPassword.vue"; //选择文件发送的列表,历史版本
|
|
|
@@ -459,6 +499,7 @@ import PathLabel from '@/components/PathLabel/index.vue'
|
|
|
import fileStyle from "@/assets/images/fileStyle.png";
|
|
|
import fileBox from "@/assets/images/fileBox.png";
|
|
|
import Cookies from "js-cookie";
|
|
|
+import { listInfo,selectInfo ,getFileByScanerId} from '@/api/scanner/info.js';
|
|
|
import { getLevel } from '@/api/level/level.js';
|
|
|
import elTableInfiniteScroll from 'el-table-infinite-scroll'
|
|
|
import { getConfigKey } from "@/api/system/config.js"
|
|
|
@@ -681,10 +722,17 @@ export default {
|
|
|
const tableTotal = ref(0)//表格数据总数
|
|
|
const isDept = ref(false)// 是否管理员
|
|
|
const maxFileSize = ref()//能上传的最大size
|
|
|
+ const scannerList = ref() // 扫描仪数据
|
|
|
+ const checkScanId = ref() // 选中的scan的id
|
|
|
+ const checkScanner = ref(false) //显示扫描仪选择框
|
|
|
+ const scannerFiles = ref([]) //选择的扫描仪的文件
|
|
|
+ const openScanMove = ref(false)
|
|
|
const pathLabelData = ref([
|
|
|
])
|
|
|
//控制宫格展示
|
|
|
const isList = ref(false); //控制显示方式
|
|
|
+ const openScan = ref(false)//控制扫描文档显示
|
|
|
+ const scanFileArr = ref([]) //认领的扫描文件数组
|
|
|
const changeShow = (fileGrids) => {
|
|
|
// isList.value = !isList.value;
|
|
|
// fileGrid.value = fileGrids
|
|
|
@@ -1017,6 +1065,9 @@ export default {
|
|
|
thanks.value = true
|
|
|
anyP.value = false
|
|
|
}
|
|
|
+ const closeOpen = ()=>{
|
|
|
+ openScan.value = false
|
|
|
+ }
|
|
|
function createNewMenu(num,leftNewFiles) {
|
|
|
if (leftNewFiles) {
|
|
|
leftNewFile.value = true //解决左侧点击文件后不显示的问题
|
|
|
@@ -1800,6 +1851,44 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
}
|
|
|
+ //获取扫描仪列表
|
|
|
+ const scannerFile =async ()=>{
|
|
|
+ const res = await selectInfo()
|
|
|
+ scannerList.value = res.rows
|
|
|
+ checkScanner.value = true
|
|
|
+ checkScanId.value = null
|
|
|
+ // console.log('scanner',res);
|
|
|
+ }
|
|
|
+ // 选择扫描仪
|
|
|
+ const checkScanFn = (item)=>{
|
|
|
+ checkScanId.value = item.scannerId
|
|
|
+ }
|
|
|
+ // 确认选择扫描仪 获取扫描仪下文件列表
|
|
|
+ const sureScaner =async ()=>{
|
|
|
+ if(!checkScanId.value) return
|
|
|
+ const res = await getFileByScanerId(checkScanId.value)
|
|
|
+ console.log('sureScanerres',res);
|
|
|
+ scannerFiles.value = res.data
|
|
|
+ checkScanner.value = false
|
|
|
+ openScan.value = true
|
|
|
+ }
|
|
|
+ // 关闭窗口
|
|
|
+ const closeCheckScanner = ()=>{
|
|
|
+ checkScanner.value = false
|
|
|
+ }
|
|
|
+ // 移动到事件
|
|
|
+ const saveScanFile = (arr)=>{
|
|
|
+ console.log('arr',arr);
|
|
|
+ openScan.value = false
|
|
|
+ scanFileArr.value = arr
|
|
|
+ openScanMove.value = true
|
|
|
+
|
|
|
+ }
|
|
|
+ // 关闭窗口
|
|
|
+ const closeOpenScanMove = ()=>{
|
|
|
+ openScanMove.value = false
|
|
|
+ refreshFile()
|
|
|
+ }
|
|
|
onMounted(() => {
|
|
|
getAllTop()
|
|
|
getSpaceList()
|
|
|
@@ -2056,7 +2145,21 @@ export default {
|
|
|
backTopPath,
|
|
|
maxFileSize,
|
|
|
upBefore,
|
|
|
- getFirstFolder
|
|
|
+ getFirstFolder,
|
|
|
+ openScan,
|
|
|
+ closeOpen,
|
|
|
+ scannerFile,
|
|
|
+ scannerList,
|
|
|
+ checkScanner,
|
|
|
+ checkScanId,
|
|
|
+ checkScanFn,
|
|
|
+ closeCheckScanner,
|
|
|
+ sureScaner,
|
|
|
+ scannerFiles,
|
|
|
+ saveScanFile,
|
|
|
+ openScanMove,
|
|
|
+ closeOpenScanMove,
|
|
|
+ scanFileArr
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -2075,7 +2178,9 @@ export default {
|
|
|
PlaceGridFolder,
|
|
|
PalaceGridFile,
|
|
|
inputPassword,
|
|
|
- PathLabel
|
|
|
+ PathLabel,
|
|
|
+ ScanFile,
|
|
|
+ MoveTo
|
|
|
},
|
|
|
}
|
|
|
|
|
|
@@ -2143,7 +2248,9 @@ p {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+.checkScan{
|
|
|
+ background-color: #eee;
|
|
|
+}
|
|
|
.setBox {
|
|
|
width: 88px;
|
|
|
height: 112px;
|