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')" > + 手动查找 转换--> + +
+ + + + + + + + + + + + + + + + + + + + + + + + 数据获取中 + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
@@ -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 "获取文件":