饮用水水期代码bug修复
This commit is contained in:
@@ -74,13 +74,18 @@
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
<template #action="{text,record}">
|
||||
<template #waterCode="{text,record}">
|
||||
|
||||
<span >
|
||||
{{
|
||||
record.reportTime.getMonth()==null ||record.reportTime.getMonth().getMonth()==1 || record.reportTime.getMonth().getMonth() == 2 ||record.reportTime.getMonth() == 3 ||record.reportTime.getMonth()==12
|
||||
|
||||
record.reportTime.substr(5,2)=="01" || record.reportTime.substr(5,2) == "02" ||record.reportTime.substr(5,2) == "03" ||record.reportTime.substr(5,2)=="12"
|
||||
? text="K":
|
||||
record.reportTime.getMonth()==4 || record.reportTime.getMonth() == 5 ||record.reportTime.getMonth()==10||record.reportTime.getMonth()==11
|
||||
? text="P": text="F"
|
||||
record.reportTime.substr(5,2)=="04" || record.reportTime.substr(5,2) == "05" ||record.reportTime.substr(5,2)=="10"||record.reportTime.substr(5,2)=="11"
|
||||
? text="P":
|
||||
record.reportTime.substr(5,2)=="06" || record.reportTime.substr(5,2) == "07" ||record.reportTime.substr(5,2)=="08"||record.reportTime.substr(5,2)=="09"
|
||||
? text="F":text="无采样时间"
|
||||
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
@@ -104,7 +109,7 @@ import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import { tableColumns } from "./colums";
|
||||
// import moment from "moment";
|
||||
// import utils from "./utils";
|
||||
const columns =tableColumns;
|
||||
// const columns =tableColumns;
|
||||
|
||||
// {
|
||||
// title: "创建人",
|
||||
@@ -126,7 +131,19 @@ export default {
|
||||
// 表格数据接口
|
||||
url: pageDrinkingWaterStatisticUrl,
|
||||
selection: [],
|
||||
columns,
|
||||
columns:[
|
||||
// {
|
||||
// title: "水期代码",
|
||||
// dataIndex: "waterPhaseCode",
|
||||
// sorter: true,
|
||||
// slots:{customRender:'waterCode' }
|
||||
// },
|
||||
...tableColumns,
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
// 表格列配置
|
||||
|
||||
// palceOptions: [],
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import moment from "moment"
|
||||
const tableColumns = [
|
||||
|
||||
{ title: "断面名称", dataIndex: "place", sorter: true, },
|
||||
{ title: "断面代码", dataIndex: "sectionCode", sorter: true, },
|
||||
{ title: "水源名称", dataIndex: "sourceWaterName", sorter: true, },
|
||||
@@ -11,7 +10,7 @@ const tableColumns = [
|
||||
{ title: "本月取水量", dataIndex: "waterWithdrawal", sorter: true, },
|
||||
{ title: "采样时间", dataIndex: "reportTime", sorter: true, customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")},
|
||||
{ title: "水期代码", dataIndex: "waterPhaseCode",sorter: true,
|
||||
scopedSlots:{customRender:'action' }
|
||||
slots:{customRender:'waterCode' }
|
||||
},
|
||||
{ title: "水温", dataIndex: "waterTemperature", sorter: true, },
|
||||
// {title: "采样时间",dataIndex: "monitorTime",sorter: true,},
|
||||
|
||||
Reference in New Issue
Block a user