update code
parent
69e2d0cb35
commit
300608c53e
|
@ -48,6 +48,16 @@ public class GreenCarbonData extends BaseEntity
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||||
private Long isDel;
|
private Long isDel;
|
||||||
|
|
||||||
|
private Date dataDate;
|
||||||
|
|
||||||
|
public Date getDataDate() {
|
||||||
|
return dataDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataDate(Date dataDate) {
|
||||||
|
this.dataDate = dataDate;
|
||||||
|
}
|
||||||
|
|
||||||
private GreenCarbonItem greenCarbonItem;
|
private GreenCarbonItem greenCarbonItem;
|
||||||
|
|
||||||
public GreenCarbonItem getGreenCarbonItem() {
|
public GreenCarbonItem getGreenCarbonItem() {
|
||||||
|
|
|
@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="comId" column="com_id" />
|
<result property="comId" column="com_id" />
|
||||||
<result property="projectId" column="project_id" />
|
<result property="projectId" column="project_id" />
|
||||||
|
<result property="dataDate" column="data_date"/>
|
||||||
<result property="itemId" column="item_id" />
|
<result property="itemId" column="item_id" />
|
||||||
<result property="estimateValue" column="estimate_value" />
|
<result property="estimateValue" column="estimate_value" />
|
||||||
<result property="practicalValue" column="practical_value" />
|
<result property="practicalValue" column="practical_value" />
|
||||||
|
@ -30,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectGreenCarbonDataVo">
|
<sql id="selectGreenCarbonDataVo">
|
||||||
select gd.id, gd.com_id, gd.project_id, gd.item_id, gd.estimate_value, gd.practical_value, gd.state,
|
select gd.id, gd.com_id, gd.project_id,gd.data_date, gd.item_id, gd.estimate_value, gd.practical_value, gd.state,
|
||||||
gd.remark, gd.is_del, gd.create_by, gd.create_time, gd.update_by, gd.update_time,
|
gd.remark, gd.is_del, gd.create_by, gd.create_time, gd.update_by, gd.update_time,
|
||||||
dp.`dept_name` comp_name,pi.`project_name`,g.id gid,g.carbon_factor_type,g.carbon_name,g.unit,g.carbon_factor
|
dp.`dept_name` comp_name,pi.`project_name`,g.id gid,g.carbon_factor_type,g.carbon_name,g.unit,g.carbon_factor
|
||||||
from green_carbon_data gd
|
from green_carbon_data gd
|
||||||
|
@ -62,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="comId != null">com_id,</if>
|
<if test="comId != null">com_id,</if>
|
||||||
<if test="projectId != null">project_id,</if>
|
<if test="projectId != null">project_id,</if>
|
||||||
|
<if test="dataDate != null">data_date,</if>
|
||||||
<if test="itemId != null">item_id,</if>
|
<if test="itemId != null">item_id,</if>
|
||||||
<if test="estimateValue != null">estimate_value,</if>
|
<if test="estimateValue != null">estimate_value,</if>
|
||||||
<if test="practicalValue != null">practical_value,</if>
|
<if test="practicalValue != null">practical_value,</if>
|
||||||
|
@ -76,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="comId != null">#{comId},</if>
|
<if test="comId != null">#{comId},</if>
|
||||||
<if test="projectId != null">#{projectId},</if>
|
<if test="projectId != null">#{projectId},</if>
|
||||||
|
<if test="dataDate != null">#{dataDate},</if>
|
||||||
<if test="itemId != null">#{itemId},</if>
|
<if test="itemId != null">#{itemId},</if>
|
||||||
<if test="estimateValue != null">#{estimateValue},</if>
|
<if test="estimateValue != null">#{estimateValue},</if>
|
||||||
<if test="practicalValue != null">#{practicalValue},</if>
|
<if test="practicalValue != null">#{practicalValue},</if>
|
||||||
|
@ -94,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="comId != null">com_id = #{comId},</if>
|
<if test="comId != null">com_id = #{comId},</if>
|
||||||
<if test="projectId != null">project_id = #{projectId},</if>
|
<if test="projectId != null">project_id = #{projectId},</if>
|
||||||
|
<if test="dataDate != null">data_date = #{dataDate},</if>
|
||||||
<if test="itemId != null">item_id = #{itemId},</if>
|
<if test="itemId != null">item_id = #{itemId},</if>
|
||||||
<if test="estimateValue != null">estimate_value = #{estimateValue},</if>
|
<if test="estimateValue != null">estimate_value = #{estimateValue},</if>
|
||||||
<if test="practicalValue != null">practical_value = #{practicalValue},</if>
|
<if test="practicalValue != null">practical_value = #{practicalValue},</if>
|
||||||
|
|
|
@ -1,108 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container green-carbon-data">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="公司主键" prop="comId">
|
<el-tabs v-model="data.selTab" type="card" class="main-tab">
|
||||||
<el-input
|
<el-tab-pane v-for="(it, idx) in data.types" :key="idx" :name="it.value" :label="it.text"></el-tab-pane>
|
||||||
v-model="queryParams.comId"
|
|
||||||
placeholder="请输入公司主键"
|
</el-tabs>
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分包单位" prop="projectId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.projectId"
|
|
||||||
placeholder="请输入分包单位"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="因子ID-外键" prop="itemId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.itemId"
|
|
||||||
placeholder="请输入因子ID-外键"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="预估使用数量" prop="estimateValue">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.estimateValue"
|
|
||||||
placeholder="请输入预估使用数量"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label=" 实际使用量" prop="practicalValue">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.practicalValue"
|
|
||||||
placeholder="请输入 实际使用量"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="state">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.state"
|
|
||||||
placeholder="请输入状态"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="${comment}" prop="isDel">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.isDel"
|
|
||||||
placeholder="请输入${comment}"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||||
type="primary"
|
v-hasPermi="['manage:greenCarbonData:add']">新增</el-button>
|
||||||
plain
|
|
||||||
icon="Plus"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['manage:greenCarbonData:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||||
type="success"
|
v-hasPermi="['manage:greenCarbonData:remove']">删除</el-button>
|
||||||
plain
|
|
||||||
icon="Edit"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['manage:greenCarbonData:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['manage:greenCarbonData:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['manage:greenCarbonData:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="greenCarbonDataList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="greenCarbonDataList" @selection-change="handleSelectionChange">
|
||||||
|
@ -118,19 +33,16 @@
|
||||||
<el-table-column label="${comment}" align="center" prop="isDel" />
|
<el-table-column label="${comment}" align="center" prop="isDel" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:greenCarbonData:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:greenCarbonData:remove']">删除</el-button>
|
v-hasPermi="['manage:greenCarbonData:edit']">修改</el-button>
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['manage:greenCarbonData:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||||
v-show="total>0"
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
:total="total"
|
|
||||||
v-model:page="queryParams.pageNum"
|
|
||||||
v-model:limit="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改建碳管理对话框 -->
|
<!-- 添加或修改建碳管理对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||||
|
@ -172,7 +84,7 @@
|
||||||
|
|
||||||
<script setup name="GreenCarbonData">
|
<script setup name="GreenCarbonData">
|
||||||
import { listGreenCarbonData, getGreenCarbonData, delGreenCarbonData, addGreenCarbonData, updateGreenCarbonData } from "@/api/manage/greenCarbonData";
|
import { listGreenCarbonData, getGreenCarbonData, delGreenCarbonData, addGreenCarbonData, updateGreenCarbonData } from "@/api/manage/greenCarbonData";
|
||||||
|
import greenCarbonData, { getGreenCarbon } from "../greenCarbonItem/greenCarbonData";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
const greenCarbonDataList = ref([]);
|
const greenCarbonDataList = ref([]);
|
||||||
|
@ -199,7 +111,9 @@ const data = reactive({
|
||||||
isDel: null,
|
isDel: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
}
|
},
|
||||||
|
types: greenCarbonData.types,
|
||||||
|
selTab: 1
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
@ -318,3 +232,15 @@ function handleExport() {
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.green-carbon-data{
|
||||||
|
.main-tab{
|
||||||
|
.el-tabs__item{
|
||||||
|
&.is-active{
|
||||||
|
background-color: rgb(64, 158, 255);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue