From 6d6e75908aa1e601107f5aa0c834401d05cda7ff Mon Sep 17 00:00:00 2001 From: yanyizhou <2311759275@qq.com> Date: Sun, 21 Nov 2021 17:25:30 +0800 Subject: [PATCH] =?UTF-8?q?OCR=E8=AF=86=E5=88=AB=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=B8=8A=E4=BC=A0=EF=BC=8C=E8=AF=A5=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=A6=81=E5=8A=A0=E4=B8=AA=E6=A3=80=E7=B4=A2=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E4=BB=A5=E4=BB=8E=E5=BA=93=E4=B8=AD=E9=80=89?= =?UTF-8?q?=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../localTool/standardRecognition/index.vue | 746 ++++++++++++++++++ 1 file changed, 746 insertions(+) diff --git a/src/pages/localTool/standardRecognition/index.vue b/src/pages/localTool/standardRecognition/index.vue index 6ecabdb49..dd1952cb4 100644 --- a/src/pages/localTool/standardRecognition/index.vue +++ b/src/pages/localTool/standardRecognition/index.vue @@ -186,6 +186,7 @@ v-model="uploadFilesdfEo.standNumber" :placeholder="$t('m.pleaseEnterTheStandardNumberAndPolicyNumber')" > + 手动查找 转换--> + + + + + + + + + + + + + + + + + + + + + + + + + + 数据获取中 + + + + + + + + + {{ scope.row.standSortShow }} {{ + scope.row.standNumber + }}-{{ scope.row.standYear }} + {{ scope.row.standSortShow }} {{ + scope.row.standNumber + }}-{{ scope.row.standYear }} + + {{ scope.row.standSortShow }} + {{ scope.row.standNumber }} + + + + + {{ scope.row.standName }} + {{ scope.row.standName }} + + + + + {{ formatIssueDate(scope.row.issueTime) }} + {{ formatIssueDate(scope.row.issueTime) }} + + + + + + {{ scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-' }} + {{ scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-' }} + + + + + + + {{ scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-' }} + {{ scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-' }} + + + + + {{ scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-' }} + {{ scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-' }} + + + + + + + + + + {{ + textStatusMap[scope.row.textStatus] + }} + {{ textStatusMap[scope.row.textStatus] }} + + + + + + + {{ + scope.row.standSortShow + }} {{ scope.row.standNumber }}-{{ scope.row.standYear }} + {{ + scope.row.standSortShow + }} {{ scope.row.standNumber }}-{{ scope.row.standYear }} + {{ + scope.row.standSortShow + }} {{ scope.row.standNumber }}-{{ scope.row.standYear }} + {{ + scope.row.standSortShow + }} + {{ scope.row.standNumber }} + + + + + {{ + scope.row.standName + }} + {{ + scope.row.standName + }} + {{ + scope.row.standName + }} + + + + + + {{ formatIssueDate(scope.row.issueTime) }} + + + {{ formatIssueDate(scope.row.issueTime) }} + + + {{ formatIssueDate(scope.row.issueTime) }} + + + + + + + {{ + scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-' + }} + {{ + scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-' + }} + {{ scope.row.SSRQ ? scope.row.SSRQ.substring(0, 10) : '-' }} + + + + + + {{ + scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-' + }} + {{ + scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-' + }} + {{ + scope.row.XCXSSRQ ? scope.row.XCXSSRQ.substring(0, 10) : '-' + }} + + + + + {{ + scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-' + }} + {{ + scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-' + }} + {{ + scope.row.ZCCSSRQ ? scope.row.ZCCSSRQ.substring(0, 10) : '-' + }} + + + + + + + + + + {{ + textStatusMap[scope.row.textStatus] + }} + {{ + textStatusMap[scope.row.textStatus] + }} + {{ textStatusMap[scope.row.textStatus] }} + + + + + + + + {{ scope.row.lawsNumber }} + {{ scope.row.lawsNumber }} + {{ scope.row.lawsNumber }} + + + + + {{ scope.row.lawsName }} + {{ scope.row.lawsName }} + {{ scope.row.lawsName }} + + + + + {{ scope.row.lawsEnName }} + {{ scope.row.lawsEnName }} + {{ scope.row.lawsEnName }} + + + + + {{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}} + {{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}} + {{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}} + + + + + {{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}} + {{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}} + {{scope.row.XCXSSRQLAWS ? scope.row.XCXSSRQLAWS.slice(0, 10) : ''}} + + + + + + + {{scope.row.standStatusShow}} + + + {{scope.row.standStatusShow}} + + + {{scope.row.standStatusShow}} + + + + + + + + + {{ scope.row.standCode }} + {{ scope.row.standCode }} + {{ scope.row.standCode }} + + + + + {{ scope.row.standName }} + {{ scope.row.standName }} + {{ scope.row.standName }} + + + + + {{ scope.row.standEnName }} + {{ scope.row.standEnName }} + {{ scope.row.standEnName }} + + + + + {{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}} + {{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}} + {{scope.row.issueTime ? scope.row.issueTime.slice(0, 10) : ''}} + + + + + {{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}} + {{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}} + {{scope.row.putTime ? scope.row.putTime.slice(0, 10) : ''}} + + + + + + + {{scope.row.standStatusShow}} + + + {{scope.row.standStatusShow}} + + + {{scope.row.standStatusShow}} + + + + + + + + + + + @@ -235,6 +717,34 @@ export default { components: {}, data() { return { + textStatusMap: {}, // 文本状态id与name对应 + lawInfoTable:[], + lawInfoTableLoading: true, + //手动查找的模态框 + selectModal: false, + styles: { + height: 'calc(100% - 55px)', + overflow: 'auto', + paddingBottom: '53px', + position: 'static' + }, + handleSelectForm: { + standName: '', //标准名称 + numberName: '', //政策名称 + lawsNumber: '', //政策编号 + standNumber: '', //标准编号 + standCode: '', //企标编号 + dataSource: 'INLAND', + lawNumber: '', // 标准编号/政策编号 + lawName: '', // 标准名称/政策名称 + page: 1, + pageSize: this.$store.getters.userInfo.configContent, + total: 0, + standType: '', + quoteIdList: '', + validFlag: '0', + menuId: 'nomenu' + }, tableHeight: null, loading: false, uploadModal: false, @@ -468,6 +978,242 @@ export default { props: {}, watch: {}, methods: { + // 将文本状态的id与name对应 + setMap(data) { + data.forEach(item => { + this.$set(this.textStatusMap, item.value, item.label) + }) + }, + //手动查找的确定按钮 + handleSelectConfirm(){ + if (this.handleSelectTableList.length>1){ + this.$message.warning('只能选择一条数据') + }else if (this.handleSelectTableList.length===0){ + this.$message.warning('请选择一条数据') + } + else { + console.log('619',this.handleSelectForm.dataSource) + // this.attributeEO.dataSource = this.handleSelectForm.dataSource + // this.attributeEO.lawId = this.handleSelectTableList[0].id + this.uploadFilesdfEo.standNumber =this.handleSelectTableList[0].standCode || this.handleSelectTableList[0].lawsNumber || this.handleSelectTableList[0].standSort+" "+this.handleSelectTableList[0].standNumber+"-"+this.handleSelectTableList[0].standYear + this.uploadFilesdfEo.standName = this.handleSelectTableList[0].standName || this.handleSelectTableList[0].lawsName + //文本状态,下次一定 + // this.uploadFilesdfEo.fileType = this.handleSelectTableList[0].textStatus || this.handleSelectTableList[0].standStatusShow + this.selectModal = false + } + console.log('确定',this.handleSelectTableList) + }, + handleSelectPageChange(page){ + this.lawInfoTableLoading = true + this.handleSelectForm.page = page + console.log(this.handleSelectForm.page) + this.searchLawBtn() + }, + handleSelectPageSizeChange(pageSize){ + this.lawInfoTableLoading = true + this.handleSelectForm.pageSize = pageSize + console.log(this.handleSelectForm.pageSize) + this.searchLawBtn() + }, + formatIssueDate(str) { + const momentDate = this.$moment(str) + if (momentDate.isValid()) { + return this.$moment(str).format('YYYY-MM-DD') + } else { + return str + } + }, + // 点击查看 + handlePreview(item) { + console.log('539',item) + if (item.standType === "INLAND"){ + let routeUrlINLAND = this.$router.resolve({ + name: 'OtherStandardDetails', + params: { + id: item.id, + pageType: 'INLAND_STAND' + } + }) + window.open(routeUrlINLAND.href, '_blank') + }else if (item.standType === "FOREIGN"){ + let routeUrlFOREIGN = this.$router.resolve({ + name: 'OtherStandardDetails', + params: { + id: item.id, + pageType: 'FOREIGN_STAND' + } + }) + window.open(routeUrlFOREIGN.href, '_blank') + } else if (item.country !== undefined){ + let routeUrlLAWS = this.$router.resolve({ + name: 'OtherLawsStandDetails', + params: { + id: item.id, + pageType: 'LAWS_STAND' + } + }) + window.open(routeUrlLAWS.href, '_blank') + }else { + let routeUrlBUSINESS = this.$router.resolve({ + name: 'OtherBussStandardDetails', + params: { + id: item.id, + pageType: 'BUSINESS_STAND' + } + }) + window.open(routeUrlBUSINESS.href, '_blank') + } + + }, + // 手动查找 table选择事件 + handleSelectTableChange (row) { + this.handleSelectTableList = row + console.log('我选的',this.handleSelectTableList) + }, + //手动查找的清空按钮 + clearLawBtn(){ + this.lawInfoTableLoading = true + //清空的时候还是不要把人家选的数据源清空吧 + // this.handleSelectForm.dataSource = '' + //清空标准编号/政策编号的查询 + this.handleSelectForm.lawNumber = '' + this.handleSelectForm.standNumber = '' + this.handleSelectForm.lawsNumber = '' + this.handleSelectForm.standCode = '' + //清空标准名称/政策名称的查询 + this.handleSelectForm.lawName = '' + this.handleSelectForm.standName = '' + this.handleSelectForm.numberName = '' + this.searchLawBtn() + }, + //手动查找的查询按钮 + searchLawBtn(){ + this.lawInfoTableLoading = true + console.log('533',this.handleSelectForm.dataSource) + if (this.handleSelectForm.dataSource === 'INLAND'){ + this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{ + _this: this + },res=>{ + console.log('国内标准库数据',res) + if (res.ok){ + this.lawInfoTable = res.data.list + this.handleSelectForm.total = res.data.count + if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) { + this.lawInfoTableLoading = true + this.handleSelectPageChange(1) + }else { + this.lawInfoTableLoading = false + this.lawInfoTableLoading = false + } + }else { + this.$message.error(res.message) + } + },e=>{ + this.lawInfoTable = [] + this.handleSelectForm.total = 0 + }) + console.log('国内标准库') + }else if(this.handleSelectForm.dataSource === 'FOREIGN'){ + this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{ + _this: this + },res=>{ + console.log('海外标准库数据',res) + if (res.ok){ + this.lawInfoTable = res.data.list + this.handleSelectForm.total = res.data.count + if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) { + this.lawInfoTableLoading = true + this.handleSelectPageChange(1) + }else { + this.lawInfoTableLoading = false + } + }else { + this.$message.error(res.message) + this.lawInfoTableLoading = false + } + },e=>{ + this.lawInfoTable = [] + this.handleSelectForm.total = 0 + }) + console.log('海外标准库') + }else if(this.handleSelectForm.dataSource === 'FOREIGN_LAWS'){ + this.$http.get('lawss/sarLawsInfo/page',this.handleSelectForm,{ + _this: this + },res=>{ + console.log('国内外政策库数据',res) + if (res.ok){ + this.lawInfoTable = res.data.list + this.handleSelectForm.total = res.data.count + if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) { + this.lawInfoTableLoading = true + this.handleSelectPageChange(1) + }else { + this.lawInfoTableLoading = false + } + }else { + this.$message.error(res.message) + this.lawInfoTableLoading = false + } + },e=>{ + this.lawInfoTable = [] + this.handleSelectForm.total = 0 + }) + console.log('国内外政策库') + }else if(this.handleSelectForm.dataSource === 'BUSINESS_STAND'){ + this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage',this.handleSelectForm,{ + _this: this + },res=>{ + console.log('企业标准库数据',res) + if (res.ok){ + this.lawInfoTable = res.data.list + this.handleSelectForm.total = res.data.count + if ((this.lawInfoTable.length === 0 || this.lawInfoTable === []) && this.handleSelectForm.page !== 1) { + this.lawInfoTableLoading = true + this.handleSelectPageChange(1) + }else { + this.lawInfoTableLoading = false + } + }else { + this.$message.error(res.message) + this.lawInfoTableLoading = false + } + },e=>{ + this.lawInfoTable = [] + this.handleSelectForm.total = 0 + }) + console.log('企业标准库') + }else { + this.$message.warning('请先选择标准/政策来源') + } + }, + //根据标准编号/政策编号查询 + lawNumberSearch() { + this.handleSelectForm.standNumber = this.handleSelectForm.lawNumber + this.handleSelectForm.lawsNumber = this.handleSelectForm.lawNumber + this.handleSelectForm.standCode = this.handleSelectForm.lawNumber + }, + //根据标准名称/政策名称查询 + lawNameSearch() { + this.handleSelectForm.standName = this.handleSelectForm.lawName + this.handleSelectForm.numberName = this.handleSelectForm.lawName + }, + dataSourceChange() { + this.handleSelectForm.page = 1 + this.lawInfoTableLoading = true + this.handleSelectForm.standType = this.handleSelectForm.dataSource + this.searchLawBtn() + }, + cancelSelectModel () { + this.selectModal = false + }, + //点击手动查找按钮 + handleSelect() { + this.selectModal = true + this.lawInfoTableLoading = true + this.handleSelectForm.standType = this.handleSelectForm.dataSource + this.clearLawBtn() + this.searchLawBtn() + }, handleCommand(command) { switch (command[1]) { case "获取文件":