工程管理 项目代码
This commit is contained in:
parent
0cffeff257
commit
4fe4fcc112
@ -0,0 +1,547 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="时间" prop="nowTimeOne">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.nowTimeOne"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间2" prop="nowTimeTwo">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.nowTimeTwo"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间2">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeOne">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeOne"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeTwo">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeTwo"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeThree">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeThree"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFour">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFour"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFive">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFive"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSix">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSix"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeven">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSeven"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEleven">
|
||||
<el-input
|
||||
v-model="queryParams.fieldEleven"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNine">
|
||||
<el-input
|
||||
v-model="queryParams.fieldNine"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldTen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEight">
|
||||
<el-input
|
||||
v-model="queryParams.fieldEight"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTwelve">
|
||||
<el-input
|
||||
v-model="queryParams.fieldTwelve"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldThirteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldThirteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFourteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFourteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFifteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFifteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSixteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSixteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNineteen">
|
||||
<el-select v-model="queryParams.fieldNineteen" placeholder="请选择${comment}" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="energyGeneralInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键id" align="center" prop="id" />
|
||||
<el-table-column label="模块区分" align="center" prop="moduleType" />
|
||||
<el-table-column label="时间" align="center" prop="nowTimeOne" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.nowTimeOne, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间2" align="center" prop="nowTimeTwo" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.nowTimeTwo, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="${comment}" align="center" prop="remark" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeOne" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeTwo" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeThree" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFour" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFive" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSix" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSeven" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEleven" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldNine" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldTen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEight" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldTwelve" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldThirteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFourteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFifteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSixteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSeventeen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEighteen" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.fieldEighteen" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="${comment}" align="center" prop="fieldNineteen">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.fieldNineteen"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改新能源通用对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="时间" prop="nowTimeOne">
|
||||
<el-date-picker clearable
|
||||
v-model="form.nowTimeOne"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间2" prop="nowTimeTwo">
|
||||
<el-date-picker clearable
|
||||
v-model="form.nowTimeTwo"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间2">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeOne">
|
||||
<el-input v-model="form.fieldLikeOne" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeTwo">
|
||||
<el-input v-model="form.fieldLikeTwo" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeThree">
|
||||
<el-input v-model="form.fieldLikeThree" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFour">
|
||||
<el-input v-model="form.fieldFour" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFive">
|
||||
<el-input v-model="form.fieldFive" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSix">
|
||||
<el-input v-model="form.fieldSix" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeven">
|
||||
<el-input v-model="form.fieldSeven" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEleven">
|
||||
<el-input v-model="form.fieldEleven" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNine">
|
||||
<el-input v-model="form.fieldNine" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTen">
|
||||
<el-input v-model="form.fieldTen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEight">
|
||||
<el-input v-model="form.fieldEight" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTwelve">
|
||||
<el-input v-model="form.fieldTwelve" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldThirteen">
|
||||
<el-input v-model="form.fieldThirteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFourteen">
|
||||
<el-input v-model="form.fieldFourteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFifteen">
|
||||
<el-input v-model="form.fieldFifteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSixteen">
|
||||
<el-input v-model="form.fieldSixteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeventeen">
|
||||
<file-upload v-model="form.fieldSeventeen"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEighteen">
|
||||
<image-upload v-model="form.fieldEighteen"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNineteen">
|
||||
<el-select v-model="form.fieldNineteen" placeholder="请选择${comment}">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEnergyGeneralInfo, getEnergyGeneralInfo, delEnergyGeneralInfo, addEnergyGeneralInfo, updateEnergyGeneralInfo } from "@/api/energy/energyGeneralInfo";
|
||||
|
||||
export default {
|
||||
name: "EnergyGeneralInfo",
|
||||
dicts: ['sys_user_sex'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 新能源通用表格数据
|
||||
energyGeneralInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
moduleType: null,
|
||||
nowTimeOne: null,
|
||||
nowTimeTwo: null,
|
||||
fieldLikeOne: null,
|
||||
fieldLikeTwo: null,
|
||||
fieldLikeThree: null,
|
||||
fieldFour: null,
|
||||
fieldFive: null,
|
||||
fieldSix: null,
|
||||
fieldSeven: null,
|
||||
fieldEleven: null,
|
||||
fieldNine: null,
|
||||
fieldTen: null,
|
||||
fieldEight: null,
|
||||
fieldTwelve: null,
|
||||
fieldThirteen: null,
|
||||
fieldFourteen: null,
|
||||
fieldFifteen: null,
|
||||
fieldSixteen: null,
|
||||
fieldSeventeen: null,
|
||||
fieldEighteen: null,
|
||||
fieldNineteen: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询新能源通用列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listEnergyGeneralInfo(this.queryParams).then(response => {
|
||||
this.energyGeneralInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
moduleType: null,
|
||||
nowTimeOne: null,
|
||||
nowTimeTwo: null,
|
||||
remark: null,
|
||||
fieldLikeOne: null,
|
||||
fieldLikeTwo: null,
|
||||
fieldLikeThree: null,
|
||||
fieldFour: null,
|
||||
fieldFive: null,
|
||||
fieldSix: null,
|
||||
fieldSeven: null,
|
||||
fieldEleven: null,
|
||||
fieldNine: null,
|
||||
fieldTen: null,
|
||||
fieldEight: null,
|
||||
fieldTwelve: null,
|
||||
fieldThirteen: null,
|
||||
fieldFourteen: null,
|
||||
fieldFifteen: null,
|
||||
fieldSixteen: null,
|
||||
fieldSeventeen: null,
|
||||
fieldEighteen: null,
|
||||
fieldNineteen: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加新能源通用";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEnergyGeneralInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改新能源通用";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateEnergyGeneralInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addEnergyGeneralInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除新能源通用编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delEnergyGeneralInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('energy/energyGeneralInfo/export', {
|
||||
...this.queryParams
|
||||
}, `energyGeneralInfo_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,547 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="时间" prop="nowTimeOne">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.nowTimeOne"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间2" prop="nowTimeTwo">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.nowTimeTwo"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间2">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeOne">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeOne"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeTwo">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeTwo"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeThree">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeThree"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFour">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFour"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFive">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFive"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSix">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSix"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeven">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSeven"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEleven">
|
||||
<el-input
|
||||
v-model="queryParams.fieldEleven"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNine">
|
||||
<el-input
|
||||
v-model="queryParams.fieldNine"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldTen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEight">
|
||||
<el-input
|
||||
v-model="queryParams.fieldEight"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTwelve">
|
||||
<el-input
|
||||
v-model="queryParams.fieldTwelve"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldThirteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldThirteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFourteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFourteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFifteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFifteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSixteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSixteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNineteen">
|
||||
<el-select v-model="queryParams.fieldNineteen" placeholder="请选择${comment}" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="energyGeneralInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键id" align="center" prop="id" />
|
||||
<el-table-column label="模块区分" align="center" prop="moduleType" />
|
||||
<el-table-column label="时间" align="center" prop="nowTimeOne" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.nowTimeOne, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间2" align="center" prop="nowTimeTwo" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.nowTimeTwo, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="${comment}" align="center" prop="remark" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeOne" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeTwo" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeThree" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFour" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFive" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSix" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSeven" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEleven" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldNine" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldTen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEight" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldTwelve" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldThirteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFourteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFifteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSixteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSeventeen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEighteen" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.fieldEighteen" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="${comment}" align="center" prop="fieldNineteen">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.fieldNineteen"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改新能源通用对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="时间" prop="nowTimeOne">
|
||||
<el-date-picker clearable
|
||||
v-model="form.nowTimeOne"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间2" prop="nowTimeTwo">
|
||||
<el-date-picker clearable
|
||||
v-model="form.nowTimeTwo"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间2">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeOne">
|
||||
<el-input v-model="form.fieldLikeOne" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeTwo">
|
||||
<el-input v-model="form.fieldLikeTwo" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeThree">
|
||||
<el-input v-model="form.fieldLikeThree" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFour">
|
||||
<el-input v-model="form.fieldFour" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFive">
|
||||
<el-input v-model="form.fieldFive" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSix">
|
||||
<el-input v-model="form.fieldSix" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeven">
|
||||
<el-input v-model="form.fieldSeven" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEleven">
|
||||
<el-input v-model="form.fieldEleven" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNine">
|
||||
<el-input v-model="form.fieldNine" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTen">
|
||||
<el-input v-model="form.fieldTen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEight">
|
||||
<el-input v-model="form.fieldEight" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTwelve">
|
||||
<el-input v-model="form.fieldTwelve" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldThirteen">
|
||||
<el-input v-model="form.fieldThirteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFourteen">
|
||||
<el-input v-model="form.fieldFourteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFifteen">
|
||||
<el-input v-model="form.fieldFifteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSixteen">
|
||||
<el-input v-model="form.fieldSixteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeventeen">
|
||||
<file-upload v-model="form.fieldSeventeen"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEighteen">
|
||||
<image-upload v-model="form.fieldEighteen"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNineteen">
|
||||
<el-select v-model="form.fieldNineteen" placeholder="请选择${comment}">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEnergyGeneralInfo, getEnergyGeneralInfo, delEnergyGeneralInfo, addEnergyGeneralInfo, updateEnergyGeneralInfo } from "@/api/energy/energyGeneralInfo";
|
||||
|
||||
export default {
|
||||
name: "EnergyGeneralInfo",
|
||||
dicts: ['sys_user_sex'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 新能源通用表格数据
|
||||
energyGeneralInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
moduleType: null,
|
||||
nowTimeOne: null,
|
||||
nowTimeTwo: null,
|
||||
fieldLikeOne: null,
|
||||
fieldLikeTwo: null,
|
||||
fieldLikeThree: null,
|
||||
fieldFour: null,
|
||||
fieldFive: null,
|
||||
fieldSix: null,
|
||||
fieldSeven: null,
|
||||
fieldEleven: null,
|
||||
fieldNine: null,
|
||||
fieldTen: null,
|
||||
fieldEight: null,
|
||||
fieldTwelve: null,
|
||||
fieldThirteen: null,
|
||||
fieldFourteen: null,
|
||||
fieldFifteen: null,
|
||||
fieldSixteen: null,
|
||||
fieldSeventeen: null,
|
||||
fieldEighteen: null,
|
||||
fieldNineteen: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询新能源通用列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listEnergyGeneralInfo(this.queryParams).then(response => {
|
||||
this.energyGeneralInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
moduleType: null,
|
||||
nowTimeOne: null,
|
||||
nowTimeTwo: null,
|
||||
remark: null,
|
||||
fieldLikeOne: null,
|
||||
fieldLikeTwo: null,
|
||||
fieldLikeThree: null,
|
||||
fieldFour: null,
|
||||
fieldFive: null,
|
||||
fieldSix: null,
|
||||
fieldSeven: null,
|
||||
fieldEleven: null,
|
||||
fieldNine: null,
|
||||
fieldTen: null,
|
||||
fieldEight: null,
|
||||
fieldTwelve: null,
|
||||
fieldThirteen: null,
|
||||
fieldFourteen: null,
|
||||
fieldFifteen: null,
|
||||
fieldSixteen: null,
|
||||
fieldSeventeen: null,
|
||||
fieldEighteen: null,
|
||||
fieldNineteen: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加新能源通用";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEnergyGeneralInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改新能源通用";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateEnergyGeneralInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addEnergyGeneralInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除新能源通用编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delEnergyGeneralInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('energy/energyGeneralInfo/export', {
|
||||
...this.queryParams
|
||||
}, `energyGeneralInfo_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
547
god-ui/src/views/familyOcean/visualStatistics/pactList/index.vue
Normal file
547
god-ui/src/views/familyOcean/visualStatistics/pactList/index.vue
Normal file
@ -0,0 +1,547 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="时间" prop="nowTimeOne">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.nowTimeOne"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间2" prop="nowTimeTwo">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.nowTimeTwo"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间2">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeOne">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeOne"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeTwo">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeTwo"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeThree">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeThree"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFour">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFour"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFive">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFive"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSix">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSix"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeven">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSeven"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEleven">
|
||||
<el-input
|
||||
v-model="queryParams.fieldEleven"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNine">
|
||||
<el-input
|
||||
v-model="queryParams.fieldNine"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldTen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEight">
|
||||
<el-input
|
||||
v-model="queryParams.fieldEight"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTwelve">
|
||||
<el-input
|
||||
v-model="queryParams.fieldTwelve"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldThirteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldThirteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFourteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFourteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFifteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFifteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSixteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSixteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNineteen">
|
||||
<el-select v-model="queryParams.fieldNineteen" placeholder="请选择${comment}" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="energyGeneralInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键id" align="center" prop="id" />
|
||||
<el-table-column label="模块区分" align="center" prop="moduleType" />
|
||||
<el-table-column label="时间" align="center" prop="nowTimeOne" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.nowTimeOne, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间2" align="center" prop="nowTimeTwo" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.nowTimeTwo, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="${comment}" align="center" prop="remark" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeOne" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeTwo" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeThree" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFour" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFive" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSix" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSeven" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEleven" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldNine" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldTen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEight" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldTwelve" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldThirteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFourteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFifteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSixteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSeventeen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEighteen" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.fieldEighteen" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="${comment}" align="center" prop="fieldNineteen">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.fieldNineteen"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改新能源通用对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="时间" prop="nowTimeOne">
|
||||
<el-date-picker clearable
|
||||
v-model="form.nowTimeOne"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间2" prop="nowTimeTwo">
|
||||
<el-date-picker clearable
|
||||
v-model="form.nowTimeTwo"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间2">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeOne">
|
||||
<el-input v-model="form.fieldLikeOne" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeTwo">
|
||||
<el-input v-model="form.fieldLikeTwo" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeThree">
|
||||
<el-input v-model="form.fieldLikeThree" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFour">
|
||||
<el-input v-model="form.fieldFour" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFive">
|
||||
<el-input v-model="form.fieldFive" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSix">
|
||||
<el-input v-model="form.fieldSix" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeven">
|
||||
<el-input v-model="form.fieldSeven" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEleven">
|
||||
<el-input v-model="form.fieldEleven" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNine">
|
||||
<el-input v-model="form.fieldNine" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTen">
|
||||
<el-input v-model="form.fieldTen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEight">
|
||||
<el-input v-model="form.fieldEight" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTwelve">
|
||||
<el-input v-model="form.fieldTwelve" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldThirteen">
|
||||
<el-input v-model="form.fieldThirteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFourteen">
|
||||
<el-input v-model="form.fieldFourteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFifteen">
|
||||
<el-input v-model="form.fieldFifteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSixteen">
|
||||
<el-input v-model="form.fieldSixteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeventeen">
|
||||
<file-upload v-model="form.fieldSeventeen"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEighteen">
|
||||
<image-upload v-model="form.fieldEighteen"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNineteen">
|
||||
<el-select v-model="form.fieldNineteen" placeholder="请选择${comment}">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEnergyGeneralInfo, getEnergyGeneralInfo, delEnergyGeneralInfo, addEnergyGeneralInfo, updateEnergyGeneralInfo } from "@/api/energy/energyGeneralInfo";
|
||||
|
||||
export default {
|
||||
name: "EnergyGeneralInfo",
|
||||
dicts: ['sys_user_sex'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 新能源通用表格数据
|
||||
energyGeneralInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
moduleType: null,
|
||||
nowTimeOne: null,
|
||||
nowTimeTwo: null,
|
||||
fieldLikeOne: null,
|
||||
fieldLikeTwo: null,
|
||||
fieldLikeThree: null,
|
||||
fieldFour: null,
|
||||
fieldFive: null,
|
||||
fieldSix: null,
|
||||
fieldSeven: null,
|
||||
fieldEleven: null,
|
||||
fieldNine: null,
|
||||
fieldTen: null,
|
||||
fieldEight: null,
|
||||
fieldTwelve: null,
|
||||
fieldThirteen: null,
|
||||
fieldFourteen: null,
|
||||
fieldFifteen: null,
|
||||
fieldSixteen: null,
|
||||
fieldSeventeen: null,
|
||||
fieldEighteen: null,
|
||||
fieldNineteen: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询新能源通用列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listEnergyGeneralInfo(this.queryParams).then(response => {
|
||||
this.energyGeneralInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
moduleType: null,
|
||||
nowTimeOne: null,
|
||||
nowTimeTwo: null,
|
||||
remark: null,
|
||||
fieldLikeOne: null,
|
||||
fieldLikeTwo: null,
|
||||
fieldLikeThree: null,
|
||||
fieldFour: null,
|
||||
fieldFive: null,
|
||||
fieldSix: null,
|
||||
fieldSeven: null,
|
||||
fieldEleven: null,
|
||||
fieldNine: null,
|
||||
fieldTen: null,
|
||||
fieldEight: null,
|
||||
fieldTwelve: null,
|
||||
fieldThirteen: null,
|
||||
fieldFourteen: null,
|
||||
fieldFifteen: null,
|
||||
fieldSixteen: null,
|
||||
fieldSeventeen: null,
|
||||
fieldEighteen: null,
|
||||
fieldNineteen: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加新能源通用";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEnergyGeneralInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改新能源通用";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateEnergyGeneralInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addEnergyGeneralInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除新能源通用编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delEnergyGeneralInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('energy/energyGeneralInfo/export', {
|
||||
...this.queryParams
|
||||
}, `energyGeneralInfo_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,547 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="时间" prop="nowTimeOne">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.nowTimeOne"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间2" prop="nowTimeTwo">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.nowTimeTwo"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间2">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeOne">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeOne"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeTwo">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeTwo"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeThree">
|
||||
<el-input
|
||||
v-model="queryParams.fieldLikeThree"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFour">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFour"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFive">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFive"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSix">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSix"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeven">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSeven"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEleven">
|
||||
<el-input
|
||||
v-model="queryParams.fieldEleven"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNine">
|
||||
<el-input
|
||||
v-model="queryParams.fieldNine"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldTen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEight">
|
||||
<el-input
|
||||
v-model="queryParams.fieldEight"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTwelve">
|
||||
<el-input
|
||||
v-model="queryParams.fieldTwelve"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldThirteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldThirteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFourteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFourteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFifteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldFifteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSixteen">
|
||||
<el-input
|
||||
v-model="queryParams.fieldSixteen"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNineteen">
|
||||
<el-select v-model="queryParams.fieldNineteen" placeholder="请选择${comment}" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="energyGeneralInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键id" align="center" prop="id" />
|
||||
<el-table-column label="模块区分" align="center" prop="moduleType" />
|
||||
<el-table-column label="时间" align="center" prop="nowTimeOne" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.nowTimeOne, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间2" align="center" prop="nowTimeTwo" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.nowTimeTwo, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="${comment}" align="center" prop="remark" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeOne" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeTwo" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldLikeThree" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFour" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFive" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSix" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSeven" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEleven" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldNine" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldTen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEight" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldTwelve" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldThirteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFourteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldFifteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSixteen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldSeventeen" />
|
||||
<el-table-column label="${comment}" align="center" prop="fieldEighteen" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.fieldEighteen" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="${comment}" align="center" prop="fieldNineteen">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.fieldNineteen"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改新能源通用对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="时间" prop="nowTimeOne">
|
||||
<el-date-picker clearable
|
||||
v-model="form.nowTimeOne"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间2" prop="nowTimeTwo">
|
||||
<el-date-picker clearable
|
||||
v-model="form.nowTimeTwo"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间2">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeOne">
|
||||
<el-input v-model="form.fieldLikeOne" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeTwo">
|
||||
<el-input v-model="form.fieldLikeTwo" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldLikeThree">
|
||||
<el-input v-model="form.fieldLikeThree" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFour">
|
||||
<el-input v-model="form.fieldFour" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFive">
|
||||
<el-input v-model="form.fieldFive" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSix">
|
||||
<el-input v-model="form.fieldSix" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeven">
|
||||
<el-input v-model="form.fieldSeven" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEleven">
|
||||
<el-input v-model="form.fieldEleven" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNine">
|
||||
<el-input v-model="form.fieldNine" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTen">
|
||||
<el-input v-model="form.fieldTen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEight">
|
||||
<el-input v-model="form.fieldEight" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldTwelve">
|
||||
<el-input v-model="form.fieldTwelve" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldThirteen">
|
||||
<el-input v-model="form.fieldThirteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFourteen">
|
||||
<el-input v-model="form.fieldFourteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldFifteen">
|
||||
<el-input v-model="form.fieldFifteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSixteen">
|
||||
<el-input v-model="form.fieldSixteen" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldSeventeen">
|
||||
<file-upload v-model="form.fieldSeventeen"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldEighteen">
|
||||
<image-upload v-model="form.fieldEighteen"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="fieldNineteen">
|
||||
<el-select v-model="form.fieldNineteen" placeholder="请选择${comment}">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEnergyGeneralInfo, getEnergyGeneralInfo, delEnergyGeneralInfo, addEnergyGeneralInfo, updateEnergyGeneralInfo } from "@/api/energy/energyGeneralInfo";
|
||||
|
||||
export default {
|
||||
name: "EnergyGeneralInfo",
|
||||
dicts: ['sys_user_sex'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 新能源通用表格数据
|
||||
energyGeneralInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
moduleType: null,
|
||||
nowTimeOne: null,
|
||||
nowTimeTwo: null,
|
||||
fieldLikeOne: null,
|
||||
fieldLikeTwo: null,
|
||||
fieldLikeThree: null,
|
||||
fieldFour: null,
|
||||
fieldFive: null,
|
||||
fieldSix: null,
|
||||
fieldSeven: null,
|
||||
fieldEleven: null,
|
||||
fieldNine: null,
|
||||
fieldTen: null,
|
||||
fieldEight: null,
|
||||
fieldTwelve: null,
|
||||
fieldThirteen: null,
|
||||
fieldFourteen: null,
|
||||
fieldFifteen: null,
|
||||
fieldSixteen: null,
|
||||
fieldSeventeen: null,
|
||||
fieldEighteen: null,
|
||||
fieldNineteen: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询新能源通用列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listEnergyGeneralInfo(this.queryParams).then(response => {
|
||||
this.energyGeneralInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
moduleType: null,
|
||||
nowTimeOne: null,
|
||||
nowTimeTwo: null,
|
||||
remark: null,
|
||||
fieldLikeOne: null,
|
||||
fieldLikeTwo: null,
|
||||
fieldLikeThree: null,
|
||||
fieldFour: null,
|
||||
fieldFive: null,
|
||||
fieldSix: null,
|
||||
fieldSeven: null,
|
||||
fieldEleven: null,
|
||||
fieldNine: null,
|
||||
fieldTen: null,
|
||||
fieldEight: null,
|
||||
fieldTwelve: null,
|
||||
fieldThirteen: null,
|
||||
fieldFourteen: null,
|
||||
fieldFifteen: null,
|
||||
fieldSixteen: null,
|
||||
fieldSeventeen: null,
|
||||
fieldEighteen: null,
|
||||
fieldNineteen: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加新能源通用";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEnergyGeneralInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改新能源通用";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateEnergyGeneralInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addEnergyGeneralInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除新能源通用编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delEnergyGeneralInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('energy/energyGeneralInfo/export', {
|
||||
...this.queryParams
|
||||
}, `energyGeneralInfo_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user