-
+
@@ -62,7 +62,7 @@
@@ -143,34 +143,34 @@
{{ scope.row.standName }}
-
+
- {{ scope.row.standCode }}
+ {{ scope.row.itemsNum }}
-
+
- {{ scope.row.standName }}
+ {{ scope.row.itemsName }}
- {{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.putTime ? scope.row.putTime.substring(0, 10) : '' }}
-
+
- {{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.ssrq ? scope.row.ssrq.substring(0,10) : '' }}
-
+
- {{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.xcxssrq ? scope.row.xcxssrq.substring(0,10) : '' }}
-
+
- {{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}
+ {{ scope.row.zccssrq ? scope.row.zccssrq.substring(0,10) : '' }}
@@ -187,173 +187,12 @@
handlePageChange('newItems', page)"
- @pageSizeChange="pageSize => handlePageSizeChange('newItems', pageSize)">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ @pageChange="page => handlePageChange('page', page)"
+ @pageSizeChange="pageSize => handlePageSizeChange('pageSize', pageSize)">
@@ -370,6 +209,8 @@ export default {
name: "standardWarning",
data() {
return {
+ //
+ warningTableDatas:[],
warningTableHeight: '',
applyArcticOptions: [], // 适用车型下拉框
isShowBtn: true,
@@ -380,8 +221,14 @@ export default {
standCode: "",
//标准名称
standName: "",
+ //发布日期
+ putTime: [],
//实施日期
- putTime: "",
+ SSRQ: [],
+ //新车型实施日期
+ XCXSSRQ: [],
+ //在产车实施日期
+ ZCCSSRQ: [],
//适用车型
applyType: "",
},
@@ -402,33 +249,11 @@ export default {
oldPolicy: [],
tableHeight: 0,
pageConfig: {
- newItemsPage: 1,
- newItemsPageSize: 10,
- count1: 0,
- newStandPage: 1,
- newStandPageSize: 10,
- count2: 0,
- oldItemsPage: 1,
- oldItemsPageSize: 10,
- count3: 0,
- oldStandPage: 1,
- oldStandPageSize: 10,
- count4: 0,
- newPolicyPage: 1,
- newPolicyPageSize: 10,
- count5: 0,
- oldPolicyPage: 1,
- oldPolicyPageSize: 10,
- count6: 0,
- },
- loading: {
- newItems: false,
- oldItems: false,
- newStand: false,
- oldStand: false,
- newPolicy: false,
- oldPolicy: false,
+ page: 1,
+ pageSize: 10,
+ total: 0,
},
+ warningTableLoading: false,
// 记录当前分页器是哪个预警信息触发
field: ''
};
@@ -436,8 +261,8 @@ export default {
methods: {
// 获取标准预警数据 (type用于区别分页器切换)
getEarlyDate() {
- this.loading[this.field] = true
- this.$http.get('sys/EarlyWarning/StandWarning', {
+ this.warningTableLoading = true
+ this.$http.get('sys/EarlyWarning/getStandWarning', {
applyType: '',
...this.pageConfig
}, {
@@ -516,9 +341,7 @@ export default {
break
}
}
- for (const loading in this.loading) {
- this.loading[loading] = false
- }
+ this.warningTableLoading = false
}, e => {
});
},
@@ -579,30 +402,56 @@ export default {
},
//查找适用车型
searchBtnClick() {
- this.$http.get('StandWarning/getStandWarning', {
+ this.warningTableLoading = true
+ this.$http.get('sys/EarlyWarning/getStandWarning', {
...this.pageConfig,
//标准编号
standCode: this.dynamic.standCode,
//标准名称
standName: this.dynamic.standName,
+ //发布日期
+ startPutTime: this.dynamic.putTime[0],
+ endPutTime: this.dynamic.putTime[1],
//实施日期
- putTime: this.dynamic.putTime[0],
- lastTime: this.dynamic.putTime[1],
+ startSSRQ: this.dynamic.SSRQ[0],
+ endSSRQ: this.dynamic.SSRQ[1],
+ //新车型实施日期
+ startXCXSSRQ: this.dynamic.XCXSSRQ[0],
+ endXCXSSRQ: this.dynamic.XCXSSRQ[1],
+ //在产车实施日期
+ startZCCSSRQ: this.dynamic.ZCCSSRQ[0],
+ endZCCSSRQ: this.dynamic.ZCCSSRQ[1],
//适用车型
applyType: this.dynamic.applyType
}, {
_this: this,
}, res => {
- const result = res.data[0]
- for (const type in result) {
- this[type] = result[type].records
+ console.log('608',res)
+ // 适用车型转换
+ for (let a = 0; a < res.data.records.length; a++) {
+ if (res.data.records[a].applyType !== null) {
+ let k = (res.data.records[a].applyType || "").split(",");
+ for (let i in this.energyKindOptions) {
+ for (let m = 0; m < k.length; m++) {
+ if (this.energyKindOptions[i].value === k[m]) {
+ k[m] = this.energyKindOptions[i].label;
+ }
+ res.data.records[a].applyType = k.join(",");
+ }
+ }
+ }
}
- this.newItemsPage = 1
- this.oldItemsPage = 1
- this.newStandPage = 1
- this.oldStandPage = 1
- this.newPolicyPage = 1
- this.oldPolicypage = 1
+ this.warningTableDatas = res.data.records
+ this.pageConfig.page = res.data.current
+ if ((this.warningTableDatas.length === 0 || this.warningTableDatas === []) && this.pageConfig.page !== 1) {
+ this.warningTableLoading = true
+ this.handlePageChange('page', 1)
+ }else {
+ this.warningTableLoading = false
+ }
+ this.pageConfig.pageSize = res.data.size
+ this.pageConfig.total = res.data.total
+ // this.warningTableLoading = false
}, e => {
})
},
@@ -612,8 +461,14 @@ export default {
standCode: "",
//标准名称
standName: "",
+ //发布日期
+ putTime: [],
//实施日期
- putTime: "",
+ SSRQ: [],
+ //新车型实施日期
+ XCXSSRQ: [],
+ //在产车实施日期
+ ZCCSSRQ: [],
//适用车型
applyType: "",
}
@@ -714,41 +569,21 @@ export default {
return date !== undefined && date != null ? date.split(" ")[0] : "";
},
handlePageChange(field, page) {
- switch (field) {
- // 新车型实施日期预警
- case 'newItems':
- this.pageConfig.newItemsPage = page
- break
- // 新车型条款预警
- case 'newStand':
- this.pageConfig.newStandPage = page
- break
- // 在产车实施日期预警
- case 'oldItems':
- this.pageConfig.oldItemsPage = page
- break
- // 在产车条款预警
- case 'oldStand':
- this.pageConfig.oldStandPage = page
- break
- // 政策新车型实施日期预警
- case 'newPolicy':
- this.pageConfig.newPolicyPage = page
- break
- //政策 在产车实施日期预警
- case 'oldPolicy':
- this.pageConfig.oldPolicyPage = page
- break
- }
+ this.pageConfig.page = page
+ this.searchBtnClick()
+ console.log('735',this.warningTableDatas)
this.activeName === 'STANDARD' ? this.getEarlyDate() : this.getPolicyDate()
this.field = field
},
//分页每页显示数改变后方法
handlePageSizeChange(field, pageSize) {
- const _pageSize = field + 'PageSize'
- this.pageConfig[_pageSize] = pageSize
- this.activeName === 'STANDARD' ? this.getEarlyDate() : this.getPolicyDate()
- this.field = field
+ // const _pageSize = field + 'PageSize'
+ // this.pageConfig[_pageSize] = pageSize
+ this.pageConfig.pageSize = pageSize
+ this.searchBtnClick()
+ console.log('771',this.warningTableDatas)
+ // this.activeName === 'STANDARD' ? this.getEarlyDate() : this.getPolicyDate()
+ // this.field = field
},
...mapMutations(["setDetailMap"])
},
@@ -759,17 +594,22 @@ export default {
},
computed: {
containerStyle() {
- return this.activeName === 'POLICY' ? {
- height: '100%'
- } : {}
+ this.$nextTick(() => {
+ return this.activeName === 'POLICY' ? {
+ height: '100%'
+ } : {}
+ })
}
},
watch: {},
mounted() {
- this.warningTableHeight = $(window).height()*0.54
- window.onresize = () => {
- this.warningTableHeight = $(window).height()*0.54;
- };
+ this.warningTableLoading = true
+ // this.$nextTick(() => {
+ // this.warningTableHeight = $(window).height()*0.54
+ // window.onresize = () => {
+ // this.warningTableHeight = $(window).height()*0.54;
+ // };
+ // })
// alert(this.warningTableHeight)
// this.height = $(".content").height();
// window.onresize = () => {
@@ -782,100 +622,25 @@ export default {
this.energyKindOptions = res.data.ENERGYTYPES; // 文本状态
this.applyArcticOptions = res.data.ENERGYTYPES // 适用车型
this.zrgcs = res.data.ZRGCSCLASS;
- this.loading[this.field] = true
- this.$http.get('sys/EarlyWarning/StandWarning', {
+ this.warningTableLoading = true
+ this.$http.get('sys/EarlyWarning/getStandWarning', {
applyType: '',
...this.pageConfig
}, {
_this: this
}, res => {
- const result = res.data[0]
- for (const field in result) {
- this[field] = result[field].records
- this[field].forEach(item => {
- // 适用车型转换
- if (item.applyType !== null) {
- let k = (item.applyType || "").split(",");
- for (let i in this.energyKindOptions) {
- for (let m = 0; m < k.length; m++) {
- if (this.energyKindOptions[i].value === k[m]) {
- k[m] = this.energyKindOptions[i].label;
- }
- item.applyType = k.join(",");
- }
- }
- }
- // 责任工程师转换
- if (item.dutyEngineer !== null) {
- let k = (item.dutyEngineer || "").split(",");
- for (let i in this.zrgcs) {
- for (let m = 0; m < k.length; m++) {
- if (this.zrgcs[i].value === k[m]) {
- k[m] = this.zrgcs[i].label;
- }
- item.dutyEngineer = k.join(",");
- }
- }
- }
- })
- let arr = result.newItems.records
- arr.forEach(item => {
- // 适用车型转换
- if (item.applyType !== null) {
- let k = (item.applyType || "").split(",");
- for (let i in this.energyKindOptions) {
- for (let m = 0; m < k.length; m++) {
- if (this.energyKindOptions[i].value === k[m]) {
- k[m] = this.energyKindOptions[i].label;
- }
- item.applyType = k.join(",");
- }
- }
- }
- // 责任工程师转换
- if (item.dutyEngineer !== null) {
- let k = (item.dutyEngineer || "").split(",");
- for (let i in this.zrgcs) {
- for (let m = 0; m < k.length; m++) {
- if (this.zrgcs[i].value === k[m]) {
- k[m] = this.zrgcs[i].label;
- }
- item.dutyEngineer = k.join(",");
- }
- }
- }
- })
- this.newItems = arr
- //可能还需要调整一下条款或标准的顺序(zyh)
- switch (field) {
- case 'newItems':
- this.pageConfig.count1 = result.newItems.total
- break
- case 'oldItems':
- this.pageConfig.count2 = result.oldItems.total
- break
- case 'newStand':
- this.pageConfig.count3 = result.newStand.total
- break
- case 'oldStand':
- this.pageConfig.count4 = result.oldStand.total
- break
- }
- }
- for (const loading in this.loading) {
- this.loading[loading] = false
- }
+ console.log('805',res)
+ this.warningTableDatas = res.data.records
+ this.pageConfig.page = res.data.current
+ this.pageConfig.pageSize = res.data.size
+ this.pageConfig.total = res.data.total
+ this.getEarlyDate();
+ this.warningTableLoading = false
}, e => {
});
});
- // this.queryNewTypeByPage();
- // this.queryProductionVehicleByPage();
- // 四个预警同时查询,loading全部打开
- for (const loading in this.loading) {
- this.loading[loading] = true
- }
- this.getEarlyDate();
+
}
};
@@ -998,6 +763,7 @@ export default {
}
.container {
+ height: calc(100% - 139px);
/deep/ .el-tabs__header {
height: 50px;
}