新增淮海水利交接资料、验收、项目评价查询

This commit is contained in:
zhoumingxiu 2023-12-15 16:33:27 +08:00
parent 3d9875abe8
commit 7a0cc6b0a5
3 changed files with 1151 additions and 0 deletions

View File

@ -0,0 +1,409 @@
<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="projectName">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="项目编号" prop="projectCode">
<el-input
v-model="queryParams.projectCode"
placeholder="请输入项目编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="评价时间" prop="reportDate">
<el-date-picker clearable
style="width: 100%"
v-model="queryParams.reportDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择评价时间">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="项目规划" prop="reportType">
<el-select v-model="queryParams.reportType" placeholder="请选择项目规划" clearable>
<el-option
v-for="dict in dict.type.hydraulic_expected_goals"
: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"
v-hasPermi="['hydraulicImplement:implement:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['hydraulicImplement:implement:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['hydraulicImplement:implement:remove']"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['hydraulicImplement:implement:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="implementList" @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="projectCode" width="150"/>
<el-table-column label="项目名称" align="center" prop="projectName" width="200"/>
<el-table-column label="预期目标" align="center" prop="taskName" width="200">
<template slot-scope="scope">
<dict-tag :options="dict.type.hydraulic_expected_goals" :value="scope.row.taskName"/>
</template>
</el-table-column>
<el-table-column label="项目规划" align="center" prop="reportType">
<template slot-scope="scope">
<dict-tag :options="dict.type.hydraulic_project_plan" :value="scope.row.reportType"/>
</template>
</el-table-column>
<el-table-column label="主要效益指标" align="center" prop="startDate" width="150">
<template slot-scope="scope">
<dict-tag :options="dict.type.hydraulic_benefit_indicators" :value="scope.row.startDate"/>
</template>
</el-table-column>
<el-table-column label="评价时间" align="center" prop="reportDate" width="150"/>
<el-table-column label="备注" align="center" prop="endDate" width="150"/>
<!--<el-table-column label="实际工期" align="center" prop="duration">
<template slot-scope="scope">{{ scope.row.duration + '天'}}</template>
</el-table-column>
<el-table-column label="工程进度" align="center" prop="projectProgress">
<template slot-scope="scope">{{ scope.row.projectProgress + '%'}}</template>
</el-table-column>
<el-table-column label="本次完成工程量" align="center" prop="engineerQuantity" width="150"/>
<el-table-column label="已完成工程进度" align="center" prop="finishProgress" width="150">
<template slot-scope="scope">{{ scope.row.finishProgress + '%'}}</template>
</el-table-column>
<el-table-column label="汇报人" align="center" prop="reportPersonnel" />-->
<!--<el-table-column label="所属系统" align="center" prop="sourceSys" />
<el-table-column label="接口类型" align="center" prop="interfaceType" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['hydraulicImplement:implement:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['hydraulicImplement:implement:remove']"
>删除
</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="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="项目编号" prop="projectCode">
<el-input v-model="form.projectCode" placeholder="请输入项目编号"/>
</el-form-item>
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="form.projectName" placeholder="请输入项目名称"/>
</el-form-item>
<el-form-item label="预期目标" prop="taskName">
<el-select v-model="form.taskName" placeholder="请选择预期目标" style="width: 100%">
<el-option
v-for="dict in dict.type.hydraulic_expected_goals"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="项目规划" prop="reportType">
<el-select v-model="form.reportType" placeholder="请选择项目规划" style="width: 100%">
<el-option
v-for="dict in dict.type.hydraulic_project_plan"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="主要效益指标" prop="startDate">
<el-select v-model="form.startDate" placeholder="请选择主要效益指标" style="width: 100%">
<el-option
v-for="dict in dict.type.hydraulic_benefit_indicators"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="endDate">
<el-input v-model="form.endDate" placeholder="请输入备注"/>
</el-form-item>
<el-form-item label="评价时间" prop="reportDate">
<el-date-picker clearable
style="width: 100%"
v-model="form.reportDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择评价时间">
</el-date-picker>
</el-form-item>
<!--<el-form-item label="实际工期" prop="duration">
<el-input v-model="form.duration" placeholder="请输入实际工期">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="工程进度" prop="projectProgress">
<el-input v-model="form.projectProgress" placeholder="请输入工程进度">
<template slot="append">%</template>
</el-input>
</el-form-item>
<el-form-item label="本次完成工程量" prop="engineerQuantity">
<el-input v-model="form.engineerQuantity" placeholder="请输入本次完成工程量"/>
</el-form-item>
<el-form-item label="已完成工程进度" prop="finishProgress">
<el-input v-model="form.finishProgress" placeholder="请输入已完成工程进度">
<template slot="append">%</template>
</el-input>
</el-form-item>
<el-form-item label="汇报人" prop="reportPersonnel">
<el-input v-model="form.reportPersonnel" placeholder="请输入汇报人" />
</el-form-item>-->
<!--<el-form-item label="所属系统" prop="sourceSys">
<el-input v-model="form.sourceSys" placeholder="请输入所属系统" />
</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 {listImplement, getImplement, delImplement, addImplement, updateImplement} from "@/api/hydraulic/implement";
const sourceSys = "HydraulicImplement"
const interfaceType = "Appraisal"
export default {
name: "Implement",
dicts: ['hydraulic_expected_goals', 'hydraulic_project_plan', 'hydraulic_benefit_indicators'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
implementList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
projectName: null,
projectCode: null,
reportDate: null,
taskName: null,
reportType: null,
startDate: null,
endDate: null,
duration: null,
projectProgress: null,
engineerQuantity: null,
finishProgress: null,
sourceSys: sourceSys,
interfaceType: interfaceType,
reportPersonnel: null
},
//
form: {},
//
rules: {}
};
},
created() {
this.getList();
},
methods: {
/** 查询项目评价信息列表 */
getList() {
this.loading = true;
listImplement(this.queryParams).then(response => {
this.implementList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
projectCode: null,
reportDate: null,
taskName: null,
reportType: null,
startDate: null,
endDate: null,
duration: null,
projectProgress: null,
engineerQuantity: null,
finishProgress: null,
sourceSys: sourceSys,
interfaceType: interfaceType,
createTime: null,
reportPersonnel: 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
getImplement(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) {
updateImplement(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addImplement(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 delImplement(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('hydraulicImplement/implement/export', {
...this.queryParams
}, `implement_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,360 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="项目名称" prop="projectName">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="项目编码" prop="projectCode">
<el-input
v-model="queryParams.projectCode"
placeholder="请输入项目编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="项目阶段状态" prop="reportType">
<el-input
v-model="queryParams.reportType"
placeholder="请输入项目阶段状态"
clearable
@keyup.enter.native="handleQuery"
/>
</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"
v-hasPermi="['hydraulicImplement:implement:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['hydraulicImplement:implement:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['hydraulicImplement:implement:remove']"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['hydraulicImplement:implement:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="implementList" @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="projectCode" width="150"/>
<el-table-column label="项目名称" align="center" prop="projectName" width="200"/>
<el-table-column label="联系人" align="center" prop="taskName"/>
<el-table-column label="联系方式" align="center" prop="finishProgress" width="150"/>
<el-table-column label="交接人" align="center" prop="reportPersonnel" />
<el-table-column label="交接联系方式" align="center" prop="duration" width="150">
</el-table-column>
<el-table-column label="项目阶段状态" align="center" prop="reportType" width="150">
</el-table-column>
<el-table-column label="交接文档内容" align="center" prop="startDate" width="250"/>
<el-table-column label="客户项目组" align="center" prop="endDate" width="150"/>
<!--<el-table-column label="工程进度" align="center" prop="projectProgress">
<template slot-scope="scope">{{ scope.row.projectProgress + '%'}}</template>
</el-table-column>-->
<el-table-column label="项目施工范围" align="center" prop="engineerQuantity" width="150"/>
<el-table-column label="交接时间" align="center" prop="reportDate" width="150"/>
<!--<el-table-column label="所属系统" align="center" prop="sourceSys" />
<el-table-column label="接口类型" align="center" prop="interfaceType" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['hydraulicImplement:implement:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['hydraulicImplement:implement:remove']"
>删除
</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="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="项目编码" prop="projectCode">
<el-input v-model="form.projectCode" placeholder="请输入项目编码"/>
</el-form-item>
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="form.projectName" placeholder="请输入项目名称"/>
</el-form-item>
<el-form-item label="联系人" prop="taskName">
<el-input v-model="form.taskName" placeholder="请输入联系人"/>
</el-form-item>
<el-form-item label="联系方式" prop="finishProgress">
<el-input v-model="form.finishProgress" placeholder="请输入联系方式"/>
</el-form-item>
<el-form-item label="交接人" prop="reportPersonnel">
<el-input v-model="form.reportPersonnel" placeholder="请输入交接人" />
</el-form-item>
<el-form-item label="交接联系方式" prop="duration">
<el-input v-model="form.duration" placeholder="请输入交接联系方式"/>
</el-form-item>
<el-form-item label="项目阶段状态" prop="reportType">
<el-input v-model="form.reportType" placeholder="请输入项目阶段状态"/>
</el-form-item>
<el-form-item label="交接文档内容" prop="startDate">
<el-input v-model="form.startDate" placeholder="请输入交接文档内容"/>
</el-form-item>
<el-form-item label="客户项目组" prop="endDate">
<el-input v-model="form.endDate" placeholder="请输入客户项目组"/>
</el-form-item>
<!--<el-form-item label="工程进度" prop="projectProgress">
<el-input v-model="form.projectProgress" placeholder="请输入工程进度">
<template slot="append">%</template>
</el-input>
</el-form-item>-->
<el-form-item label="项目施工范围" prop="engineerQuantity">
<el-input v-model="form.engineerQuantity" placeholder="请输入项目施工范围"/>
</el-form-item>
<el-form-item label="交接时间" prop="reportDate">
<el-date-picker clearable
style="width: 100%"
v-model="form.reportDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择交接时间">
</el-date-picker>
</el-form-item>
<!--<el-form-item label="所属系统" prop="sourceSys">
<el-input v-model="form.sourceSys" placeholder="请输入所属系统" />
</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 {listImplement, getImplement, delImplement, addImplement, updateImplement} from "@/api/hydraulic/implement";
const sourceSys = "HydraulicImplement"
const interfaceType = "Information"
export default {
name: "Implement",
dicts: ['hydraulic_report_type'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
implementList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
projectName: null,
projectCode: null,
reportDate: null,
taskName: null,
reportType: null,
startDate: null,
endDate: null,
duration: null,
projectProgress: null,
engineerQuantity: null,
finishProgress: null,
sourceSys: sourceSys,
interfaceType: interfaceType,
reportPersonnel: null
},
//
form: {},
//
rules: {}
};
},
created() {
this.getList();
},
methods: {
/** 查询验收交接资料列表 */
getList() {
this.loading = true;
listImplement(this.queryParams).then(response => {
this.implementList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
projectCode: null,
reportDate: null,
taskName: null,
reportType: null,
startDate: null,
endDate: null,
duration: null,
projectProgress: null,
engineerQuantity: null,
finishProgress: null,
sourceSys: sourceSys,
interfaceType: interfaceType,
createTime: null,
reportPersonnel: 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
getImplement(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) {
updateImplement(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addImplement(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 delImplement(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('hydraulicImplement/implement/export', {
...this.queryParams
}, `implement_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,382 @@
<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="projectName">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="项目编码" prop="projectCode">
<el-input
v-model="queryParams.projectCode"
placeholder="请输入项目编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="递交时间" prop="reportDate">
<el-date-picker clearable
style="width: 100%"
v-model="queryParams.reportDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择递交时间">
</el-date-picker>
</el-form-item>
<el-form-item label="资料归类" prop="taskName">
<el-select v-model="queryParams.taskName" placeholder="请选择资料归类" clearable>
<el-option
v-for="dict in dict.type.hydraulic_information_categorization"
: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"
v-hasPermi="['hydraulicImplement:implement:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['hydraulicImplement:implement:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['hydraulicImplement:implement:remove']"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['hydraulicImplement:implement:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="implementList" @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="projectCode" width="150"/>
<el-table-column label="项目名称" align="center" prop="projectName" width="200"/>
<el-table-column label="资料归类" align="center" prop="taskName" width="200">
<template slot-scope="scope">
<dict-tag :options="dict.type.hydraulic_information_categorization" :value="scope.row.taskName"/>
</template>
</el-table-column>
<el-table-column label="资料类别" align="center" prop="reportType" width="200">
</el-table-column>
<el-table-column label="验收报告" align="center" prop="startDate" width="150"/>
<el-table-column label="施工合同" align="center" prop="endDate" width="180"/>
<!--<el-table-column label="实际工期" align="center" prop="duration">
<template slot-scope="scope">{{ scope.row.duration + '天'}}</template>
</el-table-column>-->
<el-table-column label="现场施工变更记录" align="center" prop="projectProgress" width="150">
</el-table-column>
<!--<el-table-column label="本次完成工程量" align="center" prop="engineerQuantity" width="150"/>-->
<el-table-column label="设计变更通知单" align="center" prop="finishProgress" width="150">
</el-table-column>
<el-table-column label="递交人" align="center" prop="reportPersonnel" />
<el-table-column label="递交时间" align="center" prop="reportDate" width="150"/>
<!--<el-table-column label="所属系统" align="center" prop="sourceSys" />
<el-table-column label="接口类型" align="center" prop="interfaceType" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['hydraulicImplement:implement:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['hydraulicImplement:implement:remove']"
>删除
</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="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="项目编码" prop="projectCode">
<el-input v-model="form.projectCode" placeholder="请输入项目编码"/>
</el-form-item>
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="form.projectName" placeholder="请输入项目名称"/>
</el-form-item>
<el-form-item label="资料归类" prop="taskName">
<el-select v-model="form.taskName" placeholder="请选择资料归类" style="width: 100%">
<el-option
v-for="dict in dict.type.hydraulic_information_categorization"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="资料类别" prop="reportType">
<el-input v-model="form.reportType" placeholder="请输入资料类别"/>
</el-form-item>
<el-form-item label="验收报告" prop="startDate">
<el-input v-model="form.startDate" placeholder="请输入验收报告"/>
</el-form-item>
<el-form-item label="施工合同" prop="endDate">
<el-input v-model="form.endDate" placeholder="请输入施工合同"/>
</el-form-item>
<!--<el-form-item label="实际工期" prop="duration">
<el-input v-model="form.duration" placeholder="请输入实际工期">
<template slot="append"></template>
</el-input>
</el-form-item>-->
<el-form-item label="现场施工变更记录" prop="projectProgress">
<el-input v-model="form.projectProgress" placeholder="请输入现场施工变更记录"/>
</el-form-item>
<!-- <el-form-item label="本次完成工程量" prop="engineerQuantity">
<el-input v-model="form.engineerQuantity" placeholder="请输入本次完成工程量"/>
</el-form-item>-->
<el-form-item label="设计变更通知单" prop="finishProgress">
<el-input v-model="form.finishProgress" placeholder="请输入设计变更通知单"/>
</el-form-item>
<el-form-item label="递交人" prop="reportPersonnel">
<el-input v-model="form.reportPersonnel" placeholder="请输入递交人" />
</el-form-item>
<el-form-item label="递交时间" prop="reportDate">
<el-date-picker clearable
style="width: 100%"
v-model="form.reportDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择递交时间">
</el-date-picker>
</el-form-item>
<!--<el-form-item label="所属系统" prop="sourceSys">
<el-input v-model="form.sourceSys" placeholder="请输入所属系统" />
</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 {listImplement, getImplement, delImplement, addImplement, updateImplement} from "@/api/hydraulic/implement";
const sourceSys = "HydraulicImplement"
const interfaceType = "Search"
export default {
name: "Implement",
dicts: ['hydraulic_information_categorization'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
implementList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
projectName: null,
projectCode: null,
reportDate: null,
taskName: null,
reportType: null,
startDate: null,
endDate: null,
duration: null,
projectProgress: null,
engineerQuantity: null,
finishProgress: null,
sourceSys: sourceSys,
interfaceType: interfaceType,
reportPersonnel: null
},
//
form: {},
//
rules: {}
};
},
created() {
this.getList();
},
methods: {
/** 查询项目验收信息列表 */
getList() {
this.loading = true;
listImplement(this.queryParams).then(response => {
this.implementList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
projectCode: null,
reportDate: null,
taskName: null,
reportType: null,
startDate: null,
endDate: null,
duration: null,
projectProgress: null,
engineerQuantity: null,
finishProgress: null,
sourceSys: sourceSys,
interfaceType: interfaceType,
createTime: null,
reportPersonnel: 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
getImplement(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) {
updateImplement(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addImplement(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 delImplement(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('hydraulicImplement/implement/export', {
...this.queryParams
}, `implement_${new Date().getTime()}.xlsx`)
}
}
};
</script>