|
|
|
@ -70,25 +70,24 @@
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="档案文件上传" :visible.sync="upload.open" width="700px" append-to-body>
|
|
|
|
<el-dialog title="档案文件上传" :visible.sync="upload.open" width="700px" append-to-body>
|
|
|
|
<div style="margin-bottom: 30px;display: flex;min-height: 250px" v-loading="upload.loading">
|
|
|
|
<div style="margin-bottom: 30px;display: flex;min-height: 300px;" v-loading="upload.loading">
|
|
|
|
<div style="width:250px;border: 1px solid #eee; padding: 10px;">
|
|
|
|
<div style="width:250px;border: 1px solid #eee; padding: 10px;max-height: 500px;overflow-y: auto">
|
|
|
|
<div style="margin-bottom: 5px;">物理书架:</div>
|
|
|
|
<div style="margin-bottom: 5px;">档案室密集柜:</div>
|
|
|
|
<el-tree
|
|
|
|
<el-tree
|
|
|
|
:data="shuJiaOptions"
|
|
|
|
:data="shuJiaOptions"
|
|
|
|
:props="{
|
|
|
|
:props="{
|
|
|
|
children: 'children',
|
|
|
|
children: 'children',
|
|
|
|
label: 'name'
|
|
|
|
label: 'label'
|
|
|
|
}"
|
|
|
|
}"
|
|
|
|
:expand-on-click-node="false"
|
|
|
|
:expand-on-click-node="false"
|
|
|
|
ref="myTreeSelect"
|
|
|
|
ref="myTreeSelect"
|
|
|
|
node-key="shelfId"
|
|
|
|
node-key="id"
|
|
|
|
default-expand-all
|
|
|
|
|
|
|
|
highlight-current
|
|
|
|
highlight-current
|
|
|
|
@node-click="selectTree"
|
|
|
|
@node-click="selectTree"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-show="upload.shelfId" style="width: 360px;margin-left: 20px;">
|
|
|
|
<div v-show="upload.id" style="width: 360px;margin-left: 20px;">
|
|
|
|
<el-upload :show-file-list="false" :fileSize="200"
|
|
|
|
<el-upload :show-file-list="false" :fileSize="200"
|
|
|
|
ref="upload"
|
|
|
|
ref="upload"
|
|
|
|
action="#"
|
|
|
|
action="#"
|
|
|
|
@ -126,25 +125,24 @@
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="扫描文件上传" :visible.sync="smwj.open" width="1000px" append-to-body>
|
|
|
|
<el-dialog title="扫描文件上传" :visible.sync="smwj.open" width="1000px" append-to-body>
|
|
|
|
<div style="margin-bottom: 30px;display: flex;align-items:start;min-height: 250px;" v-loading="smwj.loading">
|
|
|
|
<div style="margin-bottom: 30px;display: flex;align-items:start;min-height: 300px;" v-loading="smwj.loading">
|
|
|
|
<div style="width:250px;border: 1px solid #eee; padding: 10px;">
|
|
|
|
<div style="width:250px;border: 1px solid #eee; padding: 10px;max-height: 500px;overflow-y: auto">
|
|
|
|
<div style="margin-bottom: 5px;">物理书架:</div>
|
|
|
|
<div style="margin-bottom: 5px;">档案室密集柜:</div>
|
|
|
|
<el-tree
|
|
|
|
<el-tree
|
|
|
|
:data="shuJiaOptions"
|
|
|
|
:data="shuJiaOptions"
|
|
|
|
:props="{
|
|
|
|
:props="{
|
|
|
|
children: 'children',
|
|
|
|
children: 'children',
|
|
|
|
label: 'name'
|
|
|
|
label: 'label'
|
|
|
|
}"
|
|
|
|
}"
|
|
|
|
:expand-on-click-node="false"
|
|
|
|
:expand-on-click-node="false"
|
|
|
|
ref="myTreeSelect"
|
|
|
|
ref="myTreeSelect"
|
|
|
|
node-key="shelfId"
|
|
|
|
node-key="id"
|
|
|
|
default-expand-all
|
|
|
|
|
|
|
|
highlight-current
|
|
|
|
highlight-current
|
|
|
|
@node-click="selectTree1"
|
|
|
|
@node-click="selectTree1"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="smwj.shelfId && smwj.list.length===0" style="width: 650px;margin-left: 20px;" v-loading="smwj.smloading" element-loading-text="文件扫描中"
|
|
|
|
<div v-if="smwj.id && smwj.list.length===0" style="width: 650px;margin-left: 20px;" v-loading="smwj.smloading" element-loading-text="文件扫描中"
|
|
|
|
element-loading-spinner="el-icon-loading">
|
|
|
|
element-loading-spinner="el-icon-loading">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-row class="sm_row" :gutter="20">
|
|
|
|
<el-row class="sm_row" :gutter="20">
|
|
|
|
@ -179,7 +177,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="smwj.shelfId && smwj.list.length>0" style="width: 560px;margin-left: 20px;display: flex;flex-wrap: wrap">
|
|
|
|
<div v-if="smwj.id && smwj.list.length>0" style="width: 560px;margin-left: 20px;display: flex;flex-wrap: wrap">
|
|
|
|
|
|
|
|
|
|
|
|
<div v-for="(item,index) in smwj.list" class="smwjList">
|
|
|
|
<div v-for="(item,index) in smwj.list" class="smwjList">
|
|
|
|
<el-image
|
|
|
|
<el-image
|
|
|
|
@ -213,7 +211,7 @@
|
|
|
|
import { catalogTreeselect } from "@/api/system/user";
|
|
|
|
import { catalogTreeselect } from "@/api/system/user";
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
import { listBookshelf } from "@/api/dangan/bookshelf";
|
|
|
|
import { getCabinetTree } from "@/api/dangan/cabinet";
|
|
|
|
import { collectSaves, collectRecongnize } from "@/api/dangan/collection";
|
|
|
|
import { collectSaves, collectRecongnize } from "@/api/dangan/collection";
|
|
|
|
import '@/utils/WebScan';
|
|
|
|
import '@/utils/WebScan';
|
|
|
|
import axios from 'axios'
|
|
|
|
import axios from 'axios'
|
|
|
|
@ -249,7 +247,7 @@ export default {
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
shelfId: undefined,
|
|
|
|
id: undefined,
|
|
|
|
wlsjNode: undefined
|
|
|
|
wlsjNode: undefined
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 书架树选项
|
|
|
|
// 书架树选项
|
|
|
|
@ -263,7 +261,7 @@ export default {
|
|
|
|
smloading: false,
|
|
|
|
smloading: false,
|
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
shelfId: undefined,
|
|
|
|
id: undefined,
|
|
|
|
wlsjNode: undefined,
|
|
|
|
wlsjNode: undefined,
|
|
|
|
list: []
|
|
|
|
list: []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -279,7 +277,6 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
console.log(this.$store.state.user.name);
|
|
|
|
|
|
|
|
this.getDeptTree();
|
|
|
|
this.getDeptTree();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
@ -436,7 +433,7 @@ export default {
|
|
|
|
this.$modal.confirm(`是否确认选择【${this.dangAnNode.label}】档案目录?`).then(() => {
|
|
|
|
this.$modal.confirm(`是否确认选择【${this.dangAnNode.label}】档案目录?`).then(() => {
|
|
|
|
this.getTreeselect();
|
|
|
|
this.getTreeselect();
|
|
|
|
this.fileList = []
|
|
|
|
this.fileList = []
|
|
|
|
this.upload.shelfId=undefined;
|
|
|
|
this.upload.id=undefined;
|
|
|
|
this.upload.wlsjNode=undefined;
|
|
|
|
this.upload.wlsjNode=undefined;
|
|
|
|
this.upload.open = true;
|
|
|
|
this.upload.open = true;
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
@ -454,7 +451,7 @@ export default {
|
|
|
|
this.$modal.confirm(`是否确认选择【${this.dangAnNode.label}】档案目录?`).then(() => {
|
|
|
|
this.$modal.confirm(`是否确认选择【${this.dangAnNode.label}】档案目录?`).then(() => {
|
|
|
|
this.getTreeselect();
|
|
|
|
this.getTreeselect();
|
|
|
|
this.smwj.list = [];
|
|
|
|
this.smwj.list = [];
|
|
|
|
this.smwj.shelfId=undefined;
|
|
|
|
this.smwj.id=undefined;
|
|
|
|
this.smwj.wlsjNode=undefined;
|
|
|
|
this.smwj.wlsjNode=undefined;
|
|
|
|
this.smwj.open = true;
|
|
|
|
this.smwj.open = true;
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
@ -468,8 +465,8 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 查询目录下拉树结构 */
|
|
|
|
/** 查询目录下拉树结构 */
|
|
|
|
getTreeselect() {
|
|
|
|
getTreeselect() {
|
|
|
|
listBookshelf().then(response => {
|
|
|
|
getCabinetTree().then(response => {
|
|
|
|
this.shuJiaOptions = this.handleTree(response.rows, "shelfId", "pid")
|
|
|
|
this.shuJiaOptions = response.data
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 上传文件之前的钩子
|
|
|
|
// 上传文件之前的钩子
|
|
|
|
@ -537,14 +534,14 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 物理书架树选择 点击上传
|
|
|
|
// 档案室密集柜树选择 点击上传
|
|
|
|
selectTree(data, Node) {
|
|
|
|
selectTree(data, Node) {
|
|
|
|
this.upload.shelfId = data.shelfId;
|
|
|
|
this.upload.id = data.id;
|
|
|
|
this.upload.wlsjNode = Node;
|
|
|
|
this.upload.wlsjNode = Node;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 物理书架树选择 扫描上传
|
|
|
|
// 档案室密集柜树选择 扫描上传
|
|
|
|
selectTree1(data, Node) {
|
|
|
|
selectTree1(data, Node) {
|
|
|
|
this.smwj.shelfId = data.shelfId;
|
|
|
|
this.smwj.id = data.id;
|
|
|
|
this.smwj.wlsjNode = Node;
|
|
|
|
this.smwj.wlsjNode = Node;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 获取所有label
|
|
|
|
// 获取所有label
|
|
|
|
@ -596,7 +593,6 @@ export default {
|
|
|
|
this.percentage = 0;
|
|
|
|
this.percentage = 0;
|
|
|
|
this.openProgress = true;
|
|
|
|
this.openProgress = true;
|
|
|
|
collectRecongnize(arr).then(response => {
|
|
|
|
collectRecongnize(arr).then(response => {
|
|
|
|
console.log(3232,response);
|
|
|
|
|
|
|
|
if(response.fails&&response.fails.length>0){
|
|
|
|
if(response.fails&&response.fails.length>0){
|
|
|
|
this.pictureRecard = response.fails
|
|
|
|
this.pictureRecard = response.fails
|
|
|
|
this.isFails = true;
|
|
|
|
this.isFails = true;
|
|
|
|
@ -663,12 +659,9 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then( (response)=> {
|
|
|
|
.then( (response)=> {
|
|
|
|
console.log(response.data.file_counts);
|
|
|
|
|
|
|
|
this.percentage = Math.round((response.data.file_counts/this.pictureRecard.length)*100);
|
|
|
|
this.percentage = Math.round((response.data.file_counts/this.pictureRecard.length)*100);
|
|
|
|
console.log(this.percentage);
|
|
|
|
|
|
|
|
}).catch((error)=> {
|
|
|
|
}).catch((error)=> {
|
|
|
|
// 处理错误情况
|
|
|
|
// 处理错误情况
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|