From 5d6ab83c30da216a3060d190827a4989e8898bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Tue, 8 Jun 2021 10:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E9=A2=84=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pagination/index.vue | 2 +- src/pages/localTool/standardWarning.vue | 434 +++++------------- .../domesticStandardsAndRegulations/index.vue | 30 +- src/sysConfig/index.js | 8 +- 4 files changed, 125 insertions(+), 349 deletions(-) diff --git a/src/components/pagination/index.vue b/src/components/pagination/index.vue index c3020523e..2b7b6f678 100644 --- a/src/components/pagination/index.vue +++ b/src/components/pagination/index.vue @@ -7,7 +7,7 @@ 新车型实施日期预警 - + - + @@ -61,7 +61,7 @@ {{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }} - + @@ -71,7 +71,7 @@ {{ scope.row.standName }} - + @@ -79,13 +79,13 @@ + :page="pageConfig.current1" + :total="pageConfig.count1" + @pageChange="page => handlePageChange('newItems', page)" + @pageSizeChange="pageSize => handlePageSizeChange('newItems', pageSize)"> 在产车实施日期预警 + :page="pageConfig.current2" + :total="pageConfig.count2" + @pageChange="page => handlePageChange('newStand', page)" + @pageSizeChange="pageSize => handlePageSizeChange('newStand', pageSize)"> 新车型条款预警 + :page="pageConfig.current3" + :total="pageConfig.count3" + @pageChange="page => handlePageChange('oldItems', page)" + @pageSizeChange="pageSize => handlePageSizeChange('oldItems', pageSize)"> 在产车条款预警 + :page="pageConfig.current4" + :total="pageConfig.count4" + @pageChange="page => handlePageChange('oldStand', page)" + @pageSizeChange="pageSize => handlePageSizeChange('oldStand', pageSize)"> @@ -268,7 +268,7 @@ 新车型实施日期预警
@@ -302,7 +302,7 @@ 在产车实施日期预警
@@ -354,55 +354,52 @@ export default { // 头部搜索框 dynamic: { keyWord: "", - openData: "", - closeData: "" - }, - MsgInterInfoEOPage: { - msgType: "" - }, - MsgDynamicInfoEOPage: { - msgType: "" - }, - MsgResourceInfoEOPage: { - msgType: "" }, height: null, - productionVehicleDatas: [], - newTypeDatas: [], - newProductionDatas: [], - inlandMsgList: [], - foreignMsgList: [], - resourceMsgList: [], - newCarWarning: [], - producCarWarning: [], - // 轮播图 - carouselValue1: 0, - // 有图片的动态信息列表 - imgInformationList: [], - // 轮播图宽度 - carouselImgWidth: 0, - // loading - loading: { - inlandLoading: false, - foreignLoading: false, - resourceLoading: false - }, - roleModuleList: [], - // 轮播索引 - swiperIndex: -1, - dynamicFormRules: { - keyWord: [ - { type: "string", max: 100, message: "关键字长度不能超过100个字符", trigger: "blur" } - ] - }, - newModelPageConfig: { - page: 1, - total: 0 - }, - tableHeight: 0 + // 新车型实施日期预警 + newItems: [], + // 新车型条款预警 + newStand: [], + // 在产车实施日期预警 + oldItems: [], + // 在产车条款预警 + oldStand: [], + tableHeight: 0, + pageConfig: { + current1: 1, + pageSize1: 10, + count1: 0, + current2: 1, + pageSize2: 10, + count2: 0, + current3: 1, + pageSize3: 10, + count3: 0, + current4: 1, + pageSize4: 10, + count4: 0 + } }; }, methods: { + // 获取数据 (type用于区别分页器切换) + getEarlyDate() { + this.$http.get('sys/EarlyWarning/StandWarning', { + applyType: '', + ...this.pageConfig + }, { + _this: this + },res => { + const result = res.data[0] + Object.keys(result).forEach((tableName, index) => { + const tableRes = result[tableName] + const count = `count${index + 1}` + this.pageConfig[count] = tableRes.total + this[tableName] = tableRes.records + }) + }, e => { + }); + }, // 切换tab handleClick(tab, event) { switch (tab.name) { @@ -478,107 +475,8 @@ export default { }, e => { }); }, - // 获取国内动态 - queryMsgByPage() { - this.MsgDynamicInfoEOPage.msgType = "INLAND"; - this.MsgDynamicInfoEOPage.rowLimit = 10; - this.$http.get("lawss/msgDynamicInfo/page", this.MsgDynamicInfoEOPage, { - _this: this, - loading: "loading.inlandLoading" - }, res => { - this.inlandMsgList = res.data.list; - }, e => { - }); - }, - // 国内动态更多查看 - dynamicDomestic() { - this.$store.commit("setDetailMap", this.$route.path); - this.$router.push({ - name: "DomesticDynamics" - }); - }, - // 国际动态更多查看 - dynamicInternational() { - this.$router.push({ - name: "InternationalDynamics" - }); - }, - - // 获取国外动态 - queryForeignMsgByPage() { - this.MsgInterInfoEOPage.msgType = "FOREIGN"; - this.MsgInterInfoEOPage.rowLimit = 10; - this.$http.get("lawss/msgDynamicInfo/page", this.MsgInterInfoEOPage, { - _this: this, - loading: "loading.foreignLoading" - }, res => { - this.foreignMsgList = res.data.list; - }, e => { - }); - }, - // 资料中心更多查看 - informationCenter() { - this.$store.commit("setDetailMap", this.$route.path); - this.$router.push({ - name: "InformationCenter" - }); - }, - // 实施预警更多查看 - dynamicWarning() { - this.$store.commit("setDetailMap", this.$route.path); - this.$router.push({ - name: "ImplementWarning" - }); - }, - // 获取资料中心 - queryResourceMsgByPage() { - this.MsgResourceInfoEOPage.msgType = "RESOURCE"; - this.MsgResourceInfoEOPage.rowLimit = 10; - this.$http.get("lawss/msgDynamicInfo/page", this.MsgResourceInfoEOPage, { - _this: this, - loading: "loading.resourceLoading" - }, res => { - this.resourceMsgList = res.data.list; - }, e => { - }); - }, - showMsgDetails(id, pageType) { - this.$store.commit("setDetailMap", this.$route.path); - this.$router.push({ - name: "DomesticDynamicsDetails", - params: { - id: id, - pageType: pageType - } - }); - }, - showDynmicMsgDetails(item) { - let isContains = 0; - if (this.roleModuleList != null && this.roleModuleList.length > 0) { - for (let module in this.roleModuleList) { - if (this.roleModuleList[module].id === item.msgMode) { - isContains = 1; - break; - } - } - if (isContains === 1) { - this.$store.commit("setDetailMap", this.$route.path); - this.$router.push({ - name: "DomesticDynamicsDetails", - params: { - id: item.id, - pageType: item.msgType + "_MSG" - } - }); - } else { - this.$message.error("当前角色无权限查看此信息"); - } - } else { - this.$message.error("当前角色无权限查看此信息"); - } - }, queryProductionVehicleByPage() { - this.$http.get("lawss/msgSarPutTime/page", { + this.$http.get("sys/EarlyWarning/StandWarning", { sarPutType: "ZCCSSRQ", pageSize: 5 }, { @@ -589,120 +487,16 @@ export default { }); }, queryNewTypeByPage() { - this.$http.get("lawss/msgSarPutTime/page", { + this.$http.get("sys/EarlyWarning/StandWarning", { sarPutType: "XCXSSRQ", pageSize: 5 }, { _this: this }, res => { - this.newTypeDatas = res.data.list; + // this.newTypeDatas = res.data.list; }, e => { }); }, - queryNewProductionByPage() { - this.$http.get("lawss/msgSarPutTime/page", { - warnType: "STAND", - sarPutType: "NEWPRODUCT", - pageSize: 5 - }, { - _this: this - }, res => { - this.newProductionDatas = res.data.list; - }, e => { - }); - }, - /* - *@description:新车型条款预警Table - *@modifyContent: - *@author: 刘志超 - *@date: 2020-09-16 10:02:10 - */ - querynewCarWarningByPage() { - this.$http.get("lawss/msgSarPutTime/page", { - warnType: "ITEM", - sarPutType: "NEWCAR", - pageSize: 5 - }, { - _this: this - }, res => { - this.newCarWarning = res.data.list; - }, e => { - }); - }, - /* - *@description:在产车条款预警Table - *@modifyContent: - *@author: 刘志超 - *@date: 2020-09-16 10:02:19 - */ - queryProducCarWarningByPage() { - this.$http.get("lawss/msgSarPutTime/page", { - warnType: "ITEM", - sarPutType: "PRODUCT", - pageSize: 5 - }, { - _this: this - }, res => { - this.producCarWarning = res.data.list; - }, e => { - }); - }, - /** - * @description: 本地动态搜索 - * @author: chenxiaoxi - * @date: 2018/10/19 15:15:30 - */ - queryDynamicInformation(formName) { - this.$refs[formName].validate((valid) => { - if (valid) { - this.$router.push({ - name: "QueryDynamicInformation", - query: { - keywords: this.dynamic.keyWord, - startTime: this.dynamic.openData !== "" ? this.dateFormat(this.dynamic.openData) : "", - endTime: this.dynamic.closeData !== "" ? this.dateFormat(this.dynamic.closeData) : "" - } - }); - } else { - this.$message.error("请检查表单是否填写正确"); - } - }); - }, - // 获取轮播图 - getHorseLantern() { - this.$http.get("lawss/msgDynamicInfo/queryNewsPic", { - rowLimit: 5 - }, { - _this: this - }, res => { - this.imgInformationList = res.data.list; - }, e => { - }); - }, - - /** - * @description: 查看图片信息详情 - * @author: chenxiaoxi - * @date: 2018/10/26 14:08:38 - */ - imgInformationDetail(information) { - this.setDetailMap(this.$route.path); - this.$router.push({ - name: "DomesticDynamicsDetails", - params: { - id: information.id, - pageType: information.msgType - } - }); - }, - isNew(pubTime) { - if (pubTime != null && pubTime !== "" && pubTime !== undefined) { - pubTime = pubTime.replace(new RegExp(/-/gm), "/"); - return new Date().getTime() - new Date(pubTime).getTime() < 7 * 24 * 3600 * 1000; - } else { - return ""; - } - }, /** * @description: 日期转换 * @author: chenxiaoxi @@ -717,43 +511,48 @@ export default { getDate(date) { return date !== undefined && date != null ? date.split(" ")[0] : ""; }, - /** - * @description: 轮播点击 - * @author: chenxiaoxi - * @date: 2018/11/10 13:22:15 - */ - swiperClick(index) { - if (index === 6 || index === 0) { - this.imgInformationDetail(this.imgInformationList[0]); - } else { - this.imgInformationDetail(this.imgInformationList[index - 1]); - } - }, - // 查询当前登录人拥有的全部模块权限 - showRoleModules() { - this.$http.get("lawss/msgModule/selectMsgModuleByRole", {}, { _this: this }, res => { - if (res.data) { - this.roleModuleList = res.data; - } - }); - }, - handlePageChange(field, page) { switch (field) { - case "newModel": - break; - case "": - break; + // 新车型实施日期预警 + case 'newItems': + this.pageConfig.current1 = page + break + // 新车型条款预警 + case 'newStand': + this.pageConfig.current2 = page + break + // 在产车实施日期预警 + case 'oldItems': + this.pageConfig.current3 = page + break + // 在产车条款预警 + case 'oldStand': + this.pageConfig.current4 = page + break } + this.getEarlyDate() }, - + //分页每页显示数改变后方法 handlePageSizeChange(field, pageSize) { switch (field) { - case "newModel": - break; - case "": - break; + // 新车型实施日期预警 + case 'newItems': + this.pageConfig.pageSize1 = pageSize + break + // 新车型条款预警 + case 'newStand': + this.pageConfig.pageSize2 = pageSize + break + // 在产车实施日期预警 + case 'oldItems': + this.pageConfig.pageSize3 = pageSize + break + // 在产车条款预警 + case 'oldStand': + this.pageConfig.pageSize4 = pageSize + break } + this.getEarlyDate() }, ...mapMutations(["setDetailMap"]) }, @@ -763,9 +562,6 @@ export default { } }, computed: { - showSwiper() { - return this.imgInformationList.length; - }, containerStyle() { return this.activeName === 'POLICY' ? { height: '100%' @@ -778,19 +574,9 @@ export default { window.onresize = () => { this.height = $(".content").height() * 0.4; }; - // this.queryMsgByPage() - // this.queryForeignMsgByPage() - // this.queryResourceMsgByPage() this.queryNewTypeByPage(); this.queryProductionVehicleByPage(); - // this.queryNewProductionByPage() - // this.querynewCarWarningByPage() - // this.queryProducCarWarningByPage() - // this.showRoleModules() - this.getHorseLantern(); - for (let key in this.dynamic) { - this.dynamic[key] = ""; - } + this.getEarlyDate(); } }; diff --git a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue index 0f2d7fe71..d10b5e7c4 100644 --- a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue +++ b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue @@ -318,10 +318,6 @@ - - - - { - this.$http.post('lawss/sarStandardsInfo/deleteSarStandards', {ids: this.selectedList.join(',')}, { + this.$http.post('sarStandardsInfo/sar-standards-info/deleteSarStandards', {ids: this.selectedList.join(',')}, { _this: this }, res => { if (res.ok) { @@ -2289,7 +2290,7 @@ export default { }, // 模板下载 uploadImportModal (flag) { - window.open('/api/lawss/sarStandardsInfo/exportTemplate?standType=INLAND') + window.open('/api/sarStandardsInfo/sar-standards-info/exportTemplate') // if (flag === 1) { // } else { // window.open('/api/lawss/sarStandardsInfo/exportTemplate?fileName=标准条目导入模板.xlsx') @@ -2336,7 +2337,7 @@ export default { validateStandNumber (standinfo) { return new Promise((resolve, reject) => { let obj = JSON.parse(JSON.stringify(standinfo)) - this.$http.post('sarStandardsInfo/sar-standards-info/updateSarStandardsInfo', obj, { + this.$http.post('sarStandardsInfo/sar-standards-info/validateStandNumber', obj, { _this: this }, res => { if (res.ok) { @@ -2366,9 +2367,6 @@ export default { if (flag) { // 时间格式修改 let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO)) - // if (nowstandinfo.issueTime != null && nowstandinfo.issueTime !== '') { - // nowstandinfo.issueTime = this.$moment(this.sarStandardsInfoEO.issueTime).format('YYYY-MM-DD') - // } if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') { nowstandinfo.putTime = this.$dateFormat(this.sarStandardsInfoEO.putTime, 'yyyy-MM-dd hh:mm:ss') } @@ -2398,13 +2396,6 @@ export default { sarStandAttrObj[item.attrField] = nowstandinfo[item.attrField] }) nowstandinfo['sarStandAttrEOStr'] = JSON.stringify(sarStandAttrObj).replace(/"/g, "'") - // 判断三个实施日期不能全部未N/A和TBD - // if ((nowstandinfo.EOPSSRQ === 'N/A' || nowstandinfo.EOPSSRQ === 'TBD' || nowstandinfo.EOPSSRQ === '已实施') && - // (nowstandinfo.XCXSSRQ === 'N/A' || nowstandinfo.XCXSSRQ === 'TBD' || nowstandinfo.XCXSSRQ === '已实施') && - // (nowstandinfo.ZCCSSRQ === 'N/A' || nowstandinfo.ZCCSSRQ === 'TBD' || nowstandinfo.ZCCSSRQ === '已实施')) { - // this.isSubmit = false - // return this.$message.warning('实施日期必须有一项为日期格式') - // } this.$http.postData(this.addOrUPdateFlag === 1 ? 'lawss/sarStandardsInfo/addarStandardsInfo' : 'lawss/sarStandardsInfo/updateSarStandardsInfo', nowstandinfo, { _this: this }, res => { @@ -2479,7 +2470,6 @@ export default { formData.standType = 'INLAND' this.SarExportSearchEo = formData this.loading = true - console.log(2496) this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', formData, { _this: this, loading: 'loading' }, res => { diff --git a/src/sysConfig/index.js b/src/sysConfig/index.js index 499dbd32c..f43adce8e 100644 --- a/src/sysConfig/index.js +++ b/src/sysConfig/index.js @@ -4,10 +4,10 @@ * @date: 2018-09-04 17:47:46 */ // 服务器地址 -const devIp = '39.98.140.126' -const devInterfacePORT = '10005' -// const devIp = '192.168.10.145' -// const devInterfacePORT = '9999' +// const devIp = '39.98.140.126' +// const devInterfacePORT = '10005' +const devIp = '192.168.10.47' +const devInterfacePORT = '9999' // 云端端口号 const DEV_CLOUD_RES_INTERFACE_PORT = '7777' const simpleFilePath = 'att/attFile/upload'