Prechádzať zdrojové kódy

扫描和上传绑定 公共文件添加扫描

liuQiang 2 rokov pred
rodič
commit
09a3c48e1f

+ 1 - 1
index.html

@@ -9,7 +9,7 @@
 		<link rel="icon" href="/favicon.ico">
 		<title>聚合智慧文档管理系统</title>
 		<!--引入onlyoffice组件-->
-		 <script type="text/javascript" src="https://192.168.1.28:19443/web-apps/apps/api/documents/api.js" charset="utf-8" async></script>
+		 <script type="text/javascript" src="https://192.168.1.88:19443/web-apps/apps/api/documents/api.js" charset="utf-8" async></script>
 		<!-- <script type="text/javascript" src="http://http://8.142.173.95:19531/web-apps/apps/api/documents/api.js" charset="utf-8" async></script> -->
 <!--		<script type="text/javascript" src="http://192.168.188.88:19531/web-apps/apps/api/documents/api.js" charset="utf-8" async></script>-->
 		<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->

+ 1 - 1
src/views/department/MyFile.vue

@@ -137,7 +137,7 @@
                                 </div>
                             </div>
                         </template>
-                          <div v-if="thisFolder.dirId&& isDept"
+                          <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="">

+ 110 - 3
src/views/publicment/MyFile.vue

@@ -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;

+ 1 - 1
src/views/scanner/info/index.vue

@@ -363,7 +363,7 @@ console.log('arr',arr);
   const row = infoList.value.find(item=>item.scannerId === ids.value[0])
   const pass=decode(row.pass);
    ElMessageBox.alert(
-      `端口号:${row.port}<br>扫描仪IP:${arr[2]}<br>账号:${row.user}<br>密码:${pass}`,
+      `端口号:${row.port}<br>FTPIP:${arr[2]}<br>账号:${row.user}<br>密码:${pass}`,
       '扫描仪信息',
       {
         dangerouslyUseHTMLString: true,

+ 4 - 2
vite.config.js

@@ -39,7 +39,8 @@ export default defineConfig(({
 			proxy: {
 				// https://cn.vitejs.dev/config/#server-proxy
 				'/dev-api': {
-					target: 'http://192.168.1.28:8080/',
+					// target: 'http://192.168.1.28:8080/',
+					target: 'http://192.168.1.88:8080/',
 					// target: 'http://192.168.1.11:8080/',
 					// target: 'http://localhost:8080/',
 					// target:'http://192.168.1.28:8080/',
@@ -50,7 +51,8 @@ export default defineConfig(({
 				//websocket代理
 				'/websocket': {
 					// target:'ws://localhost:8080/websocket',
-					target:'ws://192.168.1.28:8080/websocket',
+					// target:'ws://192.168.1.28:8080/websocket',
+					target:'ws://192.168.1.88:8080/websocket',
 					// target:'ws://8.142.173.95:19527/websocket',
 					// target:'ws://192.168.1.11:8080/websocket',
 					changeOrigin: true,