diff --git a/src/components/personalCenter/index.vue b/src/components/personalCenter/index.vue index 5d75c2133..dda42b86b 100644 --- a/src/components/personalCenter/index.vue +++ b/src/components/personalCenter/index.vue @@ -1,5 +1,8 @@ @@ -1807,6 +1855,12 @@ export default { }, data() { return { + OCRDatas: [], + OCRData: [], + OCRLoading: false, + OCRTitle: '', + OCRModel: false, + ocrList: [], nodeList: [], nodeListZRBM: [], modalshowflagRole: false, @@ -2497,6 +2551,64 @@ export default { } }, methods: { + selectOCRChange (val) { + this.OCRDatas = val + }, + OCRclose () { + this.OCRModel = false + }, + OCRsubmit () { + if (this.OCRDatas.length > 1) { + this.$message.warning('仅能选择一个文件') + } else if (this.OCRDatas.length === 0) { + this.$message.warning('请选择一个文件') + } else { + console.log(this.OCRDatas); + console.log(this.ocrList); + let json = { + standNumber: this.ocrList[0].standName, + standName: this.ocrList[0].standName, + attId: this.OCRDatas[0].attId, + fileName: this.OCRDatas[0].name, + fileType: this.ocrList[0].name, + } + console.log('这儿') + } + }, + OCRAdd (type) { + let text = '' + if (type === '0') { + text = 'OCR识别' + this.OCRTitle = '选择OCR实别文件' + } else { + text = '拆分' + this.OCRTitle = '选择拆分文件' + } + if (this.ocrList.length > 1) { + this.$message.warning('仅能选择一条数据进行' + text) + } else if (this.ocrList.length === 0) { + this.$message.warning('请选择一条数据进行' + text) + } else { + this.OCRModel = true + this.OCRLoading = false + this.$http.get('lawss/sarStandFile/queryFileInfoNew', { + type: type, + standId: this.selectedList[0] + },{ + _this: this + }, res => { + if (res.ok) { + if (res.data.length > 0) { + this.OCRData = res.data + this.OCRLoading = false + } else { + this.$message.warning('当前标准没有' + text + '文件') + this.OCRLoading = false + } + } + }) + } + }, // 左右拖动事件 dragControllerLR: function() { var resize = document.getElementById("resize"); @@ -3397,6 +3509,7 @@ export default { }, // 修改成表格样式后,选择项勾选改变 standSelectChange(data) { + this.ocrList = data this.selectedList = [] for (let i = 0; i < data.length; i++) { this.selectedList.push(data[i].id) @@ -5213,7 +5326,9 @@ export default { /deep/ .el-table--scrollable-x .el-table__body-wrapper { overflow-x: scroll; } - +.OCRstandardForComments { + height: 100%; +} #left{ width:calc(30% - 5px); height:100%;