zhoumingxiu #12
404
god-ui/src/views/hydraulic/archives/archiveQuery/index.vue
Normal file
404
god-ui/src/views/hydraulic/archives/archiveQuery/index.vue
Normal file
@ -0,0 +1,404 @@
|
||||
<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="reportType">
|
||||
<el-select v-model="queryParams.reportType" 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 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>
|
||||
<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"/>
|
||||
<el-table-column label="方案描述" align="center" prop="startDate" width="230"/>
|
||||
<el-table-column label="方案类别" align="center" prop="reportType" width="150">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.hydraulic_information_categorization" :value="scope.row.reportType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="所属单位" align="center" prop="duration" width="150"/>
|
||||
<el-table-column label="格式" align="center" prop="projectProgress">
|
||||
</el-table-column>
|
||||
<el-table-column label="方案标签" align="center" prop="engineerQuantity" width="150">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.hydraulic_archive_label" :value="scope.row.engineerQuantity ? scope.row.engineerQuantity.split(',') : []"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="归档日期" align="center" prop="reportDate" width="150"/>
|
||||
<el-table-column label="电子文档" align="center" prop="finishProgress">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.hydraulic_archive_upload" :value="scope.row.finishProgress"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="附件位置" align="center" prop="endDate" width="200"/>
|
||||
<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-input v-model="form.taskName" 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="reportType">
|
||||
<el-select v-model="form.reportType" 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="duration">
|
||||
<el-input v-model="form.duration" placeholder="请输入所属单位"/>
|
||||
</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_copy">
|
||||
<el-checkbox-group v-model="form.engineerQuantity_copy">
|
||||
<el-checkbox
|
||||
v-for="dict in dict.type.hydraulic_archive_label"
|
||||
:label="dict.value"
|
||||
:key="dict.value">
|
||||
{{dict.label}}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="归档日期" prop="reportDate">
|
||||
<el-date-picker clearable
|
||||
style="width: 100%"
|
||||
v-model="form.reportDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择归档日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子文档" prop="finishProgress">
|
||||
<el-select v-model="form.finishProgress" placeholder="请选择是否上传" style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in dict.type.hydraulic_archive_upload"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="reportPersonnel">
|
||||
<el-input v-model="form.reportPersonnel" placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="endDate">
|
||||
<file-upload v-model="form.endDate"/>
|
||||
</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 = "HydraulicArchives"
|
||||
const interfaceType = "ArchiveQuery"
|
||||
|
||||
export default {
|
||||
name: "Implement",
|
||||
dicts: ['hydraulic_information_categorization', 'hydraulic_archive_upload', 'hydraulic_archive_label'],
|
||||
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: [],
|
||||
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: [],
|
||||
finishProgress: null,
|
||||
sourceSys: sourceSys,
|
||||
interfaceType: interfaceType,
|
||||
createTime: null,
|
||||
reportPersonnel: null,
|
||||
engineerQuantity_copy: [],
|
||||
};
|
||||
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.form.engineerQuantity_copy = ['99']; // 标签默认其他
|
||||
this.title = "添加档案库信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getImplement(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.$set(this.form, 'engineerQuantity_copy', this.form.engineerQuantity)
|
||||
this.form.engineerQuantity_copy = this.form.engineerQuantity_copy.split(",");
|
||||
this.open = true;
|
||||
this.title = "修改档案库信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.engineerQuantity = this.form.engineerQuantity_copy.join(",");
|
||||
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>
|
Loading…
Reference in New Issue
Block a user