diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/page/listTracking.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/page/listTracking.vue index 6bdaeff58..b808a9135 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/page/listTracking.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/page/listTracking.vue @@ -285,10 +285,11 @@ - - + + @@ -296,6 +297,7 @@ @@ -303,6 +305,7 @@ @@ -330,6 +333,7 @@ tooltip-effect="dark" style="width: 100%;overflow-y: auto;overflow-x: hidden;" border + :data="lawInfoTable" :height="300" :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', fontWeight: 'bold', height: '48px'}" @@ -345,14 +349,30 @@ align="center" label="标准编号/政策编号"> + @@ -385,18 +417,24 @@ export default { name: "listTracking", data () { return { + lawInfoTable:[], handleSelectPage: 1, handleSelectTotal: 0, textStatusMap: {}, // 文本状态id与name对应 handleSelectTableList:[], handleSelectForm: { - dataSource: '', + standName: '', //标准名称 + numberName: '', //政策名称 + lawsNumber: '', //政策编号 + standNumber: '', //标准编号 + standCode: '', //企标编号 + dataSource: 'INLAND', lawNumber: '', // 标准编号/政策编号 lawName: '', // 标准名称/政策名称 page: 1, pageSize: this.$store.getters.userInfo.configContent, total: 0, - standType: 'INLAND', + standType: '', quoteIdList: '', validFlag: '0', menuId: 'nomenu' @@ -509,8 +547,8 @@ export default { applyAuth: '' // 认证类型 }, dataSourceOptions: [ - {value: 'INLAND_STAND', label: '国内标准法规'}, - {value: 'FOREIGN_STAND', label: '海外标准法规'}, + {value: 'INLAND', label: '国内标准法规'}, + {value: 'FOREIGN', label: '海外标准法规'}, {value: 'FOREIGN_LAWS', label: '国内外政策'}, {value: 'BUSINESS', label: '企业标准 '} ], @@ -528,19 +566,152 @@ export default { } }, methods: { + // 将文本状态的id与name对应 + setMap(data) { + data.forEach(item => { + this.$set(this.textStatusMap, item.value, item.label) + }) + }, + dataSourceChange() { + this.handleSelectForm.standType = this.handleSelectForm.dataSource + this.searchLawBtn() + }, + //根据标准编号/政策编号查询 + 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 + }, + //手动查找的确定按钮 + handleSelectConfirm(){ + if (this.handleSelectTableList.length>1){ + this.$message.warning('只能选择一条数据') + }else if (this.handleSelectTableList.length===0){ + this.$message.warning('请选择一条数据') + } + else { + // dataSourceOptions: [ + // {value: 'INLAND', label: '国内标准法规'}, + // {value: 'FOREIGN', label: '海外标准法规'}, + // {value: 'FOREIGN_LAWS', label: '国内外政策'}, + // {value: 'BUSINESS', label: '企业标准 '} + // ], + this.attributeEO.lawId =this.handleSelectTableList[0].standCode || this.handleSelectTableList[0].lawsNumber || this.handleSelectTableList[0].standSort+" "+this.handleSelectTableList[0].standNumber+"-"+this.handleSelectTableList[0].standYear + this.attributeEO.lawName = this.handleSelectTableList[0].standName || this.handleSelectTableList[0].lawsName + this.selectModal = false + } + console.log('确定',this.handleSelectTableList) + }, + //手动查找的清空按钮 + clearLawBtn(){ + //清空的时候还是不要把人家选的数据源清空吧 + // 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(){ + 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.handleSelectTotal = res.data.count + }else { + this.$message.error(res.message) + } + },e=>{ + this.lawInfoTable = [] + this.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.handleSelectTotal = res.data.count + }else { + this.$message.error(res.message) + } + },e=>{ + this.lawInfoTable = [] + this.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.handleSelectTotal = res.data.count + }else { + this.$message.error(res.message) + } + },e=>{ + this.lawInfoTable = [] + this.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.handleSelectTotal = res.data.count + }else { + this.$message.error(res.message) + } + },e=>{ + this.lawInfoTable = [] + this.total = 0 + }) + console.log('企业标准库') + }else { + this.$message.warning('请先选择标准/政策来源') + } + }, handleSelectPageChange(page){ - + this.handleSelectForm.page = page + console.log(this.handleSelectForm.page) + this.searchLawBtn() }, handleSelectPageSizeChange(pageSize){ - + this.handleSelectForm.pageSize = this.$store.getters.userInfo.configContent + console.log(this.handleSelectForm.pageSize) + this.searchLawBtn() }, // 手动查找 table选择事件 handleSelectTableChange (row) { this.handleSelectTableList = row + console.log('我选的',this.handleSelectTableList) }, //点击手动查找按钮 handleSelect() { this.selectModal = true + this.searchLawBtn() }, saveInfo () { this.$refs['attributeEO'].validate((valid) => { @@ -786,6 +957,14 @@ export default { mounted () { // 分页查询数据 this.searchSarAccess() + // 从数据库中查询各下拉框数据 + this.$http.get('sys/dictype/getDicTypeListCode', '', { + _this: this + }, res => { + console.log(res.data.WBZTCLASS) + this.setMap(res.data.WBZTCLASS) + }, e => { + }) }, };